its a MATLAB project
NAME: LAB SECTION: EAS 230 – Spring 2020 – PP Page 1 of 16 EAS-230 Spring 2020 Programming Project (PP) Due Dates: Sections A, B, and E: Friday 4/17 Score: -------/150 Instructions: 1. This project is to be done in groups of maximum 2 students. You must choose your partner from any of your instructor sections. Name your Group as 55555555_66666666 The 55555555 and 66666666 are the person numbers for partners 1 and 2, respectively. 2. Each group must fill in and submit the file Group_Info.xlsx to UBlearns no later than 3/28/20 at 11:59 pm. 3. Each partner individually must submit a peer review at the beginning of the project report that shows the contribution to every section of the project in percent. However, each partner is fully responsible for every part of the project. Partners may be randomly selected to be tested in person on their understanding of each section of the project. 4. Every group must submit only one zipped file per group named as EAS230S20_PP_GroupName.zip that contains all m-files, txt files and a pdf of your report. See the submission instructions at the end of this document. The zip file must be uploaded to UBlearns by any of the partners before 11:59 PM on the due date shown above (Do Not include in your zip file any files ending in “.m~”, “.sav” or “.mat”.) 5. You must save your m-files in addition to any data file with the exact names as in the text of this assignment in your EAS230S20_PP_GroupName folder before zipping. 6. Your project final report must have all sections shown in the template on UBlearns. Be sure to write the group name, the partners’ names, the person number and the lab section of each partner on the cover page of the final report. 7. You must write your own code and follow all instructions to get full credit. You are not allowed to use codes or scripts found on the internet or any other references. 8. You must use good programming practices, including indentation, commenting your functions and scripts and choosing meaningful variable names to make your programs self-documenting. 9. It is your responsibility to make sure that your functions/scripts work properly and are free from errors by utilizing the resources at your disposal. Files not running may get a grade of zero. NAME: LAB SECTION: EAS 230 – Spring 2020 – PP Page 2 of 16 Numerical Analysis of Annular Radial Fins of Uniform Thickness Fig. 1: Annular radial fin of uniform thickness. Background: Figure 1 shows an annular radial fin used to increase the surface area of a circular tube for the purpose of increasing the rate of heat transfer to/from the surface. The rate of heat transfer, �̇�????, from a surface at temperature ?? to the surrounding environment at a temperature ?∞ is determined from Newton’s law of cooling [1] seen in equation 1 where ?? is the surface area and ℎ is the convective heat transfer coefficient. �̇�???? = ℎ??(?? − ?∞) (equation 1) The surface temperature along the fin length, ?? in the previous equation, is not constant but varies along the fin from its base to its tip. Engineers are usually interested in determining the temperature distribution along the fin and accordingly the rate of heat transfer through the fin, �̇�???. To achieve this goal, engineers can use numerical methods and/or analytical methods. Numerical methods: Fig. 2: Schematic for the nodes used for the numerical analysis. NAME: LAB SECTION: EAS 230 – Spring 2020 – PP Page 3 of 16 One numerical method is known as the finite difference method where the fin length is divided into a finite number of equally spaced nodes, or points along the fin length, as seen in Figure 2. The fin is divided into ? sections of equal lengths (∆?) with ? + 1 nodes. Nodes 2, 3, …, ? are called internal nodes, while nodes 1 and ? + 1 are boundary nodes at the boundaries of the fin. The temperature at each node or point is then determined by an equation derived from the energy balance at this node as ( ???? ?? ℎ??? ?????????? ?? ?ℎ? ???? ???? ?? ?ℎ? ???? ) + ( ???? ?? ℎ??? ?????????? ?? ?ℎ? ???ℎ? ???? ?? ?ℎ? ???? ) + ( ???? ?? ℎ??? ?????????? ?? ?ℎ? ???? ) = ( ???? ?? ?ℎ???? ?? ?ℎ? ?????? ??????? ?? ?ℎ? ???? ) Since each node has its own equation, this produces a system of ? + 1 linear equations that can be solved using the linear algebra techniques taught in class. In practice, the more nodes, the more equations, the better approximation to the exact/analytical solution. The equation, in dimensionless form, for each internal node (? goes from 2 to N) can be derived from equation 2 by plugging in the corresponding ? value. ( 1 (∆?)2 − 1 ??(2∆?) ) ??−1 − ( 2 (∆?)2 + ?2) ?? + ( 1 (∆?)2 + 1 ??(2∆?) ) ??+1 = 0 (equation 2) The distance to each node, ??, can be generated using equation 3. ?? = ? + (? − 1)∆?, ∆? = 1−? ? (equation 3) Note that the boundary nodes, node (? = 1) and node (? = N+1) require two more equations that depend on the assumptions made at each boundary, known as the boundary conditions. At the fin base, Node 1, the temperature is assumed the same as that of the tubular surface where the fin is mounted on. This is represented by equation 4. ?1 = 1 (equation 4) At the fin tip, Node N+1, One of three different assumptions can be made, resulting in 3 different equations (equations 5A-C). Only one of these equations can be used to complete the system of equations. Table 1: Boundary Conditions at the fin tip Boundary condition assumption Equation No heat flow from the fin tip (perfect insulation) ??−1 − 4?? + 3??+1 = 0 (equation 5A) NAME: LAB SECTION: EAS 230 – Spring 2020 – PP Page 4 of 16 Finite heat flow from the fin tip by convection ??−1 − 4?? + (3 + ? 2?(2∆?))??+1 = 0 (equation 5B) Infinitely too long fin ??+1 = 0 (equation 5C) Variables in equations 1 to 5: ? is the dimensionless temperature and represents the temperature at each node (these are the unknowns in the system of equations that you need to solve for.) ? + 1 is the number of nodes and ? indicates a specific node, ? = 1, 2, 3, … , ?, ? + 1 ? is the ratio between the inner and outer radii of the fin (? = ?1 ?2 ) ? represents the dimensionless distance of each node to the center of the tube. ? is the ratio between the distance to each node and the outer radius of the fin (Ri = ?? ?2 ). You must notice that R is a vector of (N+1) elements where ?1 = ?1 ?2 = ? and ??+1 = ?2 ?2 = 1. ?2 is known as the enlarged Biot number and represents how quickly heat transfers through the fin (? = √ ℎ ?? ?2 2) ? represents the dimensionless thickness of the fin. It is defined as the ratio between the actual thickness and the outer radius of the fin (? = ? ?2 ). For optimum design consideration, ? is typically in the range of 0.01 to 0.1. Problem PP_PartA (25 pts): Solving the radial fin problem with numerical methods: Deliverable : Function RadFin_Numerical 1. Using equations 2, 4, and 5A, write the system of equations for 6 nodes (? = 5) using the provided variables: a. ? = 5 resulting in ? = 1, 2, 3, 4, 5, 6 b. ? = 0.2 c. ? = √10 2. Solve your system of equations using MATLAB to determine the temperature distribution. Compare your results with the provided results below in format long: ?1 = 1.000000000000000 ?2 = 0.486132897434888 ?3 = 0.260949304501633 NAME: LAB SECTION: EAS 230 – Spring 2020 – PP Page 5 of 16 ?4 = 0.153710622042675 ?5 = 0.104256326792430 ?6 = 0.087771561709016 3. Generalize your calculations to solve the system of equations for any number ? + 1 of nodes. a. Generate your R vector using equation 3 for all ? values. b. Pre-allocate your ? matrix and b vector using the zeros function. c. Fill in the middle rows of ? and b (rows 2 to N) using for loops according to equation 2. d. Fill in row 1 of ? and b according to equation 4. e. Fill in row ? + 1 of ? and b according to equations 5A-C depending on the provided boundary condition using a branching structure. f. Once ? and b are filled, solve for theta using left division. 4. Lastly, write your final set of calculations as a function named RadFin_Numerical with the following function definition line. [R, T] = RadFin_Numerical(N, C, Tau, Gamma, BC) R is the vector of radii calculated for each node using equation 3 T is the vector of dimensionless temperatures ? at each node calculated using the numerical method. N, C, Tau (?), and Gamma (?) are defined before. BC is a variable for the boundary condition at the tip of the fin that may have a value of the integers 1, 2, or 3 only. If BC = 1, use equation 5A, if BC = 2, use equation 5B, and if BC = 3, use equation 5C in your system of equations. Note: you may use any additional variables that you need and you are free to name your variables any valid names. Analytical methods: The numerical method gives us an approximation of the analytical/exact solution. The analytical solution of the radial fin heat problem