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 network subsystem¶
Heater system¶
Running and simulating the model¶
First load the model, then run the simulation.
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");
results = engee.run( modelName )
res_t_house = results["Т в доме"].value;
res_t_atm = results["Т снаружи"].value;
res_cost = results["Стоимость"].value;
res_time = results["Стоимость"].time;
gr() #Включим неинтерактивный бэкенд для отображения графиков
plot( res_time, [res_t_house res_t_atm], lab = ["Температура в доме" "Температура снаружи"] )
plot( res_time, res_cost, lab = "Стоимость отопления")
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.