keyword
stringclasses
7 values
repo_name
stringlengths
8
98
file_path
stringlengths
4
244
file_extension
stringclasses
29 values
file_size
int64
0
84.1M
line_count
int64
0
1.6M
content
stringlengths
1
84.1M
language
stringclasses
14 values
3D
feos-org/feos
crates/feos/src/uvtheory/eos/wca/attractive_perturbation_uvb3.rs
.rs
14,774
438
use super::WeeksChandlerAndersen; use super::attractive_perturbation::one_fluid_properties; use super::hard_sphere::{ WCA_CONSTANTS_ETA_A_UVB3, WCA_CONSTANTS_ETA_B_UVB3, dimensionless_diameter_q_wca, }; use crate::uvtheory::parameters::*; use feos_core::StateHD; use nalgebra::DVector; use num_dual::DualNum; use std...
Rust
3D
feos-org/feos
crates/feos/src/uvtheory/eos/wca/attractive_perturbation.rs
.rs
16,309
474
use super::WeeksChandlerAndersen; use super::hard_sphere::dimensionless_diameter_q_wca; use crate::uvtheory::parameters::*; use feos_core::StateHD; use nalgebra::DVector; use num_dual::DualNum; use std::f64::consts::PI; const C_WCA: [[f64; 6]; 6] = [ [ -0.2622378162, 0.6585817423, 5.5318022...
Rust
3D
feos-org/feos
crates/feos/src/uvtheory/eos/wca/reference_perturbation.rs
.rs
3,727
100
use super::WeeksChandlerAndersen; use super::hard_sphere::{ dimensionless_diameter_q_wca, packing_fraction, packing_fraction_a, packing_fraction_b, }; use crate::uvtheory::parameters::*; use feos_core::StateHD; use num_dual::DualNum; use std::f64::consts::PI; #[derive(Debug, Clone)] pub(super) struct ReferencePert...
Rust
3D
feos-org/feos
crates/feos/src/uvtheory/eos/wca/reference_perturbation_uvb3.rs
.rs
3,604
93
use super::WeeksChandlerAndersen; use super::hard_sphere::{ dimensionless_diameter_q_wca, packing_fraction, packing_fraction_a_uvb3, packing_fraction_b_uvb3, }; use crate::uvtheory::parameters::*; use feos_core::StateHD; use num_dual::DualNum; use std::f64::consts::PI; #[derive(Debug, Clone)] pub(super) struct...
Rust
3D
feos-org/feos
crates/feos/src/ideal_gas/dippr.rs
.rs
11,206
299
use feos_core::parameter::Parameters; use feos_core::{FeosResult, IdealGas}; use nalgebra::DVector; use num_dual::DualNum; use quantity::{JOULE, KELVIN, KILO, MOL, MolarEntropy, Temperature}; use serde::{Deserialize, Serialize}; /// Parameters for DIPPR equations # 100, 107, and 127 for isobaric /// heat capacities of...
Rust
3D
feos-org/feos
crates/feos/src/ideal_gas/mod.rs
.rs
158
6
//! Collection of ideal gas models. mod dippr; mod joback; pub use dippr::{Dippr, DipprParameters}; pub use joback::{Joback, JobackParameters, JobackRecord};
Rust
3D
feos-org/feos
crates/feos/src/ideal_gas/joback.rs
.rs
13,930
423
//! Implementation of the ideal gas heat capacity (de Broglie wavelength) //! of [Joback and Reid, 1987](https://doi.org/10.1080/00986448708960487). use feos_core::parameter::{FromSegments, Parameters}; use feos_core::{FeosResult, IdealGas, ReferenceSystem}; use nalgebra::DVector; use num_dual::*; use quantity::{MolarE...
Rust
3D
feos-org/feos
crates/feos/src/estimator/estimator.rs
.rs
3,484
109
//! The [`Estimator`] struct can be used to store multiple [`DataSet`]s for convenient parameter //! optimization. use super::{DataSet, FeosError, Loss}; use feos_core::Residual; use ndarray::{Array1, ArrayView1, Axis, arr1, concatenate}; // use quantity::si::SIArray1; use std::fmt; use std::fmt::Display; use std::fmt:...
Rust
3D
feos-org/feos
crates/feos/src/estimator/mod.rs
.rs
1,051
40
//! Utilities for working with experimental data. use feos_core::{DensityInitialization, FeosError}; mod dataset; pub use dataset::DataSet; #[expect(clippy::module_inception)] mod estimator; pub use estimator::Estimator; mod loss; pub use loss::Loss; // Properties mod vapor_pressure; pub use vapor_pressure::VaporPress...
Rust
3D
feos-org/feos
crates/feos/src/estimator/dataset.rs
.rs
2,411
69
//! The [`DataSet`] trait provides routines that can be used for //! optimization of parameters of equations of state given //! a `target` which can be values from experimental data or //! other models. use super::Loss; use feos_core::{FeosError, Residual}; use ndarray::Array1; use std::fmt; /// Utilities for working ...
Rust
3D
feos-org/feos
crates/feos/src/estimator/thermal_conductivity.rs
.rs
2,519
80
use super::{DataSet, FeosError, Phase}; use feos_core::{DensityInitialization, EntropyScaling, ReferenceSystem, Residual, State}; use itertools::izip; use ndarray::{Array1, arr1}; use quantity::{self, KELVIN, METER, Moles, Pressure, Temperature, WATT}; /// Store experimental thermal conductivity data. #[derive(Clone)]...
Rust
3D
feos-org/feos
crates/feos/src/estimator/viscosity.rs
.rs
2,429
80
use super::{DataSet, FeosError, Phase}; use feos_core::{DensityInitialization, EntropyScaling, ReferenceSystem, Residual, State}; use itertools::izip; use ndarray::{Array1, arr1}; use quantity::{MILLI, Moles, PASCAL, Pressure, SECOND, Temperature}; /// Store experimental viscosity data. #[derive(Clone)] pub struct Vis...
Rust
3D
feos-org/feos
crates/feos/src/estimator/diffusion.rs
.rs
2,464
82
use super::{DataSet, FeosError, Phase}; use feos_core::{DensityInitialization, EntropyScaling, ReferenceSystem, Residual, State}; use itertools::izip; use ndarray::{Array1, arr1}; use quantity::{self, CENTI, METER, Moles, Pressure, SECOND, Temperature}; use typenum::P2; /// Store experimental diffusion data. #[derive(...
Rust
3D
feos-org/feos
crates/feos/src/estimator/vapor_pressure.rs
.rs
3,508
107
use super::{DataSet, FeosError}; use feos_core::{Contributions, PhaseEquilibrium, ReferenceSystem, Residual, SolverOptions, State}; use ndarray::{Array1, arr1}; use quantity::{PASCAL, Pressure, Temperature}; /// Store experimental vapor pressure data. #[derive(Clone)] pub struct VaporPressure { pub target: Array1<...
Rust
3D
feos-org/feos
crates/feos/src/estimator/pt_data.rs
.rs
171
10
use feos_core::StateVec; trait BulkPropertyCalculation { fn name(&self) -> String; fn calcualte(&self, states: StateVec) -> Array1<f64>; } pub struct PTData {}
Rust
3D
feos-org/feos
crates/feos/src/estimator/strategy.rs
.rs
135
5
use feos_core::{EquationOfState, IdealGas, Residual}; pub struct Strategy<R: Residual, I: IdealGas> { eos: EquationOfState<R, I> }
Rust
3D
feos-org/feos
crates/feos/src/estimator/binary_vle.rs
.rs
12,337
376
use super::{DataSet, FeosError, Phase}; use feos_core::{ Contributions, DensityInitialization, PhaseDiagram, PhaseEquilibrium, ReferenceSystem, Residual, State, TemperatureOrPressure, }; use itertools::izip; use ndarray::{Array1, ArrayView1, Axis, arr1, s}; use quantity::{_Dimensionless, MolarEnergy, Moles, PAS...
Rust
3D
feos-org/feos
crates/feos/src/estimator/loss.rs
.rs
2,253
72
use ndarray::Array1; /// Functions to apply to residuals for robust regression. /// /// These functions are applied to the resiudals as part of the `cost` function: /// $\text{cost}(r) = \sqrt{f^2 \rho(z)}$, /// where $r$ is the residual, $\rho$ is the loss function, /// $f$ is the scaling factor, and $z = \frac{r^2}{...
Rust
3D
feos-org/feos
crates/feos/src/estimator/impl_dataset.rs
.rs
10,165
332
/// Store experimental vapor pressure data and compare to the equation of state. #[derive(Clone)] pub struct VaporPressure { pub target: SIArray1, temperature: SIArray1, max_temperature: SINumber, datapoints: usize, std_parameters: Vec<f64>, } impl VaporPressure { /// Create a new vapor pressur...
Rust
3D
feos-org/feos
crates/feos/src/estimator/liquid_density.rs
.rs
4,420
155
use super::{DataSet, FeosError}; use feos_core::{ DensityInitialization, Molarweight, PhaseEquilibrium, ReferenceSystem, Residual, SolverOptions, State, }; use ndarray::{Array1, arr1}; use quantity::{KILOGRAM, METER, MassDensity, Moles, Pressure, Temperature}; use typenum::P3; /// Liquid mass density data as f...
Rust
3D
feos-org/feos
crates/feos/src/saftvrmie/mod.rs
.rs
354
9
//! Statistical Associating Fluid Theory for Variable Range interactions of the generic Mie form (SAFT-VR Mie) //! //! [Lafitte et al. (2013)](https://doi.org/10.1063/1.4819786) mod eos; pub(crate) mod parameters; pub use eos::{SaftVRMie, SaftVRMieOptions}; pub use parameters::{SaftVRMieBinaryRecord, SaftVRMieParamete...
Rust
3D
feos-org/feos
crates/feos/src/saftvrmie/parameters.rs
.rs
19,006
617
use crate::hard_sphere::{HardSphereProperties, MonomerShape}; use feos_core::parameter::{CombiningRule, Parameters, PureRecord}; use nalgebra::{DMatrix, DVector}; use num_dual::DualNum; use num_traits::Zero; use serde::{Deserialize, Serialize}; /// 10-point Gauss-Legendre quadrature [position, weight] const GLQ10: [[f...
Rust
3D
feos-org/feos
crates/feos/src/saftvrmie/eos/mod.rs
.rs
4,996
151
use super::parameters::{SaftVRMieAssociationRecord, SaftVRMieParameters, SaftVRMiePars}; use crate::association::{Association, AssociationStrength}; use crate::hard_sphere::{HardSphere, HardSphereProperties}; use feos_core::{Molarweight, ResidualDyn, StateHD, Subset}; use nalgebra::DVector; use num_dual::DualNum; use q...
Rust
3D
feos-org/feos
crates/feos/src/saftvrmie/eos/dispersion.rs
.rs
14,613
388
use crate::saftvrmie::parameters::SaftVRMiePars; use feos_core::StateHD; use nalgebra::{DMatrix, DVector}; use num_dual::{Dual, DualNum}; use num_traits::Zero; use std::f64::consts::{FRAC_PI_6, PI}; #[derive(Debug)] pub struct Properties<D> { /// Temperature dependent diameter diameter: DVector<D>, /// tot...
Rust
3D
feos-org/feos
crates/feos/benches/state_properties.rs
.rs
4,371
136
#![allow(clippy::type_complexity)] use criterion::{Criterion, criterion_group, criterion_main}; use feos::core::parameter::IdentifierOption; use feos::core::{Contributions, Residual, State}; use feos::pcsaft::{PcSaft, PcSaftParameters}; use nalgebra::{DVector, dvector}; use quantity::*; /// Evaluate a property of a st...
Rust
3D
feos-org/feos
crates/feos/benches/state_creation.rs
.rs
5,772
185
#![allow(clippy::type_complexity)] use criterion::{Criterion, criterion_group, criterion_main}; use feos::core::{ Contributions, DensityInitialization, PhaseEquilibrium, Residual, State, TemperatureOrPressure, parameter::IdentifierOption, }; use feos::pcsaft::{PcSaft, PcSaftParameters}; use nalgebra::DVector; u...
Rust
3D
feos-org/feos
crates/feos/benches/dual_numbers.rs
.rs
8,062
227
//! Benchmarks for the evaluation of the Helmholtz energy function //! for a given `StateHD` for different types of dual numbers. //! These should give an idea about the expected slow-down depending //! on the dual number type used without the overhead of the `State` //! creation. use criterion::{Criterion, criterion_g...
Rust
3D
feos-org/feos
crates/feos/benches/dft_pore.rs
.rs
4,373
133
//! Benchmarks for the calculation of density profiles //! in pores at different conditions. use criterion::{Criterion, criterion_group, criterion_main}; use feos::core::parameter::IdentifierOption; use feos::core::{PhaseEquilibrium, State, StateBuilder}; use feos::dft::adsorption::{ExternalPotential, Pore1D, PoreSpeci...
Rust
3D
feos-org/feos
crates/feos/benches/dual_numbers_saftvrmie.rs
.rs
6,598
175
//! Benchmarks for the evaluation of the Helmholtz energy function //! for a given `StateHD` for different types of dual numbers. //! These should give an idea about the expected slow-down depending //! on the dual number type used without the overhead of the `State` //! creation. use criterion::{Criterion, criterion_g...
Rust
3D
feos-org/feos
crates/feos/benches/contributions.rs
.rs
3,299
91
//! Benchmarks for the evaluation of the first derivative of the //! Helmholtz energy function for various binary mixtures. //! The mixtures contain fluids of different polarities that are //! modeled using additional Helmholtz energy contributions. //! It is supposed to demonstrate the expected reduction in //! perfor...
Rust
3D
feos-org/feos
crates/feos/tests/main.rs
.rs
129
7
#[cfg(feature = "gc_pcsaft")] mod gc_pcsaft; #[cfg(feature = "pcsaft")] mod pcsaft; #[cfg(feature = "saftvrmie")] mod saftvrmie;
Rust
3D
feos-org/feos
crates/feos/tests/gc_pcsaft/mod.rs
.rs
21
3
mod binary; mod dft;
Rust
3D
feos-org/feos
crates/feos/tests/gc_pcsaft/binary.rs
.rs
2,746
80
use approx::assert_relative_eq; #[cfg(feature = "dft")] use feos::gc_pcsaft::GcPcSaftFunctional; use feos::gc_pcsaft::{GcPcSaft, GcPcSaftParameters}; use feos_core::parameter::IdentifierOption; use feos_core::{Contributions, FeosResult, State}; use nalgebra::dvector; use quantity::{KELVIN, METER, MOL}; #[test] fn test...
Rust
3D
feos-org/feos
crates/feos/tests/gc_pcsaft/dft.rs
.rs
8,502
263
#![allow(clippy::excessive_precision)] #![cfg(feature = "dft")] use approx::assert_relative_eq; use feos::gc_pcsaft::{GcPcSaft, GcPcSaftFunctional, GcPcSaftParameters}; use feos_core::parameter::{ChemicalRecord, Identifier, IdentifierOption, SegmentRecord}; use feos_core::{PhaseEquilibrium, State, StateBuilder, Verbosi...
Rust
3D
feos-org/feos
crates/feos/tests/pcsaft/mod.rs
.rs
150
9
mod critical_point; mod dft; mod properties; mod stability_analysis; mod state_creation_mixture; mod state_creation_pure; mod tp_flash; mod vle_pure;
Rust
3D
feos-org/feos
crates/feos/tests/pcsaft/tp_flash.rs
.rs
2,063
66
use approx::assert_relative_eq; use feos::pcsaft::{PcSaft, PcSaftParameters}; use feos_core::parameter::IdentifierOption; use feos_core::{Contributions, FeosResult, PhaseEquilibrium, SolverOptions}; use nalgebra::dvector; use quantity::*; use std::error::Error; fn read_params(components: Vec<&str>) -> FeosResult<PcSaf...
Rust
3D
feos-org/feos
crates/feos/tests/pcsaft/state_creation_mixture.rs
.rs
4,391
138
use approx::assert_relative_eq; use feos::ideal_gas::{Joback, JobackParameters}; use feos::pcsaft::{PcSaft, PcSaftParameters}; use feos_core::parameter::IdentifierOption; use feos_core::{Contributions, EquationOfState, FeosResult, StateBuilder}; use nalgebra::dvector; use quantity::*; use std::error::Error; fn propane...
Rust
3D
feos-org/feos
crates/feos/tests/pcsaft/properties.rs
.rs
1,541
55
use approx::assert_relative_eq; use feos::pcsaft::{PcSaft, PcSaftParameters}; use feos_core::parameter::IdentifierOption; use feos_core::{Residual, StateBuilder}; use nalgebra::dvector; use quantity::*; use std::error::Error; #[test] fn test_dln_phi_dp() -> Result<(), Box<dyn Error>> { let params = PcSaftParameter...
Rust
3D
feos-org/feos
crates/feos/tests/pcsaft/dft.rs
.rs
13,894
368
#![allow(clippy::excessive_precision)] #![cfg(feature = "dft")] use approx::assert_relative_eq; use feos::hard_sphere::FMTVersion; use feos::ideal_gas::{Joback, JobackParameters}; use feos::pcsaft::{PcSaft, PcSaftFunctional, PcSaftParameters}; use feos_core::parameter::IdentifierOption; use feos_core::{Contributions, E...
Rust
3D
feos-org/feos
crates/feos/tests/pcsaft/vle_pure.rs
.rs
2,488
81
use approx::assert_relative_eq; use feos::pcsaft::{PcSaft, PcSaftParameters}; use feos_core::parameter::IdentifierOption; use feos_core::{Contributions, PhaseEquilibrium, SolverOptions}; use quantity::*; use std::error::Error; #[test] fn vle_pure_temperature() -> Result<(), Box<dyn Error>> { let params = PcSaftPar...
Rust
3D
feos-org/feos
crates/feos/tests/pcsaft/critical_point.rs
.rs
1,492
49
use approx::assert_relative_eq; use feos::pcsaft::{PcSaft, PcSaftParameters}; use feos_core::State; use feos_core::parameter::IdentifierOption; use nalgebra::dvector; use quantity::*; use std::error::Error; #[test] fn test_critical_point_pure() -> Result<(), Box<dyn Error>> { let params = PcSaftParameters::from_js...
Rust
3D
feos-org/feos
crates/feos/tests/pcsaft/stability_analysis.rs
.rs
1,529
52
use feos::pcsaft::{PcSaft, PcSaftParameters}; use feos_core::parameter::IdentifierOption; use feos_core::{DensityInitialization, PhaseEquilibrium, SolverOptions, State}; use nalgebra::dvector; use quantity::*; use std::error::Error; #[test] fn test_stability_analysis() -> Result<(), Box<dyn Error>> { let params = ...
Rust
3D
feos-org/feos
crates/feos/tests/pcsaft/state_creation_pure.rs
.rs
13,218
444
use approx::assert_relative_eq; use feos::ideal_gas::{Joback, JobackParameters}; use feos::pcsaft::{PcSaft, PcSaftParameters}; use feos_core::parameter::IdentifierOption; use feos_core::{ Contributions, EquationOfState, FeosResult, PhaseEquilibrium, State, StateBuilder, Total, }; use quantity::*; use std::error::Er...
Rust
3D
feos-org/feos
crates/feos/tests/saftvrmie/mod.rs
.rs
25
2
mod critical_properties;
Rust
3D
feos-org/feos
crates/feos/tests/saftvrmie/critical_properties.rs
.rs
3,184
65
use approx::assert_relative_eq; use feos::saftvrmie::{SaftVRMie, test_utils}; use feos_core::{SolverOptions, State}; use quantity::*; use std::collections::HashMap; /// Critical data reported in Lafitte et al. pub fn critical_data() -> HashMap<&'static str, (Temperature, Pressure, MassDensity)> { let mut data = Ha...
Rust
3D
feos-org/feos
examples/pc_saft_phase_diagram_to_dict.ipynb
.ipynb
256,739
716
{ "cells": [ { "cell_type": "markdown", "id": "fa749966-5842-432a-8760-5d98ac6b0671", "metadata": {}, "source": [ "# The `to_dict` method for `PhaseDiagram` and `StateVec` objects\n", "\n", "The `to_dict` method returns a Python dictionary containing a selection of properties.\n", "It can...
Unknown
3D
feos-org/feos
examples/pcsaft_phase_diagram.ipynb
.ipynb
159,340
584
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Pure substance phase diagrams\n", "\n", "## Goal of this notebook\n", "\n", "- Learn how to generate and work with phase diagrams.\n", "- Learn what `PhaseEquilibrium` objects are and how to use them." ] }, ...
Unknown
3D
feos-org/feos
examples/pcsaft_entropy_scaling.ipynb
.ipynb
103,392
636
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Entropy scaling of pure substances\n", "\n", "## Goal\n", "\n", "- Learn how to compute dynamic properties (viscosity in this example)\n", "- Compare substance specific parameters against homo-segmented group cont...
Unknown
3D
feos-org/feos
examples/core_working_with_units.ipynb
.ipynb
15,904
533
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Working with SI-units\n", "\n", "## Goal\n", "\n", "> Learn how to work with `SINumber` and `SIArray` objects which represent physical quantities, i.e. one or more floating point numbers with an associated unit.\n", ...
Unknown
3D
feos-org/feos
examples/core_dual_numbers.ipynb
.ipynb
21,918
486
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# On Dual Numbers in `FeOs`\n", "\n", "In `FeOs`, we use [generalized dual numbers](https://www.frontiersin.org/articles/10.3389/fceng.2021.758090/full) to compute partial derivatives of the Helmholtz energy.\n", "In this n...
Unknown
3D
feos-org/feos
examples/pets_eos_binary_caseI.ipynb
.ipynb
187,283
286
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# PeTS Equation of State - Binary Mixture (Pseudo Pure Fluid)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Original publication of the _perturbation theory for truncated and shifted Lennard-Jones fl...
Unknown
3D
feos-org/feos
examples/pcsaft_surface_tension.ipynb
.ipynb
173,492
672
{ "cells": [ { "cell_type": "markdown", "id": "135dd79e", "metadata": {}, "source": [ "# Surface tension using PC-SAFT Helmholtz energy functionals\n", "\n", "## Goal of this notebook\n", "\n", "- Learn how to compute the surface tension for a planar interface using the PC-SAFT functi...
Unknown
3D
feos-org/feos
examples/lj_models.ipynb
.ipynb
278,305
783
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Comparison of equations of state for model fluids\n", "\n", "In this notebook, we take a look at various model fluid equations of state and compare them.\n", "These EoS are:\n", "\n", "- The PeTS equation of state...
Unknown
3D
feos-org/feos
examples/core_user_defined_eos.ipynb
.ipynb
295,487
1,280
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Implementing an equation of state in python\n", "\n", "> In `FeOs`, you can implement your equation of state in python, register it to the Rust backend, and compute properties and phase equilbria as if you implemented it in R...
Unknown
3D
feos-org/feos
examples/pcsaft_working_with_parameters.ipynb
.ipynb
43,095
1,328
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Working with parameters\n", "\n", "## Goal\n", "\n", "- Read in parameters for pure substances and mixtures from json files, and\n", "- create parameters for pure substances and mixtures within Python.\n", "- ...
Unknown
3D
feos-org/feos
examples/gc_pcsaft_functional.ipynb
.ipynb
225,374
210
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# The (heterosegmented) group contribution PC-SAFT functional\n", "In segment-based Helmholtz energy functionals like the one corresponding to the heterosegmented gc PC-SAFT equation of state, the spatial distribution of individual...
Unknown
3D
feos-org/feos
examples/saftvrqmie/hydrogen_deuterium_binary.ipynb
.ipynb
100,758
366
{ "cells": [ { "cell_type": "markdown", "id": "d29be20b-79b2-48a0-a333-c1af140b3287", "metadata": {}, "source": [ "# Surface tension calculations using DFT for Deuterium-Hydrogen mixtures\n", "Classical density functional theory for interfacial properties of hydrogen, helium, deuterium, neon and ...
Unknown
3D
feos-org/feos
examples/saftvrqmie/hydrogen_neon_binary.ipynb
.ipynb
105,664
396
{ "cells": [ { "cell_type": "markdown", "id": "01dcbd2f-39fb-4d59-a7e7-5b113098ab53", "metadata": {}, "source": [ "# Surface tension calculations using DFT for Hydrogen-Neon mixtures\n", "Classical density functional theory for interfacial properties of hydrogen, helium, deuterium, neon and their...
Unknown
3D
feos-org/feos
examples/saftvrqmie/hydrogen_fh1_vs_fh2.ipynb
.ipynb
37,453
187
{ "cells": [ { "cell_type": "markdown", "id": "06b263a1-b920-4b97-9bdf-238a87893e92", "metadata": {}, "source": [ "# Surface tension calculations using DFT for Hydrogen\n", "Comparing Feynman-Hibbs corrections to first and second order" ] }, { "cell_type": "code", "execution_count": ...
Unknown
3D
feos-org/feos
examples/saftvrqmie/quantum_fluid_dft.ipynb
.ipynb
33,524
291
{ "cells": [ { "cell_type": "markdown", "id": "06b263a1-b920-4b97-9bdf-238a87893e92", "metadata": {}, "source": [ "# Surface tension calculations using DFT for fluids experiencing quantum effects \n", "Classical density functional theory for interfacial properties of hydrogen, helium, deuterium, ...
Unknown
3D
feos-org/feos
examples/saftvrqmie/radial_distribution_function.ipynb
.ipynb
143,597
628
{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "66146e02-48f2-4b2d-b2e3-50bda5cf345f", "metadata": {}, "outputs": [], "source": [ "from feos import *\n", "from feos.dft import *\n", "from feos.saftvrqmie import *\n", "\n", "import si_units as si\n", "import ...
Unknown
3D
feos-org/feos
examples/saftvrqmie/deuterium_helium_binary.ipynb
.ipynb
123,588
492
{ "cells": [ { "cell_type": "markdown", "id": "535e17ea-fe17-47c0-9b56-358f3f5541fa", "metadata": {}, "source": [ "# Surface tension calculations using DFT for Helium-Deuterium mixtures\n", "Classical density functional theory for interfacial properties of hydrogen, helium, deuterium, neon and th...
Unknown
3D
feos-org/feos
examples/saftvrqmie/hydrogen_helium_binary.ipynb
.ipynb
113,541
494
{ "cells": [ { "cell_type": "markdown", "id": "0b894b1b-ea24-4039-9aea-b034f01c8da2", "metadata": {}, "source": [ "# Surface tension calculations using DFT for Helium-Para-Hydrogen mixtures\n", "Classical density functional theory for interfacial properties of hydrogen, helium, deuterium, neon an...
Unknown
3D
feos-org/feos
examples/pcsaft/PhaseDiagramBinary.ipynb
.ipynb
470,176
431
{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from feos.eos import *\n", "from feos import *\n", "\n", "import si_units as si\n", "import matplotlib.pyplot as plt\n", "import numpy as np" ] }, { "cell_type": "mar...
Unknown
3D
feos-org/feos
examples/pcsaft/pore_geometry.ipynb
.ipynb
81,371
178
{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from feos.dft import *\n", "from feos.pcsaft import PcSaftParameters\n", "\n", "import si_units as si\n", "import matplotlib.pyplot as plt\n", "import numpy as np" ] }, ...
Unknown
3D
feos-org/feos
examples/pcsaft/fea_adsorption.ipynb
.ipynb
66,212
231
{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from feos.dft import ExternalPotential, HelmholtzEnergyFunctional, Adsorption1D, Geometry, Pore1D, State\n", "from feos.pcsaft import PcSaftParameters\n", "from si_units import ANGSTROM, K...
Unknown
3D
feos-org/feos
examples/pcsaft/Entropy Scaling.ipynb
.ipynb
68,563
612
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Entropy scaling of pure substances\n", "\n", "## Goal\n", "\n", "- Learn how to compute dynamic properties (viscosity in this example)\n", "- Compare substance specific parameters against homo-segmented group cont...
Unknown
3D
feos-org/feos
examples/pcsaft/adsorption_isotherms.ipynb
.ipynb
423,308
626
{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from feos.dft import *\n", "from feos import StateVec, PhaseEquilibrium, State\n", "from feos.parameters import Parameters\n", "\n", "import matplotlib.pyplot as plt\n", "impor...
Unknown
3D
feos-org/feos
examples/pcsaft/parameter_adjustment/adjust_viscosity_correlation.ipynb
.ipynb
42,906
364
{ "cells": [ { "cell_type": "markdown", "id": "d2e9adfb-9962-40f7-8265-4861621e757e", "metadata": {}, "source": [ "# Adjusting correlation parameters for entropy scaling of viscosity" ] }, { "cell_type": "markdown", "id": "4b54ad7f-d2ee-478c-8dd3-aebb2addec81", "metadata": {}, "sou...
Unknown
3D
feos-org/feos
examples/pcsaft/parameter_adjustment/adjust_kij.ipynb
.ipynb
171,306
634
{ "cells": [ { "cell_type": "markdown", "id": "2a6eb367-6205-4244-a6cd-da994342e3d5", "metadata": {}, "source": [ "# Adjusting PC-SAFT binary $k_{ij}$ parameter " ] }, { "cell_type": "markdown", "id": "eb4e4769-2ea1-4241-a64f-742cd9147b82", "metadata": {}, "source": [ "## Goal\...
Unknown
3D
feos-org/feos
examples/pcsaft/parameter_adjustment/adjust_non_polar_non_asssociating.ipynb
.ipynb
86,914
435
{ "cells": [ { "cell_type": "markdown", "id": "d2e9adfb-9962-40f7-8265-4861621e757e", "metadata": {}, "source": [ "# Adjusting PC-SAFT parameters for a non-associating, non-polar substance" ] }, { "cell_type": "markdown", "id": "4b54ad7f-d2ee-478c-8dd3-aebb2addec81", "metadata": {}, ...
Unknown
3D
feos-org/feos
examples/saftvrmie/validate_lafitte.ipynb
.ipynb
552,836
1,012
{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "6150a26e-767d-4735-ba5a-ee097684c917", "metadata": {}, "outputs": [], "source": [ "from feos import *\n", "from feos.parameters import *\n", "\n", "import si_units as si\n", "import numpy as np\n", "import pand...
Unknown
3D
feos-org/feos
docs/rust_api.md
.md
236
9
# API The documentation for the Rust crates is hosted on `docs.rs`. - [`feos-core`](https://docs.rs/feos-core/latest/feos_core/) - [`feos-dft`](https://docs.rs/feos-dft/latest/feos_dft/) - [`feos`](https://docs.rs/feos/latest/feos/)
Markdown
3D
feos-org/feos
docs/installation.md
.md
1,398
44
# Installation `````{tab-set} ````{tab-item} Python {math}`\text{FeO}_\text{s}` is available on `PyPI`. You can install it using `pip`: ``` pip install feos ``` If you have a Rust compiler installed and want to have the latest development version (github `main` branch), you can build and install the python wheel via...
Markdown
3D
feos-org/feos
docs/index.md
.md
3,395
144
--- hide-toc: true --- # Welcome to {math}`\text{FeO}_\text{s}` {math}`\text{FeO}_\text{s}` is a **framework** for **thermodynamic equations of state** (EoS) and **classical density functional theory** (DFT). It is written in **Rust** with a **Python** interface. ## Usage `````{tab-set} ````{tab-item} Python ```pyt...
Markdown
3D
feos-org/feos
docs/help_and_feedback.md
.md
214
6
# Help & Feedback If you have feedback or need help, don't hesitate to contact us. - Open an [issue](https://github.com/feos-org/feos/issues) on github. - Join our [discord server](https://discord.gg/Wxfh7JUnWh).
Markdown
3D
feos-org/feos
docs/conf.py
.py
1,146
47
import os import sys import feos sys.path.append(os.path.abspath(os.path.join(__file__, "../.."))) sys.path.insert(0, os.path.abspath('.')) # -- Project information ----------------------------------------------------- project = 'feos' copyright = '2022, Gernot Bauer, Philipp Rehner' author = 'Gernot Bauer, Philipp...
Python
3D
feos-org/feos
docs/rustguide/index.md
.md
3,611
65
# Guide Welcome to the {math}`\text{FeO}_\text{s}` Rust guide. On the following pages we discuss the structure of the {math}`\text{FeO}_\text{s}` project and how to use, compile and extend it. ## Introduction {math}`\text{FeO}_\text{s}` is primarily developed on Linux but it is tested and runs on Linux, macOS and Wi...
Markdown
3D
feos-org/feos
docs/rustguide/core/index.md
.md
1,383
37
# `feos-core` In this section, we discuss the `feos-core` crate. We will learn how equations of state are abstracted using traits, how generalized (hyper-) dual numbers are utilized and how thermodynamic states and phase equilibria are defined. ## Setup To setup your workspace, [fork](https://docs.github.com/en/get-...
Markdown
3D
feos-org/feos
docs/tutorials/index.md
.md
271
12
# Tutorials You can find each of the tutorials below as jupyter notebook in the github repository in the [`examples` folder](https://github.com/feos-org/feos/tree/main/examples). ```{eval-rst} .. toctree:: :maxdepth: 2 utility/index eos/index dft/index ```
Markdown
3D
feos-org/feos
docs/tutorials/eos/pcsaft_phase_diagram.ipynb
.ipynb
159,346
584
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Pure substance phase diagrams\n", "\n", "## Goal of this notebook\n", "\n", "- Learn how to generate and work with phase diagrams.\n", "- Learn what `PhaseEquilibrium` objects are and how to use them." ] }, ...
Unknown
3D
feos-org/feos
docs/tutorials/eos/pcsaft_entropy_scaling.ipynb
.ipynb
103,404
636
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Entropy scaling of pure substances\n", "\n", "## Goal\n", "\n", "- Learn how to compute dynamic properties (viscosity in this example)\n", "- Compare substance specific parameters against homo-segmented group cont...
Unknown
3D
feos-org/feos
docs/tutorials/eos/index.md
.md
179
12
# Equations of state ```{eval-rst} .. toctree:: :maxdepth: 1 pcsaft_working_with_parameters pcsaft_phase_diagram pcsaft_entropy_scaling core_user_defined_eos ```
Markdown
3D
feos-org/feos
docs/tutorials/eos/core_user_defined_eos.ipynb
.ipynb
295,505
1,280
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Implementing an equation of state in python\n", "\n", "> In `FeOs`, you can implement your equation of state in python, register it to the Rust backend, and compute properties and phase equilbria as if you implemented it in R...
Unknown
3D
feos-org/feos
docs/tutorials/eos/pcsaft_working_with_parameters.ipynb
.ipynb
43,658
1,344
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Working with parameters\n", "\n", "## Goal\n", "\n", "- Read in parameters for pure substances and mixtures from json files, and\n", "- create parameters for pure substances and mixtures within Python.\n", "- ...
Unknown
3D
feos-org/feos
docs/tutorials/utility/core_working_with_units.ipynb
.ipynb
15,904
533
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Working with SI-units\n", "\n", "## Goal\n", "\n", "> Learn how to work with `SINumber` and `SIArray` objects which represent physical quantities, i.e. one or more floating point numbers with an associated unit.\n", ...
Unknown
3D
feos-org/feos
docs/tutorials/utility/core_dual_numbers.ipynb
.ipynb
21,918
486
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# On Dual Numbers in `FeOs`\n", "\n", "In `FeOs`, we use [generalized dual numbers](https://www.frontiersin.org/articles/10.3389/fceng.2021.758090/full) to compute partial derivatives of the Helmholtz energy.\n", "In this n...
Unknown
3D
feos-org/feos
docs/tutorials/utility/index.md
.md
109
12
# Utility ```{eval-rst} .. toctree:: :maxdepth: 1 core_working_with_units core_dual_numbers ```
Markdown
3D
feos-org/feos
docs/tutorials/dft/index.md
.md
103
9
# Density functional theory ```{eval-rst} .. toctree:: :maxdepth: 1 pcsaft_surface_tension ```
Markdown
3D
feos-org/feos
docs/tutorials/dft/pcsaft_surface_tension.ipynb
.ipynb
173,518
672
{ "cells": [ { "cell_type": "markdown", "id": "135dd79e", "metadata": {}, "source": [ "# Surface tension using PC-SAFT Helmholtz energy functionals\n", "\n", "## Goal of this notebook\n", "\n", "- Learn how to compute the surface tension for a planar interface using the PC-SAFT functi...
Unknown
3D
feos-org/feos
docs/api/eos.md
.md
1,954
94
# Equations of state The key data structure in FeOs is the `EquationOfState` class that contains all implemented equations of state. The `State` and `PhaseEquilibrium` objects are used to define thermodynamic conditions and -- once created -- can be used to compute properties. ## The `EquationOfState` class ### Resi...
Markdown
3D
feos-org/feos
docs/api/ad.md
.md
3,570
80
# Automatic differentiation Automatic differentiation (AD) is used all throughout FeOs to calculate Helmholtz energy derivatives and Jacobians/Hessians for numerical solvers. This section refers specifically to automatic (implicit) differentiation of phase equilibria with respect to model parameters that are crucial f...
Markdown
3D
feos-org/feos
docs/api/dft.md
.md
1,047
71
# Classical density functional theory ## The `HelmholtzEnergyFunctional` class Implementations of Helmholtz energy functionals for DFT. ```{eval-rst} .. currentmodule:: feos .. autosummary:: :toctree: generated/ HelmholtzEnergyFunctional ``` ```{eval-rst} .. currentmodule:: feos .. autosummary:: Hel...
Markdown
3D
feos-org/feos
docs/api/index.md
.md
196
13
# API All functions and classes in FeOS are exported at the package root. Here, they are grouped by application: ```{eval-rst} .. toctree:: :maxdepth: 2 parameters eos dft ad ```
Markdown
3D
feos-org/feos
docs/api/parameters.md
.md
1,119
55
# Parameter handling In FeOs parameters can be read from JSON files or created manually by combining pure-component parameters and binary interaction parameters. ## `Parameters` and `GcParameters` The core data types for parameter handling in FeOs are `Parameters` for regular component-specific parameters and `GcPar...
Markdown
3D
feos-org/feos
docs/recipes/recipes_critical_point_pure.ipynb
.ipynb
1,587
77
{ "cells": [ { "cell_type": "markdown", "id": "2f323a90-1e4f-4a27-a495-38dbf8dad3e3", "metadata": {}, "source": [ "# Critical point of a pure substance " ] }, { "cell_type": "code", "execution_count": 1, "id": "06f40029-24e4-4f91-b502-6b9265818ed8", "metadata": {}, "outputs": []...
Unknown
3D
feos-org/feos
docs/recipes/recipes_phase_equilibrium_pure.ipynb
.ipynb
2,463
109
{ "cells": [ { "cell_type": "markdown", "id": "2f323a90-1e4f-4a27-a495-38dbf8dad3e3", "metadata": {}, "source": [ "# Phase equilibrium of a pure substance " ] }, { "cell_type": "code", "execution_count": 1, "id": "06f40029-24e4-4f91-b502-6b9265818ed8", "metadata": {}, "outputs":...
Unknown
3D
feos-org/feos
docs/recipes/recipes_p_sat_t_boil.ipynb
.ipynb
2,100
97
{ "cells": [ { "cell_type": "markdown", "id": "2f323a90-1e4f-4a27-a495-38dbf8dad3e3", "metadata": {}, "source": [ "# Vapor pressure and boiling temperature of a pure substance " ] }, { "cell_type": "code", "execution_count": 1, "id": "06f40029-24e4-4f91-b502-6b9265818ed8", "metadat...
Unknown
3D
feos-org/feos
docs/recipes/recipes_surface_tension_diagram_pure.ipynb
.ipynb
37,580
124
{ "cells": [ { "cell_type": "markdown", "id": "2f323a90-1e4f-4a27-a495-38dbf8dad3e3", "metadata": {}, "source": [ "# Surface tension diagram of a pure substance" ] }, { "cell_type": "code", "execution_count": 1, "id": "ef5e5353-7984-4a37-8035-20809c876817", "metadata": {}, "outp...
Unknown
3D
feos-org/feos
docs/recipes/index.md
.md
554
28
# Recipes This section contains short code snippets for specific, commonly used tasks. If you are looking for tutorials with explanations, see the [tutorials](/tutorials/index). ## Critical points and phase equilibria ```{eval-rst} .. toctree:: :maxdepth: 1 recipes_critical_point_pure recipes_p_sat_t_boil ...
Markdown