VM230 Input Listing


/COM,ANSYS MEDIA REL. 2024R2 (05/10/2024) REF. VERIF. MANUAL: REL. 2024R2
/VERIFY,vm230
/TITLE,vm230,RADIATION BETWEEN TWO CONCENTRIC SPHERES
/COM,
/COM, REFERENCE: RADIATIVE HEAT TRANSFER, MICHAEL F. MODEST
/COM,            3rd EDITION, Pg.205-206
/COM,
/COM
/COM ***********2D-2D & 3D-3D MODEL IN SAME PREPROCESSOR**********
/COM
/OUT,SCRATCH
/PREP7
R0 = 0.5            ! INNER RADIUS OF SPHERE 1 IN METERS
R1 = 1              ! OUTER RADIUS OF SPHERE 1 IN METERS
R2 = 2              ! INNER RADIUS OF SPHERE 2 IN METERS
R3 = 2.5            ! OUTER RADIUS OF SPHERE 2 IN METERS

T1 = 100            ! TEMPERATURE ON INSIDE SPHERE, KELVIN
T2 = 1000           ! TEMPERATURE ON OUTER SPHERE, KELVIN

e1 = 0.5            ! EMISSIVITY ON INNER SPHERE
e2 = 0.4            ! EMISSIVITY ON OUTER SPHERE

/COM,
/COM, ------ CONCENTRIC SPHERES: 2D AXISYMMETRIC MODEL ------
/COM,

_GEOM=0
*IF,_GEOM,EQ,1,THEN

ET,1,PLANE77        ! 2D AXISYMMETRIC THERMAL ELEMENT
KEYOPT,1,3,1        ! AXISYMMETRIC ELEMENT BEHAVIOR 

MP,DENS,1,.27       ! DENSITY
MP,KXX,1,1          ! THERMAL CONDUCTIVITY
MP,C,1,1            ! SPECIFIC HEAT

CYL4,,,R0,0,R1,90
CYL4,,,R2,0,R3,90
TYPE,1
MAT,1
MSHAPE,0,2D
MSHKEY,1
ESIZE,0.25
AMESH,ALL           ! MESH THE MODEL WITH PLANE77 AXISYMMETRIC THERMAL ELEMENTS

LSEL,S,LINE,,3
NSLL,S,1    
D,ALL,TEMP,T1       ! TEMPERATURE ON INTERIOR CIRCULAR SURFACE
LSEL,S,LINE,,5
NSLL,S,1
D,ALL,TEMP,T2       ! TEMPERATURE ON EXTERIOR CIRCULAR SURFACE

LSEL,S,LINE,,1
NSLL,S,1
SF,ALL,RDSF,e1,1    ! EMISSIVITY ON INTERIOR CIRCULAR SURFACE
RDEC,,0.5,,OPTI
RSYMM,,,Y
RSURF               ! 2D RADIOSITY SURFACE ELEMENTS (SURF251)
LSEL,S,LINE,,7
NSLL,S,1
SF,ALL,RDSF,e2,1    ! EMISSIVITY ON EXTERIOR CIRCULAR SURFACE
RSURF               ! 2D RADIOSITY SURFACE ELEMENTS (SURF251)
ALLSEL,ALL

/COM,
/COM, ------ CONCENTRIC SPHERES: 3D MODEL ------
/COM,

ET,4,SOLID90        ! 3D SOLID THERMAL ELEMENT
ET,5,MESH200,7      ! MESH200 ELEMENT

K,5000,,-100
K,5001,,100

D = 6
LOCAL,11,0,,D
LOCAL,12,2,,D
WPOFFS,,D

PCIRC,R0,R1,0.0,90.0
PCIRC,R2,R3,0.0,90.0
TYPE,5
MSHK,1
ESIZE,0.25
AMESH,ALL
ALLSEL,ALL

MAT,1
TYPE,4
MSHK,0
ESIZE,,8
SHPP,OFF
VROTAT,3,,,,,,5000,5001,90
VROTAT,4,,,,,,5000,5001,90
ALLSEL,ALL
ASEL,S,LOC,Z,0
ACLEAR,3,4
ETDEL,5
ALLSEL,ALL
RSYMM,CLEAR
RSYMM,,11,Y
RSYMM,,11,X
RSYMM,,11,Z

