# How to add temperature to icoFoam - correct?

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

July 30, 2012, 12:31
How to add temperature to icoFoam - correct?
#1
New Member

Join Date: Jun 2012
Posts: 25
Rep Power: 7
hi all

going through the tutorial http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam

I did not completely understand the implementation of the energy equation.

Code:
```            fvm::ddt(T)
+ fvm::div(phi, T)
- fvm::laplacian(DT, T)```
with phi = rho*U is equal to

whereas the energy equation is:

for a 2D flow not considerung the pressure terms, the dissipation function and with DT = thermal diffusivity = lambda/(rho * c_p)

Where is my mistake?

thank you
Uli
Attached Images
 energyeq_OF.png (9.5 KB, 114 views) energyeq_WEIG.png (6.7 KB, 112 views)

 July 30, 2012, 14:00 #2 Super Moderator   Bruno Santos Join Date: Mar 2009 Location: Lisbon, Portugal Posts: 9,978 Blog Entries: 39 Rep Power: 108 Greetings Uli, I'm unable to answer your question, but I can make the following affirmation: that tutorial is basically an "how to copy-paste-modify code from scalarTransportFoam into icoFoam". Here's a step-by-step explanation about scalarTransportFoam: http://openfoamwiki.net/index.php/ScalarTransportFoam Best regards, Bruno __________________ OpenFOAM: FAQ | Getting started Forum: How to get help, to post code/output and forum guide What am I doing/planning: blog/wiki Read this before sending me PM

 July 31, 2012, 14:38 #3 New Member   Join Date: Jun 2012 Posts: 25 Rep Power: 7 hi Bruno, thanks for your response. according to the ScalarTransportFoam the code is correct. Then in this case phi must be U and not rho * U. I thought it's rho * U because here it is: http://www.openfoam.org/docs/user/fvSchemes.php (chapter 4.4.5) Uli

 July 31, 2012, 16:48 #4 Super Moderator   Bruno Santos Join Date: Mar 2009 Location: Lisbon, Portugal Posts: 9,978 Blog Entries: 39 Rep Power: 108 Hi Uli, Ah! Now I get it... this is so basic that even I can answer Incompressible solvers assume constant rho, therefore only present in the viscosity. Compressible solvers need "rho" as a field, therefore present in "rho * U". Best regards, Bruno __________________ OpenFOAM: FAQ | Getting started Forum: How to get help, to post code/output and forum guide What am I doing/planning: blog/wiki Read this before sending me PM

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post cboss OpenFOAM 10 March 5, 2015 07:57 Chander CFX 5 January 7, 2015 04:00 hsingtzu OpenFOAM Running, Solving & CFD 0 March 8, 2012 18:13 ehooi FLUENT 0 January 5, 2011 03:56 La S. Hyuck CFX 1 May 23, 2001 00:07