Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update cantera version to remove need for x86 emulation on arm mac #2751

Open
wants to merge 8 commits into
base: py39/juliacall-fix
Choose a base branch
from

Conversation

JacksonBurns
Copy link
Contributor

WIP

would resolve #2676

@JacksonBurns
Copy link
Contributor Author

I am using this script to change our CTI blocks into YAML:

from cantera.cti2yaml import convert

convert(text="""species(name=u'Ar',
        atoms='Ar:1',
        thermo=(NASA([200.00, 1000.00],
                     [ 2.50000000E+00,  0.00000000E+00,  0.00000000E+00,
                       0.00000000E+00,  0.00000000E+00, -7.45375000E+02,
                       4.37967000E+00]),
                NASA([1000.00, 6000.00],
                     [ 2.50000000E+00,  0.00000000E+00,  0.00000000E+00,
                       0.00000000E+00,  0.00000000E+00, -7.45375000E+02,
                       4.37967000E+00])),
        transport=gas_transport(geom='atom',
                                diam=3.33,
                                well_depth=136.501,
                                dipole=2.0,
                                polar=1.0,
                                rot_relax=15.0))""",
                                output_name="temp_yaml.yaml"
         )

@JacksonBurns
Copy link
Contributor Author

Here are the other errors which must be resolved:

 FAILED test/rmgpy/reactionTest.py::TestReactionToCantera::test_pdep_arrhenius - AttributeError: 'cantera.reaction.Reaction' object has no attribute 'rates'
FAILED test/rmgpy/reactionTest.py::TestReactionToCantera::test_multi_pdep_arrhenius - AttributeError: 'cantera.reaction.Reaction' object has no attribute 'rates'
FAILED test/rmgpy/reactionTest.py::TestReactionToCantera::test_falloff - AttributeError: module 'cantera' has no attribute 'FalloffReaction'
FAILED test/rmgpy/speciesTest.py::TestSpecies::test_cantera - cantera._utils.CanteraError: 
*******************************************************************************
InputFileError thrown by AnyMap::operator[]:
Error on line 1 of input string:
Key 'composition' not found.
Existing keys: species, date, generator, cantera-version, description
|  Line |
>     1 > 
          ^
|     2 | description: |-
|     3 |   Argon
|     4 | 
*******************************************************************************
FAILED test/rmgpy/transportDataTest.py::TestTransportData::test_to_cantera - AttributeError: type object 'cantera.thermo.Species' has no attribute 'fromCti'
ERROR test/rmgpy/tools/canteramodelTest.py::RMGToCanteraTest::test_species_conversion - AttributeError: module 'cantera' has no attribute 'FalloffReaction'
ERROR test/rmgpy/tools/canteramodelTest.py::RMGToCanteraTest::test_reaction_conversion - AttributeError: module 'cantera' has no attribute 'FalloffReaction'
ERROR test/rmgpy/tools/canteramodelTest.py::RMGToCanteraTest::test_surface_species_conversion - AttributeError: module 'cantera' has no attribute 'FalloffReaction'
ERROR test/rmgpy/tools/canteramodelTest.py::RMGToCanteraTest::test_surface_reaction_conversion - AttributeError: module 'cantera' has no attribute 'FalloffReaction'

@JacksonBurns
Copy link
Contributor Author

FalloffReaction has been merged with Reaction: https://cantera.org/3.0/doxygen/html/da/d58/deprecated.html#_deprecated000043

@JacksonBurns JacksonBurns force-pushed the py39/cantera3 branch 2 times, most recently from fddd38d to 206d426 Compare January 23, 2025 16:41
@JacksonBurns JacksonBurns changed the base branch from feat/py39_rebase-julia_fix to py39/juliacall-fix January 25, 2025 21:53
@JacksonBurns JacksonBurns force-pushed the py39/cantera3 branch 2 times, most recently from ee73300 to 33bd6f2 Compare January 26, 2025 02:20
JacksonBurns and others added 4 commits January 28, 2025 12:51
passing an empty dict for third_body results in the attribute being None, but we need it to just be an unpopulated ThirdBody to indicate that the Reaction is a third body reaction
it seems that Cantera 3 seems to be a little bit pickier about the syntax for chemkin files
@JacksonBurns
Copy link
Contributor Author

 - cantera3 can only read if there is a name
 - rmg can't read if there is a name
 - update rmg to ignore the name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

We should replace cantera.Species.fromCti() calls with cantera.Species.from_yaml() calls
1 participant