VM51 Input Listing


/COM,ANSYS MEDIA REL. 2024R2 (05/10/2024) REF. VERIF. MANUAL: REL. 2024R2
/OUT,SCRATCH
/VERIFY,VM51
_GEOMGEN_1=0                    ! SET THIS TO 1 TO UPDATE CDB FILE 
_EXIT1=0                       ! SET THIS TO 1 TO EXIT WITHOUT SOLVING
*IF,_GEOMGEN_1,EQ,1,THEN 
/TITLE,VM51, FORCE BETWEEN CHARGED SPHERES
C*** USING SOLID122
!         THE ELECTROMAGNETIC FIELD,  SHADOWITZ, PAGE 61
/PREP7
smrt,off $ shpp,warn
mopt,amesh,alte
mopt,qmesh,alte
R1 = 1                          ! SPHERE RADIUS
R2 = 3                          ! DISTANCE BETWEEN SPHERES
R3 = 6                          ! RADIUS OF FINITE ELEMENT DOMAIN
R4 = 1.25                       ! MAXWELL SURFACE RADIUS
PER=8.854E-12                   ! FREE SPACE PERMITIVITY
PI=3.14159265359
Q = 4*PI*PER                    ! TOTAL CHARGE
ALPHA = 30                      ! SLICE ANGLE
AREA = 4*PI*(R1**2)             ! TOTAL SPHERE AREA
CHRGS = Q/AREA                  ! SURFACE CHARGE
/NOPR
PCIRC,,R2,0,90                  ! CIRCLE RADIUS R2, 0 TO 90 DEGREES
WPOFFS,,R2/2                    ! WORKING PLANE OFFSET Y = R2/2
PCIRC,,R1,0,90                  ! CIRCLE RADIUS R1, 0 TO 90 DEGREES
PCIRC,,R1,-90,0                 ! CIRCLE RADIUS R1, 0 TO -90 DEGREES
PCIRC,,R4,-90,90                ! CIRCLE RADIUS R4, -90 TO 90 DEGREES
AOVLAP,ALL
NUMCMP,AREA
ET,1,PLANE121                   ! 2-D 8-NODE ELECTROSTATIC SOLID
ET,2,SOLID122                   ! 3-D 20-NODE ELECTROSTATIC SOLID
ET,3,MESH200,7                  ! NEW MESH200 2-D 8-NODE ELEMENT TYPE
ET,4,INFIN111,2,1               ! 3-D INFINITE SOLID ELEMENT
MP,PERX,1,1
MP,PERX,2,1
CSYS,2                          ! SPHERICAL COORDINATE SYSTEM
LSEL,S,LOC,X,R2
LESIZE,ALL,,,30                 ! SET ELEMENT DIVISIONS = 20
ESIZE,,25                       ! SET ELEMENT DIVISIONS FOR EXTRUDE REGION
TYPE,1
LOCAL,11,2,,R2/2                ! DEFINE COORDINATE SYSTEM AT SPHERE CENTER
LSEL,S,LOC,X,R1                 ! SELECT LINES ON SPHERE SURFACE
LESIZE,ALL,,,25                 ! SET ELEMENT DIVISIONS
LSEL,A,LOC,X,R4                 ! SELECT LINES FOR MAXWELL SURFACE
LESIZE,ALL,,,50                 ! SET ELEMENT DIVISIONS
CSYS,0                          ! CARTESIAN COORDINATE SYSTEM
LSEL,S,LOC,Y,                   ! SELECT LINES AT Y = 0
LESIZE,ALL,,,40                 ! SET ELEMENT DIVISIONS
MSHK,2                          ! MAPPED AREA MESH IF POSSIBLE
MSHA,0,2D                       ! USING QUADS
LSEL,ALL
ESIZE,,5                        ! SET ELEMENT DIVISIONS = 5
ALLSEL
AMAP,4,10,7,5,11                ! MAP MESH SPHERE TO MAXWELL SURFACE
AMESH,ALL
K,200                           ! CREATE KEYPOINTS FOR ROTATION
K,201,,R3
MSHK,0                          !  FREE MESH
MSHA,1,                         !  USING TRIS OR TETS
TYPE,2
ASEL,ALL
ESIZE,,3                        ! 3 DIVISIONS IN ROTATE DIRECTION
MAT,1
VROTAT,ALL,,,,,,200,201,ALPHA   ! ROTATE ALL AREAS THROUGH 30 DEGREES
CSYS,11                         ! CUSTOM SPHERICAL COORDINATE SYSTEM
NSEL,S,LOC,X,0,R1*1.03          ! NODE SELECT RADIUS 0 TO R1
ESLN,S,1                        ! ELEMENT SELECT FROM NODES
EMODIF,ALL,MAT,2                ! CHANGE MATERIAL PROPERTY TO 2
CSYS,2                          ! SPHERICAL COORDINATE SYSTEM
KSEL,S,LOC,X,R2                 ! KEYPOINT SELECT AT RADIUS R2
LSLK,S,1                        ! LINE SELECT FROM KEYPOINTS
ASLL,S,1                        ! AREA SELECT FROM LINES
TYPE,3                          ! NEW MESH200 ELEMENT TYPE
AMESH,ALL                       ! MESH AREA AT RADIUS R2
ESIZE,,8                        ! EIGHT ELEMENTS IN EXTRUDE DIRECTION
TYPE,2                          ! SOLID122 USED FOR EXTRUDE
VEXT,ALL,,,R3-R2                ! EXTRUDE AREAS IN RADIAL DIRECTION
KSEL,S,LOC,X,R3                 ! KEYPOINT SELECT AT RADIUS R3
LSLK,S,1                        ! LINE SELECT FROM KEYPOINTS
ASLL,S,1                        ! AREA SELECT FROM LINES
TYPE,3                          ! NEW MESH200 ELEMENT TYPE
AMESH,ALL                       ! MESH AREA AT RADIUS R3
ESIZE,,1                        ! ONE DIVISION IN EXTRUDE DIRECTION
TYPE,4                          ! INFIN122 USED FOR EXTRUDE
VEXT,ALL,,,R3                   ! EXTRUDE AREA IN RADIAL DIRECTION
ALLSEL                          ! SELECT ALL ENTITIES

