Dear OpenLB team,
I have a question about the initialize. As shown in cylinder2D example, function
Code:
sLattice.iniEquilibrium( superGeometry, 1, rhoF, uF )
is applied to initialize the flow field at equilibrium distribution with rhoF and uF. As far as I can see, uF is set in the code with a non-zero value. But when I checked the core code:
Code:
template<typename T, template<typename U> class Lattice>
void BlockLatticeStructure2D<T,Lattice>::iniEquilibrium(
BlockGeometryStructure2D<T>& blockGeometry, int material,
AnalyticalF2D<T,T>& rho , AnalyticalF2D<T,T>& u)
{
T physR[2]= {T(),T()};
for (int iX = 0; iX < this->_nx; iX++) {
for (int iY = 0; iY < this->_ny; iY++) {
if (blockGeometry.getMaterial(iX, iY) == material) {
blockGeometry.getPhysR(physR,iX,iY);
T uTmp[] = {T(),T()};
u(uTmp,physR);
T rhoTmp = T();
rho(&rhoTmp,physR);
get(iX,iY).iniEquilibrium(rhoTmp,uTmp);
std::cout << “iX ” << iX << ” iY ” << iY << ” rho ” << rhoTmp << ” u ” << uTmp[0] << ” ” << uTmp[1] << ” physR ” << physR[0] << ” ” << physR[1] << std::endl;
}
}
}
}
the uTmp, which is used to iniEquilibrium at cells, is always 0. May I ask is that intended or not? If so, is there any method to initialize the domain with non-zero uniform velocity?
Looking forward to hearing from you. 🙂
Best regards,
Eric