Cantera / cantera

Chemical kinetics, thermodynamics, and transport tool suite
https://cantera.org
Other
580 stars 341 forks source link

Setting both width and grid of a flame should raise an exception #1693

Closed speth closed 2 weeks ago

speth commented 1 month ago

Problem description

In Python, specifying both a width and a grid to any type of flame object results in the grid getting replaced with the default grid of the given width. Instead, this overdefinition of the grid should raise an exception.

Steps to reproduce

>>> f = ct.CounterflowDiffusionFlame(gas, width=0.1, grid=np.linspace(0, 0.2, 20))
>>> print(f.grid)
array([0.  , 0.02, 0.04, 0.06, 0.08, 0.1 ])

System information

Additional context

Originally reported on Users' Group: https://groups.google.com/g/cantera-users/c/GBJtoDBvulY