Set initial condition to time different to 0
이전 댓글 표시
Hello,
I want to solve in matlab an ODE of second order for a problem of thermal diffusion, I need to set my temperrrature as boundary conditions at x=0 and at x=0,5 (or T'=0 at x=0,25).
How can I set my code?
I try to use ode45 but the problem is the initial conditions request are only for x=0.
this is my code
k=20;
Tw=25+273.15;
s=50*10^-2
sigma0=10^5;
b=0.01;
funz=@(x,T) [T(2); -sigma0*(1-b*(T(1)-Tw))/k];
tspan=[0 s];
y0=[Tw ????]
[x1,T1]=ode45(funz,tspan,y0)
답변 (2개)
Cris LaPierre
2022년 11월 4일
편집: Cris LaPierre
2022년 11월 4일
0 개 추천
Torsten
2022년 11월 4일
0 개 추천
This is a boundary value problem, not an initial value problem.
Thus you should use bvp4c instead of ode45.
카테고리
도움말 센터 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!