CSYS,12
NSEL,S,LOC,X,R0
D,ALL,TEMP,T1       ! TEMPERATURE ON INSIDE SPHERE
NSEL,S,LOC,X,R3
D,ALL,TEMP,T2       ! TEMPERATURE ON OUTSIDE SPHERE

RDEC,,0.5,,OPTI
NSEL,S,LOC,X,R1
SF,ALL,RDSF,e1,2    ! EMISSIVITY ON INSIDE SPHERE
ESEL,R,TYPE,,4
RSURF               ! 3D RADIOSITY SURFACE ELEMENTS (SURF252)
ALLSEL,ALL
NSEL,S,LOC,X,R2
SF,ALL,RDSF,e2,2    ! EMISSIVITY ON OUTSIDE SPHERE
ESEL,R,TYPE,,4
RSURF               ! 3D RADIOSITY SURFACE ELEMENTS (SURF252)
ALLSEL,ALL
CSYS,0

CDWRITE,DB,VM230-1,CDB
*ELSE
CDREAD,DB,VM230-1,CDB
*ENDIF
FINISH

/AUX12
STFCONST = 5.67e-8
T0 = 0.
STEF,STFCONST
TOFFST,T0
RADOPT,,0.0001,,,0.1,0.1
V2DOPT,1,90,,1000
VFSM,,1,2
VFSM,,2,2
VFOPT,NEW
/OUT,SCRATCH,,,APPEND
/COM,
/COM, ------ COMPUTE VIEW FACTORS FOR 2D AXISYMMETRIC SPHERES ------
/COM,
ESEL,S,TYPE,,2
CM,IN1,ELEM
ESEL,S,TYPE,,3
CM,OUT1,ELEM
ALLSEL,ALL
VFQUERY,IN1,IN1,,WOFF
*GET,F11_2D,RAD,,VFAVG
VFQUERY,IN1,OUT1,,WOFF
*GET,F12_2D,RAD,,VFAVG
VFQUERY,OUT1,IN1,,WOFF
*GET,F21_2D,RAD,,VFAVG
VFQUERY,OUT1,OUT1,,WOFF
*GET,F22_2D,RAD,,VFAVG
ALLSEL,ALL
/COM,
/COM, ------ COMPUTE VIEW FACTORS FOR 3D CONCENTRIC SPHERES ------
/COM,
ESEL,S,TYPE,,6
CM,IN2,ELEM
ESEL,S,TYPE,,7
CM,OUT2,ELEM
ALLSEL,ALL
VFQUERY,IN2,IN2,,WOFF
*GET,F11_3D,RAD,,VFAVG
VFQUERY,IN2,OUT2,,WOFF
*GET,F12_3D,RAD,,VFAVG
VFQUERY,OUT2,IN2,,WOFF
*GET,F21_3D,RAD,,VFAVG
VFQUERY,OUT2,OUT2,,WOFF
*GET,F22_3D,RAD,,VFAVG
ALLSEL,ALL
FINISH

/SOLUTION
ANTYPE,STATIC
/OUT,SCRATCH,,,APPEND
TIME,1              ! END TIME
DELTIM,0.5          ! TIME STEPS
OUTRES,ALL,ALL
CNVTOL,HEAT,1.E-2,,,1.E-5   ! CONVERGENCE TOLERANCE
SOLVE
FINISH

/POST1
SET,LAST
/OUT,
/COM, 
/COM, ------ COMPUTE HEAT FLUXES FOR 2D AXISYMMETRIC CIRCLES ------
/COM, 
*GET,TI1,NODE,node(1,0,0),TEMP        
*GET,TO1,NODE,node(2,0,0),TEMP         
*GET,HFI1,NODE,node(1,0,0),TF,SUM      ! INSIDE CIRCLE HEAT FLUX
*GET,HFO1,NODE,node(2,0,0),TF,SUM      ! OUTSIDE CIRCLE HEAT FLUX

HFIEXP1 = ABS((TI1+T0)**4-(TO1+T0)**4)*STFCONST/(1/e1+(R1**2/R2**2)*(1/e2-1))
HFOEXP1 = ABS(-R1**2/R2**2)*HFIEXP1
HFI1ERR = (HFI1/HFIEXP1)
HFO1ERR = (HFO1/HFOEXP1)

