ME 608 Numerical Methods in Heat, Mass, and Momentum Transfer · PDF...

6
ME 608 Numerical Methods in Heat, Mass, and Momentum Transfer Mid-Term Examination Solution Date: March 10, 2010 6:00 – 8:00 PM Instructor: J. Murthy Open Book, Open Notes Total: 100 points 1. Consider steady 1D conduction in a 1D domain consisting of 3 equal-sized cells as shown in Fig. 1. The right boundary (x=0) is irradiated with a radiative heat flux given by: q 0 = εσ ( T 4 - T 4 ) while the right boundary (x = L) is held at a constant temperature T = T b . The thermal conductivity k is constant. (a) Using the finite volume method, develop nominally-linear discrete equations for the unknown temperatures T 0 , T 1 , T 2 and T 3 . Indicate current iterate values with a * superscript. (b) Develop a discrete equation for the unknown boundary flux at x = L, q L . (c) Describe step by step how you would solve this problem to obtain numerical values of the discrete temperatures and the boundary heat flux. Do not attempt to actually solve the problem. 0 1 2 3 4 x q 0 T= T b Figure 1: Computational Domain for Problem 1 Linearize q 0 as: q 0 = q * 0 + q 0 T 0 * (T 0 - T * 0 ) = ( εσ T *4 + 3εσ T *4 0 ) - 4εσ T *3 0 T 0 = S C + S P T 0 where S C = ( εσ T *4 + 3εσ T *4 0 ) S P = -4εσ T *3 0 1

Transcript of ME 608 Numerical Methods in Heat, Mass, and Momentum Transfer · PDF...

Page 1: ME 608 Numerical Methods in Heat, Mass, and Momentum Transfer · PDF file10.03.2010 · ME 608 Numerical Methods in Heat, Mass, and Momentum Transfer Mid-Term Examination Solution

ME 608Numerical Methods in Heat, Mass, and Momentum Transfer

Mid-Term Examination SolutionDate: March 10, 20106:00 – 8:00 PMInstructor: J. MurthyOpen Book, Open NotesTotal: 100 points

1. Consider steady 1D conduction in a 1D domain consisting of 3 equal-sized cells as shown in Fig. 1. The right boundary(x=0) is irradiated with a radiative heat flux given by:

q0 = εσ(T 4

∞ −T 4)while the right boundary (x = L) is held at a constant temperature T = Tb. The thermal conductivity k is constant.

(a) Using the finite volume method, develop nominally-linear discrete equations for the unknown temperatures T0,T1, T2 and T3. Indicate current iterate values with a * superscript.

(b) Develop a discrete equation for the unknown boundary flux at x = L, qL.

(c) Describe step by step how you would solve this problem to obtain numerical values of the discrete temperaturesand the boundary heat flux. Do not attempt to actually solve the problem.

0 1 2 3 4

x

q0

T= Tb

Figure 1: Computational Domain for Problem 1

Linearize q0 as:

q0 = q∗0 +

∂q0

∂T0

∗(T0 −T ∗

0 )

=(εσT ∗4

∞ +3εσT ∗40

)−4εσT ∗3

0 T0

= SC +SPT0

where

SC =(εσT ∗4

∞ +3εσT ∗40

)SP = −4εσT ∗3

0

1

Page 2: ME 608 Numerical Methods in Heat, Mass, and Momentum Transfer · PDF file10.03.2010 · ME 608 Numerical Methods in Heat, Mass, and Momentum Transfer Mid-Term Examination Solution

(a) The discrete equations for the boundary face and cell temperatures are given below.

Boundary Face 0

q0 =T0 −T1

∆x= SC +SPT0

T0

(−SP +

2k∆x

)=

2k∆x

T1 +SC

Cell 1

q0 =k

∆x(T1 −T2)

k∆x

T1 =k

∆xT2 +SC +SPT0

Cell 2

2k∆x

T2 =k

∆xT1 +

k∆x

T3

Cell 3

3k∆x

T3 =2k∆x

Tb +k

∆xT2

(b) The right boundary heat flux qb may be found from

