-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathlib.rs
More file actions
84 lines (72 loc) · 2.06 KB
/
Copy pathlib.rs
File metadata and controls
84 lines (72 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//! FeOs - An open-source framework for equations of state and classical functional density theory.
//!
//! # Example: critical point of a pure substance using PC-SAFT
//!
#![cfg_attr(not(feature = "pcsaft"), doc = "```ignore")]
#![cfg_attr(feature = "pcsaft", doc = "```")]
//! # use feos_core::EosError;
//! use feos::pcsaft::{PcSaft, PcSaftParameters};
//! use feos_core::parameter::{IdentifierOption, Parameter};
//! use feos_core::{Contributions, State};
//! use feos_core::si::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);
//! # Ok::<(), EosError>(())
//! ```
#![warn(clippy::all)]
#![allow(clippy::too_many_arguments)]
use mimalloc::MiMalloc;
#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;
#[cfg(feature = "dft")]
mod functional;
#[cfg(feature = "dft")]
pub use functional::FunctionalVariant;
mod eos;
pub use eos::ResidualModel;
#[cfg(feature = "estimator")]
pub mod estimator;
#[cfg(feature = "association")]
pub mod association;
pub mod hard_sphere;
// models
#[cfg(feature = "gc_pcsaft")]
pub mod gc_pcsaft;
#[cfg(feature = "pcsaft")]
pub mod pcsaft;
#[cfg(feature = "pets")]
pub mod pets;
#[cfg(feature = "saftvrqmie")]
pub mod saftvrqmie;
#[cfg(feature = "uvtheory")]
pub mod uvtheory;
pub mod ideal_gas;
#[cfg(feature = "python")]
mod python;
pub mod core {
//! Re-export of all functionalities in [feos_core].
pub use feos_core::*;
}
#[cfg(feature = "dft")]
pub mod dft {
//! Re-export of all functionalities in [feos_dft].
pub use feos_dft::*;
}