Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions feos-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 32 additions & 0 deletions feos-core/src/python/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down