Skip to content

Reply To: Poiseuille2D: Interpolated and local values(velocity and pressure)

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)

#5913
achodankar
Participant

Hello Julius,
I defined the characteristic pressure as 101325 Pa using the unit converter.

Here is the code snippet:

UnitConverterFromResolutionAndRelaxationTime<T, DESCRIPTOR> const converter(
int {N}, // resolution: number of voxels per charPhysL
(T) lat_relax_time,//0.8 // latticeRelaxationTime: relaxation time, have to be greater than 0.5!
(T) char_phys_length, // charPhysLength: reference length of simulation geometry
(T) char_phys_velocity, // charPhysVelocity: maximal/highest expected velocity during simulation in __m / s__
(T) phys_kinematic_viscosity, // physViscosity: physical kinematic viscosity in __m^2 / s__
(T) phys_density, // physDensity: physical density in __kg / m^3__
(T) 101325. //charphysPressure
);
(latticePhysPressure2D.hh) Here is the code snippet where I removed the offset for pressure:

template <typename T, typename DESCRIPTOR>
bool BlockLatticePhysPressure2D<T,DESCRIPTOR>::operator() (T output[], const int input[])
{
// lattice pressure = c_s^2 ( rho -1 )
T latticePressure = ( this->_blockLattice.get( input[0], input[1] ).computeRho()) / descriptors::invCs2<T,DESCRIPTOR>();
output[0] = this->_converter.getPhysPressure(latticePressure);

return true;
}

Thank you.

Yours sincerely,

Abhijeet C.