VM271 Input Listing


/COM,ANSYS MEDIA REL. 2024R2 (05/10/2024) REF. VERIF. MANUAL: REL. 2024R2
/VERIFY,VM271
/TITLE,VM271,CONVECTION TREATMENT PROBLEM FOR A HOLLOW CYLINDER WITH FLUID FLOW
/COM, REFERENCE: " INTRODUCTION TO HEAT TRANSFER" - VEDAT S.ARPACI, AHMET SELAMET
/COM,			 SHU-HSIN KAO, 2000,PG:90-100
/COM, 

/COM,
/COM, USING SOLID70 - 3D 8-NODE THERMAL SOLID
/COM,
/NOPR
R1 = 0.01105				! INNER RADIUS OF THE CYLINDER (M)
R2 = 0.02				! OUTER RADIUS OF THE CYLINDER (M)
Z1 = 0
Z2 = 0.1
THETA1 = 0
THETA2 = 180
LENGTH = Z2-Z1				! LENGTH OF THE FLUID ELEMENT (M)
DIAMETER = 2*R1				! DIAMETER (M)
FILMAREA = ACOS(-1)*DIAMETER*LENGTH	! FILMAREA (M^2)
CROSSAREA = 0.25*ACOS(-1)*DIAMETER**2	
FILM = 300				! FILM COEFFICIENT FOR SURFACE ELEMENTS (W/M^2 C)
CP   = 0.5474				! SPECIFIC HEAT FOR FLUID (J/KG C)
COND = 1.0E-16				! THERMAL CONDUCTIVITY FOR FLUID (W/M C)
TINLET = 700				! INLET TEMPERATURE (DEGREE)
TBULK  = 2000				! BULK TEMPERATURE (DEGREE)
MDOT   = 0.002*60*60			! MASS FLOW RATE FOR FLUID  (KG/SEC)
CPS = 1					! SPECIFIC HEAT FOR CYLINDER (J/KG C)
CONDS = 10000				! THERMAL CONDUCTIVITY FOR CYLINDER (W/M C)

/PREP7
ET,1,FLUID116
KEYOPT,1,1,1				! TEMPERATURE DOF ONLY
KEYOPT,1,9,2				! UPWIND DIFFERENCE SCHEME
R,1,DIAMETER,CROSSAREA			! DIA FOR CONVECTION,CROSS SECTION AREA FOR CONDUCTION
MP,KXX,1,COND
MP,C,1,CP

ET,2,SURF152
KEYOPT,2,4,1				! NO MIDSIDE NODES
KEYOPT,2,5,0
KEYOPT,2,8,2				! CONVECTION

ET,3,SOLID70
MP,KXX,3,CONDS

K,1,0,0,Z1
K,2,0,0,Z2
L,1,2
LESIZE,1,,,3
TYPE,1
MAT,1
REAL,1
LMESH,ALL

*GET,DLEN1,NODE,1,LOC,Z
*GET,DLEN2,NODE,3,LOC,Z
*GET,DLEN3,NODE,4,LOC,Z
*GET,DLEN4,NODE,2,LOC,Z

CYLIND,R1,R2,Z1,Z2,THETA1,THETA2
CYLIND,R1,R2,Z1,Z2,THETA1+180,THETA2+180
VGLUE,1,2
MSHAP,TRIOPT,3D
LSEL,S,LINE,,2,4,2
LSEL,A,LINE,,7,9,2
LESIZE,ALL,,,3
LSEL,S,LINE,,10,13,1			
LESIZE,ALL,,,18
LSEL,S,LINE,,6,8,2
LSEL,A,LINE,,28,29,1
LSEL,A,LINE,,3,5,2
LSEL,A,LINE,,26,27,1
LESIZE,ALL,,,24
TYPE,3
MAT,3
REAL,3
VMESH,ALL

CSYS,1
NSEL,S,LOC,X,R1
ESLN,S
TYPE,2
MAT,2
REAL,2
ESURF
KEYOPT,2,5,2				! TWO NODES 5TH,6TH NODES
CSYS,0
ALLSEL,ALL

ESEL,S,TYPE,,1
CM,COM116,ELEM				! COMPONENT WITH FLUID116 ELEMENTS
ESEL,S,TYPE,,2
CM,COM152,ELEM				! COMPONENT WITH SURF152 ELEMENTS
ALLSEL,ALL
MSTOLE,1,'COM152','COM116'		! MAP 152 TO 116 AND CREATE THE 5/6 NODES OF 152
ALLSEL,ALL

KSEL,S,,,1
NSLK,S
D,ALL,TEMP,TINLET			! INLET TEMPERATURE
ALLSEL,ALL

ESEL,S,TYPE,,1
SFE,ALL,,HFLUX,,MDOT			! MASS FLOW RATE FOR FLUID ELEMENT
ESEL,ALL

CSYS,1
NSEL,S,LOC,X,R2
D,ALL,TEMP,TBULK			! BULK TEMPERATURE ON THE CYLINDER
CSYS,0
ALLSEL,ALL

