Closed thoerbr closed 2 years ago
Great idea, @thoerbr. Indeed, it would be handy! I'm marking it as enhancement
and will bring it for discussion with others Reaktoro's devs.
However, I can't promise you that we will implement it in Reaktoro soon, unfortunately.
Dear @thoerbr ,
Something like state.props().phaseDensity("Aqueous")
(and also other similar methods) in a new version should be possible.
As to state.density()
implicitly meaning aqueous phase density, this would be against the general-purpose philosophy of Reaktoro, which can be used for chemical systems without water.
Best regards, Allan
Hi Allan,
that's fine for me. Great to hear.
Hi Thorsten, Reaktoro v2 has improved interface for this functionality. You may be interested in these two tutorials:
To get the density of a phase, you can do: props.phaseProps("Aqueous").density()
. These tutorials and the API reference for classes ChemicalProps and AqueousProps should be helpful to you.
It would be a handy addition being able to return the density of aqueous and solid phase components from the chemical state. So assuming that
state
is my ChemicalState, the following already works.state.phaseAmount("Calcite")
state.temperature()
Having something like this would be great:
state.phaseDensity("Calcite")
state.phaseDensity("Aqueous")
and maybe because aqueous density is most frequently needed:state.density() # also returns aqueous density
Why am I interested in this feature? When coupling Reaktoro for reactive transport, the transport-code might have a different fluid model (pressure / temperature dependent density) then Reaktoro has. Being able to inspect these differences would be helpful. Furthermore it would be a nice feature to use Reaktoro for calculating densities with the HKF-formalism.