sunpeek.components.fluids_wpd_models.WPDModelPure#

class sunpeek.components.fluids_wpd_models.WPDModelPure(unit)#

Bases: WPDModel

Methods

__init__(unit)

csv2df(csv_file)

Read WebPlotDigitizer csv with single dataset into dataframe.

plot_fit(prop_to_plot, fluid_name[, ...])

Plot model fit and original / ground truth data from the WebPlotDigitizer csv dataset.

predict(*args)

Compute model prediction (fluid density, heat capacity) based on trained sklearn model, self.sk_model.

train([fit_type])

Fits polynomial interpolation model to fluid raw data in df.

csv2df(csv_file)#

Read WebPlotDigitizer csv with single dataset into dataframe.

plot_fit(prop_to_plot, fluid_name, settings=None, n_points=50)#

Plot model fit and original / ground truth data from the WebPlotDigitizer csv dataset. This is useful to check quality of model fit, after calling self.train().

Return type:

Figure

predict(*args)#

Compute model prediction (fluid density, heat capacity) based on trained sklearn model, self.sk_model.

Parameters:

args (pint Quantity) – Inputs required for prediciton: temperature and (for mixed fluids) concentration. Fluid temperature in unit self.unit[‘te’], typically ‘degC’ Fluid concentration in unit self.unit[‘c’], typically ‘percent’

Returns:

pint Quantity

Return type:

Calculated fluid property (density or heat capacity) in unit self.unit[``’out’``]

train(fit_type='polynomial')#

Fits polynomial interpolation model to fluid raw data in df.

Parameters:

fit_type (str) – Type of sklearn fit. Currently, only ‘polynomial’ implemented, works good enough.

Return type:

Trained sklearn model.