Upload
escolaralex
View
229
Download
0
Embed Size (px)
Citation preview
7/24/2019 Raices de Ec
1/40
Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
1
Ecuaciones algebraicas lineales
Ecuaciones algebraicas no lineales
Mtodos para una variable Mtodos para multivariable
3. Mtodos de resolucin
7/24/2019 Raices de Ec
2/40
Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
2
Ecuaciones Algebraicas
Lineales No lineales
Interval Halving(o bisection)
Succesive
Substitution(o fxed-point)
FalsePosition(o regula alsi)
NewtonRap son
Wegstein
!ro"den
MetodosAnaliticos
MetodosNumericos
Secant
Ridder
Brent
#uller
$ogleg stepHoo% step
Para problemas multidimensionales
Ho&otop"
7/24/2019 Raices de Ec
3/40
Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
Systems of Linear Algebraic Equations
General Representation
a s are constant coefficients, bs are constants, x arethe unknown ariables, an! n is the number ofequations
nnnnnn
nn
nn
b xa xa xa
b xa xa xa
b xa xa xa
=+++
=+++
=+++
2211
22222121
11212111
Analysis of System LAE
Consistent, independent equations " #f equations are not contra!ictory an! not simply multiplies of
the other, then solution to LAE problems will be unique$ " E%ample&
Inconsistent equations " #f equations are contra!ictory, then no solution e%ists$ " E%ample&
12
423
=+=+
y x
y x
12
22
=+=+
y x
y x
Analysis of System LAE '()
Dependent equations " #f equations are multiplies of others, many solutions can be
foun!
" E%ample&
Ill-conditioned equations " #f a small change in any of the coefficients will change the
solution set from unique to either infinite or empty, thesystem of LAE is calle! to be ill*con!itione!$
" +umerical solution will be !ifficult " E%ample&
22424
=+=+
y x y x
12
42)4(=+
=++ y x
y x
Ecuaciones algebraicas lineales
7/24/2019 Raices de Ec
4/40
Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
!
Gauss Elimination * Concept
If two equations have a point in common, then that point alsosatisfies any linear combination of the two equations $ " Suppose that are the solutions to linear
equations
then also satisfies the linear combination of theselinear equations&
[ ]nr r r r ,,, 21 =
0:
0:
2211
2211 =++++=++++
nno
nno xb xb xbbT
xa xa xaaS
[ ]nr r r r ,,, 21 =
T mS m 21 +
0222211221221111 =+++++++++ nnonno xbm xbm xbmbm xam xa xamam
Gauss Elimination Algorithm
$ A!! a multiple of row onto row to form a new row
($ Repeat ' ) until we get an upper 'or lower) triangular matri% of LAE coefficients-
.$ Apply back substitution to sol e for each ariable
m i R j R j R
ji j RmR R +
Step & /orwar! elimination until we get the upper 'or lower)triangular matri% of LAE coefficients
Step (& 0ackwar! substitution
1itfalls of the Gauss Elimination
2hen !oes the Gauss elimination get solution3 " 2hen in erse of e%ists
" 2hen equations are consistent an! in!epen!ent " Satisfy the following rank con!ition&
Limitation of algorithm " 2hen pivot element equals zero " 2hen pi ot element is significantly smaller than the coefficient
being use! to eliminate 'or #ll*con!itione!) " Roun!*off errors
b A x
b x A1=
=
)dim()( A Arank =
Ecuaciones algebraicas lineales
7/24/2019 Raices de Ec
5/40
Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
"
L4 5ecomposition * Concept
A matri% A is !ecompose! 'or factorise!) into lower an! uppermatri% factors, for e%ample if A is a .%. matri%&
6etho!s to fin! L4 factors " Gauss elimination '5oolittle form) " 5irect computation
Crout form ' ) Cholesky form ' )
==
333231
232221
131211
33
2322
131211
333231
2221
11
00
0.0
00
.
aaa
aaa
aaa
u
uu
uuu
U L A
1=iiuiiiiu = 6oti ation for L4 5ecomposition
Sol e the LAE 1roblems in a more efficient way
Algorithm for sol ing an LAE 1roblem using the L45ecomposition
" /in! the L4 factor of the A matri%& A 7 L4 Algebraic problem is transforme! from A x 7 b to L4 x 7 b
" 5efine y 7 4 x " Sol e for y using the 8forwar! substitution9 " Sol e for x using the 8backwar! substitution9
Ecuaciones algebraicas lineales
7/24/2019 Raices de Ec
6/40
Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
#Ecuaciones algebraicas lineales
Step 2 & Rows an! ( are unchange!$ Rows . an! : aretransforme! by
to yiel!&
Step 3 & ;he fourth row is mo!ifie! to complete the forwar!eliminating stage by&
to yiel!&
7/24/2019 Raices de Ec
7/40Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
$
L4 5ecompositionusing =rout 6etho!
0ase! on equating the elements of the pro!uct with thecorrespon!ing elements of , where the !iagonal elements ofare s $ /or a . % . matri%
Algorithm " Step & Set , then sol e for the remaining elements in
the first row of an! the first column of $ " Step (& /in! , then sol e for the remain!er of the secon!
row of an! the secon! column of " =ontinue for the rest
LU A U
=
333231
232221
131211
23
1312
333231
2221
11
100
10
1
0
00
aaa
aaa
aaa
u
uu
1111 a=
U L22
U L
General /ormula for =routs 6etho!
General formula for the first column of L, the first row of 4 an! the!iagonal element of 4
General formula for the >*th row of L an! the >*th column of 4& " /or >7 (, ., ?, n* - i 7 >, >@ , ?, n- an! k 7 >@ , >@(, ?, n
General formula for the last row of L
1;;11
111,1 === ii
j jii uaua
=
=
1
1
j
k kjik ijij ua
jj
j
iik ji jk
jk
uau
=
=
1
1
=
=
1
1
j
k knnk nnnn ua
Ecuaciones algebraicas lineales
7/24/2019 Raices de Ec
8/40Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
%
L4 5ecompositionusing =holeskys 6etho!
;he matri% is symmetric an! positi e !efinite$
/or a . % . matri%&
Algorithm& " /in! , then sol e for the remaining elements in the
first row of an! the first column of $ " /in! , then sol e for the remain!er of the secon! row of
an! the secon! column of " =ontinue for the rest$
AT T LL AU L ==
=
333231
232221
131211
3
232
13121
33231
221
1
00
00
00
aaa
aaa
aaa
x
u x
uu x
x
x
x
2/1111 )(a x =
U L2 x U
L
GeneraliAation of =holeskys 6etho!
/or the " *th row
=
=
=
=
=
1
1
2
1
1 1,,2,1
k
jkjkk k
ii
i
jkjijki
ki
a x
k ia
Ecuaciones algebraicas lineales
7/24/2019 Raices de Ec
9/40Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
&
function [L,U] = Cholesky(A)%
% A is assumed to be symmetric%[n,m] = size(A)L = zeros(n,n)for k=!"n,
L(k,k) = s#rt(A(k,k)$L(k,!"k$!) L(k,!"k$!)&)for i=k'!"n,
L(i,k) = (A(i,k) $ L(i,!"k$!) L(k,!"k$!)&) L(k,k)end
endU = L&
==
64325
32204
541
00
0.0
00
64325
32204
541
3
232
13121
33231
221
1
x
u x
uu x
x
x
x
A
First row of U a d first !o"#m of $
%ot& t'at d#& t'& s mm&tri!:
&!o d row of U a d s&!o d !o"#m of $
*& +&t:
5.;4.
5.;4.;1.
31311312121121
1313131121212111111
==========
a xa x
uau xuau x xa x x
j j j j uaa 1111 ==
=6432532204
541
000
541
.5
04
001
3
232
332
2
xu x
x x
;632)4).(5(
;632)5).(4(
;220)4).(4(
21232
23232
222
==+==+
==+
x
uu x
x x
=64325
32204
541
00
620
541
.
65
024
001
33 x x
;364)6).(6()5).(5( 3323
==++ x x
==
300
620
541
;
365
024
001
U L
MATLABsCode
7/24/2019 Raices de Ec
10/40Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
1'
- / - 1 /
( 1)2( 2*!2( 1)( 2*1
3 22 1
1 02 1
1 02 1
1 00 1
41
21
21
25
+ 1,*+ 1-2+ 2
+ 1,*-+ 1
+ 2,*-2+ 1)+ 2
- 1 2 -2 5
escomposicin de /auss
Inversa de la matriz
E0emplo
7/24/2019 Raices de Ec
11/40Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
11
Bariations of Algorithm
Jacobi Method " 0ase! on the transformation of to , in which the
matri% has eros on the !iagonal$ ;he ector is up!ate! usingthe pre ious estimate for all components of to e aluate the righthan! si!e of the equation ' simultaneous up#atin$ )$
Gauss-Seidel Method " 0ase! on the transformation of to , in which the
matri% has eros on the !iagonal as in Cacobi metho!, but eachcomponent of the ector is up!ate! imme!iately as each iterationprogresses ' sequential up#atin$ )$
Successive ver !ela"ation #S !$ Method " Like Gauss*Sei!el metho!, but we intro!uce an a!!itional
parameter , that may accelerate the con ergence of iteration$ /or, the metho! is known as successi e un!er rela%ation,
while for is known as successi e o er rela%ation$
b Ax = d Cx x +=C x
x
b Ax = d Cx x +=C
x
10
7/24/2019 Raices de Ec
12/40Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
12
SDR 6etho!
E%ample
" SDR #terati e Scheme
#t can be seen that if , it becomes the iterati e scheme forGauss*Sei!el metho!$ ;he parameter is selecte! to impro e thecon ergence of algorithm$
3333232131
2323222121
1313212111
b xa xa xa
b xa xa xa
b xa xa xa
=++=++=++
( )
( )
( )newnewold new
old newold new
old old old new
xa xaba
x x
xa xaba
x x
xa xab
a
x x
232131333
33
323121222
22
3132121
11
11
)1(
)1(
)1(
+=
+=
+=
1=
#mplementation for 5ifferent 6etho!s
Jacobi Method " #terati e Scheme&
" #nitial con!ition guess& " Stopping criteria
Gauss-Seidel Method " #terati e Scheme
" #nitial con!ition guess " Stopping criteria
+
=
5.1
3
5.0
05.05.0
5.005.0
5.05.00
13
12
11
3
2
1
k
k
k
k
k
k
x
x
x
x
x
x
5.15.05.0
35.05.0
5.05.05.0
213
312
321
+=
++==
newnewnew
old newnew
old old new
x x x
x x x
x x x
[ ]T o x 000=
[ ]T o x 000=
001.01
7/24/2019 Raices de Ec
13/40Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
1
Simple E%ample of ;ransformation
32
62
12
321
321
321
=+=+
=+
x x x
x x x
x x x
5.15.05.0
35.05.0
5.05.05.0
213
312
321
+=++=
=
x x x
x x x
x x x
b Ax = d Cx x +=
7/24/2019 Raices de Ec
14/40Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
1!
Objetivo
Sea !"# una uncin no lineal en ". $allar el %alorde "& x *& tal 'ue se cumple f(x*)=0 .
x* se suele denominar el cero o ra() de !"#
x* se puede determinar por medios anal(ticos!solucin e"acta# o por medios numricos!solucin apro"imada#
La eleccin del mtodo numrico depende delproblema a resol%er !estructura del problema& tipode ecuaciones& precisin re'uerida& r*pide) del
c*lculo&....#.Por tanto no existe un mejor mtodo universalmenteaplicable.
Ecuaciones algebraicas no lineales
Mtodos acotados !brac+eting met,ods# Mtodos abiertos !open met,ods#
-ipos de mtodos
7/24/2019 Raices de Ec
15/40Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
1"
Mtodosacotados
Base /na uncin cambia de signo en la pro"imidad de
una ra() /na ra() est* acotada en el inter%alo 0a&b1 si el signo de
!a# es di erente al signo de !b#
a b
f ( x)
xid oi t
+e%t estimate of 0isection
0isection 6etho!
f (a)
f (b)
0a&b1
0nue%opunto1
2. Selecciona un inter%alo 0a&b1 donde,alla un cero
. 4alcula el punto medio como nue%o
punto3. 4omprueba si ,a5 cambio de signo
en 0a&p1 o en 0p&b1. 4omprobacin!a#6 !p#.
7. Si el producto es cero& entonces p esuna raz . Si no es cero %ol%er alpunto .
Algoritmo
Mtodo de la biseccin (o intervalomedio)
7/24/2019 Raices de Ec
16/40Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
1#
Ejemplo Mtodo biseccin ( ntervalo medio)
042
= x
[ ] [ ][ ] [ ]
[ ] [ ][ ] [ ]
[ ]25.2,875.1875.1,5.125.2,5.1
3,25.23,5.1
5.1,03,0
6,36,0
signocambiano
signocambiano
signocambiano
1$
7/24/2019 Raices de Ec
17/40Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
1$Ecuaciones algebraicas no lineales
Mtodo de la posicin falsa
a b
f ( x)
xt&rs&!tio oi t
+e%t estimate of /alse*position
/alse*1osition 6etho!
f (a)
f (b)
0nue%opunto1
0a&b1
2. Selecciona un inter%alo 0a&b1 donde,alla un cero
. 4alcula un punto interseccin comonue%o punto
3. 4omprueba si ,a5 cambio de signoen 0a&p1 o en 0p&b1. 4omprobacin
!a#6 !p#.
7. Si el producto es cero& entonces p esuna raz . Si no es cero %ol%er alpunto .
Algoritmo
( ) ( ) ( ) )
( ) ( )
f a f b f b a bm b
m a m b f a f b
89 : 9 8
8 8 8
1%
7/24/2019 Raices de Ec
18/40Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
1%
0 1
2,6
3
18,6
15
;
? @
;
? @L
F,
(y @ : 7 % % 7
.
.( (F ( Hy @ 7 '% * ) % 7
I . . J
042
= x
Ejemplo mtodo de la posicin falsa (!e"#la $alsi)
1&E i l b i li l
7/24/2019 Raices de Ec
19/40Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
1&
=on ergence Rate
%umber of iterations
& e
l a t i v e
' r r o r s
%alse-position method
&isection method
F
Ecuaciones algebraicas no lineales
%imilaridades& Ambos mtodos necesitan DOS valores
iniciales Re'uieren un procedimiento para determinar
el cambio de signo. Acaban convergiendo a la ra() con cierta
tolerancia
'iferencias& El c*lculo del nue%o punto estimado se ,ace
con diferentes estrategias En general el mtodo de la posicin alsa
con%erge m*s r*pido 'ue el de la biseccin.
omparacin entre ambosmtodos
2'E i l b i li l
7/24/2019 Raices de Ec
20/40Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
2'Ecuaciones algebraicas no lineales
Mtodos abiertos
Emplean una apro"imacin uncional para obtener el nue%o %alorestimado de la ra() !l(nea recta& cuadr*tica& polinomio# Mtodos
Punto8 o !sustitucin sucesi%a o directa# NeCton8Rap,son !l(nea recta empleando in ormacin del
gradiente# Secante !l(nea recta empleando dos puntos# Muller !apro". cuadr*tica empleando tres puntos#
21E i lg b i li l
7/24/2019 Raices de Ec
21/40Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
21Ecuaciones algebraicas no lineales
Mtodos acotados
La ra() est* situada en un inter%alo !necesita dos puntos#.Acaba con%ergiendo dentro de una tolerancia.
Mtodos abiertosSlo emplean un punto inicial !o dos puntos 'ue no tienen
por 'u contener a la ra()# 5 una rmula para encontrar lara(). No siempre con%ergen & pero cuando lo ,acen sonmuc,o m*s r*pidos 'ue los mtodos acotados.
Metodos acotados %s. Mtodosabiertos
22Ecuaciones algebraicas no lineales
7/24/2019 Raices de Ec
22/40Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
22Ecuaciones algebraicas no lineales
Rai)
xxx x
="(x)
=x
0+ ,
xx xx x
*
*="(x)
*=x
0 +- ,
Sustitucinsucesi%a Proble&a (x)'
2. -rans ormar a "9g!"#
. Seleccionar un punto inicial " D
3. 4alcular nue%o %alor " i 2 9g!" i#
7. Repetir ,asta llegar a la toleranciare'uerida
Si
."/
(x). , El algoritmo converge
linealmente
."/(x).1=, El algoritmo diverge
2
7/24/2019 Raices de Ec
23/40Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
2
042 = x
(
(
(
% 7 % * : @ %
% 7 %'% * .)
g'%) 7 %'% *.)
K (F
(k@, k k
(,
((
g '% ) 7 .% * . 7 . * . 7 F
% 7 % '% * .)
% 7 ' * .) 7 *(
% 7 *(''*() * .) 7 *(
K (F
(,
((
g '% ) 7 .% * . 7 . M I * . 7 (: N ,
% 7 .'. * .) 7 ,H% 7 ,H',H * .) 7 JOOH
Ejemplo Mtodo p#nto 2jo (%#stit#cin directa3s#cesiva)
10 = x
30 = x
F4on%ergeG
F4on%ergeG
2!Ecuaciones algebraicas no lineales
7/24/2019 Raices de Ec
24/40Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
2!Ecuaciones algebraicas no lineales
NeCton Rap,son Proble&a g(x)'2. Seleccionar un punto inicial " D
. 4alcular g!" i# 5 gH!" i#
3. Aplicar la tangente en ese punto 5 en el cortecon el e e de abcisas tenemos el nue%o puntoestimado
7. Repetir ,asta llegar a la tolerancia re'uerida
" i 2 9" i8g!" i#gH!"i#
xx xx 0+ ,
"(x) Necesita conocer la deri%ada de
la uncin 4on%ergencia cuadr*tica
!r*pida# Puede no con%erger !depende
de la uncin 5 de laestimacin inicial #
2"
7/24/2019 Raices de Ec
25/40Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
2
042
= x
1223
5.12)45.1(5.1
5.112
)41(1
2)4(
2
2
2
1
0
20
01
=
=
=
=
=
x
x
x x
x x
006,21666.22
)41666.2(1666.2
1666.232
)43(3
2)4(
2
2
2
1
0
20
01
=
=
=
=
=
x
x
x x
x x
Ejemplo 4e5ton Met6od
30 = x10 = x
2#Ecuaciones algebraicas no lineales
7/24/2019 Raices de Ec
26/40Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
2#Ecuaciones algebraicas no lineales
xxx xx 0+- ,
"(x)
Proble&a g(x)'
2. Seleccionar dos puntos iniciales " D&"2
. 4alcular la recta 'ue pasa por esos puntos
3. El corte con el e e de abcisas da el nue%opunto estimado. Iol%er a calcular la recta.
7. Repetir ,asta llegar a la tolerancia re'uerida
" i 2 9" i8" i 2 8"i
g !" i 2 #8g!" i#
g !" i 2 #
Secante
No Necesita conocer laderi%ada de la uncin !laapro"ima#.
Necesita dos puntos iniciales. Puede no con%erger.
2$Ecuaciones algebraicas no lineales
7/24/2019 Raices de Ec
27/40
Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
2$Ecuaciones algebraicas no lineales
8At the first iteration, both metho!s pro!uce the same estimate$ After that, each metho! has a !ifferent estimate9$
%,
%F%. %(
y
% %,%F
%.%(
y
%
/alse*position Secant metho!
La primera iteracin da el mismo resultado luegocada uno obtiene un nuevo punto estimadodiferente
2%
Ecuaciones algebraicas no lineales
7/24/2019 Raices de Ec
28/40
Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
f ( x)
x x2
%&-t &stimat& of #""&r
ara o"i!
6ullers 6etho!
x0 x1
6ullers Algorithm
$ Select three points P x o,f ' x o)Q- P x ! ,f ' x ! )Q an! P x 2 ,f ' x 2 )Q($ =ompute the coefficients a , b an! c
.$ Apply a qua!ratic formula to calculate the nextestimate of the ero
:$ Repeat step (*. until satisfying the con ergentcriteria
acbb
c x x
4
2223
= Real an! comple% root=an be locate!
2hich point is !iscar!e! in 6uller Algorithm
;wo general strategies are typically use!&
" #f only real roots are being locate!, we choose the two originalpoints that are nearest the new root estimate, % .
" #f both real an! comple% roots are being e aluate!, a sequentialapproach is employe!$ ;hat is >ust like the secant metho!, % , %(an! % . take place of % F, % an! % ( $
Ecuaciones algebraicas no lineales
2( ) ( ) ( )i i g x a x x b x x c9 8 8
6 Se computan obligando a 'ue g!"# pasepor los 3 puntos seleccionados.
6
2&Ecuaciones algebraicas no lineales
7/24/2019 Raices de Ec
29/40
Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
5ifficulties with multiple root problems
;he fact that the function !oes not change sign at e en multipleroots$ So, the bracketing strategy cannot be applie! ;he fact that not only f '%), but also f '%), goes to ero at the root$
1ossible problems for +ewton*Raphson an! Secant metho!s S '()I * & 4se the mo!ifie! +ewton*Raphson metho!s
" +lternative one & #f we ha e m multiple roots, the up!ate! estimatefollows&
" +lternative t,o & 4se the ratio of the function to its !eri ati e, an!then apply the +ewton*Raphson formula for this ratio function
)()(
1k
k k k x f
x f m x x =+
[ ] )()()()()(
)()(
)()(
)(
21k k k
k k k
k
k k k
k
k k
x f x f x f
x f x f x
xu xu
x x
x f x f
xu
=
=
=
+
Ecuaciones algebraicas no lineales
'Ecuaciones algebraicas no lineales
7/24/2019 Raices de Ec
30/40
Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
1 1 2 3
2 1 2 3
3 1 2 3
1 2 3
( , , , ..., ) 0
( , , , ..., ) 0
( , , , ..., ) 0
( , , , ..., ) 0
( ) 0
n
n
n
n n
f x x x x
f x x x x
f x x x x
f x x x x
F X
=
=
=
=
=
M
%istemas de ec#aciones al"ebraicas no
lineales
Ecuaciones algebraicas no lineales
1Ecuaciones algebraicas no lineales
7/24/2019 Raices de Ec
31/40
Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
g
La sobrerela acin es una tcnica para acelerar la con%ergencia demtodos iterati%os en la solucin de ecuaciones lineales. La idea esaplicarlo al mtodo de sustitucin sucesi%a.
Se dan pesos a los %alores anteriores 5 a los pre%ios con el n de darpasos Jma5oresK ,acia la solucin.
7 89, =:7 8 9(,;:)"(7 8 )
'9D sustitucin sucesi%a ' D aceleracin de la con%ergencia D ' 2 estabili)acin de la con%ergencia por
amortiguamiento
Sustitucin sucesi%aacelerada
2Ecuaciones algebraicas no lineales
7/24/2019 Raices de Ec
32/40
Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
g
7/24/2019 Raices de Ec
33/40
Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
En los problemas de diagrama de !ujo las variables de iteracin no est"n todasmu# acopladas ni todas desacopladas nos podemos encontrar$
%& 'odas las especies dbilmente acopladas a travs de e(uilibrio L)* +no ideal&
,& Especies mu# acopladas si participan en una reaccin-& Si a# m"s de una corriente de rasgado a# un fuerte acoplamiento entre los
!ujos de cada corriente de rasgado.
/uando las variables est"n desacopladas o dbilmente acopladas es necesario un par"metro de aceleracin diferente para cada variable.
!Ecuaciones algebraicas no lineales
7/24/2019 Raices de Ec
34/40
Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
El mtodo de 0egstein es mu# bueno para particiones en las (uea# una 1nica corriente de rasgado. O cuando a# reciclo sin estar
los componentes mu# acoplados +presencia de reaccin&
"Ecuaciones algebraicas no lineales
7/24/2019 Raices de Ec
35/40
Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
1, 2, ,
1, 2, ,
1, 2, ,
1 1 1
1 2
2 2 2
1 2
1 2
( )
i i n i
i i n i
i i n i
n x x x
n x x xi
n n n
n x x x
f f f x x x
f f f x x x J X
f f f x x x
=
L
M M
L
L
M
11 ( ) ( )i i i i X X J X F X
+ =
NeCton Rap,son En lugar de la deri%ada emplea el acobiano !matri) de
deri%adas parciales# La estimacin del nue%o con unto de ra(ces se computa
mediante la siguiente ecuacin
2acobiano
3/mo resolver4as laecuacin anterior sin tener
(ue calcular la inversa de lamatri5 jacobiana6
#Ecuaciones algebraicas no lineales
7/24/2019 Raices de Ec
36/40
Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
1( )( ) ( )i i i i J X X X F X + =
( )( ) ( )i i J X X F X = AX b=
1
1
( )i i
i i
X X X
X X X +
+
= = +
NeCton Rap,son8 procedimiento de resolucin
*entajas$
a& :uena convergencia +cuadr"tica&b& :ueno para diagramas de !ujo con muc a interaccin #a (ue estainteraccin se tiene en cuenta en el 2acobiano.Desventajas$a& ;e(uiere unas estimaciones iniciales buenasb& /omo las funciones no se conocen expl4citamente el 2acobiano seaproxima de forma numrica.
$Ecuaciones algebraicas no lineales
7/24/2019 Raices de Ec
37/40
Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
Mtodo de Bro5den No calcula el acobiano& lo apro"ima empleando %alores
pre%ios de " 5 !"#. W es la apro"imacin a la negati%a de la in%ersa del
acobiano. Es una e"tensin del mtodo de la secante !o mtodo 'uasi8
NeCton#
1 ( )i
i i i X X W F X
+ =
1 ( )T
T
i i i i ii i
i i i
W y W W W
W y+ +=
1
1( ) ( )
i i i
i i i
X X
y f X f X
+
+
= =
1mi i i
i i i
W W
W y
E 8
9
%
7/24/2019 Raices de Ec
38/40
Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
*entajas$ Slo re(uiere una
7/24/2019 Raices de Ec
39/40
Modelado y simulacin en Ingeniera Qumica. Manuel Rodrguez
6A;LA0 0uilt in /unction ' )
;he built in f ero function ' (ptimization )oolbox ) is a hybri!metho! that combines bisection, secant an! re erse qua!raticinterpolation to a fin! the root of f ' x ) 7 F
" Synta%&
% 7f ero ' fun,%F)
TF can be scalar or a two element ector #f %F is a scalar, f ero tries to create its own b racket #f %F is a two element ector, f ero uses the ector as a bracket
6A;LA0 0uilt in /unction '()
;he built in fsolve function ' (ptimization )oolbox ) is an 6*filefunction to sol e a system of nonlinear equations&
" Synta%&
% 7 fsolve ' fun,%F)
%F is a ector of initial estimate of the roots
0),,,(
0),,,(
0),,,(
21
212
211
=
==
nn
n
n
x x x f
x x x f
x x x f
!'Ecuaciones algebraicas no lineales
7/24/2019 Raices de Ec
40/40
+solve
o" & a s st&m of o "i &ar & #atio s for x, w'&r& x is a &!tor a d F!x" is a f# !tio t'at r&t#r s a
&!tor a"#&.ynta(
" 9 sol%e! un&"D# " 9 sol%e! un&"D&options#" 9 sol%e! un&"D&options&P2&P & ... #0"& %al1 9 sol%e!...#0"& %al&e"it ag1 9 sol%e!...#0"& %al&e"it ag&output1 9 sol%e!...#0"& %al&e"it ag&output& acobian1 9 sol%e!...#