ThermoPyle.CSVFluid

class ThermoPyle.CSVFluid(pathToFile)[source]

A class that will help work with ThermoFluid data contained in CSV/JSON files.

Parameters:pathToFile (str) – The name of the files you want to use, NOT the path. Must have both a json and a CSV file for this purpose.
data

The data as read by pandas for the given fluid

Type:pandas.DataFrame
columns

What variable is on the y-axis

Type:List[Text]
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
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
changeOrder(order)[source]

Changes order of the columns:

Parameters:order (List[Text]) – is a permutation of length 3 on vars.
Return type:None
copy()[source]

Returns a copy of itself

Return type:~CSVFluid
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