heat transfer by explicit finite difference

조회 수: 23 (최근 30일)
Fahad Pervaiz
Fahad Pervaiz 2018년 8월 31일
답변: michio 2018년 9월 14일
I want to solve the 1-D heat transfer equation in MATLAB. with an insulator (heat flux=dT/dx @(0,t)=zero)at left boundary condition and Temperature at the right boundary T(L,t) is zero and Initial Temperature=-20 degree centigrade and Length of the rod is 0.2m and Thermal diffusivity =Alpha=0.001 by explicit finite difference method can anybody help me in this regard?
  댓글 수: 1
KALYAN ACHARJYA
KALYAN ACHARJYA 2018년 8월 31일
1-D heat transfer equation? Details paprameters, varaiables, typical values?

댓글을 달려면 로그인하십시오.

채택된 답변

michio
michio 2018년 9월 14일
I think pdepe function will work for your problem. Please see the first example of the documentation page. https://jp.mathworks.com/help/matlab/ref/pdepe.html
It uses finite difference for spacial derivative and ode15s for time integration.
If you want to explicitly code the finite difference part by yourself, the following File Exchange entry might be of use.
The above code solves 2D case with the Neumann boundary conditions. You need to drop one dimension and modify the boundary condition of one end where you need Dirichlet boundary condition. And of course, please modify the initial condition too.
getRHS.m has the following line of code that implements Neumann boundary condition.
ubig(end,:) = ubig(end-1,:);
The idea is that the finite difference derivative at the boundary should be zero. In order to use the Dirichlet boundary condition, you can change the above to
ubig(end,:) = 2*BC - ubig(end-1,:);
where BC is the boundary value that you want to specify. The idea here is to fix ubig(end,:) value so that the interpolated value at the boundary to be BC.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Boundary Conditions에 대해 자세히 알아보기

태그

제품


릴리스

R2014b

Community Treasure Hunt

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

Start Hunting!

Translated by