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

11 visualizaciones (últimos 30 días)
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

Respuestas (1)

Torsten
Torsten el 7 de Mayo de 2022
Editada: Torsten el 7 de Mayo de 2022
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.

Categorías

Más información sobre Thermal Analysis en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by