Skip to content

Commit c2fb02a

Browse files
g-bauerprehner
andauthored
Impl enum (#11)
* Started implementation of enum for equation of state object * Import cleanup * Added PeTS equation of state * Added DFT, restructured package modules * Fixed name for PeTS python constructor * Update dependencies and cleanup * Remove 'm' method from FluidParameters trait * Added FMT functional * Update dependencies to github * Renamed python dft struct to HelmholtzEnergyFunctional * Add the gc PC-SAFT eos and functional (#12) * Add the gc PC-SAFT eos and functional * update README * update README even more * example for the gc-pcsaft functional including necessary fixes to make it work * fixed documentation, added estimator * add estimator macro call for entropy scaling * added uv-theory Co-authored-by: Philipp Rehner <[email protected]> Co-authored-by: Philipp Rehner <[email protected]>
1 parent 16b3886 commit c2fb02a

37 files changed

+2496
-833
lines changed

Cargo.lock

+205-354
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+12-5
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,18 @@ categories = ["science"]
1616
crate-type = ["cdylib"]
1717

1818
[dependencies]
19-
quantity = { version = "0.4", features = ["python"] }
20-
feos-core = { version = "0.1", features = ["python"] }
21-
feos-dft = { version = "0.1", features = ["python"] }
22-
feos-pcsaft = { version = "0.1", features = ["python"] }
19+
quantity = "0.5"
20+
feos-core = "0.2"
21+
feos-dft = "0.2"
22+
feos-pcsaft = { version = "0.2", features = ["python"] }
23+
feos-gc-pcsaft = { version = "0.1", features = ["python"] }
24+
feos-pets = { version = "0.1", features = ["python"] }
25+
feos-uvtheory = { git = "https://github.com/feos-org/feos-uvtheory", features = ["python"], tag = "v0.1.0" }
26+
feos-estimator = { git = "https://github.com/feos-org/feos-estimator", features = ["python"], tag = "v0.1.0" }
27+
numpy = "0.16"
28+
ndarray = { version = "0.15", features=["approx"] }
29+
petgraph = "0.6"
2330

2431
[dependencies.pyo3]
25-
version = "0.15"
32+
version = "0.16"
2633
features = ["extension-module", "abi3", "abi3-py37"]

README.md

+22-1
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,35 @@
55

66
The `FeOs` package conveniently provides bindings to the Rust implementations of different equation of state and Helmholtz energy functional models in a single Python package.
77

8+
```python
9+
from feos.eos import EquationOfState, State
10+
from feos.pcsaft import PcSaftParameters
11+
12+
# Build an equation of state
13+
parameters = PcSaftParameters.from_json(['methanol'], 'parameters.json')
14+
eos = EquationOfState.pcsaft(parameters)
15+
16+
# Define thermodynamic conditions
17+
critical_point = State.critical_point(eos)
18+
19+
# Compute properties
20+
p = critical_point.pressure()
21+
t = critical_point.temperature
22+
print(f'Critical point for methanol: T={t}, p={p}.')
23+
```
24+
```terminal
25+
Critical point for methanol: T=531.5 K, p=10.7 MPa.
26+
```
27+
828
## Models
929
The following models are currently published as part of the `FeOs` framework
1030

1131
|name|description|eos|dft|
1232
|-|-|:-:|:-:|
1333
|[`feos-pcsaft`](https://github.com/feos-org/feos-pcsaft)|perturbed-chain (polar) statistical associating fluid theory|&#128504;|&#128504;|
34+
|[`feos-gc-pcsaft`](https://github.com/feos-org/feos-gc-pcsaft)|(heterosegmented) group contribution PC-SAFT|&#128504;|&#128504;|
1435

15-
The list is being expanded continuously. Currently under development are implementations of ePC-SAFT, (heterosegmented) group contribution PC-SAFT and equations of state/Helmholtz energy functionals for model fluids like LJ and Mie fluids.
36+
The list is being expanded continuously. Currently under development are implementations of ePC-SAFT and equations of state/Helmholtz energy functionals for model fluids like LJ and Mie fluids.
1637

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

docs/api/dft.md

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
2+
# `feos.dft`
3+
4+
## `HelmholtzEnergyFunctional`
5+
6+
Implementations of Helmholtz energy functionals for DFT.
7+
8+
```{eval-rst}
9+
.. currentmodule:: feos.dft
10+
11+
.. autosummary::
12+
:toctree: generated/
13+
14+
HelmholtzEnergyFunctional
15+
HelmholtzEnergyFunctional.pcsaft
16+
HelmholtzEnergyFunctional.gcpcsaft
17+
HelmholtzEnergyFunctional.pets
18+
HelmholtzEnergyFunctional.fmt
19+
```
20+
21+
## Other data types
22+
23+
```{eval-rst}
24+
.. currentmodule:: feos.dft
25+
26+
.. autosummary::
27+
:toctree: generated/
28+
29+
State
30+
PhaseEquilibrium
31+
PhaseDiagram
32+
Contributions
33+
Verbosity
34+
FMTVersion
35+
```
36+
37+
## Interfaces
38+
39+
```{eval-rst}
40+
.. autosummary::
41+
:toctree: generated/
42+
43+
PlanarInterface
44+
SurfaceTensionDiagram
45+
```
46+
47+
## Adsorption
48+
49+
```{eval-rst}
50+
.. autosummary::
51+
:toctree: generated/
52+
53+
ExternalPotential
54+
Geometry
55+
Pore1D
56+
Pore3D
57+
Adsorption1D
58+
Adsorption3D
59+
```
60+
61+
## Solvation
62+
63+
```{eval-rst}
64+
.. autosummary::
65+
:toctree: generated/
66+
67+
PairCorrelation
68+
SolvationProfile
69+
```

docs/api/dft/fmt.rst

-38
This file was deleted.

docs/api/dft/index.md

-13
This file was deleted.

docs/api/eos.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# `feos.eos`
2+
3+
The `eos` module contains the `EquationOfState` object that contains all implemented equations of state.
4+
The `State` and `PhaseEquilibrium` objects are used to define thermodynamic conditions and -- once created -- can be used to compute properties.
5+
6+
## `EquationOfState`
7+
8+
```{eval-rst}
9+
.. currentmodule:: feos.eos
10+
11+
.. autosummary::
12+
:toctree: generated/
13+
14+
EquationOfState
15+
EquationOfState.pcsaft
16+
EquationOfState.gc_pcsaft
17+
EquationOfState.peng_robinson
18+
EquationOfState.pets
19+
EquationOfState.python
20+
```
21+
22+
## Other data types
23+
24+
```{eval-rst}
25+
.. currentmodule:: feos.eos
26+
27+
.. autosummary::
28+
:toctree: generated/
29+
30+
Contributions
31+
Verbosity
32+
State
33+
PhaseEquilibrium
34+
PhaseDiagram
35+
```

docs/api/eos/index.md

-15
This file was deleted.

docs/api/eos/pcsaft.rst

-86
This file was deleted.

docs/api/eos/user_defined.rst

-23
This file was deleted.

docs/api/gc_pcsaft.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# `feos.gc_pcsaft`
2+
3+
Utilities to build `GcPcSaftParameters`. To learn more about ways to build parameters from files or within Python, see [this example](/examples/eos/pcsaft/pcsaft_working_with_parameters).
4+
5+
## Example
6+
7+
```python
8+
from feos.gc_pcsaft import GcPcSaftParameters
9+
10+
```
11+
12+
## Data types
13+
14+
```{eval-rst}
15+
.. currentmodule:: feos.gc_pcsaft
16+
17+
.. autosummary::
18+
:toctree: generated/
19+
20+
Identifier
21+
ChemicalRecord
22+
JobackRecord
23+
SegmentRecord
24+
BinaryRecord
25+
BinarySegmentRecord
26+
GcPcSaftRecord
27+
GcPcSaftEosParameters
28+
GcPcSaftFunctionalParameters
29+
```

0 commit comments

Comments
 (0)