Configuration-dependent loads (structsolve.callbacks)#

Calls to the callables of Analysis used by the non-linear solvers

The callables may depend on the load factor \(\lambda\) and on the configuration through their optional keyword arguments, which are passed only when the callable declares them explicitly in its signature (a **kwargs does not count), such that the callables written for the previous versions are called exactly as before:

  • inc: the current load factor \(\lambda\), passed to calc_fint, calc_kC and calc_kG. It allows configuration-dependent loads, e.g. follower pressures, whose configuration-dependent part enters calc_fint and whose load stiffness enters calc_kC or calc_kG, both scaled by \(\lambda\). The residual remains

    \[\{R(c, \lambda)\} = \lambda \{F_{ext}\} - \{F_{int}(c, \lambda)\}\]

    with calc_kC + calc_kG its exact Jacobian \(-\partial R/\partial c\).

  • c: the current configuration, passed to calc_fext, which must then return the load vector of that configuration for a unit load factor, i.e. \(\partial R/\partial \lambda\) at \(c\). The arc-length solvers use it in the predictor and in the constraint instead of the constant reference vector calc_fext(inc=1.).

  • lbd: the current load factor \(\lambda\), passed to calc_fext together with c, for a load vector \(\partial R/\partial \lambda\) that depends on the load factor as well, e.g. prescribed displacements imposed exactly as linear constraints \(c = [T] c_r + \{c_{p0}\} + \lambda \{c_{p1}\}\), whose reduced residual

    \[\{R_r(c_r, \lambda)\} = [T]^T \left( \lambda \{F_{ext}\} - \{F_{int}([T] c_r + \{c_{p0}\} + \lambda \{c_{p1}\})\} \right)\]

    has \(\partial R_r/\partial \lambda = [T]^T(\{F_{ext}\} - [K_T] \{c_{p1}\})\), with \([K_T]\) evaluated at the current configuration and load factor. The keyword inc keeps its meaning, the factor that multiplies the returned vector, and the solvers keep calling calc_fext(inc=1., ...). When calc_fext declares lbd:

    • the arc-length solvers pass lbd with c in the predictor and in the constraint;

    • the arc-length solvers scale the displacements with the linear solution of \(\partial R/\partial \lambda\) at \(c = 0, \lambda = 0\), instead of the linear solution of the reference vector calc_fext(inc=1.), and the Newton-Raphson solver uses this linear solution as the predictor of its first step;

    • the relative convergence criterion also considers the norm of \(\lambda \, \partial R/\partial \lambda\), see newton_raphson._check_convergence(), since under a prescribed displacement alone the reference vector and the reduced internal force vector both vanish at equilibrium;

    • calc_fext(c=c, lbd=lbd) is called at the configurations where the tangent stiffness matrix is updated, right after calc_kC and calc_kG at the same c and load factor, such that the callables may share their computations, and the last \(\partial R/\partial \lambda\) evaluated is the reference of the convergence checks until the next update.

    lbd is never passed by the linear static analysis, Analysis.static(NLgeom=False).

structsolve.callbacks.accepts_kwarg(func, name)#

Tell whether func declares the keyword argument name

structsolve.callbacks.calc_fint(an, c, lbd)#

an.calc_fint at c, with inc=lbd when accepted

structsolve.callbacks.calc_kT(an, c, lbd)#

Tangent stiffness matrix calc_kC + calc_kG at c, with inc=lbd passed to the callables that accept it

structsolve.callbacks.calc_load_vector(an, c, fext, lbd=None)#

Derivative of the residual with respect to the load factor

Returns \(\{q\} = \partial R/\partial \lambda\) at the configuration c and the load factor lbd, used by the solvers in the predictors, in the arc-length constraint and in the convergence criterion. It is the external load vector only for loads that do not depend on the configuration; with prescribed displacements imposed exactly it also contains \(-[T]^T [K_T] \{c_{p1}\}\), see the module docstring.

With prescribed displacements, \(\{q\}\) is not their reaction force: it has the size of the reduced problem and acts on the free degrees of freedom. It is the out-of-balance force produced by a unit increment of the load factor at the current configuration, with the free degrees of freedom held fixed. The reaction is a quantity of the full problem, e.g. the generalized reaction work-conjugate to \(\lambda\), \(P = \{c_{p1}\}^T (\{F_{int}(c)\} - \lambda \{F_{ext}\})\). structsolve does not compute it; see for instance MultiDomain.reaction_pd of \(panels\).

an.calc_fext is called with inc=1. and only with the keyword arguments that it declares:

  • c=c, when it declares c;

  • lbd=lbd, when it declares lbd and lbd is not None.

When none of them is passed, \(\{q\}\) is the constant reference vector, and fext is returned without calling an.calc_fext.

Parameters:
anAnalysis

Analysis object.

carray-like

Configuration.

fextarray-like

Reference vector an.calc_fext(inc=1.).

lbdfloat or None, optional

Load factor.

Returns:
qarray-like

\(\partial R/\partial \lambda\).

structsolve.callbacks.is_load_configuration_dependent(an)#

Tell whether an.calc_fext accepts the configuration c

structsolve.callbacks.is_load_factor_dependent(an)#

Tell whether an.calc_fext accepts the load factor lbd