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. NSC contacts are not supported. The active set and the friction are decided at velocity level, where the -C/dt stabilization with the tiny step dt admits an approach velocity of gap/dt, and the contact rows also enter the position-level iterations. As a result, contacts present at the time of the analysis corrupt all assembly levels (e.g., a resting body gets spurious position and velocity corrections and accelerations of order 1e3 m/s^2). ChSystem::DoAssembly() therefore does not perform the analysis on an NSC system with contacts and returns ExitFlag::UNSUPPORTED_CONTACTS instead. Use an SMC system or a short settling run with ChSystem::DoStepDynamics() to obtain consistent accelerations and reactions in the presence of contacts.
#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