qb =2k∆x

(T3 −Tb)

(c) The problem is non-linear because of the radiative boundary condition. So the solution procedure requires iteration,and is given below.

(a) Guess the boundary temperature T0. This is the current iterate T ∗0 .

(b) Evaluate SC and SP from T ∗0 .

(c) Find the discrete coefficients for all the cells.

(d) Use a TDMA to solve the cell temperature and boundary face temperature.

(e) Check for convergence. If converged, stop. If not, go to Step 2.

2

Page 3: ME 608 Numerical Methods in Heat, Mass, and Momentum Transfer · PDF file10.03.2010 · ME 608 Numerical Methods in Heat, Mass, and Momentum Transfer Mid-Term Examination Solution

2. Consider diffusion in the 1D computational domain of length L with two cells, as shown in shown in Fig. 2. Cell 2 hasa heat source S in it. The left boundary of the domain is insulated, while the right boundary loses heat commensuratewith the heat generation, i.e.,

q =∫

LSdx

where q is the heat flux leaving the domain. The thermal conductivity k is constant. The mesh may be assumed uniform,with a mesh spacing ∆x.

Develop discrete equations for the temperatures T1 and T2 for the following 3 cases.

(a) Steady state, S=constant.

(b) Steady state, S = A−BT , A > 0, B > 0

(c) Unsteady state, S=constant. Use the fully-implicit scheme, and develop the discrete equations for time t + ∆tgiven the discrete temperatures T 0 at time t.

In each case, answer the following questions:

(a) Can you use a direct solver to solve your discrete equation set? Why or why not? State your reasons clearly.

(b) Can you use an iterative solver to solve you discrete equation set? Why or why not? State your reasons clearly.

1 2

x

Heat Source S

Adiabaticq

Figure 2: Computational Domain for Problem 2

Cases (a) and (b)

Cell 1

k∆x

(T1 −T2) = 0

T1 = T2

Cell 2

k∆x

(T1 −T2)+S∆x−S∆x = 0

T1 = T2

The above is still true even if S = A−BT . Thus, the two cell equations are not linearly independpent and therefore theresulting discrete set cannot be solved using a direct method. It can be solved using an iterative method, but T1 and T2

3

Page 4: ME 608 Numerical Methods in Heat, Mass, and Momentum Transfer · PDF file10.03.2010 · ME 608 Numerical Methods in Heat, Mass, and Momentum Transfer Mid-Term Examination Solution

are unique only upto an additive constant, i.e., only T1 −T2 may be uniquely determined. The Scarborough criterion isonly satisfied in the equality, and so convergene is not guaranteed unless under-relaxation is used.

Case (c)

For Case c, the governing equation is

ρCp∂T∂ t

= ∇ · k∇T +S

Discretizing using a fully-implicit scheme, we have the following.

Cell 1

ρCp∆x∆t

(T1 −T 0

1)

=k

∆x(T2 −T1)

T1

(ρCp∆x

∆t+

k∆x

)=

k∆x

T2 +ρCp∆x

∆tT 0

1

Cell 2

ρCp∆x∆t

(T2 −T 0

2)

= −q+k

∆x(T1 −T2)+S∆x

= +k

∆x(T1 −T2)

T2

(ρCp∆x

∆t+

k∆x

)=

k∆x

T1 +ρCp∆x

∆tT 0

2

These two equations are linearly independent and can be solved using a direct method. The presence of the a0P term

gives them linear independence. They can also be solved using an iterative method. The equations have diagonaldominance, and the Scarborough criterion is satisfied, again because of the ap

0 term. Therefore, convergence of thelinear system using an iterative solver is guaranteed in each time step.

4

Page 5: ME 608 Numerical Methods in Heat, Mass, and Momentum Transfer · PDF file10.03.2010 · ME 608 Numerical Methods in Heat, Mass, and Momentum Transfer Mid-Term Examination Solution

3. Consider steady convection of a scalar variable φ in the 1-D domain shown below. At the x = 0 boundary, a mass fluxm”

