View Issue Details
ID  Project  Category  View Status  Date Submitted  Last Update 

0001755  OpenFOAM  Bug  public  20150621 05:57  20150701 10:57 
Reporter  alundilong  Assigned To  henry  
Priority  high  Severity  major  Reproducibility  always 
Status  resolved  Resolution  fixed  
Platform  GNU/Linux  OS  Ubuntu  OS Version  12.04 
Summary  0001755: why gravity term 'g & U' is not shown in energy equation?  
Description  why 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/OpenFOAM2.3.x/blob/master/applications/solvers/heatTransfer/thermoFoam/EEqn.H, there is no such a term. Is this a bug? Thank you!  
Tags  No tags attached.  

If you check the main solver file: https://github.com/OpenFOAM/OpenFOAM2.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. 

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/OpenFOAM2.3.x/blob/master/applications/solvers/heatTransfer/buoyantPimpleFoam/EEqn.H 

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 

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? 

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? 

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., 

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? 



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 

I would expect the term to be less significant for highspeed flow. 

Resolved by commit d5c8a45f5ceb52d422d3e36589f65f45d78495ed in OpenFOAMdev See also http://cfd.direct/openfoam/energyequation/ 
Date Modified  Username  Field  Change 

20150621 05:57  alundilong  New Issue  
20150622 11:10  wyldckat  Note Added: 0004976  
20150622 16:08  alundilong  Note Added: 0004977  
20150624 19:57  sharonyue  Note Added: 0004996  
20150624 20:44  alundilong  Note Added: 0004997  
20150625 22:07  henry  Note Added: 0004999  
20150625 22:16  alundilong  Note Added: 0005000  
20150625 22:26  henry  Note Added: 0005001  
20150625 22:52  alundilong  File Added: Left2RightTemperatureProfile.png  
20150625 22:56  alundilong  Note Added: 0005002  
20150625 23:03  henry  Note Added: 0005003  
20150701 10:56  henry  Note Added: 0005032  
20150701 10:56  henry  Status  new => resolved 
20150701 10:56  henry  Resolution  open => fixed 
20150701 10:56  henry  Assigned To  => henry 