Undefine variable 't'
Afficher commentaires plus anciens
I do not know at which point I make mistake.
function dydt = comb(t,y)
R = 8314.510; % J/kmol.K
Cp = 1200; % J/kg.K
h_F = 4e7; % J/kg
Po = 2545284; % Pa
To = 753; % K
Fo = Po/(17*R*To);
Oxo = 16*Po/(17*R*To);
Pro = 0;
dydt = [-h_F*(-6.19e9*exp(-15098/y(1))*(y(2)^0.1)*((0.21*y(3))^1.65))/(Cp*Po/(R*y(1)));...
(-6.19e9*exp(-15098/y(1))*(y(2)^0.1)*((0.21*y(3))^1.65))-(y(2)*(-h_F*(-6.19e9*exp(-15098/y(1))*(y(2)^0.1)*((0.21*y(3))^1.65))/(Cp*Po/(R*y(1))))/y(1));...
16*((-6.19e9*exp(-15098/y(1))*(y(2)^0.1)*((0.21*y(3))^1.65))-(y(2)*(-h_F*(-6.19e9*exp(-15098/y(1))*(y(2)^0.1)*((0.21*y(3))^1.65))/(Cp*Po/(R*y(1))))/y(1)));...
-17*((-6.19e9*exp(-15098/y(1))*(y(2)^0.1)*((0.21*y(3))^1.65))-(y(2)*(-h_F*(-6.19e9*exp(-15098/y(1))*(y(2)^0.1)*((0.21*y(3))^1.65))/(Cp*Po/(R*y(1))))/y(1)))]
[t,y]= ode15s(@comb, [0 0.004],[300;Po/(17*R*To);16*Po/(17*R*To);0]);
plot(t,y(:,1),'-o');
title('Temperature vs time');
xlabel('Time, t [s]');
ylabel('Temperature, T[K]');
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!