Plotting multiple figures with an ODE

조회 수: 2 (최근 30일)
Will Jeter
Will Jeter 2020년 11월 4일
Im trying to plot Conversion vs Volume profile and a Temperatrure vs. Volume profile but i can only get the first to show up. Please help.
Volume = [0,2500];
Conversion = [0];
[V, X] = ode45(@odefun5,Volume,Conversion);
figure
plot(V,X)
xlabel('Volume')
ylabel('Conversion')
legend('Large Inlet')
figure
plot(V,T)
function dXdV = odefun5(V,X)
CA0 = 2/0.082/1100;
CI0 = CA0;
Theta = 1;
FA0 = 10;
CA01 = (CA0+CI0)/(Theta+1);
e = 1/(1+Theta);
T0 = 1100;
dHrx = 80000;
CpA = 170;
CpI = 200;
T = (X*(-dHrx)+(CpA+Theta*CpI)*T0)/(CpA+Theta*CpI);
k = exp(34.34-(34222/T));
ra = -k*CA01*(1-X)*T0/(1+e*X)/T;
dXdV = -ra/FA0;
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by