Special Topics in CFD

A. W. Date Mechanical Engineering Department Indian Institute of Technology, Bombay Mumbai - 400076 India

April 3, 2007

1D-Conduction with and without Phase-Change
Governing Equation: ∂ ∂x kA ∂T ∂x =ρA ∂e ∂t (1)

1. Without phase-change ≡ Pure Conduction: e = h = C ( T - Tref ) - a continuous function of T Steady or Unsteady 2. With phase-change ≡ Solidifiaction/Melting: e = h = F ( T ) - a dis-continuous function of T Always Unsteady Problems with discontinuous fluid/flow properties occur in many situations: Shocks, Flow of two or more immiscible fluids, phase-change ( Ex: gas-solid, gas-liquid, liquid-solid )

Grid Layout PRACTICE A Xc 1.2 3 4 5 6 7 8 9 X 1 2 3 4 5 6 7 8 N=9 PRACTICE B CELL .FACE 1.2 3 4 5 6 7 8 9 1 2 3 4 5 6 NODE 7 8 N=9 .Pure Conduction .

Typical Node P ∆X W w P e E ∆X w ∆X e n o e w ∂ ∂x kA ∂T ∂x n e dx dt = P o w ρA ∂e |P dx dt ∂t (2) .

IOCV or Finite Volume Discretization ρ ∆V C n |P + ψ ( AE + AW ) ∆t n n n +S + AW TW = ψ AE TE TP (3) AE kA kA |e AW = |w ∆x ∆x o o + AW TW S = ( 1 − ψ ) AE TE ρ ∆V C o |P − ( 1 − ψ ) ( AE + AW ) + ∆t = (4) o TP (5) 1.Semi-Explict . ψ = 0 .Unconditionally Stable for ψ ≥ 0. ψ = 1 .Unconditionally Stable .5 3.Explicit . 0 < ψ < 1 .Implicit .Conditionally Stable 2.

. Boundary conditions at i = 1 and i = N are required. 3. ..1. n n n + S (6) TP = AE TE + AW TW APi Ti Si APi = AEi Ti +1 + AWi Ti −1 + Si ρ ∆Vi Cio o = Ti ∆t ρ ∆Vi Cin = AEi + AWi + ∆t (7) Solved by TDMA for i = 2. N . . .Implicit Formulation ψ = 1 ρ ∆V C n |P + AE + AW ∆t or.