0 kg/m2s enters the domain, bringing in φ with a value φ = φ0. Diffusion may be ignored.

(a) Consider the case when there is a volumetric mass source ms kg/m3s in the domain,bringing in φ with a valueφ = φs.

i. Derive the discrete equations for points 1,2 and 3 using the first-order upwind difference scheme on the meshshown in Fig. 3. The control volume faces are denoted by f 0, f 1, f 2 and f 3. Comment on the discreteequations in terms of the boundedness of the solution and the satisfaction of the Scarborough criterion

ii. Compute the numerical values of φ at the points 1, 2 and 3.

(b) Now consider the case when there is a volumetric mass sink ms kg/m3s in the domain. Assume that the massloss is at the local value φ(x).

i. Derive the discrete equations for points 1, 2 and 3 using the first-order upwind difference scheme on themesh shown in Fig. 3. Comment on the discrete equations in terms of the boundedness of the solution andthe satisfaction of the Scarborough criterion

ii. Compute the numerical values of φ at the points 1, 2 and 3.

For the purposes of computation, you may assume:

m”0 = 10 φ0 = 1.0, ∆x = 1.0

ms = 1.0 and φs = 0.5

Assume all units are consistent so that no unit conversions need be performed.

x∆

x

m"0

φ0

∆ y =1.01 2 3

f1 f2 f3f0

Figure 3: Computational Domain for Problem 3

First write the continuity equation:dm”

dx= ms

Integrate the continuity equation to findm” = m”

0 + msx

Thus at the control volume faces we have:

m”1 = m”

0 + ms∆x

m”2 = m”

1 + ms∆x

m”3 = m”

2 + ms∆x

5

Page 6: ME 608 Numerical Methods in Heat, Mass, and Momentum Transfer · PDF file10.03.2010 · ME 608 Numerical Methods in Heat, Mass, and Momentum Transfer Mid-Term Examination Solution

(a)(i)The numerical values of the face mass flow rates are:

m”0 = 10

m”1 = 11

m”2 = 12

m”3 = 13

Now write cell balances for cells 1,2 and 3 using first-order upwind scheme and no diffusion term:

m”0φ0 + msφs∆x =

(m”

0 + ms∆x)

φ1

m”1φ1 + msφs∆x =

(m”

1 + ms∆x)

φ2

m”2φ2 + msφs∆x =

(m”

2 + ms∆x)

φ3

We see that because of continuity, the value of φ in any cell will come out to be the weighted average of the upwind cell’sφ and φs; the weighting factors are related to the mass flow rates associated with each ”neighbor” φ . The Scarboroughcriterion is satisfied in the inequality at all points, and therefore iterative schemes are guaranteed to converge.(a)(ii) We can sweep the mesh from cell 1 to cell 3 to find:

φ1 = 0.9545φ2 = 0.9166φ3 = 0.8846

(b) (i) The numerical values of the face mass flow rates are:

m”0 = 10m”

1 = 9m”

2 = 8m”

3 = 7

Now write cell balances for cells 1,2 and 3 using first-order upwind scheme and no diffusion term:

m”0φ0 −|ms|φ1∆x =

(m”

0 −|ms|∆x)

φ1

m”1φ1 −|ms|φ2∆x =

(m”

1 −|ms|∆x)

φ2

m”2φ2 −|ms|φ3∆x =

(m”

2 −|ms|∆x)

φ3

We can move the φP term on the LHS to the right to get:

m”0φ0 = m”

0φ1

m”1φ1 = m”

1φ2

m”2φ2 = m”

2φ3

We see that the value of φ in any cell will come out to be value of φ in the upwind cell. The Scarborough criterionis satisfied in the equality in cells 2 and 3 , and in the inequality in cell 1 because the upwind cell value φ0 is known.Therefore iterative schemes are guaranteed to converge.(b)(ii) We can sweep the mesh from cell 1 to cell 3 to find:

φ1 = 1.0φ2 = 1.0φ3 = 1.0

The answer should not be surprising. If you have a hole in a bucket of water at temperature T, the leakage will notcause the temperature of the water in the bucket to drop!

6