feos

FeOs - A Framework for Equations of State and Classical Density Functional Theory

https://github.com/feos-org/feos

Science Score: 77.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: acs.org
  • Committers with academic emails
    1 of 9 committers (11.1%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.9%) to scientific vocabulary

Keywords

chemical-engineering density-functional-theory equation-of-state physics python rust thermodynamic-properties thermodynamics thermodynamics-models
Last synced: 6 months ago · JSON representation ·

Repository

FeOs - A Framework for Equations of State and Classical Density Functional Theory

Basic Info
  • Host: GitHub
  • Owner: feos-org
  • License: apache-2.0
  • Language: Rust
  • Default Branch: main
  • Homepage:
  • Size: 82.6 MB
Statistics
  • Stars: 157
  • Watchers: 7
  • Forks: 30
  • Open Issues: 27
  • Releases: 17
Topics
chemical-engineering density-functional-theory equation-of-state physics python rust thermodynamic-properties thermodynamics thermodynamics-models
Created over 4 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Citation

README.md

FeOs - A Framework for Equations of State and Classical Density Functional Theory

crate documentation documentation repository

The FeOs package provides Rust implementations of different equation of state and Helmholtz energy functional models and corresponding Python bindings.

```python from feos.eos import EquationOfState, State from feos.pcsaft import PcSaftParameters, PcSaftRecord

PC-SAFT parameters for methanol (Gross and Sadowski 2002)

record = PcSaftRecord(1.5255, 3.23, 188.9, kappaab=0.035176, epsilonk_ab=2899.5, na=1, nb=1)

Build an equation of state

parameters = PcSaftParameters.frommodelrecords([record]) eos = EquationOfState.pcsaft(parameters)

Define thermodynamic conditions

criticalpoint = State.criticalpoint(eos)

Compute properties

p = criticalpoint.pressure() t = criticalpoint.temperature print(f'Critical point for methanol: T={t}, p={p}.') terminal Critical point for methanol: T=531.5 K, p=10.7 MPa. ```

Models

The following models are currently published as part of the FeOs framework

|name|description|eos|dft| |-|-|:-:|:-:| |pcsaft|perturbed-chain (polar) statistical associating fluid theory|✓|✓| |epcsaft|electrolyte PC-SAFT|✓|| |gc-pcsaft|(heterosegmented) group contribution PC-SAFT|✓|✓| |pets|perturbed truncated and shifted Lennard-Jones mixtures|✓|✓| |uvtheory|equation of state for Mie fluids and mixtures|✓|| |saftvrqmie|equation of state for quantum fluids and mixtures|✓|✓| |saftvrmie|statistical associating fluid theory for variable range interactions of Mie form|✓||

The list is being expanded continuously. Currently under development are implementations of Helmholtz energy functionals for the UV theory and for SAFT-VR Mie.

Other public repositories that implement models within the FeOs framework, but are currently not part of the feos Python package, are

|name|description|eos|dft| |-|-|:-:|:-:| |feos-fused-chains|heterosegmented fused-sphere chain functional||✓|

Parameters

In addition to the source code for the Rust and Python packages, this repository contains JSON files with previously published parameters for the different models including group contribution methods. The parameter files can be read directly from Rust or Python.

Properties and phase equilibria

The crate makes use of generalized (hyper-) dual numbers to generically calculate exact partial derivatives from Helmholtz energy equations of state. The derivatives are used to calculate - equilibrium properties (pressure, heat capacity, fugacity, and many more), - transport properties (viscosity, thermal conductivity, diffusion coefficients) using the entropy scaling approach - critical points and phase equilibria for pure components and mixtures.

In addition to that, utilities are provided to assist in the handling of parameters for both molecular equations of state and (homosegmented) group contribution methods and for the generation of phase diagrams for pure components and binary mixtures.

Classical density functional theory

