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