ESEL,S,TYPE,,2
SFE,ALL,1,CONV,0,FILM			! FILM COEFFICIENT FOR SURFACE ELEMENT
SFE,ALL,1,CONV,2,0			! SET BULK TEMP
ESEL,ALL
EPLOT
FINISH

/SOLU
ANTYPE,STATIC				! STEADY STATE ANALYSIS
OUTRES,ALL,ALL
/OUT,SCRATCH
SOLVE
FINISH

/POST1
SET,LAST
*GET,TEMP1,NODE,1,TEMP			! TEMPERATURE AT NODE 1 OF FLUID116 ELEMENT
*GET,TEMP2,NODE,2,TEMP			! TEMPERATURE AT NODE 2 OF FLUID116 ELEMENT
*GET,TEMP3,NODE,3,TEMP			! TEMPERATURE AT NODE 3 OF FLUID116 ELEMENT	
*GET,TEMP4,NODE,4,TEMP			! TEMPERATURE AT NODE 4 OF FLUID116 ELEMENT

ESEL,S,TYPE,,3
NSLE,S
/SHOW,PNG,REV
/VIEW,1,1,1,1
PLNSOL,TEMP
/SHOW,CLOSE


*DIM,LABEL,CHAR,1,4
*DIM,LEN,,1,4
*DIM,VALUE_1,,4,3

LABEL(1,1) = 'NODE1'
LABEL(1,2) = 'NODE3'
LABEL(1,3) = 'NODE4'
LABEL(1,4) = 'NODE2'

MODULUS = (FILM*ACOS(-1)*DIAMETER*LENGTH)/(MDOT*CP)

/COM, ANALYTICAL VALUES CALCULATED
/COM,	USING EQUATION MENTIONED IN THE REFERENCE BOOK

POSITION1 = (DLEN1- DLEN1)/LENGTH
POSITION2 = (DLEN2- DLEN1)/LENGTH
POSITION3 = (DLEN3- DLEN1)/LENGTH
POSITION4 = (DLEN4- DLEN1)/LENGTH

ATEMP1 = (TINLET-TBULK)*EXP(-MODULUS*POSITION1)+TBULK
ATEMP2 = (TINLET-TBULK)*EXP(-MODULUS*POSITION2)+TBULK
ATEMP3 = (TINLET-TBULK)*EXP(-MODULUS*POSITION3)+TBULK
ATEMP4 = (TINLET-TBULK)*EXP(-MODULUS*POSITION4)+TBULK

/OUT,
*VFILL,LEN(1,1),DATA,POSITION1		
*VFILL,LEN(1,2),DATA,POSITION2
*VFILL,LEN(1,3),DATA,POSITION3
*VFILL,LEN(1,4),DATA,POSITION4

*VFILL,VALUE_1(1,1),DATA,ATEMP1
*VFILL,VALUE_1(1,2),DATA,TEMP1
*VFILL,VALUE_1(1,3),DATA,ABS(ATEMP1/TEMP1)
*VFILL,VALUE_1(2,1),DATA,ATEMP2
*VFILL,VALUE_1(2,2),DATA,TEMP3
*VFILL,VALUE_1(2,3),DATA,ABS(ATEMP2/TEMP3)
*VFILL,VALUE_1(3,1),DATA,ATEMP3
*VFILL,VALUE_1(3,2),DATA,TEMP4
*VFILL,VALUE_1(3,3),DATA,ABS(ATEMP3/TEMP4)
*VFILL,VALUE_1(4,1),DATA,ATEMP4
*VFILL,VALUE_1(4,2),DATA,TEMP2
*VFILL,VALUE_1(4,3),DATA,ABS(ATEMP4/TEMP2)

SAVE,TABLE_1
FINISH

/CLEAR,NOSTART

/COM,
/COM, USING SHELL131 - 4-NODE THERMAL SHELL
/COM,

/NOPR
R1 = 0.01105				! INNER RADIUS OF THE CYLINDER (M)
R2 = 0.02				! OUTER RADIUS OF THE CYLINDER (M)
Z1 = 0
Z2 = 0.1
THETA1 = 0
THETA2 = 180
LENGTH = Z2-Z1				! LENGTH OF THE FLUID ELEMENT (M)
DIAMETER = 2*R1				! DIAMETER (M)
FILMAREA = ACOS(-1)*DIAMETER*LENGTH	! FILMAREA (M^2)
CROSSAREA = 0.25*ACOS(-1)*DIAMETER**2
FILM = 300				! FILM COEFFICIENT FOR SURFACE ELEMENTS (W/M^2 C)
CP   = 0.5474				! SPECIFIC HEAT FOR FLUID (J/KG C)
COND = 1.0E-16				! THERMAL CONDUCTIVITY FOR FLUID (W/M C)
TINLET = 700				! INLET TEMPERATURE (DEGREE)
TBULK  = 2000				! BULK TEMPERATURE (DEGREE)
MDOT   = 0.002*60*60	   		! MASS FLOW RATE FOR FLUID  (KG/SEC)
CPS = 1					! SPECIFIC HEAT FOR CYLINDER (J/KG C)
CONDS = 10000				! THERMAL CONDUCTIVITY FOR CYLINDER (W/M C)

