OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Poiseuille2D: Interpolated and local values(velocity and pressure) Reply To: Poiseuille2D: Interpolated and local values(velocity and pressure)

#5901
achodankar
Participant

Hello Mathias,
I did follow the procedure as you suggested. The density value is already set in the unit converter.

SuperLatticeDensity2D<T,DESCRIPTOR> densityF(sLattice);
AnalyticalFfromSuperF2D<T> intpolatedensity_lat(densityF, true );

intpolatedensity_lat( density_lat,point );

//compute lattice pressure
pressure_lat=(density_lat)/descriptors::invCs2<T,DESCRIPTOR>();

//Compute physical pressure
pressure_phys = (pressure_lat * converter.getConversionFactorPressure())+converter.getCharPhysPressure();

If I set characteristic pressure as 101325 Pa, the lattice pressure is 0.3333 and the physical pressure is 101349 Pa.
However, when I extract the pressure values from the usual method, the value of physical pressure is 101325 Pa, which is not correct. I tried the code to extract lattice pressure from one of the previous posts in the forum but was unable to extract. What would the syntax be? The commented lines compile without any errors. I am unable to extract those values. Also, why do we subtract 1. Based on equation of state: P = rho * cs^2 (in the blocklatticepressurephys code file also they have subtracted one).

Here is the code snippet:

SuperLatticePhysPressure2D<T, DESCRIPTOR> pressure_phys(sLattice, converter);
AnalyticalFfromSuperF2D<T> intpolatepressure_phys( pressure_phys, true );
intpolatepressure_phys( numericalpressure_phys,point );

//Store the lattice Pressure
// SuperLatticeDensity2D<T,DESCRIPTOR> densityF(sLattice);
// auto latticePressureF = (functor_dsl::lift(densityF) – 1.0) / descriptors::invCs2<T,DESCRIPTOR>();

I would be grateful for your suggestions on this issue

Thank you.

Yours sincerely,

Abhijeet C.