*DIM,VALUE2D,,6,3
*VFILL,VALUE2D(1,1),DATA,0.000,1.000,0.250,0.750,HFIEXP1,HFOEXP1
*VFILL,VALUE2D(1,2),DATA,F11_2D,F12_2D,F21_2D,F22_2D,HFI1,HFO1
*VFILL,VALUE2D(1,3),DATA,0.000,F12_2D/1.000,F21_2D/0.250,F22_2D/0.750,HFI1ERR,HFO1ERR
*DIM,LABEL2D,CHAR,10,2
LABEL2D(1,1) = 'VF(1-1)','VF(1-2)','VF(2-1)','VF(2-2)','HFINSIDE','HFOUTSIDE'
ALLSEL,ALL
/COM,
/COM, ------ COMPUTE HEAT FLUXES FOR 3D CONCENTRIC SPHERES ------
/COM,
*GET,TI2,NODE,node(1,6,0),TEMP       
*GET,TO2,NODE,node(2,6,0),TEMP       
*GET,HFI2,NODE,node(1,6,0),TF,SUM    ! INSIDE SPHERE HEAT FLUX
*GET,HFO2,NODE,node(2,6,0),TF,SUM    ! OUTSIDE SPHERE HEAT FLUX

HFIEXP2 = ABS((TI2+T0)**4-(TO2+T0)**4)*STFCONST/(1/e1+(R1**2/R2**2)*(1/e2-1))
HFOEXP2 = ABS(-R1**2/R2**2)*HFIEXP2
HFI2ERR = (HFI2/HFIEXP2)
HFO2ERR = (HFO2/HFOEXP2)

*DIM,VALUE3D,,6,3
*VFILL,VALUE3D(1,1),DATA,0.000,1.000,0.250,0.750,HFIEXP2,HFOEXP2
*VFILL,VALUE3D(1,2),DATA,F11_3D,F12_3D,F21_3D,F22_3D,HFI2,HFO2
*VFILL,VALUE3D(1,3),DATA,0.000,F12_3D/1.000,F21_3D/0.250,F22_3D/0.750,HFI2ERR,HFO2ERR
*DIM,LABEL3D,CHAR,10,2
LABEL3D(1,1) = 'VF(1-1)','VF(1-2)','VF(2-1)','VF(2-2)','HFINSIDE','HFOUTSIDE'
ALLSEL,ALL
SAVE,TABLE_1
FINISH
/CLEAR,NOSTART

/COM
/COM ****** 2D-3D CONCENTRIC SPHERES ******
/COM

/OUT,SCRATCH,,,APPEND
/PREP7

R0 = 0.5            ! INNER RADIUS OF SPHERE 1 IN METERS
R1 = 1              ! OUTER RADIUS OF SPHERE 1 IN METERS
R2 = 2              ! INNER RADIUS OF SPHERE 2 IN METERS
R3 = 2.5            ! OUTER RADIUS OF SPHERE 2 IN METERS

T1 = 100            ! TEMPERATURE ON INSIDE SPHERE, KELVIN
T2 = 1000           ! TEMPERATURE ON OUTER SPHERE, KELVIN

E1 = 0.5            ! EMISSIVITY ON INNER SPHERE
E2 = 0.4            ! EMISSIVITY ON OUTER SPHERE

STFCONST = 5.67E-8
T0 = 0.

_GEOM=0
*IF,_GEOM,EQ,1,THEN

ET,1,PLANE77        ! 2D AXISYMMETRIC THERMAL ELEMENT
KEYOPT,1,3,1        ! AXISYMMETRIC ELEMENT BEHAVIOR

ET,2,SOLID90        ! 3D SOLID THERMAL ELEMENT
ET,3,MESH200,7      ! MESH200 ELEMENTS, 3D QUADRILATERAL WITH 8 NODES   

MP,DENS,1,.27       ! DENSITY
MP,KXX,1,1          ! THERMAL CONDUCTIVITY
MP,C,1,1            ! SPECIFIC HEAT

PCIRC,R0,R1,0.0,-90.0
VROTAT,1,,,,,,1,4,90
TYPE,3
LSEL,S,LINE,,2,6,2
LESIZE,ALL,,,2
MSHAPE,0,2D
MSHKEY,1
ESIZE,0.25
AMESH,1

