Problema
En el editor:
%Fugacidad
echo off
P=[0.01 0.05 1 2 3 4 5 6 7 8 9 10 12.5 15 16.513 20 30];
v=[28.754 5.7465 0.2825 0.13857 0.09053 .00645 0.05194 0.04223 0.003524 0.029950.02580 0.02242 0.016126 0.011470 0.008813 0.001696 0.001599];
R=0.0004619; %(MPa m^3)/(Kg K)
T=350+273.15;%Kelvin
Z=(v.*P)./(R.*T) %#ok
s=(Z-1)./P[Z0]=interp1([0.01,0.05],[-0.1018,-0.0353],0,'cubic')
y=[Z0,s]
f1=trapz(y(1:2))*((0.01)-(0));
f2=trapz(y(2:3))*((0.05)-(0.01));
f3=trapz(y(4:13))*((10)-(1));
f4=trapz(y(13:15))*((15)-(10));
f5=trapz(y(15:16))*((16.513)-(15));f6=trapz(y(17:18))*((30)-(20));
i=f1+f2+f3+f4+f5+f6
[fug]=(exp(f1+f2+f3+f4+f5+f6))*30;
fprintf('fugacidad=%8.5f MPa',fug)
En command window
>>fugacidad
Z =
Columns 1 through 7
0.9990 0.99820.9815 0.9629 0.9436 0.0896 0.9023
Columns 8 through 14
0.8803 0.0857 0.8324 0.8067 0.7789 0.7003 0.5977
Columns 15 through 17
0.5056 0.11780.1667
s =
Columns 1 through 7
-0.1018 -0.0353 -0.0185 -0.0186 -0.0188 -0.2276 -0.0195
Columns 8 through 14
-0.0199 -0.1306 -0.0209 -0.0215 -0.0221-0.0240 -0.0268
Columns 15 through 17
-0.0299 -0.0441 -0.0278
Z0 =
-0.1184
y =
Columns 1 through 7
-0.1184 -0.1018 -0.0353 -0.0185 -0.0186 -0.0188 -0.2276Columns 8 through 14
-0.0195 -0.0199 -0.1306 -0.0209 -0.0215 -0.0221 -0.0240
Columns 15 through 18
-0.0268 -0.0299 -0.0441 -0.0278
i =
-5.1289fugacidad= 0.17770 MPa>>
• Problema 2
En el editor
function sistema=EDO(V,vars)
T=vars(1);
X=vars(2);
V0=0.002; % m^3/s
Vr=0.001; % m^3
U=110; % W/m^2 K
a=150; % m^2/m^3 reactork=3.58*exp(34222*(1/1035-1/T)); % s^-1
deltah=80770+6.8*(T-298)-5.75e-3*(T^2-298^2)-1.27e-6*(T^3-298^3); % J/mol
CpA=26.63+0.1830*T-45.86e-6*T^2; % J/mol K
CpB=20.04+0.0945*T-30.95e-6*T^2; % J/mol K...
Regístrate para leer el documento completo.