/OUTPUT,SCRATCH
NUMMRG,NODE
NUMMRG,ELEM
NUMMRG,KP


CSYS,0
NSEL,S,LOC,Y,0                  ! SELECT SYMMETRY BOUNDARY
D,ALL,VOLT,0                    ! CONSTRAIN BOUNDARY VOLT DOF
CSYS,2                          ! SPHERICAL COORDINATE SYSTEM
NSEL,S,LOC,X,10,12              ! SELECT OUTER NODES OF INFINITE DOMAIN
ESLN,S
SF,ALL,INF                      ! SET INFINITE FLAG
NSEL,ALL
OUTRES,ALL,ALL

ALLSEL,ALL
FINISH
CDWRITE,db,vm51_case1,cdb
FINISH
*IF,_EXIT1,EQ,1,THEN
*ENDIF

*ELSE
CDREAD,db,vm51_case1,cdb
*ENDIF
FINISH

/SOLU
ALLSEL
ESEL,U,TYPE,,1,                 ! UNSELECT DUMMY MESHING ELEMENT 122
ESEL,S,MAT,,2                   ! SELECT SPHERE ELEMENTS
NSLE
CSYS,11                         ! CUSTOM SPHERICAL COORDINATE SYSTEM
NSEL,S,LOC,X,0.98*R1,1.02*R1    ! SELECT NODES ON SPHERE SURFACE
ESLN
ESEL,U,MAT,,1
SF,ALL,CHRG,CHRGS               ! APPLY SURFACE CHARGE
ALLSEL
ESEL,U,TYPE,,1                  ! UNSELECT DUMMY MESHING ELEMENT 122
/TYPE,,6
/DEVICE,VECTOR,ON
/DIST,,3.661
/FOCUS,,3.08,2.884,-.148327
/COM                       *** THE FOLLOWING ANNOTATION COMMANDS ARE ***
/COM                       *** TYPICALLY GENERATED INTERACTIVELY ***
/AUTO, 1
/ANUM ,0,     1,-0.12607    , 0.38512  ! ANNOTATION NUMBER, TYPE AND HOT SPOT
/TLAB,-0.546, 0.385,Infinite Element Domain
/ANUM ,0,     1, 0.16752    ,-0.72533E-01
/TLAB,-0.217,-0.073,Finite Element Domain
/ANUM ,0,    12, 0.77714E-01,-0.24523
/LINE, 0.259,-0.124,-0.104,-0.366
/LSYM,-0.104,-0.366, 213,   1, 1.000
/ANUM ,0,     1,-0.32640    ,-0.34885
/TLAB,-0.571,-0.349,Sphere Surface
/ANUM ,0,    12,-0.44556    ,-0.45247
/LINE,-0.373,-0.366,-0.518,-0.539
/LSYM,-0.518,-0.539, 229,   1, 1.000
/ANUM ,0,     1,-0.41447E-01,-0.78577
/TSPEC, 15, 1.000,   1,   1,   0
/TLAB,-0.321,-0.791,Maxwell Surface
/ANUM ,0,    12,-0.31258    ,-0.72015
/LINE,-0.235,-0.746,-0.390,-0.694
/LSYM,-0.390,-0.694, 161,   1, 1.000
/ANUM ,0,     1,-0.39893    ,-0.93257
/TSPEC, 15, 1.000,   1,   0,   0
/TLAB,-0.434,-0.933,R3
/ANUM ,0,    12,-0.25214    ,-0.92566
/LINE,-0.373,-0.926,-0.131,-0.926
/LSYM,-0.131,-0.926,   0,   1, 1.000
/ANUM ,0,    12,-0.51118    ,-0.92566
/LINE,-0.442,-0.926,-0.580,-0.926
/LSYM,-0.580,-0.926, 180,   1, 1.000
APLOT
/ANNOT,ON
/USER                                 ! RESET GRAPHICS DISPLAY SETTINGS
/VIEW,1,.5274,.2492,.8123
/ANGLE,1,3.621
/DIST,,7.735
/FOCUS,,6,6,-3
/DEVICE,VECTOR,OFF
/ANNOT,OFF
/PNUM,TYPE,1
/NUMBER,1
VPLOT
EPLOT
SOLVE
FINISH
/POST1                          ! ENTER GENERAL POSTPROCESSOR
RSYS,11                         ! USE CUSTOM SPHERICAL RESULTS COORDINATE SYSTEM
ESEL,S,TYPE,,2                  ! SELECT SOLID122 ELEMENTS
ESEL,U,MAT,,2                   ! UNSELECT SPHERE
NSLE
/AUTO
PLNSOL,EF,X                     ! PLOT NODAL RESULTS, RADIAL ELECTRIC FIELD
PLNSOL,VOLT                     ! PLOT NODAL RESULTS, VOLTAGE DOF
RSYS,0
CSYS,11
NSEL,S,LOC,X,R1
EMFT
YFORCE=_FYSUM*12                ! MULTIPLY TO ACCOUNT FOR 30 DEGREE SLICE
*STATUS,YFORCE
*DIM,LABEL,CHAR,1,2
*DIM,VALUE,,1,3
LABEL(1,1) = '   YFORC'
LABEL(1,2) = 'E  (N)  '
*VFILL,VALUE(1,1),DATA,-1.236E-11
*VFILL,VALUE(1,2),DATA,YFORCE
*VFILL,VALUE(1,3),DATA,ABS(YFORCE/1.236E-11)
SAVE,INF1
FINISH
/CLEAR,NOSTART

