pub trait Parameter where
    Self: Sized
{ type Pure: Clone + DeserializeOwned + Default; type IdealGas: Clone + DeserializeOwned + Default; type Binary: Clone + DeserializeOwned + Default; fn from_records(
        pure_records: Vec<PureRecord<Self::Pure, Self::IdealGas>>,
        binary_records: Array2<Self::Binary>
    ) -> Self; fn records(
        &self
    ) -> (&[PureRecord<Self::Pure, Self::IdealGas>], &Array2<Self::Binary>); fn new_pure(pure_record: PureRecord<Self::Pure, Self::IdealGas>) -> Self { ... } fn new_binary(
        pure_records: Vec<PureRecord<Self::Pure, Self::IdealGas>>,
        binary_record: Option<Self::Binary>
    ) -> Self { ... } fn from_json<P>(
        substances: Vec<&str>,
        file_pure: P,
        file_binary: Option<P>,
        search_option: IdentifierOption
    ) -> Result<Self, ParameterError>
    where
        P: AsRef<Path>
, { ... } fn from_multiple_json<P>(
        input: &[(Vec<&str>, P)],
        file_binary: Option<P>,
        search_option: IdentifierOption
    ) -> Result<Self, ParameterError>
    where
        P: AsRef<Path>
, { ... } fn from_segments(
        chemical_records: Vec<ChemicalRecord>,
        segment_records: Vec<SegmentRecord<Self::Pure, Self::IdealGas>>,
        binary_segment_records: Option<Vec<BinaryRecord<String, Self::Binary>>>
    ) -> Result<Self, ParameterError>
    where
        Self::Pure: FromSegments,
        Self::IdealGas: FromSegments,
        Self::Binary: FromSegmentsBinary + Default
, { ... } fn from_json_segments<P>(
        substances: &[&str],
        file_pure: P,
        file_segments: P,
        file_binary: Option<P>,
        search_option: IdentifierOption
    ) -> Result<Self, ParameterError>
    where
        P: AsRef<Path>,
        Self::Pure: FromSegments,
        Self::IdealGas: FromSegments,
        Self::Binary: FromSegmentsBinary
, { ... } fn subset(&self, component_list: &[usize]) -> Self { ... } }
Expand description

Constructor methods for parameters.

By implementing Parameter for a type, you define how parameters of an equation of state can be constructed from a sequence of single substance records and possibly binary interaction parameters.

Associated Types

Required methods

Creates parameters from records for pure substances and possibly binary parameters.

Return the original pure and binary records that were used to construct the parameters.

Provided methods

Creates parameters for a pure component from a pure record.

Creates parameters for a binary system from pure records and an optional binary interaction parameter.

Creates parameters from substance information stored in json files.

Creates parameters from substance information stored in multiple json files.

Creates parameters from the molecular structure and segment information.

The FromSegments trait needs to be implemented for both the model record and the ideal gas record.

Creates parameters from segment information stored in json files.

The FromSegments trait needs to be implemented for both the model record and the ideal gas record.

Implementors