/PREP7
ET,1,FLUID116
KEYOPT,1,1,1				! TEMPERATURE DOF ONLY
KEYOPT,1,9,2				! UPWIND DIFFERENCE SCHEME
R,1,DIAMETER,CROSSAREA			! DIA FOR CONVECTION,CROSS SECTION AREA FOR CONDUCTION
MP,KXX,1,COND
MP,C,1,CP

ET,2,SURF152
KEYOPT,2,4,1				! NO MIDSIDE NODES
KEYOPT,2,5,0
KEYOPT,2,8,2				! CONVECTION
KEYOPT,2,11,1               

ET,3,SHELL131
KEYOPT,3,3,1				! LINEAR TEMPERATURE VARIATION THROUGH LAYER
KEYOPT,3,4,3                 		! THREE LAYERS

MP,KXX,3,CONDS
SECTYPE,3,SHELL
SECN,3
SECDATA,(R2-R1)/3,3
SECDATA,(R2-R1)/3,3
SECDATA,(R2-R1)/3,3
SECOFF,MID

K,1,0,0,Z1
K,2,0,0,Z2
L,1,2
LESIZE,1,,,3
TYPE,1
MAT,1
REAL,1
LMESH,ALL

*GET,DLEN1,NODE,1,LOC,Z
*GET,DLEN2,NODE,3,LOC,Z
*GET,DLEN3,NODE,4,LOC,Z
*GET,DLEN4,NODE,2,LOC,Z

K,3,R1,0,Z1
K,4,R1,0,Z2
K,5,0,R1,Z2
K,6,0,R1,Z1

LARC,6,3,1,R1
L,3,4
LARC,4,5,2,R1
L,5,6
AL,2,3,4,5
ARSYM,X,ALL
ARSYM,Y,ALL
AGLUE,ALL

LSEL,S,LINE,,3,7,2
LSEL,A,LINE,,13
LESIZE,ALL,,,18

LSEL,S,LINE,,2,4,2
LSEL,A,LINE,,18,23,1
LESIZE,ALL,,,12
TYPE,3
MAT,3
SECN,3
AMESH,ALL

CSYS,1
NSEL,S,LOC,X,R1
ESLN,S
TYPE,2
MAT,2
REAL,2
ESURF
KEYOPT,2,5,2				    ! TWO NODES 5TH,6TH NODES
CSYS,0
ALLSEL,ALL

ESEL,S,TYPE,,1
CM,COM116,ELEM				    ! COMPONENT WITH FLUID116 ELEMENTS
ESEL,S,TYPE,,2
CM,COM152,ELEM				    ! COMPONENT WITH SURF152 ELEMENTS
ALLSEL,ALL
MSTOLE,1,'COM152','COM116'		    ! MAP 152 TO 116 AND CREATE THE 5/6 NODES OF 152

ALLSEL,ALL

KSEL,S,,,1
NSLK,S
D,ALL,TEMP,TINLET			    ! INLET TEMPERATURE
ALLSEL,ALL

ESEL,S,TYPE,,1
SFE,ALL,,HFLUX,,MDOT			    ! MASS FLOW RATE FOR FLUID ELEMENT
ESEL,ALL

CSYS,1
NSEL,S,LOC,X,R1
D,ALL,TBOT,TBULK		            ! BULK TEMPERATURE ON THE CYLINDER
CSYS,0
ALLSEL,ALL

ESEL,S,TYPE,,2
SFE,ALL,1,CONV,0,FILM			    ! FILM COEFFICIENT FOR SURFACE ELEMENT
SFE,ALL,1,CONV,2,0			    ! SET BULK TEMP
ESEL,ALL
EPLOT

FINISH

/SOLU
ANTYPE,STATIC				    ! STEADY STATE ANALYSIS
OUTRES,ALL,ALL
/OUT,SCRATCH
SOLVE
FINI

/POST1
SET,LAST
*GET,TEMP1,NODE,1,TEMP			! TEMPERATURE AT NODE 1 OF FLUID116 ELEMENT
*GET,TEMP2,NODE,2,TEMP			! TEMPERATURE AT NODE 2 OF FLUID116 ELEMENT
*GET,TEMP3,NODE,3,TEMP			! TEMPERATURE AT NODE 3 OF FLUID116 ELEMENT
*GET,TEMP4,NODE,4,TEMP			! TEMPERATURE AT NODE 4 OF FLUID116 ELEMENT

ESEL,S,TYPE,,3
NSLE,S
/ESHAPE,1
/SHOW,PNG,REV
/VIEW,1,1,1,1
PLNSOL,TTOP
PLNSOL,TBOT
/SHOW,CLOSE

*DIM,LABEL,CHAR,1,4
*DIM,LEN,,1,4
*DIM,VALUE_2,,4,3

LABEL(1,1) = 'NODE1'
LABEL(1,2) = 'NODE3'
LABEL(1,3) = 'NODE4'
LABEL(1,4) = 'NODE2'

MODULUS = (FILM*ACOS(-1)*DIAMETER*LENGTH)/(MDOT*CP)

/COM, ANALYTICAL VALUES CALCULATED
/COM, USING EQUATION MENTIONED IN THE REFERENCE BOOK

