echo.models.thermal package

class echo.models.thermal.ParameterisedChiller(uid: str = NOTHING, node_name: str = NOTHING, ports: dict[str, Port] = NOTHING, objective: en.numeric_expr.NumericExpression | float = 0, max_output: float | None = None, min_output: float | None = None, max_input: float | None = None, min_input: float | None = None, input_port_ref: str = 'input', output_port_ref: str = 'output', input_points: dict | None = None, output_points: dict | None = None, input_points_ref: str | None = None, output_points_ref: str | None = None, partial_load_cop: dict = {0: 0, 0.25: 0.8, 0.5: 0.9, 0.75: 1, 1: 0.85}, temperature_dependent_cop: dict = {0: 0.7, 10: 1, 20: 0.5, 30: 0.35, 45: 0.2}, ambient_temperature_dict: dict = NOTHING, ambient_temperature_ref: str | None = None, constant_ambient_temperature: float = 10, input_port_unit: Units = Units.KW, output_port_unit: Units = Units.KWT, heat_rejection_port: bool = False, heat_rejection_coefficient: float = 1, heat_rejection_port_ref: str = 'heat_rejection', *, nominal_cop: float, max_cooling_capacity: float)

Bases: TimeVaryingPiecewiseIONode

A chiller has one electrical input port and one cooling output (thermal sink) port.

ParameterisedChiller is an input/output piecewise node, with a single set of input/output breakpoints representing chiller COP (Coefficient Of Performance = Output/Input=Cooling_delivered/Electricity_consumed) used for all time periods.

add_node_to_model(model: EchoConcreteModel, profile: DataFrame) → None

Add this node to a concrete model.

Parameters:
  • model – The concrete model to add the node to.

  • profile – The data associated with this node.

ambient_temperature_dict: dict
ambient_temperature_ref: str | None
constant_ambient_temperature: float
property electrical_input_port_ref: str
heat_rejection_coefficient: float
heat_rejection_port: bool
heat_rejection_port_ref: str
input_port_unit: Units
max_cooling_capacity: float
nominal_cop: float
output_port_unit: Units
partial_load_cop: dict
set_ports(electrical_input_port: FlexSink, cooling_output_port: FlexPort, heat_rejection_port: FlexPort | None = None) → None
property temperature_cop_param: str
temperature_dependent_cop: dict
property thermal_output_port_ref: str
update(ambient_temperature_dict: dict[float, float]) → None
class echo.models.thermal.ParameterisedHeatPump(uid: str = NOTHING, node_name: str = NOTHING, ports: dict[str, Port] = NOTHING, objective: en.numeric_expr.NumericExpression | float = 0, nominal_heating_cop: float = 1, nominal_cooling_cop: float = 1, partial_load_cop_heating: dict = {0: 0, 0.25: 0.8, 0.5: 0.9, 0.75: 1, 1: 0.85}, partial_load_cop_cooling: dict = {0: 0, 0.25: 0.8, 0.5: 0.9, 0.75: 1, 1: 0.85}, temperature_dependent_cop_heating: dict = {-10: 0.4, 0: 0.6, 10: 0.7, 20: 0.9, 30: 1, 45: 1}, temperature_dependent_cop_cooling: dict = {0: 0.7, 10: 1, 20: 0.5, 30: 0.35, 45: 0.2}, ambient_temperature_dict: dict = NOTHING, ambient_temperature_ref: str | None = None, constant_ambient_temperature: float = 10, heat_intake_rejection_port: bool = False, heat_intake_rejection_coefficient: float = 1, input_points_cooling: dict | None = None, output_points_cooling: dict | None = None, input_points_heating: dict | None = None, output_points_heating: dict | None = None, electrical_input_port_ref: str = 'input', thermal_output_port_ref: str = 'output', heat_intake_rejection_port_ref: str = 'heat_intake_rejection', *, max_heating_capacity: float, max_cooling_capacity: float)

