# Energy equation in OpenFoam

 Register Blogs Members List Search Today's Posts Mark Forums Read

 June 23, 2014, 21:35 Energy equation in OpenFoam #1 Member   Kan Join Date: Feb 2014 Location: Australia Posts: 54 Rep Power: 11 Dear OpenFoamer, I have a question regarding the energy equation in rhoSimpleFoam. see code: fvm::div(phi, h) - fvm::Sp(fvc::div(phi), h) - fvm::laplacian(turbulence->alphaEff(), h) == - fvc::div(phi, 0.5*magSqr(U), "div(phi,K)") I think this energy equation written in enthalpy has missed viscous related term, is that right? because I use this solver to simulate a shear driven flow, but the temperature increase is small compared to experiment results. If I am right, how can I add this viscous related term to my energy equation? Thank you! Kan

 June 23, 2014, 23:34 #2 Member   Kan Join Date: Feb 2014 Location: Australia Posts: 54 Rep Power: 11 I've included this stresses term to energy equation, see below: (1) volTensorField gradU = fvc::grad(Urel); (2) volTensorField tauEff = turbulence->muEff()*(gradU + gradU.T()) + turbulence->muEff()*dev2(T(fvc::grad(Urel))); (3) - (tauEff && gradU) The second point is the code for stresses term in energy equation. I saw this from #18 http://www.cfd-online.com/Forums/ope...-equation.html I don't quite understand this code: turbulence->muEff()*dev2(T(fvc::grad(Urel)))? can anyone explain this? Thank you! Kan

 June 24, 2014, 02:40 #3 Member   Kan Join Date: Feb 2014 Location: Australia Posts: 54 Rep Power: 11 volTensorField tauEff = turbulence->muEff()*(gradU + gradU.T()) + turbulence->muEff()*dev2(T(fvc::grad(Urel))) this term is for stress term. I am just curious that why the compressible solver in OpenFoam didn't consider this term in energy equation?