VM241 Input Listing


/VERIFY,VM241 
/COM,ANSYS MEDIA REL. 2024R2 (05/10/2024) REF. VERIF. MANUAL: REL. 2024R2
/TITLE, VM241, TEAM20: 3-D STATIC FORCE PROBLEM
C*** USING SOLID237
/COM
/COM
/COM REFERENCE:
/COM  N.TAKAHASHI,T.NAKATA,H.MORISHIGE,"SUMMARY OF RESULTS FOR 
/COM, PROBLEM 20 (3-D STATIC FORCE PROBLEM)", COMPEL, VOL.14,1995,PG:57-75
/NOPR
SMT=10					     ! SMART SIZING MESHING PARAMETER
		                             ! COIL PARAMETERS
TCUR=5000				     ! INPUT CURRENT HERE (AT)
AREA=(18*96.6)*.001**2			     ! AREA
CURDEN=TCUR/AREA			     ! CURRENT DENSITY

/OUT,SCRATCH

/COM, GENERATE CDB FILE TO STORE GEOMETRY AND MESH DATA

_GEOMGEN = 0
_EXIT = 0

*IF,_GEOMGEN,EQ,1,THEN

/PREP7
ET,1,MESH200,9
MP,RSVX,4,1E-7

MP,MURX,1,1
MP,MURX,4,1

TB,BH,2,,40
TBPT,,355,.7
,,405,.8
,,470,.9
,,555,1.
,,673,1.1
,,836,1.2
,,1065,1.3
,,1220,1.35
,,1420,1.4
,,1720,1.45
,,2130,1.5
,,2670,1.55
,,3480,1.6
,,4500,1.65
,,5950,1.70
,,7650,1.75
,,10100,1.8
,,13000,1.85
,,15900,1.9
,,21100,1.95
,,26300,2.
,,32900,2.05
,,42700,2.1
,,61700,2.15
,,84300,2.2
,,110000,2.25
,,135000,2.3
,,200000,2.41
,,400000,2.69
,,800000,3.22

TBCOPY,BH,2,3

N,1,0,0,75/1000						! PATH NODES FOR POSTPROCESSING
N,2,63.5/1000,0,75/1000

BLOCK,0,63.5,0,25/2,0,25				! POLE
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				! ARMATURE
BLOCK,0,13,0,5.5,26,(125+.5)				! AIR REGION
VOVLAP,1,2
NUMCMP,VOLU

BLOCK,39/2,75/2,0,14.5,(25+1.7),(125-1.7)
BLOCK,0,14.5,39/2,75/2,(25+1.7),(125-1.7)
LOCAL,11,1,14.5,14.5,25+1.7
LOCAL,12,1,.0145,.0145,.001*(25+1.7)
CSYS,11
WPCSYS,11
CYL4,,,5,0,23,90,(125-1.7)-(25+1.7)
VGLUE,6,8
NUMCMP,VOLU

CSYS,0
WPCSYS,0
CYL4,,,0,0,100,90,175
VOVLAP,ALL
NUMCMP,ALL

VSEL,S,VOLU,,1
VATT,3,1,1							! ARMATURE
VSEL,S,VOLU,,3,5
VATT,2,1,1							! POLE
VSEL,S,VOLU,,6
VATT,4,2,1							! COIL +Y
VSEL,S,VOLU,,7
VATT,4,4,1							! COIL -X
VSEL,S,VOLU,,8
VATT,4,3,1							! COIL +Y THETA

ALLSEL,ALL
SMRT,SMT							! SMART SIZING MESHING PARAMETER
MSHKEY,0
VMESH,ALL

ESEL,S,MAT,,3						! POLE FORCE EXTRACTION
CM,ARM,ELEM
ALLSEL,ALL

VLSCALE,ALL,,,.001,.001,.001,,0,1   ! SCALE TO METERS
CSYS,0
ALLSEL,ALL
cdwrite,db,vm241-1,cdb
FINISH

*IF,_EXIT,EQ,1,THEN
*ENDIF