Bases: Node

A Parameterised heat pump model.

This model is different to simple heatpump model in that it uses piecewise linear partial load COP factor (coefficient of performance) and piecewise linear temperature COP factor to calculate actual values for heating and cooling at each step.

HeatPumpTwoPipe has one input electrical port and one bidirectional thermal port. The heat pump can do heating or cooling, but not both simultaneously.

The conversion of input electrical energy to heating or cooling output depends on calculated coefficients of performance (COP) at each time step.

add_node_to_model(model: EchoConcreteModel, profile: DataFrame) → None

Set up variables and parameters associated with the node

ambient_temperature_dict: dict
ambient_temperature_ref: str | None
apply_node_constraints(model: EchoConcreteModel) → None

Set up constraints associated with the node

constant_ambient_temperature: float
create_ports() → None
electrical_input_port_ref: str
heat_intake_rejection_coefficient: float
heat_intake_rejection_port: bool
heat_intake_rejection_port_ref: str
input_points_cooling: dict | None
input_points_heating: dict | None
max_cooling_capacity: float
max_heating_capacity: float
nominal_cooling_cop: float
nominal_heating_cop: float
output_points_cooling: dict | None
output_points_heating: dict | None
partial_load_cop_cooling: dict
partial_load_cop_heating: dict
property power_to_cool: str
property power_to_heat: str
set_ports(electrical_input_port: FlexSink, thermal_output_port: FlexPort, heat_intake_rejection_port: FlexPort | None = None) → None
property temperature_cop_cooling_param: str
property temperature_cop_heating_param: str
temperature_dependent_cop_cooling: dict
temperature_dependent_cop_heating: dict
thermal_output_port_ref: str
update(ambient_temperature_dict: dict[float, float]) → None
class echo.models.thermal.SimpleChiller(uid: str = NOTHING, node_name: str = NOTHING, ports: dict[str, Port] = NOTHING, objective: en.numeric_expr.NumericExpression | float = 0, max_cooling_capacity: float | None = None, cooling_cop_time_series: dict | None = None, cooling_cop_time_series_ref: str | None = None, cooling_cop_constant: float = 1, electrical_input_port_ref: str = 'input', thermal_output_port_ref: str = 'output')

Bases: Node

A simple chiller model that uses predefined COP (coefficient of performance) values for cooling.

Simple Chiller has one input electrical port, and one cooling_output (thermal Sink) thermal port.

The conversion of input electrical energy to cooling output depends on provided coefficients of performance (COP) time series data.

add_node_to_model(model: EchoConcreteModel, profile: DataFrame) → None

Add this node to a concrete model.

Parameters:
  • model – The concrete model to add the node to.

  • profile – The data associated with this node.

apply_node_constraints(model: EchoConcreteModel) → None

Apply constraints associated with this node to a concrete model.

Intended to be overridden in subclasses.

Define constraints as functions that returns a Constraint, EqualityExpression or InequalityExpression.

Define a subfunction of the form detailed in the example below, then apply with setattr. For example:

def apply_node_constraints(self, model: EchoConcreteModel) -> None:
def tellegen_node_rule(model: EchoConcreteModel, p: int, t:int) -> EqualityExpression:

a = 0 for port in node_ports.values():

a += getattr(model, port.port_name)[p, t]

return a == 0

node_ports = self.ports con_name = “reliability_con_” + self.node_name setattr(model, con_name, en.Constraint(model.Expansion, model.Time, rule=tellegen_node_rule))

Parameters:

model – The model to add the constraints to.

Returns:

None