/OUT,SCRATCH
_GEOMGEN_2=0                    ! SET THIS TO 1 TO UPDATE CDB FILE 
_EXIT2=0                       ! SET THIS TO 1 TO EXIT WITHOUT SOLVING
*IF,_GEOMGEN_2,EQ,1,THEN 

/TITLE,VM51, FORCE BETWEEN CHARGED SPHERES
C*** USING SOLID123
/PREP7
R1 = 1                          ! SPHERE RADIUS
R2 = 3                          ! DISTANCE BETWEEN SPHERES
R3 = 6                          ! RADIUS OF FINITE ELEMENT DOMAIN
R4 = 1.25                       ! MAXWELL SURFACE RADIUS
PER=8.854E-12                   ! FREE SPACE PERMITIVITY
PI=3.14159265359
Q = 4*PI*PER                    ! TOTAL CHARGE
ALPHA = 30                      ! SLICE ANGLE
AREA = 4*PI*(R1**2)             ! TOTAL SPHERE AREA
CHRGS = Q/AREA                  ! SURFACE CHARGE
/NOPR
PCIRC,,R2,0,90                  ! CIRCLE RADIUS R2, 0 TO 90 DEGREES
PCIRC,,R3,0,90			! CIRCLE RADIUS R3, 0 TO 90 DEGREES
WPOFFS,,R2/2                    ! WORKING PLANE OFFSET Y = R2/2
PCIRC,,R1,0,90                  ! CIRCLE RADIUS R1, 0 TO 90 DEGREES
PCIRC,,R1,-90,0                 ! CIRCLE RADIUS R1, 0 TO -90 DEGREES
PCIRC,,R4,-90,90                ! CIRCLE RADIUS R4, -90 TO 90 DEGREES
AOVLAP,ALL
NUMCMP,AREA
ET,1,SOLID123                   ! 3-D 10-NODE TETERAHEDRAL ELECTROSTATIC SOLID
ET,2,MESH200,5                  ! NEW MESH200 2-D 6-NODE ELEMENT TYPE
ET,3,INFIN111,2,1               ! 3-D INFINITE SOLID ELEMENT
MP,PERX,1,1         
MP,PERX,2,1
K,200                           ! CREATE KEYPOINTS FOR ROTATION
K,201,,R3                       ! 3 DIVISIONS IN ROTATE DIRECTION
VROTAT,ALL,,,,,,200,201,ALPHA   ! ROTATE ALL AREAS THROUGH 30 DEGREES
TYPE,1
LSEL,S,LINE,,1,12,11
LESIZE,ALL,,,20
LSEL,S,LINE,,3,26,23
LESIZE,ALL,,,20
LSEL,S,LINE,,14,14
LSEL,A,LINE,,18,19
LESIZE,ALL,,,8
LSEL,S,LINE,,4,11,7
LESIZE,ALL,,,30
ESIZE,.1
MAT,1
VMESH,ALL
VSEL,S,VOLU,,1,2		! CHANGE SPHERE TO MATERIAL 2
ESLV,S,1                   	
EMODIF,ALL,MAT,2
ALLSEL,ALL

