How can I solve the convergence problems when solving a nonlinear system of equartions with Newton Rapshon?
2 次查看(过去 30 天)
显示 更早的评论
Hi, I am trying to solve the following system of equations by Newton Raphson: R=S*X-Fe+Fnl,where S is a matrix,dim 3*NX3*N; X,Fe and Fnl vectors, dim 3*NX1. This last vector, Fnl, depends on X, the variable. The matrix S and the vector Fe are constant during the Problem. (R is the residual)
The first Iteration would be: X1=X0-R0*(dR0/dX)\ ,where R0 is R evaluated in X0 and (dR0/dX)\ the inverse of the matrix containing the derivatives of R respective X. That is: dR0/dX = S+ dFnl/dX. This matrix dFnl/dX is obtained numerically by finite differences. S, is a matrix that doesn´t Change.
To start the iterations I am considering the solution of the linear System: X0=S\*Fe. Then I evaluate the Fnl vector in X0 and obtain Fnl0. Fe and S are known and invariant.So I calculate R0=S*X0-Fe+Fnl0 I calculate dFnl0/dX by finite diferences dFnl0/dX=[Fnl(X+Delta)-Fnl(X)]/Delta, where: Delta=sqrt(eps)*norm(X0) (eps is the Floating-point relative accuracy) I can calculate then dR0/dX = S+ dFnl/dX I do that at every Iteration, until norm(X)<1e-12 It happens that for some values of the Parameters that define the vector Fnl the Problem isn´t converging. If anybody could help me please tryinf to find the solution I would be very grateful!!!I am not able to find a solution... Thank you very much!
6 个评论
Torsten
2015-2-13
As far as I understand, you want to have S*X-Fe+Fnl(X) = 0.
If X is the vector of unknowns and you can calculate S*X-Fe+Fnl(X) in every iteration given X, and S*X-Fe+Fnl has as many components as X (number of unknowns = number of equations), you can use fsolve to solve your system.
Best wishes
Torsten.
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!