Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How would i go about coding this Calculate the temperature distribution across a metal plate using a finite difference method. Use finite central difference. Assume
How would i go about coding this Calculate the temperature distribution across a metal plate using a finite difference method.
Use finite central difference.
Assume steady conduction and that there is no heat conduction in the zdirection.
The plate is by use an interval size of
The boundary conditions are
Make sure your output is in kelvin
Function
function T gridx,gridy, A b heatconductionTboundary Lx Ly dx
extract boundary conditions
Tleft Tboundary;
Ttop Tboundary;
Tright Tboundary;
Tbottom Tboundary;
calc number of intervals in and direction
setup grid of points in a vector of gridx and grid
create adjacency matrix
zeros;
for ::
for ::
set diagnonals of to
calc distance between two of the grid points
if distance is less than set A element to
end
end
apply boundary conditions
cycle through each point to determine the boundary condition it is in
if bottom left corner
elseif bottom right corner
elseif top left corner
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started