LOCAL,11,2,,R2/2 
CSYS,2                          ! SPHERICAL COORDINATE SYSTEM
KSEL,S,LOC,X,R3                 ! KEYPOINT SELECT AT RADIUS R3
LSLK,S,1                        ! LINE SELECT FROM KEYPOINTS
ASLL,S,1                        ! AREA SELECT FROM LINES
TYPE,2                          ! NEW MESH200 ELEMENT TYPE
AMESH,ALL                       ! MESH AREA AT RADIUS R3
ESIZE,,1                        ! ONE DIVISION IN EXTRUDE DIRECTION
TYPE,3                          ! INFIN122 USED FOR EXTRUDE
VEXT,ALL,,,R3                   ! EXTRUDE AREA IN RADIAL DIRECTION
ALLSEL                          ! SELECT ALL ENTITIES

/OUTPUT,SCRATCH
NUMMRG,NODE
NUMMRG,ELEM
NUMMRG,KP


CSYS,0
NSEL,S,LOC,Y,0                  ! SELECT SYMMETRY BOUNDARY
D,ALL,VOLT,0                    ! CONSTRAIN BOUNDARY VOLT DOF
CSYS,2                          ! SPHERICAL COORDINATE SYSTEM
NSEL,S,LOC,X,10,12              ! SELECT OUTER NODES OF INFINITE DOMAIN
ESLN,S
SF,ALL,INF                      ! SET INFINITE FLAG
NSEL,ALL
OUTRES,ALL,ALL


ALLSEL,ALL
FINISH
CDWRITE,db,vm51_case2,cdb
FINISH
*IF,_EXIT2,EQ,1,THEN
*ENDIF

