Failure at t=0.000000e+00. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (7.905050e-323) at time t.
์กฐํ ์: 6 (์ต๊ทผ 30์ผ)
์ด์ ๋๊ธ ํ์
Akanistha Banerjee
2020๋
8์ 14์ผ
๋ต๋ณ: esat gulhan
2020๋
8์ 15์ผ
I am solving a heat conduction problem using pde solver. Here is the full question:
A solid body occupying the space from y = 0 to y = โ is initially at temperature T0. Beginning at time t=0, a periodic heat flux given by ๐๐ฆ=๐0cos๐๐ก , is imposed at y = 0. Here ๐0 is the amplitude of the heat flux oscillations, and ฯ is the frequency.
The code I use is:
function heateqn
global rho cp k
global q t0 w q0
L=Inf; %m
t0=100;
q0=10 ;
w=100;
k=200; %W/m-K
rho=10000; %kg/m^3
cp=500; %J/kg-K
q=100; %W/m^2
tend=10; %seconds
m = 0;
x = linspace(0,L,200);
t = linspace(0,tend,50);
% solving
sol = pdepe(m,@pdex1pde,@pdex1ic,@pdex1bc,x,t);
% Post processing
Temperature = sol(:,:,1);
% Plot temperature vs. length
figure, plot(x,Temperature(end,:))
title(strcat('Solution at t = ', num2str(tend)))
xlabel('Distance x')
ylabel('Temperature (C)')
%
figure, plot(t,Temperature(:,1))
title('Temperature (C)')
xlabel('Time (s)')
ylabel('Temperature (C)')
% --------------------------------------------------------------
function [c,f,s] = pdex1pde(x,t,u,DuDx)
global rho cp k
c = rho*cp;
f = k*DuDx;
s = 0;
% --------------------------------------------------------------
% end
function u0 = pdex1ic(x)
t0=100;
u0 = t0;
% --------------------------------------------------------------
% end
function [pl,ql,pr,qr] = pdex1bc(xl,ul,xr,ur,t)
global q
pl = 10 *cos(100*t);
ql = 1;
pr =ur-10;
qr = 0;
% end
I am getting the error message:
Warning: Failure at t=0.000000e+00.
Unable to meet integration tolerances
without reducing the step size below the
smallest value allowed (7.905050e-323) at
time t.
> In ode15s (line 668)
In pdepe (line 289)
In heat (line 20)
Warning: Time integration has failed.
Solution is available at requested time
points up to t=0.000000e+00.
> In pdepe (line 303)
In heat (line 20)
>>
๋๊ธ ์: 0
์ฑํ๋ ๋ต๋ณ
esat gulhan
2020๋
8์ 15์ผ
I think the main problem is the value of L. Inf is not a good way to solve this problem. You should write largest positive floating-point number, realmax which is 1.7977e+308
L= realmax
If your code is right, it will gives you right answer
๋๊ธ ์: 0
์ถ๊ฐ ๋ต๋ณ (0๊ฐ)
์ฐธ๊ณ ํญ๋ชฉ
์นดํ ๊ณ ๋ฆฌ
Help Center ๋ฐ File Exchange์์ Eigenvalue Problems์ ๋ํด ์์ธํ ์์๋ณด๊ธฐ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!