CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Solving the total energy equation (https://www.cfd-online.com/Forums/openfoam/72127-solving-total-energy-equation.html)

fairuz June 13, 2014 00:07

Quote:

Originally Posted by cliffoi (Post 283142)
Hi all,
I have spent some time looking at this and finally implemented the total enthalpy equation as follows:

volScalarField Ek = 0.5*magSqr(U);
htot = h + Ek;
htot.correctBoundaryConditions();

{
solve
(
fvm::ddt(rho, htot)
+ fvm::div(phi, htot)
- fvm::laplacian(turbulence->alphaEff(), htot)
+ fvc::laplacian(turbulence->alphaEff(), Ek)
==
fvc::ddt(p)
+ fvc::div(tau & U, "div((muEff*dev(twoSymm(fvc::grad(U))))&U)")
);
}

h = htot - Ek;
h.correctBoundaryConditions();

Here tau is the stress tensor. Even though it's small I have included it in my solver.
Note that the total enthalpy requires customized boundaries, like the gradientEnthalpyFvPatchScalarField and similar classes supplied in thermophysicalModels to get consistent solutions.
The solutions from this implementation are looking pretty good.
Going back to my previous comment, if we use enthalpy we don't have to worry about whether turbulence->alphaEff() is applicable.

Hi Ivor

So doing this is sufficient enough?Do u have done any other modification in order to correct the boundary condition?

cliffoi June 13, 2014 01:44

1 Attachment(s)
I typically use custom boundaries for a problem like this since often we're looking to fix a temperature, velocity, heat flux or apply some other heat source/sink at the boundary, and we need to supply expressions for total enthalpy in terms of these variables . This is no different from what OpenFOAM already does for the enthalpy equation... I just customized it for my specific case.
I have attached the boundary I use that takes the temperature and velocity boundaries conditions and defines the total enthalpy in terms of these.

Regards
Ivor


All times are GMT -4. The time now is 08:58.