ContactMechanics.Optimization package
Submodules
ContactMechanics.Optimization.ConstrainedConjugateGradients module
Implementation of the constrained conjugate gradient algorithm as described in I.A. Polonsky, L.M. Keer, Wear 231, 206 (1999)
- ContactMechanics.Optimization.ConstrainedConjugateGradients.constrained_conjugate_gradients(substrate, topography, hardness=None, external_force=None, offset=None, initial_displacements=None, initial_forces=None, pentol=None, forcetol=1e-05, thermotol=1e-06, mixfac=0.1, mixdecfac=0.95, minmixsteps=10, maxiter=100000, logger=<ContactMechanics.Tools.Logger.Logger object>, callback=None, verbose=False)
Use a constrained conjugate gradient optimization to find the equilibrium configuration deflection of an elastic manifold. The conjugate gradient iteration is reset using the steepest descent direction whenever the contact area changes.
This method is described in I.A. Polonsky, L.M. Keer, Wear 231, 206 (1999)
For plastic calculations, the solver may switch to a simple overrelaxation.
- Parameters:
substrate (elastic manifold) – Elastic manifold.
topography (SurfaceTopography object) – Height profile of the rigid counterbody
hardness (array_like, optional) – Hardness of the substrate. Force cannot exceed this value. Can be scalar or array (i.e. per pixel) value.
external_force (float, optional) – External force. Constrains the sum of forces to this value.
offset (float, optional) – Offset of rigid surface. Ignore if external_force is specified.
initial_displacements (array_like, optional) – Displacement field for initializing the solver. Guess an initial value if set to None.
initial_forces (array_like, optional) – pixel forces field for initializing the solver. Is computed from initial_displacements if none
pentol (float, optional) – Maximum penetration of contacting regions required for convergence.
forcetol (float, optional) – Maximum force outside the contact region allowed for convergence.
thermotol (float, optional) – Maximum relative change in thermodynamic control property (total force at constant displacement or displacement at constant force) during convergence.
mixfac (float, optional) – Mixing factor for simple overrelaxaton (only used for certain plastic calculations). (Default: 0.1)
mixdecfac (float, optional) – Mixing factor is multiplied with this factor after every step. (Default: 0.9)
minmixsteps (int, optional) – Minimum number of mixing steps. (Default: 10)
maxiter (float, optional) – Maximum number of iterations.
logger (
ContactMechanics.Tools.Logger, optional) – Reports status and values at each iteration.callback (callable(int iteration, array_link forces, dict d), optional) – Called each iteration. The dictionary contains additional scalars.
verbose (bool, optional) – If True, more scalar quantities are passed to the logger.
- Returns:
x: displacements fun: elastic energy jac: forces active_set: points where forces are not constrained to 0 or hardness offset: offset i rigid surface, results from the optimization processes
when the external_force is constrained
- Return type:
Optimisation result
Module contents
Optimization algorithms