/COM,ANSYS MEDIA REL. 2024R2 (05/10/2024) REF. VERIF. MANUAL: REL. 2024R2
/VERIFY,VM226
/TITLE,VM226,1D ADVECTION DIFFUSION PROBLEM
/COM,
/COM, REFERENCE: ANY STANDARD FLUID DYNAMICS OR HEAT TRANSFER
/COM, TEXTBOOK WITH DIFFUSION EQUATION
/COM,
/COM, USING PLANE238 ELEMENTS
/COM,
D=0.01 ! DIFFUSIVITY, m^2/s
V=0.01 ! TRANSPORT VELOCITY, m/s
/PREP7
ET,1,PLANE238 ! 2D 8 NODE DIFFUSION ELEMENT
MP,DXX,1,D
RECT,0,1,0,0.1
TYPE,1
MAT,1
ESIZE,0.1
AMESH,ALL
NSEL,S,LOC,X,0
D,ALL,CONC,0
NSEL,S,LOC,X,1
D,ALL,CONC,1
ALLSEL,ALL
BF,ALL,VELO,V ! TRANSPORT VELOCITY
FINISH
/SOLUTION
ANTYPE,STATIC
KBC,1
TIME,1.0
OUTRES,ALL,ALL
/OUT,SCRATCH
SOLVE
FINISH
/POST1
SET,LAST
PLNSOL,CONC ! NODAL CONCENTRATION VALUES AT TIME = 1.0seconds
TNODE=NODE(0.5,0,0)
CONST=V/D
EXPECTED=(1.-EXP(.5*CONST))/(1.-EXP(1.*CONST))
*GET,NVAL,NODE,TNODE,CONC
*DIM,VALUE,,1,3
*DIM,LABEL,CHAR,1,1
LABEL(1,1) = 'CONC'
*VFILL,VALUE(1,1),DATA,EXPECTED
*VFILL,VALUE(1,2),DATA,NVAL
*VFILL,VALUE(1,3),DATA,ABS(EXPECTED/NVAL)
SAVE,TABLE_1
FINISH
/CLEAR,NOSTART
/OUT,
/COM,
/COM, USING PLANE223 ELEMENTS
/COM,
/TITLE,VM226,1D ADVECTION DIFFUSION PROBLEM
/PREP7
ET,1,PLANE223,100001 ! COUPLED STRUCTURAL DIFFUSION ELEMENT
D=0.01 ! DIFFUSIVITY, m^2/s
V=0.01 ! TRANSPORT VELOCITY, m/s
ACCELX=1E9 ! ACCELERATION, m/sec^2
T=200 ! TEMPERATURE, C
Toff=273 ! TEMPERATURE OFFSET FROM ABSOLUTE ZERO TO ZERO
MP,DXX,1,D
MP,EX,1,1E9
MP,NUXY,1,0.0
MP,DENS,1,1
V_k=3*V*(T+Toff)/ACCELX/D ! STRESS-MIGRATION = C*D*V*ACCELX/(k*(t+toff))/3
TB,MIGR,1
TBDATA,1,,V_k
RECT,0,1,0,0.1
TYPE,1
MAT,1
ESIZE,0.1
AMESH,ALL
NSEL,S,LOC,X,0
D,ALL,CONC,0
D,ALL,UX,0
NSEL,S,LOC,X,1.0
D,ALL,CONC,1
ALLSEL,ALL
NSEL,S,LOC,Y,0
NSEL,A,LOC,Y,0.1
D,ALL,UY,0
ALLSEL,ALL
TOFFST,Toff
BF,ALL,TEMP,T
ACEL,ACCELX
FINISH
/SOLUTION
ANTYPE,STATIC
KBC,1
TIME,1.0
OUTRES,ALL,ALL
/OUT,SCRATCH
SOLVE
FINISH
/POST1
SET,LAST
PLNSOL,CONC ! NODAL CONCENTRATION VALUES AT TIME = 1.0seconds
TNODE=NODE(0.5,0,0)
CONST=V/D
EXPECTED=(1.-EXP(.5*CONST))/(1.-EXP(1.*CONST))
*GET,NVAL,NODE,TNODE,CONC
*DIM,VALUE,,1,3
*DIM,LABEL,CHAR,1,1
LABEL(1,1) = 'CONC'
*VFILL,VALUE(1,1),DATA,EXPECTED
*VFILL,VALUE(1,2),DATA,NVAL
*VFILL,VALUE(1,3),DATA,ABS(EXPECTED/NVAL)
SAVE,TABLE_2
FINISH
RESUME,TABLE_1
/COM,
/OUT,vm226,vrt
/COM,
/COM, -------------------------VM226 RESULTS COMPARISON-------------------
/COM,
/COM,
/COM, | TARGET | Mechanical APDL | RATIO
/COM,
/COM,
/COM, USING PURE DIFFUSION ELEMENTS - PLANE238
/COM,
/COM,
*VWRITE,LABEL(1,1),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(2X,A8,' ',F10.3,' ',F10.3,' ',F10.3)
/COM,
/COM,
/NOPR
RESUME,TABLE_2
/GOPR
/COM,
/COM, USING COUPLED STRUCTURAL DIFFUSION ELEMENTS - PLANE223
/COM,
/COM,
*VWRITE,LABEL(1,1),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(2X,A8,' ',F10.3,' ',F10.3,' ',F10.3)
/COM,
/COM,
/COM, ---------------------------------------------------------------------
/OUT,
*list,vm226,vrt
FINISH