POSITION1 = (DLEN1- DLEN1)/LENGTH
POSITION2 = (DLEN2- DLEN1)/LENGTH
POSITION3 = (DLEN3- DLEN1)/LENGTH
POSITION4 = (DLEN4- DLEN1)/LENGTH

ATEMP1 = (TINLET-TBULK)*EXP(-MODULUS*POSITION1)+TBULK
ATEMP2 = (TINLET-TBULK)*EXP(-MODULUS*POSITION2)+TBULK
ATEMP3 = (TINLET-TBULK)*EXP(-MODULUS*POSITION3)+TBULK
ATEMP4 = (TINLET-TBULK)*EXP(-MODULUS*POSITION4)+TBULK

/OUT,
*VFILL,LEN(1,1),DATA,POSITION1		
*VFILL,LEN(1,2),DATA,POSITION2
*VFILL,LEN(1,3),DATA,POSITION3
*VFILL,LEN(1,4),DATA,POSITION4

*VFILL,VALUE_2(1,1),DATA,ATEMP1
*VFILL,VALUE_2(1,2),DATA,TEMP1
*VFILL,VALUE_2(1,3),DATA,ABS(ATEMP1/TEMP1)
*VFILL,VALUE_2(2,1),DATA,ATEMP2
*VFILL,VALUE_2(2,2),DATA,TEMP3
*VFILL,VALUE_2(2,3),DATA,ABS(ATEMP2/TEMP3)
*VFILL,VALUE_2(3,1),DATA,ATEMP3
*VFILL,VALUE_2(3,2),DATA,TEMP4
*VFILL,VALUE_2(3,3),DATA,ABS(ATEMP3/TEMP4)
*VFILL,VALUE_2(4,1),DATA,ATEMP4
*VFILL,VALUE_2(4,2),DATA,TEMP2
*VFILL,VALUE_2(4,3),DATA,ABS(ATEMP4/TEMP2)

SAVE,TABLE_2
FINISH

/CLEAR,NOSTART

/COM,
/COM, USING SOLID278 - 3D 8-NODE LAYERED THERMAL SOLID
/COM,

/NOPR
R1 = 0.01105				! INNER RADIUS OF THE CYLINDER (M)
R2 = 0.02				! OUTER RADIUS OF THE CYLINDER (M)
Z1 = 0
Z2 = 0.1
THETA1 = 0
THETA2 = 180
LENGTH = Z2-Z1				! LENGTH OF THE FLUID ELEMENT (M)
DIAMETER = 2*R1				! DIAMETER (M)
FILMAREA = ACOS(-1)*DIAMETER*LENGTH	! FILMAREA (M^2)
CROSSAREA = 0.25*ACOS(-1)*DIAMETER**2
FILM = 300				! FILM COEFFICIENT FOR SURFACE ELEMENTS (W/M^2 C)
CP   = 0.5474				! SPECIFIC HEAT FOR FLUID (J/KG C)
COND = 1.0E-16				! THERMAL CONDUCTIVITY FOR FLUID (W/M C)
TINLET = 700				! INLET TEMPERATURE (DEGREE)
TBULK  = 2000				! BULK TEMPERATURE (DEGREE)
MDOT   = 0.002*60*60	    		! MASS FLOW RATE FOR FLUID  (KG/SEC)
CPS = 1					! SPECIFIC HEAT FOR CYLINDER (J/KG C)
CONDS = 10000				! THERMAL CONDUCTIVITY FOR CYLINDER (W/M C)

/PREP7
ET,1,FLUID116
KEYOPT,1,1,1				! TEMPERATURE DOF ONLY
KEYOPT,1,9,2				! UPWIND DIFFERENCE SCHEME
R,1,DIAMETER,CROSSAREA			! DIA FOR CONVECTION,CROSS SECTION AREA FOR CONDUCTION
MP,KXX,1,COND
MP,C,1,CP

ET,2,SURF152
KEYOPT,2,4,1				! NO MIDSIDE NODES
KEYOPT,2,5,0
KEYOPT,2,8,2				! CONVECTION
KEYOPT,2,11,0               

ET,3,SOLID278
KEYOPT,3,3,2				! LAYERED SOLID

MP,KXX,3,CONDS

SECT,3,SHELL
SECN,3
SECD,(R2-R1)/3,3
SECD,(R2-R1)/3,3
SECD,(R2-R1)/3,3

K,1,0,0,Z1
K,2,0,0,Z2
L,1,2
LESIZE,1,,,3
TYPE,1
MAT,1
REAL,1
LMESH,ALL

*GET,DLEN1,NODE,1,LOC,Z
*GET,DLEN2,NODE,3,LOC,Z
*GET,DLEN3,NODE,4,LOC,Z
*GET,DLEN4,NODE,2,LOC,Z

