フィルターのクリア

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

11 ビュー (過去 30 日間)
turtle smith
turtle smith 2022 年 5 月 6 日
編集済み: Torsten 2022 年 5 月 7 日
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 Center および File ExchangeThermal Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by