Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
fedebenelli committed Oct 10, 2024
1 parent b101338 commit f1f6ed5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
20 changes: 10 additions & 10 deletions python/yaeos/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def gibbs_residual_vt(
dv: bool = False,
dn: bool = False,
):
"""Calculate residual Gibbs energy given volume and temperature [bar L/mol].
"""Rresidual Gibbs energy given volume and temperature [barL/mol].
Parameters
----------
Expand Down Expand Up @@ -534,7 +534,7 @@ def entropy_residual_vt(
def cv_residual_vt(
self, moles, volume: float, temperature: float
) -> float:
"""Calculate residual isochoric heat capacity given V and T [barL/molK].
"""Residual isochoric heat capacity given V and T [barL/molK].
Parameters
----------
Expand Down Expand Up @@ -692,15 +692,15 @@ def flash_pt_grid(
pressures = [10, 20, 30]
"""

xs, ys, Vxs, Vys, betas = yaeos_c.flash_grid(
xs, ys, vxs, vys, betas = yaeos_c.flash_grid(
self.id, z, pressures, temperatures, parallel=parallel
)

flash = {
"x": xs,
"y": ys,
"Vx": Vxs,
"Vy": Vys,
"Vx": vxs,
"Vy": vys,
"P": pressures,
"T": temperatures,
"beta": betas,
Expand All @@ -709,7 +709,7 @@ def flash_pt_grid(
return flash

def saturation_pressure(
self, z, temperature: float, kind: str = "bubble", P0: float = 0
self, z, temperature: float, kind: str = "bubble", p0: float = 0
) -> dict:
"""Saturation pressure at specified temperature.
Expand Down Expand Up @@ -767,7 +767,7 @@ def saturation_pressure(
print(model.saturation_pressure(np.array([0.5, 0.5]), 350.0))
"""
p, x, y, volume_x, volume_y, beta = yaeos_c.saturation_pressure(
id=self.id, z=z, t=temperature, kind=kind, p0=P0
id=self.id, z=z, t=temperature, kind=kind, p0=p0
)

return {
Expand All @@ -781,7 +781,7 @@ def saturation_pressure(
}

def saturation_temperature(
self, z, pressure: float, kind: str = "bubble", T0: float = 0
self, z, pressure: float, kind: str = "bubble", t0: float = 0
) -> dict:
"""Saturation pressure at specified temperature.
Expand Down Expand Up @@ -839,7 +839,7 @@ def saturation_temperature(
print(model.saturation_temperature(np.array([0.5, 0.5]), 12.99))
"""
t, x, y, volume_x, volume_y, beta = yaeos_c.saturation_pressure(
id=self.id, z=z, p=pressure, kind=kind, t0=T0
id=self.id, z=z, p=pressure, kind=kind, t0=t0
)

return {
Expand All @@ -848,7 +848,7 @@ def saturation_temperature(
"Vx": volume_x,
"Vy": volume_y,
"T": t,
"P": p,
"P": pressure,
"beta": beta,
}

Expand Down
4 changes: 1 addition & 3 deletions python/yaeos/models/excess_gibbs/unifac.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

from typing import List

import numpy as np

from yaeos.core import GeModel
from yaeos.lib import yaeos_c
from yaeos.models.groups import groups_from_dicts
Expand Down Expand Up @@ -34,7 +32,7 @@ class UNIFACVLE(GeModel):
model.ln_gamma([0.5, 0.5], 298.15)
"""

def __init__(self, molecules) -> None:
def __init__(self, molecules: List[dict]) -> None:

(number_of_groups, groups_ids, groups_ammounts) = groups_from_dicts(
molecules
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
RKPR,
SoaveRedlichKwong,
)
from .mixing_rules import CubicMixRule, MHV, HV, QMR
from .mixing_rules import CubicMixRule, HV, MHV, QMR


__all__ = [
Expand Down

0 comments on commit f1f6ed5

Please sign in to comment.