Segmentation fault in running alternateSteadyReactingFoam,why?
I got a Segmentation fault message while having alternateSteadyReactingFoam running on an cantera example.
Can somebody give me some suggestions? |
I use cantera input file-mix.cti with 9 species and 27 reactions including 6 duplicate reactions.
If somebody knows something about it, contact me, I can show you all the files. |
More details-mix.cti file
Now I give the complete content of mix.cti-cantera input file:
units(length = "cm", time = "s", quantity = "mol", act_energy = "cal/mol") #ideal_gas(name = "hydrogen_oxygen", ideal_gas(name = "mix", elements = " O H Ar ", species = " H2 H O O2 OH H2O HO2 H2O2 AR", #New added line transport="Mix", reactions = "all", #The beneath is changed initial_state=state(temperature=300,pressure=OneAt m,mole_fractions='O2:0.026, H2:0.009') #The beneath means no validation of input,just a try! #options = ("no_validation") ) #------------------------------------------------------------------------------- # Species data #------------------------------------------------------------------------------- species(name = "H2", atoms = " H:2 ", thermo = ( NASA( [ 200.00, 1000.00], [ 2.344331120E+00, 7.980520750E-03, -1.947815100E-05, 2.015720940E-08, -7.376117610E-12, -9.179351730E+02, 6.830102380E-01] ), NASA( [ 1000.00, 3500.00], [ 3.337279200E+00, -4.940247310E-05, 4.994567780E-07, -1.795663940E-10, 2.002553760E-14, -9.501589220E+02, -3.205023310E+00] ) ), transport = gas_transport( geom = "linear", diam = 2.92, well_depth = 38.00, polar = 0.79, rot_relax = 280.00) ) species(name = "H", atoms = " H:1 ", thermo = ( NASA( [ 200.00, 1000.00], [ 2.500000000E+00, 7.053328190E-13, -1.995919640E-15, 2.300816320E-18, -9.277323320E-22, 2.547365990E+04, -4.466828530E-01] ), NASA( [ 1000.00, 3500.00], [ 2.500000010E+00, -2.308429730E-11, 1.615619480E-14, -4.735152350E-18, 4.981973570E-22, 2.547365990E+04, -4.466829140E-01] ) ), transport = gas_transport( geom = "atom", diam = 2.05, well_depth = 145.00) ) species(name = "O", atoms = " O:1 ", thermo = ( NASA( [ 200.00, 1000.00], [ 3.168267100E+00, -3.279318840E-03, 6.643063960E-06, -6.128066240E-09, 2.112659710E-12, 2.912225920E+04, 2.051933460E+00] ), NASA( [ 1000.00, 3500.00], [ 2.569420780E+00, -8.597411370E-05, 4.194845890E-08, -1.001777990E-11, 1.228336910E-15, 2.921757910E+04, 4.784338640E+00] ) ), transport = gas_transport( geom = "atom", diam = 2.75, well_depth = 80.00) ) species(name = "O2", atoms = " O:2 ", thermo = ( NASA( [ 200.00, 1000.00], [ 3.782456360E+00, -2.996734160E-03, 9.847302010E-06, -9.681295090E-09, 3.243728370E-12, -1.063943560E+03, 3.657675730E+00] ), NASA( [ 1000.00, 3500.00], [ 3.282537840E+00, 1.483087540E-03, -7.579666690E-07, 2.094705550E-10, -2.167177940E-14, -1.088457720E+03, 5.453231290E+00] ) ), transport = gas_transport( geom = "linear", diam = 3.46, well_depth = 107.40, polar = 1.60, rot_relax = 3.80) ) species(name = "OH", atoms = " O:1 H:1 ", thermo = ( NASA( [ 200.00, 1000.00], [ 3.992015430E+00, -2.401317520E-03, 4.617938410E-06, -3.881133330E-09, 1.364114700E-12, 3.615080560E+03, -1.039254580E-01] ), NASA( [ 1000.00, 3500.00], [ 3.092887670E+00, 5.484297160E-04, 1.265052280E-07, -8.794615560E-11, 1.174123760E-14, 3.858657000E+03, 4.476696100E+00] ) ), transport = gas_transport( geom = "linear", diam = 2.75, well_depth = 80.00) ) species(name = "H2O", atoms = " H:2 O:1 ", thermo = ( NASA( [ 200.00, 1000.00], [ 4.198640560E+00, -2.036434100E-03, 6.520402110E-06, -5.487970620E-09, 1.771978170E-12, -3.029372670E+04, -8.490322080E-01] ), NASA( [ 1000.00, 3500.00], [ 3.033992490E+00, 2.176918040E-03, -1.640725180E-07, -9.704198700E-11, 1.682009920E-14, -3.000429710E+04, 4.966770100E+00] ) ), transport = gas_transport( geom = "nonlinear", diam = 2.60, well_depth = 572.40, dipole = 1.84, rot_relax = 4.00) ) species(name = "HO2", atoms = " H:1 O:2 ", thermo = ( NASA( [ 200.00, 1000.00], [ 4.301798010E+00, -4.749120510E-03, 2.115828910E-05, -2.427638940E-08, 9.292251240E-12, 2.948080400E+02, 3.716662450E+00] ), NASA( [ 1000.00, 3500.00], [ 4.017210900E+00, 2.239820130E-03, -6.336581500E-07, 1.142463700E-10, -1.079085350E-14, 1.118567130E+02, 3.785102150E+00] ) ), transport = gas_transport( geom = "nonlinear", diam = 3.46, well_depth = 107.40, rot_relax = 1.00) ) species(name = "H2O2", atoms = " H:2 O:2 ", thermo = ( NASA( [ 200.00, 1000.00], [ 4.276112690E+00, -5.428224170E-04, 1.673357010E-05, -2.157708130E-08, 8.624543630E-12, -1.770258210E+04, 3.435050740E+00] ), NASA( [ 1000.00, 3500.00], [ 4.165002850E+00, 4.908316940E-03, -1.901392250E-06, 3.711859860E-10, -2.879083050E-14, -1.786178770E+04, 2.916156620E+00] ) ), transport = gas_transport( geom = "nonlinear", diam = 3.46, well_depth = 107.40, rot_relax = 3.80) ) species(name = "AR", atoms = " Ar:1 ", thermo = ( NASA( [ 300.00, 1000.00], [ 2.500000000E+00, 0.000000000E+00, 0.000000000E+00, 0.000000000E+00, 0.000000000E+00, -7.453750000E+02, 4.366000000E+00] ), NASA( [ 1000.00, 5000.00], [ 2.500000000E+00, 0.000000000E+00, 0.000000000E+00, 0.000000000E+00, 0.000000000E+00, -7.453750000E+02, 4.366000000E+00] ) ), transport = gas_transport( geom = "atom", diam = 3.33, well_depth = 136.50) ) #------------------------------------------------------------------------------- # Reaction data #------------------------------------------------------------------------------- # Reaction 1 three_body_reaction( "2 O + M <=> O2 + M", [1.20000E+17, -1, 0], efficiencies = " AR:0.83 H2:2.4 H2O:15.4 ") # Reaction 2 three_body_reaction( "O + H + M <=> OH + M", [5.00000E+17, -1, 0], efficiencies = " AR:0.7 H2:2 H2O:6 ") # Reaction 3 reaction( "O + H2 <=> H + OH", [3.87000E+04, 2.7, 6260]) # Reaction 4 reaction( "O + HO2 <=> OH + O2", [2.00000E+13, 0, 0]) # Reaction 5 reaction( "O + H2O2 <=> OH + HO2", [9.63000E+06, 2, 4000]) # Reaction 6 reaction( "H + 2 O2 <=> HO2 + O2", [2.08000E+19, -1.24, 0]) # Reaction 7 reaction( "H + O2 + H2O <=> HO2 + H2O", [1.12600E+19, -0.76, 0]) # Reaction 8 reaction( "H + O2 + AR <=> HO2 + AR", [7.00000E+17, -0.8, 0]) # Reaction 9 reaction( "H + O2 <=> O + OH", [2.65000E+16, -0.6707, 17041]) # Reaction 10 three_body_reaction( "2 H + M <=> H2 + M", [1.00000E+18, -1, 0], efficiencies = " AR:0.63 H2:0 H2O:0 ") # Reaction 11 reaction( "2 H + H2 <=> 2 H2", [9.00000E+16, -0.6, 0]) # Reaction 12 reaction( "2 H + H2O <=> H2 + H2O", [6.00000E+19, -1.25, 0]) # Reaction 13 three_body_reaction( "H + OH + M <=> H2O + M", [2.20000E+22, -2, 0], efficiencies = " AR:0.38 H2:0.73 H2O:3.65 ") # Reaction 14 reaction( "H + HO2 <=> O + H2O", [3.97000E+12, 0, 671]) # Reaction 15 reaction( "H + HO2 <=> O2 + H2", [4.48000E+13, 0, 1068]) # Reaction 16 reaction( "H + HO2 <=> 2 OH", [8.40000E+13, 0, 635]) # Reaction 17 reaction( "H + H2O2 <=> HO2 + H2", [1.21000E+07, 2, 5200]) # Reaction 18 reaction( "H + H2O2 <=> OH + H2O", [1.00000E+13, 0, 3600]) # Reaction 19 reaction( "OH + H2 <=> H + H2O", [2.16000E+08, 1.51, 3430]) # Reaction 20 falloff_reaction( "2 OH (+ M) <=> H2O2 (+ M)", #rate_coeff_inf = [7.40000E+13, -0.37, 0], kf=[7.40000E+13, -0.37, 0], #rate_coeff_0 = [2.30000E+18, -0.9, -1700], kf0=[2.30000E+18, -0.9, -1700], falloff = Troe(A = 0.7346, T3 = 94, T1 = 1756, T2 = 5182), efficiencies = " AR:0.7 H2:2 H2O:6 ") # Reaction 21 reaction( "2 OH <=> O + H2O", [3.57000E+04, 2.4, -2110]) # Reaction 22 reaction( "OH + HO2 <=> O2 + H2O", [1.45000E+13, 0, -500],options=("duplicate")) # Reaction 23 reaction( "OH + H2O2 <=> HO2 + H2O", [2.00000E+12, 0, 427],options=("duplicate")) # Reaction 24 reaction( "OH + H2O2 <=> HO2 + H2O", [1.70000E+18, 0, 29410],options=("duplicate")) # Reaction 25 reaction( "2 HO2 <=> O2 + H2O2", [1.30000E+11, 0, -1630],options=("duplicate")) # Reaction 26 reaction( "2 HO2 <=> O2 + H2O2", [4.20000E+14, 0, 12000],options=("duplicate")) # Reaction 27 reaction( "OH + HO2 <=> O2 + H2O", [5.00000E+15, 0, 17330],options=("duplicate")) |
More files?
And I still have those files:
blockmeshDict gasThermo chemistryProperties environmentalProperties gasReactions RASProperties thermophysicalProperties controlDict fvSchemes fvSolution Any experienced one needs the content of any file above, please let me know. PS: This is a steady issue with solver alternateSteatReactingFoam. |
Quote:
The most common reason for segmentation faults with the Cantera-libray is that the gasId specified in thermophysicalProperties doesn't fit the name given in the CTI-file. But that is only a guess Bernhard |
Thanks, Bernhard.
I'll check this as soon as possible. |
thermophysicalProperties file
/*---------------------------------------------------------------------------*\
| ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.2-devel | | \\ / A nd | Web: http://www.openfoam.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ // FoamX Case Dictionary. FoamFile { version 2.0; format ascii; root "/Werner/bgschaid/bgschaid-foamStuff/Solver/Spray"; case "dualInjector2D"; instance "constant"; local ""; class dictionary; object thermophysicalProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // thermoType hMixtureThermo<canteraMixture>; // thermoType hMixtureThermo<reactingMixture>; chemistryReader foamChemistryReader; // chemistryReader chemkinReader; foamChemistryThermoFile "$FOAM_CASE/constant/gasThermo"; foamChemistryFile "$FOAM_CASE/constant/gasReactions"; // CHEMKINFile "$FOAM_CASE/constant/gri30.inp"; // CHEMKINThermoFile "$FOAM_CASE/constant/..."; inertSpecie N2; cantera { gasFile "$FOAM_CASE/constant/mix.cti"; //Bernhard, here? Is it right? gasId mix; //or here? I have no ideals about gasId. standinThermoFile "$FOAM_CASE/constant/gasThermo"; //standinThermoFile $foamChemistryThermoFile; } // ************************************************** *********************** // |
1600K trace file
1 Attachment(s)
The attachment is the running info file with 1600k.
When the content of file is over, 'Segmentation fault' occurs. |
300K trace file
1 Attachment(s)
The attachment is the running info file with 300k.
When the content of file is over, 'Segmentation fault' occurs. |
Quote:
Before running say export FOAM_ABORT=1 to provoke a stack-trace |
Thank you!
I'll try very soon! |
And I wonder any relationship among the initial conditions exist?
|
stack trace file
/*---------------------------------------------------------------------------*\
| ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.5-dev | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Exec : alternateSteadyReactingFoam Date : Dec 28 2010 Time : 09:42:34 Host : slax PID : 9423 Case : /OpenFOAM/OpenFOAM-1.5-dev/applications/solvers/AlternateChemistry/Steady/firstSample nProcs : 1 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time --> FOAM Warning : From function dlLibraryTable::open(const fileName& functionLibName) in file db/dlLibraryTable/dlLibraryTable.C at line 86 could not load libcompressibleFluxBCs.so: cannot open shared object file: No such file or directory Create mesh for time = 0 Reading chemistry properties Reading environmentalProperties Reading thermophysicalProperties Selecting thermodynamics package hMixtureThermo<canteraMixture> Reading from Cantera-File "/OpenFOAM/OpenFOAM-1.5-dev/applications/solvers/AlternateChemistry/Steady/firstSample/constant/mix.cti" the mixture mix Reading from Cantera-File "/OpenFOAM/OpenFOAM-1.5-dev/applications/solvers/AlternateChemistry/Steady/firstSample/constant/mix.cti" the mixture mix Reading field U Reading/calculating face flux field phi Creating turbulence model. Selecting RAS turbulence model kEpsilon kEpsilonCoeffs { Cmu 0.09; C1 1.44; C2 1.92; C3 -0.33; alphah 1; alphak 1; alphaEps 0.76923; } Constructing chemical mechanism Choosing the chemistry engine Selecting chemistry engine canteraLocalTimeChemistryModel with STEADY chemistry model Starting time loop Time = 1 Solving chemistry Characteristic time of chemistry: 0.1 smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.000958722, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.000662575, No Iterations 2 PBiCG: Solving for H2, Initial residual = 0.999962, Final residual = 0.00552089, No Iterations 1 PBiCG: Solving for H, Initial residual = 0.999987, Final residual = 0.00256162, No Iterations 1 PBiCG: Solving for O, Initial residual = 0.999985, Final residual = 0.00256161, No Iterations 1 PBiCG: Solving for O2, Initial residual = 1, Final residual = 0.00552054, No Iterations 1 PBiCG: Solving for OH, Initial residual = 0.999987, Final residual = 0.00256162, No Iterations 1 PBiCG: Solving for H2O, Initial residual = 0.999994, Final residual = 0.00256163, No Iterations 1 PBiCG: Solving for HO2, Initial residual = 1, Final residual = 0.00256165, No Iterations 1 PBiCG: Solving for H2O2, Initial residual = 0.346973, Final residual = 0.000888823, No Iterations 1 PBiCG: Solving for AR, Initial residual = 1.7173e-11, Final residual = 1.7173e-11, No Iterations 0 Max summe Yi = max((0*H2)) [0 0 0 0 0 0 0] 0.035 Min summe Yi = min((0*H2)) [0 0 0 0 0 0 0] 0.035 Fixed kappa in 0 cells due to large deltaY #0 Foam::error::printStack(Foam::Ostream&) in "/OpenFOAM/OpenFOAM-1.5-dev/lib/linuxGccDPOpt/libOpenFOAM.so" #1 Foam::sigSegv::sigSegvHandler(int) in "/OpenFOAM/OpenFOAM-1.5-dev/lib/linuxGccDPOpt/libOpenFOAM.so" #2 Uninterpreted: #3 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::operator=(Foam::tmp<Foam::Geometri cField<double, Foam::fvPatchField, Foam::volMesh> > const&) in "/home/slax/OpenFOAM/slax-1.5-dev/applications/bin/linuxGccDPOpt/alternateSteadyReactingFoam" #4 main in "/home/slax/OpenFOAM/slax-1.5-dev/applications/bin/linuxGccDPOpt/alternateSteadyReactingFoam" #5 __libc_start_main in "/lib/libc.so.6" #6 _start in "/home/slax/OpenFOAM/slax-1.5-dev/applications/bin/linuxGccDPOpt/alternateSteadyReactingFoam" |
/*---------------------------------------------------------------------------*\
| ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.5-dev | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Exec : alternateSteadyReactingFoam Date : Dec 28 2010 Time : 09:42:34 Host : slax PID : 9423 Case : /OpenFOAM/OpenFOAM-1.5-dev/applications/solvers/AlternateChemistry/Steady/firstSample nProcs : 1 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time --> FOAM Warning : From function dlLibraryTable::open(const fileName& functionLibName) in file db/dlLibraryTable/dlLibraryTable.C at line 86 could not load libcompressibleFluxBCs.so: cannot open shared object file: No such file or directory Create mesh for time = 0 Reading chemistry properties Reading environmentalProperties Reading thermophysicalProperties Selecting thermodynamics package hMixtureThermo<canteraMixture> Reading from Cantera-File "/OpenFOAM/OpenFOAM-1.5-dev/applications/solvers/AlternateChemistry/Steady/firstSample/constant/mix.cti" the mixture mix Reading from Cantera-File "/OpenFOAM/OpenFOAM-1.5-dev/applications/solvers/AlternateChemistry/Steady/firstSample/constant/mix.cti" the mixture mix Reading field U Reading/calculating face flux field phi Creating turbulence model. Selecting RAS turbulence model kEpsilon kEpsilonCoeffs { Cmu 0.09; C1 1.44; C2 1.92; C3 -0.33; alphah 1; alphak 1; alphaEps 0.76923; } Constructing chemical mechanism Choosing the chemistry engine Selecting chemistry engine canteraLocalTimeChemistryModel with STEADY chemistry model Starting time loop Time = 1 Solving chemistry Characteristic time of chemistry: 0.1 smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.000958722, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.000662575, No Iterations 2 PBiCG: Solving for H2, Initial residual = 0.999962, Final residual = 0.00552089, No Iterations 1 PBiCG: Solving for H, Initial residual = 0.999987, Final residual = 0.00256162, No Iterations 1 PBiCG: Solving for O, Initial residual = 0.999985, Final residual = 0.00256161, No Iterations 1 PBiCG: Solving for O2, Initial residual = 1, Final residual = 0.00552054, No Iterations 1 PBiCG: Solving for OH, Initial residual = 0.999987, Final residual = 0.00256162, No Iterations 1 PBiCG: Solving for H2O, Initial residual = 0.999994, Final residual = 0.00256163, No Iterations 1 PBiCG: Solving for HO2, Initial residual = 1, Final residual = 0.00256165, No Iterations 1 PBiCG: Solving for H2O2, Initial residual = 0.346973, Final residual = 0.000888823, No Iterations 1 PBiCG: Solving for AR, Initial residual = 1.7173e-11, Final residual = 1.7173e-11, No Iterations 0 Max summe Yi = max((0*H2)) [0 0 0 0 0 0 0] 0.035 Min summe Yi = min((0*H2)) [0 0 0 0 0 0 0] 0.035 Fixed kappa in 0 cells due to large deltaY #0 Foam::error::printStack(Foam::Ostream&) in "/OpenFOAM/OpenFOAM-1.5-dev/lib/linuxGccDPOpt/libOpenFOAM.so" #1 Foam::sigSegv::sigSegvHandler(int) in "/OpenFOAM/OpenFOAM-1.5-dev/lib/linuxGccDPOpt/libOpenFOAM.so" #2 Uninterpreted: #3 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::operator=(Foam::tmp<Foam::Geometri cField<double, Foam::fvPatchField, Foam::volMesh> > const&) in "/home/slax/OpenFOAM/slax-1.5-dev/applications/bin/linuxGccDPOpt/alternateSteadyReactingFoam" #4 main in "/home/slax/OpenFOAM/slax-1.5-dev/applications/bin/linuxGccDPOpt/alternateSteadyReactingFoam" #5 __libc_start_main in "/lib/libc.so.6" #6 _start in "/home/slax/OpenFOAM/slax-1.5-dev/applications/bin/linuxGccDPOpt/alternateSteadyReactingFoam" |
Look at your conf-files. You specified a inert specie that is not part of the gas mix. When the solver tries to normalize for that it tries to access a field that isn't there and produces a segFault.
Surprised that the solver doesn't check for that, but obviously it doesn't Bernhard |
Thank you.
I modified the source of cantera, I'll fix it ASAP. |
Bernhard, I've got your point, those species in mix.cti file are not in gasThermo file, right? Cantera needs the content of gasThermo file to complete computation.
Now I wonder what the content of gasThermo file means, and where can I get those right numbers? In the thermophysicalProperties file, there are two places related to gasThermo file, what's the difference? |
I've got it running, but the temperature is too high
|
Units for input files (foam.inp and foam.dat) for foamChemistryReader
Hello Folks,
I was wondering if any one can confirm following: Q1. what are the units of pre-exponential factor (A) and activation energy (E) that is given in input file foam.inp for foamchemistry reader. Q2. what are the units of coefficient that are given in foam.dat (file that has thermo data of the species). I am asking this as I want to modify the existing foam.inp and foam.dat from coalchemistryfoam for one of cases for my gas phase chemistry. thanks in advance. cheers, Nir |
All times are GMT -4. The time now is 17:06. |