Untitled

mail@pastecode.io avatar
unknown
matlab
24 days ago
1.2 kB
2
Indexable
Never
% Script for automated wear calculation in AVL Excite

% Version   Developer   Date        Comment
% v1        marvin      01.09.2023  Initial version
% v2        shiqi       02.09.2023  Improve display & compatibility with existing code


disp('Start thermal FE Model Pin temperature calculation...')

if THERMAL.i == 1
    THERMAL.initial_temperature = OPERATING_CONDITION.T(THERMAL.i)+273.15;              % in K    
else
    THERMAL.initial_temperature = THERMAL.result(THERMAL.i-1);  % after the first case, the initial temp will be the set the same as the last case transient result with the end time step
end

% set time start and end
THERMAL.solution_times = THERMAL.start_time:THERMAL.time_step:THERMAL.end_time;
THERMAL.number_of_solution_times = length(THERMAL.solution_times);

% copy heat input
heat_input = THERMAL.q_cond_s; 
faces_gear = THERMAL.faces_planetary_gear;
nonzero_indices = find(heat_input ~= 0);
THERMAL.heat_fluxes = heat_input(nonzero_indices)';
THERMAL.faces_heat_fluxes = faces_gear(nonzero_indices)';
THERMAL.faces_planetary_gear_diff = setdiff(THERMAL.faces_planetary_gear, THERMAL.faces_heat_fluxes);
clear nonzero_indices heat_input faces_gear;
Leave a Comment