Re: Saving Local Pressure Values
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Saving Local Pressure Values › Re: Saving Local Pressure Values
January 17, 2017 at 3:27 pm
#2507
robin.trunk
Keymaster
Hi Sumit,
you can get the pressure “p1” at a physical location “point” as follows:
Quote:
SuperLatticePhysPressure3D<T, DESCRIPTOR> pressure(sLattice, converter); // create functor
AnalyticalFfromSuperF3D<T> intpolatePressure( pressure, true ); // prepare functor to accept physical locations by interpolation
T point[3] = {1.,0,0}; // physical location
T p1=0;
intpolatePressure( &p1,point ); // compute pressure at point1 and wirte value in p1
std::cout << “pressure= ” << p1 << std::endl;
AnalyticalFfromSuperF3D<T> intpolatePressure( pressure, true ); // prepare functor to accept physical locations by interpolation
T point[3] = {1.,0,0}; // physical location
T p1=0;
intpolatePressure( &p1,point ); // compute pressure at point1 and wirte value in p1
std::cout << “pressure= ” << p1 << std::endl;
To create a file containing the pressure values, C++ should provide some functions.
Best
Robin