*ELSE
cdread,db,vm241-1,cdb
*ENDIF
finish

/COM
/COM *** CREATE CURRENT DENSITY LOADING IN THE COIL
/PREP7
ET,1,SOLID232						! VOLT
ESEL,S,MAT,,4						! CONDUCTOR
NSLE
NSEL,R,LOC,X,0
D,ALL,VOLT,0
NSLE
NSEL,R,LOC,Y,0
CP,1,VOLT,ALL
F,NDNEXT(0),AMPS,TCUR
NSLE
FINISH

/SOLU
SOLVE
ALLS
FINISH

/POST1
VSEL,S,VOLU,,1,8
ESLV,S
/VIEW,1,,,1
/ANGLE,1,-90
/DIST,,0.042616
/FOCUS,,0.031066,0.004962,0.075038
PLVECT,JT,,,,VECT,,ON
ALLS
FINISH

/COM
/COM *** SOLVE MAGNETIC ANALYSIS
/PREP7
ET,1,SOLID237						! AZ
KEYOP,1,7,1						! CORNER NODE FORCE OUTPUT

NSEL,S,EXT
NSLE,R
NSLE,U,CORNER
D,ALL,AZ,0						! FLUX-PARALLEL MAGNETIC BCS
NSEL,ALL
FINISH

/SOLU
LDREAD,JS,1,1,,,,rth
SOLVE
FINISH

/POST1
VSEL,S,VOLU,,1,8
ESLV,S
/VIEW,1,,1
/ANGLE,1,180
/DIST,,0.09625
/FOCUS,,0.05,0.05,0.0875
PLVECT,B,,,,VECT,,ON
ALLS

*DIM,LABEL,CHAR,3					! PARAMETERS FOR POSTPROCESSING
*DIM,VALUE,,3,3
LABEL(1) = 'FMAG(Z) '
LABEL(2) = 'POLE(BZ) '
LABEL(3) = 'ARM(BZ) '
VALUE(1,1)=80.1
VALUE(2,1)=0.46
VALUE(3,1)=2.05

*MSG,NOTE,TCUR
%/RESULTS FOR CURRENT = %G (MULTIPLY FORCE BY 4 FOR SYMMETRY)

/COM, *** SUM UP MAGNETIC FORCES ACTING ON THE ARMATURE
CMSEL,S,'ARM'
NSLE
ESEL,ALL

*GET,NNOD,NODE,,COUNT
_FZSUM=0
ND=0
*DO,I,1,NNOD
 ND=NDNEXT(ND)
 *GET,FZ,NODE,ND,FMAG,Z
 _FZSUM=_FZSUM+FZ
*ENDDO
                                 ! ALTERNATIVELY, ISSUE THE EMFT COMMAND

FMAGZ=_FZSUM                      
FZ=4*FMAGZ                       ! SCALE FORCE FOR SYMMETRY

ESEL,S,MAT,,2,3
NSLE,S
NSEL,A,NODE,,1,2
PATH,P1,2,,48                    ! SETUP PATH - NODES 1, 2
PPATH,1,1
PPATH,2,2
/COM
/COM, PATH RESULTS FOR ARM AND POLE REGIONS
/COM
PDEF,BZ,B,Z
PRPATH,BZ
/OUT,
*GET,BZPOLE,PATH,0,LAST,BZ      ! EXTRACT BZ AT POLE
*GET,BZARM,PATH,0,MAX,BZ        ! EXTRACT BZ AT ARM
VALUE(1,2)=ABS(FZ)
VALUE(2,2)=ABS(BZPOLE)
VALUE(3,2)=ABS(BZARM)
VALUE(1,3)=ABS(FZ)/VALUE(1,1)
VALUE(2,3)=ABS(BZPOLE)/VALUE(2,1)
VALUE(3,3)=ABS(BZARM)/VALUE(3,1)
*VLEN,3
SAVE,INF1
FINISH
/CLEAR,NOSTART

