ThermoPyle.ThermoFluid

class ThermoPyle.ThermoFluid(fluid='Water', xvar='T', yvar='P', zvar='S', numPoints=[217, 217], colorMap='viridis')[source]

A class that will contain the data requested. Call the class with these arguments

Parameters:
  • fluid (str) – CoolProp Fluid type to use
  • xvar (str) – x variable
  • yvar (str) – y variable
  • zvar (str) – z var (generated by code), normally S, U
  • numPoints (Union[List[int],int]) – number of Points for linspaces
  • colorMap (str) – What color map to use
xvar

What variable is on the x-axis

Type:str
yvar

What variable is on the y-axis

Type:str
zvar

What variable is on the z-axis, also, what variable is generated by CoolProp

Type:str
colorMap

What ColorMap Matplotlib uses to make its plot

Type:str
vars

a list of xvar, yvar, zvar

Type:List[Text]
fluid

What fluid is being modeled

Type:str
data

The data for the given fluid

Type:pandas.DataFrame
units

the units for xvar, yvar, zvar, in that order.

Type:List[Text]
numPoints

the x-resolution and y-resolution, in that order.

Type:List[int]
M

the molar mass of the fluid for the system.

Type:float
meta

a PMap containing metadata related to the current fluid.

Type:pyrsistent._pmap.PMap
add_column(variables)[source]

Adds a column to the dataframe

Paramaters:
variable (Union[List[Text],Text]): What variable(s) to add
Return type:None
clean()[source]

Re-cleans data

Return type:None
copy()[source]

Returns a copy of itself

Return type:~ThermoFluid
make_meta()[source]

(Re)make the metadata object

Return type:None
make_units()[source]

(Re)make the units list

Return type:None
refresh()[source]

Refreshes the object, remakes meta, cleans data, remakes units.

Return type:None
write_data(path='./data/', filename='', mode='default')[source]

Does what it says on the tin. Makes a CSV and JSON files and saves them to path given.

Parameters:
  • path (str) – path where file should be saved
  • filename (str) – what to name the file
  • mode (str) – How to name the file: - default: FluidName_X-xpoints_Y-ypoints_Z; - custom: fully custom name; - dual: default + custom.
Return type:

None