ansys.mapdl.core.Mapdl.lnsrch#

Mapdl.lnsrch(key='', lstol='', lstrun='', **kwargs)#

Activates a line search to be used with Newton-Raphson.

Mechanical APDL Command: LNSRCH

Parameters:
keystr

Line search key:

  • OFF - Do not use a line search.

  • ON - Use a line search. Note, adaptive descent is suppressed when lnsrch is on unless explicitly requested on the nropt command. Having line search on and adaptive descent on at the same time is not recommended.

  • AUTO - The program automatically switches line searching ON and OFF between substeps of a load step as needed. This option is recommended.

lstolstr

Line search convergence tolerance (default = 0.5).

lstrunstr

Truncation key for the line search parameter. Default = OFF, meaning no truncation. To activation truncation, input the number of digits to use after the decimal point for the line search parameter. (See Line Search

Notes

Activates a line search to be used with the Newton-Raphson method ( nropt ). Line search is an alternative to adaptive descent (see Line Search

lnsrch,AUTO can be very efficient for problems in which lnsrch is needed at only certain substeps.

You cannot use line search ( lnsrch ), automatic time stepping ( autots ), or the DOF solution predictor ( pred ) with the arc-length method ( arclen, arctrm ). If you activate the arc-length method after you set lnsrch, autots, or pred, a warning message appears. If you choose to proceed with the arc-length method, the program disables your line search, automatic time stepping, and DOF predictor settings, and the time step size is controlled by the arc-length method internally.

This command is also valid in PREP7.