FeOs uses efficient numerical methods to calculate density profiles in inhomogeneous systems. Highlights include: - Fast calculation of convolution integrals in cartesian (1D, 2D and 3D), polar, cylindrical, and spherical coordinate systems using FFT and related algorithms. - Automatic calculation of partial derivatives of Helmholtz energy densities (including temperature derivatives) using automatic differentiation with generalized (hyper-) dual numbers. - Modeling of heterosegmented molecules, including branched molecules. - Functionalities for calculating surface tensions, adsorption isotherms, pair correlation functions, and solvation free energies.

Cargo features

Without additional features activated, the command cargo test --release will only build and test the core functionalities of the crate. To run unit and integration tests for specific models, run cargo test --release --features pcsaft to test, e.g., the implementation of PC-SAFT or cargo test --release --features all_models to run tests on all implemented models.

Python package

FeOs uses the PyO3 framework to provide Python bindings. The Python package can be installed via pip and runs on Windows, Linux and macOS:

pip install feos

If there is no compiled package for your system available from PyPI and you have a Rust compiler installed, you can instead build the python package from source using

pip install git+https://github.com/feos-org/feos

This command builds the package without link-time optimization (LTO) that can be used to increase the performance further. See the Building from source section for information about building the wheel including LTO.

Building from source

To compile the code you need the Rust compiler and maturin (>=0.13,<0.14) installed. To install the package directly into the active environment (virtualenv or conda), use

maturin develop --release

which uses the python and all_models feature as specified in the pyproject.toml file.

Alternatively, you can specify the models or features that you want to include in the python package explicitly, e.g.

maturin develop --release --features "python pcsaft dft"

for the PC-SAFT equation of state and Helmholtz energy functional.

To build wheels including link-time optimization (LTO), use

maturin build --profile="release-lto"

which will use the python and all_models features specified in the pyproject.toml file. Use the following command to build a wheel with specific features:

maturin build --profile="release-lto" --features "python ..."

LTO increases compile times measurably but the resulting wheel is more performant and has a smaller size. For development however, we recommend using the --release flag.

Documentation

For a documentation of the Python API, Python examples, and a guide to the underlying Rust framework check out the documentation.

Benchmarks

Check out the benches directory for information about provided Rust benchmarks and how to run them.

Developers

This software is currently maintained by members of the groups of - Prof. Joachim Gross, Institute of Thermodynamics and Thermal Process Engineering (ITT), University of Stuttgart - Prof. André Bardow, Energy and Process Systems Engineering (EPSE), ETH Zurich

Contributing

FeOs grew from the need to maintain a common codebase used within the scientific work done in our groups. We share the code publicly as a platform to publish our own research but also encourage other researchers and developers to contribute their own models or implementations of existing equations of state.

If you want to contribute to FeOs, there are several ways to go: improving the documentation and helping with language issues, testing the code on your systems to find bugs, adding new models or algorithms, or providing feature requests. Feel free to message us if you have questions or open an issue to discuss improvements.

Cite us

If you find FeOs useful for your own scientific studies, consider citing our publication accompanying this library.

@article{rehner2023feos, author = {Rehner, Philipp and Bauer, Gernot and Gross, Joachim}, title = {FeOs: An Open-Source Framework for Equations of State and Classical Density Functional Theory}, journal = {Industrial \& Engineering Chemistry Research}, volume = {62}, number = {12}, pages = {5347-5357}, year = {2023}, }

Owner

  • Name: FeOs - Framework for Equations of State
  • Login: feos-org
  • Kind: organization
  • Location: Germany

Citation (CITATION.bib)

