|
[Sponsors] |
Negative initial temperature T0 in wallboiling case of reactingTwoPhaseEulerFoam |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Tun
Join Date: Mar 2018
Posts: 12
Rep Power: 8 ![]() |
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! |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Taihang Zhu
Join Date: May 2018
Location: London
Posts: 6
Rep Power: 8 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Tun
Join Date: Mar 2018
Posts: 12
Rep Power: 8 ![]() |
Thank you so much for your help!
|
|
![]() |
![]() |
![]() |
![]() |
#4 |
New Member
Brown
Join Date: Apr 2018
Posts: 1
Rep Power: 0 ![]() |
Sorry were you able to solve this? Thanks
|
|
![]() |
![]() |
![]() |
![]() |
#5 |
Member
Robin Kamenicky
Join Date: Mar 2016
Posts: 74
Rep Power: 11 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Member
Join Date: Oct 2015
Posts: 63
Rep Power: 10 ![]() |
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.
|
|
![]() |
![]() |
![]() |
![]() |
#7 | |
New Member
Taihang Zhu
Join Date: May 2018
Location: London
Posts: 6
Rep Power: 8 ![]() |
Quote:
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. |
||
![]() |
![]() |
![]() |
![]() |
#8 |
New Member
Deny
Join Date: May 2024
Posts: 11
Rep Power: 2 ![]() |
Hello guys
I am running multi phase simulation inside the helical pipe, and I am getting the error as follow for the volume fraction. PIMPLE: Iteration 2 MULES: Solving for alpha.gas MULES: Solving for alpha.liquid gas fraction, min, max = 0.002992778214 -2.60889491e-06 1 liquid fraction, min, max = 0.997007311 -1.776623502e-36 1.000002609 Phase-sum volume fraction, min, max = 1.000000089 -7.771561172e-16 1.000721991 MULES: Solving for alpha.gas MULES: Solving for alpha.liquid gas fraction, min, max = 0.002992170717 -2.646514245e-06 1 liquid fraction, min, max = 0.9970079185 -1.792762148e-36 1.000002647 Phase-sum volume fraction, min, max = 1.000000089 -7.771561172e-16 1.000721991 MULES: Solving for alpha.gas MULES: Solving for alpha.liquid gas fraction, min, max = 0.002991565366 -2.629352244e-06 1 liquid fraction, min, max = 0.9970085238 -1.78660011e-36 1.000002629 Phase-sum volume fraction, min, max = 1.000000089 -7.771561172e-16 1.000721991 Constructing momentum equations Tf.gas_liquid: min = 289.0432295, mean = 292.9999477, max = 293.0876964 DILUPBiCGStab: Solving for O2.gas, Initial residual = 0.001402672873, Final residual = 1.716052678e-13, No Iterations 1 DILUPBiCGStab: Solving for water.gas, Initial residual = 0.002668600287, Final residual = 1.226195265e-16, No Iterations 1 DILUPBiCGStab: Solving for N2.liquid, Initial residual = 2.366996742e-05, Final residual = 1.318267e-16, No Iterations 1 DILUPBiCGStab: Solving for O2.liquid, Initial residual = 4.701264042e-05, Final residual = 4.83641327e-16, No Iterations 1 #0 Foam::error: ![]() #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" #3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:? #4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam: ![]() #5 Foam::TwoResistanceHeatTransferPhaseSystem<Foam::M omentumTransferPhaseSystem<Foam: ![]() #6 Foam::InterfaceCompositionPhaseChangePhaseSystem<F oam::PhaseTransferPhaseSystem<Foam::TwoResistanceH eatTransferPhaseSystem<Foam::MomentumTransferPhase System<Foam: ![]() #7 Foam::solvers::multiphaseEuler::energyPredictor() at ??:? #8 Foam::solvers::multiphaseEuler::thermophysicalPred ictor() at ??:? #9 ? in "/opt/openfoam11/platforms/linux64GccDPInt32Opt/bin/foamRun" #10 ? in "/lib/x86_64-linux-gnu/libc.so.6" #11 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #12 ? in "/opt/openfoam11/platforms/linux64GccDPInt32Opt/bin/foamRun" #0 Foam::error: ![]() #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" #3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:? #4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam: ![]() #5 Foam::TwoResistanceHeatTransferPhaseSystem<Foam::M omentumTransferPhaseSystem<Foam: ![]() #6 Foam::InterfaceCompositionPhaseChangePhaseSystem<F oam::PhaseTransferPhaseSystem<Foam::TwoResistanceH eatTransferPhaseSystem<Foam::MomentumTransferPhase System<Foam: ![]() #7 Foam::solvers::multiphaseEuler::energyPredictor() at ??:? #8 Foam::solvers::multiphaseEuler::thermophysicalPred ictor() at ??:? #9 ? in "/opt/openfoam11/platforms/linux64GccDPInt32Opt/bin/foamRun" #10 ? in "/lib/x86_64-linux-gnu/libc.so.6" #11 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #12 ? in "/opt/openfoam11/platforms/linux64GccDPInt32Opt/bin even I dropped the pressure tolerance in fvSolution, but still I am getting the error. any help would be greatly appreciated. Thank you in advance |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
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 |