chrono::ChStaticNonLinearIncremental Class Reference

Description

Nonlinear static analysis where the user can define external load(s) that will be incremented gradually during the solution process.

This improves the convergence respect to ChStaticNonlinear, where all the loads (both internal and external) are automatically scaled with a simplified prcedure. It is based on an outer iteration (incrementing external load) and inner iteration (for Newton iteration). A callback will be invoked when the loads must be scaled.

#include <ChStaticAnalysis.h>

Inheritance diagram for chrono::ChStaticNonLinearIncremental:
Collaboration diagram for chrono::ChStaticNonLinearIncremental:

Classes

class  LoadIncrementCallback
 Class to be used as a callback interface for updating the system at each step of load increment. More...
 

Public Member Functions

 ChStaticNonLinearIncremental (ChIntegrableIIorder &integrable)
 
virtual void StaticAnalysis () override
 Performs the static analysis, doing a non-linear solve.
 
void SetVerbose (bool verbose)
 Enable/disable verbose output (default: false)
 
void SetMaxIterationsNewton (int max_newton_iters)
 Set the max number of inner iterations for the Newton Raphson procedure (default: 5), where these iterations are preformed at each external load scaling step.
 
void SetIncrementalSteps (int incr_steps)
 Set the number of outer iterations that will increment the external load in stepwise manner. More...
 
void SetCorrectionTolerance (double reltol, double abstol)
 Set stopping criteria based on WRMS norm of correction and the specified relative and absolute tolerances. More...
 
void SetResidualTolerance (double tol)
 Set stopping criteria based on norm of residual and the specified tolerance. More...
 
int GetMaxIterations () const
 Get the max number of iterations for the Newton Raphson procedure.
 
int GetIncrementalSteps () const
 Set the number of steps for the outer iteration (the one that makes the external load grow).
 
void SetAdaptiveNewtonON (int initial_delay, double growth_tolerance)
 Enable the adaptive size in the inner Newton loop. More...
 
void SetAdaptiveNewtonOFF ()
 
void SetNewtonDamping (double damping_factor)
 Set damping of the Newton iteration. More...
 
void SetLoadIncrementCallback (std::shared_ptr< LoadIncrementCallback > my_callback)
 Set the callback to be called at each iteration.
 
- Public Member Functions inherited from chrono::ChStaticAnalysis
 ChStaticAnalysis (ChIntegrableIIorder &integrable)
 
ChIntegrableGetIntegrable ()
 Get the integrable object.
 
const ChStateGetX () const
 Access the state, position part, at current analysis.
 
const ChVectorDynamicGetL () const
 Access the Lagrange multipliers, if any.
 

Additional Inherited Members

- Protected Attributes inherited from chrono::ChStaticAnalysis
ChIntegrableIIorderm_integrable
 
ChState X
 
ChVectorDynamic L
 

Member Function Documentation

◆ SetAdaptiveNewtonON()

void chrono::ChStaticNonLinearIncremental::SetAdaptiveNewtonON ( int  initial_delay,
double  growth_tolerance 
)

Enable the adaptive size in the inner Newton loop.

If the residual grows more than "growth_tolerance" during the Newton iteration, step is cancelled and half step is halved, until condition is met. It can mitigate problems of divergence, but reducing the steps can lead to slow performance where in some lucky cases one could have just tolerated zigzag non-monotonic residuals (yet converging in the long run). Parameter growth_tolerance is 1.0 by default. Sometimes it could be >1 to tolerate also small oscillations. If this is not working, try also increasing the steps of the outer loop (incremental steps) and/or use Newton damping.

Parameters
initial_delayadaptive step policy applied only after n-th Newton steps (sometimes better 1 than 0)
growth_toleranceshrink step only if new_residual bigger than growth_tolerance * old_residual.

◆ SetCorrectionTolerance()

void chrono::ChStaticNonLinearIncremental::SetCorrectionTolerance ( double  reltol,
double  abstol 
)

Set stopping criteria based on WRMS norm of correction and the specified relative and absolute tolerances.

This is the default, with reltol = 1e-4, abstol = 1e-8. The Newton Raphson procedure is stopped if the WRMS norm of the correction vector (based on the current state) is less than 1.

◆ SetIncrementalSteps()

void chrono::ChStaticNonLinearIncremental::SetIncrementalSteps ( int  incr_steps)

Set the number of outer iterations that will increment the external load in stepwise manner.

(default: 6) If =1 it uses immediately the final external load, so it boils down to a classic Newton Raphson iteration.

◆ SetNewtonDamping()

void chrono::ChStaticNonLinearIncremental::SetNewtonDamping ( double  damping_factor)

Set damping of the Newton iteration.

Default is 1.0. Using lower values (ex. 0.7) slows the convergence but can fix issues, for example when you see that the residual has a highly oscillatory behavior.

Parameters
damping_factordefault is 1.0 (regular undamped Newton).

◆ SetResidualTolerance()

void chrono::ChStaticNonLinearIncremental::SetResidualTolerance ( double  tol)

Set stopping criteria based on norm of residual and the specified tolerance.

The Newton Raphson is stopped when the infinity norm of the residual is below the tolerance.


The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono/timestepper/ChStaticAnalysis.h
  • /builds/uwsbel/chrono/src/chrono/timestepper/ChStaticAnalysis.cpp