Skip to content

Commit

Permalink
API Python almost - need test, doc and mes around with parameters ori…
Browse files Browse the repository at this point in the history
…entation
  • Loading branch information
SalvadorBrandolin committed Sep 30, 2024
1 parent 64bc38e commit a724171
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
1 change: 1 addition & 0 deletions python/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ excess_gibbs_sources = [
python_lib / 'models' / 'excess_gibbs' / '__init__.py',
python_lib / 'models' / 'excess_gibbs' / 'nrtl.py',
python_lib / 'models' / 'excess_gibbs' / 'unifac.py',
python_lib / 'models' / 'excess_gibbs' / 'uniquac.py',
]
py.install_sources(excess_gibbs_sources, subdir:python_lib / 'models' / 'excess_gibbs')

Expand Down
3 changes: 2 additions & 1 deletion python/yaeos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""

from yaeos.lib import yaeos_c
from yaeos.models.excess_gibbs import NRTL, UNIFACVLE
from yaeos.models.excess_gibbs import NRTL, UNIFACVLE, UNIQUAC
from yaeos.models.residual_helmholtz.cubic_eos import (
MHV,
PengRobinson76,
Expand All @@ -25,5 +25,6 @@
"QMR",
"NRTL",
"UNIFACVLE",
"UNIQUAC",
"MHV",
]
4 changes: 3 additions & 1 deletion python/yaeos/models/excess_gibbs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
- excess_gibbs: Excess Gibbs energy models
- NRTL: non-random two-liquid model
- UNIFACVLE: Original UNIFAC VLE model
- UNIQUAC: UNIversal QUAsiChemical Excess Gibbs free energy model
"""

from .nrtl import NRTL
from .unifac import UNIFACVLE
from .uniquac import UNIQUAC


__all__ = ["NRTL", "UNIFACVLE"]
__all__ = ["NRTL", "UNIFACVLE", "UNIQUAC"]
19 changes: 19 additions & 0 deletions python/yaeos/models/excess_gibbs/uniquac.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""UNIQUAC"""

from yaeos.core import GeModel
from yaeos.lib import yaeos_c


class UNIQUAC(GeModel):
"""UNIQUAC"""

def __init__(self, qs, rs, aij, bij, cij, dij, eij) -> None:
self.qs = qs
self.rs = rs
self.aij = aij
self.bij = bij
self.cij = cij
self.dij = dij
self.eij = eij

self.id = yaeos_c.uniquac(qs, rs, aij, bij, cij, dij, eij)

0 comments on commit a724171

Please sign in to comment.