echo.models.thermal.simple_heatpump module
- class echo.models.thermal.simple_heatpump.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:
NodeA 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
- thermal_output_port_ref: str
- update(heating_cop_time_series: dict[float, float], cooling_cop_time_series: dict[float, float]) None