property cooling_cop: str
cooling_cop_constant: float
cooling_cop_time_series: dict | None
cooling_cop_time_series_ref: str | None
electrical_input_port_ref: str
max_cooling_capacity: float | None
set_ports(electrical_input_port: FlexSink, thermal_output_port: FlexPort) → None
thermal_output_port_ref: str
update(cooling_cop_time_series: dict[float, float]) → None
class echo.models.thermal.SimpleHeatPump(uid: str = NOTHING, node_name: str = NOTHING, ports: dict[str, Port] = NOTHING, objective: en.numeric_expr.NumericExpression | float = 0, max_cooling_capacity: float | None = None, max_heating_capacity: float | None = None, heating_cop_time_series: dict | None = None, cooling_cop_time_series: dict | None = None, heating_cop_time_series_ref: str | None = None, cooling_cop_time_series_ref: str | None = None, cooling_cop_constant: float = 1, heating_cop_constant: float = 1, electrical_input_port_ref: str = 'input', thermal_output_port_ref: str = 'output')

Bases: Node

A simple heat pump model that uses predefined COP (coefficient of performance) values for heating and cooling.

SimpleHeatPump has one input electrical port, and one bidirectional thermal port. In this configuration the heatpump can do heating or cooling, but not both simultaneously.

The conversion of input electrical energy to heating or cooling output depends on provided coefficients of performance (COP) time series data.

add_node_to_model(model: EchoConcreteModel, profile: DataFrame) → None

Add this node to a concrete model.

Parameters:
  • model – The concrete model to add the node to.

  • profile – The data associated with this node.

apply_node_constraints(model: EchoConcreteModel) → None

Apply constraints associated with this node to a concrete model.

Intended to be overridden in subclasses.

Define constraints as functions that returns a Constraint, EqualityExpression or InequalityExpression.

Define a subfunction of the form detailed in the example below, then apply with setattr. For example:

def apply_node_constraints(self, model: EchoConcreteModel) -> None:
def tellegen_node_rule(model: EchoConcreteModel, p: int, t:int) -> EqualityExpression:

a = 0 for port in node_ports.values():

a += getattr(model, port.port_name)[p, t]

return a == 0

node_ports = self.ports con_name = “reliability_con_” + self.node_name setattr(model, con_name, en.Constraint(model.Expansion, model.Time, rule=tellegen_node_rule))

Parameters:

model – The model to add the constraints to.

Returns:

None

property cooling_cop: str
cooling_cop_constant: float
cooling_cop_time_series: dict | None
cooling_cop_time_series_ref: str | None
create_ports() → None
electrical_input_port_ref: str
property heating_cop: str
heating_cop_constant: float
heating_cop_time_series: dict | None
heating_cop_time_series_ref: str | None
max_cooling_capacity: float | None
max_heating_capacity: float | None
property power_to_cool: str
property power_to_heat: str
set_ports(electrical_input_port: FlexSink, thermal_output_port: FlexPort) → None
thermal_output_port_ref: str
update(heating_cop_time_series: dict[float, float], cooling_cop_time_series: dict[float, float]) → None
class echo.models.thermal.SimpleHeatPumpDualOutput(uid: str = NOTHING, node_name: str = NOTHING, ports: dict[str, Port] = NOTHING, objective: en.numeric_expr.NumericExpression | float = 0, max_cooling_capacity: float | None = None, max_heating_capacity: float | None = None, heating_cop_time_series: dict | None = None, cooling_cop_time_series: dict | None = None, heating_cop_time_series_ref: str | None = None, cooling_cop_time_series_ref: str | None = None, cooling_cop_constant: float = 1, heating_cop_constant: float = 1, thermal_output_port_ref: str = 'output', waste_heat_recovery_coeff: float = 1, electrical_input_port_ref: str = 'input', cooling_output_port_ref: str = 'cooling_output', heating_output_port_ref: str = 'heating_output')

Bases: SimpleHeatPump

A simple dual output (four-pipe) heatpump model that uses predefined COP values for heating and cooling.

SimpleHeatPumpDualOutput has one input electrical port and two thermal ports: cooling_output (thermal Sink) and heating_output (thermal Source). In dual output configuration the heatpump can do heating and cooling simultaneously and independently. When heating and cooling simultaneously, the waste heat from cooling loop can be used in the heating loop.

