|
[Sponsors] |
rhoPimpleFoam energy equation understanding problem he |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 28, 2020, 09:04 |
rhoPimpleFoam energy equation understanding problem he
|
#1 |
Member
alexander thierfelder
Join Date: Dec 2019
Posts: 71
Rep Power: 6 |
Hey,I looked into rhoPimpleFoam source code and I wonder about the energy equation. I have some questions for that.
1) Why is he.name() == "e" necessary? 2) I applied an fvOptions scalarCodedSource term to it, what was only possible on "e" not on "he", but fvOptions(rho, he) is coded into the equation, and also the correction is called on "he" fvOptions.correct(he). Is that just because of 1) ? scalarCodedSource fvOptions example moving heat source 3) Where does the temperature field "T" gets calculated, since it does not even get created in "createFields"? ( I think it has to be somehow implemented in the "thermo" functionality what is for me whitchcraft until now, I would be very happy for some advice to begin my research about "thermo") Code:
{ volScalarField& he = thermo.he(); 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(turbulence->alphaEff(), he) == fvOptions(rho, he) ); EEqn.relax(); fvOptions.constrain(EEqn); EEqn.solve(); fvOptions.correct(he); thermo.correct(); } |
|
May 28, 2020, 12:15 |
|
#2 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16 |
In openfoam you can either solve an equation for the internal energy ("e") or enthalpy ("he").
This is the if else statement in the energy equation. Once solved the energy equation, the temperature is calculated in the termo package. For the latter see https://caefn.com/openfoam/temperature-calculation |
|
May 28, 2020, 12:33 |
|
#3 |
Member
alexander thierfelder
Join Date: Dec 2019
Posts: 71
Rep Power: 6 |
Isn't it quite confusing that there is not a dummy variable instead of "he" ? So for example "x" that get set to "e" or "he" .
|
|
July 12, 2020, 20:18 |
|
#4 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
he is the dummy variable. Enthalpy is "h". In he.name() it is store, what is actually solved (e or h) and then the energy equation is modified accordingly. See : https://cfd.direct/openfoam/energy-equation/
|
|
Tags |
eeqn.h, rhopimpledymfoam, thermo |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Why doesn't my simulation solve two energy equation? | Roh | FLUENT | 12 | April 18, 2019 12:33 |
Fluent do not use my velocity field(by UDF) to solve energy equation | tangleiplus | Fluent UDF and Scheme Programming | 6 | January 21, 2019 22:28 |
Convergence problem on the energy equation | naruto5255 | Fluent Multiphase | 0 | November 1, 2015 13:28 |
problem on energy and flow equation solving separately | preetam69 | FLUENT | 2 | July 30, 2013 22:08 |
Why FVM for high-Re flows? | Zhong Lei | Main CFD Forum | 23 | May 14, 1999 14:22 |