Skip to content

Commit

Permalink
hehe
Browse files Browse the repository at this point in the history
  • Loading branch information
fedebenelli committed Dec 11, 2024
1 parent 4cf794b commit d1d4572
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions python/yaeos/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,7 @@ def stability_analysis(self, z, pressure, temperature):
"""Perform stability analysis.
Find all the possible minima values that the :math:`tm` function,
defined by Michelsen and Møllerup.
defined by Michelsen and Mollerup.
Parameters
----------
Expand All @@ -1409,25 +1409,33 @@ def stability_analysis(self, z, pressure, temperature):
-------
dict
Stability analysis result dictionary with keys:
- w_min:
- w:
value of the test phase that minimizes
the :math:`tm` function
- tm_min:
- tm:
minimum value of the :math:`tm` function
- all_mins_w:
all values of :math:`w` that minimize the
:math:`tm` function
dict
All found minimum values of the :math:`tm` function and the
corresponding test phase mole fractions.
- w:
all values of :math:`w` that minimize the
:math:`tm` function
- tm:
all values found minima of the :math:`tm` function
"""
(w_min, tm_min, all_mins_w) = yaeos_c.stability_zpt(
(w_min, tm_min, all_mins, all_mins_w) = yaeos_c.stability_zpt(
id=self.id, z=z, p=pressure, t=temperature
)

return {"w_min": w_min, "tm_min": tm_min, "all_mins_w": all_mins_w}
return {"w": w_min, "tm": tm_min}, {
"tm": all_mins,
"w": all_mins_w,
}

def stability_tm(self, z, w, pressure, temperature):
"""Calculate the :math:`tm` function.
Calculate the :math:`tm` function, defined by Michelsen and Møllerup.
Calculate the :math:`tm` function, defined by Michelsen and Mollerup.
If this value is negative, it means that the feed with composition `z`
is unstable.
Expand Down

0 comments on commit d1d4572

Please sign in to comment.