Monday, September 12, 2022

FEMM program in Matlab to obtain the forces from EI core electromagnetic actuator for different gaps and current.

 The top surface of the E actuator, facing the thrust plate is not flat due to previously unknown error in the surface grinder bed level.

The top of the E actuator needed to be all at 40mm, but they were differing to a max of 140 microns above the mean as shown below. When the thrust plate was touching the top surface of the E actuator, it was actually 140 microns above the center leg, not flush with the actuator. The forces that were measured with the load cell are actually at a higher gap than the gap measured with the eddy current probe.

The uneven top surface due to error in surface grinding operation



%% FEMM program to create the geometry and simulate E actuator with tilt of thrust plate
% Balaji Sankar 9 september 2022
% If you get the error:
% Actx server creation failed, invalid prog ide'fem.activeFemm', reinstall
% fem after registering matlab to the group capable of creating server
% using command matlab -regserver.
% mydir='./'
% showconsole()
% clearconsole()
clc;clear all;close all;commandwindow;
%% Experimental values from april 22 test data
% Creating the tilted plate
x_midTP = 30;%Constant
thrustPlateThickness = 10;%Constant
footProjection = 0;% Fine mesh region just to the left and right of the tip of the top edge of the feet
depthIntoPage = 36; %mm
blockLabelRaiseAboveEleg = 0.05;
fineAirGapMeshSize_mm = 0.1; % Mesh size;
roughMeshSize_mm = 3; % Mesh size
NumberOfTurns = 49;
kmTheory = 4*3.14e-7*20e-3*35e-3*NumberOfTurns*NumberOfTurns/4; % Used for validation of experimental data
tiltAngle_deg = -0.1;%+ anticlockwise plate rotation
plainCarbonSteel_muR = 100;
%% Data sets of the experimental measurements
%-------Used during development only------------
% 6th pair in the data set given in G:\01_PHD\05_WIP\10_leverRig_v2_mudi2\2022_august_29_thirdRevisionData\2022_Sept_04_eCore_straight_M15_batchMode.lua
% current_validation = 0.605; % 3.8 turns at 49 turns = 186.2 NI gives 11.6 Newtons, 0.15 Tesla and 0.830
% gap_validation = 0.171;
% April 4th 2022, FUll data set
d_gap_cur_expF_analF_ident_oldFEM = [0.171000000000000,0.171000000000000,0.171000000000000,0.263000000000000,0.263000000000000,0.263000000000000,0.263000000000000,0.263000000000000,0.263000000000000,0.263000000000000,0.263000000000000,0.263000000000000,0.263000000000000,0.247000000000000,0.247000000000000,0.247000000000000,0.247000000000000,0.247000000000000,0.232000000000000,0.217000000000000,0.217000000000000,0.217000000000000,0.324000000000000,0.324000000000000,0.324000000000000,0.324000000000000,0.324000000000000,0.324000000000000,0.324000000000000,0.324000000000000,0.324000000000000,0.324000000000000,0.324000000000000,0.309000000000000,0.309000000000000,0.309000000000000,0.309000000000000,0.309000000000000,0.309000000000000,0.309000000000000,0.293000000000000,0.293000000000000,0.278000000000000,0.247000000000000,0.278000000000000,0.278000000000000,0.263000000000000,0.247000000000000,0.401000000000000,0.397000000000000,0.386000000000000,0.386000000000000,0.386000000000000,0.386000000000000,0.378000000000000,0.370000000000000,0.366000000000000,0.355000000000000,0.340000000000000,0.324000000000000,0.309000000000000,0.447000000000000,0.447000000000000,0.447000000000000,0.447000000000000,0.447000000000000,0.436000000000000,0.436000000000000,0.432000000000000,0.432000000000000,0.432000000000000,0.432000000000000,0.432000000000000,0.420000000000000,0.401000000000000,0.401000000000000,0.401000000000000,0.386000000000000,0.386000000000000,0.370000000000000,0.355000000000000,0.340000000000000,0.555000000000000,0.555000000000000,0.555000000000000,0.555000000000000,0.555000000000000,0.555000000000000,0.555000000000000,0.555000000000000,0.555000000000000,0.539000000000000,0.539000000000000,0.539000000000000,0.539000000000000,0.539000000000000,0.539000000000000,0.539000000000000,0.524000000000000,0.539000000000000,0.539000000000000,0.524000000000000,0.524000000000000,0.524000000000000,0.524000000000000,0.524000000000000,0.555000000000000,0.524000000000000,0.524000000000000,0.524000000000000,0.524000000000000,0.524000000000000,0.509000000000000,0.509000000000000,0.509000000000000,0.509000000000000,0.493000000000000,0.489000000000000,0.478000000000000,0.474000000000000,0.585000000000000,0.570000000000000,0.555000000000000,0.555000000000000,0.555000000000000,0.539000000000000,0.524000000000000,0.509000000000000,0.509000000000000,0.478000000000000,0.724000000000000,0.724000000000000,0.724000000000000,0.724000000000000,0.724000000000000,0.724000000000000,0.724000000000000,0.724000000000000,0.708000000000000,0.708000000000000,0.708000000000000,0.697000000000000,0.693000000000000,0.678000000000000,0.678000000000000,0.678000000000000,0.801000000000000,0.801000000000000,0.801000000000000,0.801000000000000,0.801000000000000,0.801000000000000,0.801000000000000,0.801000000000000,0.785000000000000,0.778000000000000,0.770000000000000,0.770000000000000,0.755000000000000,0.755000000000000,0.739000000000000,0.739000000000000,0.724000000000000,0.908000000000000,0.908000000000000,0.904000000000000,0.893000000000000,0.893000000000000,0.893000000000000,0.893000000000000,0.889000000000000,0.877000000000000,0.877000000000000,0.877000000000000,0.862000000000000,0.862000000000000,0.862000000000000,0.847000000000000,0.847000000000000,0.954000000000000,0.954000000000000,0.950000000000000,0.939000000000000,0.939000000000000,0.924000000000000,0.908000000000000,0.893000000000000,0.862000000000000,1.06200000000000,1.06200000000000,1.06200000000000,1.06200000000000,1.04700000000000,1.04700000000000,1.04700000000000,1.04700000000000,1.03100000000000,1.03100000000000,1.03100000000000,1.01600000000000,1.01600000000000;0.605000000000000,0.658000000000000,0.708000000000000,0.766000000000000,0.821000000000000,0.880000000000000,0.932000000000000,0.986000000000000,1.04000000000000,1.09400000000000,1.25900000000000,1.36800000000000,1.47200000000000,1.57000000000000,1.66200000000000,1.74400000000000,1.81900000000000,1.88700000000000,1.97300000000000,2.16400000000000,2.25100000000000,2.42900000000000,0.980000000000000,1.09000000000000,1.20800000000000,1.31900000000000,1.42700000000000,1.52900000000000,1.62400000000000,1.71300000000000,1.79000000000000,1.86400000000000,1.92700000000000,2.08000000000000,2.17000000000000,2.26000000000000,2.34000000000000,2.43000000000000,2.52000000000000,2.51000000000000,2.62000000000000,2.74200000000000,2.86000000000000,3.27100000000000,2.74000000000000,2.87200000000000,3.21000000000000,3.37000000000000,1.31300000000000,1.52200000000000,1.70400000000000,1.85400000000000,1.97300000000000,2.16700000000000,2.32400000000000,2.52520000000000,2.62600000000000,2.87000000000000,3.38000000000000,3.44200000000000,3.65200000000000,1.31000000000000,1.51000000000000,1.70000000000000,1.85000000000000,1.96000000000000,2.06000000000000,2.16000000000000,2.25000000000000,2.33000000000000,2.43000000000000,2.52000000000000,2.62000000000000,2.87000000000000,3.32000000000000,3.44000000000000,3.55000000000000,3.73000000000000,3.80000000000000,4.08000000000000,4.22000000000000,4.36000000000000,1.62130000000000,1.70800000000000,1.78500000000000,1.85800000000000,1.92000000000000,1.97000000000000,2.02000000000000,2.07000000000000,2.16000000000000,2.34000000000000,2.43000000000000,2.52000000000000,2.52000000000000,2.62000000000000,2.74000000000000,2.87000000000000,3.32000000000000,3.01000000000000,2.88000000000000,3.32000000000000,3.38000000000000,3.44000000000000,3.44000000000000,3.46000000000000,2.11000000000000,3.29000000000000,3.32000000000000,3.43000000000000,3.44000000000000,3.55000000000000,3.64000000000000,3.74000000000000,3.87000000000000,3.95000000000000,4.15000000000000,4.29000000000000,4.29900000000000,4.43000000000000,2.29000000000000,2.86000000000000,3.36000000000000,3.43000000000000,3.65000000000000,3.93000000000000,4.20000000000000,4.47000000000000,4.58000000000000,4.88000000000000,1.52000000000000,1.71100000000000,1.86000000000000,1.98000000000000,2.08000000000000,2.26000000000000,2.43000000000000,2.52000000000000,2.86000000000000,3.27000000000000,3.38000000000000,3.54000000000000,3.73000000000000,4.07000000000000,4.21000000000000,4.48000000000000,1.70600000000000,1.85700000000000,1.85700000000000,1.97500000000000,2.20500000000000,2.40600000000000,2.62800000000000,2.87100000000000,3.39100000000000,3.44200000000000,3.66500000000000,3.93300000000000,4.21100000000000,4.48400000000000,4.60600000000000,4.90100000000000,5.15500000000000,1.85800000000000,1.97820000000000,2.16830000000000,2.34200000000000,2.52270000000000,2.62400000000000,2.86950000000000,3.38150000000000,3.44190000000000,3.63280000000000,3.80330000000000,4.21840000000000,4.49300000000000,4.58100000000000,4.80300000000000,5.00100000000000,1.61600000000000,1.97100000000000,2.43200000000000,2.86700000000000,3.51200000000000,4.21200000000000,4.74500000000000,5.15000000000000,5.45500000000000,2.34600000000000,2.52700000000000,2.62690000000000,2.86800000000000,3.39100000000000,3.44700000000000,3.65900000000000,3.93700000000000,4.21700000000000,4.49100000000000,4.61300000000000,4.91100000000000,5.15100000000000;1.56105002700000,1.80992850000000,2.08987710300000,1.72119937500000,1.91499558400000,2.13808808800000,2.34549615100000,2.57779392900000,2.82088409500000,3.08020019000000,4.00106360900000,4.66946354000000,5.42793697600000,6.19647459500000,7.00750958100000,7.78517778600000,8.55436892400000,9.33890840700000,10.5980516100000,13.6492169200000,15.4931097000000,21.2728636300000,1.63600000000000,1.96100000000000,2.00600000000000,2.40500000000000,2.84300000000000,3.28700000000000,3.74800000000000,4.21100000000000,4.63700000000000,5.09100000000000,5.44500000000000,6.58100000000000,7.28200000000000,8.00300000000000,8.76500000000000,9.61100000000000,10.5440000000000,10.6720000000000,11.6570000000000,13.0970000000000,14.8600000000000,23.0800000000000,15.5110000000000,16.9040000000000,21.6400000000000,26.5080000000000,2.14225193400000,2.92363585700000,3.70223766000000,4.38225154600000,5.01622039400000,6.16002694100000,7.33546377800000,8.70374455400000,9.55791175400000,11.8897587100000,18.6361970300000,19.7890594700000,24.4265379600000,1.67511699300000,2.26571089300000,2.98906238400000,3.40585773700000,3.96405579600000,4.37833043600000,4.88374288200000,5.23899547500000,5.78434723000000,6.20358860900000,6.70524799300000,7.37924951000000,9.07630604900000,12.9404668900000,13.8652700900000,15.2690275800000,17.4289431800000,18.4344279000000,23.1189036900000,26.2361677100000,30.5430965900000,1.62727944700000,1.84140941400000,2.04752911200000,2.24238962200000,2.40907415400000,2.64097982000000,2.78255057400000,2.92262757200000,3.21219223200000,3.84057816600000,4.19174160100000,4.56736529600000,4.54269964500000,5.01948798600000,5.57443712500000,6.20976902600000,8.82190067800000,7.34664827900000,6.73796125600000,8.91387872200000,9.27874737200000,9.63644599100000,9.62440258100000,9.77549603200000,3.25819992600000,8.74034158400000,8.87266972000000,9.57451112100000,9.65048730100000,10.4343732700000,11.0322865700000,11.8295790000000,13.3759528700000,13.8596311600000,15.7357890800000,17.2295453900000,17.5807648400000,19.2268469400000,4.03323538500000,6.43162918200000,9.26078495300000,9.62117233300000,11.0782009100000,13.3214681100000,15.7547224400000,18.6417799400000,19.8632431500000,24.4617719300000,1.50382048900000,1.85518931600000,2.10671920600000,2.49195895700000,2.73271513000000,3.18711579800000,3.68491008700000,3.91786138200000,5.12476046200000,6.87475199000000,7.27113889700000,8.06656413000000,8.97325553600000,10.9701463100000,11.8312594800000,13.7111891300000,1.55212483300000,1.74530486800000,1.74392314300000,1.97498857200000,2.59670861800000,3.05170678900000,3.60661858400000,4.34862335700000,6.22282072200000,6.42946323500000,7.34425826800000,8.62194272400000,10.0195011200000,11.5622713100000,12.3122863500000,14.2687710100000,16.3106425300000,1.60524654200000,1.97851757100000,2.33582407900000,2.67589637400000,3.07661517500000,3.32084433100000,3.93967022500000,5.51352921200000,5.70071554900000,6.34880039400000,6.97104325500000,8.71720703300000,9.97142084300000,10.3937991100000,11.5589663700000,13.6011553100000,1.54943607200000,1.91574246200000,2.75682062200000,3.82597669800000,5.57288735300000,8.19935906600000,10.2695932700000,12.7947883100000,16.5274052400000,1.77165099400000,2.10078152400000,2.25346209100000,2.76111517100000,4.02993044900000,4.21252348600000,4.79174616500000,5.60505913000000,6.51096631300000,7.45765304400000,7.91700178000000,9.09232658500000,10.3267481200000;6.60599706901269,7.81410809367669,9.04678236405048,4.47678142070581,5.14274114895112,5.90845177926528,6.62735410422588,7.41757901084012,8.25230041897382,9.13151832862699,12.0937172710868,14.2784329320245,16.5319457387442,21.3218678067170,23.8939516483011,26.3098821539904,28.6214307460834,30.8013493075809,38.1678809437091,52.4825457848075,56.7873196360042,66.1234355652445,4.82816361758878,5.97286671601128,7.33607387885993,8.74620029518938,10.2371195244075,11.7528934401368,13.2587284976071,14.7517843048525,16.1077874293172,17.4671336699893,18.6678050582438,23.9127519686639,26.0268948190739,28.2305778372660,30.2645767103403,32.6373911565652,35.0997457705722,34.8217290767797,42.1975454940652,46.2188896975760,55.8550342642720,92.5522603788261,51.2662300408881,56.3247311537084,78.6173527617864,98.2394095071219,5.65796888866487,7.75654184001675,10.2845292968724,12.1748802543478,13.7879407763578,16.6327117619413,19.9484196554184,24.5814762650299,27.1673401793484,34.4926796954573,52.1549357363322,59.5595708341640,73.7164524621569,4.53259998688748,6.02224883753985,7.63312974891021,9.03958012652083,10.1465160011811,11.7809770604326,12.9525229930141,14.3158582899306,15.3519729521391,16.6980171093750,17.9578126388889,19.4113141027949,24.6425167722222,36.1748942576228,38.8372068412510,41.3606932139725,49.2791153012161,51.1460892372950,64.1706925253470,74.5741039819083,86.7830666269896,4.50360867798997,4.99815378591738,5.45896516274653,5.91459894140800,6.31591591176041,6.64915312010389,6.99095683765928,7.34132706442659,7.99358107582177,9.94658578512396,10.7264216528926,11.5356852892562,11.5356852892562,12.4693811570248,13.6377725619835,14.9625671074380,21.1852425977507,16.4579337190083,15.0670175206612,21.1852425977507,21.9578935198998,22.7443829660276,22.7443829660276,23.0096213422877,7.62779113247301,20.8041065831682,21.1852425977507,22.6123403830633,22.7443829660276,24.2222220059291,26.9890159991663,28.4922986497659,30.5074714495467,31.7817988563422,37.3957461478961,40.6178296894878,42.6873254471202,46.0967829275045,8.08684428425743,13.2862433612804,19.3424924797662,20.1568248454509,22.8254637951465,28.0561076033058,33.9043837480333,40.7004611292221,42.7282631328426,55.0051937690167,2.32610808949666,2.94742480967423,3.48312134107628,3.94705425643295,4.35581459418211,5.14232586474772,5.94504659698269,6.39357548975917,8.61163073366530,11.2576784038351,12.0278148263590,13.6132185234938,15.2887170268340,19.0173184470636,20.3481369575186,23.0418045481679,2.39393784073404,2.83647280096228,2.83647280096228,3.20840375463099,3.99918968501452,4.76152492417063,5.68074817664436,6.77986741419013,9.84772957793631,10.3295734033730,11.9560123714876,13.7684892750248,16.4170994009663,18.6147476342069,20.5011790493184,23.2113487226820,26.7546981141735,2.20973182446681,2.50488934932581,3.03613953366506,3.62986699383559,4.21160996670827,4.55663867302461,5.44915784875139,7.63545830125550,8.12862629947158,9.05531660196720,9.92525853695599,12.6386542480320,14.3376559151951,14.9047913246427,16.9698577072468,18.3978357195683,1.51427869320922,2.25266363009968,3.45859555328000,4.91976149929763,7.38240178892325,10.9661108280992,14.4118782511971,17.5521931126630,21.1346386244893,2.57529408419675,2.98800485290005,3.22892454011431,3.84883336407801,5.53582132527994,5.72017152322066,6.44542120825846,7.46203556079744,8.82896346360986,10.0135628429677,10.5649981853579,12.3302618778247,13.5648667512514;1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12;5.75700000000000,6.85800000000000,7.98800000000000,4.12600000000000,4.76000000000000,5.49100000000000,6.18000000000000,6.93900000000000,7.74200000000000,8.59100000000000,11.4630000000000,13.5900000000000,15.7920000000000,20.3500000000000,22.8650000000000,25.2310000000000,27.4970000000000,29.6370000000000,36.6580000000000,50.3910000000000,54.6030000000000,63.7460000000000,4.58300000000000,5.69900000000000,7.03400000000000,8.42000000000000,9.88900000000000,11.3870000000000,12.8790000000000,14.3610000000000,15.7080000000000,17.0610000000000,18.2560000000000,23.3920000000000,25.4990000000000,27.6970000000000,29.7270000000000,32.0980000000000,34.5600000000000,34.2820000000000,41.4860000000000,45.5010000000000,54.8860000000000,90.6440000000000,50.3150000000000,55.3540000000000,77.2510000000000,96.2750000000000,5.52100000000000,7.60900000000000,10.1140000000000,12.0100000000000,13.6310000000000,16.4950000000000,19.8040000000000,24.4380000000000,27.0230000000000,34.3400000000000,52.0260000000000,59.2870000000000,73.2940000000000,4.45600000000000,5.95100000000000,7.57500000000000,8.99600000000000,10.1160000000000,11.7480000000000,12.9350000000000,14.3070000000000,15.3580000000000,16.7260000000000,18.0070000000000,19.4860000000000,24.7590000000000,36.3860000000000,39.0960000000000,41.6660000000000,49.6020000000000,51.5010000000000,64.5570000000000,74.9010000000000,87.0120000000000,4.52500000000000,5.03000000000000,5.50100000000000,5.96700000000000,6.37800000000000,6.71900000000000,7.07000000000000,7.42900000000000,8.09900000000000,10.0800000000000,10.8820000000000,11.7140000000000,11.7140000000000,12.6750000000000,13.8790000000000,15.2450000000000,21.6260000000000,16.7880000000000,15.3530000000000,21.6260000000000,22.4240000000000,23.2370000000000,23.2370000000000,23.5100000000000,7.72300000000000,21.2330000000000,21.6260000000000,23.1000000000000,23.2370000000000,24.7630000000000,27.5580000000000,29.1100000000000,31.1910000000000,32.5070000000000,38.2260000000000,41.5290000000000,43.5880000000000,47.0830000000000,8.23200000000000,13.5790000000000,19.8160000000000,20.6590000000000,23.4250000000000,28.7860000000000,34.7800000000000,41.7260000000000,43.8240000000000,56.2890000000000,2.37500000000000,3.01900000000000,3.57600000000000,4.05900000000000,4.48400000000000,5.30500000000000,6.14300000000000,6.61200000000000,8.91900000000000,11.6920000000000,12.5010000000000,14.1470000000000,15.8970000000000,19.7800000000000,21.1780000000000,24.0070000000000,2.47000000000000,2.93200000000000,2.93200000000000,3.32100000000000,4.15100000000000,4.95200000000000,5.91900000000000,7.07700000000000,10.3010000000000,10.8030000000000,12.5110000000000,14.4260000000000,17.2000000000000,19.5230000000000,21.4820000000000,24.3470000000000,28.0530000000000,2.30600000000000,2.61700000000000,3.17700000000000,3.80100000000000,4.41700000000000,4.78200000000000,5.72900000000000,8.05100000000000,8.56600000000000,9.55200000000000,10.4780000000000,13.3490000000000,15.1590000000000,15.7640000000000,17.9420000000000,19.4630000000000,1.58100000000000,2.36200000000000,3.64200000000000,5.19300000000000,7.82100000000000,11.6390000000000,15.3070000000000,18.6400000000000,22.4110000000000,2.73100000000000,3.17300000000000,3.43200000000000,4.09700000000000,5.90400000000000,6.10200000000000,6.88300000000000,7.97800000000000,9.43800000000000,10.7150000000000,11.3090000000000,13.1980000000000,14.5290000000000]';
dataSetNumber = 12;% 12th data set has the largest air gaps right now 1047 to 1016
dataSetNumber = 07;% 585 470
exp_airGap_mm = d_gap_cur_expF_analF_ident_oldFEM((d_gap_cur_expF_analF_ident_oldFEM(:,5)==dataSetNumber),1);
exp_curr_amper = d_gap_cur_expF_analF_ident_oldFEM((d_gap_cur_expF_analF_ident_oldFEM(:,5)==dataSetNumber),2);
exp_measForceN = d_gap_cur_expF_analF_ident_oldFEM((d_gap_cur_expF_analF_ident_oldFEM(:,5)==dataSetNumber),3);
exp_analForceN = d_gap_cur_expF_analF_ident_oldFEM((d_gap_cur_expF_analF_ident_oldFEM(:,5)==dataSetNumber),4);
exp_straitFemForcN = d_gap_cur_expF_analF_ident_oldFEM((d_gap_cur_expF_analF_ident_oldFEM(:,5)==dataSetNumber),6);
exp_tiltFemForcN = zeros(size(exp_measForceN));
%% RUN tilted FEM for all load cases
for loadCaseIter = 1:size(exp_airGap_mm,1)
airGap_mm_iter = exp_airGap_mm(loadCaseIter);
curr_ampere_iter = exp_curr_amper(loadCaseIter);
%% Start FEMM
% Start up and connect to FEMM
% addpath('/cygdrive/c/femm42/octavefemm/mfiles');
openfemm(0)
% openfem(1) will hide the openFEM window;
% messagebox('Balaji The GREAT = Check if unequal gaps cause reduction of force.')
newdocument(0)
% %NOTE: newdocument(doctype) Creates a new preprocessor document and opens up a new
% %preprocessor window. Specify doctype to be 0 for a magnetics problem, 1 for an
% %electrostatics problem, 2 for a heat flow problem, or 3 for a current flow
% %problem. Alternative syntax for this function is create(doctype)
minangleAngleConstraing4Mesh = 30;
mi_probdef(0, 'millimeters', 'planar', 1e-008, depthIntoPage, minangleAngleConstraing4Mesh, 'succ.approx')
%% Create geometry
% ----------------
%Draw nodes of E actuator
mi_addnode(00.000,00.000)
mi_addnode(60.000,00.000)
mi_addnode(60.000,39.930)
mi_addnode(50.000,39.950)
mi_addnode(50.000,10.000)
mi_addnode(40.000,10.000)
mi_addnode(40.000,39.975)
mi_addnode(20.000,40.015)
mi_addnode(20.000,10.000)
mi_addnode(10.000,10.000)
mi_addnode(10.000,40.110)
mi_addnode(00.000,40.140)
% Draw the line segments, upside facing e actuator
mi_addsegment(00.000,00.000,60.000,00.000)%01
mi_addsegment(60.000,00.000,60.000,39.930)%02
mi_addsegment(60.000,39.930,50.000,39.950)%03
mi_addsegment(50.000,39.950,50.000,10.000)%04
mi_addsegment(50.000,10.000,40.000,10.000)%05
mi_addsegment(40.000,10.000,40.000,39.975)%06
mi_addsegment(40.000,39.975,20.000,40.015)%07
mi_addsegment(20.000,40.015,20.000,10.000)%08
mi_addsegment(20.000,10.000,10.000,10.000)%09
mi_addsegment(10.000,10.000,10.000,40.110)%10
mi_addsegment(10.000,40.110,00.000,40.140)%11
mi_addsegment(00.000,40.140,00.000,00.000)%12
% Nodes of enclosing volume
mi_addnode(-10,-10)
mi_addnode( 70,-10)
mi_addnode( 70, 55)
mi_addnode(-10, 55)
mi_addsegment(-10,-10, 70,-10)%01
mi_addsegment( 70,-10, 70, 55)%02
mi_addsegment( 70, 55,-10, 55)%03
mi_addsegment(-10, 55,-10,-10)%04
% Tilt and airgap change the surface of the plate
y_midTP = 40 + airGap_mm_iter;
% Get the equation of the line
slope = tan(deg2rad(tiltAngle_deg));
intercept_lowerTPsurfaceLine= y_midTP - slope*x_midTP;
% Co ordinates of the thrust plate
x_leftBott_TP = -05;
x_rightBott_TP = +65;
y_leftBott_TP = slope*(-5) + intercept_lowerTPsurfaceLine;
y_rightBott_TP = slope*65 + intercept_lowerTPsurfaceLine;
y_leftTopp_TP = y_leftBott_TP + 10;
y_rightTopp_TP = y_rightBott_TP + 10;
% Nodes of thrust plate
mi_addnode (x_leftBott_TP ,y_leftBott_TP)
mi_addnode (x_rightBott_TP,y_rightBott_TP)
mi_addnode (x_rightBott_TP,y_rightTopp_TP)
mi_addnode (x_leftBott_TP,y_leftTopp_TP)
mi_addsegment(x_leftBott_TP ,y_leftBott_TP ,x_rightBott_TP,y_rightBott_TP)%01
mi_addsegment(x_rightBott_TP,y_rightBott_TP,x_rightBott_TP,y_rightTopp_TP)%02
mi_addsegment(x_rightBott_TP,y_rightTopp_TP,x_leftBott_TP ,y_leftTopp_TP) %03
mi_addsegment(x_leftBott_TP ,y_leftTopp_TP ,x_leftBott_TP ,y_leftBott_TP) %04
% Coordinates of left fine mesh volume
mi_addnode(00-footProjection,40.140)
mi_addnode(10+footProjection,40.110)
mi_addnode(00-footProjection,slope*(00-footProjection) + intercept_lowerTPsurfaceLine)
% Coordinates of central fine mesh volume
mi_addnode(20-footProjection,40.015)
mi_addnode(40+footProjection,39.975)
% Coordinates of right fine mesh volume
mi_addnode(50-footProjection,39.950)
mi_addnode(60+footProjection,39.930)
mi_addnode(60+footProjection,slope*(60+footProjection) + intercept_lowerTPsurfaceLine);
% On the e actuator left foot
mi_addsegment(00-footProjection,40.140,10+footProjection,40.110)%01
% Left Vertical line
mi_addsegment(00-footProjection,slope*(00-footProjection) + intercept_lowerTPsurfaceLine,00-footProjection,40.140)%01
% Along the thrust plate, full line
mi_addsegment(00-footProjection,slope*(00-footProjection) + intercept_lowerTPsurfaceLine,60+footProjection,slope*(60+footProjection) + intercept_lowerTPsurfaceLine)
% Right Vertical line
mi_addsegment(60+footProjection,39.930,60+footProjection,slope*(60+footProjection) + intercept_lowerTPsurfaceLine)%01
% On the e actuator right foot
mi_addsegment(60+footProjection,39.930,50-footProjection,39.950)
% On Central foot
mi_addsegment(20-footProjection,40.015,40+footProjection,39.975)
% Left Central bridge
mi_addsegment(20-footProjection,40.015,10+footProjection,40.110)
% Right Central bridge
mi_addsegment(40+footProjection,39.975,50-footProjection,39.950)
mi_zoomnatural()
%% Assign block labels for coil, thrust plate and E acutuator and air.
mi_addblocklabel(30,45);% Thrust plate
mi_addblocklabel(5,5);% E actuator
mi_addblocklabel(5,5);% E actuator
mi_addblocklabel(15,15);% E coil left side
mi_addblocklabel(45,15);% E coil right side
% Air
mi_addblocklabel(5,-2);% Just below the E actuator
mi_addblocklabel(30,39.995+blockLabelRaiseAboveEleg);% Just 1 micron above the mid point of the central leg
%% Boundary condition:
% -------------------
% Can't figure out how to do this yet.
% Open boundary condition
% Define an "asymptotic boundary condition" property. This will mimic
% an "open" solution domain
% mi addboundprop(’propname’, A0, A1, A2, Phi, Mu, Sig, c0, c1, BdryFormat,ia, oa)
mu_o = pi*4.e-7;
mi_addboundprop('A=0', 0, 0, 0, 0, 0, 0, 0, 0, 0);
%% Create material BH curves
% -------------------
bh_curve_Iron_fromdemo2 = [ 0.,0.3,0.8,1.12,1.32,1.46,1.54,1.62,1.74,1.87,1.99,2.046,2.08; 0, 40, 80, 160, 318, 796, 1590, 3380, 7960, 15900, 31800, 55100, 79600]';
bh_curve_m17_fromExcel = [0,0.108333333000000,0.208333333000000,0.320833333000000,0.425000000000000,0.562500000000000,0.720833333000000,0.841666667000000,1.00833333300000,1.14583333300000,1.27083333300000,1.32916666700000,1.36250000000000,1.38333333300000,1.40416666700000,1.42500000000000,1.43333333300000,1.45000000000000,1.45833333300000,1.47083333300000,1.47500000000000,1.48333333300000,1.48333333300000,1.49583333300000,1.49583333300000,1.50416666700000;0,5.20833333300000,14.3662280700000,22.2017543900000,35.3048245600000,43.1271929800000,58.8333333300000,70.6118421100000,86.3135964900000,104.662280700000,126.964912300000,158.513157900000,200.600877200000,240.063596500000,290.052631600000,342.673245600000,420.300438600000,509.765350900000,584.760964900000,647.912280700000,716.331140400000,779.484649100000,836.063596500000,899.214912300000,967.635964900000,995.263157900000]';
bh_curve_m15_fromExcel = [0,0.0500000000000000,0.100000000000000,0.150000000000000,0.200000000000000,0.250000000000000,0.300000000000000,0.350000000000000,0.400000000000000,0.450000000000000,0.500000000000000,0.550000000000000,0.600000000000000,0.650000000000000,0.700000000000000,0.750000000000000,0.800000000000000,0.850000000000000,0.900000000000000,0.950000000000000,1,1.05000000000000,1.10000000000000,1.15000000000000,1.20000000000000,1.25000000000000,1.30000000000000,1.35000000000000,1.40000000000000,1.45000000000000,1.50000000000000,1.55000000000000,1.60000000000000,1.65000000000000,1.70000000000000,1.75000000000000,1.80000000000000,1.85000000000000,1.90000000000000,1.95000000000000,2,2.05000000000000,2.10000000000000,2.15000000000000,2.20000000000000,2.25000000000000,2.30000000000000;0,15.1207140000000,22.7182920000000,27.8427330000000,31.8714340000000,35.3650440000000,38.6005880000000,41.7362020000000,44.8739790000000,48.0878070000000,51.4372360000000,54.9752210000000,58.7529930000000,62.8236440000000,67.2452850000000,72.0844060000000,77.4201000000000,83.3500210000000,89.9996120000000,97.5373530000000,106.201406000000,116.348464000000,128.547329000000,143.765431000000,163.754169000000,191.868158000000,234.833507000000,306.509769000000,435.255202000000,674.911968000000,1108.32556900000,1813.08546800000,2801.21742100000,4053.65311700000,5591.10689000000,7448.31841300000,9708.81567000000,12486.9316150000,16041.4836440000,21249.4206240000,31313.4958780000,53589.4468770000,88477.4846010000,124329.410540000,159968.569300000,197751.604272000,234024.751347000]';
% Expression of BH curve from Calculation of Nonlinear Electromagnetic
% Fields in the Steel Wall Vicinity of Transformer Bushings Article in IEEE Transactions on Magnetics · June 2015 DOI: 10.1109/TMAG.2014.2379217 Sergei Maximov
% B = mu_o * (999637.86 * arcTan (0.001002 * H) + 1.0861 * H)
H_0_230000 = linspace(0,230000,47)';
bh_curve_lowCarbSteel = [ mu_o*(999637.86 * atan (0.001002 * H_0_230000) + 1.0861 * H_0_230000) , H_0_230000];
% For silicon steel ST 1312
bh_curve_ST1312_siliconSteel = [0 0.11 0.32 0.74 1.05 1.25 1.37 1.50 1.74 1.95 2.07 2.17;0 33 66 125 250 500 1000 2500 10000 25000 52000 100000]';
%% Apply materials to blocks
% ----------------
% mi addmaterial(’matname’, mu x, mu y, H c, J, Cduct, Lam d, Phi hmax, lam fill,
% LamType, Phi hx, Phi hy, nstr, dwire) adds a new material with called ’matname’
% with the material properties
% – mu xRelative permeability in the x- or r-direction.
% – mu yRelative permeability in the y- or z-direction.
% – Hc Permanent magnet coercivity in Amps/Meter.
% – J Applied source current density in Amps/mm 2 .
% – Cduct Electrical conductivity of the material in MS/m.
% – Lamd Lamination thickness in millimeters.
% – Phihmax Hysteresis lag angle in degrees, used for nonlinear BH curves.
% – Lamfill Fraction of the volume occupied per lamination that is actually filled with
% iron(Note that this parameter defaults to 1 in the femm preprocessor dialog box because,
% by default, iron completely fills the volume)
% – LamtypeSet to
% ? 0 – Not laminated or laminated in plane
% ? 1 – laminated x or r
% ? 2 – laminated y or z
% ? 3 – magnet wire
% ? 4 – plain stranded wire
% ? 5 – Litz wire
% ? 6 – square wire
% – Phi hxHysteresis lag in degrees in the x-direction for linear problems.
% – Phi hyHysteresis lag in degrees in the y-direction for linear problems.
% – nstrNumber of strands in the wire build. Should be 1 for Magnet or Square wire.
% – dwireDiameter of each of the wire’s constituent strand in millimeters
muX = 1;
muY = 1;
permMagCoer = 0;
sourceCurrDens = 0;
conductivity = 0;
lamThk = 0;
phi_hysteresisLagAngle = 0;
laminateFillFraction = 1;
laminationType = 0;
phi_hysteresisLagDeg_x = 0;
phi_hysteresisLagDeg_y = 0;
wireStrandsCount = 0;
wireDiameter = 0;
mi_addmaterial('AirMaterial' , muX , muY, permMagCoer, sourceCurrDens, conductivity, lamThk, phi_hysteresisLagAngle, laminateFillFraction, laminationType, phi_hysteresisLagDeg_x,phi_hysteresisLagDeg_y,wireStrandsCount,wireDiameter);
muX = 1;
muY = 1;
permMagCoer = 0;
sourceCurrDens = 0;
conductivity = 58;% For current carrying coil, don't know why multiplying by .65;
lamThk = 0;
phi_hysteresisLagAngle = 0;
laminateFillFraction = 1;
laminationType = 3;% magnet wire
phi_hysteresisLagDeg_x = 0;
phi_hysteresisLagDeg_y = 0;
wireStrandsCount = 0; % This is strands, not turns. Number of turns is given in block properties below;
wireDiameter = 1.02;
mi_addmaterial('CoilMaterial', muX , muY, permMagCoer, sourceCurrDens, conductivity, lamThk, phi_hysteresisLagAngle, laminateFillFraction, laminationType, phi_hysteresisLagDeg_x,phi_hysteresisLagDeg_y,wireStrandsCount,wireDiameter);
%muX = 2828;% For linear iron, muX, 4000/1.414
%muY = 2828;% For linear iron, muY, 4000/1.414
muX = plainCarbonSteel_muR/sqrt(2);% For carbon steel, engineering tool box, 100/1.414
muY = plainCarbonSteel_muR/sqrt(2);% For carbon steel, engineering tool box, 100/1.414
permMagCoer = 0;
sourceCurrDens = 0;
conductivity = 0;% For linear iron, zeroing out previous change in coil.
lamThk = 0;
phi_hysteresisLagAngle = 0;
laminateFillFraction = 1;
laminationType = 0;% Not laminated
phi_hysteresisLagDeg_x = 0;
phi_hysteresisLagDeg_y = 0;
wireStrandsCount = 0;
wireDiameter = 0;
mi_addmaterial('Iron_linearMaterial', muX , muY, permMagCoer, sourceCurrDens, conductivity, lamThk, phi_hysteresisLagAngle, laminateFillFraction, laminationType, phi_hysteresisLagDeg_x,phi_hysteresisLagDeg_y,wireStrandsCount,wireDiameter);
muX = 0;% For non linear iron, muX
muY = 0;% For non linear iron, muY
permMagCoer = 0;
sourceCurrDens = 0;
conductivity = 0;% For non linear iron
lamThk = 0;
phi_hysteresisLagAngle = 0;
laminateFillFraction = 1;
laminationType = 0;% Not laminated
phi_hysteresisLagDeg_x = 0;
phi_hysteresisLagDeg_y = 0;
wireStrandsCount = 0;
wireDiameter = 0;
mi_addmaterial('Iron_nonLinearMaterial',muX , muY, permMagCoer, sourceCurrDens, conductivity, lamThk, phi_hysteresisLagAngle, laminateFillFraction, laminationType, phi_hysteresisLagDeg_x,phi_hysteresisLagDeg_y,wireStrandsCount,wireDiameter);
mi_addbhpoints('Iron_nonLinearMaterial', bh_curve_Iron_fromdemo2);% Associates BH curve with the Iron material, and replace the muX and muY values
muX = 1;% For e stamping, will replace with bh curve
muY = 1;% For e stamping, will replace with bh curve
permMagCoer = 0;
sourceCurrDens = 0;
conductivity = 0;% For non linear iron
lamThk = 0.5;
phi_hysteresisLagAngle = 0;
laminateFillFraction = 0.92;% For insulating film inbetween
% laminationType 1 gives mu_x extremely low
% laminationType 2 gives mu_y extremely low
laminationType = 0;
phi_hysteresisLagDeg_x = 0;
phi_hysteresisLagDeg_y = 0;
wireStrandsCount = 0;
wireDiameter = 0;
mi_addmaterial('eActLaminateMaterial',muX , muY, permMagCoer, sourceCurrDens, conductivity, lamThk, phi_hysteresisLagAngle, laminateFillFraction, laminationType, phi_hysteresisLagDeg_x,phi_hysteresisLagDeg_y,wireStrandsCount,wireDiameter);
mi_addbhpoints('eActLaminateMaterial',bh_curve_m15_fromExcel);
%% Current carrying coil:
% Add a "circuit property" so that we can calculate the properties of the
% coil as seen from the terminals.
circuitName = 'iCoilCircProp';
cur = curr_ampere_iter;
seriesConnected = 1;
mi_addcircprop(circuitName, cur, seriesConnected);
%% Assign material and mesh size to the blocks.
automesh = 0;
meshsize = roughMeshSize_mm;
incircuit= '<None>';
magdir = 0;
group = 0;
numberOfTurns = 0;
mi_selectlabel(30,45);% Thrust plate
% mi_setblockprop('Iron_linearMaterial', automesh, meshsize, incircuit, magdir, group, numberOfTurns);
% mi_setblockprop('eActLaminateMaterial', automesh, meshsize, incircuit, magdir, group, numberOfTurns);
mi_setblockprop('Iron_linearMaterial', automesh, meshsize, incircuit, magdir, group, numberOfTurns);
mi_clearselected
meshsize = roughMeshSize_mm;
mi_selectlabel(5,5);% E actuator
mi_setblockprop('eActLaminateMaterial', automesh, meshsize, incircuit, magdir, group, numberOfTurns);
mi_clearselected
meshsize = roughMeshSize_mm;
mi_selectlabel(5,-2);% Just below the E actuator
mi_setblockprop('AirMaterial', automesh, meshsize, incircuit, magdir, group, numberOfTurns);
mi_clearselected
meshsize = fineAirGapMeshSize_mm;
mi_selectlabel(30,39.990+blockLabelRaiseAboveEleg);% Just 1 micron above the mid point of the central leg
mi_setblockprop('AirMaterial', automesh, meshsize, incircuit, magdir, group, numberOfTurns);
mi_clearselected
meshsize = roughMeshSize_mm;
incircuit = 'iCoilCircProp';
numberOfTurns = +NumberOfTurns;
mi_selectlabel(15,15);% Left side of coil
mi_setblockprop('CoilMaterial', automesh, meshsize, incircuit, magdir, group, numberOfTurns);
mi_clearselected
meshsize = roughMeshSize_mm;
incircuit = 'iCoilCircProp';
numberOfTurns = -NumberOfTurns;% Current has to go inside on one side.
mi_selectlabel(45,15);% Left side of coil
mi_setblockprop('CoilMaterial', automesh, meshsize, incircuit, magdir, group, numberOfTurns);
mi_clearselected
mi_zoomnatural
%% Mesh and solve
mi_saveas('EactUnequalLegsTiltedPlate.fem');
mi_createmesh();
mi_analyze;
%% Postprocess
mi_loadsolution();
% mo_addcontour(-1,1);
% mo_addcontour(61,1);
% magnitudeOfB = 1;
% numPoints = 100;
% mo_makeplot(magnitudeOfB,numPoints,'Eactuator_Bmag_alongEdgePlot.txt',0)
%
% mo_showdensityplot(1,0,1.6,0,'bmag');
% %1 with legend
% %0 colour plot
% %0 low b
% %1.6 max b
% %type of pplot
% mo_savebitmap('Eactuator_Bmag_density.bmp')
mo_clearblock;
mo_selectblock(30,45);
% fx = mo_blockintegral(18);% 18 is x direction weighted stress tensor force
exp_tiltFemForcN(loadCaseIter,1) = abs(mo_blockintegral(19));% 19 is y direction weighted stress tensor force
fprintf('\ni=%d/%d,FEM_tilt F=%3.3f N,Meas F=%3.1f N,Anal F=%3.1f N,Cur= %1.1fA,Gap=%1.3f mm,Tilt=%1.2fdeg',loadCaseIter,size(exp_airGap_mm,1),exp_tiltFemForcN(loadCaseIter),exp_measForceN(loadCaseIter),exp_analForceN(loadCaseIter),curr_ampere_iter,airGap_mm_iter,tiltAngle_deg);
%% Save and close;
closefemm
end
%% Plot gap vs force
fprintf('\n Tilted FEM calculated K_m:')
fprintf('\n ---------------------------')
fprintf('\n%1.2g',exp_tiltFemForcN.*(exp_airGap_mm*1e-3).^2./(exp_curr_amper).^2);
fprintf('\n Tilted FEM calculated force:')
fprintf('\n ---------------------------')
fprintf('\n%1.2f',exp_tiltFemForcN);
figure('units','normalized','outerposition',[0 0 1 1]);
subplot(1,2,1)
plot(exp_airGap_mm,exp_tiltFemForcN,'d',...
exp_airGap_mm,exp_analForceN,'o',...
exp_airGap_mm,exp_measForceN,'+','linewidth',2)
legend('Tilted, FEM','Analytical,straight','Measured','Location','Best');
xlabel('Air gap mm','fontsize',16,'fontweight','n','color','k');
ylabel('Force N','fontsize',16,'fontweight','n','color','k');
set(gca,'fontsize',16);
title('Gap Vs Force','fontsize',20,'fontweight','n','color','k');
subplot(1,2,2)
plot(exp_airGap_mm,exp_tiltFemForcN.*(exp_airGap_mm*1e-3).^2./(exp_curr_amper).^2,'d',...
exp_airGap_mm,exp_analForceN.*(exp_airGap_mm*1e-3).^2./(exp_curr_amper).^2,'o',...
exp_airGap_mm,exp_measForceN.*(exp_airGap_mm*1e-3).^2./(exp_curr_amper).^2,'+','linewidth',2)
legend('Tilted, FEM','Analytical,straight','Measured','Location','Best');xlabel('Air gap mm','fontsize',16,'fontweight','n','color','k');
ylabel('Magnetic bearing constant Nm^2/A^2','fontsize',16,'fontweight','n','color','k');
set(gca,'fontsize',16);
title('Gap Vs Km','fontsize',20,'fontweight','n','color','k');
%% OLD method of creating air gaps
% % Coordinates and segments of left fine mesh volume
% mi_addnode(00-footProjection,40.140)
% mi_addnode(10+footProjection,40.110)
% mi_addnode(10+footProjection,slope*(10+footProjection) + intercept_lowerTPsurfaceLine)
% mi_addnode(00-footProjection,slope*(00-footProjection) + intercept_lowerTPsurfaceLine)
% mi_addsegment(00-footProjection,40.140,10+footProjection,40.110)%01
% mi_addsegment(10+footProjection,40.110,10+footProjection,slope*(10+footProjection) + intercept_lowerTPsurfaceLine)%01
% mi_addsegment(10+footProjection,slope*(10+footProjection) + intercept_lowerTPsurfaceLine,00-footProjection,slope*(00-footProjection) + intercept_lowerTPsurfaceLine)%01
% mi_addsegment(00-footProjection,slope*(00-footProjection) + intercept_lowerTPsurfaceLine,00-footProjection,40.140)%01
%
%
% % Coordinates and segments of central fine mesh volume
% mi_addnode(20-footProjection,40.015)
% mi_addnode(40+footProjection,39.975)
% mi_addnode(40+footProjection,slope*(40+footProjection) + intercept_lowerTPsurfaceLine)
% mi_addnode(20-footProjection,slope*(20-footProjection) + intercept_lowerTPsurfaceLine)
% mi_addsegment(20-footProjection,40.015,40+footProjection,39.975)%01
% mi_addsegment(40+footProjection,39.975,40+footProjection,slope*(40+footProjection) + intercept_lowerTPsurfaceLine)%01
% mi_addsegment(40+footProjection,slope*(40+footProjection) + intercept_lowerTPsurfaceLine,20-footProjection,slope*(20-footProjection) + intercept_lowerTPsurfaceLine)%01
% mi_addsegment(20-footProjection,slope*(20-footProjection) + intercept_lowerTPsurfaceLine,20-footProjection,40.015)%01
%
% % Coordinates and segments of right fine mesh volume
% mi_addnode(50-footProjection,39.950)
% mi_addnode(60+footProjection,39.930)
% mi_addnode(60+footProjection,slope*(60+footProjection) + intercept_lowerTPsurfaceLine)
% mi_addnode(50-footProjection,slope*(50-footProjection) + intercept_lowerTPsurfaceLine)
% mi_addsegment(50-footProjection,39.950,60+footProjection,39.930)%01
% mi_addsegment(60+footProjection,39.930,60+footProjection,slope*(60+footProjection) + intercept_lowerTPsurfaceLine)%01
% mi_addsegment(60+footProjection,slope*(60+footProjection) + intercept_lowerTPsurfaceLine,50-footProjection,slope*(50-footProjection) + intercept_lowerTPsurfaceLine)%01
% mi_addsegment(50-footProjection,slope*(50-footProjection) + intercept_lowerTPsurfaceLine,50-footProjection,39.950)%01
%% Block meanings
% 3rd column material
% 4 column is mesh size
% 5th column is circuit
% 6th magnetization direction
% 7th is group membership
%% Scrap
% exp_airGap_mm,exp_straitFemForcN.*(exp_airGap_mm*1e-3).^2./(exp_curr_amper).^2,'*',...

No comments:

Post a Comment