vclibpy package
Package for stationary vapor compression models and their analysis
Subpackages
- vclibpy.components package
- vclibpy.flowsheets package
- Submodules
- vclibpy.flowsheets.base module
BaseCycle
BaseCycle.calc_electrical_power()
BaseCycle.calc_states()
BaseCycle.calc_steady_state()
BaseCycle.flowsheet_name
BaseCycle.get_all_components()
BaseCycle.get_states_in_order_for_plotting()
BaseCycle.plot_cycle()
BaseCycle.set_condenser_outlet_based_on_subcooling()
BaseCycle.set_evaporator_outlet_based_on_superheating()
BaseCycle.setup_new_fluid()
BaseCycle.terminate()
- vclibpy.flowsheets.standard module
- vclibpy.flowsheets.vapor_injection module
- vclibpy.flowsheets.vapor_injection_economizer module
- vclibpy.flowsheets.vapor_injection_phase_separator module
- vclibpy.media package
CoolProp
MedProp
RefProp
RefProp.calc_satliq_state()
RefProp.calc_state()
RefProp.calc_transport_properties()
RefProp.get_available_substances()
RefProp.get_comp_names()
RefProp.get_critical_point()
RefProp.get_def_limits()
RefProp.get_dll_path()
RefProp.get_fluid_name()
RefProp.get_gwp()
RefProp.get_longname()
RefProp.get_mass_fraction()
RefProp.get_mol_fraction()
RefProp.get_molar_composition()
RefProp.get_molar_mass()
RefProp.get_nbp()
RefProp.get_odp()
RefProp.get_safety()
RefProp.get_sat_vap_pressure()
RefProp.get_triple_point()
RefProp.get_version()
RefProp.is_mixture()
RefProp.set_error_flag()
RefProp.set_warning_flag()
RefProp.terminate()
ThermodynamicState
TransportProperties
- Submodules
- vclibpy.media.cool_prop module
- vclibpy.media.media module
- vclibpy.media.ref_prop module
RefProp
RefProp.calc_satliq_state()
RefProp.calc_state()
RefProp.calc_transport_properties()
RefProp.get_available_substances()
RefProp.get_comp_names()
RefProp.get_critical_point()
RefProp.get_def_limits()
RefProp.get_dll_path()
RefProp.get_fluid_name()
RefProp.get_gwp()
RefProp.get_longname()
RefProp.get_mass_fraction()
RefProp.get_mol_fraction()
RefProp.get_molar_composition()
RefProp.get_molar_mass()
RefProp.get_nbp()
RefProp.get_odp()
RefProp.get_safety()
RefProp.get_sat_vap_pressure()
RefProp.get_triple_point()
RefProp.get_version()
RefProp.is_mixture()
RefProp.set_error_flag()
RefProp.set_warning_flag()
RefProp.terminate()
- vclibpy.media.states module
- vclibpy.utils package
Submodules
vclibpy.datamodels module
Module which contains datamodels which are used in this library.
- class vclibpy.datamodels.FlowsheetState[source]
Bases:
VariableContainer
This class is used to define the unique states of the flowsheet in the heat pump.
The class is dynamic in the sense that attributes may be added during calculation of new flowsheet. This enables the easy adding of custom values to analyze the whole flowsheet and not restrict to a certain naming convention.
- class vclibpy.datamodels.Inputs(n: float | None = None, T_eva_in: float | None = None, T_con_in: float | None = None, m_flow_eva: float | None = None, m_flow_con: float | None = None, dT_eva_superheating: float | None = None, dT_con_subcooling: float | None = None, T_ambient: float | None = None)[source]
Bases:
VariableContainer
Class defining inputs to calculate the FlowsheetState.
While the inputs are pre-defined, you may add further ones using the set method.
- Args:
n (float): Relative compressor speed between 0 and 1. T_eva_in (float): Secondary side evaporator inlet temperature. T_con_in (float): Secondary side condenser inlet temperature. m_flow_eva (float): Secondary side evaporator mass flow rate. m_flow_con (float): Secondary side condenser mass flow rate. dT_eva_superheating (float): Super-heating after evaporator. dT_con_subcooling (float): Subcooling after condenser. T_ambient (float): Ambient temperature of the machine.
- class vclibpy.datamodels.Variable(name: str, value: float, unit: str | None = None, description: str | None = None)[source]
Bases:
object
Class for a variable used in analysis.
- Args:
name (str): The name of the variable. value (float): The numerical value of the variable. unit (str): The unit of measurement for the variable (optional). description (str): A description of the variable (optional).
- class vclibpy.datamodels.VariableContainer[source]
Bases:
object
Class which holds Variables to be used anywhere in the models.
This class enables dynamic addition of Variables.
- convert_to_str_value_format(with_unit_and_description: bool) Dict[str, float] [source]
Returns a dictionary with a str: float format which is handy when storing results in files like .csv or .xlsx.
- Args:
with_unit_and_description (bool): When False, only the name is in the string.
- Returns:
dict: Containing all variables and values.
- copy()[source]
Return a deepcopy of the instance as the variable dict is mutable.
- Returns:
VariableContainer: A deepcopy of the VariableContainer instance.
- get(name: str, default: Any | None = None)[source]
Get the Variable with the specified name.
- Args:
name (str): The name of the variable. default (Any): Default value to return if the variable is not found.
- Returns:
Variable: The Variable object.
- get_variable_names() list [source]
Get the names of all variables in the container.
- Returns:
list: A list of variable names.
- get_variables()[source]
Get all variables in the container.
- Returns:
Dict[str, Variable]: A dictionary of variable names and Variable objects.
- items()[source]
Get items from the container.
- Returns:
Dict[str, Variable]: A dictionary of variable names and Variable objects.
- set(name: str, value: float, unit: str | None = None, description: str | None = None)[source]
Add or update a Variable in the container.
- Args:
name (str): The name of the variable. value (float): The numerical value of the variable. unit (str): The unit of measurement for the variable (optional). description (str): A description of the variable (optional).