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

Cantera should allow three temperature ranges for thermodynamic properties #189

Open
Nicholaswogan opened this issue Oct 27, 2023 · 1 comment
Labels
feature-request New feature request

Comments

@Nicholaswogan
Copy link

Problem description

Shomate thermodynamic properties only allows for 2 temperature ranges, but Cantera should allow 3 temperature ranges.

Steps to reproduce

See the attached input file example.yaml

import cantera as ct
gas = ct.Solution('input/example.yaml')

The resulting error

---------------------------------------------------------------------------
CanteraError                              Traceback (most recent call last)
Cell In[8], line 1
----> 1 gas = ct.Solution('input/example.yaml')

File build/python/cantera/base.pyx:71, in cantera._cantera._SolutionBase.__cinit__()

File build/python/cantera/base.pyx:128, in cantera._canter
[example.yaml.zip](https://github.com/Cantera/cantera/files/13185073/example.yaml.zip)
a._SolutionBase._cinit()

File build/python/cantera/base.pyx:215, in cantera._cantera._SolutionBase._init_yaml()

CanteraError: 
*******************************************************************************
InputFileError thrown by AnyValue::checkSize:
Error on line 17 of ./input/example.yaml:
Expected array 'temperature-ranges' to have from 2 to 3 elements, but found an array of length 4.
|  Line |
|    12 | species:
|    13 | - name: H2
|    14 |   composition: {H: 2}
|    15 |   thermo:
|    16 |     model: Shomate
>    17 >     temperature-ranges: [0.0, 1000.0, 2500.0, 6000.0]
                                  ^
|    18 |     data:
|    19 |     - [33.066178, -11.36342, 11.432816, -2.772874, -0.158558, -9.980797, 172.708]
|    20 |     - [18.563083, 12.257357, -2.859786, 0.268238, 1.97799, -1.147438, 156.2881]
*******************************************************************************

Behavior

Cantera should be able to deal with 3 temperature ranges. On NIST, H2 has 3 ranges: https://webbook.nist.gov/cgi/cbook.cgi?ID=C1333740&Mask=1#Thermo-Gas

System information

  • Cantera version: 2.6.0
  • OS: MacOS Apple Silicon

example.yaml.zip

@ischoegl
Copy link
Member

Thank you for the suggestion. I am transferring this over to the enhancement repository, as this is a feature request.

@ischoegl ischoegl transferred this issue from Cantera/cantera Oct 27, 2023
@ischoegl ischoegl added the feature-request New feature request label Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature request
Projects
None yet
Development

No branches or pull requests

2 participants