VM270 Input Listing


/COM,ANSYS MEDIA REL. 2024R2 (05/10/2024) REF. VERIF. MANUAL: REL. 2024R2
/VERIFY,VM270
/TITLE, VM270, FORCES IN PERMANENT MAGNETS (TEAM WORKSHOP PROBLEM 23)
/COM,   REFEENCE: " N.IDA, J.P.A.BASTOS, FORCES IN PERMANENT MAGNETS, TEAM
/COM,             WORKSHOP PROBLEM 23, PROCEEDINGS OF THE TEAM WORKSHOP IN
/COM, 		THE SIXTH ROUND, OKAYAMA, PP.49-56.
/COM,
/NOPR
/PREP7
! DIMENSIONS AND PARAMETERS
MM = 0.001
PI = ACOS(-1)

! CONFIGURATION A
! SAMARIUM-COBALT MAGNET AND LARGER COIL ! ELECTROMAGNET ! LARGER COIL

D1 = 3.048*MM               ! SPOOL INNER DIAMETER
R_1=D1/2                    ! SPOOL INNER RADIUS
D2 = 3.9624*MM              ! SPOOL OUTER DIAMETER
R_2=D2/2                    ! SPOOL OUTER RADIUS
L_1 = 1.524*MM              ! INNER LENGTH
SE = 0.127*MM               ! SPOOL END THICKNESS
DEL = 0.234*MM              ! AXIAL DISPLACEMENT
N = 280                     ! NUMBER OF TURNS
R = 57                      ! COIL RESISTANCE / OHM
I = 0.050                   ! COIL CURRENT / A
AC = (R_2-R_1)*L_1          ! COIL AREA / M^2
JS = N*I/AC                 ! CURRENT DENSITY
SD = SE + DEL
                  
! PERMANENT MAGNET
! SAMARIUM-COBALT

D3 = 2.9972*MM              ! DIAMETER OF LARGE MAGNET
R_3=D3/2                    ! RADIUS OF LARGE MAGNET
L_3 = 1.6*MM                ! LENGTH
BR = 1.02                   ! REMANENCE / T
HC = 720000                 ! COERCIVITY / A/M
MU0 = 4*PI*1E-7             ! FREE-SPACE PERMEABILITY / H/M

! SOLID MODEL
! PERMANENT MAGNET

RECT,0,R_3,0,L_3
RECT,0,R_3,-0.25*MM,0
RECT,R_3,R_2,-0.25*MM,0
RECT,R_3,R_2,0,L_3
RECT,0,R_3,L_3,L_3+0.25*MM
RECT,R_3,R_2,L_3,L_3+0.25*MM
RECT,0,R_3,L_3+0.25*MM,L_3+SD
RECT,R_3,R_2,L_3+0.25*MM,L_3+SD

! CONDUCTOR
RECT,0,R_1,L_3+SD,L_3+SD+L_1
RECT,R_1,R_2,L_3+SD,L_3+SD+L_1
NUMMRG,KP

WPOFF,,L_3/3
PCIRC,,10*MM,-90,90
PCIRC,,15*MM,-90,90
AOVLAP,ALL
NUMCMP,AREA

! FEM MODEL
! ELEMENT TYPES

ET,1,PLANE233,0,0,1     	! 2-D MAGNETIC (AZ) AXISYMMETRIC SOLID
KEYOP,1,7,1             	! CONDENCE FMAG FORCES TO ELEMENT CORNER NODES
ET,2,110,,1,1           	! INFIN BOUNDARY 

! MATERIALS

! AIR
MP, MURX, 1, 1

! COPPER
MP, MURX, 2, 1

!SAMARIUM-COBALT
MP, MURX, 3, BR/(HC*MU0)
MP, MGYY, 3, HC

!INFIN ELEMENTS
MP,MURX,4,1

! AREA ATTRIBUTES
! PERMANENT MAGNET
ASEL,S,AREA,,9
AATT,3,,1

! COPPER COIL
ASEL,S,AREA,,8
AATT,2,,1

! AIR
ALLSEL
ASEL,U,,,7,9
AATT,1,,1
ASEL,S,,,7
AATT,4,,2
ALLSEL