MAT,1
TYPE,2
VSWEEP,1,1,5	    ! CREATING SOLID90 ELEMENTS

CYL4,,,R2,-90,R3,90
LSEL,S,LINE,,11,13,2
LESIZE,ALL,,,2
MSHAPE,0,2D
MSHKEY,1
ESIZE,0.25
MAT,1
TYPE,1
AMESH,6		        ! CREATING AXISYMMETRIC PLANE77 ELEMENTS
ALLSEL,ALL

ASEL,S,AREA,,4
NSLA,S,1
D,ALL,TEMP,T1	    ! TEMPERATURE ON INNER SPHERE

LSEL,S,LINE,,10
NSLL,S,1
D,ALL,TEMP,T2	    ! TEMPERATURE ON OUTER SPHERE
ALLSEL,ALL

ASEL,S,AREA,,2
NSLA,S,1
SF,ALL,RDSF,E1,1    ! EMISSIVITY ON INNER SPHERE
RSYMM,,,X
RSYMM,,,Y
RSYMM,,,Z
RSURF
ALLSEL,ALL

RSYMM,CLEAR
LSEL,S,LINE,,12
NSLL,S,1
SF,ALL,RDSF,E2,1    ! EMISSIVITY ON OUTER SPHERE
RSYMM,,0,CEXT,40,,0,360
RSURF
ALLSEL,ALL

CDWRITE,DB,VM230-2,CDB
*ELSE
SHPP,OFF
CDREAD,DB,VM230-2,CDB
*ENDIF

STEF,STFCONST
TOFFST,T0
FINISH

/AUX12
RADOPT,,0.0001,,,0.1,0.1
V2DOPT,1,90,,1000
VFSM,,1,2
VFOPT,NEW
/OUT,SCRATCH,,,APPEND
/COM,
/COM, ------ COMPUTE VIEW FACTORS FOR 2D-3D CONCENTRIC SPHERES ------
/COM,
ESEL,S,TYPE,,4
CM,IN1,ELEM
ESEL,S,TYPE,,5
CM,OUT1,ELEM
ALLSEL,ALL
VFQUERY,IN1,IN1,,WOFF
*GET,F11_3D3D,RAD,,VFAVG
VFQUERY,IN1,OUT1,,WOFF
*GET,F12_3D2D,RAD,,VFAVG
VFQUERY,OUT1,IN1,,WOFF
*GET,F21_2D3D,RAD,,VFAVG
VFQUERY,OUT1,OUT1,,WOFF
*GET,F22_2D2D,RAD,,VFAVG
ALLSEL,ALL

/SOLUTION
ANTYPE,STATIC
/OUT,SCRATCH,,,APPEND
TIME,1              
DELTIM,0.5          
OUTRES,ALL,ALL
CNVTOL,HEAT,1.E-2,,,1.E-5   
SOLVE
FINISH

/POST1
SET,LAST
/OUT
*GET,TI,NODE,NODE(1,0,0),TEMP        
*GET,TO,NODE,NODE(2,0,0),TEMP         
*GET,HFI1,NODE,NODE(1,0,0),TF,SUM      ! INSIDE CIRCLE HEAT FLUX
*GET,HFO1,NODE,NODE(2,0,0),TF,SUM      ! OUTSIDE CIRCLE HEAT FLUX

HFIEXP1 = ABS((TI+T0)**4-(TO+T0)**4)*STFCONST/(1/E1+(R1**2/R2**2)*(1/E2-1))
HFOEXP1 = ABS(-R1**2/R2**2)*HFIEXP1
HFIERR1 = (HFI1/HFIEXP1)
HFOERR1 = (HFO1/HFOEXP1)
/OUT,SCRATCH,,,APPEND
*DIM,VALUE3D2D,,6,3
*VFILL,VALUE3D2D(1,1),DATA,0.000,1.000,0.250,0.750,HFIEXP1,HFOEXP1
*VFILL,VALUE3D2D(1,2),DATA,F11_3D3D,F12_3D2D,F21_2D3D,F22_2D2D,HFI1,HFO1
*VFILL,VALUE3D2D(1,3),DATA,0.000,F12_3D2D/1.000,F21_2D3D/0.250,F22_2D2D/0.750,HFIERR1,HFOERR1
*DIM,LABEL3D2D,CHAR,10,2
LABEL3D2D(1,1) = 'VF(1-1)','VF(1-2)','VF(2-1)','VF(2-2)','HFINSIDE','HFOUTSIDE'
ALLSEL,ALL
SAVE,TABLE_2
FINISH
/CLEAR,NOSTART

