vclibpy.components package

Subpackages

Submodules

vclibpy.components.component module

class vclibpy.components.component.BaseComponent[source]

Bases: ABC

Abstract base class for defining interfaces of components in the vapor compression cycle.

Methods:
start_secondary_med_prop():

To use multiprocessing, MedProp can’t start in the main thread, as the object can’t be pickled. This function starts possible secondary MedProp classes, for instance in heat exchangers. The default component does not have to override this function.

Properties:
state_inlet (ThermodynamicState):

Property for accessing and setting the inlet state of the component.

state_outlet (ThermodynamicState):

Property for accessing and setting the outlet state of the component.

m_flow (float):

Property for accessing and setting the mass flow rate through the component.

med_prop (MedProp):

Property for accessing and setting the property wrapper for the working fluid.

property m_flow: float

Get or set the mass flow rate through the component.

Returns:

float: Mass flow rate through the component.

property med_prop: MedProp

Get or set the property wrapper for the working fluid.

Returns:

MedProp: Property wrapper for the working fluid.

start_secondary_med_prop()[source]

Start secondary MedProp classes for multiprocessing.

To use multiprocessing, MedProp can’t start in the main thread, as the object can’t be pickled. This function starts possible secondary MedProp classes, for instance in heat exchangers. The default component does not have to override this function.

property state_inlet: ThermodynamicState

Get or set the inlet state of the component.

Returns:

ThermodynamicState: Inlet state of the component.

property state_outlet: ThermodynamicState

Get or set the outlet state of the component.

Returns:

ThermodynamicState: Outlet state of the component.

terminate_secondary_med_prop()[source]

To use multi-processing, MedProp can’t start in the main thread, as the object can’t be pickled.

This function terminates possible secondary med-prop classes, for instance in heat exchangers. The default component does not have to override this function.

vclibpy.components.phase_separator module

Module with a simple phase separator model.

class vclibpy.components.phase_separator.PhaseSeparator[source]

Bases: BaseComponent

A simple phase separator model.

property state_inlet: ThermodynamicState

Get or set the inlet state of the component.

Returns:

ThermodynamicState: Inlet state of the component.

property state_outlet: ThermodynamicState

Get or set the outlet state of the component.

Returns:

ThermodynamicState: Outlet state of the component.

property state_outlet_liquid: ThermodynamicState

Getter for the outlet state of the liquid phase.

Returns:

ThermodynamicState: Outlet state for the liquid phase.

property state_outlet_vapor: ThermodynamicState

Getter for the outlet state of the vapor phase.

Returns:

ThermodynamicState: Outlet state for the vapor phase.