chrono::ChAssemblyAnalysis Class Reference

Description

Class for assembly analysis.

Assembly is performed by satisfying constraints at a position, velocity, and acceleration levels. Assembly at position level involves solving a non-linear problem. Assembly at velocity level is performed by taking a small linearized integration step. Consistent accelerations and reactions are obtained from a second such step whose constraint right-hand side carries the quadratic-velocity term, so that the acceleration-level constraint equations, including that term, are satisfied while unilateral constraints and frictional contacts keep their velocity-level (DVI) treatment. The quadratic-velocity term is obtained by central differencing of the constraints (step 1e-6), which puts a roundoff floor on the reported accelerations, also at rest, of about 1e-4 times the length scale of the constraint (SI units: about 1e-4 for a 1 m distance constraint, 1e-2 for 100 m); the corresponding floor on the reactions is that acceleration floor times the mass the constraint acts on. Like the implicit integrators, the analysis scatters perturbed states to the system and expects the update of every item to be a function of (position, velocity, time) only. Accelerations and reactions are formed from a velocity increment over the step dt passed to AssemblyAnalysis() (1e-6 when called through ChSystem::DoAssembly()), so the residual of an iterative solver is amplified by 1/dt in them. When they matter, use a direct solver (SPARSE_LU, SPARSE_QR), MINRES or GMRES, or, if unilateral constraints require a VI solver, BARZILAIBORWEIN. The default PSOR solver can leave acceleration errors of several m/s^2 near singular configurations (e.g., a slider-crank at a dead centre), APGD and PJACOBI even in regular ones. ChSystem::DoAssembly() checks the residual of the acceleration-level solve and returns ExitFlag::ACCELERATION_INACCURATE if it is too large. This dt is distinct from the fixed 1e-6 differencing step of the quadratic-velocity term. With active contacts, the active set and the friction are still decided at velocity level: a resting or separating contact gives the same result as before this formulation, while for a sliding frictional contact the relaxed cone complementarity of the velocity-level step already alters the sliding velocity (artificial separation velocity of order mu times the sliding speed), so accelerations reported for such a contact are not meaningful, before or after.

#include <ChAssemblyAnalysis.h>

Public Member Functions

 ChAssemblyAnalysis (ChIntegrableIIorder &mintegrable)
 
AssemblyAnalysis::ExitFlag AssemblyAnalysis (int action, double dt=1e-7)
 Perform the assembly analysis. More...
 
void SetMaxAssemblyIters (int mi)
 Set the max number of Newton-Raphson iterations for the position assembly procedure.
 
int GetMaxAssemblyIters ()
 Get the max number of Newton-Raphson iterations for the position assembly procedure.
 
void SetRelToleranceUpdate (double tol)
 Set the termination criterion on the infinity norm of the relative state update.
 
double GetRelToleranceUpdate () const
 Get the termination criterion on the infinity norm of the relative state update.
 
void SetAbsToleranceUpdate (double tol)
 Set the termination criterion on the infinity norm of the (absolute) state update.
 
double GetAbsToleranceUpdate () const
 Get the termination criterion on the infinity norm of the (absolute) state update.
 
void SetAbsToleranceResidual (double tol)
 Set the termination criterion on the infinity norm of the residual.
 
double GetAbsToleranceResidual () const
 Get the termination criterion on the infinity norm of the residual.
 
double GetLastResidualNorm () const
 Get the infinity norm of the last computed residual.
 
double GetLastUpdateNorm () const
 Get the infinity norm of the last update.
 
unsigned int GetLastIters () const
 Get the number of iterations after last assembly.
 
ChIntegrable * GetIntegrable ()
 Get the integrable object.
 
const ChVectorDynamic & GetLagrangeMultipliers () const
 Access the Lagrange multipliers.
 
const ChState & GetStatePos () const
 Access the current position state vector.
 
const ChStateDelta & GetStateVel () const
 Access the current velocity state vector.
 
const ChStateDelta & GetStateAcc () const
 Access the current acceleration state vector.
 

Member Function Documentation

◆ AssemblyAnalysis()

AssemblyAnalysis::ExitFlag chrono::ChAssemblyAnalysis::AssemblyAnalysis ( int  action,
double  dt = 1e-7 
)

Perform the assembly analysis.

Assembly is performed by satisfying constraints at position, velocity, and acceleration levels. Assembly at position level involves solving a non-linear problem. Assembly at velocity level is performed by taking a small integration step. Consistent accelerations and reactions are obtained from a second linearized step that includes the quadratic-velocity term, so that Cq a = Qc holds (see the class description for the accuracy floor).


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