*ELSE
CDREAD,db,vm51_case2,cdb
*ENDIF
FINISH
/SOLU
ALLSEL
VSEL,S,VOLU,,1,2
ESLV,S,1                   	! SELECT SPHERE ELEMENTS
NSLE
CSYS,11                         ! CUSTOM SPHERICAL COORDINATE SYSTEM
NSEL,S,LOC,X,0.98*R1,1.02*R1    ! SELECT NODES ON SPHERE SURFACE
ESLN
ESEL,U,MAT,,1
SF,ALL,CHRG,CHRGS               ! APPLY SURFACE CHARGE
ALLSEL
/TYPE,,6
/DEVICE,VECTOR,ON
/DIST,,3.661
/FOCUS,,3.08,2.884,-.148327
/COM                       *** THE FOLLOWING ANNOTATION COMMANDS ARE ***
/COM                       *** TYPICALLY GENERATED INTERACTIVELY ***
/AUTO, 1
/ANUM ,0,     1,-0.12607    , 0.38512  ! ANNOTATION NUMBER, TYPE AND HOT SPOT
/TLAB,-0.546, 0.385,Infinite Element Domain
/ANUM ,0,     1, 0.16752    ,-0.72533E-01
/TLAB,-0.217,-0.073,Finite Element Domain
/ANUM ,0,    12, 0.77714E-01,-0.24523
/LINE, 0.259,-0.124,-0.104,-0.366
/LSYM,-0.104,-0.366, 213,   1, 1.000
/ANUM ,0,     1,-0.32640    ,-0.34885
/TLAB,-0.571,-0.349,Sphere Surface
/ANUM ,0,    12,-0.44556    ,-0.45247
/LINE,-0.373,-0.366,-0.518,-0.539
/LSYM,-0.518,-0.539, 229,   1, 1.000
/ANUM ,0,     1,-0.41447E-01,-0.78577
/TSPEC, 15, 1.000,   1,   1,   0
/TLAB,-0.321,-0.791,Maxwell Surface
/ANUM ,0,    12,-0.31258    ,-0.72015
/LINE,-0.235,-0.746,-0.390,-0.694
/LSYM,-0.390,-0.694, 161,   1, 1.000
/ANUM ,0,     1,-0.39893    ,-0.93257
/TSPEC, 15, 1.000,   1,   0,   0
/TLAB,-0.434,-0.933,R3
/ANUM ,0,    12,-0.25214    ,-0.92566
/LINE,-0.373,-0.926,-0.131,-0.926
/LSYM,-0.131,-0.926,   0,   1, 1.000
/ANUM ,0,    12,-0.51118    ,-0.92566
/LINE,-0.442,-0.926,-0.580,-0.926
/LSYM,-0.580,-0.926, 180,   1, 1.000
APLOT
/ANNOT,ON
/USER                                 ! RESET GRAPHICS DISPLAY SETTINGS
/VIEW,1,.5274,.2492,.8123
/ANGLE,1,3.621
/DIST,,7.735
/FOCUS,,6,6,-3
/DEVICE,VECTOR,OFF
/ANNOT,OFF
/PNUM,TYPE,1
/NUMBER,1
VPLOT
EPLOT
SOLVE
FINISH
/POST1                          ! ENTER GENERAL POSTPROCESSOR
RSYS,11                         ! USE CUSTOM SPHERICAL RESULTS COORDINATE SYSTEM
ESEL,S,TYPE,,1                  ! SELECT SOLID123 ELEMENTS
ESEL,U,MAT,,2                   ! UNSELECT SPHERE
NSLE
/AUTO
PLNSOL,EF,X                     ! PLOT NODAL RESULTS, RADIAL ELECTRIC FIELD
PLNSOL,VOLT                     ! PLOT NODAL RESULTS, VOLTAGE DOF
RSYS,0
CSYS,11
NSEL,S,LOC,X,R1
EMFT
YFORCE=_FYSUM*12                 ! MULTIPLY TO ACCOUNT FOR 30 DEGREE SLICE
*STATUS,YFORCE
*DIM,LABEL,CHAR,1,2
*DIM,VALUE,,1,3
LABEL(1,1) = '   YFORC'
LABEL(1,2) = 'E  (N)  '
*VFILL,VALUE(1,1),DATA,-1.236E-11
*VFILL,VALUE(1,2),DATA,YFORCE
*VFILL,VALUE(1,3),DATA,ABS(YFORCE/1.236E-11)
SAVE,INF2

RESUME,INF1
/COM
/OUT,vm51,vrt
/COM,------------------- VM51 RESULTS COMPARISON ---------------
/COM,
/COM,                 |   TARGET   |   Mechanical APDL   |   RATIO
/COM,
/COM,--SOLID122--
*VWRITE,LABEL(1,1),LABEL(1,2),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,A8,'   ',E11.4,'  ',E15.4,'   ',1F15.3)
/COM,
/NOPR
RESUME,INF2
/COM,--SOLID123--
*VWRITE,LABEL(1,1),LABEL(1,2),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,A8,'   ',E11.4,'  ',E15.4,'   ',1F15.3)
/COM,-----------------------------------------------------------
/OUT
FINISH
*LIST,vm51,vrt
/DELETE,INF1
/DELETE,INF2