Engee documentation
Notebook

Home heating system

This example shows how to model a simple home heating system.

Model diagram

The model contains a heater, a thermostat, and a house structure consisting of four parts: indoor air, house walls, windows, and a roof.

The house exchanges heat with the environment through walls, windows and roof. Each path is modeled as a combination of thermal convection, thermal conductivity, and thermal mass. The heater starts pumping hot air if the room temperature drops below , and turns off if the temperature exceeds . The model calculates the cost of heating and the temperature in the room.

The manual switch allows you to investigate the behavior of the system when the heating system is turned off.

house_heat_sys_chart-13.03.25 09_19_36.png

Subsystem heating network of the house

house_heat_sys_chart-13.03.25 09_02_33.png

Heater system

house_heat_sys_chart-13.03.25 09_20_01.png

Launching and simulating the model

First, we'll load the model, then run the simulation.

In [ ]:
modelName = "house_heat_sys_chart";
model = modelName in [m.name for m in engee.get_all_models()] ? engee.open( modelName ) : engee.load( "$(@__DIR__)/$(modelName).engee");
In [ ]:
results = engee.run( modelName )
Out[0]:
SimulationResult(
    "Т в доме" => WorkspaceArray{Float64}("house_heat_sys_chart/Т в доме")
,
    "Т снаружи" => WorkspaceArray{Float64}("house_heat_sys_chart/Т снаружи")
,
    "Стоимость" => WorkspaceArray{Float64}("house_heat_sys_chart/Стоимость")

)
In [ ]:
res_t_house = results["Т в доме"].value;
res_t_atm = results["Т снаружи"].value;
res_cost = results["Стоимость"].value;
res_time = results["Стоимость"].time;
In [ ]:
gr()    #Включим неинтерактивный бэкенд для отображения графиков
Out[0]:
Plots.GRBackend()
In [ ]:
plot( res_time, [res_t_house res_t_atm], lab = ["Температура в доме" "Температура снаружи"] )
Out[0]:
In [ ]:
plot( res_time, res_cost, lab = "Стоимость отопления")
Out[0]:

As you can see from the graphs, the thermostat maintains the temperature inside the house in the area .

Conclusion

In this example, we consider the modeling of the heating network at home, the implementation of heater control logic using the library End avomats.