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

Cantera: Help me understand this error

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   January 6, 2010, 15:21
Default Cantera: Help me understand this error
  #1
aat
New Member
 
Join Date: Oct 2009
Posts: 14
Rep Power: 7
aat is on a distinguished road
Hello everyone:

I am trying to model a reacting flow problem in OpenFOAM 1.5-dev using the alternateSteadyReactingFoam solver. This is a very simple 3D setup, co-flow fuel and air jets in a cylinder, similar to the Sandia flame D geometry. I used the same reaction mechanism and the species BCs as used in the dualInlet example. (I was able to run the sample dualInlet test cases for steady and unsteady configurations just fine)

I attempted to run my problem for 100 timesteps, and at the 99th timestep, the solution aborted with the message:

*********
terminate called after throwing an instance of 'Cantera::CanteraError'
what(): std::exception
Aborted

******

I am not sure where to look for the problem. Could anyone suggest where to start? Thanks!!


If it helps, the log output from the prior two iterations is included, to show the residuals and solution errors upto this point:

---------append log output from timesteps 98 and 99--------
Time = 98

Solving chemistry
Characteristic time of chemistry: 0.1
smoothSolver: Solving for Ux, Initial residual = 0.269379, Final residual = 0.00513338, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 0.0945435, Final residual = 0.00306857, No Iterations 4
smoothSolver: Solving for Uz, Initial residual = 0.143678, Final residual = 0.00382205, No Iterations 4
PBiCG: Solving for C, Initial residual = 0.000566587, Final residual = 1.60321e-05, No Iterations 2
PBiCG: Solving for CO2, Initial residual = 0.00448204, Final residual = 9.34077e-05, No Iterations 1
PBiCG: Solving for O2, Initial residual = 0.000416701, Final residual = 1.09867e-05, No Iterations 1
Max summe Yi = max((0*C)) [0 0 0 0 0 0 0] 0.15 Min summe Yi = min((0*C)) [0 0 0 0 0 0 0] 0
Fixed kappa in 0 cells due to large deltaY
PBiCG: Solving for h, Initial residual = 0.0014209, Final residual = 8.11273e-05, No Iterations 1
--> FOAM Warning :
From function canteraChemistryModel::calcDQ(volScalarField &dQ)
in file canteraChemistryModel.C at line 321
Calculation of dQ is not yet verified
GAMG: Solving for p, Initial residual = 0.301642, Final residual = 0.0105844, No Iterations 2
GAMG: Solving for p, Initial residual = 0.0109159, Final residual = 0.000542107, No Iterations 4
time step continuity errors : sum local = 0.396288, global = 0.0817594, cumulative = 0.645363
bounding p, min: 94456.6 max: 110249 average: 100011
rho max/min : 76.6465 0.983823
smoothSolver: Solving for epsilon, Initial residual = 0.06717, Final residual = 0.00570385, No Iterations 2
smoothSolver: Solving for k, Initial residual = 0.0244528, Final residual = 0.000708644, No Iterations 4
ExecutionTime = 509.54 s ClockTime = 516 s

Time = 99

Solving chemistry
Characteristic time of chemistry: 0.1
smoothSolver: Solving for Ux, Initial residual = 0.0881626, Final residual = 0.00316143, No Iterations 4
smoothSolver: Solving for Uy, Initial residual = 0.0794196, Final residual = 0.0028376, No Iterations 4
smoothSolver: Solving for Uz, Initial residual = 0.105029, Final residual = 0.00352823, No Iterations 4
PBiCG: Solving for C, Initial residual = 0.000613862, Final residual = 1.63715e-05, No Iterations 2
PBiCG: Solving for CO2, Initial residual = 0.00455755, Final residual = 9.60917e-05, No Iterations 1
PBiCG: Solving for O2, Initial residual = 0.000422945, Final residual = 1.17823e-05, No Iterations 1
Max summe Yi = max((0*C)) [0 0 0 0 0 0 0] 0.15 Min summe Yi = min((0*C)) [0 0 0 0 0 0 0] 0
Fixed kappa in 0 cells due to large deltaY
PBiCG: Solving for h, Initial residual = 0.000893174, Final residual = 3.83304e-05, No Iterations 1
terminate called after throwing an instance of 'Cantera::CanteraError'
what(): std::exception
Aborted

-----------------end append------------------

-AAT
aat is offline   Reply With Quote

Old   January 11, 2010, 07:45
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by aat View Post
Hello everyone:

I am trying to model a reacting flow problem in OpenFOAM 1.5-dev using the alternateSteadyReactingFoam solver. This is a very simple 3D setup, co-flow fuel and air jets in a cylinder, similar to the Sandia flame D geometry. I used the same reaction mechanism and the species BCs as used in the dualInlet example. (I was able to run the sample dualInlet test cases for steady and unsteady configurations just fine)

I attempted to run my problem for 100 timesteps, and at the 99th timestep, the solution aborted with the message:


