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/)
-   -   Error in heat conduction rate calculation in OpenFOAM while using rhoCentralFOAM (https://www.cfd-online.com/Forums/openfoam-solving/214369-error-heat-conduction-rate-calculation-openfoam-while-using-rhocentralfoam.html)

Daedalus January 29, 2019 06:53

Error in heat conduction rate calculation in OpenFOAM while using rhoCentralFOAM
 
Hello!


This chunk of code represents viscous correction for energy equation in rhoCentralFoam solver in OpenFOAM-dev.
Code:

if (!inviscid)
{

solve
(
fvm::ddt(rho, e) - fvc::ddt(rho, e)
  - fvm::laplacian(turbulence->alphaEff(), e) 

);
thermo.correct();
rhoE = rho*(e + 0.5*magSqr(U));
}

Here, turbulence->alphaEff() is defined as kappaEff/Cp and using energy definition as sensibleInternalEnergy in constant/thermophysicalProperties file, e=Cv*T.
So, above equation effectively translates into

\frac{\partial}{\partial x_j}(\frac{\kappa_{Eff}}{\gamma}\frac{\partial T}{\partial x_j})


But, it should be only

\frac{\partial}{\partial x_j}(\kappa_{Eff}\frac{\partial T}{\partial x_j}).


Since, it would not make much difference if \gamma is constant. But when using Janaf tables at high temperature, these two gives different solutions because \gamma varies with temperature. Which one is correct? Can somebody help?


I have same question regarding calculation of wallHeatFlux. Should it be

calcWallHeatFlux(turbModel.alphaEff(), turbModel.transport().he())
or
calcWallHeatFlux(turbModel.kappaEff(), turbModel.transport().T())


in file https://github.com/OpenFOAM/OpenFOAM...wallHeatFlux.C at line 220



Thanks


All times are GMT -4. The time now is 17:45.