Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Could you help me with this problem? Post screenshots of the results. You could look at thelaplacianMat.m download in this link below as a reference:

Could you help me with this problem?

  • Post screenshots of the results.

You could look at the"laplacianMat.m" download in this link below as a reference:

https://drive.google.com/file/d/1PyuaMl7gM_t7oRDvaXmEyNyX_Nzp1llG/view?usp=share_link

image text in transcribedimage text in transcribedimage text in transcribed
Problem 1: Heat Equation The heat equation is a partial differential equation that describes the flow of heat through a thermally conductive material (under ideal assumptions such as uniform density, no internal heat sources). The function u(x,y,t) is a solution to the heat equation if du azu azu at dx2 where a is a positive constant called the thermal diffusivity of the medium. The equation has a rich history and is important in many applications in physics and mathematical modeling: https://en.wikipedia.org/wiki/Heat equation. While the heat equation describes the flow of heat as a function of time, we are often interested in how the temperature ultimately settles, or in other words, what is the temperature distribution when temperature stops varying with respect to time: azu azu 0 = a axz + dyz This condition is called steady-state and the corresponding equation is called Laplace's Equation. Let's consider a square sheet of thermal conducting material and assume that we can control the temperature on the edges: u(x, 1) = d (0,1) 0> [A, b, D] = laplacianMat ( [0 1 0 1]); >> x = A\\b; n = length(D) ; U = zeros(n, n) ; >> U(:) = x; close all; figure(1); surf(D,D, U)Once you are condent that you understand the above lines of code. try experimenting with the boundary conditions and see how they change the steady state solution. In this lab. we are going to solve the Laplacian equation using matrix splitting methods. Problem 1.1: write your own function 'myJacobi.m' that takes as input a matrix A, right-hand side vector b, and a stopping tolerance toil, and applies the Jacobi algorithm to solve Ax = b. The stopping criteria should be dened by the relative residual: ll-tx - IIII 1:: ml llsll Be sure your code checks that the inputs supplied to the function have the correct dimensions. The function should have two outputs: the solution x and the number of iterations needed to compute the solution. You're code should not use MATLAB's backslash operator \" 't Problem 1.2: Write your own function 'myGaussSeidelm' that takes as input a matrix A. right-hand side vector b, and a stopping tolerance tor. and applies the Gauss-Seidel algorithm to solve Ax = b. The stopping criteria should be defined by the relative residual {as in Problem 1.1}. Be sure your code checks that the inputs supplied to the function have the correct dimensions. The function should have two outputs: the solution x and the number of iterations needed to compute the solution. You're code should not use MATLAB's backslash operator " 't \". {You are allowed to use your forward substitution function from Lab 5.} Problem 1.3: Write your own function 'mySDFlm' that takes as input a matrix A, right-hand side vector b, a stopping tolerance fol. and a relaxation parameter lambda. and applies the SDFI algorithm to solve Ax = b. The stopping criteria should be defined by the relative residual {as in 1.1}. Be sure your code checks that the inputs supplied to the function have the correct dimensions. The function should have tvvo outputs: the solution x and the number of iterations needed to compute the solution. You're code should not use MATLAB's backslash operator " 't \". {You are allowed to use your forward substitution function from Lab 5.} Problem 1.11: Write a matlab script 'iterationStudym' that rst runs the code you wrote for 1.1 and 1.2 and stores the number of iterations required for each method to solve the Laplacian system for lot: HF and [x.'e.o] = lip'.et:iett;l-la: r 1: 1 2 11.1.- Next. using your\"mySDFl" code, generate a plot that shows the number of iterations required to solve the system for lambda = (1.135. 0.10, {1.15. ado. In the title at the plot, specily tithe value dt lambda that yields the teiveet number of iterations, 2} the number of iterations required by the Jacobi method and 3} the number of iterations required by the Gauss-Seidel method. General Submission Guidelines [Flrstltlame] [Lestl'ta me]_[1llename].m. For programs [Flrstltlsme] [LestName]_[1llename]_plot_1.pdf For corresponding plots [export them to pdf} [Flrstlllame] [Lestltlame]_[1llename]_plot_2.pdf For problem with more than one plot Grading [4o points tdteu: r Problem 1.1 e 'myJacobi.m' Function - Complete Header and commented code {5 Points} - Correct implementation of algorithm and stopping criteria {5 Points} r Problem 1.2 c- \"myGaussEeideLm" - Fully commented code and complete header [5 Points} - Correct implementation of algorithm and stopping criteria {5 Points} o Problem 1.3 o \"myrSCFlm\" - Full commented code and complete header [5 points} - Correct implementation of algorithm and stopping criteria {5 Points} . Problem 1.4 o \"IterationStudym\" - Correct code for generating iterations as function of lambda plot for SCFI [5 Points} - Title with number of Jacobi iterations, number of CS iterations, and optimal lambda for SCH. {5 Points}

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

Near-earth Laser Communications

Authors: Hamid Hemmati

2nd Edition

042953261X, 9780429532610

More Books

Students also viewed these Physics questions

Question

Identify the interacting elements of cost-volume-profit analysis.

Answered: 1 week ago

Question

=+ Interviews with key people. Which people?

Answered: 1 week ago

Question

=+ Judgmental assessment: personal experience or outside experts?

Answered: 1 week ago

Question

=+ On what criteria should the program be judged? 9

Answered: 1 week ago