/TITLE, VM241, TEAM20: 3-D STATIC FORCE PROBLEM
C*** USING SOLID236
SMT=10					     ! SMART SIZING MESHING PARAMETER
		                             ! COIL PARAMETERS
TCUR=5000				     ! INPUT CURRENT HERE (AT)
AREA=(18*96.6)*.001**2			     ! AREA
CURDEN=TCUR/AREA			     ! CURRENT DENSITY

/OUT,SCRATCH

/COM, GENERATE CDB FILE TO STORE GEOMETRY AND MESH DATA

_GEOMGEN = 0
_EXIT = 0

*IF,_GEOMGEN,EQ,1,THEN


/PREP7
ET,1,SOLID231
MP,RSVX,4,1E-7

MP,MURX,1,1
MP,MURX,4,1

TB,BH,2,,40
TBPT,,355,.7
,,405,.8
,,470,.9
,,555,1.
,,673,1.1
,,836,1.2
,,1065,1.3
,,1220,1.35
,,1420,1.4
,,1720,1.45
,,2130,1.5
,,2670,1.55
,,3480,1.6
,,4500,1.65
,,5950,1.70
,,7650,1.75
,,10100,1.8
,,13000,1.85
,,15900,1.9
,,21100,1.95
,,26300,2.
,,32900,2.05
,,42700,2.1
,,61700,2.15
,,84300,2.2
,,110000,2.25
,,135000,2.3
,,200000,2.41
,,400000,2.69
,,800000,3.22

TBCOPY,BH,2,3

N,1,0,0,75/1000						! PATH NODES FOR POSTPROCESSING
N,2,63.5/1000,0,75/1000

BLOCK,0,63.5,0,25/2,0,25				! POLE
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				! ARMATURE
BLOCK,0,13,0,5.5,26,(125+.5)				! AIR REGION
VOVLAP,1,2
NUMCMP,VOLU

BLOCK,39/2,75/2,0,14.5,(25+1.7),(125-1.7)
BLOCK,0,14.5,39/2,75/2,(25+1.7),(125-1.7)
LOCAL,11,1,14.5,14.5,25+1.7
LOCAL,12,1,.0145,.0145,.001*(25+1.7)
CSYS,11
WPCSYS,11
CYL4,,,5,0,23,90,(125-1.7)-(25+1.7)
VGLUE,6,8
NUMCMP,VOLU

CSYS,0
WPCSYS,0
CYL4,,,0,0,100,90,175
VOVLAP,ALL
NUMCMP,ALL

VSEL,S,VOLU,,1
VATT,3,1,1							! ARMATURE
VSEL,S,VOLU,,3,5
VATT,2,1,1							! POLE
VSEL,S,VOLU,,6
VATT,4,2,1							! COIL +Y
VSEL,S,VOLU,,7
VATT,4,4,1							! COIL -X
VSEL,S,VOLU,,8
VATT,4,3,1							! COIL +Y THETA

ALLSEL,ALL
SMRT,SMT							! SMART SIZING MESHING PARAMETER
MSHKEY,0
MSHAPE,1,3D
VMESH,ALL

ESEL,S,MAT,,3						! POLE FORCE EXTRACTION
CM,ARM,ELEM
ALLSEL,ALL

VLSCALE,ALL,,,.001,.001,.001,,0,1   ! SCALE TO METERS
CSYS,0
ALLSEL,ALL
cdwrite,db,vm241-2,cdb
FINISH

*IF,_EXIT,EQ,1,THEN
*ENDIF

*ELSE
cdread,db,vm241-2,cdb
*ENDIF
FINISH

/COM
/COM *** CREATE CURRENT DENSITY LOADING IN THE COIL
/PREP7
ESEL,S,MAT,,4						! CONDUCTOR
NSLE
NSEL,R,LOC,X,0
D,ALL,VOLT,0
NSLE
NSEL,R,LOC,Y,0
CP,1,VOLT,ALL
F,NDNEXT(0),AMPS,TCUR
NSLE
FINISH

/SOLU
SOLVE
ALLS
FINISH

