Skip to content
Snippets Groups Projects

Add corsica liuqe complete ids from meq

Merged Olivier Sauter requested to merge add_corsica_liuqe_complete_ids_from_meq into master
1 file
+ 8
5
Compare changes
  • Side-by-side
  • Inline
+ 8
5
@@ -31,9 +31,9 @@ pointr = zeros(numel(AC),4);
pointz = zeros(numel(AC),4);
discretizationr = [];
discretizationz = [];
Twc = []; % Grouping matrix from windings to active coil
Twc = []; % Grouping matrix from coils to windings Iw = Twc*Ic
for ii = 1:numel(AC) % loop all the coils given vvstructure
% Find 4 extrema of the parallelogram
% Find 4 extrema of the parallelogram. Working both for rectangular description and parallelogram description
% D----C
% / /
% A----B
@@ -47,7 +47,7 @@ for ii = 1:numel(AC) % loop all the coils given vvstructure
pointz(ii,2) = Z(ii) +dZ(ii)/2;
pointz(ii,3) = Z(ii) +dZ(ii)/2;
pointz(ii,4) = Z(ii) -dZ(ii)/2;
elseif AC(ii) ~= 0 && AC2(ii) ==0
elseif AC(ii) ~= 0 && AC2(ii) ==0 % Parallelogramm
DH = dR(ii)*tand(AC(ii));
pointr(ii,1) = R(ii) - dR(ii)/2;
pointr(ii,2) = R(ii) - dR(ii)/2;
@@ -57,7 +57,10 @@ for ii = 1:numel(AC) % loop all the coils given vvstructure
pointz(ii,2) = Z(ii) - DH/2 +dZ(ii)/2;
pointz(ii,3) = Z(ii) + DH/2 +dZ(ii)/2;
pointz(ii,4) = Z(ii) + DH/2 -dZ(ii)/2;
elseif AC2(ii) == 0 && AC(ii) ==0
elseif AC2(ii) == 0 && AC(ii) ==0 % Rectangular description
% 2----3
% | |
% 1----4
pointr(ii,1) = R(ii) -dR(ii)/2;
pointr(ii,2) = R(ii) -dR(ii)/2;
pointr(ii,3) = R(ii) +dR(ii)/2;
@@ -98,7 +101,7 @@ for ii = 1:numel(AC) % loop all the coils given vvstructure
% distrubution that nicely resamble the geometry of the coil section,
% but will not necessarily generate a number of windings = number of
% turns. The following normalization garanties that the total current
% flowing in the cross section of coil Iw*nw = Ia*nturns respect the input data.
% flowing in the cross section of coil Iw*nw = Ia*nturns respects the input data.
Twc(end+1:end+num1*num2,end+1) = 1*sign(num(ii))/(num1*num2)*num(ii);
end
Loading