CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Negative initial temperature T0 in wallboiling case of reactingTwoPhaseEulerFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 19, 2018, 14:18
Default Negative initial temperature T0 in wallboiling case of reactingTwoPhaseEulerFoam
  #1
New Member
 
Tun
Join Date: Mar 2018
Posts: 12
Rep Power: 8
chengtun is on a distinguished road
I am trying to modify the case of wallBoiling which is OpenFOAM-dev/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling
I only changed the fluid properties and geometry parameters and unfortunately got the bug of Negative initial temperature T0 after some iterative steps.
The initial temperature is 303.15K for both gas and liquid. I tried heat flux q in T.liquid for both zero and several thousand. They all ended in bug of Negative initial temperature. More details are as follows.
--> FOAM FATAL ERROR:
Negative initial temperature T0: -35.6173826

From function Foam::scalar Foam::species::thermo<Thermo, Type>::T(Foam::scalar, Foam::scalar, Foam::scalar, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar) const) const [with Thermo = Foam::hRefConstThermo<Foam::rhoConst<Foam::specie> >; Type = Foam::sensibleEnthalpy; Foam::scalar = double; Foam::species::thermo<Thermo, Type> = Foam::species::thermo<Foam::hRefConstThermo<Foam:: rhoConst<Foam::specie> >, Foam::sensibleEnthalpy>]
in file /home/cpx/OpenFOAM/cpx-5.0/OpenFOAM-dev/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 54.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Foam::speci es::thermo<Foam::hRefConstThermo<Foam::rhoConst<Fo am::specie> >, Foam::sensibleEnthalpy> > > >::calculate() at ??:?
#3 Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Foam::speci es::thermo<Foam::hRefConstThermo<Foam::rhoConst<Fo am::specie> >, Foam::sensibleEnthalpy> > > >::correct() at ??:?
#4 Foam::phaseSystem::correctThermo() at ??:?
#5 Foam::ThermalPhaseChangePhaseSystem<Foam::HeatAndM assTransferPhaseSystem<Foam::MomentumTransferPhase System<Foam::twoPhaseSystem> > >::correctThermo() at ??:?
#6 ? at ??:?
#7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8 ? at ??:?
Aborted (core dumped)

I tried to set temperature constraints in fvOptions for gas and liquid. The following example is for liquid. But it doesn't work.
temperature_constraints
{
type limitTemperature;
selectionMode all;
active true;
min 273;
max 600;
phase liquid;
}
I also tried to delete the judgment for negative temperature in OpenFOAM-dev/src/thermophysicalModels/specie/thermo/thermo/thermoI.H line 52-57
if (T0 < 0)
{
FatalErrorInFunction
<< "Negative initial temperature T0: " << T0
<< abort(FatalError);
}

But it still shows the same error. I am really confused why this bug appear and why the deletion doesn't work. When I open the file /OpenFOAM-dev/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 54, the judgment has already been deleted.
Could anyone give me a hint? Thanks!
chengtun is offline   Reply With Quote

Old   May 31, 2018, 07:40
Default
  #2
New Member
 
Taihang Zhu
Join Date: May 2018
Location: London
Posts: 6
Rep Power: 7
zhutaihang is on a distinguished road
Hi,
I'm using the rhoPimpleFoam solver. I had a similar problem as you. I watched some threads and found my solution. It is working well so far.

My simulation failed at the second iteration due to negative initial temperature T0. I firstly reduced the tolerance for pressure in fvsolutions by three orders. It worked for about 15 iterations before it failed again. then, I doubled the time interval, which makes the maximum Courant about 1. The problem seems to be solved. my simulation runs for hundreds of iteration and it is still working.

I wish that it helps.
zhutaihang is offline   Reply With Quote

Old   May 31, 2018, 08:20
Default
  #3
New Member
 
Tun
Join Date: Mar 2018
Posts: 12
Rep Power: 8
chengtun is on a distinguished road
Thank you so much for your help!
chengtun is offline   Reply With Quote

Old   July 21, 2018, 17:14
Default
  #4
New Member
 
Brown
Join Date: Apr 2018
Posts: 1
Rep Power: 0
calmpeace is on a distinguished road
Sorry were you able to solve this? Thanks
calmpeace is offline   Reply With Quote

Old   July 23, 2018, 17:23
Default
  #5
Member
 
Robin Kamenicky
Join Date: Mar 2016
Posts: 74
Rep Power: 11
Robin.Kamenicky is on a distinguished road
Hi Tun,

in general the reactingTwoPhaseEulerFoam can be quite unstable. The physics is complex and depends on lot of parameters. If you need further help I would ask you for more information about your computation.

Btw, was the fvOptions file read properly at the beginning of your simulation?

Kind regards,
Robin
Robin.Kamenicky is offline   Reply With Quote

Old   August 15, 2018, 15:15
Default
  #6
Member
 
Join Date: Oct 2015
Posts: 63
Rep Power: 10
Scram_1 is on a distinguished road
I don't think increasing the time step is the right approach. Even though it makes the solver chug along and spit out results, some of the physics that occurs in the short time interval will not be captured by increasing the time step. Even I'm facing a similar issue (I'm using reactingParcelFoam btw) in that when I keep the time step at 1e-8, I can clearly see the droplets in my domain condense (which is what is expected) but the simulation crashes in 5 - 6 time steps. When I increase the time step to 1e-6 (which is small but not as small as 1e-8), the simulation runs without crashing but the mass transfer is such that the droplets initially evaporate before they can start condensing which is something that should not occur. So, probably tweaking the BC's (pressure, temperature) seems like a better bet to solve this issue.
Scram_1 is offline   Reply With Quote

Old   August 18, 2018, 06:40
Default
  #7
New Member
 
Taihang Zhu
Join Date: May 2018
Location: London
Posts: 6
Rep Power: 7
zhutaihang is on a distinguished road
Quote:
Originally Posted by Scram_1 View Post
I don't think increasing the time step is the right approach. Even though it makes the solver chug along and spit out results, some of the physics that occurs in the short time interval will not be captured by increasing the time step. Even I'm facing a similar issue (I'm using reactingParcelFoam btw) in that when I keep the time step at 1e-8, I can clearly see the droplets in my domain condense (which is what is expected) but the simulation crashes in 5 - 6 time steps. When I increase the time step to 1e-6 (which is small but not as small as 1e-8), the simulation runs without crashing but the mass transfer is such that the droplets initially evaporate before they can start condensing which is something that should not occur. So, probably tweaking the BC's (pressure, temperature) seems like a better bet to solve this issue.
Hi,

I agree with you. It somehow worked for a specific case of mine, but I don't think it is a good approach. Investigating the boundary condition is definitely a better method.
zhutaihang is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Segmentation fault when using reactingFOAM for Fluids Tommy Floessner OpenFOAM Running, Solving & CFD 4 April 22, 2018 12:30
Foam::error::printStack after large bounding epsilon events StoneCFD727 OpenFOAM Running, Solving & CFD 1 January 1, 2018 17:04
pressure in incompressible solvers e.g. simpleFoam chrizzl OpenFOAM Running, Solving & CFD 13 March 28, 2017 05:49
High Courant Number @ icoFoam Artex85 OpenFOAM Running, Solving & CFD 11 February 16, 2017 13:40
HeatSource BC to the whole region in chtMultiRegionHeater xsa OpenFOAM Running, Solving & CFD 3 November 7, 2016 05:07


All times are GMT -4. The time now is 13:03.