Engee documentation
Notebook

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:

heatex2.png

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:

heat_exchanger_physmod_1711717088198_3.png

Boundary conditions

At the first and last sections of the heat exchanger, the temperature is constant at 293.15 K:

$T_{i,1} = 293.15 K$,

$T_{i,20} = 293.15 K$.

Initial conditions:

The temperature at each point in the heat exchanger at the initial instant of time is 293.15 K:

${T_{0,j}} = 293.15K$.

Determination of the parameters of the heat exchanger elements and the environment:

In [ ]:
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:

In [ ]:
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
Out[0]:
start_model_engee (generic function with 1 method)

Running the simulation

In [ ]:
try
    start_model_engee() # запуск симуляции с помощью специальной функции, реализованной выше
    catch err
    end;

Selecting the temperature data of the plots from the simout variable and writing them to variables:

In [ ]:
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[:]
Out[0]:
10001-element Vector{Any}:
 293.15
 293.1497921718863
 293.1495843447339
 293.1493765185428
 293.14916869331296
 293.1489608690444
 293.14875304573707
 293.14854522339107
 293.14833740200635
 293.1481295815829
 293.1479217621207
 293.14771394361975
 293.1475061260801
   ⋮
 292.68003535201126
 292.6800341586253
 292.6800329658837
 292.6800317737862
 292.68003058233245
 292.68002939152205
 292.6800282013547
 292.6800270118301
 292.6800258229477
 292.68002463470737
 292.6800234471086
 292.6800222601512

Visualisation of simulation results

Calling the graphics library:

In [ ]:
using Plots

Connecting a backend - a method for displaying graphics:

In [ ]:
plotlyjs()
Out[0]:
Plots.PlotlyJSBackend()

Plotting the solution graph over time for segments 1 to 10 (from the left edge to the middle of the heat exchanger):

In [ ]:
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 отрезок")
Out[0]:

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.