magneto 1
DESCRIPTION
ANSYS MAGNETO ANALYSISTRANSCRIPT
Specogna Ruben – ANSYS TutorialLecture 3 – Magnetostatic Problems
1
ANSYS 7.1 TUTORIALMagnetostatic problems
Ruben Specogna
A.A. 2005/06
Università di UdineDipartimento DIEGM
Gruppo di Elettrotecnica
Specogna Ruben – ANSYS TutorialLecture 3 – Magnetostatic Problems
2
Magnetostatic problems
• Usually the formulation used is based on magnetic vector potential A:
• First example:– Infinite rectangular massive
conductor carrying uniformcurrent density
– It has planar symmetry 2D– b=h=10mm– ET PLANE53 for second order element for 2D magnetostatic
(both planar and axialsymmetric problems), see PLANE13 for 1st order element
JA
0
1
Specogna Ruben – ANSYS TutorialLecture 3 – Magnetostatic Problems
3
Preprocessing task• File “Magnetostatica_2D_corr_imp_planare.txt”
/PREP7 !start the preprocessing
/TITLE,2D Planar Magnetostatic !defining title
et,1,plane53 !defining element type (ET)
et,2,plane53!plane13 for first order. For axisymmetrical problem add:!keyopt,1,3,1 and keyopt,2,3,1!syntax: KEYOPT,material_constant,kp_number,kp_value
b=10e-3 !geometric parameter
h=10e-3 !geometric parameter
curr=1 !current
Jsz=curr/(b*h)!corrensponding current density
mp,murx,1,1 ! Permeability of airmp,murx,2,1 ! Permeability of the conductor
Specogna Ruben – ANSYS TutorialLecture 3 – Magnetostatic Problems
4
Model & materials
wpave,10*b/2,0 !setting a new working plane
rectng,-b/2,b/2,-h/2,h/2 !conductor
rectng,10*(-b/2),10*(b/2),10*(-h/2),10*(h/2) !air
asel,all !selecting all areas
aovlap,all !find intersections in the areas
numcmp,all !number compression
aplot !plotting areas
!material properties
!air
asel,all
aatt,1
!conductor
asel,s,,,1
aatt,2
Specogna Ruben – ANSYS TutorialLecture 3 – Magnetostatic Problems
5
Mesh, source & b. cond.s!mesh generation
alls,all
smrtsize,1 !specify the refinement of the mesh
mshape,1 !triangular mesh
mshkey,0 !free meshing (not mapped mesh)
amesh,all !mesh all areas
!current source
esel,s,mat,,2 !selecting area 2 (massive conductor)
bfe,all,js,1,,,jsz !apply the source (body force element)
!Syntax: BFE, ELEM, Label, STLOC, VALx, VALy, VALz, VALphase
!boundary conditions
lsel,s,ext !select all “external” lines automatically
dl,all,,AZ,0,1 !force Az=0 on the nodes upon external lines
!Defines DOF constraints on lines.
!Syntax: DL, LINE, AREA, Label, Value1, Value2
Specogna Ruben – ANSYS TutorialLecture 3 – Magnetostatic Problems
6
Solution & postprocessing
Finish
/SOLU
alls,all
antype,static !magnetostatic solution
solve
Finish
The results can be seen with the GUI at:
General Postprocessing PlotResult Contour Plot 2D Flux Lines
or:
General Postprocessing PlotResult Contour Plot Element Solution
and then select the variable to display: for ex. BSUM, JTSUM
Then we can plot a vector field with:
General Postprocessing PlotResult Vector Plot Predefined
and then choose for ex. B, H or JT (plf2d command)
Specogna Ruben – ANSYS TutorialLecture 3 – Magnetostatic Problems
7
We’ll consider an actuator. All materials are linear.
We would like to calculate the force on the mobile armature.
Due to axialsymmetry we will solve a 2D axialsymmetric problem.
EXAMPLE 2
Specogna Ruben – ANSYS TutorialLecture 3 – Magnetostatic Problems
8
Preprocessing Example 2/PREP7
/TITLE,2D Axisimmetrical Actuator
ET,1,PLANE53
KEYOPT,1,3,1 !activating key option for axialsymmetry
MP,MURX,1,1 !air
MP,MURX,2,1000 !iron
MP,MURX,3,1 !core (copper)
MP,MURX,4,2000 !iron
n=650 !some useful constants: number of turns
i=1.0 !current
ta=.75 !follows some geomtric constants
tb=.75
tc=.50
td=.75
wc=1
hc=2
gap=.25
space=.25
ws=wc+2*space hs=hc+.75 w=ta+ws+tc hb=tb+hsh=hb+gap+td acoil=wc*hc !coil area jdens=n*i/acoil !coil current density
Specogna Ruben – ANSYS TutorialLecture 3 – Magnetostatic Problems
9
The geometry
/PNUM,AREA,1 !with aplot will plot every area with different colors
RECTNG,0,w,0,tb
RECTNG,0,w,tb,hb
RECTNG,ta,ta+ws,0,h
RECTNG,ta+space,ta+space+wc,tb+space,tb+space+hc
AOVLAP,ALL
RECTNG,0,w,0,hb+gap
RECTNG,0,w,0,h
AOVLAP,ALL
NUMCMP,AREA
APLOT
Specogna Ruben – ANSYS TutorialLecture 3 – Magnetostatic Problems
10
Materials
!default air mat = 1ASEL,S,AREA,,2 AATT,3 !coreASEL,S,AREA,,1 ASEL,A,AREA,,12,13,1AATT,4 !upper ironASEL,S,AREA,,3,5,1 ASEL,A,AREA,,7,8,1AATT,2 !lower iron
/PNUM,MAT,1 !(*) ALLSEL,ALLAPLOT
!(*) with aplot will plot every material with! different colors (like the figure)
Specogna Ruben – ANSYS TutorialLecture 3 – Magnetostatic Problems
11
Mesh and force computation
SMRTSIZE,3 !setting the refinement of the mesh
AMESH,ALL !mesh all the areas
ESEL,S,MAT,,4 !select elements of material 4 CM,ARM,ELEM !with this collection of elements creates the
!component named “ARM”
FMAGBC,'ARM‘ !tells ANSYS that after solution I want to know
!the resulting force on the component ARM
ALLSEL,ALL
ARSCAL,ALL,,,.01,.01,1,,,1 !scaling lengths in meters
FINISH !finish the preprocessing
Specogna Ruben – ANSYS TutorialLecture 3 – Magnetostatic Problems
12
Bound. cond.s & solution
ESEL,S,MAT,,3 !selecting the coil material areas
BFE,ALL,JS,1,,,jdens/.01**2 !imposing the source
ESEL,ALL
NSEL,EXT !select automatically all boundary nodes
D,ALL,AZ,0 !impose A=0 on this nodes
ALLSEL,ALL
FINISH !finish the preprocessing
/SOLU
MAGSOLV !solve for magnetostatic
SAVE
FINISH
Specogna Ruben – ANSYS TutorialLecture 3 – Magnetostatic Problems
13
Postprocessing
!starting postoprocessing task
/POST1
!plot 2D flux lines
PLF2D
!calculate the force on the ARM
FMAGSUM
!plot vector field B
PLVECT,B,,,,VECT,ELEM,ON
!plot |B| as a scalar field
PLNSOL,B,SUM
Specogna Ruben – ANSYS TutorialLecture 3 – Magnetostatic Problems
14
EXAMPLE 3
3D actuator problem.
Saturable materials: the solution is non-linear.(3 materials: air, core (saturable), armature (saturable). The coil is not meshed)
Due to symmetry we model only ¼ of the domain.
Specogna Ruben – ANSYS TutorialLecture 3 – Magnetostatic Problems
15
Preprocessing task/prep7
/title,3D Actuator
n=500 !turns of the coil
i=6 !current per turn et,1,96 !element type solid96mp,murx,1,1 !assign mur=1 at air
!activate a table for non-linear materials
tb,bh,2,,40 !B-H tabletbpt,,355,.7 !define all the points!of the B-H curve
,,405,.8
,,470,.9
,,555,1.0
,,673,1.1…for all the points…
tbcopy,bh,2,3 !copies the table!from material 2 to material 3
Specogna Ruben – ANSYS TutorialLecture 3 – Magnetostatic Problems
16
Geometry
/pnum,volu !plot the volume’s numbers
block,0,63.5,0,25/2,0,25
/view,1,1,1,1 !change the angle of view (see syntax)
/replot !replot
block,38.5,63.5,0,25/2,25,125
block,13.5,63.5,0,25/2,125,150
vglue,all
block,0,12.5,0,5,26.5,125
block,0,13,0,5.5,26,125.5
vovlap,1,2
numcmp,volu
cyl4,,,0,0,100,90,175
vovlap,all
numcmp,volu
Specogna Ruben – ANSYS TutorialLecture 3 – Magnetostatic Problems
17
Material and meshing
vsel,s,,,1 !setting up materials
vatt,3
vsel,s,,,3,5
vatt,2
allsel,all
smrt,8
mshape,1,3d !tetrahedral mesh
mshkey,0 !free mesh
vmesh,all !mesh all volumes
/pnum,mat,1 !plot different materials with different colors
/number,1 !no numbers
eplot !plot elements
Specogna Ruben – ANSYS TutorialLecture 3 – Magnetostatic Problems
18
Source
esel,s,mat,,3 cm,arm,elem !create the component “arm”fmagbc,'arm‘ !will calculate force on “arm”allsel,allvlscale,all,,,.001,.001,.001,,0,1 !scaling in meters
local,12,0,0,0,75/1000 !change system of coordinateswpcsys,-1 !define a wp based on the system of coord.
!define a racetrack coil
race,.0285,.0285,.014,n*i,.018,.0966,,,'coil1'/eshape,1 !display the coil (it's NOT meshed)eplotsave !save the databasefinish
Specogna Ruben – ANSYS TutorialLecture 3 – Magnetostatic Problems
19
Bound. con.s & Solutiond,2,mag,0allsel,all
/solumagsolv,3,,,,,1finish
/post1fmagsum,'arm'finishsave
/solu*dim,cur,array,1cur(1)=ilmatrix,1,'coil','cur'finish