1
1
classdef ThermalInterface < mcadinterface .BasicInterface
2
2
% THERMALINTERFACE Motor-CAD interface for thermal modeling workflows.
3
3
4
- % Copyright 2022-2023 The MathWorks, Inc.
4
+ % Copyright 2022-2025 The MathWorks, Inc.
5
5
6
6
properties (SetAccess = protected )
7
7
workingDirectory % Working directory
29
29
Iron_Loss_Rotor_Tooth_Mat (: ,: ) double % Rotor tooth iron loss map [W]
30
30
Friction_Loss_Mat (: ,: ) double % Friction loss map [W]
31
31
Windage_Loss_Mat (: ,: ) double % Windage loss map [W]
32
+ Stator_Copper_Loss_AC_Mat (: ,: ) double % Stator copper AC loss map [W]
33
+ Banding_Loss_Mat (: ,: ) double % Banding loss map [W]
34
+ Sleeve_Loss_Mat (: ,: ) double % Windage loss map [W]
32
35
33
36
% Thermal matrices
34
37
@@ -481,6 +484,21 @@ function updateLabLossTables(obj)
481
484
else % this machine type does not include this loss type
482
485
Windage_Loss = zeros(size(Speed ));
483
486
end
487
+ if isfield(outLoad , ' Stator_Copper_Loss_AC' )
488
+ Stator_Copper_Loss_AC = outLoad .Stator_Copper_Loss_AC ;
489
+ else % this machine type does not include this loss type
490
+ Stator_Copper_Loss_AC = zeros(size(Speed ));
491
+ end
492
+ if isfield(outLoad , ' Banding_Loss' )
493
+ Banding_Loss = outLoad .Banding_Loss ;
494
+ else % this machine type does not include this loss type
495
+ Banding_Loss = zeros(size(Speed ));
496
+ end
497
+ if isfield(outLoad , ' Sleeve_Loss' )
498
+ Sleeve_Loss = outLoad .Sleeve_Loss ;
499
+ else % this machine type does not include this loss type
500
+ Sleeve_Loss = zeros(size(Speed ));
501
+ end
484
502
485
503
obj.Speed_Mat = Speed ;
486
504
obj.Shaft_Torque_Mat = Shaft_Torque ;
@@ -495,6 +513,9 @@ function updateLabLossTables(obj)
495
513
obj.Iron_Loss_Rotor_Tooth_Mat = Iron_Loss_Rotor_Tooth ;
496
514
obj.Friction_Loss_Mat = Friction_Loss ;
497
515
obj.Windage_Loss_Mat = Windage_Loss ;
516
+ obj.Stator_Copper_Loss_AC_Mat = Stator_Copper_Loss_AC ;
517
+ obj.Banding_Loss_Mat = Banding_Loss ;
518
+ obj.Sleeve_Loss_Mat = Sleeve_Loss ;
498
519
499
520
end
500
521
@@ -803,6 +824,9 @@ function updateLabLossTables(obj)
803
824
[~ ,~ ,xIron_Loss_Rotor_Tooth_Mat ] = reInterpolateTable(obj .Shaft_Torque_Mat , obj .Speed_Mat , obj .Iron_Loss_Rotor_Tooth_Mat );
804
825
[~ ,~ ,xFriction_Loss_Mat ] = reInterpolateTable(obj .Shaft_Torque_Mat , obj .Speed_Mat , obj .Friction_Loss_Mat );
805
826
[~ ,~ ,xWindage_Loss_Mat ] = reInterpolateTable(obj .Shaft_Torque_Mat , obj .Speed_Mat , obj .Windage_Loss_Mat );
827
+ [~ ,~ ,xStator_Copper_Loss_AC_Mat ] = reInterpolateTable(obj .Shaft_Torque_Mat , obj .Speed_Mat , obj .Stator_Copper_Loss_AC_Mat );
828
+ [~ ,~ ,xBanding_Loss_Mat ] = reInterpolateTable(obj .Shaft_Torque_Mat , obj .Speed_Mat , obj .Banding_Loss_Mat );
829
+ [~ ,~ ,xSleeve_Loss_Mat ] = reInterpolateTable(obj .Shaft_Torque_Mat , obj .Speed_Mat , obj .Sleeve_Loss_Mat );
806
830
807
831
808
832
% Get PowerLossDistributor params
@@ -843,7 +867,10 @@ function updateLabLossTables(obj)
843
867
' Iron_Loss_Rotor_Back_Iron_Mat' , ' Iron_Loss_Rotor_Back_Iron_Mat' , ...
844
868
' Iron_Loss_Rotor_Tooth_Mat' , ' Iron_Loss_Rotor_Tooth_Mat' , ...
845
869
' Friction_Loss_Mat' , ' Friction_Loss_Mat' , ...
846
- ' Windage_Loss_Mat' , ' Windage_Loss_Mat' ...
870
+ ' Windage_Loss_Mat' , ' Windage_Loss_Mat' , ...
871
+ ' Stator_Copper_Loss_AC_Mat' , ' Stator_Copper_Loss_AC_Mat' , ...
872
+ ' Banding_Loss_Mat' , ' Banding_Loss_Mat' , ...
873
+ ' Sleeve_Loss_Mat' , ' Sleeve_Loss_Mat' ...
847
874
);
848
875
hInTorque = add_block(' simulink/Commonly Used Blocks/In1' , strcat(romSubsysPath , ' /ShaftTorque_Nm' ));
849
876
hInSpeed = add_block(' simulink/Commonly Used Blocks/In1' , strcat(romSubsysPath , ' /ShaftSpeed_RPM' ));
@@ -943,6 +970,9 @@ function updateLabLossTables(obj)
943
970
assignin(mdlWks ,' Iron_Loss_Rotor_Tooth_Mat' , xIron_Loss_Rotor_Tooth_Mat );
944
971
assignin(mdlWks ,' Friction_Loss_Mat' , xFriction_Loss_Mat );
945
972
assignin(mdlWks ,' Windage_Loss_Mat' , xWindage_Loss_Mat );
973
+ assignin(mdlWks ,' Stator_Copper_Loss_AC_Mat' , xStator_Copper_Loss_AC_Mat );
974
+ assignin(mdlWks ,' Banding_Loss_Mat' , xBanding_Loss_Mat );
975
+ assignin(mdlWks ,' Sleeve_Loss_Mat' , xSleeve_Loss_Mat );
946
976
assignin(mdlWks ,' TrefStator' , TrefStator );
947
977
assignin(mdlWks ,' TrefRotor' , TrefRotor );
948
978
assignin(mdlWks ,' StatorCopperTempCoefResistivity' , xStatorCopperTempCoefResistivity );
0 commit comments