Skip to content

Documentation bug for YAML format #1001

@leesharma

Description

@leesharma

One of the documentation examples in Solution (link to code | link to site) demonstrating that Species and Reactions can be imported from input files to construct Solutions appears to be invalid in 2.5. When using yaml inputs, ct.Reaction.listFromFile needs a Kinetics object as the second argument.

Solution objects can also be constructed using Species and Reaction objects which can themselves either be imported from input files or defined directly in Python:

spec = ct.Species.listFromFile('gri30.yaml')
rxns = ct.Reaction.listFromFile('gri30.yaml')  ## broken ##
gas = ct.Solution(thermo='IdealGas', kinetics='GasKinetics',
                  species=spec, reactions=rxns, name='my_custom_name')

The example should probably be corrected (either adding the second argument or switching back to cti/xml) or removed. The issue was introduced in #696, which updated a bunch of *.cti to *.yaml in the docstrings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions