channel3d Taueff problem
› Forums › OpenLB › General Topics › channel3d Taueff problem
- This topic has 1 reply, 2 voices, and was last updated 1 year, 7 months ago by FBukreev.
-
AuthorPosts
-
July 12, 2024 at 4:15 pm #8913liuParticipant
Dear Community :
I want to call the value in the TAU_EFF and use it for calculations, how should it be used, thank you very much.
Here’s the full code
///////////////////////////////////////////////////////////////////
void setInitialConditions(SuperLattice<T, DESCRIPTOR>& sLattice,
UnitConverter<T,DESCRIPTOR> const& converter,
SuperGeometry<T,3>& superGeometry,
AnalyticalScaled3D<T, T>& forceSolScaled,
TrackedForcing3D<T, T>& forceSol)
{OstreamManager clout(std::cout, “setInitialConditions”);
clout << “Set initial conditions …” << std::endl;AnalyticalConst3D<T, T> rho(1.);
Channel3D<T, T> uSol(converter, 1.);sLattice.defineRhoU(superGeometry, 1, rho, uSol);
sLattice.iniEquilibrium(superGeometry, 1, rho, uSol);sLattice.defineRhoU(superGeometry, 2, rho, uSol);
sLattice.iniEquilibrium(superGeometry, 2, rho, uSol);AnalyticalConst3D<T,T> TauEff(1./converter.getLatticeRelaxationFrequency());
sLattice.defineField<TAU_EFF>(superGeometry, 1, TauEff);
sLattice.defineField<TAU_EFF>(superGeometry, 2, TauEff);//// Force Initialization
forceSol.updateAveVelocity(converter.getCharPhysVelocity()); // New average velocity// Initialize force
sLattice.defineField<FORCE>(superGeometry, 1, forceSolScaled);
sLattice.defineField<FORCE>(superGeometry, 2, forceSolScaled);
// Tau_w Initialization
T tau_w_guess = 0.0; // Wall shear stress in phys units
AnalyticalConst3D<T, T> tau_w_ini(tau_w_guess);
AnalyticalScaled3D<T, T> tau_w_ini_scaled(tau_w_ini, 1. / ( converter.getConversionFactorForce() * util::pow(converter.getConversionFactorLength(),2.) ) );sLattice.defineField<TAU_W>(superGeometry, 1, tau_w_ini_scaled);
sLattice.defineField<TAU_W>(superGeometry, 2, tau_w_ini_scaled);clout << “Set initial conditions … OK” << std::endl;
}July 16, 2024 at 7:35 am #8934FBukreevKeymasterHello,
please look in src/dynamics/navierStokesAdvectionDiffusionCoupling.h or into the postProcessors in src/boundary. There you can find how to make calculations per cell with external fields.
-
AuthorPosts
- You must be logged in to reply to this topic.