CYLIND,R1,R2,Z1,Z2,THETA1,THETA2
CYLIND,R1,R2,Z1,Z2,THETA1+180,THETA2+180
VGLUE,1,2
MSHAP,TRIOPT,3D
LSEL,S,LINE,,2,4,2
LSEL,A,LINE,,7,9,2
LESIZE,ALL,,,1
LSEL,S,LINE,,10,13,1
LESIZE,ALL,,,18
LSEL,S,LINE,,6,8,2
LSEL,A,LINE,,28,29,1
LSEL,A,LINE,,3,5,2
LSEL,A,LINE,,26,27,1
LESIZE,ALL,,,24
TYPE,3
MAT,3
SECN,3
VMESH,ALL

CSYS,1
NSEL,S,LOC,X,R1
ESLN,S
TYPE,2
MAT,2
REAL,2
ESURF
KEYOPT,2,5,2				! TWO NODES 5TH,6TH NODES
CSYS,0
ALLSEL,ALL

ESEL,S,TYPE,,1
CM,COM116,ELEM				! COMPONENT WITH FLUID116 ELEMENTS
ESEL,S,TYPE,,2
CM,COM152,ELEM				! COMPONENT WITH SURF152 ELEMENTS
ALLSEL,ALL
MSTOLE,1,'COM152','COM116'		! MAP 152 TO 116 AND CREATE THE 5/6 NODES OF 152
ALLSEL,ALL

KSEL,S,,,1
NSLK,S
D,ALL,TEMP,TINLET			! INLET TEMPERATURE
ALLSEL,ALL

ESEL,S,TYPE,,1
SFE,ALL,,HFLUX,,MDOT			! MASS FLOW RATE FOR FLUID ELEMENT
ESEL,ALL

CSYS,1
NSEL,S,LOC,X,R2
D,ALL,TEMP,TBULK			! BULK TEMPERATURE ON THE CYLINDER
CSYS,0
ALLSEL,ALL

ESEL,S,TYPE,,2
SFE,ALL,1,CONV,0,FILM			! FILM COEFFICIENT FOR SURFACE ELEMENT
SFE,ALL,1,CONV,2,0			! SET BULK TEMP
ESEL,ALL
EPLOT
FINISH

/SOLU
ANTYPE,STATIC				! STEADY STATE ANALYSIS
OUTRES,ALL,ALL
/OUT,SCRATCH
SOLVE
FINI

/POST1
SET,LAST
*GET,TEMP1,NODE,1,TEMP			! TEMPERATURE AT NODE 1 OF FLUID116 ELEMENT
*GET,TEMP2,NODE,2,TEMP			! TEMPERATURE AT NODE 2 OF FLUID116 ELEMENT
*GET,TEMP3,NODE,3,TEMP			! TEMPERATURE AT NODE 3 OF FLUID116 ELEMENT
*GET,TEMP4,NODE,4,TEMP			! TEMPERATURE AT NODE 4 OF FLUID116 ELEMENT


ESEL,S,TYPE,,3
NSLE,S
/SHOW,PNG,REV
/VIEW,1,1,1,1
PLNSOL,TEMP
/SHOW,CLOSE

*DIM,LABEL,CHAR,1,4
*DIM,LEN,,1,4
*DIM,VALUE_3,,4,3

LABEL(1,1) = 'NODE1'
LABEL(1,2) = 'NODE3'
LABEL(1,3) = 'NODE4'
LABEL(1,4) = 'NODE2'

MODULUS = (FILM*ACOS(-1)*DIAMETER*LENGTH)/(MDOT*CP)

/COM, ANALYTICAL VALUES CALCULATED
/COM,	USING EQUATION MENTIONED IN THE REFERENCE BOOK

POSITION1 = (DLEN1- DLEN1)/LENGTH
POSITION2 = (DLEN2- DLEN1)/LENGTH
POSITION3 = (DLEN3- DLEN1)/LENGTH
POSITION4 = (DLEN4- DLEN1)/LENGTH

ATEMP1 = (TINLET-TBULK)*EXP(-MODULUS*POSITION1)+TBULK
ATEMP2 = (TINLET-TBULK)*EXP(-MODULUS*POSITION2)+TBULK
ATEMP3 = (TINLET-TBULK)*EXP(-MODULUS*POSITION3)+TBULK
ATEMP4 = (TINLET-TBULK)*EXP(-MODULUS*POSITION4)+TBULK

/OUT,

*VFILL,LEN(1,1),DATA,POSITION1		
*VFILL,LEN(1,2),DATA,POSITION2
*VFILL,LEN(1,3),DATA,POSITION3
*VFILL,LEN(1,4),DATA,POSITION4

*VFILL,VALUE_3(1,1),DATA,ATEMP1
*VFILL,VALUE_3(1,2),DATA,TEMP1
*VFILL,VALUE_3(1,3),DATA,ABS(ATEMP1/TEMP1)
*VFILL,VALUE_3(2,1),DATA,ATEMP2
*VFILL,VALUE_3(2,2),DATA,TEMP3
*VFILL,VALUE_3(2,3),DATA,ABS(ATEMP2/TEMP3)
*VFILL,VALUE_3(3,1),DATA,ATEMP3
*VFILL,VALUE_3(3,2),DATA,TEMP4
*VFILL,VALUE_3(3,3),DATA,ABS(ATEMP3/TEMP4)
*VFILL,VALUE_3(4,1),DATA,ATEMP4
*VFILL,VALUE_3(4,2),DATA,TEMP2
*VFILL,VALUE_3(4,3),DATA,ABS(ATEMP4/TEMP2)