T ( 0. t ) = Tsup . (8) . t ) = Tw and T (∞.1-D Phase-Change Problem T sup Tl SOLID Tm Ts INTERFACE LIQUID Tw Xi ( t ) X ∂ ∂T ∂ (ρ h) = (K ) ∂t ∂x ∂x with T ( x . 0 ) = Tsup .

Equation of State . Cps = Cpl = Cp and Ks = Kl = K hl h hs λ SOLID Tm LIQUID T .I Uniform properties Assumed: ρs = ρl = ρ.

Von-Neumann .Exact Solution Interface condition: T = Tm at x = Xi and ks ∂ Ts /∂ x |Xi − kl ∂ Tl /∂ x |Xi = ρ λ d Xi /dt √ erf (x / 4 αs t ) Ts − T m √ = 1− Tw − T m erf (Xi / 4 αs t ) √ erfc (x / 4 αl t ) Tl − T m √ =1− Tsup − Tm erfc (Xi / 4 αl t ) √ √ or Xi = C t Xi ∝ t Determination of C ρλC 2 Tm − T w C2 Ks √ exp (− ) √ 4 αs erf (C / 4 αs ) π αs Tm − Tsup Kl C2 √ exp (− ) √ 4 αl erfc (C / 4 αl ) π αl (9) (10) (11) = + (12) .

Equation of State .II Table: Equations of State State Solid Liquid Interface T=f(h) T = h / Cp for h < hs T = (h − λ) / Cp for h > hl T = Tm for hs < h < hl h=f(T) h = Cp T for T < Tm h = Cp T + λ for T > Tm h = Cp Tm + hps (t ) t +∆t (d hps / d t ) d t = λ t .

Numerical Solution-I Define h − hs dimensionless enthalpy λ Cp (T − Tm ) dimensionless temperature λ αt dimensionless time L2 x dimensionless length L ∂ (ρ h) ∂ ∂T = (K ) → ∂t ∂x ∂x ∂Φ ∂2θ = ∂τ ∂X 2 Φ = θ = τ X = = (13) (14) (15) (16) (17) .

II Use T = F ( h ) θ = Φ θ = 0 θ = Φ−1 Uniform Grid Φlj +1 = for 0 ≤ Φ ≤ 1 for Φ ≤ 0 solid interface liquid (18) (19) (20) for Φ ≥ 1 ∆τ o +1 (θ l +1 − 2 θjl +1 + θjl − 1 ) + Φj ∆X 2 j +1 (21) .Numerical Solution .

Solve equation 21 once using Gauss-Seidel method to obtain Φlj +1 distribution. 6. evaluate Φo j . At τ = 0. Determine θjl +1 using equations of state 18 to 20 and return to step 3 to carry out the next iteration 5. After a few iterations.Numerical Solution by Gauss-Seidel Solution Procedure 1. 4. change in Φ lj +1 between successive iterations will be small and convergence is obtained. specify initial condition θ jo for j = 1 to N. Choose ∆τ to begin a new step. o Hence. Set Φo j = Φj and return step 2 to execute the next time step . 3. Set θj = θj 2.

0 -3.25 1. 2. K = 2 W / m .0 T ( x = 0.2 0. ∆τ /∆X 2 = 0.0 5 10 DAYS 15 20 St = Cp (Tw − Tm )/λ. Cp = 2. 0 ) =Tsup = 2 C and.Solution by Gauss-Seidel Problem ρ = 1 kg /m 3 .5 MJ / kg .0 -4.02 ( or N = 52 ). L = 1 m.5 m ) ∆ X = 0.0769 EXACT -2. .0 -1.0 St = 0. Tm = 0 C. λ = 100 MJ / kg. T (x. Tw = T (0.0 ∆ X = 0. t ) = −10 C.K.K.2 Excellent Agreement when ∆X = 0.

Point-by-point solution requires book-keeping of phase-change nodes and a large computer time when fine grid is used How to enable use of TDMA without book keeping and obtain accurate solutions on coarse grids ? . that is when ∆X → 0 3. Waviness reduces on fine grid.Shortcomings of GS 1. Solutions are wavy on coarse grid 2. Waviness does not reduce when ∆τ is reduced 4.

θ = 0 . 0 < Φ < 1 ) .Why Waviness ? Xi ( t ) SOLID j-1 j LIQUID j+1 ∆x Throghout the transition of the interface in the control volume ( that is.

For N = 52. Waviness persists on coarse grids because θ = 0 for 0 < Φ < 1 but book-keeping not required 2.Solution by TDMA θ =Φ+Φ Φ = 1 [ | 1 − Φ | − | Φ | − 1] 2 (22) PDE → ∆τ ) Φl +1 = ∆X 2 j Sj = ∂Φ ∂2Φ ∂2Φ = + ∂τ ∂X 2 ∂X 2 (23) (1 + 2 ∆τ 1 (Φl +1 + Φlj + −1 ) + Sj ∆X 2 j +1 ∆τ (Φ − 2 Φj + Φj −1 ) + Φo j (24) ∆X 2 j +1 1. TDMA is 2.5 times faster than GS .

. that is when Φ < 0 and Φ > 1.Accurate Solutions on Coarse Grid Using TDMA Define θ = Φ + Φ” Φ” = Φ + θpc (25) (1 + 2 ∆τ ) Φl +1 = ∆X 2 j + ∆τ 1 (Φl +1 + Φlj + −1 ) ∆X 2 j +1 ∆τ ” o (Φ” − 2 Φ” j + Φj −1 ) + Φj (26) ∆X 2 j +1 θpc = 0 in single phase region.

θpc .j = 5.5+Φpc .j θj −1 for ∆Xi > 0 θj +1 for ∆Xi < 0 4. θpc .j ) ∆X = (0.j = 3.j |+1 .5 + Φpc .j ) ∆X | A |) θj −1 − (A − | A |) θj +1 F = − (1−Φjj ) Φjj (1+Φ ) Φ | 0. Define ∆Xi = Xi − Xj 2.5 − Φpc .j = 6.5+Φpc . θpc . ∆Xi = Xi − Xj = (0. A = ∆Xi ∆Xi +∆X | ∆Xi | | ∆Xi |+∆X F (A + 2 0.Evaluation of θpc Xi ( t ) SOLID j-1 j LIQUID j+1 ∆x 1.

5 m ) -10 St = 3.5 m ) -1.0 N = 13 T ( 0.25 0.0 2.0 -50 0.0 N = 15 -20 -10 -30 -40 -20 DAYS 0.0 5 10 15 20 EXACT -2.0 5.0 -2 .0 St = 0.0 NUMERICAL -3.0 0.Accurate Solutions on Coarse Grids-I 1.0 1.0 N = 7 T ( 0.5 5.0 NUMERICAL -3.0 DAYS 5 10 15 20 0 0 St = 1.0 EXACT 1.0 7.5 10.0 DAYS 4.5 m ) T ( 0.0 .0 3.25 DAYS T ( 0.0 2.5 m ) N = 15 -1.0 St = 0.

0 5 10 15 20 .25 0.8 St = 1.4 0.0 St = 0.2 DAYS 0.6 Xi ( t ) 0.0 0.Accurate Solutions on Coarse Grids-II St = 3.

Problems with discontinuities require special procedures 2.Conclusions 1. problems such as waviness disappear at the expense of heavy penalty in computer time 3. Methods to remove numerical pathologies on coarse grids must be found by attending to Physics underlying the phenomena. If fine grids are used. .