Crate feos

Source
Expand description

FeOs - An open-source framework for equations of state and classical functional density theory.

§Example: critical point of a pure substance using PC-SAFT

use feos::pcsaft::{PcSaft, PcSaftParameters};
use feos_core::parameter::{IdentifierOption, Parameter};
use feos_core::{Contributions, State};
use quantity::KELVIN;
use std::sync::Arc;

// Read parameters from json file.
let parameters = PcSaftParameters::from_json(
    vec!["propane"],
    "tests/pcsaft/test_parameters.json",
    None,
    IdentifierOption::Name,
)?;

// Define equation of state.
let saft = Arc::new(PcSaft::new(Arc::new(parameters)));

// Define thermodynamic conditions.
let critical_point = State::critical_point(&saft, None, None, Default::default())?;

// Compute properties.
let p = critical_point.pressure(Contributions::Total);
let t = critical_point.temperature;
println!("Critical point: T={}, p={}.", t, p);

Modules§

association
Generic implementation of the SAFT association contribution that can be used across models.
core
Re-export of all functionalities in feos_core.
dft
Re-export of all functionalities in feos_dft.
epcsaft
Electrolyte Perturbed-Chain Statistical Associating Fluid Theory (ePC-SAFT)
estimator
Utilities for working with experimental data.
gc_pcsaft
Heterosegmented Group Contribution PC-SAFT
hard_sphere
Generic implementation of the hard-sphere contribution that can be used across models.
ideal_gas
Collection of ideal gas models.
pcsaft
Perturbed-Chain Statistical Associating Fluid Theory (PC-SAFT)
pets
Perturbed Truncated and Shifted (PeTS) equation of state
saftvrmie
Statistical Associating Fluid Theory for Variable Range interactions of the generic Mie form (SAFT-VR Mie)
saftvrqmie
SAFT-VRQ Mie equation of state.
uvtheory
uv-theory for fluids interacting with a Mie potential.

Enums§

FunctionalVariant
Collection of different HelmholtzEnergyFunctional implementations.
ResidualModel
Collection of different Residual implementations.