Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impl enum #11

Merged
merged 15 commits into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
559 changes: 205 additions & 354 deletions Cargo.lock

Large diffs are not rendered by default.

17 changes: 12 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,18 @@ categories = ["science"]
crate-type = ["cdylib"]

[dependencies]
quantity = { version = "0.4", features = ["python"] }
feos-core = { version = "0.1", features = ["python"] }
feos-dft = { version = "0.1", features = ["python"] }
feos-pcsaft = { version = "0.1", features = ["python"] }
quantity = "0.5"
feos-core = "0.2"
feos-dft = "0.2"
feos-pcsaft = { version = "0.2", features = ["python"] }
feos-gc-pcsaft = { version = "0.1", features = ["python"] }
feos-pets = { version = "0.1", features = ["python"] }
feos-uvtheory = { git = "https://github.com/feos-org/feos-uvtheory", features = ["python"], tag = "v0.1.0" }
feos-estimator = { git = "https://github.com/feos-org/feos-estimator", features = ["python"], tag = "v0.1.0" }
numpy = "0.16"
ndarray = { version = "0.15", features=["approx"] }
petgraph = "0.6"

[dependencies.pyo3]
version = "0.15"
version = "0.16"
features = ["extension-module", "abi3", "abi3-py37"]
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,35 @@

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.

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

# Build an equation of state
parameters = PcSaftParameters.from_json(['methanol'], 'parameters.json')
eos = EquationOfState.pcsaft(parameters)

# Define thermodynamic conditions
critical_point = State.critical_point(eos)

# Compute properties
p = critical_point.pressure()
t = critical_point.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|
|-|-|:-:|:-:|
|[`feos-pcsaft`](https://github.com/feos-org/feos-pcsaft)|perturbed-chain (polar) statistical associating fluid theory|🗸|🗸|
|[`feos-gc-pcsaft`](https://github.com/feos-org/feos-gc-pcsaft)|(heterosegmented) group contribution PC-SAFT|🗸|🗸|

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.
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.

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

Expand Down
69 changes: 69 additions & 0 deletions docs/api/dft.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

# `feos.dft`

## `HelmholtzEnergyFunctional`

Implementations of Helmholtz energy functionals for DFT.

```{eval-rst}
.. currentmodule:: feos.dft

.. autosummary::
:toctree: generated/

HelmholtzEnergyFunctional
HelmholtzEnergyFunctional.pcsaft
HelmholtzEnergyFunctional.gcpcsaft
HelmholtzEnergyFunctional.pets
HelmholtzEnergyFunctional.fmt
```

## Other data types

```{eval-rst}
.. currentmodule:: feos.dft

.. autosummary::
:toctree: generated/

State
PhaseEquilibrium
PhaseDiagram
Contributions
Verbosity
FMTVersion
```

## Interfaces

```{eval-rst}
.. autosummary::
:toctree: generated/

PlanarInterface
SurfaceTensionDiagram
```

## Adsorption

```{eval-rst}
.. autosummary::
:toctree: generated/

ExternalPotential
Geometry
Pore1D
Pore3D
Adsorption1D
Adsorption3D
```

## Solvation

```{eval-rst}
.. autosummary::
:toctree: generated/

PairCorrelation
SolvationProfile
```
38 changes: 0 additions & 38 deletions docs/api/dft/fmt.rst

This file was deleted.

13 changes: 0 additions & 13 deletions docs/api/dft/index.md

This file was deleted.

35 changes: 35 additions & 0 deletions docs/api/eos.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# `feos.eos`

The `eos` module contains the `EquationOfState` object 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.

## `EquationOfState`

```{eval-rst}
.. currentmodule:: feos.eos

.. autosummary::
:toctree: generated/

EquationOfState
EquationOfState.pcsaft
EquationOfState.gc_pcsaft
EquationOfState.peng_robinson
EquationOfState.pets
EquationOfState.python
```

## Other data types

```{eval-rst}
.. currentmodule:: feos.eos

.. autosummary::
:toctree: generated/

Contributions
Verbosity
State
PhaseEquilibrium
PhaseDiagram
```
15 changes: 0 additions & 15 deletions docs/api/eos/index.md

This file was deleted.

86 changes: 0 additions & 86 deletions docs/api/eos/pcsaft.rst

This file was deleted.

23 changes: 0 additions & 23 deletions docs/api/eos/user_defined.rst

This file was deleted.

29 changes: 29 additions & 0 deletions docs/api/gc_pcsaft.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# `feos.gc_pcsaft`

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).

## Example

```python
from feos.gc_pcsaft import GcPcSaftParameters

```

## Data types

```{eval-rst}
.. currentmodule:: feos.gc_pcsaft

.. autosummary::
:toctree: generated/

Identifier
ChemicalRecord
JobackRecord
SegmentRecord
BinaryRecord
BinarySegmentRecord
GcPcSaftRecord
GcPcSaftEosParameters
GcPcSaftFunctionalParameters
```
Loading