View Issue Details

IDProjectCategoryView StatusLast Update
0001755OpenFOAMBugpublic2015-07-01 10:57
Reporteralundilong Assigned Tohenry  
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version12.04
Summary0001755: why gravity term 'g & U' is not shown in energy equation?
Descriptionwhy gravity term 'g & U' is not shown in energy equation?
I believe once the energy equation is written in 'e + K/2' or 'h + K/2', a gravity term g & U shall show. If the energy equation is simply written in 'e', 'h', or 'T', it is clear that there is no such term.
what I found is, for example, https://github.com/OpenFOAM/OpenFOAM-2.3.x/blob/master/applications/solvers/heatTransfer/thermoFoam/EEqn.H, there is no such a term. Is this a bug?
Thank you!
TagsNo tags attached.

Activities

wyldckat

2015-06-22 11:10

updater   ~0004976

If you check the main solver file: https://github.com/OpenFOAM/OpenFOAM-2.3.x/blob/master/applications/solvers/heatTransfer/thermoFoam/thermoFoam.C
you'll see the description "Evolves the thermodynamics on a frozen flow field".

In other words, this solver can be considered as a simplistic, yet realistic, heat transfer solver. But it's meant to only propagate heat and it does not interact with the flow itself, i.e. "frozen flow field".

This is similar to the laplacianFoam solver, but thermoFoam is more realistic versus laplacianFoam which is a very basic solver. But neither take into account the mass flow.

For the gravity term, you'll have to look into the other solvers that handle both mass flow and heat transfer.

alundilong

2015-06-22 16:08

reporter   ~0004977

Hello, I agree that thermoFoam is not a good example to illustrate my concern because it does not solve mass flow due to the fact of 'frozen flow field'.
However, what about all the other solvers that are expressed in the form of 'e+K/2' or 'h+K/2'. There should be a term like 'rho*(g & U)' or '(g & U)', isn't? For example, buoyantPimpleFoam.
https://github.com/OpenFOAM/OpenFOAM-2.3.x/blob/master/applications/solvers/heatTransfer/buoyantPimpleFoam/EEqn.H

sharonyue

2015-06-24 19:57

reporter   ~0004996

The L.H.S of energy equation in buoyantPimpleFoam is the same with Fluent(considering H = h + K). Please see Fluent theory guide version 14. page 141 equation 5.6. There is also no (g & U) term.

Also from this book: An Introduction to Computational Fluid Dynamics The Finite Volume Method 2nd Edition. In page 19 I did not see this term either...But some terms in neglected in buoyantPimpleFoam such as −div(pu), this is also neglected by Fluent by default. See section 5.2.1.4 in Fluent theory guide version 14.

This is what I found from literature. Im not sure this is the real reason.lol

alundilong

2015-06-24 20:44

reporter   ~0004997

Hello,

thank you for your reply!

Please take a look at equation 2.66(in form of 'e+K') which does include gravity term. The link is given below.

Anderson book(page 77, Eqn. 2.66)
http://read.pudn.com/downloads132/ebook/560912/Anderson%20J.D.-%20Computational%20fluid%20dynamics.%20The%20basics%20with%20applications.pdf

However, in the EEqn.H above, this term is gone for unknown reason. Is there any assumption?

henry

2015-06-25 22:07

manager   ~0004999

How much difference does the addition of the (g & U) term make to the cases you have tested? Have you encountered any stability or boundedness issues associated with this change?

alundilong

2015-06-25 22:16

reporter   ~0005000

Hi Henry,

I do not have any stability or boundedness issues so far.
This concern raise simply because I find that my own derived energy equation does not match the one used in the existing solvers. Actually, each term match well, except this gravity term.

I have check two textbooks(one is Anderson's book). what I find is that:
1. gravity term shows when express in the form of 'e+K/2' or 'h+K/2'
2. gravity term cancel out when written in the form of 'e', 'h' or 'T'

Thank you for your attention!
Best.,

henry

2015-06-25 22:26

manager   ~0005001

I am aware that the (g & U) term is not currently included as it generally has a small influence but I am happy to include it if it is needed.

In your tests how much difference does it make to the results?

alundilong

2015-06-25 22:52

reporter  

alundilong

2015-06-25 22:56

reporter   ~0005002

Hi Henry,

I just have done a simple test on this tutorial case:
openfoam230/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom

A temperature profile indicates that the an almost 1K different does exist.
Actually, as shown in the attached figure, the result without gravity is 1K higher than the other.

I think it is always good to add this term, especially for flow with high speed.
Am I right?

Best.,
Yijin

henry

2015-06-25 23:03

manager   ~0005003

I would expect the term to be less significant for high-speed flow.

henry

2015-07-01 10:56

manager   ~0005032

Resolved by commit d5c8a45f5ceb52d422d3e36589f65f45d78495ed in OpenFOAM-dev

See also http://cfd.direct/openfoam/energy-equation/

Issue History

Date Modified Username Field Change
2015-06-21 05:57 alundilong New Issue
2015-06-22 11:10 wyldckat Note Added: 0004976
2015-06-22 16:08 alundilong Note Added: 0004977
2015-06-24 19:57 sharonyue Note Added: 0004996
2015-06-24 20:44 alundilong Note Added: 0004997
2015-06-25 22:07 henry Note Added: 0004999
2015-06-25 22:16 alundilong Note Added: 0005000
2015-06-25 22:26 henry Note Added: 0005001
2015-06-25 22:52 alundilong File Added: Left2RightTemperatureProfile.png
2015-06-25 22:56 alundilong Note Added: 0005002
2015-06-25 23:03 henry Note Added: 0005003
2015-07-01 10:56 henry Note Added: 0005032
2015-07-01 10:56 henry Status new => resolved
2015-07-01 10:56 henry Resolution open => fixed
2015-07-01 10:56 henry Assigned To => henry