Heat transfer problem using FDM

조회 수: 4 (최근 30일)
Hassan Ahmed
Hassan Ahmed 2017년 1월 4일
답변: Torsten 2017년 1월 4일
I'm attempting to find the heat distribution and time required to reach steady state for a 1d rod using a finite difference method (explicit), which has fixed temperature on both its left and right hand sides
I'm having problems trying to write a loop to calculate (and replace) the elements of my matrix using my function which is New temperature= Current temperature at point +alpha*dt((T(j+1)-2*T(j)+T(j-1))/dx^2)
What I have so far:
TR=25 %Temperature (right side)
TL=100 %temperature (left side)
TM=20 %temperature across rod
k=54; %thermal conductivity of slab
rho=7800; %density
c=490; %specific heat
alpha=k/(rho*c);
W=0.05 %width of rod
dx=0.01 %space between grid points
dt=3 %change in time
nx=6;
ny=1
T(1:ny,1:nx)=TM; %make all values of grid =TM can also use TM*ones(26,51)
T(:,nx)=TR; % change values of last column to TR
T(:,1)=TL; %change values of first column to TL
tstart=0 %start time
I also want to calculate the time required for my rod to achieve the steady state condition
How could I go about doing this?

답변 (1개)

Torsten
Torsten 2017년 1월 4일
Use two arrays for T (e.g. Told and T), one for the old and one for the new temperatures.
Best wishes
Torsten.

카테고리

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