Está en la página 1de 8

FACULTAD DE INGENIERIA QUIMICA

E.P INGENIERIA QUIMICA INDUSTRIAL

SOLUCIONARIO DEL PRIMER EXAMEN PARCIAL

CATEDRA:
METODOS NUMERICOS
CATEDRATICO:
ING. HENRRY OCHOA LEON
ALUMNA:
VASQUEZ RIVAS MAYELI SHERLY

2021 – VERANO
SOLUCIÓN :

Ecuaciones de momentos en cada tramo:


−50 x 3
f ( x )= +265 x , (0 ≤ X ≤3)
9
f ( x )=−50 x 2 +415 x−150 ,(3< X ≤ 6)
f ( x )=−185 x +1650,(6< X ≤10)
f ( x )=100 x−1200,(10< X ≤ 12)

Determinando la posición en el cual el momento es cero:

Remplazar la función cuando f(x)=0 , para calcular la posición en la cual el


momento es cero. evaluamos cada tramo y obtuvimos la gráfica del momento
flector, podemos ubicar en que función evaluar para determinar la posición
donde el momento es cero:

function momentoflector
x=linspace(0,12,100);
y1=((-50*x.^3)./9+265*x).*(0<=x & x<=3);
y2=(-50*x.^2+415*x-150).*(3<x & x<=6);
y3=(-185*x+1650).*(6<x & x<=10);
y4=(100*x-1200).*(10<x & x<=12);
f=y1+y2+y3+y4;
plot(x,f)
grid on
800

700

600

500

400

300

200

100

-100

-200
0 2 4 6 8 10 12

Por lo tanto el momento cero se encuentra en la función 3 .porque cumple con las
restricciones (6<x & x<=10).

Calculando la posición del momento cuando es cero por el métodos


Newton Raphson:

function [n,m] = newton100(x0,er1)


er2=0;
m0=0;
for n=0:100
fx0=-185*x0+1650;%funcion donde se encuentra el momento
cero
dfx0=-185;
m=x0-fx0/dfx0;
x0=m;
er2= abs((m-m0)/m)*100;
m0=m;
if er2<=er1
break
end
end
SOLUCIÓN:
Formulando las funciones:

[ C ] ceq [ D ] deq
Kp1= a b
∗(RT ) ∆ n
[ A ]eq [ B ] eq
[ D ]eeq
Kp2= a C
∗(RT )∆ n
[ A ] eq [ C ] eq
Para la reacción 1.

Equilibrio A B C D
Moles inic. 2 1 0 0
Moles que x x - -
reaccionan
Moles que se - - x x
obtinen
Concentración 2-x 3-x x X
en equilibrio

x∗x
2.6=
( 2−x )∗(1−x)

x2
2.6=
2−3 x+ x 2

2.6 ( 2−3 x + x 2 )=x 2

( 5.2−7.8 x +2.6 x 2 )−x 2=¿0


( 5.2−7.8 x +1 .6 x 2 ) =0….f(1)

Para la reacción 2.

Equilibrio A C D
Moles inic. 2 X x
Moles que Y Y -
reaccionan
Moles que se - - 2Y+2x
obtinen
Concentración en 2-Y X-Y 2Y+2x
equilibrio

2( x + y )
3.1=
( 2−Y )∗( X−Y )
2 X +2 Y
3.1=
2 X−2 Y −YX+Y 2

( 6.2 X −6.2Y −3.1 XY + 3.1Y 2 ) −2 X−2 Y =¿0


( 4 .2 X−4 .2Y −3.1 XY + 3.1Y 2 ) =0…f(2)
#pregunta 2

#METODOS NUMERICOS

#MÉTODO DE NEWTON RAPHSON MULTIVARIABLE MODIFICADO

#ECUACION 1

f1=function(x,y) 5.2-7.8*x+1.6*x^2

df1x=function(x,y) 7.8+3.2*x #DERIVADA PARCIAL CON RESPECTO A "x"

#ECUACION 2

f2=function(x,y) 4.2*X-4.2*Y-3.1*X*Y+3.1*Y^2

df2y=function(x,y)-4.2-3.1*x+6.2*y #DERIVADA PARCIAL CON RESPECTO A "Y"

#VALORES INICIALES DE LAS VARIABLES

x=1

y=1

i=0

#ERROR

E=1

#TOLERANCIA

tol=1*10^-4

cat("-----------------------------------------------------------------------------------------------------------\n")

cat(formatC( c("Iteracion","x","y","Error"),width = -16, format = "f", flag = " "), "\n")

cat("-----------------------------------------------------------------------------------------------------------\n")

cat(formatC( c((i), (x),(y)), digits=5, width = -15, format = "f", flag = " "), "\n")

while(E>T){

i=i+1
x1=x-f1(x,y)/df1x(x,y)

y1=y-f2(x1,y)/df2y(x1,y)

E=((x1-x)^2+(y1-y)^2)^0.5

x=x1

y=y1

cat(formatC( c((i),(x),(y),(E)), digits=5, width = -15, format = "f", flag = " "), "\n")

cat("---------------------------------------------------------------------------\n")

print(paste("EL VALOR DE LA RAIZ ES:",x,y," EN LA ITERCION",i))

cat("---------------------------------------------------------------------------\n")

RESPUESTA

--------------------

Iteracion x y Error

-----------------------------------------------------------------------------------------------------------

0.00000 1.00000 1.00000

---------------------------------------------------------------------------

[1] "EL VALOR DE LA RAIZ ES: 1 1 EN LA ITERCION 0"

---------------------------------------------------------------------------

composición de salida en la primera reacción :

C :1 mol /LD :1mol / L

composición de salida para la segunda reacción:

D=2 x +2 y=4 mol/ L


function NRESTANDAR
xo=[0;0];
syms x y
fname=[900+10*(293-x)+(5.67*10^-8)*(0.9)*(277^4-x^4)+(5.67*10^-
8)*(0.45)*(y^4-x^4)+5*(y-x);(5.67*10^-8)*(0.45)*(x^4-y^4)+5*(x-
y)+15*(300-y)];
fprima=jacobian(fname);
tolerancia=10^-9;
maxiter=30;
iter=1;
f=inline(fname);
jf=inline(fprima);
error=norm(f(xo(1),xo(2)),2);
while error>=tolerancia
fxo=f(xo(1),xo(2));
fpxo=jf(xo(1),xo(2));
x1=xo-inv(fpxo)*fxo;
fx1=f(x1(1),x1(2));
error=norm((fx1),2);
fprintf('iter %2d raiz x=(%14.9f,%14.9f)f(x)=(%14.9f,
%14.9f)\n', iter,x1(1),x1(2),fx1(1),fx1(2));
if iter>maxiter
fprintf('Numero de iteraciones \n');
return;
end
xo=x1;
iter=iter+1;
end

RESPUESTA

iter 1 raiz x=( 382.213158667, 320.553289667)f(x)=(-1364.176743369,


275.126021969)
iter 2 raiz x=( 337.435948884, 311.824038863)f(x)=(-123.146287687,
40.264055102)
iter 3 raiz x=( 332.823102350, 311.785565841)f(x)=( -1.102599169,
0.367518369)
iter 4 raiz x=( 332.781159077, 311.785565121)f(x)=( -0.000089492,
0.000029831)
iter 5 raiz x=( 332.781155672, 311.785565121)f(x)=( -0.000000000,
0.000000000)

También podría gustarte