Skip to content

Commit

Permalink
Update isoline iterators
Browse files Browse the repository at this point in the history
  • Loading branch information
fwitte committed Jan 7, 2021
1 parent 01777a3 commit 28ed0c0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
Changelog
=========

v1.1 (Someday, Somemonth, Someyear)
-----------------------------------
v1.2 (January, 7, 2021)
-----------------------

* Reduce the number of datappoints for isolines to 200 for faster performance.

v1.1 (November, 10, 2020)
-------------------------

* Change the iterator for isobaric, isenthalpic and isentropic to specific volume.
* Adjust individual isoline plotting iterators and isolines accordingly.
Expand Down
18 changes: 9 additions & 9 deletions src/fluprodia/fluid_property_diagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,8 @@ def isobaric(self):
isolines = self.pressure['isolines']

iterator = 1 / np.append(
np.geomspace(self.v_min, self.v_intermediate, 150, endpoint=False),
np.geomspace(self.v_intermediate, self.v_max, 150))
np.geomspace(self.v_min, self.v_intermediate, 100, endpoint=False),
np.geomspace(self.v_intermediate, self.v_max, 100))

for p in isolines.round(8):
self.pressure[p] = self.single_isobaric(iterator, np.ones(len(iterator)) * p)
Expand All @@ -585,8 +585,8 @@ def isochoric(self):
isolines = self.volume['isolines']

iterator = np.append(
np.geomspace(self.p_trip, self.p_crit * 0.8, 150, endpoint=False),
np.geomspace(self.p_crit * 0.8, self.p_max, 150))
np.geomspace(self.p_trip, self.p_crit * 0.8, 100, endpoint=False),
np.geomspace(self.p_crit * 0.8, self.p_max, 100))

for v in isolines.round(8):
self.volume[v] = self.single_isochoric(
Expand All @@ -596,7 +596,7 @@ def isothermal(self):
"""Calculate an isoline of constant temperature."""
isolines = self.temperature['isolines']

iterator = np.linspace(self.s_min, self.s_max, 300)
iterator = np.linspace(self.s_min, self.s_max, 200)

for T in isolines.round(8):
self.temperature[T] = self.single_isothermal(
Expand Down Expand Up @@ -635,8 +635,8 @@ def isenthalpic(self):
isolines = self.enthalpy['isolines']

iterator = 1 / np.append(
np.geomspace(self.v_min, self.v_intermediate, 150, endpoint=False),
np.geomspace(self.v_intermediate, self.v_max, 150))
np.geomspace(self.v_min, self.v_intermediate, 100, endpoint=False),
np.geomspace(self.v_intermediate, self.v_max, 100))

for h in isolines.round(8):
self.enthalpy[h] = self.single_isenthalpic(
Expand All @@ -647,8 +647,8 @@ def isentropic(self):
isolines = self.entropy['isolines']

iterator = 1 / np.append(
np.geomspace(self.v_min, self.v_intermediate, 150, endpoint=False),
np.geomspace(self.v_intermediate, self.v_max, 150))
np.geomspace(self.v_min, self.v_intermediate, 100, endpoint=False),
np.geomspace(self.v_intermediate, self.v_max, 100))

for s in isolines.round(8):
self.entropy[s] = self.single_isentropic(
Expand Down

0 comments on commit 28ed0c0

Please sign in to comment.