@article{rehner2023feos,
  author = {Rehner, Philipp and Bauer, Gernot and Gross, Joachim},
  title = {FeOs: An Open-Source Framework for Equations of State and Classical Density Functional Theory},
  journal = {Industrial \& Engineering Chemistry Research},
  volume = {62},
  number = {12},
  pages = {5347-5357},
  year = {2023},
  doi = {10.1021/acs.iecr.2c04561},
  URL = {https://doi.org/10.1021/acs.iecr.2c04561},
  eprint = {https://doi.org/10.1021/acs.iecr.2c04561}
}

GitHub Events

Total
  • Create event: 22
  • Release event: 4
  • Issues event: 17
  • Watch event: 33
  • Delete event: 21
  • Issue comment event: 35
  • Push event: 125
  • Pull request review comment event: 2
  • Pull request review event: 14
  • Pull request event: 41
  • Fork event: 5
Last Year
  • Create event: 22
  • Release event: 4
  • Issues event: 17
  • Watch event: 33
  • Delete event: 21
  • Issue comment event: 35
  • Push event: 125
  • Pull request review comment event: 2
  • Pull request review event: 14
  • Pull request event: 41
  • Fork event: 5

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 194
  • Total Committers: 9
  • Avg Commits per committer: 21.556
  • Development Distribution Score (DDS): 0.335
Past Year
  • Commits: 24
  • Committers: 3
  • Avg Commits per committer: 8.0
  • Development Distribution Score (DDS): 0.167
Top Committers
Name Email Commits
Philipp Rehner 6****r 129
Gernot Bauer B****r@i****e 51
Rolf Stierle R****e 5
Morten Hammer h****n@g****m 3
Lisa Rueben 7****i 2
bbbursik 9****k 1
anreimer 9****r 1
Johanna Sörngård 4****d 1
Andrés Riedemann 3****0 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 80
  • Total pull requests: 188
  • Average time to close issues: 4 months
  • Average time to close pull requests: 23 days
  • Total issue authors: 20
  • Total pull request authors: 10
  • Average comments per issue: 2.19
  • Average comments per pull request: 0.26
  • Merged pull requests: 159
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 9
  • Pull requests: 46
  • Average time to close issues: 27 days
  • Average time to close pull requests: 7 days
  • Issue authors: 5
  • Pull request authors: 4
  • Average comments per issue: 0.56
  • Average comments per pull request: 0.35
  • Merged pull requests: 36
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • g-bauer (26)
  • prehner (16)
  • ianhbell (6)
  • iurisegtovich (4)
  • RayleighSun (3)
  • marcosfelt (3)
  • LoGaL93 (3)
  • RolfStierle (3)
  • anto-maz (2)
  • ErichMace (2)
  • DiegoTMelfi (2)
  • fcyu0512 (2)
  • WarthogARJ (1)
  • longemen3000 (1)
  • juanimila (1)
Pull Request Authors
  • prehner (122)
  • g-bauer (41)
  • RolfStierle (7)
  • lruebli (4)
  • JelleLagerweij (4)
  • morteham (3)
  • anreimer (2)
  • JSorngard (2)
  • longemen3000 (2)
  • bbbursik (1)
Top Labels
Issue Labels
enhancement (16) documentation (10) bug (9) core (6) python (5) DFT (5) help wanted (3) pcsaft (2) wontfix (1)
Pull Request Labels
DFT (15) core (14) enhancement (9) documentation (9) python (7) pcsaft (5) breaking (5) gc-pcsaft (4) bug (4) wontfix (2)

Packages

  • Total packages: 5
  • Total downloads:
    • cargo 71,288 total
    • pypi 448 last-month
  • Total dependent packages: 12
    (may contain duplicates)
  • Total dependent repositories: 12
    (may contain duplicates)
  • Total versions: 66
  • Total maintainers: 3
pypi.org: feos

FeOs - A framework for equations of state and classical density functional theory.

  • Versions: 15
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 448 Last month
Rankings
Dependent packages count: 7.3%
Stargazers count: 8.3%
Forks count: 8.9%
Average: 12.5%
Downloads: 16.1%
Dependent repos count: 22.1%
Maintainers (1)
Last synced: 6 months ago
crates.io: feos-core

Core traits and functionalities for the `feos` project.

  • Versions: 18
  • Dependent Packages: 6
  • Dependent Repositories: 5
  • Downloads: 25,463 Total
Rankings
Dependent packages count: 4.6%
Dependent repos count: 10.1%
Forks count: 13.0%
Average: 13.0%
Stargazers count: 15.6%
Downloads: 21.9%
Maintainers (2)
Last synced: 6 months ago
crates.io: feos-dft

Generic classical DFT implementations for the `feos` project.

  • Versions: 14
  • Dependent Packages: 4
  • Dependent Repositories: 4
  • Downloads: 18,729 Total
Rankings
Dependent packages count: 6.3%
Dependent repos count: 10.8%
Forks count: 13.0%
Average: 14.5%
Stargazers count: 15.6%
Downloads: 26.9%
Maintainers (1)
Last synced: 6 months ago
crates.io: feos

FeOs - A framework for equations of state and classical density functional theory.

  • Versions: 12
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 17,586 Total
Rankings
Forks count: 13.0%
Dependent packages count: 15.5%
Stargazers count: 15.6%
Dependent repos count: 17.0%
Average: 22.0%
Downloads: 48.8%
Maintainers (2)
Last synced: 6 months ago
crates.io: feos-derive

Macros for the EquationOfState and HelmholtzEnergyFunctional traits in FeOs

  • Versions: 7
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 9,510 Total
Rankings
Forks count: 13.0%
Dependent packages count: 15.5%
Stargazers count: 15.6%
Dependent repos count: 17.0%
Average: 22.2%
Downloads: 49.9%
Maintainers (2)
Last synced: 6 months ago

Dependencies

Cargo.toml cargo
  • approx 0.4 development
  • conv 0.3
  • feos-core 0.3
  • feos-dft 0.3
  • indexmap 1.8
  • lazy_static 1.4
  • ndarray 0.15
  • num-dual 0.5
  • num-traits 0.2
  • numpy 0.16
  • petgraph 0.6
  • pyo3 0.16
  • quantity 0.5
  • serde 1.0
  • serde_json 1.0
  • thiserror 1.0
feos-core/Cargo.toml cargo
  • approx 0.4 development
  • conv 0.3
  • indexmap 1.8
  • ndarray 0.15
  • num-dual 0.5
  • num-traits 0.2
  • numpy 0.16
  • pyo3 0.16
  • quantity 0.5
  • serde 1.0
  • serde_json 1.0
  • thiserror 1.0
.github/workflows/documentation.yml actions
  • actions/checkout v2 composite
  • actions/download-artifact v1 composite
  • actions/setup-python v2 composite
  • actions/upload-artifact v2 composite
  • messense/maturin-action v1 composite
  • peaceiris/actions-gh-pages v3 composite
.github/workflows/release.yml actions
  • actions-rs/toolchain v1 composite
  • actions/checkout v2 composite
  • actions/download-artifact v2 composite
  • actions/setup-python v2 composite
  • actions/upload-artifact v2 composite
  • katyo/publish-crates v1 composite
  • messense/maturin-action v1 composite
.github/workflows/release_core.yml actions
  • actions-rs/toolchain v1 composite
  • actions/checkout v2 composite
  • katyo/publish-crates v1 composite
.github/workflows/release_derive.yml actions
  • actions-rs/toolchain v1 composite
  • actions/checkout v2 composite
  • katyo/publish-crates v1 composite
.github/workflows/release_dft.yml actions
  • actions-rs/toolchain v1 composite
  • actions/checkout v2 composite
  • katyo/publish-crates v1 composite
.github/workflows/test.yml actions
  • actions/checkout v3 composite
.github/workflows/wheels.yml actions
  • actions-rs/toolchain v1 composite
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • actions/upload-artifact v2 composite
  • messense/maturin-action v1 composite
feos-derive/Cargo.toml cargo
feos-dft/Cargo.toml cargo
pyproject.toml pypi