Heat transfer differential equation

조회 수: 23 (최근 30일)
Enrico Danzi
Enrico Danzi 2019년 12월 10일
답변: Enrico Danzi 2019년 12월 10일
Dear all,
I'm quite a new user of Matlab, I'm asking you somethiing that could be simple or obvious, but I've tried and no reasonable results came uot.
I've to calculate the Temperature evolution in time of a system affected by heat conduction and radiation, this is my equation:
eq_heat trasnfer_Enel.png
and this is my attempt code:
function[yp] = f(t,y);
% defining constants
d = 0.00585;
l = 0.03325;
m = 0.009329;
v = 20;
cp = 0.5;
nu = 16.24*10^-6;
sigma = 5.6704*10^-6;
eps = 0.8;
h = (0.26*((d/nu)*v)^0.6)*(0.7^0.37);
A = 7.926*10^-4;
k1 = (h*A)/(m*cp);
k2 = (sigma*eps*A)/(m*cp);
ya = 299;
% equation
yp = k1*(y-ya)+k2*(y^4);
Then, on the command window:
[t,y] = ode45('f',[0,5],1673)
What I am doing wrong (in the problem formulation, I don't care for instance to numbers)?
Thanks for any help!

채택된 답변

Enrico Danzi
Enrico Danzi 2019년 12월 10일
I've solved my question using ode113:
[t,y] = ode113(@(t,y) -k1*(y-299)-k2*y^4,[0 100],1673)
, which eventually worked better and did not have any integration step tolerance warnings.
I'll try also your suggestion.
Thanks for your quick reply!

추가 답변 (1개)

darova
darova 2019년 12월 10일
Call the function this way:
[t,y] = ode45(@f,[0,5],1673)

카테고리

Help CenterFile Exchange에서 Heat and Mass Transfer에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by