SAVE,TABLE_3

/CLEAR, NOSTART

/COM,
/COM, USING SHELL294 - 4-NODE THERMAL SHELL
/COM,

/NOPR

R1 = 0.01105                            ! INNER RADIUS OF THE CYLINDER (M)
R2 = 0.02                                       ! OUTER RADIUS OF THE CYLINDER (M)
Z1 = 0
Z2 = 0.1
THETA1 = 0
THETA2 = 180
LENGTH = Z2-Z1                          ! LENGTH OF THE FLUID ELEMENT (M)
DIAMETER = 2*R1                         ! DIAMETER (M)
FILMAREA = ACOS(-1)*DIAMETER*LENGTH     ! FILMAREA (M^2)
CROSSAREA = 0.25*ACOS(-1)*DIAMETER**2
FILM = 300                                      ! FILM COEFFICIENT FOR SURFACE ELEMENTS (W/M^2 C)
CP   = 0.5474                           ! SPECIFIC HEAT FOR FLUID (J/KG C)
COND = 1.0E-16                          ! THERMAL CONDUCTIVITY FOR FLUID (W/M C)
TINLET = 700                            ! INLET TEMPERATURE (DEGREE)
TBULK  = 2000                           ! BULK TEMPERATURE (DEGREE)
MDOT   = 0.002*60*60                    ! MASS FLOW RATE FOR FLUID  (KG/SEC)
CPS = 1                                 ! SPECIFIC HEAT FOR CYLINDER (J/KG C)
CONDS = 10000                           ! THERMAL CONDUCTIVITY FOR CYLINDER (W/M C)

/PREP7

ET,1,FLUID116
KEYOPT,1,1,1                            ! TEMPERATURE DOF ONLY
KEYOPT,1,9,2                            ! UPWIND DIFFERENCE SCHEME
R,1,DIAMETER,CROSSAREA                  ! DIA FOR CONVECTION,CROSS SECTION AREA FOR CONDUCTION
MP,KXX,1,COND
MP,C,1,CP

ET,2,SURF152
KEYOPT,2,4,1                            ! NO MIDSIDE NODES
KEYOPT,2,5,0
KEYOPT,2,8,2                            ! CONVECTION

ET,3,294

KEYOPT,3,6,1							! SINGLE MATERIAL LAYER PER INTERPOLATION LAYER
KEYOPT,3,8,1							! STORE TOP AND BOTTOM DATA FOR ALL LAYERS
MP,KXX,3,CONDS

SECTYPE,3,SHELL
SECDATA,(R2-R1)/3,3
SECDATA,(R2-R1)/3,3
SECDATA,(R2-R1)/3,3
SECOFFSET,BOT							! SECTION OFFSET SET TO BOTTOM

K,1,0,0,Z1
K,2,0,0,Z2
L,1,2
LESIZE,1,,,3
TYPE,1
MAT,1
REAL,1
LMESH,ALL

*GET,DLEN1,NODE,1,LOC,Z
*GET,DLEN2,NODE,3,LOC,Z
*GET,DLEN3,NODE,4,LOC,Z
*GET,DLEN4,NODE,2,LOC,Z

CIRCLE,1,R1,2
ADRAG,2,3,4,5,,,1
AGLUE,ALL

LSEL,S,LINE,,7,8
LSEL,A,LINE,,10
LSEL,A,LINE,,12
LESIZE,ALL,,,18,,1,,,0

LSEL,S,LINE,,6,9,3
LSEL,A,LINE,,11,13,2
LSEL,A,LINE,,2,5
LESIZE,ALL,,,12,,1,,,0

TYPE,3
MAT,3
REAL,3
SECNUM,3
MSHAP,0,2D
AMESH,ALL

CSYS,1
NSEL,S,LOC,X,R1
ESLN,S
TYPE,2
MAT,2
REAL,2
ESURF,,BOT

KEYOPT,2,5,2                            ! TWO NODES 5TH,6TH NODES
CSYS,0
ALLSEL,ALL

ESEL,S,TYPE,,1
CM,COM116,ELEM                          ! COMPONENT WITH FLUID116 ELEMENTS
ESEL,S,TYPE,,2
CM,COM152,ELEM                          ! COMPONENT WITH SURF152 ELEMENTS
ALLSEL,ALL
MSTOLE,1,'COM152','COM116'              ! MAP 152 TO 116 AND CREATE THE 5/6 NODES OF 152
ALLSEL,ALL

KSEL,S,,,1
NSLK,S
D,ALL,TEMP,TINLET                               ! INLET TEMPERATURE
ALLSEL,ALL

ESEL,S,TYPE,,1
SFE,ALL,,HFLUX,,MDOT                    ! MASS FLOW RATE FOR FLUID ELEMENT
ESEL,ALL

CSYS,1
NSEL,S,LOC,X,R1
D,ALL,TTOP,TBULK                                ! BULK TEMPERATURE ON THE CYLINDER
CSYS,0
ALLSEL,ALL

