Multiphysics - Zugriff auf die Module ME und TH

Das Beispiel zeigt die Verwendung von Funktionen aus verschiedenen Modulen. Die exe-Dateien von FEMAG-ME und FEMAG-TH liegen in den Verzeichnissen C:/FEMAG/FEMAG-ME/ bzw. C:/FEMAG/FEMAG-TH/. Für die einwandfreie Funktion muss das Skript aus FEMAG-DC heraus gestartet werden.

Skript-Datei

--[[
  Modell eines BLDC-Motor mit Oberflaechenmagneten
  Script erzeugen das Modell und führt daran
  magnetische, mechanische und thermische
  Berechnungen durch.
--]]

--------------------------------------------------------------------------------
-- Allgemeine Einstellungen ----------------------------------------------------
--------------------------------------------------------------------------------

exit_on_error = false     -- Verhalten nach Fehler
exit_on_end = false       -- Verhalten nach Skriptausfuehrung
verbosity = 2             -- Grad der Bildschirmmeldungen

--------------------------------------------------------------------------------
-- Zugriff auf externe Module --------------------------------------------------
--------------------------------------------------------------------------------

--point_to_dc("wfemagw64.exe")                      -- Zugriff auf Funktionen von FEMAG-DC
point_to_me("C:/FEMAG/FEMAG-ME/wmefemag64.exe")   -- Zugriff auf Funktionen von FEMAG-ME
point_to_th("C:/FEMAG/FEMAG-TH/wthfemag64.exe")   -- Zugriff auf Funktionen von FEMAG-TH

--------------------------------------------------------------------------------
-- Modellerstellung ------------------------------------------------------------
--------------------------------------------------------------------------------

model_name = "test_access"
comment = "BLDC with surface magnets"
new_model_force(model_name,comment)

global_unit('mm')   -- Globale Einheit (m; cm; mm)
pickdist(0.001)     -- Abstand Schnappen auf Knotenpunkt

cosys('polar')

--  FE-contr-data

--  Version 8.1.x

m.hc_min          =         95.000    -- Limit demagnetisa > 0:[%]Hc;<0:[kA/m]
m.con_hdcopy      =          1.000    -- Hc-copy:Name:auto:0;intact:1; none:-1
m.b_max           =          2.400    -- Max Induction [T] in colorgradation
m.b_min           =          0.000    -- Move inside: 0 ; Move outside: > 0
m.calc_fe_loss    =          1.000    -- Calc. FE-Loss:0:no; 1:yes; 2:m-output
m.eval_force      =          0.000    -- Eval. force density > 0; no <= 0
m.allow_draw      =          1.000    -- Draw Graphics :> 0: yes; 0:  no
m.fline_dens      =          0.000    -- F-Lines: 1: small; 2: medium; 3:thick
m.num_flines      =          0.000    -- Number of Field-lines:      < 100 > 2
m.name_bch_log    =          0.000    -- Name bch-file in Logfile:> 0:yes;0:no
m.st_size_move    =          0.000    -- Step size move: r/ph:[degr]; x/y:[mm]
m.num_nonl_it     =        300.000    -- Number of nonlinear Iterations   < 99
m.perm_mode       =          0.000    -- Permeability mode:>0:restore;0:actual
m.error_perm      =          0.010    -- Rel. Permeability error < 0.1     [%]
m.allow_demagn    =          0.000    -- Allow Demagnetisation:= 1:yes;= 0:no
m.maenergy        =          0.000    -- Force from magn energy 1 :yes;= 0:no
m.el_order_ag     =          1.000    -- El. order in air gap: lin=1: quadr=2
m.export_scrpt    =          0.000    -- Export parameters in script: yes > 0

pre_models("FE-contr-data");

-- Simulation Data:

-- Version 8.1.x

slots             =         12.000    -- Number of STATOR SLOTS        (>= 1)
slots_gen         =          3.000
poles             =          4.000    -- Number of Poles 2p            (>= 2)
poles_gen         =          1.000    -- Number of Poles simulated     (>= 1)

das = 50
dis = 29
dar = 28
dir = 12.0
diw = 6.0
airgap = (dis-dar)/2
airgapradius = (dis+dar)/4
length = 30
slot_width = 3
slot_height = 7.5
tooth_width = 5.6

m.tot_num_slots   = slots             -- Number of STATOR SLOTS        (>= 1)
m.num_slots       = slots_gen         -- Number of STATOR SLOTS        (>= 1)
m.num_poles       = poles             -- Number of Poles 2p            (>= 2)
m.npols_gen       = poles_gen         -- Number of Poles simulated     (>= 1)

m.fc_radius       = airgapradius
m.arm_length      = length
m.skew_angle      = 0.0
m.num_par_wdgs    = 1

pre_models("basic_modpar");


-- CAD-Parameter Data:

--  STATOR_3

--  Version 8.1.x

