diff --git a/feos-core/CHANGELOG.md b/feos-core/CHANGELOG.md index fb8cf0b4d..86f8916e4 100644 --- a/feos-core/CHANGELOG.md +++ b/feos-core/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased +### Added +- Added specific isochoric and isobaric heat capacities to the Python interface. [#223](https://github.com/feos-org/feos/pull/223)) ## [0.6.1] 2024-01-11 ### Fixed diff --git a/feos-core/src/python/state.rs b/feos-core/src/python/state.rs index 497191e00..133aac279 100644 --- a/feos-core/src/python/state.rs +++ b/feos-core/src/python/state.rs @@ -1066,6 +1066,38 @@ macro_rules! impl_state { PySINumber::from(self.0.specific_enthalpy(contributions)) } + /// Return mass specific isochoric heat capacity. + /// + /// Parameters + /// ---------- + /// contributions: Contributions, optional + /// the contributions of the Helmholtz energy. + /// Defaults to Contributions.Total. + /// + /// Returns + /// ------- + /// SINumber + #[pyo3(signature = (contributions=Contributions::Total), text_signature = "($self, contributions)")] + fn specific_isochoric_heat_capacity(&self, contributions: Contributions) -> PySINumber { + PySINumber::from(self.0.specific_isochoric_heat_capacity(contributions)) + } + + /// Return mass specific isobaric heat capacity. + /// + /// Parameters + /// ---------- + /// contributions: Contributions, optional + /// the contributions of the Helmholtz energy. + /// Defaults to Contributions.Total. + /// + /// Returns + /// ------- + /// SINumber + #[pyo3(signature = (contributions=Contributions::Total), text_signature = "($self, contributions)")] + fn specific_isobaric_heat_capacity(&self, contributions: Contributions) -> PySINumber { + PySINumber::from(self.0.specific_isobaric_heat_capacity(contributions)) + } + #[getter] fn get_total_moles(&self) -> PySINumber { PySINumber::from(self.0.total_moles)