Viewing 6 posts - 1 through 6 (of 6 total)
• Author
Posts
• #1884
takamori67
Member

Hello everyone,
I am trying to evaluate the change of pressure over time at a certain point. Is it possible to save the converted (i.e. physical) pressure values at a single point of the volume and have it as output (e.g. an ASCII file)?

Sumit

#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;

To create a file containing the pressure values, C++ should provide some functions.

Best
Robin

#2510
takamori67
Member

Thanks for helping me with this problem as well, Robin!

I’ll try it out.

#2523
takamori67
Member

Hi Robin,

if I want to get the physical velocity at location “point”, I just change the code to this, right?

SuperLatticePhysVelocity3D<T, DESCRIPTOR> velocity(sLattice, converter, false); // create functor
AnalyticalFfromSuperF3D<T> intpolateVelocity( velocity, true ); // prepare functor to accept physical locations by interpolation
T point[3] = {1.,0,0}; // physical location
T u1[3]={0,0,0};
intpolateVelocity( &p1,point ); // compute velocity at point1 and write value in u1
std::cout << “u1_x= ” << u1[0] << std::endl;

#2524
robin.trunk
Keymaster

Hi Sumit,

replacing
intpolateVelocity( &p1,point );
by
intpolateVelocity( u1,point );