Engee documentation
Notebook

Thermal scheme of the electric motor

This example demonstrates how the thermal state of a brushless motor can be modeled using a lumped-parameter model. The heat generated due to power losses in the stator, winding and rotor is represented by three sources of heat flow: heat generation in the stator (Q of the Stator), heat generation of the winding (Q of the Winding) and heat generation of the rotor due to losses due to magnetization and eddy currents (Q of the Rotor). The losses were recorded during the simulation of a typical electric motor cycle and stored in blocks Repeating table. The thermal circuit of the engine consists of heat-conducting elements, thermal masses and convective heat transfer units that reproduce the ways of heat propagation in parts: winding, stator, housing, rotor, front and rear bearing supports and flange. The engine exchanges heat with the atmosphere through the contacts housing-atmosphere, flange-atmosphere and bearing 1 -atmosphere. Environmental conditions are simulated using an ideal temperature source set at 300 K.

Model diagram:

motor_thermal_circuit--1733400267958.png

Defining the function to load and run the model:

In [ ]:
function start_model_engee()
    try
        engee.close("motor_thermal_circuit", force=true) # закрытие модели 
        catch err # в случае, если нет модели, которую нужно закрыть и engee.close() не выполняется, то будет выполнена её загрузка после catch
            m = engee.load("$(@__DIR__)/motor_thermal_circuit.engee") # загрузка модели
        end;

    try
        engee.run(m) # запуск модели
        catch err # в случае, если модель не загружена и engee.run() не выполняется, то будут выполнены две нижние строки после catch
            m = engee.load("$(@__DIR__)/motor_thermal_circuit.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;

Recording temperature and heat flow signals from simout to variables:

In [ ]:
t = collect(simout["Тепловая масса статора.T"].time[:])
Температура_ротора = collect(simout["Тепловая масса ротора.T"].value[:])
Температура_обмоток = collect(simout["Тепловая масса обмоток.T"].value[:])
Температура_статора = collect(simout["Тепловая масса статора.T"].value[:])
Температура_корпуса = collect(simout["Тепловая масса корпуса.T"].value[:])
Тепловыделение_ротора = collect(simout["Тепловая масса ротора.T"].value[:])
Тепловыделение_обмоток = collect(simout["Тепловая масса обмоток.T"].value[:])
Тепловыделение_статора = collect(simout["Тепловая масса статора.T"].value[:]);

Visualization of simulation results

In [ ]:
using Plots
In [ ]:
plot(t[:,1], Температура_ротора[:,1], label="Температура ротора, K", linewidth=2)
plot!(t[:,1], Температура_статора[:,1], label="Температура статора, K", linewidth=2)
plot!(t[:,1], Температура_обмоток[:,1], label="Температура обмоток, K", linewidth=2)
plot!(t[:,1], Температура_корпуса[:,1], label="Температура корпуса, K", linewidth=2, legend=:bottomright)
Out[0]:
In [ ]:
plot(t[:,1], Тепловыделение_ротора[:,1], label="Тепловыделение ротора, Вт", linewidth=2)
plot!(t[:,1], Тепловыделение_статора[:,1], label="Тепловыделение статора, Вт", linewidth=2)
plot!(t[:,1], Тепловыделение_обмоток[:,1], label="Тепловыделение обмоток, Вт", linewidth=2, legend=:bottomright)
Out[0]: