CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Figuring out how mu_eff and alphaeff are calcualted for reactingFoam (https://www.cfd-online.com/Forums/openfoam-solving/236928-figuring-out-how-mu_eff-alphaeff-calcualted-reactingfoam.html)

kuria June 22, 2021 09:48

Figuring out how mu_eff and alphaeff are calcualted for reactingFoam
 
Hey Foamers

I am looking at the reactingFoam solver in OpenFOAM 8 and trying to understand how the energy and species equations are solved.

In energy equation:
fvScalarMatrix EEqn
(
fvm::ddt(rho, he) + mvConvection->fvmDiv(phi, he)
+ fvc::ddt(rho, K) + fvc::div(phi, K)
+ (
he.name() == "e"
? fvc::div
(
fvc::absolute(phi/fvc::interpolate(rho), U),
p,
"div(phiv,p)"
)
: -dpdt
)
+ thermophysicalTransport->divq(he)
==
reaction->Qdot()
+ fvOptions(rho, he)
);

EEqn.relax();

fvOptions.constrain(EEqn);

EEqn.solve();

thermophysicalTransport->divq(he) is calculated for the turbulent part as
template<class TurbulenceThermophysicalTransportModel>
tmp<fvScalarMatrix>
eddyDiffusivity<TurbulenceThermophysicalTransportM odel>::divq
(
volScalarField& he
) const
{
return -fvm::laplacian(this->alpha()*this->alphaEff(), he);
}


Similarly for species transport equation, the laplacian term is calcualted based on
template<class TurbulenceThermophysicalTransportModel>
tmp<fvScalarMatrix>
eddyDiffusivity<TurbulenceThermophysicalTransportM odel>::divj
(
volScalarField& Yi
) const
{
return -fvm::laplacian(this->alpha()*this->DEff(Yi), Yi);
}


I understood until here, but I could not figure out how both DEff and alphaEff are calculated.

Has someone looked into how these are calculated ?

Tobi June 22, 2021 10:09

Well, muEff as the other one is the dynamic part plus the turbulent part. So muEff is the dynamic viscosity plus the part that comes from the turbulence models. I updated the section in my book already (but not published) regarding such things. I think, I am going to re-update the book after FOAM v9 is out.

So the muEff is calculated in the turbulence classes. I would not agree that you are in the correct classes. I once thought that we are in the eddy viscosity class but I guess we are not. Simply use a GDB to check out where you go. I donīt have time right now.

kuria June 23, 2021 09:52

Hey Tobias

Thank you for the quick reply!
I will check which classes are getting called to backtrack it


All times are GMT -4. The time now is 20:40.