CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Energy equations in OpenFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 28, 2016, 03:29
Default Energy equations in OpenFoam
  #1
Senior Member
 
Join Date: Sep 2013
Posts: 133
Rep Power: 8
Bloerb is on a distinguished road
I am currently trying to better understand the energy equations used in OpenFoam solvers. http://cfd.direct/openfoam/energy-equation/ 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)
    );
This is a simplified version of the one in the link and lets us choose between e and h as the variable. I'd say this is how it reads:

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?
Bloerb is offline   Reply With Quote

Old   November 16, 2016, 20:51
Default
  #2
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 757
Rep Power: 10
sharonyue is on a distinguished road
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 OpenFOAM-2.2.x, it solved TEqn for compressibleTwoPhaseEulerFoam, but it was replaced soon by E or HEqn in OpenFOAM-2.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/energy-equation/
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
sharonyue is offline   Reply With Quote

Old   February 25, 2017, 13:22
Default
  #3
Member
 
Chris Cloney
Join Date: Jun 2016
Location: Halifax, Canada
Posts: 52
Rep Power: 3
DustExplosion is on a distinguished road
Does anyone have a reference for neglecting the mechanical energy? Just typesetting equations now for my thesis and realized it is not included!
DustExplosion is offline   Reply With Quote

Old   April 6, 2017, 13:56
Default
  #4
New Member
 
Michael S.
Join Date: Dec 2016
Posts: 1
Rep Power: 0
stomibo is on a distinguished road
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/energy-equation/
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
stomibo is offline   Reply With Quote

Old   April 7, 2017, 12:03
Default
  #5
Senior Member
 
Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 2,019
Rep Power: 27
LuckyTran will become famous soon enoughLuckyTran will become famous soon enough
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.
LuckyTran is offline   Reply With Quote

Old   April 8, 2017, 15:56
Default
  #6
Member
 
Chris Cloney
Join Date: Jun 2016
Location: Halifax, Canada
Posts: 52
Rep Power: 3
DustExplosion is on a distinguished road
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?
DustExplosion is offline   Reply With Quote

Old   April 8, 2017, 22:35
Default
  #7
Senior Member
 
Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 2,019
Rep Power: 27
LuckyTran will become famous soon enoughLuckyTran will become famous soon enough
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 post-process 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.
LuckyTran is offline   Reply With Quote

Old   April 9, 2017, 09:07
Default
  #8
Member
 
Chris Cloney
Join Date: Jun 2016
Location: Halifax, Canada
Posts: 52
Rep Power: 3
DustExplosion is on a distinguished road
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)
DustExplosion is offline   Reply With Quote

Old   February 3, 2018, 11:36
Default
  #9
Member
 
Chris Cloney
Join Date: Jun 2016
Location: Halifax, Canada
Posts: 52
Rep Power: 3
DustExplosion is on a distinguished road
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".
DustExplosion is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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 12-13 and 19-20 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


All times are GMT -4. The time now is 09:28.