Assignment
PARTNER1 NAME: PARTNER1 LAB SECTION: PARTNER2 NAME: PARTNER2 LAB SECTION: EAS 230 – Spring 2019 – PP Page 2 of 14 Background: A uranium plate generates heat uniformly at a constant rate of �̇� W/m3. Consider a large plate made of uranium with a thickness ? = 20 ??, thermal conductivity ? = 28 W/m°C, and thermal diffusivity ? = 12.5 × 10−6 m2/s. Assume the plate is initially at a uniform temperature of ????. At time ? = 0, each side of the plate is subjected to a boundary condition that affects the change in temperature through the plate over time. Assume the boundary conditions are constantly applied over time. The solution for how the temperature changes over time through the plate, given a specific set of boundary conditions, can be estimated using numerical methods. In this project, you will write a program that estimates the temperature distribution across the plate over time after the application of given boundary conditions using (1) the explicit finite difference numerical method and (2) the implicit finite difference numerical method. Figure 1: An illustration of a plate depicting the nodes over a cross section of the plate and the numerical solution. The number of nodes are from 1 to M the temperatures defined for each time step at each node are defined as ?? ? . Numerical Solution: Numerical methods are commonly used to determine the changes in temperature along the thickness of the plate. One such method is called the finite difference method. In summary, we can divide a cross-section of the plate into a specific number of control volumes, identified at specific locations called nodes, and apply a set of equations to each node. This set of equations is known as the energy balance approach, generally defined by equation (1). ( ???? ?? ?ℎ???? ?? ?ℎ? ?????? ??????? ?? ?ℎ? ???? ) = ( ???? ?? ℎ??? ?????????? ?? ?ℎ? ???? ???? ?? ?ℎ? ???? ) + ( ???? ?? ℎ??? ?????????? ?? ?ℎ? ???ℎ? ???? ?? ?ℎ? ???? ) + ( ???? ?? ℎ??? ?????????? ?????? ?ℎ? ???? ) (1) PARTNER1 NAME: PARTNER1 LAB SECTION: PARTNER2 NAME: PARTNER2 LAB SECTION: EAS 230 – Spring 2019 – PP Page 3 of 14 The finite difference method obtains an approximate solution for the temperature distribution across the plate and over time, ?(?, ?), at a finite set of x and t. The solution domain is depicted in Figure 2. Figure 2: The solution domain where each shape represents a node/temperature on the plate. The rows represent temperature change across the plate and the columns represent temperature change over time. The x-axis represents the space variable 0 ≤ ? ≤ ?, while the y-axis represents the time variable 0 ≤ ? ≤ ???? . The black squares represent the nodal temperatures at ? = 0, which are determined from the initial conditions, while the white squares represent the nodal temperatures at ? > 0 at the boundaries of the plate, which are determined from the boundary conditions. The circles represent the temperatures at any internal node 0 <>< at="" any="" time=""> 0. Eventually, the solution will be developed as an ? × ? array where every row represents the change in temperature at a specific location ? over time 0 ≤ ? ≤ ???? and every column represents the change in temperature along the plate thickness 0 ≤ ? ≤ ? at a specific time ? For this project, the nodes representing change in position across the plate are uniformly spaced in the interval 0 ≤ ? ≤ ?, where ? is the thickness of the plate, such that ?? represents the location of each node and can be determined by equation (2a) where ? represents each node and ? is the total number of nodes, including those on the boundary. ?? = (? − 1)∆?; ? = 1, 2, … , ? (2a) Given ? and ?, the constant spacing ∆? between the nodes can be computed with equation (2b). ∆? = ? ?−1 (2b) ? − 1 ? + 1 ? PARTNER1 NAME: PARTNER1 LAB SECTION: PARTNER2 NAME: PARTNER2 LAB SECTION: EAS 230 – Spring 2019 – PP Page 4 of 14 Similarly, the nodes representing the change in time are uniformly spaced on the interval 0 ≤ ? ≤ ???? such that ?? represents the time at each interval and can be determined by equation (3a) where ? is the interval number and ? is the total number of intervals. ?? = (? − 1)∆?; ? = 1, 2, … , ? (3a) The time of each interval, ∆?, can be calculated with equation (3b) and is also known as the size of the time step. ∆? = ???? ?−1 (3b) The overall solution is found by calculating the temperature at each node in position, ?, and at each node in time, ?. Explicit Finite Difference Scheme: The generic solution, found in equation (1), can be formalized with the Forward Time Centered Space (FTCS) finite difference format and is found in equation (5a) where ? is calculated with equation (5b). ?? ?+1 = ???−1 ? + (1 − 2?)?? ? + ???+1 ? + ? ( �̇�∆?2 ? ) ; ? = 2, 3, … , ? − 1 (5a) ? = ?∆? ∆?2 (5b) Equation (5a) represents a set of ? − 2 equations for ? − 2 internal nodes at a specific time, ??+1. Each equation for each node (? = 2 to ? − 1) is explicit for one temperature at time ??+1 and can be used to solve for the temperature at a specific internal node at a specific time interval. Two more equations are required for ? = 1 and ? = ? to determine the full temperature distribution for a specific time interval, ??+1, at all nodes. The final two equations can be found by applying specific boundary conditions. Four types of boundary conditions (BC) are described below where the remaining two equations for the explicit method are shown for each specified BC. 1. Prescribed temperature BC where the temperatures at node 1 and node ? are constant. At node 1: ?1 ?+1 = ?0 = Constant (6a) At node M: ?? ?+1 = ?? = Constant (6b) 2. Prescribed heat flux BC where heat naturally flows from hot to cold temperatures at the edge of the plate. q is defined as the heat flux at the specific boundary node. At node 1: ?1 ?+1 = ?2 ?+1 + ?0∆? ? (7a) At node M: ?? ?+1 = ??−1 ?+1 + ??∆? ? (7b) 3. Insulated BC where there is no heat flow into our out of the boundary. PARTNER1 NAME: PARTNER1 LAB SECTION: PARTNER2 NAME: PARTNER2 LAB SECTION: EAS 230 – Spring 2019 – PP Page 5 of 14 At node 1: ?1 ?+1 = ?2 ?+1 (8a) At node M: ?? ?+1 = ??−1 ?+1 (8b) 4. Convective BC where heat flow at the boundaries defined according to the principles of convection. ℎ is defined as the heat transfer coefficient at a specific boundary node and ?∞ is the outside temperature at a large distance from the plate. At node 1: ?1 ?+1 = (1 − 2? − 2? ℎ0∆? ? ) ?1 ? + 2??2 ? + ? (2 ℎ0∆? ? ?∞ + �̇�(∆?)2 ? ) (9a) At node M: ?? ?+1 = (1 − 2? − 2? ℎ?∆? ? ) ?? ? + 2???−1 ? + ? (2 ℎ?∆? ? ?∞ + �̇�(∆?)2 ? ) (9b) Any two equations for a specified BC can be combined with equation (5a) for a complete set of equations for each node. The solution can be found by solving the equation for each node, ?? ?+1, to determine the temperature profile across the plate for a single time interval, ??+1. This type of system is called uncoupled since each equation has only one unknown temperature, ?? ?+1, for time, ??+1, seen on the left hand side of each equation. The right hand side for each equation can be determined from the known, previously solved for, temperature distribution from the previous time step ??. Stability Criterion for Explicit Method: Limitation on ∆? The explicit method results in relatively simple equations with one unknown per node, ?? ?+1; however, it suffers from an undesirable feature that severely restricts its utility. The explicit method is not unconditionally stable and the largest permissible value of the time step ∆? is limited by the stability criterion shown in equation (10). If the time step ∆? is not sufficiently small, the solutions obtained by the explicit method may oscillate wildly and diverge from the actual solution. To avoid such divergent oscillations, the value of ∆? must be maintained below a certain upper limit established by the stability criterion. Stability Criterion for Explicit Method: ∆? < ∆?2 2? for stability (10) implicit finite difference method the implicit method for solving this problem is unconditionally stable; however, it requires solving a system of equations for each time, ??+1. the system of equations for the implicit method can be built using equation (11) for the internal nodes (? = 2 to ? − 1) and the two equations defined by the boundary conditions for the implicit method, shown below. −???−1 ?+1 + (1 + 2?)?? ?+1 − ???+1 ?+1 = ?? ? + ? �̇�(∆?)2 ? for ? = 2,3, … , ? − 1 (11) the same four bcs are described below and list the remaining two equations needed so solve for the solution via the implicit method. partner1 name: partner1 lab section: partner2 name: partner2 lab section: eas 230 – spring 2019 – pp page 6 of 14 1. prescribed temperature bc ∆?2="" 2?="" for="" stability="" (10)="" implicit="" finite="" difference="" method="" the="" implicit="" method="" for="" solving="" this="" problem="" is="" unconditionally="" stable;="" however,="" it="" requires="" solving="" a="" system="" of="" equations="" for="" each="" time,="" +1.="" the="" system="" of="" equations="" for="" the="" implicit="" method="" can="" be="" built="" using="" equation="" (11)="" for="" the="" internal="" nodes="" (?="2" to="" −="" 1)="" and="" the="" two="" equations="" defined="" by="" the="" boundary="" conditions="" for="" the="" implicit="" method,="" shown="" below.="" −???−1="" +1="" +="" (1="" +="" 2?)??="" +1="" −="" +1="" +1="??" +="" �̇�(∆?)2="" for="" =="" 2,3,="" …="" ,="" −="" 1="" (11)="" the="" same="" four="" bcs="" are="" described="" below="" and="" list="" the="" remaining="" two="" equations="" needed="" so="" solve="" for="" the="" solution="" via="" the="" implicit="" method.="" partner1="" name:="" partner1="" lab="" section:="" partner2="" name:="" partner2="" lab="" section:="" eas="" 230="" –="" spring="" 2019="" –="" pp="" page="" 6="" of="" 14="" 1.="" prescribed="" temperature=""> ∆?2 2? for stability (10) implicit finite difference method the implicit method for solving this problem is unconditionally stable; however, it requires solving a system of equations for each time, ??+1. the system of equations for the implicit method can be built using equation (11) for the internal nodes (? = 2 to ? − 1) and the two equations defined by the boundary conditions for the implicit method, shown below. −???−1 ?+1 + (1 + 2?)?? ?+1 − ???+1 ?+1 = ?? ? + ? �̇�(∆?)2 ? for ? = 2,3, … , ? − 1 (11) the same four bcs are described below and list the remaining two equations needed so solve for the solution via the implicit method. partner1 name: partner1 lab section: partner2 name: partner2 lab section: eas 230 – spring 2019 – pp page 6 of 14 1. prescribed temperature bc>