You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading an erroneous mechanism (both .cti or .xml) that doesn't include transport parameters but shows a transport = 'Mix' or transport = 'Multi'` flag, Cantera returns a segmentation fault. Probably, there should be a warning instead.
Example: Mechanism:
units(length = "cm", time = "s", quantity = "mol", act_energy = "cal/mol")
ideal_gas(
name = "gas",
elements = " H ",
species = """ H """,
reactions = "all",
transport="Mix", # also returns segfault for "Multi"
initial_state = state(temperature = 300.0, pressure = OneAtm)
)
#-------------------------------------------------------------------------------
# Species data
#-------------------------------------------------------------------------------
species(
name = "H",
atoms = " H:1 ",
thermo = (
NASA( [ 300.00, 1000.00], [ 2.500000000E+00, 0.000000000E+00,
0.000000000E+00, 0.000000000E+00, 0.000000000E+00,
2.547163000E+04, -4.601176000E-01] ),
NASA( [ 1000.00, 5000.00], [ 2.500000000E+00, 0.000000000E+00,
0.000000000E+00, 0.000000000E+00, 0.000000000E+00,
2.547163000E+04, -4.601176000E-01] )
),
#transport=gas_transport(geom='atom', diam=2.05, well_depth=145.0)
#no error is returned if transport data is not commented out
)
The text was updated successfully, but these errors were encountered:
Hi Thomas,
Can you provide a few more details to reproduce the segfault? I use mechanisms all the time that have no transport info, and I have no trouble. I use them for homogeneous cases, so no Transport is necessary - is the segfault showing when you use this kind of mechanism in a 1D case?
The problem is that the mechanism shows a transport='Mix' or transport='Multi' flag. If you comment that out, the mechanism loads just fine. (I updated the description for this information.)
The segfault occurs when loading the mechanism. In python, a simple gas = ct.Solution('mech_test.cti') will do.
The error was brought up by a colleague of me who used an erroneous chemkin mechanism for a 1D flame.
When reading an erroneous mechanism (both .cti or .xml) that doesn't include transport parameters but shows a
transport = 'Mix'
or transport = 'Multi'` flag, Cantera returns a segmentation fault. Probably, there should be a warning instead.Example: Mechanism:
The text was updated successfully, but these errors were encountered: