VM303 Input Listing


/COM,ANSYS MEDIA REL. 2024R2 (05/10/2024) REF. VERIF. MANUAL: REL. 2024R2
/VERIFY,VM303
/TITLE,VM303,1-D STEADY-STATE THERMAL CONDUCTION IN A REINFORCED BLOCK
/COM,
/COM, REFERENCE: LATIF M. JIJI, "HEAT CONDUCTION", 3RD ED.
/COM,

/COM, PARAMETER FOR CREATING THE CDB FILES TO STORE GEOMETRY AND MESH DATA
_GEOMGEN = 0     ! SET TO 1 TO WRITE CDB FILES IF ANY INPUT FILE MODIFICATIONS

/OUT,vm303_SCRATCH
!-----------------------------------------------------------------
!!!!! PART 1&2 PREP:
!-----------------------------------------------------------------
/PREP7
*IF,_GEOMGEN,EQ,1,THEN

HEAT = 6         ! HEAT GENERATION IN REINFORCEMENT (W/mm^3)

MP,KXX,1,1       ! THERMAL CONDUCTIVITY OF REINFORCEMENT (W/mm.C)
MP,KXX,2,1.E-09  ! THERMAL CONDUCTIVITY OF BLOCK (NON-CONDUCTOR)

! BLOCK GEOMETRY AND MESHING
BLOCK,0,10,0,10,0,10
ET,1,278
TYPE,1
MAT,2
ESIZE,0.5
MSHAPE,0,3D
MSHKEY,1
VSWEEP,1,1,2
ALLS

! REINFORCEMENT SECTION DEFINITION
SECT,2,REINF,DISC
SECD,1,0.0004,MESH
SECC,,1
SLIST

! REINFORCEMENT (MESH200) GEOMETRY AND MESHING
ET,2,200,2
TYPE,2
MAT,1
SECNUM,2
NUMSTR,LINE,1001
K,1001,0,5,5
K,2001,10,5,5
L,1001,2001     ! LENGTH OF THE 1-D REINFORCEMENT = 10 mm
LESIZE,1001,,,20
LMESH,1001
ALLS

! APPLY HEAT GENERATION ON MESH200
ESEL,S,ENAME,,200
BFE,ALL,HGEN,1,HEAT
ALLS

! EMBEDDED LINK33 GEOMETRY AND MESHING
ET,3,33
TYPE,3
MAT,1
R,2,0.0004
REAL,2
NUMSTR,LINE,1001
K,3001,0,5,5
K,4001,10,5,5
L,3001,4001

LESIZE,1002,,,20
LMESH,1002
ALLS

CDWRITE,db,vm303_1,cdb
*ELSE
 CDREAD,db,vm303_1,cdb
*ENDIF

!-----------------------------------------------------------------
!!!!! PART 1: SOLUTION WITH SOLID278 + REINF264  !!!!!
!-----------------------------------------------------------------

! GENERATE REINFORCING ELEMENTS FROM MESH200
SECNUM,2
EREINF
ALLS

! LIST MAPPED BODY LOADS
ESEL,S,ENAME,,264
BFELIST

! APPLY BOUNDARY TEMPERATURES
NSEL,S,LOC,X,0.0
D,ALL,TEMP,20
ALLS
NSEL,S,LOC,X,10.0
D,ALL,TEMP,80
ALLS

FINI

/SOLU
TIME,1
DELTIM,1
OUTRES,ALL,ALL
ALLS
SOLVE
FINI

/POST1
SET,LAST
/OUT,
ESEL,S,ENAME,,264
PRNSOL,BFE,TEMP

*GET,MIN_GID,ELEM,,EGID,MIN
*GET,MAX_GID,ELEM,,EGID,MAX

*DO,I,MIN_GID,MAX_GID
  *GET,TMIN,MEMBER,I,TEMP,MIN
  *GET,TMAX,MEMBER,I,TEMP,MAX
*ENDDO
/OUT,vm303_SCRATCH,,,append

ALLS
*DIM,LABEL,CHAR,1,1
*DIM,VALUE,,1,3
LABEL(1,1)='TMAX (C)'
*VFILL,VALUE(1,1),DATA,128.00   ! ANALYTICAL RESULT
*VFILL,VALUE(1,2),DATA,TMAX
*VFILL,VALUE(1,3),DATA,ABS(TMAX/128.00)
/COM,
/OUT,vm303,vrt
/COM,------- VM303 1: SOLID278 + REINF264 RESULTS COMPARISON ---------
/COM,
/COM,             |   TARGET   |   Mechanical APDL     |   RATIO
/COM,
*VWRITE,LABEL(1,1),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,'   ',F14.7,'  ',F14.7,'   ',1F15.3)
/COM,-----------------------------------------------------------------
/OUT,vm303_SCRATCH,,,append
FINISH

!-----------------------------------------------------------------
!!!!! PART 2: SOLUTION WITH SOLID278 + LINK33 (2-NODED) !!!!!
!-----------------------------------------------------------------

/CLEAR,NOST
/PREP7
CDREAD,db,vm303_1,cdb

EEMBED

! APPLY HEAT GENERATION ON LINK33
ESEL,S,ENAME,,33
BFE,ALL,HGEN,1,HEAT
ALLS

! LIST MAPPED BODY LOADS
ESEL,S,ENAME,,33
BFELIST

! APPLY BOUNDARY TEMPERATURES
NSEL,S,LOC,X,0.0
D,ALL,TEMP,20
ALLS
NSEL,S,LOC,X,10.0
D,ALL,TEMP,80
ALLS

FINI

/SOLU
TIME,1
DELTIM,1
OUTRES,ALL,ALL
ALLS
SOLVE
FINI

/POST1
SET,LAST
/OUT,
ESEL,S,ENAME,,33
PRNSOL,BFE,TEMP
NSLE
/SHOW
PLNSOL,TEMP
/SHOW,CLOSE
*GET,TMIN,plnsol,0,MIN
*GET,TMAX,plnsol,0,MAX

/OUT,vm303_SCRATCH,,,append

ALLS
*DIM,LABEL,CHAR,1,1
*DIM,VALUE,,1,3
LABEL(1,1)='TMAX (C)'
*VFILL,VALUE(1,1),DATA,128.00   ! ANALYTICAL RESULT
*VFILL,VALUE(1,2),DATA,TMAX
*VFILL,VALUE(1,3),DATA,ABS(TMAX/128.00)
/COM,
/OUT,vm303,vrt,,append
/COM,---- VM303 2: SOLID278 + LINK33 (2-NODED) RESULTS COMPARISON ----
/COM,
/COM,             |   TARGET   |   Mechanical APDL     |   RATIO
/COM,
*VWRITE,LABEL(1,1),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,'   ',F14.7,'  ',F14.7,'   ',1F15.3)
/COM,-----------------------------------------------------------------
/OUT,vm303_SCRATCH,,,append
FINISH

!-----------------------------------------------------------------
!!!!! PART 3&4 PREP:
!-----------------------------------------------------------------

/CLEAR,NOST

_GEOMGEN = 0     ! SET TO 1 TO WRITE CDB FILES IF ANY INPUT FILE MODIFICATIONS

/PREP7
*IF,_GEOMGEN,EQ,1,THEN

HEAT = 6         ! HEAT GENERATION IN REINFORCEMENT (W/mm^3)

MP,KXX,1,1       ! THERMAL CONDUCTIVITY OF REINFORCEMENT (W/mm.C)
MP,KXX,2,1.E-09  ! THERMAL CONDUCTIVITY OF BLOCK (NON-CONDUCTOR)

! BLOCK GEOMETRY AND MESHING
BLOCK,0,10,0,10,0,10
ET,1,279
TYPE,1
MAT,2
ESIZE,0.5
MSHAPE,0,3D
MSHKEY,1
VSWEEP,1,1,2
ALLS

! REINFORCEMENT SECTION DEFINITION
SECT,2,REINF,DISC
SECD,1,0.0004,MESH
SECC,,1
SLIST

! REINFORCEMENT (MESH200) GEOMETRY AND MESHING
ET,2,200,2
TYPE,2
MAT,1
SECNUM,2
NUMSTR,LINE,1001
K,1001,0,5,5
K,2001,10,5,5
L,1001,2001     ! LENGTH OF THE 1-D REINFORCEMENT = 10 mm
LESIZE,1001,,,20
LMESH,1001
ALLS

! APPLY HEAT GENERATION ON MESH200
ESEL,S,ENAME,,200
BFE,ALL,HGEN,1,HEAT
ALLS

! EMBEDDED LINK33 GEOMETRY AND MESHING
ET,3,33
KEYOPT,3,4,1    ! 3-NODED LINK33
TYPE,3
MAT,1
R,2,0.0004
REAL,2
NUMSTR,LINE,1001
K,3001,0,5,5
K,4001,10,5,5
L,3001,4001

LESIZE,1002,,,20
LMESH,1002
ALLS

CDWRITE,db,vm303_2,cdb
*ELSE
 CDREAD,db,vm303_2,cdb
*ENDIF

!-----------------------------------------------------------------
!!!!! PART 3: SOLUTION WITH SOLID279 + REINF264  !!!!!
!-----------------------------------------------------------------

! GENERATE REINFORCING ELEMENTS FROM MESH200
SECNUM,2
EREINF
ALLS

! LIST MAPPED BODY LOADS
ESEL,S,ENAME,,264
BFELIST

! APPLY BOUNDARY TEMPERATURES
NSEL,S,LOC,X,0.0
D,ALL,TEMP,20
ALLS
NSEL,S,LOC,X,10.0
D,ALL,TEMP,80
ALLS

FINI

/SOLU
TIME,1
DELTIM,1
OUTRES,ALL,ALL
ALLS
SOLVE
FINI

/POST1
SET,LAST
/OUT,
ESEL,S,ENAME,,264
PRNSOL,BFE,TEMP

*GET,MIN_GID,ELEM,,EGID,MIN
*GET,MAX_GID,ELEM,,EGID,MAX

*DO,I,MIN_GID,MAX_GID
  *GET,TMIN,MEMBER,I,TEMP,MIN
  *GET,TMAX,MEMBER,I,TEMP,MAX
*ENDDO
/OUT,vm303_SCRATCH,,,append

ALLS
*DIM,LABEL,CHAR,1,1
*DIM,VALUE,,1,3
LABEL(1,1)='TMAX (C)'
*VFILL,VALUE(1,1),DATA,128.00   ! ANALYTICAL RESULT
*VFILL,VALUE(1,2),DATA,TMAX
*VFILL,VALUE(1,3),DATA,ABS(TMAX/128.00)
/COM,
/OUT,vm303,vrt,,append
/COM,------- VM303 3: SOLID279 + REINF264 RESULTS COMPARISON ---------
/COM,
/COM,             |   TARGET   |   Mechanical APDL     |   RATIO
/COM,
*VWRITE,LABEL(1,1),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,'   ',F14.7,'  ',F14.7,'   ',1F15.3)
/COM,-----------------------------------------------------------------
/OUT,vm303_SCRATCH,,,append
FINISH

!-----------------------------------------------------------------
!!!!! PART 4: SOLUTION WITH SOLID279 + LINK33 (3-NODED) !!!!!
!-----------------------------------------------------------------
/CLEAR,NOST
/PREP7
CDREAD,db,vm303_2,cdb

EEMBED

! APPLY HEAT GENERATION ON LINK33
ESEL,S,ENAME,,33
BFE,ALL,HGEN,1,HEAT
ALLS

! LIST MAPPED BODY LOADS
ESEL,S,ENAME,,33
BFELIST

! APPLY BOUNDARY TEMPERATURES
NSEL,S,LOC,X,0.0
D,ALL,TEMP,20
ALLS
NSEL,S,LOC,X,10.0
D,ALL,TEMP,80
ALLS

FINI

/SOLU
TIME,1
DELTIM,1
OUTRES,ALL,ALL
ALLS
SOLVE
FINI

/POST1
SET,LAST
/OUT,
ESEL,S,ENAME,,33
PRNSOL,BFE,TEMP
NSLE
/SHOW
PLNSOL,TEMP
/SHOW,CLOSE
*GET,TMIN,plnsol,0,MIN
*GET,TMAX,plnsol,0,MAX

/OUT,vm303_SCRATCH,,,append

ALLS
*DIM,LABEL,CHAR,1,1
*DIM,VALUE,,1,3
LABEL(1,1)='TMAX (C)'
*VFILL,VALUE(1,1),DATA,128.00   ! ANALYTICAL RESULT
*VFILL,VALUE(1,2),DATA,TMAX
*VFILL,VALUE(1,3),DATA,ABS(TMAX/128.00)
/COM,
/OUT,vm303,vrt,,append
/COM,---- VM303 4: SOLID279 + LINK33 (3-NODED) RESULTS COMPARISON ----
/COM,
/COM,             |   TARGET   |   Mechanical APDL     |   RATIO
/COM,
*VWRITE,LABEL(1,1),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,'   ',F14.7,'  ',F14.7,'   ',1F15.3)
/COM,-----------------------------------------------------------------
/OUT,vm303_SCRATCH,,,append
FINISH

/CLEAR,NOSTART

!-----------------------------------------------------------------
!!!!! PART 5 PREP:
!-----------------------------------------------------------------

_GEOMGEN = 0     ! SET TO 1 TO WRITE CDB FILES IF ANY INPUT FILE MODIFICATIONS

/PREP7
*IF,_GEOMGEN,EQ,1,THEN

MP,KXX,1,1       ! THERMAL CONDUCTIVITY OF REINFORCEMENT (W/mm.C)
MP,RSVX,1,1.E-3  ! ELECTRICAL RESISTIVITY OF REINFORCEMENT (Ohm)

MP,KXX,2,1.E-09  ! THERMAL CONDUCTIVITY OF BLOCK (NON-CONDUCTOR)



! BLOCK GEOMETRY AND MESHING
BLOCK,0,10,0,10,0,10
ET,1,278
TYPE,1
MAT,2
ESIZE,0.5
MSHAPE,0,3D
MSHKEY,1
VSWEEP,1,1,2
ALLS

! REINFORCEMENT SECTION DEFINITION
SECT,2,LINK
SECD,0.0004
SLIST

! REINFORCEMENT (LINK228) GEOMETRY AND MESHING
ET,2,228,110,,,0   ! 2-NODED LINK228
TYPE,2
MAT,1
SECNUM,2
NUMSTR,LINE,1001
K,1001,0,5,5
K,2001,10,5,5
L,1001,2001     ! LENGTH OF THE 1-D REINFORCEMENT = 10 mm
LESIZE,1001,,,20
LMESH,1001
ALLS

EEMBED

CDWRITE,db,vm303_3,cdb
*ELSE
 CDREAD,db,vm303_3,cdb
*ENDIF

!-----------------------------------------------------------------
!!!!! PART 5: SOLUTION WITH SOLID278 + LINK228 2-NODED  !!!!!
!-----------------------------------------------------------------


! APPLY BOUNDARY TEMPERATURES
NSEL,S,LOC,X,0.0
D,ALL,TEMP,20
ALLS
NSEL,S,LOC,X,10.0
D,ALL,TEMP,80
ALLS

! APPLY BOUNDARY POTENTIAL DIFFERENCE
ESEL,S,ENAME,,228
NSEL,R,LOC,X,0.0
D,ALL,VOLT,0
ALLS
ESEL,S,ENAME,,228
NSEL,R,LOC,X,10.0
D,ALL,VOLT,0.7746
ALLS

FINI

/SOLU
TIME,1
DELTIM,1
OUTRES,ALL,ALL
ALLS
SOLVE
FINI

/POST1
SET,LAST
/OUT,
ESEL,S,ENAME,,228
/COM, ----------------------------------------------------
/COM,   JOULE HEAT/VOLUME PER ELEMENT LINK228 (2-NODED)
/COM, ----------------------------------------------------
PRESOL,JHEAT
/OUT,vm303_SCRATCH,,,append
NSLE
/SHOW
PLNSOL,TEMP
/SHOW,CLOSE
*GET,TMIN,plnsol,0,MIN
*GET,TMAX,plnsol,0,MAX

ALLS
*DIM,LABEL,CHAR,1,1
*DIM,VALUE,,1,3
LABEL(1,1)='TMAX (C)'
*VFILL,VALUE(1,1),DATA,128.00   ! ANALYTICAL RESULT
*VFILL,VALUE(1,2),DATA,TMAX
*VFILL,VALUE(1,3),DATA,ABS(TMAX/128.00)
/COM,
/OUT,vm303,vrt,,append
/COM,---- VM303 5: SOLID278 + LINK228 (2-NODED) RESULTS COMPARISON ----
/COM,
/COM,             |   TARGET   |   Mechanical APDL     |   RATIO
/COM,
*VWRITE,LABEL(1,1),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,'   ',F14.7,'  ',F14.7,'   ',1F15.3)
/COM,-----------------------------------------------------------------
/OUT,vm303_SCRATCH,,,append
FINISH

/CLEAR,NOSTART

!-----------------------------------------------------------------
!!!!! PART 6 PREP:
!-----------------------------------------------------------------

_GEOMGEN = 0     ! SET TO 1 TO WRITE CDB FILES IF ANY INPUT FILE MODIFICATIONS

/PREP7
*IF,_GEOMGEN,EQ,1,THEN

MP,KXX,1,1       ! THERMAL CONDUCTIVITY OF REINFORCEMENT (W/mm.C)
MP,RSVX,1,1.E-3  ! ELECTRICAL RESISTIVITY OF REINFORCEMENT (Ohm)

MP,KXX,2,1.E-09  ! THERMAL CONDUCTIVITY OF BLOCK (NON-CONDUCTOR)



! BLOCK GEOMETRY AND MESHING
BLOCK,0,10,0,10,0,10
ET,1,279
TYPE,1
MAT,2
ESIZE,0.5
MSHAPE,0,3D
MSHKEY,1
VSWEEP,1,1,2
ALLS

! REINFORCEMENT SECTION DEFINITION
SECT,2,LINK
SECD,0.0004
SLIST

! REINFORCEMENT (LINK228) GEOMETRY AND MESHING
ET,2,228,110,,,1   ! 3-NODED LINK228
TYPE,2
MAT,1
SECNUM,2
NUMSTR,LINE,1001
K,1001,0,5,5
K,2001,10,5,5
L,1001,2001     ! LENGTH OF THE 1-D REINFORCEMENT = 10 mm
LESIZE,1001,,,20
LMESH,1001
ALLS

EEMBED

CDWRITE,db,vm303_4,cdb
*ELSE
 CDREAD,db,vm303_4,cdb
*ENDIF


!-----------------------------------------------------------------
!!!!! PART 6: SOLUTION WITH SOLID279 + LINK228 3-NODED  !!!!!
!-----------------------------------------------------------------

! APPLY BOUNDARY TEMPERATURES
NSEL,S,LOC,X,0.0
D,ALL,TEMP,20
ALLS
NSEL,S,LOC,X,10.0
D,ALL,TEMP,80
ALLS

! APPLY BOUNDARY POTENTIAL DIFFERENCE
ESEL,S,ENAME,,228
NSEL,R,LOC,X,0.0
D,ALL,VOLT,0
ALLS
ESEL,S,ENAME,,228
NSEL,R,LOC,X,10.0
D,ALL,VOLT,0.7746
ALLS

FINI

/SOLU
TIME,1
DELTIM,1
OUTRES,ALL,ALL
ALLS
SOLVE
FINI

/POST1
SET,LAST
/OUT,
ESEL,S,ENAME,,228
/COM, ----------------------------------------------------
/COM,   JOULE HEAT/VOLUME PER ELEMENT LINK228 (3-NODED)
/COM, ----------------------------------------------------
PRESOL,JHEAT
/OUT,vm303_SCRATCH,,,append
NSLE
/SHOW
PLNSOL,TEMP
/SHOW,CLOSE
*GET,TMIN,plnsol,0,MIN
*GET,TMAX,plnsol,0,MAX

ALLS
*DIM,LABEL,CHAR,1,1
*DIM,VALUE,,1,3
LABEL(1,1)='TMAX (C)'
*VFILL,VALUE(1,1),DATA,128.00   ! ANALYTICAL RESULT
*VFILL,VALUE(1,2),DATA,TMAX
*VFILL,VALUE(1,3),DATA,ABS(TMAX/128.00)
/COM,
/OUT,vm303,vrt,,append
/COM,---- VM303 6: SOLID279 + LINK228 (3-NODED) RESULTS COMPARISON ----
/COM,
/COM,             |   TARGET   |   Mechanical APDL     |   RATIO
/COM,
*VWRITE,LABEL(1,1),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,'   ',F14.7,'  ',F14.7,'   ',1F15.3)
/COM,-----------------------------------------------------------------
/OUT
FINISH
*LIST,vm303,vrt
/OUT,vm303_SCRATCH,,,append