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
For SolutionArray/FlameBase, importers are not currently creating the same states. Negative values are truncated to zero which makes it impossible to have the same states initially stored in the SolutionArray or FlameBase object.
Quick example:
Operating system: Windows 10
Python Version: 3.9.2
Cantera version: 2.6.0a1
Also, SolutionArray does not have set_unnormalized_mole_fractions() or set_unnormalized_mass_fractions() methods like a Solution object which I think should be applicable to SolutionArray too.
In [6]: arr_new.set_unnormalized_mole_fractions(arr.X - 1e-16)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-14-22b735859e09> in <module>
----> 1 arr_new.set_unnormalized_mole_fractions(arr.X - 1e-16)
~/.pyenv/versions/miniconda3-latest/envs/cantera-2.5.1/lib/python3.8/site-packages/cantera/composite.py in __getattr__(self, name)
604 super().__getattr__(name)
605 else:
--> 606 raise AttributeError("'{}' object has no attribute '{}'".format(
607 self.__class__.__name__, name))
608
AttributeError: 'SolutionArray' object has no attribute 'set_unnormalized_mole_fractions'
A proposed fix for the two issues raised above would be to implement set_unnormalized_mass_fractions and set_unnormalized_mole_fractions for SolutionArray objects.
Another related issue which I think would be fixed together with the above raise issues is
The text was updated successfully, but these errors were encountered:
DavidAkinpelu
changed the title
Import of SolutionArray/FlameBase from file truncates negative values
SolutionArray from file truncates negative values
Apr 19, 2021
DavidAkinpelu
changed the title
SolutionArray from file truncates negative values
SolutionArray truncates negative values
Apr 19, 2021
For
SolutionArray
/FlameBase
, importers are not currently creating the same states. Negative values are truncated to zero which makes it impossible to have the same states initially stored in theSolutionArray
orFlameBase
object.Quick example:
Operating system: Windows 10
Python Version: 3.9.2
Cantera version: 2.6.0a1
Also,
SolutionArray
does not haveset_unnormalized_mole_fractions()
orset_unnormalized_mass_fractions()
methods like aSolution
object which I think should be applicable toSolutionArray
too.A proposed fix for the two issues raised above would be to implement
set_unnormalized_mass_fractions
andset_unnormalized_mole_fractions
forSolutionArray
objects.Another related issue which I think would be fixed together with the above raise issues is
The text was updated successfully, but these errors were encountered: