Skip to content

Commit

Permalink
Update to SyR-e v3.2
Browse files Browse the repository at this point in the history
Main GUI updates:
- 2D structural analysis (with Matlab PDE Toolbox)
- peak short-circuit current evaluation (HWC condition, see ECCE2021 paper)
- added radial geometrical scaling to main GUI
- added the possibility to load a custom geometry from the FEMM file (after dxf import in FEMM)
- improved the possibility to easily select the number of quadrants for flux maps evaluation
- Motor-CAD interface improved
- added the export to Ansys-Maxwell (still work-in-progress)

MMM GUI updates:
- transient short-circuit computation (see ECCE2021 paper)
- updated the field names in motorModel structure
- added the possibility to change the dq-axis convention (from SyR to PM motor and vice versa)
- added end-winding length (to avoid AC Joule loss model overestimation)

Other updates:
- new PM-SyRM model (THOR), with MMM data (see ECCE2021, WEMDCD2021 or ECCE2019 papers)
- added the MMM data to mot_01 and RAWP motors
- updated the user manual (merge between main GUI and MMM) and updated reference list

Some bug fixed
  • Loading branch information
SimFerr committed Oct 5, 2021
1 parent deb6cc4 commit ae2a79c
Show file tree
Hide file tree
Showing 154 changed files with 10,107 additions and 3,960 deletions.
Binary file modified GUI_Syre.mlapp
Binary file not shown.
Binary file modified GUI_Syre_MMM.mlapp
Binary file not shown.
Binary file not shown.
Binary file removed Readme/MMM quickstart guide.docx
Binary file not shown.
Binary file removed Readme/SyR-e_references.docx
Binary file not shown.
Binary file removed Readme/SyR-e_user_manual_wip.docx
Binary file not shown.
Binary file added Readme/syreManual.pdf
Binary file not shown.
Binary file added Readme/syreReferences.pdf
Binary file not shown.
14 changes: 14 additions & 0 deletions koil/koil.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
% Data for the winding with Q = 9 slots and p = 3 pole pairs
% Winding factor:
kw = 8.660e-001;
% Coil pitch:
yq = 1;

% slot matrix of phase A. Elements: 9
ka = [ 0.5, -0.5, 0.0, 0.5, -0.5, 0.0, 0.5, -0.5, 0.0];

% slot matrix of phase B. Elements: 9
kb = [ 0.0, 0.5, -0.5, 0.0, 0.5, -0.5, 0.0, 0.5, -0.5];

% slot matrix of phase C. Elements: 9
kc = [ -0.5, 0.0, 0.5, -0.5, 0.0, 0.5, -0.5, 0.0, 0.5];
Binary file added koil/koil_syre.exe
Binary file not shown.
Binary file added koil/libgcc_s_dw2-1.dll
Binary file not shown.
Binary file added koil/libstdc++-6.dll
Binary file not shown.
149 changes: 97 additions & 52 deletions mfiles/DrawAndSaveMachine.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,64 +23,109 @@
% dataSet=app.dataSet;
% end

if nargin==1
[filename,pathname] = uiputfile(['newmachine.fem'],'input machine name and location');
if ~filename
error('No file name selected');
end
else
filename = strrep(filename,'.mat','.fem');
end
nameIn = dataSet.currentfilename;
nameIn = strrep(nameIn,'.mat','.fem');
pathIn = dataSet.currentpathname;
fileIn = [pathIn nameIn];

[~, ~, geo, per, mat] = data0(dataSet);
RQ = dataSet.RQ;
if dataSet.custom
button = questdlg('Save custom machine?','SELECT','Yes','Cancel','Yes');

%% ==== FIRST PART FROM FEMMFitnessX ======================================
% currentDir = pwd;
end

% RQ defines the candidate machine
% [geo,gamma,mat] = interpretRQ(RQ,geo,mat);
if dataSet.custom==0 || (isequal(button,'Yes') && (dataSet.custom))
if nargin==1
[filename,pathname] = uiputfile(['newmachine.fem'],'input machine name and location');
if ~filename
error('No file name selected');
end
else
filename = strrep(filename,'.mat','.fem');
end

[~, ~, geo, per, mat] = data0(dataSet);
RQ = dataSet.RQ;

fileans = strrep(filename,'.fem','.ans');

geo.custom = dataSet.custom;

% FemmProblem.ProbInfo.Frequency = 0;
% FemmProblem.ProbInfo.Precision = 1e-8;
% FemmProblem.ProbInfo.MinAngle = 15;
% FemmProblem.ProbInfo.LengthUnits = 'millimeters';
% FemmProblem.ProbInfo.Depth = geo.l;
% FemmProblem.Segments = [];
% FemmProblem.ArcSegments = [];
% FemmProblem.Nodes = [];
% FemmProblem.BoundaryProps = [];
% FemmProblem.Circuits = [];
% FemmProblem.BlockLabels = [];
% FemmProblem.PointProps = [];
eval_type = 'singt';
%% ==== FIRST PART FROM FEMMFitnessX ======================================
% currentDir = pwd;

% RQ defines the candidate machine
% [geo,gamma,mat] = interpretRQ(RQ,geo,mat);

% FemmProblem.ProbInfo.Frequency = 0;
% FemmProblem.ProbInfo.Precision = 1e-8;
% FemmProblem.ProbInfo.MinAngle = 15;
% FemmProblem.ProbInfo.LengthUnits = 'millimeters';
% FemmProblem.ProbInfo.Depth = geo.l;
% FemmProblem.Segments = [];
% FemmProblem.ArcSegments = [];
% FemmProblem.Nodes = [];
% FemmProblem.BoundaryProps = [];
% FemmProblem.Circuits = [];
% FemmProblem.BlockLabels = [];
% FemmProblem.PointProps = [];
eval_type = 'singt';
end

% FEMM
[geo,mat] = draw_motor_in_FEMM(geo,mat, pathname, filename);
mi_close, closefemm

geo.RQ = RQ;

filename = strrep(filename,'fem','mat');
dataSet.currentpathname = [pathname '\'];
dataSet.currentfilename = filename;
dataSet.slidingGap = 1; % R347

% refresh GUI display data
% if flagGUI
% set(app.currentMotFileName,'Value',filename); % update display
% % load([pathname filename]);


% end
dataSet.RQ = round(dataSet.RQ,4);
dataSet.currentpathname = pathname;
dataSet.currentfilename = filename;

geo = orderfields(geo);
per = orderfields(per);
dataSet = orderfields(dataSet);
mat = orderfields(mat);
save([pathname filename],'geo','per','dataSet','mat');
if dataSet.custom
if isequal(button,'Yes')

[geo,mat] = draw_motor_in_FEMM(geo,mat, pathname, filename);
mi_close, closefemm

% if ~strcmp(fileIn,[pathname filename])
fileTmp = [cd '\tmp\' filename];
copyfile(fileIn , fileTmp);
copyfile(fileTmp,[pathname filename])
delete ([fileTmp])
% end

if isfile([pathname fileans])
delete ([pathname fileans])
end

[geo,mat] = draw_motor_in_FEMM(geo,mat, pathname, filename);
mi_close, closefemm


else
disp('Custom machine not saved')
end

else
[geo,mat] = draw_motor_in_FEMM(geo,mat, pathname, filename);
mi_close, closefemm
end

if dataSet.custom==0 || (isequal(button,'Yes') && (dataSet.custom))
geo.RQ = RQ;

filename = strrep(filename,'fem','mat');
dataSet.currentpathname = [pathname '\'];
dataSet.currentfilename = filename;
dataSet.slidingGap = 1; % R347

% refresh GUI display data
% if flagGUI
% set(app.currentMotFileName,'Value',filename); % update display
% % load([pathname filename]);


% end
dataSet.RQ = round(dataSet.RQ,4);
dataSet.currentpathname = pathname;
dataSet.currentfilename = filename;

geo = orderfields(geo);
per = orderfields(per);
dataSet = orderfields(dataSet);
mat = orderfields(mat);
save([pathname filename],'geo','per','dataSet','mat');
end
% cd(currentDir);
Loading

0 comments on commit ae2a79c

Please sign in to comment.