
[Sponsors] 
July 28, 2016, 03:29 
Energy equations in OpenFoam

#1 
Senior Member
Join Date: Sep 2013
Posts: 133
Rep Power: 8 
I am currently trying to better understand the energy equations used in OpenFoam solvers. http://cfd.direct/openfoam/energyequation/ seems like a good start if you want to look at this yourself.
Now chtMultiRegionSimpleFoam or buoyantSimpleFoam for example use the following form: Code:
fvScalarMatrix EEqn ( fvm::div(phi, he) + ( he.name() == "e" ? fvc::div(phi, volScalarField("Ekp", 0.5*magSqr(U) + p/rho)) : fvc::div(phi, volScalarField("K", 0.5*magSqr(U))) )  fvm::laplacian(turb.alphaEff(), he) == rho*(U&g) + rad.Sh(thermo) + fvOptions(rho, he) ); Internal Energy: Enthalpy: Now the source terms are for radiation or heat generation in the domain for example. You can check fvOptions for what is possible. Now my question: Why don't we use temperature directly? What are the drawbacks or advantages of using T, h or e? Can someone direct me to a good derivation of this equation? I want to understand the simplifications used and when they become critical. For example it seems that the dissipation of mechanical energy into heat is omitted. Can someone direct me to a good source on how these equations come about? 

November 16, 2016, 20:51 

#2 
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 757
Rep Power: 10 
I did not test the drawbacks of using T, this should be more clarified by some papers. Regarding T, OpenFOAM indeed solves T in certain solver, or in certain version. For example, in OpenFOAM2.2.x, it solved TEqn for compressibleTwoPhaseEulerFoam, but it was replaced soon by E or HEqn in OpenFOAM2.3.x. When you solve for T, there is an assumption that T is linear with E or H.
Check it here from the Official document: http://cfd.direct/openfoam/energyequation/ I have a full derivation of the energy equtions as well: http://dyfluid.com/energy.html Yes, the mechanical source is neglected.
__________________
Im the translator of OpenFOAM User Guide Chinese Edition! But always newbie on CFD. http://dyfluid.com/en.html 

February 25, 2017, 13:22 

#3 
Member
Chris Cloney
Join Date: Jun 2016
Location: Halifax, Canada
Posts: 52
Rep Power: 3 
Does anyone have a reference for neglecting the mechanical energy? Just typesetting equations now for my thesis and realized it is not included!


April 6, 2017, 13:56 

#4 
New Member
Michael S.
Join Date: Dec 2016
Posts: 1
Rep Power: 0 
Hi Chris,
I'm also working for my thesis with chtMultiRegionSimpleFoam and realized that the mechanical term is missing, but I don't know why. Anyway, as descriped here: https://cfd.direct/openfoam/energyequation/ at the end of paragraph 4, I just copied the mechanical source from rhoCentralFoam. I'm not sure yet, if it's working properly, but the results seem to be realistic. At least they seem to be more realistic than without the mechanical term, respectively Michael 

April 7, 2017, 12:03 

#5 
Senior Member
Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 2,019
Rep Power: 27 
The viscous dissipation of mechanical energy into heat is often omitted by choice. Usually it is a small contributor and sometimes you want the convenience of a globally conserved energy transport equation.
People that want realistic simulations like to include the viscous dissipation term. People that want to understand their result better, leave it out. You cannot do like isentropic or isenthalpic flow in a duct for example if you include them. 

April 8, 2017, 15:56 

#6 
Member
Chris Cloney
Join Date: Jun 2016
Location: Halifax, Canada
Posts: 52
Rep Power: 3 
Thank you for the replies.
My simulations are 1D multiphase flames in air or methane gas. In both cases I would think the viscosity of air would be quite low and the mechanical losses due to viscosity would be low. I will have to take a look  does anyone have any information on what is typically done for these types of simulations? 

April 8, 2017, 22:35 

#7 
Senior Member
Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 2,019
Rep Power: 27 
Viscous dissipation is even easier to neglect in combustion because temperature gradients become very large and the viscous dissipation is an even smaller component of the overall heat flux.
Many combustion modelling approaches even assume explicitly that the flow is isenthalpic. To even have viscous dissipation in the first place, you need shear layers (i.e. walls), and strong ones. For example, order of magnitude analysis on a Blasius flat plate shows that the viscous dissipation is negligible until the freestream velocity is 100 m/s or so. But this is for a problem with no heat transfer. As soon as you heat the plate, the conduction and convection heat transfer pretty much overwhelm the problem. Btw you can postprocess your result and calculate, for the given resulting velocity field, what the viscous dissipation ought to be. This will give you a 95% of the answer. 

April 9, 2017, 09:07 

#8 
Member
Chris Cloney
Join Date: Jun 2016
Location: Halifax, Canada
Posts: 52
Rep Power: 3 
Thanks for the information and the tip LuckyTran. I will plot out my velocity gradients and check the magnitude of this term, but it sounds like it will be insignificant (velocity gradients in the flame are relatively small going from 0~3 m/s through the flame thickness)


February 3, 2018, 11:36 

#9 
Member
Chris Cloney
Join Date: Jun 2016
Location: Halifax, Canada
Posts: 52
Rep Power: 3 
Just an update on this. If anyone needs a reference "An Introduction to Computational Fluid Dynamics" second edition by Versteeg and Malalasekera states in Section 12.14 (pg 364) "Viscous energy dissipation is normally assumed negligible in low Mach number combusting flows".


Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology  wyldckat  OpenFOAM  17  November 10, 2017 16:54 
OpenFOAM Training: Programming CFD Course 1213 and 1920 April 2016  cfd.direct  OpenFOAM Announcements from Other Sources  0  January 14, 2016 11:19 
New OpenFOAM Forum Structure  jola  OpenFOAM  2  October 19, 2011 06:55 
DEFINE_SOURCE to redifine momentum and energy equations.  adamo  Fluent UDF and Scheme Programming  0  February 27, 2011 16:23 
Derivation of momentum and energy equations  Spiros Siouris  Main CFD Forum  1  April 14, 2008 05:39 