Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This linear system is A T = b where T = ( T - 0 , T - 1 , dots, T - N )

This linear system is AT=b where T=(T-0,T-1,dots,T-N) is the vector of N+1 unknown temperatures, A is the (N+1)(N+1) tridiagonal matrix
A=[1????1h2-2h21h2???1h2-2h21h2??ddotsddotsddots??1h2-2h21h2??1???]
and b is the column vector of N+1 right-hand side terms:
b=(TH,0,0,0,dots,0,TC)T
For the rest of this lab, use the parameter values: L=10m,TH=200C,TC=40C,.
Task 1:
Duplicate and rename your programme from Exercise 1. Revise the construction of the vector b in your programme to match equation. You can now solve the linear system AT=b
Ensure that you change the comments in your program to reflect what it does. Solve the system to find the temperature profile T(x) with a suitable number of steps N.
Draw a graph of T(x) against x.
In []: # create Matrix A
In []: # Solve system and plot
Does the graph agree with what you would expect the temperature profile for an insulated rod to look like? Is there any need for TH>TC?
In ] :%config InlineBackend.figure_format='retina'
Figure below shows a thin rod, of length L, whose ends are kept at fixed temperatures TH and TC where TH>TC and whose sides are insulated so there is no heat loss through the
sides. The arrows represent heat flow.
In the steady-state situation the temperature T is a function of x, the distance along the rod, but not a function of time. T(x) is determined by Laplace's equation in 1D:
d2Tdx2=0,T(L)=TC
As in the lectures, we divide the rod into N intervals. In lectures the grid used was separated by x=LN; hereweuse ??x=h$. We replace the derivative term by a central difference
approximation, and evaluate the resulting equation at each grid point. This gives a set of linear equations
Tk-1-2Tk+Tk+1h2=0,k=1,dotsN-1
From the boundary conditions, we also have
T0=TH, and ,TN=TC
Taking the above two equations gives a total of N+1 equations in the unknowns T0,dots,TN.
This linear system is AT=b where T=(T-0,T-1,dots,T-N) is the vector of N+1 unknown temperatures, A is the (N+1)(N+1) tridiagonal matrix
image text in transcribed

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

The Database Experts Guide To SQL

Authors: Frank Lusardi

1st Edition

0070390029, 978-0070390027

More Books

Students also viewed these Databases questions

Question

6. Describe why communication is vital to everyone

Answered: 1 week ago