forked from WoodenJin/Motor-Optimization
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcalc_phys_props.asv
50 lines (42 loc) · 1.62 KB
/
calc_phys_props.asv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
function [mass, m_stator, m_rotor, j_rotor, r_phase, p_ir] = calc_phys_props(g, i, j)
%%% Calculate masses, inertias, resistance, eventually inductances %%%
if(nargin <2)
i = 0;
j = 0;
end
%%% Get material densities %%%
material_densities;
%%% stator laminations %%%
mo_clearblock;
mo_groupselectblock(1);
v_s_steel = mo_blockintegral(10)*g.s.slots/g.n_s;
m_s_steel = v_s_steel*densities(g.s.material);
%%% windings %%%
p = 1.68e-8; % Copper resistivity in Ohm-meters
mo_clearblock;
mo_groupselectblock(11);
a_s_windings = g.s.ff*mo_blockintegral(5)/g.n_s; % Slot area * fill factor
l_s_windings = 1e-3*(g.depth + g.s.span*g.s.theta*norm(mean(g.s.p6' + g.s.p9'))); % single slot plus single end-turn length
v_s_windings = l_s_windings*a_s_windings*g.s.slots;
m_s_windings = v_s_windings*densities('Copper');
r_phase = p*l_s_windings*g.s.slots/(a_s_windings*3); % divide by 3 for single phase length
% Still need to add in end-turn resistance
%%% rotor steel %%%
mo_clearblock;
mo_groupselectblock(2);
v_r_steel = mo_blockintegral(10)*2*g.r.ppairs/g.n_p;
m_r_steel = v_r_steel*densities(g.r.backiron_material);
j_r_steel = mo_blockintegral(24)*densities(g.r.backiron_material)*2*g.r.ppairs/g.n_p;
%%% rotor magnets %%%
mo_clearblock;
mo_groupselectblock(12);
v_r_magnet = mo_blockintegral(10)*2*g.r.ppairs/g.n_p;
m_r_magnet = v_r_magnet*densities(g.r.magnet_type);
j_r_magnet = mo_blockintegral(24)*densities(g.r.magnet_type)*2*g.r.ppairs/g.n_p;
mo_clearblock;
m_stator = m_s_steel + m_s_windings;
m_rotor = m_r_steel + m_r_magnet;
mass = m_stator + m_rotor;
j_rotor = j_r_steel + j_r_magnet;
p_ir = 1.5*r_phase*i^2;
end