sunpeek.components.fluids.Fluid#
- class sunpeek.components.fluids.Fluid(**kwargs)#
Bases:
Base
Stores basic information about fluids in SunPeek and a high level, and implements a high level abstract fluid interface for SunPeek.
Notes
Provides get_density() and get_heat_capacity() accessors for all fluids, accepting scalar or vector pint Quantity
as temperature input. - Subclasses must implement _get_density() and _get_heat_capacity(). - Forms the base class for a joined table class hierarchy in the database, see https://docs.sqlalchemy.org/en/14/orm/inheritance.html the polymorphic discriminator column is
model_type
, this parameter is set automatically, do not alter by hand.Methods
__init__
(**kwargs)A simple constructor that allows initialization from kwargs.
get_density
(te)Calculate density of fluid at given temperature and self.concentration :type te: :param te: Temperature for which density is evaluated.
Calculate heat capacity of fluid at given temperature and self.concentration :type te: :param te: Temperature for which heat cpaacity is evaluated.
- get_density(te)#
Calculate density of fluid at given temperature and self.concentration :type te: :param te: Temperature for which density is evaluated. :type te:
pd.Series
- Return type:
pd.Series
- get_heat_capacity(te)#
Calculate heat capacity of fluid at given temperature and self.concentration :type te: :param te: Temperature for which heat cpaacity is evaluated. :type te:
pd.Series
,scalar
orvector
- Return type:
pd.Series