m.yoke_diam       = das               -- Outer diameter yoke   DAS        [mm]
m.inside_diam     = dis               -- Inner diameter        DIS        [mm]
m.slot_height     = slot_height       -- Total slot height     HSL        [mm]
m.slot_h1         =          1.000    -- Slot opening height   H1S        [mm]
m.slot_h2         =          2.500    -- Slot head height      H2S        [mm]
m.slot_width      = slot_width        -- Slot width SWI;< 0 groove in Slot[mm]
m.slot_r1         =          1.000    -- Upper Radius          R1S        [mm]
m.slot_r2         =          1.000    -- Lower Radius          R2S        [mm]
m.wedge_width1    =          0.000    -- Distance middlepoints B1S        [mm]
m.wedge_width2    =          0.000    -- Distance middlepoints B2S        [mm]
m.nodedist        =          5.000    -- Rel.nod-dist > 0 begin tooth;< 0 slot
m.middle_line     =          0.000    -- Layers: 0;vert:1;horiz:2;vert+horiz:3
m.tooth_width     = tooth_width       -- Tooth width TW (replaces B1; B2) [mm]
m.slot_top_sh     =          0.000    -- Top of slot: corner=2; line=1; arc=0
m.airgap          = 2./3.*airgap      -- Airgap 2/3 height:>0; <0:no ndchn[mm]
m.tot_num_sl      = slots             -- Total number of teeth on 2pi
m.num_sl_gen      = slots_gen         -- Number of teeth be generated
m.zeroangl        =          0.000    -- Reference angle to x-axis [grad]

m.rlength         =         100.000   -- rel. length fe in z-dir [%]

m.mcvkey_yoke     =   'dummy'

m.delta_angle_ndchn =          1.0    -- angle nodechain airgap in [degr]

post_models("nodedistance","b")

-- DELTA_KNOTEN       = b[1] in [m]     distance nodes stator surface
-- DELTA_KNOTEN_ANGLE = b[2] in [degr]  angle nodechain airgap

pre_models("STATOR_3");


-- CAD-Parameter Data:

--  Magnet-Sector

--  Version 8.1.x

m.magn_rad        = dar/2           --  Radius Magnet airgap side    RA  [mm]
m.yoke_rad        = dir/2           --  Radius iron yoke inside      RI  [mm]
m.magn_height     =          3.000  --  Magnet height                HM  [mm]
m.magn_width      =         70.000  --  Magnet width: > 0: [%]; < 0:[mm]
m.airgap          = 2./3.*airgap    --  Mesh height (2/3 airgap)         [mm]
m.nodedist        =          5.000  --  Rel. Node distance > 0.5 ..
m.condshaft_r     = diw/2           --  Conduct. Shaft Radius:< yoke_rad [mm]
m.magn_num        =          1.000  --  Number Magnet sections:   > = 1
m.magn_perm       =         11.000  --  Radius Iron RFE between magnets  [mm]
m.magn_l          =        100.000  --  Magnet Length: < 150 % air gap length
m.magn_ori        =          1.000  --  Magnet:par = +/-1;Pol = 2;halb = +/-3
m.magn_type       =          2.000  --  MagnType:Ac:1;Acp:2;Rc:3; Rcp:4;AAp:5
m.magn_shape      =          0.000  --  Magnet surface radius <= RA    HA[mm]
m.br_height       =          0.000  --  Iron bridge height: = 0: none  BH[mm]
m.br_width        =          0.000  --  Iron bridge width : = 0: none  BW[mm]
m.num_poles       = poles           --  Total number of poles on 2pi
m.npols_gen       = poles_gen       --  Number of poles be generated
m.zeroangl        =          0.000  --  Reference angle to x-axis [grad]

m.cond_shaft      =           0.000 -- El. Conductivity of shaft [S/m]

m.mcvkey_yoke =   'dummy'

m.mcvkey_mshaft = 'dummy'

pre_models("Magnet-Sector");

-- Simulation Data:

--  connect_models

--  Version 8.1.x

pre_models("connect_models");

-- Simulation Data:

--  Gen_winding

--  Version 8.1.x

m.tot_num_slot    = slots           -- Total Number of slots Q
m.num_poles       = poles           -- Number of Poles 2p
m.num_phases      =          3.000  -- Number of Phases m  <= 500
m.num_layers      =          1.000  -- Number of Layers (slot sides)per slot
m.num_wires       =         10.000  -- Number of wires per slot side
m.current         =         50.000  -- Wdg-Current [A] or flux [Vs/mm];peak
m.coil_span       =          3.000  -- Coil span Y  >= 1
m.num_slots       = slots_gen       -- Number of slots in Model (Rot-Mot)
m.mat_type        =          1.000  -- Ma-type:1=Rot;21=lin-x;22=lin-y
m.wind_type       =          1.000  -- W-typ:1=w&cur;2=w&flux;3=bar&cur
m.win_asym        =          1.000  -- asy. slot pitch: 1=sym.; <1=asym.
m.wdg_location    =          1.000  -- Windg location:1: stator; 2: rotor
m.curr_inp        =          1.000  -- Curent:Const:0; Q-axis:1; D-axis:-1
m.dq_offset       =          0.000  -- Offset to D-axis:>=0 Compl;<0 only Re
m.npols_gen       = poles_gen       -- Number of Poles simulated      (>= 1)
m.xcoil_1         =          0.000  -- center coordinate of 1. coil side [mm]
m.ycoil_1         =          0.000  -- center coordinate of 1. coil side [mm]
m.xcoil_2         =          0.000  -- center coordinate of 2. coil side [mm]
m.ycoil_2         =          0.000  -- center coordinate of 2. coil side [mm]