The conversion of input electrical energy to heating or cooling output depends on provided coefficients of performance (COP) time series data.

add_node_to_model(model: EchoConcreteModel, profile: DataFrame) → None

Add this node to a concrete model.

Parameters:
  • model – The concrete model to add the node to.

  • profile – The data associated with this node.

apply_node_constraints(model: EchoConcreteModel) → None

Apply constraints associated with this node to a concrete model.

Intended to be overridden in subclasses.

Define constraints as functions that returns a Constraint, EqualityExpression or InequalityExpression.

Define a subfunction of the form detailed in the example below, then apply with setattr. For example:

def apply_node_constraints(self, model: EchoConcreteModel) -> None:
def tellegen_node_rule(model: EchoConcreteModel, p: int, t:int) -> EqualityExpression:

a = 0 for port in node_ports.values():

a += getattr(model, port.port_name)[p, t]

return a == 0

node_ports = self.ports con_name = “reliability_con_” + self.node_name setattr(model, con_name, en.Constraint(model.Expansion, model.Time, rule=tellegen_node_rule))

Parameters:

model – The model to add the constraints to.

Returns:

None

cooling_output_port_ref: str
create_ports() → None
property delta_heat_flow: str
electrical_input_port_ref: str
property heating_out_adjusted: str

heating_out_adjusted variable represents amount of heat that is produced running the primary heating loop.

heating_output_port_ref: str
property recovered_waste_heat: str
set_ports(electrical_input_port: FlexSink, cooling_output_port: FlexSink, heating_output_port: FlexSource) → None
waste_heat_recovery_coeff: float
class echo.models.thermal.ThermalStorage(uid: str = NOTHING, node_name: str = NOTHING, ports: dict[str, Port] = NOTHING, objective: en.numeric_expr.NumericExpression | float = 0, charging_power_limit: float | None = None, discharging_power_limit: float | None = None, ambient_temp: dict | None = None, ambient_temp_ref: str | None = None, ins_transmittance: float = 0, surface_area: float = 0, initial_temp: float | None = None, optimised_capacity: bool = False, enforce_end_temperature_value: bool = True, energy_flow_units: Units = Units.KWT, separate_in_out_ports: bool = False, input_port_ref: str = 'input', output_port_ref: str = 'output', input_output_port_ref: str = 'input_output', *, max_temp: float, min_temp: float, storage_mass: float, specific_heat: float)

Bases: Node

Model of sensible thermal storage with liquid or solid storage medium.

Thermal storage keeps track of its internal temperature value base. Assumes homogeneous temperature throughout the storage volume.

add_node_to_model(model: EchoConcreteModel, profile: DataFrame) → None

Add this node to a concrete model.

Parameters:
  • model – The concrete model to add the node to.

  • profile – The data associated with this node.

ambient_temp: dict | None
ambient_temp_ref: str | None
charging_power_limit: float | None
discharging_power_limit: float | None
energy_flow_units: Units
property energy_units_conversion: float
enforce_end_temperature_value: bool
initial_temp: float | None
input_output_port_ref: str
input_port_ref: str
ins_transmittance: float
property internal_temp: str
property lump_capacitance: float
property lump_conductance: float
property max_heat_storage_capacity: float
max_temp: float
min_temp: float
property net_loss_gain: str
optimised_capacity: bool
output_port_ref: str
separate_in_out_ports: bool
set_flow_constraints_one_port() → None
set_flow_constraints_separate_ports() → None
set_port(input_output_port: FlexPort) → None

Replaces any existing ports with a combined input output port

set_ports(input_port: FlexSink, output_port: FlexSource) → None

Replaces any existing ports with separate input and output ports

property soc_constraint: str
property soc_value: str
specific_heat: float
storage_mass: float
surface_area: float
update(ambient_temp: dict[tuple[int, int], float]) → None

Submodules