/COM,ANSYS MEDIA REL. 2024R2 (05/10/2024) REF. VERIF. MANUAL: REL. 2024R2
/VERIFY,VM166
/PREP7
SMRT,OFF
/TITLE, VM166, LONG CYLINDER IN A SINUSOIDAL MAGNETIC FIELD
/COM, ELECTROMAGNETIC WORKSHOP, RAL-86-049, EMSON, PAGE 39
ANTYPE,HARMIC ! FULL HARMONIC ANALYSIS
ET,1,PLANE13 ! 2-D COUPLED-FIELD SOLID (AZ DOF)
EMUNIT,MKS ! MKS UNITS
MP,MURX,1,1 ! RELATIVE PERMEABILITY - AIR
MP,MURX,2,1 ! RELATIVE PERMEABILITY - ALUMINUM
MP,RSVZ,2,(1/25380711) ! RESISTIVITY - ALUMINUM
K,1
K,2,.03
K,3,.03,.03
K,4,,.03
CSYS,1
K,5,.05715
K,6,.05715,45
K,7,.05715,90
KGEN,2,5,7,1,.0127
KGEN,2,8,10,1,.77015
L,2,5
*REPEAT,3,1,1
L,5,8
*REPEAT,3,1,1
L,8,11
*REPEAT,3,1,1
CSYS,0
A,1,2,3,4 ! DEFINE AREAS
CSYS,1
A,2,5,6,3
*REPEAT,3,3,3,3,3
A,3,6,7,4
*REPEAT,3,3,3,3,3
ASEL,S,AREA,,3,6,3
AATT,2
ASEL,ALL
LESIZE,1,,,4,.5 ! DEFINE LINE SEGMENTS AND DIVISIONS
*REPEAT,3,1
LESIZE,4,,,5
*REPEAT,3,1
LESIZE,7,,,9,25
*REPEAT,3,1
MSHK,1 ! MAPPED AREA MESH
MSHA,0,2D ! USING QUADS
ESIZE,,6
AMESH,ALL
PI=3.141592654
DTH=(7.5*PI)/180. ! THETA INCREMENT
*DO,THP,0,90,3.75 ! IMPOSE EXTERIOR NODAL POTENTIALS
NSEL,S,LOC,X,.83,.85 ! SELECT NODES AT OUTERMOST RADIUS
NSEL,R,LOC,Y,(THP-1.),(THP+1.)
TH=(THP*PI)/180
VAL=-(COS(TH)*.084) ! CALCULATE POTENTIAL
D,ALL,AZ,VAL
NSEL,ALL
*ENDDO
CSYS,0
NSEL,S,LOC,X,0
D,ALL,AZ,0 ! IMPOSE DIRICHLET BOUNDARY CONDITION
NSEL,ALL
HARFRQ,60 ! SET FREQUENCY = 60 HZ
FINI
/SOLU
SOLVE
FINI
/POST1
SET,1 ! REAL RESULTS
NSEL,S,NODE,,1
PRNSOL,B,COMP ! PRINT NODAL REAL FLUX DENSITY AT ORIGIN
*GET,BR1,NODE,1,B,X
*GET,BR2,NODE,1,B,Y
SET,1,1,,1 ! IMAGINARY RESULTS
PRNSOL,B,COMP ! PRINT NODAL IMAGINARY FLUX DENSITY AT ORIGIN
*GET,BI1,NODE,1,B,X
*GET,BI2,NODE,1,B,Y
ESEL,S,MAT,,2
POWERH ! CALCULATE TIME-AVERAGE POWER LOSS
*DIM,LABEL,CHAR,5,2
*DIM,VALUE,,5,3
LABEL(1,1) = 'BX REAL ','BY REAL ','BX IM ','BY IM ','PWR LOSS '
LABEL(1,2) = 'T','T','T','T','W/m'
*VFILL,VALUE(1,1),DATA,0,-.00184,0,-.02102,2288
*VFILL,VALUE(1,2),DATA,BR1,BR2,BI1,BI2,PAVG
*VFILL,VALUE(1,3),DATA,1,ABS(BR2/.00184),1,ABS(BI2/.02102),ABS(PAVG/2288)
/OUT,vm166,vrt
/COM,------------------- VM166 RESULTS COMPARISON --------------
/COM,
/COM,RESULTS AT ORIGIN
/COM,
/COM, | TARGET | Mechanical APDL | RATIO
/COM,PLANE13
*VWRITE,LABEL(1,1),LABEL(1,2),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,A8,' ',F10.4,' ',F13.4,' ',1F15.3)
/OUT
FINISH
/CLEAR,NOSTART
/NOPR
/PREP7
SMRT,OFF
ET,1,PLANE233,1,2 ! 2-D LF EMAG SOLID (AZ,VOLT DOF)
MP,MURX,1,1 ! RELATIVE PERMEABILITY - AIR
MP,MURX,2,1 ! RELATIVE PERMEABILITY - ALUMINUM
MP,RSVX,1,1.E9 ! RESISTIVITY - AIR
MP,RSVX,2,(1/25380711) ! RESISTIVITY - ALUMINUM
K,1
K,2,.03
K,3,.03,.03
K,4,,.03
CSYS,1
K,5,.05715
K,6,.05715,45
K,7,.05715,90
KGEN,2,5,7,1,.0127
KGEN,2,8,10,1,.77015
L,2,5
*REPEAT,3,1,1
L,5,8
*REPEAT,3,1,1
L,8,11
*REPEAT,3,1,1
CSYS,0
A,1,2,3,4 ! DEFINE AREAS
CSYS,1
A,2,5,6,3
*REPEAT,3,3,3,3,3
A,3,6,7,4
*REPEAT,3,3,3,3,3
ASEL,S,AREA,,3,6,3
AATT,2
ASEL,ALL
LESIZE,1,,,4,.5 ! DEFINE LINE SEGMENTS AND DIVISIONS
*REPEAT,3,1
LESIZE,4,,,5
*REPEAT,3,1
LESIZE,7,,,9,25
*REPEAT,3,1
MSHK,1 ! MAPPED AREA MESH
MSHA,0,2D ! USING QUADS
ESIZE,,6
AMESH,ALL
PI=3.141592654
DTH=(7.5*PI)/180. ! THETA INCREMENT
*DO,THP,0,90,3.75 ! IMPOSE EXTERIOR NODAL POTENTIALS
NSEL,S,LOC,X,.83,.85 ! SELECT NODES AT OUTERMOST RADIUS
NSEL,R,LOC,Y,(THP-1.),(THP+1.)
TH=(THP*PI)/180
VAL=-(COS(TH)*.084) ! CALCULATE POTENTIAL
D,ALL,AZ,VAL
NSEL,ALL
*ENDDO
CSYS,0
NSEL,S,LOC,X,0
D,ALL,AZ,0 ! IMPOSE DIRICHLET BOUNDARY CONDITION
NSEL,ALL
FINI
/SOLU
ANTYPE,HARMIC ! FULL HARMONIC ANALYSIS
HARFRQ,60 ! SET FREQUENCY = 60 HZ
D,ALL,VOLT,0
SOLVE
FINI
/POST1
SET,1 ! REAL RESULTS
NSEL,S,NODE,,1
PRNSOL,B,COMP ! PRINT NODAL REAL FLUX DENSITY AT ORIGIN
*GET,BR1,NODE,1,B,X
*GET,BR2,NODE,1,B,Y
SET,1,1,,1 ! IMAGINARY RESULTS
PRNSOL,B,COMP ! PRINT NODAL IMAGINARY FLUX DENSITY AT ORIGIN
*GET,BI1,NODE,1,B,X
*GET,BI2,NODE,1,B,Y
ESEL,S,MAT,,2
POWERH ! CALCULATE TIME-AVERAGE POWER LOSS
*DIM,LABEL,CHAR,5,2
*DIM,VALUE,,5,3
LABEL(1,1) = 'BX REAL ','BY REAL ','BX IM ','BY IM ','PWR LOSS '
LABEL(1,2) = 'T','T','T','T','W/m'
*VFILL,VALUE(1,1),DATA,0,-.00184,0,-.02102,2288
*VFILL,VALUE(1,2),DATA,BR1,BR2,BI1,BI2,PAVG
*VFILL,VALUE(1,3),DATA,1,ABS(BR2/.00184),1,ABS(BI2/.02102),ABS(PAVG/2288)
/COM,
/OUT,vm166,vrt,,APPEND
/COM,PLANE233
*VWRITE,LABEL(1,1),LABEL(1,2),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,A8,' ',F10.4,' ',F13.4,' ',1F15.3)
/COM,-----------------------------------------------------------
/OUT
FINISH
*LIST,vm166,vrt