You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `FeOs` package provides Rust implementations of different equation of state and Helmholtz energy functional models and corresponding Python bindings.
10
10
11
11
```python
12
-
from feos import EquationOfState, State
13
-
from feos.parameters import PureRecord, Identifier, Parameters
12
+
import feos
14
13
15
14
# PC-SAFT parameters for methanol (Gross and Sadowski 2002)
16
-
record = PureRecord(
17
-
Identifier(name="methanol"),
15
+
record =feos.PureRecord(
16
+
feos.Identifier(name="methanol"),
18
17
molarweight=32.04,
19
18
m=1.5255,
20
19
sigma=3.23,
@@ -26,11 +25,11 @@ record = PureRecord(
26
25
)
27
26
28
27
# Build an equation of state
29
-
parameters = Parameters.new_pure(record)
30
-
eos = EquationOfState.pcsaft(parameters)
28
+
parameters =feos.Parameters.new_pure(record)
29
+
eos =feos.EquationOfState.pcsaft(parameters)
31
30
32
31
# Define thermodynamic conditions
33
-
critical_point = State.critical_point(eos)
32
+
critical_point =feos.State.critical_point(eos)
34
33
35
34
# Compute properties
36
35
p = critical_point.pressure()
@@ -122,6 +121,7 @@ To compile the code you need the Rust compiler and `maturin` installed.
122
121
To install the package directly into the active environment (virtualenv or conda), use
123
122
124
123
```
124
+
cd py-feos
125
125
maturin develop --release
126
126
```
127
127
@@ -130,7 +130,7 @@ which uses the `python` and `all_models` feature as specified in the `pyproject.
130
130
Alternatively, you can specify the models or features that you want to include in the python package explicitly, e.g.
0 commit comments