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

added ePC-SAFT #229

Merged
merged 23 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
1addcfd
added ePC-SAFT
Mar 5, 2024
39c1f45
added epcsaft to test.yml
Mar 6, 2024
d9b9396
removed association for epcsaft
Mar 6, 2024
08bbea6
added new standard na, nb to parameter file
Mar 6, 2024
5eead2c
Moved temperature dependent sigma to parameters so that copies of Har…
g-bauer Mar 22, 2024
4d3f639
tidied up after removal of assoc and HS from epcsaft, some formatting
Mar 22, 2024
f554331
changed content of enum PermittivityRecord to not contain an addition…
Mar 22, 2024
243525b
changed interpolation function to binary search, made sure parameters…
Mar 22, 2024
b661992
removed bug: check if permittivity model types agree only if permitti…
Mar 22, 2024
dfe64c9
added possibility of constant permittivity (only 1 data point provided)
Mar 26, 2024
73e55ee
added tests for Helmholtz energy of Born and Ionic term, added parame…
Mar 26, 2024
24825c9
moved constants to top of file and named as constants
Apr 18, 2024
9534c60
reverted some changes in ionic.rs due to Pottel that weren't supposed…
Apr 18, 2024
8f13c7f
removed transport properties from ePC-SAFT
Apr 18, 2024
99b8664
added Python documentation
Apr 18, 2024
def0b2d
removed some last remainder of transport properties
Apr 18, 2024
babf87d
changed permittivity interpolation to preserve derivative
Apr 18, 2024
6518a22
added epcsaft parameters
Apr 18, 2024
eb129ba
added documentation for parameters
Apr 18, 2024
e45db99
update CHANGELOG, Cargo.toml, README
prehner Apr 18, 2024
0400804
only one Added category in CHANGELOG
prehner Apr 18, 2024
b1725f4
add binary_path in doc example
prehner Apr 18, 2024
787f06e
removed some warnings and fixed tests
prehner Apr 18, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
fail-fast: false
matrix:
model: [pcsaft, gc_pcsaft, pets, uvtheory, saftvrqmie, saftvrmie]
model: [pcsaft, epcsaft, gc_pcsaft, pets, uvtheory, saftvrqmie, saftvrmie]

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- Added SAFT-VR Mie equation of state.[#237](https://github.com/feos-org/feos/pull/237)
- Added ePC-SAFT equation of state. [#229](https://github.com/feos-org/feos/pull/229)

### Changed
- Updated model implementations to account for the removal of trait objects for Helmholtz energy contributions and the de Broglie in `feos-core`. [#226](https://github.com/feos-org/feos/pull/226)
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,15 @@ dft = ["feos-dft", "petgraph"]
estimator = []
association = []
pcsaft = ["association"]
epcsaft = ["association"]
gc_pcsaft = ["association"]
uvtheory = ["lazy_static"]
pets = []
saftvrqmie = []
saftvrmie = []
rayon = ["dep:rayon", "ndarray/rayon", "feos-core/rayon", "feos-dft?/rayon"]
python = ["pyo3", "numpy", "quantity/python", "feos-core/python", "feos-dft?/python", "rayon"]
all_models = ["dft", "estimator", "pcsaft", "gc_pcsaft", "uvtheory", "pets", "saftvrqmie", "saftvrmie"]
all_models = ["dft", "estimator", "pcsaft", "epcsaft", "gc_pcsaft", "uvtheory", "pets", "saftvrqmie", "saftvrmie"]

[[bench]]
name = "state_properties"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ 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|✓||
Expand Down
1 change: 1 addition & 0 deletions docs/api/eos.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ If you want to adjust parameters of a model to experimental data you can use cla

EquationOfState
EquationOfState.pcsaft
EquationOfState.epcsaft
EquationOfState.gc_pcsaft
EquationOfState.peng_robinson
EquationOfState.pets
Expand Down
36 changes: 36 additions & 0 deletions docs/api/epcsaft.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# `feos.epcsaft`

Utilities to build `ElectrolytePcSaftParameters`.

## Example

```python
from feos.epcsaft import ElectrolytePcSaftParameters

pure_path = 'parameters/epcsaft/held2014_w_permittivity_added.json'
binary_path = 'parameters/epcsaft/held2014_binary.json'
parameters = ElectrolytePcSaftParameters.from_json(['water', 'sodium ion', 'chloride ion'], pure_path, binary_path)
```

## Data types

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

.. autosummary::
:toctree: generated/

Identifier
IdentifierOption
ChemicalRecord
SmartsRecord
ElectrolytePcSaftVariants
ElectrolytePcSaftRecord
ElectrolytePcSaftBinaryRecord
PureRecord
SegmentRecord
BinaryRecord
BinarySegmentRecord
ElectrolytePcSaftParameters
PermittivityRecord
```
1 change: 1 addition & 0 deletions docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ These modules contain the objects to e.g. read parameters from files or build pa
:maxdepth: 1

pcsaft
epcsaft
gc_pcsaft
peng_robinson
pets
Expand Down
22 changes: 22 additions & 0 deletions parameters/epcsaft/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# ePC-SAFT Parameters

This directory contains files with parameters for ePC-SAFT equation of state.
The files named according to the pattern `NameYear.json` correspond to published parameters. The corresponding publication is provided in the [`literature.bib`](literature.bib) file.

## Notes

- Experimental data for the permittivity has not been part of the original publication and has been added.
- Ion permittivity has been set to 8.0 as in [Bülow et al. (2021)](https://www.sciencedirect.com/science/article/pii/S0378381221000297).
- Contains only univalent cations and anions from [Held et al. (2014)](https://www.sciencedirect.com/science/article/pii/S0263876214002469) and carbonate. Multivalent ions need to be added.
- Correlation for `k_ij` of water/Na+ and water/K+ has not been adapted from [Held et al. (2014)](https://www.sciencedirect.com/science/article/pii/S0263876214002469). Instead, a constant value at 298.15 K is assumed.

## Pure Substance Parameters
| file | model | publication |
| -------------------------------------------------------------------------- | ---------------------------------------- | :------------------------------------------------------: |
| [`held2014_w_permittivity_added.json`](held2014_w_permittivity_added.json) | parameters for univalent ions and water. | [🔗](https://doi.org/10.1016/j.cherd.2014.05.017) |

## Binary Parameters

| file | model | publication |
| ---------------------------------------------- | ----------------------------------------------- | :------------------------------------------------------: |
| [`held2014_binary.json`](held2014_binary.json) | binary parameters for univalent ions and water. | [🔗](https://doi.org/10.1016/j.cherd.2014.05.017) |
Loading
Loading