ESEL,S,TYPE,,2
SFE,ALL,1,CONV,0,FILM                   ! FILM COEFFICIENT FOR SURFACE ELEMENT
SFE,ALL,1,CONV,2,0                      ! SET BULK TEMP
ESEL,ALL
EPLOT
FINISH

/SOLU
ANTYPE,STATIC                           ! STEADY STATE ANALYSIS
OUTRES,ALL,ALL
/OUT,SCRATCH
SOLVE
SAVE
FINI

/POST1
SET,LAST

*GET,TEMP1,NODE,1,TEMP                  ! TEMPERATURE AT NODE 1 OF FLUID116 ELEMENT
*GET,TEMP2,NODE,2,TEMP                  ! TEMPERATURE AT NODE 2 OF FLUID116 ELEMENT
*GET,TEMP3,NODE,3,TEMP                  ! TEMPERATURE AT NODE 3 OF FLUID116 ELEMENT
*GET,TEMP4,NODE,4,TEMP                  ! TEMPERATURE AT NODE 4 OF FLUID116 ELEMENT

ESEL,S,TYPE,,3
NSLE,S
/ESHAPE,1
/SHOW,PNG,REV
/VIEW,1,1,1,1
PLNSOL,TTOP
PLNSOL,TBOT
/SHOW,CLOSE

*DIM,LABEL,CHAR,1,4
*DIM,LEN,,1,4
*DIM,VALUE_4,,4,3

LABEL(1,1) = 'NODE1'
LABEL(1,2) = 'NODE3'
LABEL(1,3) = 'NODE4'
LABEL(1,4) = 'NODE2'

MODULUS = (FILM*ACOS(-1)*DIAMETER*LENGTH)/(MDOT*CP)

/COM, ANALYTICAL VALUES CALCULATED
/COM, USING EQUATION MENTIONED IN THE REFERENCE BOOK

POSITION1 = (DLEN1- DLEN1)/LENGTH
POSITION2 = (DLEN2- DLEN1)/LENGTH
POSITION3 = (DLEN3- DLEN1)/LENGTH
POSITION4 = (DLEN4- DLEN1)/LENGTH

ATEMP1 = (TINLET-TBULK)*EXP(-MODULUS*POSITION1)+TBULK
ATEMP2 = (TINLET-TBULK)*EXP(-MODULUS*POSITION2)+TBULK
ATEMP3 = (TINLET-TBULK)*EXP(-MODULUS*POSITION3)+TBULK
ATEMP4 = (TINLET-TBULK)*EXP(-MODULUS*POSITION4)+TBULK

/OUT,
*VFILL,LEN(1,1),DATA,POSITION1		
*VFILL,LEN(1,2),DATA,POSITION2
*VFILL,LEN(1,3),DATA,POSITION3
*VFILL,LEN(1,4),DATA,POSITION4

*VFILL,VALUE_4(1,1),DATA,ATEMP1
*VFILL,VALUE_4(1,2),DATA,TEMP1
*VFILL,VALUE_4(1,3),DATA,ABS(ATEMP1/TEMP1)
*VFILL,VALUE_4(2,1),DATA,ATEMP2
*VFILL,VALUE_4(2,2),DATA,TEMP3
*VFILL,VALUE_4(2,3),DATA,ABS(ATEMP2/TEMP3)
*VFILL,VALUE_4(3,1),DATA,ATEMP3
*VFILL,VALUE_4(3,2),DATA,TEMP4
*VFILL,VALUE_4(3,3),DATA,ABS(ATEMP3/TEMP4)
*VFILL,VALUE_4(4,1),DATA,ATEMP4
*VFILL,VALUE_4(4,2),DATA,TEMP2
*VFILL,VALUE_4(4,3),DATA,ABS(ATEMP4/TEMP2)

SAVE,TABLE_4
FINISH

