|
[Sponsors] |
the problem in writing the energy conservation equation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 26, 2015, 08:52 |
the problem in writing the energy conservation equation
|
#1 |
New Member
Join Date: Jan 2015
Posts: 14
Rep Power: 11 |
Hi, all
I want to solve the energy conservation equations as attached in the OpenFoam. The problem lies in the second and third terms in the right. For example, i can not use the keyword grap(p) in the OpenFoam. if i shoud add them as a source term? Thanks Gary |
|
January 26, 2015, 09:38 |
|
#2 |
Senior Member
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16 |
Hi,
could you please repost the formula as image file. Unfortunately LibreOffice is not able to open the file properly. This excludes many potential readers of your post. Please also post the code you've already written. This allows to understand your problems more easily. Have a look at http://www.openfoam.org/docs/user/pr...#x9-670003.1.3, section 'Equation representation'. Cutter |
|
January 26, 2015, 10:02 |
|
#3 |
Senior Member
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19 |
Code:
fvc::grad(p) Also, can you please write the equation you want to solve properly in the forum using the [math] tags, e.g. to denote the gradient of p? Have a look at this http://www.cfd-online.com/Forums/sit...ne-forums.html |
|
January 26, 2015, 22:16 |
|
#4 |
New Member
Join Date: Jan 2015
Posts: 14
Rep Power: 11 |
The energy conservation is as follows:
The thermophysical properties, including the density, heat capacity and thermal conductivity, are the functions of pressure and temperature. The code i have written is listed below: Code:
fvScalarMatrix TEqn ( fvm::div(phi, T) - fvm::laplacian(lamdaEff, T) == -T/rho*drho/dT*U*grad(p) ); Thanks Gary Last edited by Gary51075607; January 27, 2015 at 01:57. |
|
January 27, 2015, 04:53 |
|
#5 |
New Member
Join Date: Feb 2014
Posts: 24
Rep Power: 12 |
||
January 27, 2015, 06:41 |
|
#6 | |
Senior Member
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19 |
Quote:
If you are really just interested in the thermal energy, why not solve for sensible enthalpy as it was done up to OF version 2.0, see here for example: https://github.com/OpenFOAM/OpenFOAM...pleFoam/hEqn.H |
||
January 29, 2015, 04:26 |
|
#7 |
New Member
Join Date: Jan 2015
Posts: 14
Rep Power: 11 |
Thanks, dkxls.
Sorry to forget fvc. In my case, the thermophysical properties, including the density, heat capacity, enthalpy, viscosity and thermal conductivities, are strongly depended on the temperature and pressure. So i want the obtain the temperature directly from the energy equation. The fields, such as lamdaEff, drho and dT has been correctly defined and initialized. Could i group the terms of and as the source terms? And then how to write the source term? |
|
January 29, 2015, 08:25 |
|
#8 | |
Senior Member
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19 |
Quote:
This is the way it's done in pretty much all OpenFOAM solvers. Also, this is a widely used approach in combustion simulation, where you have very strong dependencies on temperature. Note that a formulation in terms of internal energy is equivalent to the above, it's merely a matter of taste! Well it doesn't matter how you call it, it boils down to the same thing anyway. Effectively it's an explicit term on the right hand side of the equation (i.e. computed from old time values). |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calculation of the Governing Equations | Mihail | CFX | 7 | September 7, 2014 07:27 |
flow solver - energy equation problem | ufocfd | Main CFD Forum | 0 | May 19, 2013 16:00 |
Source term energy equation for reactive flows | DaIN | Main CFD Forum | 0 | October 6, 2011 16:11 |
how to disable energy equation for for non-newton | yueroo | FLUENT | 2 | April 3, 2001 23:11 |
Why FVM for high-Re flows? | Zhong Lei | Main CFD Forum | 23 | May 14, 1999 14:22 |