Answer to Question #27721 in Astronomy | Astrophysics for Omkareshwar Jha
Use it with care, though, because this boundary condition has not yet been tested very thoroughly. In particular, it doesn't seem to be very stable, numerically, at high Rayleigh number.
// The lattice of the navier-stokes solver
MultiBlockLattice3D<T, NSDESCRIPTOR> nsLattice (
nx,ny,nz,new NSDYNAMICS<T, NSDESCRIPTOR>(nsOmega) );
// The lattice of the temperature solver
MultiBlockLattice3D<T, ADESCRIPTOR> adLattice (
nx,ny,nz,new ADYNAMICS<T, ADESCRIPTOR>(adOmega) );
// .. at this place, create the coupling between temperature and fluid, as usual.
& nsBoundaryCondition = createLocalBoundaryCondition3D<T,NSDESCRIPTOR>();
& adBoundaryCondition = createLocalAdvectionDiffusionBoundaryCondition3D<T,ADESCRIPTOR>();
// All outer walls of the rectangular domain shall implement a velocity condition for
// the fluid, and a fixed temperature condition for the temperature.
nsBoundaryCondition -> setVelocityConditionOnBlockBoundaries(nsLattice);
adBoundaryCondition -> setTemperatureConditionOnBlockBoundaries(adLattice);
// On one selected plane (the x-z plane at y=0), turn the temperature condition
// into an adiabatic condition.
Box3D adiabaticWall(0,& nx-1, 0, 0, 1, nz-2);
xint processorLevelBC = 1;
adiabaticWall, adLattice, processorLevelBC );
Need a fast expert's response?Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!