Dear everyone,

I am confused with the function ComputeNusselt() in squarecavity2d:

T computeNusselt(SuperGeometry2D<T>& superGeometry,

SuperLattice2D<T, NSDESCRIPTOR>& NSlattice,

SuperLattice2D<T, TDESCRIPTOR>& ADlattice)

{

int voxel = 0, material = 0;

T T_x = 0, T_xplus1 = 0, T_xplus2 = 0;

T q = 0;

for (int iC = 0; iC < NSlattice.getLoadBalancer().size(); iC++) {

int ny = NSlattice.getBlockLattice(iC).getNy();

int iX = 0;

for (int iY = 0; iY < ny; ++iY) {

material = superGeometry.getBlockGeometry(iC).getMaterial(iX,iY);

T_x = ADlattice.getBlockLattice(iC).get(iX,iY).computeRho();

T_xplus1 = ADlattice.getBlockLattice(iC).get(iX+1,iY).computeRho();

T_xplus2 = ADlattice.getBlockLattice(iC).get(iX+2,iY).computeRho();

if ( material == 2 ) {

q += (3.0*T_x – 4.0*T_xplus1 + 1.0*T_xplus2)/2.0*N;

voxel++;

}

}

}

#ifdef PARALLEL_MODE_MPI

singleton::mpi().reduceAndBcast(q, MPI_SUM);

singleton::mpi().reduceAndBcast(voxel, MPI_SUM);

#endif

return q / (T)voxel;

}

Why can the Nusselt number be computed by the density?Maybe I got it wrong.Anyway,I wonder if anyone can provide the formula or equation which the code is based on.It would mean a lot to me.Many thanks in advance!

Best Regards,

Mike