Plotting the transient temperature profile of a 2D grid using finite-difference solver

11 次查看(过去 30 天)
I understand that for heat conduction through a plane 2D wall with constant thermal conductivity and no energy generated I can use this equasion for an interior node.
I can solve this by hand for small node problems but I really don't know how to set up the for loop to run for a large grid size. Anything would be helpful thank you.
Also if you wanted some variables to use it's for a square grid of various nodes.
T_Left side = 100
T_Top side = 200
T_Right = adiabatic (IDK how you would set this up)
T_Bottom = adiabaic

回答(1 个)

Torsten
Torsten 2022-5-7
编辑:Torsten 2022-5-7
Order the temperatures in the grid points
(e.g. T11, T12,T13,...,T1_nx,T21,T22,...,T2_nx,...,T_ny,1,T_ny,2,...T_ny,nx).
Write down the equation for temperature in the (nx*ny) grid points.
Put the coefficients in a matrix A of size (nx*ny) x (nx*ny) on the left-hand side and the constant terms in a vector b of size (nx*ny,1) on the right-hand side.
You'll get a matrix equation
A*T = b
for the temperatures T where A is a matrix with 5 bands.
Now you can solve for T using backslash:
T = A\b.

类别

Help CenterFile Exchange 中查找有关 Thermal Analysis 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by