-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
Deprecating ConstDensityThermo class #645
Conversation
Codecov Report
@@ Coverage Diff @@
## master #645 +/- ##
=========================================
- Coverage 68.53% 68.5% -0.04%
=========================================
Files 368 368
Lines 40027 40027
=========================================
- Hits 27433 27419 -14
- Misses 12594 12608 +14
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #645 +/- ##
=========================================
- Coverage 68.53% 68.5% -0.04%
=========================================
Files 368 368
Lines 40027 40027
=========================================
- Hits 27433 27419 -14
- Misses 12594 12608 +14
Continue to review full report at Codecov.
|
@@ -2295,15 +2304,14 @@ def __init__(self, | |||
initial_state, options) | |||
self._tr = transport | |||
self._n = site_density | |||
self._species = species | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As minor as it is, I'd suggest that this fix for lattice
be done in a separate commit, since it serves a distinct purpose, and 'Enable instantiation of lattice class in CTI files` is a nice thing to see in the commit log.
Removes references to incompressible_solid phase in the codebase. This phase type references ConstDensityThermo phase, which is a non-physical model and is to be deprecated, with Cantera 2.5. In order to enable deprecation, the following changes are hereby made: - Changes oxide_bulk phase type from incompressible_solid to lattice in sofc.cti - Changes test_convert.py so that it interrogates the density_mole of the bulk_oxide, rather than density_mass
The thermophase ConstDensityThermo instantiates a class with constant density_mass Such a model is of dubious physical validity/applicability and has minimal foreseeable use cases. This commit marks it for deprecation, and adds a message in ctml_writer.py (where the model has the misleading alias 'incompressible_solid') refering the interested user to consider appropriate alternate thermophase classes 'lattice' or 'IdealSolidSoln.'
7325d5e
to
88ac987
Compare
As previously discussed, the
incompressible_solid
cti phase actually points to theConstDensityThermo
class. This is misleading to a user, and moreover, a thermo class which enforces constant mass density has both dubious physical underpinning and marginal utility for a user. It is therefore appropriate to deprecate and remove this class, and refer interested users to either theIdealSolidSolnPhase
orLattice
thermo classes, which are appropriate replacements.Changes proposed in this pull request:
ConstDensityThermo
thermo class for deprecation, as of release 2.5, and for removal, thereafter.ctml_writer.py
parsing routine,ConstDensityThermo.cpp
, andConstDensityThermo.h
to indicate as much, and suggest use ofLattice
orIdealSolidSolnPhase
classes as alternatesincompressible_solid
phase insofc.cti
(which is used for the sofc example, and which aliases to theConstDensityThermo
class) and replaces it with an equivalentLattice
phase.test_convert.py
which interrogates theincompressible_solid
phase mass density insofc.cti
so that it instead interrogates theLattice
phase molar density.