Engee documentation
Notebook

House heating system

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

Schematic diagram of the model

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

A house exchanges heat with the environment through the walls, windows and roof. Each pathway is modelled as a combination of thermal convection, conduction and thermal mass. The heater starts blowing hot air if the room temperature falls below $18^\circ C$, and switches off if the temperature exceeds $23^\circ C$. The model calculates the heating cost and room temperature.

The manual switch allows to investigate the system behaviour when the heating system is switched off.

house_heat_sys_chart_13_03_25_09_19_36.png

House heat network subsystem

house_heat_sys_chart_13_03_25_09_02_33.png

Heater system

house_heat_sys_chart_13_03_25_09_20_01.png

Running and simulating the model

First 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 can be seen from the graphs, the thermostat keeps the temperature inside the house around $18-23^\circ C$.

Conclusion

In this example we have considered the modelling of a house heat network, implementing the heater control logic using the Finite Avomats library.