! MESHING

MSHAPE,0,2D
MSHKEY,2
ESIZE,.125*MM
ASEL,U,,,7
ASEL,U,,,12
AMESH,ALL
ASEL,ALL

ESIZE,.25*MM
LSEL,S,,,24,25
LESIZE,ALL,,,1
LSEL,ALL
AMESH,7

ESIZE,0.25*MM
AMESH,12

LSEL,S,,,16
NSLL,S,1
SF,ALL,INF,1
ALLSEL

! BOUNDARY CONDITIONS
! CONSTRAIN MAGNETIC VECTOR POTENTIAL ON SIDES OF AIR BOX

CSYS,0
NSEL,S,LOC,X,0
D, ALL, AZ, 0
ALLSEL

! APPLY CURRENT TO COIL

ESEL, S, MAT, , 2
BFE, ALL, JS, 1,,, JS
ALLSEL

ESEL,S,MAT,,2
CM,COND,ELEM

ESEL,S,MAT,,3
CM,MAGNET,ELEM
ESEL,ALL
ALLSEL,ALL
FINISH

! *** SOLVE WITH MAXWELL FORCE OPTION
/SOLU
ANTYPE, STATIC
/OUT,SCRATCH
SOLVE
/OUT
FINISH

/POST1
ESEL,S,MAT,,3
NSLE
ESLN
EMFT            			! SUM UP FMAG FORCES ACTING ON THE PERMANENT MAGNET
ALLSEL,ALL
FY_TAR1=1.150*9.81E-3		! TARGET (MEASURED) FORCE FY
FY_OBT1 = _FYSUM			! FORCE OBTAINED FROM MECHANICAL APDL
FINISH

! *** SOLVE WITH LORENTZ FORCE OPTION
/PREP7
KEYOPT,1,7,0
KEYOP,1,8,1				! ELECTROMAGNETIC FORCE CALCULATION USING LORENTZ
FINISH

/SOLU
ANTYPE,STATIC
/OUT,SCRATCH
SOLVE
/OUT
FINISH

/POST1
ESEL,S,MAT,,2
NSLE
EMFT            			! SUM UP FMAG FORCES ACTING ON THE COIL
ALLS
FY_TAR2=-1.150*9.81E-3		! TARGET (MEASURED) FORCE FY
FY_OBT2 = _FYSUM			! FORCE OBTAINED FROM MECHANICAL APDL
PLF2D                      	! PLOT FLUX LINES IN THE MODEL

*DIM,LABEL,CHAR,1,2
*DIM,VALUE,,2,3

LABEL(1,1) = 'F_MAX'
LABEL(1,2) = 'F_LOR'
*VFILL,VALUE(1,1),DATA,FY_TAR1
*VFILL,VALUE(1,2),DATA,FY_OBT1
*VFILL,VALUE(1,3),DATA,ABS(FY_OBT1/FY_TAR1)
*VFILL,VALUE(2,1),DATA,FY_TAR2
*VFILL,VALUE(2,2),DATA,FY_OBT2
*VFILL,VALUE(2,3),DATA,ABS(FY_OBT2/FY_TAR2)
SAVE,TABLE_1
FINISH
RESUME,TABLE_1
/COM,
/OUT,vm270,vrt
/COM,-----------------------VM270 RESULTS COMPARISON ----------------------- 
/COM,
/COM,				|  TARGET   |   Mechanical APDL  |   RATIO
/COM,
/COM, MAXWELL FORCE CALCULATION
/COM,
*VWRITE,LABEL(1,1),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A3,' ',F10.4,'  ',F14.4,'   ',F17.3)
/COM,
/COM, LORENTZ FORCE CALCULATION
/COM,
*VWRITE,LABEL(1,2),VALUE(2,1),VALUE(2,2),VALUE(2,3)
(1X,A3,' ',F10.4,'  ',F14.4,'   ',F17.3)
/COM,
/COM,-------------------------------------------------------------------------
/OUT
*LIST,vm270,vrt
FINISH
/DEL,SCRATCH