Reply To: Claculate Force Term in OpenLB (rayleigh benard problem)
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Claculate Force Term in OpenLB (rayleigh benard problem) › Reply To: Claculate Force Term in OpenLB (rayleigh benard problem)
Hello Navid,
there seems to be a bug in the implementation of the method BlockLatticeGuoZhaoPhysBodyForce2D<T,DESCRIPTOR>::operator().
If you change the field access in the BlockLatticeGuoZhaoPhysBodyForce2D<T,DESCRIPTOR>::operator() method (src/functors/lattice/latticeGuoZhaoPhysBodyForce2D.hh, ll. 67-75) to
template <typename T, typename DESCRIPTOR>
bool BlockLatticeGuoZhaoPhysBodyForce2D<T,DESCRIPTOR>::operator() (T output[], const int input[])
{
output[0] = this->_converter.getPhysForce( this->_blockLattice.get( input[0], input[1] )
.template getFieldPointer<descriptors::BODY_FORCE>()[0] );
output[1] = this->_converter.getPhysForce( this->_blockLattice.get( input[0], input[1] )
.template getFieldPointer<descriptors::BODY_FORCE>()[1] );
return true;
}
, does it work for you?
Yours,
Julius