/COM
/COM ****** 2D-2D AXISYMMETRICALLY CONCENTRIC SPHERES ******
/COM

/OUT,SCRATCH,,,APPEND
/PREP7

R0 = 0.5            ! INNER RADIUS OF SPHERE 1 IN METERS
R1 = 1              ! OUTER RADIUS OF SPHERE 1 IN METERS
R2 = 2              ! INNER RADIUS OF SPHERE 2 IN METERS
R3 = 2.5            ! OUTER RADIUS OF SPHERE 2 IN METERS

T1 = 100            ! TEMPERATURE ON INSIDE SPHERE, KELVIN
T2 = 1000           ! TEMPERATURE ON OUTER SPHERE, KELVIN

E1 = 0.5            ! EMISSIVITY ON INNER SPHERE
E2 = 0.4            ! EMISSIVITY ON OUTER SPHERE

STFCONST = 5.67E-8
T0 = 0.

_GEOM=0
*IF,_GEOM,EQ,1,THEN

ET,1,PLANE77        ! 2D AXISYMMETRIC THERMAL ELEMENT
KEYOPT,1,3,1  	    ! AXISYMMETRIC ELEMENT BEHAVIOR   

MP,DENS,1,.27       ! DENSITY
MP,KXX,1,1          ! THERMAL CONDUCTIVITY
MP,C,1,1            ! SPECIFIC HEAT

CYL4,,,R0,-90,R1,90
CYL4,,,R2,-90,R3,90
TYPE,1
MAT,1
MSHAPE,0,2D
MSHKEY,1
LSEL,S,LINE,,2,10,2
LESIZE,ALL,,,2
ESIZE,0.2
AMESH,ALL           ! GENERATING PLANE77 AXISYMMETRIC ELEMENTS

LSEL,S,LINE,,3
NSLL,S,1    
D,ALL,TEMP,T1       ! TEMPERATURE ON INTERIOR CIRCULAR SURFACE
LSEL,S,LINE,,5
NSLL,S,1
D,ALL,TEMP,T2       ! TEMPERATURE ON EXTERIOR CIRCULAR SURFACE

RDEC,,0.5,,OPTI
RSYMM,,0,CEXT,40,,0,360

LSEL,S,LINE,,1
NSLL,S,1
SF,ALL,RDSF,E1,1   ! EMISSIVITY ON INTERIOR CIRCULAR SURFACE
RDEC,,,,OPTI
RSURF              

LSEL,S,LINE,,7
NSLL,S,1
SF,ALL,RDSF,E2,1   ! EMISSIVITY ON OUTER CIRCULAR SURFACE
RDEC,,0.5,,OPTI
RSURF               
ALLSEL,ALL

CDWRITE,DB,VM230-3,CDB
*ELSE
SHPP,OFF
CDREAD,DB,VM230-3,CDB
*ENDIF

STEF,STFCONST
TOFFST,T0
FINISH

/AUX12
RADOPT,,0.0001,,,0.1,0.1
V2DOPT,1,90,,1000
VFSM,,1,2
VFOPT,NEW
/OUT,SCRATCH,,,APPEND
/COM,
/COM, ------ COMPUTE VIEW FACTORS FOR 2D-2D CONCENTRIC SPHERES ------
/COM,
ESEL,S,TYPE,,2
CM,IN1,ELEM
ESEL,S,TYPE,,3
CM,OUT1,ELEM
ALLSEL,ALL
VFQUERY,IN1,IN1,,WOFF
*GET,F11_2D2D,RAD,,VFAVG
VFQUERY,IN1,OUT1,,WOFF
*GET,F12_2D2D,RAD,,VFAVG
VFQUERY,OUT1,IN1,,WOFF
*GET,F21_2D2D,RAD,,VFAVG
VFQUERY,OUT1,OUT1,,WOFF
*GET,F22_2D2D,RAD,,VFAVG
ALLSEL,ALL

/SOLUTION
ANTYPE,STATIC
/OUT,SCRATCH,,,APPEND
TIME,1
DELTIM,0.5
OUTRES,ALL,ALL
CNVTOL,HEAT,1.E-2,,,1.E-5
SOLVE
FINI