/COM,
/OUT,vm271,vrt
/COM,-------------------VM271 RESULTS COMPARISON: SOLID70 --------------------
/COM,
/COM,		  	      LENGTH |  TARGET  |  Mechanical APDL |  RATIO
/COM,	
/COM,
RESUME,TABLE_1
/COM, TEMPERATURE COMPUTED ON THE NODES OF FLUID116 ELEMENT
/COM, WITH CYLINDER MODELED USING SOLID70 ELEMENTS
/COM,
*VWRITE,LABEL(1,1),LEN(1,1),VALUE_1(1,1),VALUE_1(1,2),VALUE_1(1,3)
(1X,A5,'  ',F9.3,'  ',F10.3,'   ',F14.3,'   ',F15.3)
/COM,
*VWRITE,LABEL(1,2),LEN(1,2),VALUE_1(2,1),VALUE_1(2,2),VALUE_1(2,3)
(1X,A5,'  ',F9.3,'  ',F10.3,'   ',F14.3,'   ',F15.3)
/COM,
*VWRITE,LABEL(1,3),LEN(1,3),VALUE_1(3,1),VALUE_1(3,2),VALUE_1(3,3)
(1X,A5,'  ',F9.3,'  ',F10.3,'   ',F14.3,'   ',F15.3)
/COM,
*VWRITE,LABEL(1,4),LEN(1,4),VALUE_1(4,1),VALUE_1(4,2),VALUE_1(4,3)
(1X,A5,'  ',F9.3,'  ',F10.3,'   ',F14.3,'   ',F15.3)
/COM,
/COM,-------------------------------------------------------------------------
/COM,
/COM,------------------VM271 RESULTS COMPARISON: SHELL131 --------------------
/COM,
/COM,		  	      LENGTH |  TARGET  |  Mechanical APDL |  RATIO
/COM,	
/COM,
RESUME,TABLE_2
/COM,
/COM, TEMPERATURE COMPUTED ON THE NODES OF FLUID116 ELEMENT
/COM, WITH CYLINDER MODELED USING SHELL131 ELEMENTS
/COM,
*VWRITE,LABEL(1,1),LEN(1,1),VALUE_2(1,1),VALUE_2(1,2),VALUE_2(1,3)
(1X,A5,'  ',F9.3,'  ',F10.3,'   ',F14.3,'   ',F15.3)
/COM,
*VWRITE,LABEL(1,2),LEN(1,2),VALUE_2(2,1),VALUE_2(2,2),VALUE_2(2,3)
(1X,A5,'  ',F9.3,'  ',F10.3,'   ',F14.3,'   ',F15.3)
/COM,
*VWRITE,LABEL(1,3),LEN(1,3),VALUE_2(3,1),VALUE_2(3,2),VALUE_2(3,3)
(1X,A5,'  ',F9.3,'  ',F10.3,'   ',F14.3,'   ',F15.3)
/COM,
*VWRITE,LABEL(1,4),LEN(1,4),VALUE_2(4,1),VALUE_2(4,2),VALUE_2(4,3)
(1X,A5,'  ',F9.3,'  ',F10.3,'   ',F14.3,'   ',F15.3)
/COM,
/COM,-------------------------------------------------------------------------
/COM,
/COM,------------------VM271 RESULTS COMPARISON: SOLID278 --------------------
/COM,
/COM,		  	      LENGTH |  TARGET  |  Mechanical APDL |  RATIO
/COM,	
/COM,
RESUME,TABLE_3
/COM,
/COM, TEMPERATURE COMPUTED ON THE NODES OF FLUID116 ELEMENT
/COM, WITH CYLINDERS MODELED USING LAYERED SOLID278 ELEMENTS
/COM,
*VWRITE,LABEL(1,1),LEN(1,1),VALUE_3(1,1),VALUE_3(1,2),VALUE_3(1,3)
(1X,A5,'  ',F9.3,'  ',F10.3,'   ',F14.3,'   ',F15.3)
/COM,
*VWRITE,LABEL(1,2),LEN(1,2),VALUE_3(2,1),VALUE_3(2,2),VALUE_3(2,3)
(1X,A5,'  ',F9.3,'  ',F10.3,'   ',F14.3,'   ',F15.3)
/COM,
*VWRITE,LABEL(1,3),LEN(1,3),VALUE_3(3,1),VALUE_3(3,2),VALUE_3(3,3)
(1X,A5,'  ',F9.3,'  ',F10.3,'   ',F14.3,'   ',F15.3)
/COM,
*VWRITE,LABEL(1,4),LEN(1,4),VALUE_3(4,1),VALUE_3(4,2),VALUE_3(4,3)
(1X,A5,'  ',F9.3,'  ',F10.3,'   ',F14.3,'   ',F15.3)
/COM,
/COM,-------------------------------------------------------------------------
/COM,
/COM,------------------VM271 RESULTS COMPARISON: SHELL294 --------------------
/COM,
/COM,		  	      LENGTH |  TARGET  |  Mechanical APDL |  RATIO
/COM,	
/COM,
RESUME,TABLE_4
/COM,
/COM, TEMPERATURE COMPUTED ON THE NODES OF FLUID116 ELEMENT
/COM, WITH CYLINDERS MODELED USING SHELL294 ELEMENTS
/COM,
*VWRITE,LABEL(1,1),LEN(1,1),VALUE_4(1,1),VALUE_4(1,2),VALUE_4(1,3)
(1X,A5,'  ',F9.3,'  ',F10.3,'   ',F14.3,'   ',F15.3)
/COM,
*VWRITE,LABEL(1,2),LEN(1,2),VALUE_4(2,1),VALUE_4(2,2),VALUE_4(2,3)
(1X,A5,'  ',F9.3,'  ',F10.3,'   ',F14.3,'   ',F15.3)
/COM,
*VWRITE,LABEL(1,3),LEN(1,3),VALUE_4(3,1),VALUE_4(3,2),VALUE_4(3,3)
(1X,A5,'  ',F9.3,'  ',F10.3,'   ',F14.3,'   ',F15.3)
/COM,
*VWRITE,LABEL(1,4),LEN(1,4),VALUE_4(4,1),VALUE_4(4,2),VALUE_4(4,3)
(1X,A5,'  ',F9.3,'  ',F10.3,'   ',F14.3,'   ',F15.3)
/COM,
/COM,-------------------------------------------------------------------------

/OUT
*LIST,vm271,vrt
FINISH