Closed prehner closed 6 months ago
Residual
.Arc
back then - otherwise building the EoS gets awkward in Python. I don't mind the Arc
in Rust too much (it is not slowing down the code). If we decide to remove them, maybe we should write a single constructor for an equation of state and work with a "configuration" object to provide parameters and options for EoS instead of a method for each model?
The PR contains four smaller proposed changes that are each open to discussion individually.
molarweight
field is removed fromPureRecord
and added toPcSaftRecord
instead (the other eos would have to be updated as well)A new#204NoResidual
struct is used (internally) to be able to construct anEquationOfState
with only an ideal gas model, e.g.Arc
around the ideal gas part inEquationOfState
is removed. The correspondingArc
around the residual part is required exactly once for the "building" pattern forEquationOfState
in Python. I would prefer to also get rid of that, because it is unnecessary for Rust and conceptually not required at that point. That would require a different constructor forEquationOfState
in Python, though.#205PureRecord
,SegmentRecord
,Identifier
, andIdentifierOption
are added tofeos.ideal_gas
. This is related to a larger issue that there are multiplePureRecord
s andSegmentRecord
s in the Python package.Identifier
andIdentifierOption
could be exposed only once at a central location.The changes in 1. and 3. are breaking changes, but 2. is a nice quality of life improvement that could be published as patch. 4. more of a fix, but does not really solve the root of the problem.