Skip to content

Commit

Permalink
Extend get_plotting_data method of Drum class.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfreissmann committed Jun 12, 2024
1 parent c90abe8 commit d080714
Showing 1 changed file with 36 additions and 5 deletions.
41 changes: 36 additions & 5 deletions src/tespy/components/nodes/drum.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,16 +416,47 @@ def get_plotting_data(self):
data : dict
A nested dictionary containing the keywords required by the
:code:`calc_individual_isoline` method of the
:code:`FluidPropertyDiagram` class. First level keys are the
connection index ('in1' -> 'out1', therefore :code:`1` etc.).
:code:`FluidPropertyDiagram` class. The keys :code:`1` and :code:`2`
connect the saturated liquid-vapor mixture of 'in1' with the
saturated liquid ('out1') and saturated vapor ('out2'), while the
keys :code:`3` and :code:`4` connect the (superheated) gas of 'in2'
with the same.
"""
return {
1: {
'isoline_property': 'p',
'isoline_value': self.outl[0].p.val,
'isoline_value': self.inl[0].p.val,
'isoline_value_end': self.outl[0].p.val,
'starting_point_property': 'v',
'starting_point_value': self.inl[0].vol.val,
'ending_point_property': 'v',
'ending_point_value': self.outl[0].vol.val
},
2: {
'isoline_property': 'p',
'isoline_value': self.inl[0].p.val,
'isoline_value_end': self.outl[1].p.val,
'starting_point_property': 'v',
'starting_point_value': self.outl[0].vol.val,
'starting_point_value': self.inl[0].vol.val,
'ending_point_property': 'v',
'ending_point_value': self.outl[1].vol.val
}}
},
3: {
'isoline_property': 'p',
'isoline_value': self.inl[1].p.val,
'isoline_value_end': self.outl[0].p.val,
'starting_point_property': 'v',
'starting_point_value': self.inl[1].vol.val,
'ending_point_property': 'v',
'ending_point_value': self.outl[0].vol.val
},
4: {
'isoline_property': 'p',
'isoline_value': self.inl[1].p.val,
'isoline_value_end': self.outl[1].p.val,
'starting_point_property': 'v',
'starting_point_value': self.inl[1].vol.val,
'ending_point_property': 'v',
'ending_point_value': self.outl[1].vol.val
}
}

0 comments on commit d080714

Please sign in to comment.