Newton Algorithm: Difference between revisions

From OpenSeesWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{CommandManualMenu}}
{{CommandManualMenu}}


This command is used to construct a NewtonRaphson algorithm object. The command is of the follwoing form:
This command is used to construct a NewtonRaphson algorithm object which is uses the Newton-Raphson algorithm to solve the nonlinear residual equation. The Newton-Raphson method is the most widely used and most robust method for solving nonlinear algebraic equations. The command is of the following form:


{|  
{|  
| style="background:yellow; color:black; width:800px" | '''algorithm Newton'''
| style="background:lightgreen; color:black; width:800px" | '''algorithm Newton <-initial> <-initialThenCurrent>'''
|}
 
 
 
{|
|  style="width:150px" | '''-initial''' || optional flag to indicate to use initial stiffness iterations
|-
| '''-initialThenCurrent''' || optional flag to indicate to use initial stiffness on first step, then use current stiffness for subsequent steps
|}
|}


Line 10: Line 18:
----
----


NOTES:
REFERENCES:


[http://en.wikipedia.org/wiki/Newton%27s_method Read the page at Wikipedia]


----
----
Line 17: Line 26:
THEORY:
THEORY:


The Newton (also known as Newton-Raphson) method is the most widely used and robust method for slving nonlinear algrebraic equations. The Newton method used in finite element analysis is identical to that taught in basic calculus courses. The method as taught in basic calculus, is a root-finding algorithm that uses the first few terms of the Taylor series of a function f(x) in the vicinity of a suspected root to find the root. Newton's method is sometimes also known as Newton's iteration, although in this work the latter term is reserved to the application of Newton's method for computing square roots.
The Newton method used in finite element analysis is identical to that taught in basic calculus courses. It is just extended for the n unknown degrees-of-freedom. The method as taught in basic calculus, is a root-finding algorithm that uses the first few terms of the Taylor series of a function <math>f(x)\,\!</math> in the vicinity of a suspected root <math>x_n\,\!</math> to find the root <math>x_{n+1}\,\!</math>. Newton's method is sometimes also known as Newton's iteration, although in this work the latter term is reserved to the application of Newton's method for computing square roots.


The Taylor series of <math>r(x)\,\!</math> about the point <math>x=x_n+\Delta x\,\!</math> is given by


The Taylor series of <math>f(x)</math> about the point <math>x=x_0+\epsilon</math> is given by
:<math>f(x_n+\Delta x) = f(x_n)+r^{'}(x_n)\Delta x + 1/2r^{''}(x_n) \Delta x^2+....\,\!</math>


<math> R_{t+\Delta t}^i = F_{t + \Delta t}^{ext} - F(U_{t + \Delta t}^{i-1})^{int} - C \dot U_{t+\Delta t}^{i-1} - M \ddot U_{t+ \Delta t}^{i-1}</math>
Keeping terms only to first order,


:<math>f(x_n+\Delta x) \approx f(x_n)+r^'(x_n)\Delta x  = f(x_n)+ \frac{df(x_n)}{dx}\Delta x</math>


<math>f(x_0 + \epsilon) = f(x_0)+f^'(x_0) \epsilon + 1/2f^('')(x_0) \epsilon^2+....</math>
and since at the root we wish to find <math>x_n + \Delta x</math>, the function equates to 0, i.e. <math>f(x_n+\Delta x) = 0</math>, we can solve for an approximate <math>\Delta x</math>


Keeping terms only to first order,
:<math> \Delta x \approx  -\frac{f(x_n)}{f^'(x_n)} = - \frac{df(x_n)}{dx}^{-1}f(x_n)</math>
<math>f(x_0+\epsilon) \approx f(x_0)+f^'(x_0)\epsilon <math>
 
(2)
The Newmark method is thus an iterative method in which, starting at a good initial guess <math>x_0\,\!</math> we keep iterating until our convergence criteria is met with the following:
 
:<math> \Delta x = - \frac{df(x_n)}{dx}^{-1}f(x_n)\,\!</math>
 
:<math> x_{n+1} = x_n + \Delta x\,\!</math>
 
 
 
The method is generalized to n unknowns by replacing the above scalar equations with matrix ones.
 
:<math>R(U_n+\Delta x) = R(U_n)+\frac{\partial R(U_n)}{\partial U} \Delta U + O(\Delta U ^2) \,\!</math>
 
The matrix <math>\frac{\partial R(U_n)}{\partial U}\,\!</math> is called the system Jacobian matrix and will be denoted K:
 
:<math>K = \frac{\partial R(U_n)}{\partial U}\,\!</math>
 
 
resulting in our iterative procedure where starting from a good initial guess we iterate until our [[Test_Command | convergence criteria]] is met with the following:


Equation (2) is the equation of the tangent line to the curve at (x_0,f(x_0)), so (x_1,0) is the place where that tangent line intersects the x-axis. A graph can therefore give a good intuitive idea of why Newton's method works at a well-chosen starting point and why it might diverge with a poorly-chosen starting point.
:<math> \Delta U = - K^{-1}R(U_n),\!</math>


This expression above can be used to estimate the amount of offset epsilon needed to land closer to the root starting from an initial guess x_0. Setting f(x_0+epsilon)=0 and solving (2) for epsilon=epsilon_0 gives
:<math> U_{n+1} = U_n + \Delta U\,\!</math>
epsilon_0=-(f(x_0))/(f^'(x_0)),
(3)


which is the first-order adjustment to the root's position. By letting x_1=x_0+epsilon_0, calculating a new epsilon_1, and so on, the process can be repeated until it converges to a fixed point (which is precisely a root) using
epsilon_n=-(f(x_n))/(f^'(x_n)).


----
----


Code Developed by: <span style="color:blue"> fmk </span>
Code Developed by: <span style="color:blue"> fmk </span>

Latest revision as of 18:24, 17 May 2013




This command is used to construct a NewtonRaphson algorithm object which is uses the Newton-Raphson algorithm to solve the nonlinear residual equation. The Newton-Raphson method is the most widely used and most robust method for solving nonlinear algebraic equations. The command is of the following form:

algorithm Newton <-initial> <-initialThenCurrent>


-initial optional flag to indicate to use initial stiffness iterations
-initialThenCurrent optional flag to indicate to use initial stiffness on first step, then use current stiffness for subsequent steps



REFERENCES:

Read the page at Wikipedia


THEORY:

The Newton method used in finite element analysis is identical to that taught in basic calculus courses. It is just extended for the n unknown degrees-of-freedom. The method as taught in basic calculus, is a root-finding algorithm that uses the first few terms of the Taylor series of a function <math>f(x)\,\!</math> in the vicinity of a suspected root <math>x_n\,\!</math> to find the root <math>x_{n+1}\,\!</math>. Newton's method is sometimes also known as Newton's iteration, although in this work the latter term is reserved to the application of Newton's method for computing square roots.

The Taylor series of <math>r(x)\,\!</math> about the point <math>x=x_n+\Delta x\,\!</math> is given by

<math>f(x_n+\Delta x) = f(x_n)+r^{'}(x_n)\Delta x + 1/2r^{}(x_n) \Delta x^2+....\,\!</math>

Keeping terms only to first order,

<math>f(x_n+\Delta x) \approx f(x_n)+r^'(x_n)\Delta x = f(x_n)+ \frac{df(x_n)}{dx}\Delta x</math>

and since at the root we wish to find <math>x_n + \Delta x</math>, the function equates to 0, i.e. <math>f(x_n+\Delta x) = 0</math>, we can solve for an approximate <math>\Delta x</math>

<math> \Delta x \approx -\frac{f(x_n)}{f^'(x_n)} = - \frac{df(x_n)}{dx}^{-1}f(x_n)</math>

The Newmark method is thus an iterative method in which, starting at a good initial guess <math>x_0\,\!</math> we keep iterating until our convergence criteria is met with the following:

<math> \Delta x = - \frac{df(x_n)}{dx}^{-1}f(x_n)\,\!</math>
<math> x_{n+1} = x_n + \Delta x\,\!</math>


The method is generalized to n unknowns by replacing the above scalar equations with matrix ones.

<math>R(U_n+\Delta x) = R(U_n)+\frac{\partial R(U_n)}{\partial U} \Delta U + O(\Delta U ^2) \,\!</math>

The matrix <math>\frac{\partial R(U_n)}{\partial U}\,\!</math> is called the system Jacobian matrix and will be denoted K:

<math>K = \frac{\partial R(U_n)}{\partial U}\,\!</math>


resulting in our iterative procedure where starting from a good initial guess we iterate until our convergence criteria is met with the following:

<math> \Delta U = - K^{-1}R(U_n),\!</math>
<math> U_{n+1} = U_n + \Delta U\,\!</math>



Code Developed by: fmk