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 Community New Posts Updated Threads Search

Like Tree11Likes
  • 2 Post By Bloerb
  • 1 Post By sharonyue
  • 1 Post By DustExplosion
  • 3 Post By LuckyTran
  • 4 Post By DustExplosion

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 28, 2016, 04:29
Default Energy equations in OpenFoam
  #1
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 21
Bloerb will become famous soon enough
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?
granzer and Kummi like this.
Bloerb is offline   Reply With Quote

Old   November 16, 2016, 20:51
Default
  #2
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 848
Rep Power: 18
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.
Kummi likes this.
__________________
My OpenFOAM algorithm website: http://dyfluid.com
By far the largest Chinese CFD-based forum: http://www.cfd-china.com/category/6/openfoam
We provide lots of clusters to Chinese customers, and we are considering to do business overseas: http://dyfluid.com/DMCmodel.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: 62
Rep Power: 10
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!
anthony761 likes this.
DustExplosion is offline   Reply With Quote

Old   April 6, 2017, 14: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, 13:03
Default
  #5
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
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.
granzer, C. Okubo and caio.df like this.
LuckyTran is offline   Reply With Quote

Old   April 8, 2017, 16:56
Default
  #6
Member
 
Chris Cloney
Join Date: Jun 2016
Location: Halifax, Canada
Posts: 62
Rep Power: 10
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, 23:35
Default
  #7
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
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, 10:07
Default
  #8
Member
 
Chris Cloney
Join Date: Jun 2016
Location: Halifax, Canada
Posts: 62
Rep Power: 10
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: 62
Rep Power: 10
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".
Gerhard, mdk1, anthony761 and 1 others like this.
DustExplosion is offline   Reply With Quote

Old   July 1, 2024, 14:22
Default
  #10
New Member
 
S03r3n
Join Date: Feb 2024
Posts: 15
Rep Power: 2
S03r3n is on a distinguished road
Quote:
Originally Posted by stomibo View Post
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
Can you send me your implementation?
Thanks in advance!
S03r3n is offline   Reply With Quote

Reply


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 Off
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 07: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 06:39


All times are GMT -4. The time now is 11:22.