ThermoState

thermostate.thermostate module

Base ThermoState module.

class thermostate.thermostate.State(substance, **kwargs)

Basic State manager for thermodyanmic states.

Parameters:
  • substance (str) – One of the substances supported by CoolProp
  • T (pint.UnitRegistry.Quantity) – Temperature
  • p (pint.UnitRegistry.Quantity) – Pressure
  • u (pint.UnitRegistry.Quantity) – Mass-specific internal energy
  • s (pint.UnitRegistry.Quantity) – Mass-specific entropy
  • v (pint.UnitRegistry.Quantity) – Mass-specific volume
  • h (pint.UnitRegistry.Quantity) – Mass-specific enthalpy
  • x (pint.UnitRegistry.Quantity) – Quality
exception thermostate.thermostate.StateError

Errors associated with setting the State object.

thermostate.thermostate.render_traceback(self)

Render a minimized version of the DimensionalityError traceback.

The default Jupyter/IPython traceback includes a lot of context from within pint that actually raises the DimensionalityError. This context isn’t really needed for this particular error, since the problem is almost certainly in the user code. This function removes the additional context.

thermostate.abbreviations module

This module contains classes with attributes representing the common property units

class thermostate.abbreviations.EnglishEngineering

String representations of common units.

The attributes of this class are strings that represent the common units for thermodynamics calculations.

h

BTU/lb

Type:str
p

psi

Type:str
s

BTU/(lb*degR)

Type:str
T

degF

Type:str
u

BTU/lb

Type:str
v

ft**3/lb

Type:str
class thermostate.abbreviations.SystemInternational

String representations of common units.

The attributes of this class are strings that represent the common units for thermodynamics calculations.

h

kJ/kg

Type:str
p

bar

Type:str
s

kJ/(kg*K)

Type:str
T

degC

Type:str
u

kJ/kg

Type:str
v

m**3/lb

Type:str