Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(5%) Solve the below Heat conduction and convection problem using Gauss-Seidel. Cross-reference slides 19 to 23 from 006_Comp_CW2.pptx. Make the program able to handle

image text in transcribedimage text in transcribedimage text in transcribed

(5%) Solve the below Heat conduction and convection problem using Gauss-Seidel. Cross-reference slides 19 to 23 from 006_Comp_CW2.pptx. Make the program able to handle n number of divisions (diagram shows 7). n must be an odd number so there are an even number of nodes in the insulated and uninsulated sections. Order the equations from 2 to n for each row in matrix A (2 in step of 1 to 7 in the diagram below.) Note: When defining the A matrix, make sure all the diagnonal elements are positive. To do this multiply all elements in a row by -1. Note: Use 273 as the initial condition for the x vector. L1 = 25mm Insulated I a = 20C L2 = 25mm As = 0.01 * Ax Ac = 0.01 h = 2500 W mK k = 45 W mK Insulated T = 100 c T T3 T T5 T6 T7 T8 = 40c Function 1 function [A,b,x] = heat Flow (h, k, T1, Ta, Tn, L, lambda, tol, max_it, num_divisions) 2% calc geometry 3 delx = %mm 4 As = %m^2 5 Ac = %m^2 6% expandable A and b definition 8 7%crete empty A and b matrices 9% fill first row 10 11% fill second to second to last rows 12 13 % fill last row 14 15% set solution parameters 16 17 xint = 18 19 % run solution 20 [x, check, j] = GaussSeidel (A,b, lambda, tol, xint, max_it) 21 end 22 23 function [x, check, j] 24 25 % Iindices = 1:1:n; = Gauss Seidel (A,b, lambda, tol,xint,max_it) % calculate new guess for x 26 27 28 29 % apply relaxation 30 31 % convergance criterion 32 33 % reset old and new guesses 34 35 36 check = 37 end 38 Save CReset MATLAB Documentation Code to call your function 1% set problem parameters 2h = 2500%w/m^2/K 3 k = 45; %W/m/K 4 T1 = 100+273; %K 5 Ta = 20+273; %k 6Tn = 40+273; %k 7 L = 50*10^-3; %mm 8% set solution parameters 9 lambda = 0.8; 10 tol = 0.001; 11 max_it = 100; 12 num_divisions = 7; 13 14 [A,b,x] = heatFlow (h, k, T1, Ta, Tn, L, lambda, tol, max_it, num_divisions) CReset

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals of Materials Science and Engineering An Integrated Approach

Authors: David G. Rethwisch

4th Edition

1118214226, 1118061608, 9781118214220, 978-1118061602

More Books

Students also viewed these Mechanical Engineering questions

Question

What is the biggest strength of the program?

Answered: 1 week ago