Physical model of the temperature field of a flat radiation heat exchanger
This example will look at modelling a planar radiation heat exchanger, similar to the one presented in the example /user/start/examples/math_and_optimization/heat_exchanger/heat_exchanger.ngscript, using the blocks of the thermal physics library.
Calculation diagram of the heat exchanger with partitioning into elements:

In implementing this calculation scheme in Engee, elements of the thermal library of physical modelling were used.
The key blocks used in the model are:
- Temperature Source block realising boundary conditions on the temperature of the extreme (1 and 20) sections of the heat exchanger
- Controlled Heat Flow Rate Source heat source characterising heat flow from the Sun
- Thermal Mass in this model is used as an element of the heat exchanger, according to the calculation scheme, and also as an element of space, into which heat from the heat exchanger is radiated.
- Radiative Heat Transfer characterises the heat transfer by radiation from the heat exchanger element to the outer space.
- Thermal Resistance thermal resistance between elements
Engee Model:

Boundary conditions
At the first and last sections of the heat exchanger, the temperature is constant at 293.15 K:
,
.
Initial conditions:
The temperature at each point in the heat exchanger at the initial instant of time is 293.15 K:
.
Determination of the parameters of the heat exchanger elements and the environment:
init_T = 293.15 # начальная температура каждого участка теплообменника
res = 0.167 # тепловое сопротивление между участками теплообменника
mass = 0.003375 # масса элемента теплообменника
c = 903.7 # теплоёмкость материала (алюминий)
F = 0.00025 # площадь поверхности элемента для расчёта теплового излучения
cosm_tepl = 10000000.0 # теплоёмкость космического пространства (условно бесконечная)
sigma = 5.6e-8; # постоянная Стефана-Больцмана
soln_teplo = 0.0400047; # тепловой поток от Солнца, поглащаемый участком теплообменника
Definition of the function to load and run the model:
function start_model_engee()
try
engee.close("heat_exchanger_physmod", force=true) # закрытие модели
catch err # в случае, если нет модели, которую нужно закрыть и engee.close() не выполняется, то будет выполнена её загрузка после catch
m = engee.load("/user/start/examples/physmod/heat_exchanger_physmod/heat_exchanger_physmod.engee") # загрузка модели
end;
try
engee.run(m) # запуск модели
catch err # в случае, если модель не загружена и engee.run() не выполняется, то будут выполнены две нижние строки после catch
m = engee.load("/user/start/examples/physmod/heat_exchanger_physmod/heat_exchanger_physmod.engee") # загрузка модели
engee.run(m) # запуск модели
end
end
Running the simulation
try
start_model_engee() # запуск симуляции с помощью специальной функции, реализованной выше
catch err
end;
Selecting the temperature data of the plots from the simout variable and writing them to variables:
sleep(5)
T1 = simout["heat_exchanger_physmod/Левый край.T"].value[:] # вывод данных о температуре первого участка
T2 = simout["heat_exchanger_physmod/2.T"].value[:] # вывод данных о температуре второго участка
T3 = simout["heat_exchanger_physmod/3.T"].value[:]
T4 = simout["heat_exchanger_physmod/4.T"].value[:]
T5 = simout["heat_exchanger_physmod/5.T"].value[:]
T6 = simout["heat_exchanger_physmod/6.T"].value[:]
T7 = simout["heat_exchanger_physmod/7.T"].value[:]
T8 = simout["heat_exchanger_physmod/8.T"].value[:]
T9 = simout["heat_exchanger_physmod/9.T"].value[:]
T10 = simout["heat_exchanger_physmod/10.T"].value[:]
Visualisation of simulation results
Calling the graphics library:
using Plots
Connecting a backend - a method for displaying graphics:
plotlyjs()
Plotting the solution graph over time for segments 1 to 10 (from the left edge to the middle of the heat exchanger):
plot()
plot(collect(0:0.01:100.0), T1, label="1 отрезок")
plot!(collect(0:0.01:100.0), T2, label="2 отрезок")
plot!(collect(0:0.01:100.0), T3, label="3 отрезок")
plot!(collect(0:0.01:100.0), T4, label="4 отрезок")
plot!(collect(0:0.01:100.0), T5, label="5 отрезок")
plot!(collect(0:0.01:100.0), T6, label="6 отрезок")
plot!(collect(0:0.01:100.0), T7, label="7 отрезок")
plot!(collect(0:0.01:100.0), T8, label="8 отрезок")
plot!(collect(0:0.01:100.0), T9, label="9 отрезок")
plot!(collect(0:0.01:100.0), T10, label="10 отрезок")
Conclusion:
This example demonstrated the simulation of a planar heat exchanger created from thermal library blocks. The simulation results are numerically close to those obtained by numerically solving the differential heat conduction equation, from which it can be concluded that the approach of representing the sections as separate thermal masses is correct.