pre_models("Gen_winding");

-- Simulation Data:

--  gen_pocfile

--  Version 8.1.x

pre_models("gen_pocfile");


--------------------------------------------------------------------------------
-- Magnetisches Modell berechnen -----------------------------------------------
--------------------------------------------------------------------------------

calc_field_single();

color_gradation(0,0,tot,Babs,0,2.4,model_name.."_mag.ps")

sleep(1)

--------------------------------------------------------------------------------
-- Mechanisches Modell berechnen -----------------------------------------------
--------------------------------------------------------------------------------

-- Material des Rotors:
x1,y1 = pd2c(dir/2+1,45)
x2,y2 = pd2c(dir/2-1,45)
def_mat_mech(x1,y1,"darkblue",7600.0,210.0e9,0.3,0.0,0.0,0.13e-4)
def_mat_mech(x2,y2,"blue",7600.0,205.0e9,0.3,0.0,0.0,0.128e-4)

def_temp_mech(x1,y1,"darkred", 80)
def_temp_mech(x2,y2,"red", 80)

-- Randbedingungen:
del_bcond( )
def_nccond_dphio(0,0, 0,das/2)
def_nccond_dphio(0,0, das/2,0)

-- Geschwindigkeit:
set_speed(30000)

-- Presssitz:
x1,y1 = pd2c(dir/2,45)
set_overlap(x1, y1, 0.015)

calc_mech_pressfit()

color_displacement(0,0,tot,0,0,0,model_name.."_mech.ps")

sleep(1)

--------------------------------------------------------------------------------
-- Thermisches Modell berechnen ------------------------------------------------
--------------------------------------------------------------------------------
--Eisen
lossdensity_fe = 50000
x,y =  pd2c(das/2-1,30)
def_mat_therm(x,y, "darkblue", 7700, 24, 480, 1)
def_loss_density(x,y, "darkblue", lossdensity_fe)
x,y =  pd2c(dis/2+1,30)
def_mat_therm(x,y, "darkblue", 7700, 24, 480, 1)
def_loss_density(x,y, "darkblue", lossdensity_fe)
x,y =  pd2c(dir/2+1,30)
def_mat_therm(x,y, "darkblue", 7700, 24, 480, 1)
x,y =  pd2c(dir/2-1,30)
def_mat_therm(x,y, "darkblue", 7700, 24, 480, 1)

--Magnete
x,y =  pd2c(dar/2-1,45)
def_mat_therm(x,y, "darkgreen", 7500, 8, 440, 1)

--Wicklung
lossdensity_cu = 500000
x,y =  pd2c(dis/2+slot_height/2,15)
def_mat_therm(x,y, "darkyellow", 3500, 4, 150, 1)
def_loss_density(x,y, "darkyellow", lossdensity_cu)
x,y =  pd2c(dis/2+slot_height/2,45)
def_mat_therm(x,y, "darkyellow", 3500, 4, 150, 1)
def_loss_density(x,y, "darkyellow", lossdensity_cu)
x,y =  pd2c(dis/2+slot_height/2,75)
def_mat_therm(x,y, "darkyellow", 3500, 4, 150, 1)
def_loss_density(x,y, "darkyellow", lossdensity_cu)

-- Isolation
x,y =  dis/2+slot_height/2, tooth_width/2+0.5
def_insulation(x,y, "darkred", 0.1, 1430, 0.31, 1100)

-- Luftspalt
x,y =  pd2c(airgapradius,45)
def_mat_therm(x,y, "skyblue", 1.2, 0.2, 1005, 1)
x,y =  pd2c(airgapradius+airgap/3,45)
def_mat_therm(x,y, "skyblue", 1.2, 0.2, 1005, 1)
x,y =  pd2c(airgapradius-airgap/3,45)
def_mat_therm(x,y, "skyblue", 1.2, 0.2, 1005, 1)

x,y =  pd2c(dar/2-1,1)
def_mat_therm(x,y, "skyblue", 1.2, 0.2, 1005, 1)
x,y =  pd2c(dar/2-1,89)
def_mat_therm(x,y, "skyblue", 1.2, 0.2, 1005, 1)

-- Wärmeübergang
x,y =  pd2c(das/2+0.5,45)
def_heat_transfer(x,y, "magenta", 25.0, 20.0)

-- Randbedinungen
del_bcond()
x1,y1 = pd2c(diw/2,0)
x2,y2 = pd2c(das/2+1,0)
x3,y3 = pd2c(das/2+1,90)
x4,y4 = pd2c(diw/2,90)
def_bcond_to(x2,y2, x3,y3)
def_bcond_to(x4,y4, x1,y1)
def_bcond_tp(x1,y1, x2,y2, x3,y3, x4,y4, 4)

calc_therm_field(100, 1.0e-9)
color_gradation_th(0,0,tot,Temp,0,0,model_name.."_therm.ps")

save_model('cont')