/POST1
VSEL,S,VOLU,,1,8
ESLV,S
/VIEW,1,,,1
/ANGLE,1,-90
/DIST,,0.042616
/FOCUS,,0.031066,0.004962,0.075038
PLVECT,JT,,,,VECT,,ON
ALLS
FINISH

/COM
/COM *** SOLVE MAGNETIC ANALYSIS
/PREP7
ET,1,SOLID236						! AZ
KEYOP,1,7,1						! CORNER NODE FORCE OUTPUT

NSEL,S,EXT
NSLE,R
NSLE,U,CORNER
D,ALL,AZ,0						! FLUX-PARALLEL MAGNETIC BCS
NSEL,ALL
FINISH

/SOLU
LDREAD,JS,1,1,,,,rth
SOLVE
FINISH

/POST1
VSEL,S,VOLU,,1,8
ESLV,S
/VIEW,1,,1
/ANGLE,1,180
/DIST,,0.09625
/FOCUS,,0.05,0.05,0.0875
PLVECT,B,,,,VECT,,ON
ALLS

*DIM,LABEL,CHAR,3					! PARAMETERS FOR POSTPROCESSING
*DIM,VALUE,,3,3
LABEL(1) = 'FMAG(Z) '
LABEL(2) = 'POLE(BZ) '
LABEL(3) = 'ARM(BZ) '
VALUE(1,1)=80.1
VALUE(2,1)=0.46
VALUE(3,1)=2.05

*MSG,NOTE,TCUR
%/RESULTS FOR CURRENT = %G (MULTIPLY FORCE BY 4 FOR SYMMETRY)

/COM, *** SUM UP MAGNETIC FORCES ACTING ON THE ARMATURE
CMSEL,S,'ARM'
NSLE
ESEL,ALL

*GET,NNOD,NODE,,COUNT
_FZSUM=0
ND=0
*DO,I,1,NNOD
 ND=NDNEXT(ND)
 *GET,FZ,NODE,ND,FMAG,Z
 _FZSUM=_FZSUM+FZ
*ENDDO
                                 ! ALTERNATIVELY, ISSUE THE EMFT COMMAND
!EMFT                            ! MACRO TO SUM UP MAGNETIC FORCES

FMAGZ=_FZSUM                      
FZ=4*FMAGZ                       ! SCALE FORCE FOR SYMMETRY

ESEL,S,MAT,,2,3
NSLE,S
NSEL,A,NODE,,1,2
PATH,P2,2,,48                    ! SETUP PATH - NODES 1, 2
PPATH,1,1
PPATH,2,2
/COM
/COM, PATH RESULTS FOR ARM AND POLE REGIONS
/COM
PDEF,BZ,B,Z
PRPATH,BZ
/OUT,
*GET,BZPOLE,PATH,0,LAST,BZ      ! EXTRACT BZ AT POLE
*GET,BZARM,PATH,0,MAX,BZ        ! EXTRACT BZ AT ARM
VALUE(1,2)=ABS(FZ)
VALUE(2,2)=ABS(BZPOLE)
VALUE(3,2)=ABS(BZARM)
VALUE(1,3)=ABS(FZ)/VALUE(1,1)
VALUE(2,3)=ABS(BZPOLE)/VALUE(2,1)
VALUE(3,3)=ABS(BZARM)/VALUE(3,1)
*VLEN,3
SAVE,INF2

RESUME,INF1
/OUT,vm241,vrt
/COM
/COM,------------------- VM241 RESULTS COMPARISON ---------------------
/COM,
/COM,          |   TARGET   |   Mechanical APDL   |   RATIO
/COM,
/COM,--SOLID237--
*VWRITE,LABEL(1),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,'    ',F7.3,'     ',F14.3,'       ',1F15.3)
/COM,
/NOPR
RESUME,INF2
/COM,--SOLID236--
*VWRITE,LABEL(1),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,'    ',F7.3,'     ',F14.3,'       ',1F15.3)
/COM,----------------------------------------------------------------
/OUT
*LIST,vm241,vrt
FINISH
/DELETE,INF1
/DELETE,INF2