Tarea 2
Tarea 2
Tarea 2
FACULTAD DE INGENIERIA
QUIMICA
Carrera profesional de Ingeniería Química e
Ingeniería Química Industrial
EJERCICIO DE MÉTODOS
NUMÉRICOS MÉTODOS
ABIERTO Y CERRADOS
ESTUDIANTE:
SEMESTRE: V–A
HUANCAYO-PERÚ
2018
P= presión en atm
T =temperatura en K
R=constante universal de los gases en atm−L/( gmol K)=0.08205
V =volumen molar del gas en L/gmol
a , b=constantes particulares para cada gas para los siguientes gases
calcule V a 80°C para una presión de 10 atm. ε =1 x 10− 4
Solución:
f ( H )=3.33( B−0.2 H )¿
Para elegir un valor inicial de H en cada caso, se considera que por cuestión de diseño H
debe ser menor que B. Por lo anterior, se sugiere utilizar como valor inicial Ho = B/2. Para
la pareja B = 3, Q = 12
Determina H, ε =1 x 10− 4
ME
1)
V0 0.5
d 0.17
P 10
R 0.08205
a 3.599
b 0.04267
T 353
Chart Title
30
20
10
0
0 0.5 1 1.5 2 2.5 3 3.5
-10
-20
-30
-40
2) H0 0.1 H f(H)
D 0.3 0.1 -11.6861945
Q 12 0.4 -9.54010216
B 3 0.7 -6.42227207
1 -2.676
1.3 1.5241452
1.6 6.06171568
1.9 10.8494592
2.2 15.8175079
2.5 20.9074519
Chart Title 2.8 26.0689683
3.1 31.2577306
100
3.4 36.4340286
3.7 41.5618117
4 46.608
80 4.3 51.5419722
4.6 56.3351758
4.9 60.9608228
5.2 65.3936484
60 5.5 69.6097164
5.8 73.5862596
6.1 77.3015482
40
20
0
0 1 2 3 4 5 6 7
-20
METODO DE
PUNTOS
FIJOS
1) i x1 d=Ixi+1 - xiI f(xi+1) P 10
0 2.8 R 0.08205
1 2.80414655 0.00414655 -0.66804566 a 3.599
2 2.80697563 0.00282908 -0.45636995 b 0.04267
3 2.80890502 0.00192939 -0.31150715 T 353
4 2.81022045 0.00131543 -0.21250724
5 2.81111713 0.00089667 -0.14491466
6 2.81172826 0.00061114 -0.09879547
7 2.81214475 0.00041649 -0.06734171
8 2.81242857 0.00028382 -0.04589638
9 2.81262198 0.0001934 -0.03127783
10 2.81275376 0.00013179 -0.02131426
11 2.81284356 8.9799E-05 -0.01452403
12 2.81290475 6.1188E-05 -0.00989675
13 2.81294644 4.1692E-05 -0.00674358
14 2.81297485 2.8408E-05 -0.00459497
15 2.81299421 1.9357E-05 -0.00313092
Al despejar con otras variables no converge la función por lo tanto se alega del problema
Cuando el H converge en 14 esta respuesta no está bien ya que H tiene que ser menor
que B
ME
3 14.6664255 0.37717385 0.47824303
4 14.6792102 0.01278463 0.0156939
5 14.6796292 0.00041899 0.00051378
6 14.6796429 1.3716E-05 1.6818E-05
TO
DO
DE
NE
1) P 10
i x1 d=Ixi+1 - xiI f(xi+1)
R 0.08205
0 2.6 -13.7149353
a 3.599
1 2.85602287 0.25602287 3.35406843
b 0.04267
2 2.81431908 0.0417038 0.09717521
T 353
3 2.8130368 0.00128228 9.0477E-05
4 2.8130356 1.1961E-06 7.8732E-11
5 2.8130356 1.0409E-12 -1.9706E-14
6 2.8130356 4.4409E-16 1.0492E-14
Solucionario en Matlab:
function newtonrap
format long
clear,clc
syms V
V0=input('ingrese el volumen molar V0=');
eps=10^-4;
i=0;
d=1;
P=10;%presion en atmosferas atm
R=0.08205;%constante universal de los gases atm.L/g.mol.K
a=3.599;%constante de gases
b=0.04267;%constante de gases
T=353;%temperatura en kelvin(K)
fV=P*V^3-(b*P+R*T)*V^2+a*V-a*b;
df=diff(fV,V);
fV=inline(fV);
df=inline(df);
disp('___________________________________')
disp('k Vi d f(V) ')
disp('___________________________________')
while d >= eps
V=V0-(fV(V0)/df(V0));
hV=fV(V);
d=abs(V-V0);
i=i+1;
V0=V;
fprintf('%0.5f %0.5f %0.5f %0.5f \n',i,V,d,hV)
end
end
ingrese el valor inicial V0=2
___________________________________
k Vi d f(V)
___________________________________
1.00000 7.05449 5.05449 2073.32235
2.00000 5.13812 1.91636 598.90494
3.00000 3.92475 1.21338 165.80751
4.00000 3.21921 0.70554 40.46805
5.00000 2.89617 0.32304 6.67421
6.00000 2.81764 0.07853 0.34969
7.00000 2.81305 0.00459 0.00116
8.00000 2.81304 0.00002 0.00000
9.00000 2.81304 0.00000 -0.00000
2) i x1 d=Ixi+1 - xiI f(xi+1) Q 12
0 2.6 22.6223017 B 3
1 0.22634238 2.37365762 -10.9404753
2 1.76302778 1.53668539 8.63724023
3 1.1997861 0.56324168 0.07857739
4 1.19453921 0.00524689 0.00399346
5 1.19427225 0.00026696 0.00020164
6 1.19425877 1.3481E-05 1.0178E-05
function newtonrap
format long
clear,clc
syms H
H0=input('ingrese la carga sobre la cresta del vertedor en pies H0=');
eps=10^-4;
i=0;
d=1;
Q=12;%cantidad de agua que pasa por el vertedor en (pies^3)/s
B=3;% ancho del vertedor en pies.
fH= 3.33*(B-0.2*H)*((H^3)^(1/2))-Q;
df=diff(fH,H);
fH=inline(fH);
df=inline(df);
disp('___________________________________')
disp('k Hi d f(H) ')
disp('___________________________________')
while d >= eps
H=H0-(fH(H0)/df(H0));
hH=fH(H);
d=abs(H-H0);
i=i+1;
H0=H;
fprintf('%0.5f %0.5f %0.5f %0.5f \n',i,H,d,hH)
end
end
ME
7 2.47156632 0.10161338 -19.8143812
8 3.00516941 0.53360309 16.6346624
9 2.76164293 0.24352648 -3.74352712
10 2.80637939 0.04473646 -0.50105463
1) 11 2.81329245 0.00691306 0.019432 P 10
12 2.81303435 0.00025809 -9.436E-05 R 0.08205
13 2.8130356 1.2472E-06 -1.762E-08 a 3.599
TO
b 0.04267
T 353
DO
2)
i
0
1
2
3
x1
2
1.5
1.21662768
1.19511625
d=Ixi+1 - xiI
0.28337232
0.02151143
f(xi+1)
-21.2697051
-20.7607871
DE Q
B
12
3
SEC
4 1.19426081 0.00085544 -20.7404215
5 1.19425805 2.7586E-06 -20.7403558
6 1.19425805 3.4384E-10 -20.7403558
7 1.19425805 2.2204E-16 -20.7403558
AN
METODO DE
LA FALSA
POSICIÓN
1) P 10
R 0.08205
I a XD XI 3.599 XM FxD Fxi fXm d=Ixm
b 0 3 0.04267 1 1.99422104 16.1302807 -15.9449193 -30.5508401
T 1 3 1.99422104
353 2.65246128 16.1302807 -30.5508401 -10.7694009 0.65824024
2 3 2.65246128 2.79159987 16.1302807 -10.7694009 -1.59626493 0.13913859
3 3 2.79159987 2.81036618 16.1302807 -1.59626493 -0.20152824 0.01876631
4 3 2.81036618 2.81270619 16.1302807 -0.20152824 -0.02491138 0.00234001
5 3 2.81270619 2.812995 16.1302807 -0.02491138 -0.00307128 0.00028881
6 3 2.812995 2.8130306 16.1302807 -0.00307128 -0.00037853 3.56E-05
7 3 2.8130306 2.81303498 16.1302807 -0.00037853 -4.6652E-05 4.3875E-06
8 3 2.81303498 2.81303552 16.1302807 -4.6652E-05 -5.7495E-06 5.4073E-07
9 3 2.81303552 2.81303559 16.1302807 -5.7495E-06 -7.0858E-07 6.6642E-08
10 3 2.81303559 2.8130356 16.1302807 -7.0858E-07 -8.7328E-08 8.2131E-09
11 3 2.8130356 2.8130356 16.1302807 -8.7328E-08 -1.0763E-08 1.0122E-09
2) Q 12
B 3
0.5
0.25
0.125
DE
4 2.875 2.75 2.8125 4.9006627 -4.5520912 -0.04049804 0.0625
5 2.875 2.8125 2.84375 4.9006627 -0.04049804 2.37547086 0.03125
6 2.84375 2.8125 2.828125 2.37547086 -0.04049804 1.15394798 0.015625
7 2.828125 2.8125 2.8203125 1.15394798 -0.04049804 0.55335467 0.0078125
8 2.8203125 2.8125 2.81640625 0.55335467 -0.04049804 0.25558753 0.00390625
9 2.81640625 2.8125 2.81445313 0.25558753 -0.04049804 0.10733477 0.00195313
10 2.81445313 2.8125 2.81347656 0.10733477 -0.04049804 0.0333659 0.00097656
BIS
11 2.81347656 2.8125 2.81298828 0.0333659 -0.04049804 -0.00357918 0.00048828
12 2.81347656 2.81298828 2.81323242 0.0333659 -0.00357918 0.01489008 0.00024414
13 2.81323242 2.81298828 2.81311035 0.01489008 -0.00357918 0.00565463 0.00012207
14 2.81311035 2.81298828 2.81304932 0.00565463 -0.00357918 0.00103752 6.1035E-05
15 2.81304932 2.81298828 2.8130188 0.00103752 -0.00357918 -0.00127088 3.0518E-05
ECC
IÓN
2) Q 12
B 3