Crate feos

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};
use feos_core::{Contributions, State};
use quantity::KELVIN;
use nalgebra::dvector;

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

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

// Define thermodynamic conditions.
let critical_point = State::critical_point(&&saft, Some(&dvector![1.0]), 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§

core
Re-export of all functionalities in feos_core.
hard_sphere
Generic implementation of the hard-sphere contribution that can be used across models.
ideal_gas
Collection of ideal gas models.