I am not sure where to look for the problem. Could anyone suggest where to start? Thanks!!


If it helps, the log output from the prior two iterations is included, to show the residuals and solution errors upto this point:

---------append log output from timesteps 98 and 99--------
Time = 98

Solving chemistry
Characteristic time of chemistry: 0.1
smoothSolver: Solving for Ux, Initial residual = 0.269379, Final residual = 0.00513338, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 0.0945435, Final residual = 0.00306857, No Iterations 4
smoothSolver: Solving for Uz, Initial residual = 0.143678, Final residual = 0.00382205, No Iterations 4
PBiCG: Solving for C, Initial residual = 0.000566587, Final residual = 1.60321e-05, No Iterations 2
PBiCG: Solving for CO2, Initial residual = 0.00448204, Final residual = 9.34077e-05, No Iterations 1
PBiCG: Solving for O2, Initial residual = 0.000416701, Final residual = 1.09867e-05, No Iterations 1
Max summe Yi = max((0*C)) [0 0 0 0 0 0 0] 0.15 Min summe Yi = min((0*C)) [0 0 0 0 0 0 0] 0
Fixed kappa in 0 cells due to large deltaY
PBiCG: Solving for h, Initial residual = 0.0014209, Final residual = 8.11273e-05, No Iterations 1
--> FOAM Warning :
From function canteraChemistryModel::calcDQ(volScalarField &dQ)
in file canteraChemistryModel.C at line 321
Calculation of dQ is not yet verified
GAMG: Solving for p, Initial residual = 0.301642, Final residual = 0.0105844, No Iterations 2
GAMG: Solving for p, Initial residual = 0.0109159, Final residual = 0.000542107, No Iterations 4
time step continuity errors : sum local = 0.396288, global = 0.0817594, cumulative = 0.645363
bounding p, min: 94456.6 max: 110249 average: 100011
rho max/min : 76.6465 0.983823
smoothSolver: Solving for epsilon, Initial residual = 0.06717, Final residual = 0.00570385, No Iterations 2
smoothSolver: Solving for k, Initial residual = 0.0244528, Final residual = 0.000708644, No Iterations 4
ExecutionTime = 509.54 s ClockTime = 516 s

Time = 99

Solving chemistry
Characteristic time of chemistry: 0.1
smoothSolver: Solving for Ux, Initial residual = 0.0881626, Final residual = 0.00316143, No Iterations 4
smoothSolver: Solving for Uy, Initial residual = 0.0794196, Final residual = 0.0028376, No Iterations 4
smoothSolver: Solving for Uz, Initial residual = 0.105029, Final residual = 0.00352823, No Iterations 4
PBiCG: Solving for C, Initial residual = 0.000613862, Final residual = 1.63715e-05, No Iterations 2
PBiCG: Solving for CO2, Initial residual = 0.00455755, Final residual = 9.60917e-05, No Iterations 1
PBiCG: Solving for O2, Initial residual = 0.000422945, Final residual = 1.17823e-05, No Iterations 1
Max summe Yi = max((0*C)) [0 0 0 0 0 0 0] 0.15 Min summe Yi = min((0*C)) [0 0 0 0 0 0 0] 0
Fixed kappa in 0 cells due to large deltaY
PBiCG: Solving for h, Initial residual = 0.000893174, Final residual = 3.83304e-05, No Iterations 1
terminate called after throwing an instance of 'Cantera::CanteraError'
what(): std::exception
Aborted

-----------------end append------------------
The time of the exception (after the calculation of the enthalpy) indicates that it occurs during thermo-correct(). Usually there should be a bit more output in the stack-trace (try setting FOAM_ABORT). Anyway. The density range in the previous time-step seems awfully wide to me (two orders of magnitude). Is this legal? Try smaller relaxation parameters

Bernhard
gschaider is offline   Reply With Quote

Old   January 12, 2010, 08:35
Default
  #3
Senior Member
 
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 176
Rep Power: 8
markusrehm is on a distinguished road
Hello,

you are facing a common problem in steady-state chemistry solution. The solution diverges at start-up. When I run a simulation like that I do the following

  • I run a few hundred steps without chemistry to converge the flow field (switch off turbulentReaction in constant/chemistryProperties) - sometimes I also have to run adiabatic (without hEqn) or "hot adiabatic" and switch on hEqn later
  • set the temperature to something like 2000K in a square where fuel and oxidizer are mixed (setFields)
  • activate chemistry and use very small under relaxation factors at the beginning
  • you could also try to ramp up the fuel fraction in the jet from zero to full
There is no general way to get a case running you have to play around with different combinations of the tools just mentioned. Maybe you can post the residuals here.

Regards, Markus.
markusrehm is offline   Reply With Quote

Reply

Tags
cantera, reacting, std::exception

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50
Compiling problems with hello worldC fw407 OpenFOAM Installation 21 January 6, 2008 18:38
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51
user subroutine error CFDUSER CFX 2 December 9, 2006 07:31


All times are GMT -4. The time now is 15:22.