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)
Hello Julius,
Thank you for your prompt response again. The source code has the offset. The formula for lattice pressure in the code is given as: p= cs2 * (rho-1). You had mentioned earlier the offset is for the reason of numerical accuracy. But, I am unable to comprehend how the pressure values will match.
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()-1) / descriptors::invCs2<T,DESCRIPTOR>();
output[0] = this->_converter.getPhysPressure(latticePressure);
return true;
}
There is no offset in the density in the source code:
template <typename T, typename DESCRIPTOR>
bool BlockLatticeDensity2D<T,DESCRIPTOR>::operator() (T output[], const int input[])
{
output[0] = this->_blockLattice.get( input[0], input[1] ).computeRho();
return true;
}
Thank you once again for your patience and help. I really appreciate it.
Thank you.
Yours sincerely,
Abhijeet C.