ME 68 Numerical Methods in Heat, Mass, and Momentum Transfer Mid-Term Examination Solution Date: March 1, 21 6: 8: PM Instructor: J. Murthy Open Book, Open Notes Total: 1 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=) is irradiated with a radiative heat flux given by: q = εσ ( 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, 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. q 1 2 3 4 T= T b x Linearize q as: Figure 1: Computational Domain for Problem 1 q = q + q (T T ) T = ( εσt 4 + 3εσT 4 ) 4εσT 3 = S C + S P T T where S C = ( εσt 4 S P = 4εσT 3 + 3εσT 4 ) 1
(a) The discrete equations for the boundary face and cell temperatures are given below. Boundary Face Cell 1 q = T T 1 x = S C + S P T ( T S P + 2k ) = 2k x x T 1 + S C Cell 2 Cell 3 (b) The right boundary heat flux q b may be found from q = k x (T 1 T 2 ) k x T 1 = k x T 2 + S C + S P T 2k x T 2 = k x T 1 + k x T 3 3k x T 3 = 2k x T b + k x T 2 q b = 2k x (T 3 T b ) (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 T. This is the current iterate T. (b) Evaluate S C and S P from T. (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
2. Consider diffusion in the 1D computational domain of length L with two cells, as shown in shown in Fig. 2. Cell 2 has a heat source S in it. The left boundary of the domain is insulated, while the right boundary loses heat commensurate with the heat generation, i.e., q = Sdx L 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 T 1 and T 2 for the following 3 cases. (a) Steady state, S=constant. (b) Steady state, S = A BT, A >, B > (c) Unsteady state, S=constant. Use the fully-implicit scheme, and develop the discrete equations for time t + given the discrete temperatures T 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. Adiabatic Heat Source S 1 2 q x Figure 2: Computational Domain for Problem 2 Cases (a) and (b) Cell 1 k x (T 1 T 2 ) = T 1 = T 2 Cell 2 k x (T 1 T 2 ) + S x S x = T 1 = T 2 The above is still true even if S = A BT. Thus, the two cell equations are not linearly independpent and therefore the resulting discrete set cannot be solved using a direct method. It can be solved using an iterative method, but T 1 and T 2 3
are unique only upto an additive constant, i.e., only T 1 T 2 may be uniquely determined. The Scarborough criterion is only satisfied in the equality, and so convergene is not guaranteed unless under-relaxation is used. Case (c) For Case c, the governing equation is T ρc p = k T + S t Discretizing using a fully-implicit scheme, we have the following. Cell 1 Cell 2 ρc p x ( T1 T ) 1 ( ρcp x T 1 + k ) x = k x (T 2 T 1 ) = k x T 2 + ρc p x T1 ρc p x T 2 ( ρcp x ( T2 T2 ) + k x ) = q + k x (T 1 T 2 ) + S x = + k x (T 1 T 2 ) = k x T 1 + ρc p x T2 These two equations are linearly independent and can be solved using a direct method. The presence of the a P term gives them linear independence. They can also be solved using an iterative method. The equations have diagonal dominance, and the Scarborough criterion is satisfied, again because of the a p term. Therefore, convergence of the linear system using an iterative solver is guaranteed in each time step. 4
3. Consider steady convection of a scalar variable φ in the 1-D domain shown below. At the x = boundary, a mass flux m kg/m2 s enters the domain, bringing in φ with a value φ = φ. Diffusion may be ignored. (a) Consider the case when there is a volumetric mass source ṁ s kg/m 3 s 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 mesh shown in Fig. 3. The control volume faces are denoted by f, f 1, f 2 and f 3. Comment on the discrete equations 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 ṁ s loss is at the local value φ(x). kg/m 3 s in the domain. Assume that the mass i. Derive the discrete equations for points 1, 2 and 3 using the first-order upwind difference scheme on the mesh shown in Fig. 3. Comment on the discrete equations 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. For the purposes of computation, you may assume: m = 1 φ = 1., x = 1. ṁ s = 1. and φ s =.5 Assume all units are consistent so that no unit conversions need be performed. x m" f 1 2 3 f1 f2 f3 y =1. φ x Figure 3: Computational Domain for Problem 3 First write the continuity equation: Integrate the continuity equation to find Thus at the control volume faces we have: dm dx = ṁ s m = m + ṁ s x m 1 = m + ṁ s x m 2 = m 1 + ṁ s x m 3 = m 2 + ṁ s x 5
(a)(i)the numerical values of the face mass flow rates are: m = 1 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 φ + ṁ s φ s x = ( m + ṁ s x ) φ 1 m 1φ 1 + ṁ s φ s x = ( m 1 + ṁ s x ) φ 2 m 2φ 2 + ṁ s φ s x = ( m 2 + ṁ s 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 Scarborough criterion 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 =.9545 φ 2 =.9166 φ 3 =.8846 (b) (i) The numerical values of the face mass flow rates are: m = 1 m 1 = 9 m 2 = 8 m 3 = 7 Now write cell balances for cells 1,2 and 3 using first-order upwind scheme and no diffusion term: We can move the φ P term on the LHS to the right to get: m φ ṁ s φ 1 x = ( m ṁ s x ) φ 1 m 1φ 1 ṁ s φ 2 x = ( m 1 ṁ s x ) φ 2 m 2φ 2 ṁ s φ 3 x = ( m 2 ṁ s x ) φ 3 m φ = m φ 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 criterion is satisfied in the equality in cells 2 and 3, and in the inequality in cell 1 because the upwind cell value φ 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. φ 2 = 1. φ 3 = 1. The answer should not be surprising. If you have a hole in a bucket of water at temperature T, the leakage will not cause the temperature of the water in the bucket to drop! 6