|
[Sponsors] |
eConstThermo Eref, Tref, and Hc with reactinTwoPhaseEulerFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 19, 2022, 17:31 |
eConstThermo Eref, Tref, and Hc with reactinTwoPhaseEulerFoam
|
#1 |
New Member
Nik
Join Date: Apr 2021
Posts: 7
Rep Power: 5 |
Hi,
I've been playing around with the wallBoiling tutorial case for reactingTwoPhaseEulerFoam located in $FOAM_TUTORIALS/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/ Specifically, the thermophysicalProperties.(gas | liquid) - there are a few properties which are relevant to this thread:
Looking at the code of eConstThermoI.H, we see that Es is defined as you might expect: Code:
return Cv_*(T - Tref_) + Esref_ + EquationOfState::E(p, T); Now, my points of confusion:
Point number 1 is most confusing to me - I see no-where else in the code where Eref and Tref are used (except in the Gibb's Free Energy at standard pressure, but that function shouldn't be affected by the example I gave, and regardless, this isn't used anywhere for this case). And yet, the results change unexpectedly. I have had a look at a bunch of different theory books (Fluent theory guide, Versteeg, OpenFoam "Little User Guide"), but I haven't yet found an adequate explanation - so I have given up resolving these questions on my own. I would really appreciate any help with this! Last edited by NLeb; January 20, 2022 at 05:30. |
|
January 22, 2022, 20:41 |
|
#2 |
New Member
Nik
Join Date: Apr 2021
Posts: 7
Rep Power: 5 |
#1: After going through the solver line-by-line with a debugger, and comparing between the two cases, I found that the most likely culprit is a tiny floating-point rounding error which accumulates over time.
The only difference I found between the original Tref & Eref combination and the modified (but equivalent) version is a ~2e-26 difference between the off-diagonal matrix coefficients, which I tracked down to floating-point rounding. This is possibly due to the definition of sensible internal energy in eConstThermoI.H amplifying these rounding errors. It seems I just happened to stumble across a tutorial case that was particularly sensitive to these tiny errors accumulating over time. #2: Still not sure. Maybe a typo that was never corrected? #3 and #4: After looking through the evaporation code again, I haven't seen any reference to Hf or Hc - so Hf is irrelevant, and therefore a non-zero sensible enthalpy must be defined at Tstd in order to capture the latent heat of vaporisation. Any hints on #2 or #5? |
|
|
|