/POST1
SET,LAST
/OUT
*GET,TI,NODE,NODE(1,0,0),TEMP        
*GET,TO,NODE,NODE(2,0,0),TEMP         
*GET,HFI2,NODE,NODE(1,0,0),TF,SUM      ! INSIDE CIRCLE HEAT FLUX
*GET,HFO2,NODE,NODE(2,0,0),TF,SUM      ! OUTSIDE CIRCLE HEAT FLUX

HFIEXP2 = ABS((TI+T0)**4-(TO+T0)**4)*STFCONST/(1/E1+(R1**2/R2**2)*(1/E2-1))
HFOEXP2 = ABS(-R1**2/R2**2)*HFIEXP2
HFIERR2 = HFI2/HFIEXP2
HFOERR2 = HFO2/HFOEXP2
/OUT,SCRATCH,,,APPEND
*DIM,VALUE2D2D,,6,3
*VFILL,VALUE2D2D(1,1),DATA,0.000,1.000,0.250,0.750,HFIEXP2,HFOEXP2
*VFILL,VALUE2D2D(1,2),DATA,F11_2D2D,F12_2D2D,F21_2D2D,F22_2D2D,HFI2,HFO2
*VFILL,VALUE2D2D(1,3),DATA,0.000,F12_2D2D/1.000,F21_2D2D/0.250,F22_2D2D/0.750,HFIERR2,HFOERR2
*DIM,LABEL2D2D,CHAR,10,2
LABEL2D2D(1,1) = 'VF(1-1)','VF(1-2)','VF(2-1)','VF(2-2)','HFINSIDE','HFOUTSIDE'
ALLSEL,ALL
SAVE,TABLE_3
FINISH
/OUT,vm230,vrt
/COM,
/COM, -------------------- VM230 RESULTS COMPARISON ----------------------
/COM,
/COM,               |   TARGET   |   MECHANICAL APDL   |   RATIO
/COM,
/COM,
/COM,   *******************************************************************
/COM,   ***RADIATION BETWEEN 2D-2D AND 3D-3D MODEL IN SAME PREPROCESSOR****
/COM,   ********************************************************************
/NOPR
RESUME,TABLE_1
/GOPR
/COM, 
/COM,  USING PLANE77 AND SURF251 ELEMENTS
/COM,
*VWRITE,LABEL2D(1,1),LABEL2D(1,2),VALUE2D(1,1),VALUE2D(1,2),VALUE2D(1,3)
(1X,A8,A8,'   ',F8.3,'  ',F14.3,'   ',1F17.2)
/COM,
/COM, USING SOLID90 AND SURF252 ELEMENTS
/COM,
*VWRITE,LABEL3D(1,1),LABEL3D(1,2),VALUE3D(1,1),VALUE3D(1,2),VALUE3D(1,3)
(1X,A8,A8,'   ',F8.3,'  ',F14.3,'   ',1F17.2)
/COM,
/COM, 
/COM,   *************************************
/COM,   ***RADIATION BETWEEN 3D-2D MODEL ****
/COM,   *************************************
/COM,
/NOPR
RESUME,TABLE_2
/GOPR
/COM,
/COM, USING PLANE77, SOLID90 AND SURF252
/COM,
*VWRITE,LABEL3D2D(1,1),LABEL3D2D(1,2),VALUE3D2D(1,1),VALUE3D2D(1,2),VALUE3D2D(1,3)
(1X,A8,A8,'   ',F8.3,'  ',F14.3,'   ',1F17.2)
/COM,
/COM,
/COM, 
/COM,   *************************************
/COM,   ***RADIATION BETWEEN 2D-2D MODEL ****
/COM,   *************************************
/COM,
/NOPR
RESUME,TABLE_3
/GOPR
/COM,
/COM,	USING PLANE77 AND SURF252
/COM,
*VWRITE,LABEL2D2D(1,1),LABEL2D2D(1,2),VALUE2D2D(1,1),VALUE2D2D(1,2),VALUE2D2D(1,3)
(1X,A8,A8,'   ',F8.3,'  ',F14.3,'   ',1F17.2)
/COM,
/COM, ---------------------------------------------------------------------
/OUT,
*LIST,vm230,vrt
FINISH