Apply a HCSITS (Hard-contact semi-implicit timestepping solver) relaxation to all contacts.
Call this kernel on all bodies to perform on relaxation step of the solver. There exist different friction and relaxation models. See comments on their respective methods for an extended documentation. Use setRelaxationModel() to set it. getDeltaMax() can be used to query the maximum change in the impulses applied wrt to the last iteration.
Use setMaxSubIterations() to set the maximum number of iterations performed to solve optimization problems arising during the relaxation (in InelasticGeneralizedMaximumDissipationContact and InelasticCoulombContactByDecoupling).
Use setCor() to set the coefficient of restitution between 0 and 1 for the InelasticProjectedGaussSeidel model. All other models describe inelastic contacts.
Example of Using the HCSITS kernels in a simulation:
kernel::IntegrateBodiesHCSITS integration;
initContacts.setFriction(0,0,
real_t(0.2));
kernel::InitBodiesForHCSITS initBodies;
for(int j = 0; j < 10; j++){
}
Transmits corrections of the linear and angular velocity (dv / dw) that were generated by the impulse...
Definition VelocityCorrectionNotification.h:47
Adds up LinearVelocity + Parameters::relaxationParam * velocity_correction in a particle and transmit...
Definition VelocityUpdateNotification.h:50
Apply a HCSITS (Hard-contact semi-implicit timestepping solver) relaxation to all contacts.
Definition HCSITSRelaxationStep.h:101
void setCor(real_t v)
Definition HCSITSRelaxationStep.h:132
Definition ParticleSelector.h:30
Broadcast a property from the master particle to all corresponding ghost particles.
Definition BroadcastProperty.h:57
Reduce a property from all ghost particles to the corresponding master particle.
Definition ReduceProperty.h:66
float real_t
Definition DataTypes.h:167
static real_t relaxationParam
Definition VelocityUpdateNotification.h:55
|
| HCSITSRelaxationStep () |
|
const size_t & | getMaxSubIterations () const |
|
void | setMaxSubIterations (size_t v) |
|
const RelaxationModel & | getRelaxationModel () const |
|
void | setRelaxationModel (RelaxationModel v) |
|
const real_t & | getDeltaMax () const |
|
void | setDeltaMax (real_t v) |
|
const real_t & | getCor () const |
|
void | setCor (real_t v) |
|
template<typename CAccessor , typename PAccessor > |
void | operator() (size_t cid, CAccessor &ca, PAccessor &pa, real_t dt) |
| Perform relaxation for a single contact.
|
|
template<typename CAccessor , typename PAccessor > |
real_t | relaxInelasticFrictionlessContacts (size_t cid, real_t dtinv, CAccessor &ca, PAccessor &pa) |
| Relaxes The contact with ID cid once.
|
|
template<typename CAccessor , typename PAccessor > |
real_t | relaxApproximateInelasticCoulombContactsByDecoupling (size_t cid, real_t dtinv, CAccessor &ca, PAccessor &pa) |
| Relaxes all contacts once.
|
|
template<typename CAccessor , typename PAccessor > |
real_t | relaxInelasticCoulombContactsByDecoupling (size_t cid, real_t dtinv, CAccessor &ca, PAccessor &pa) |
| Relaxes all contacts once.
|
|
template<typename CAccessor , typename PAccessor > |
real_t | relaxInelasticCoulombContactsByOrthogonalProjections (size_t cid, real_t dtinv, bool approximate, CAccessor &ca, PAccessor &pa) |
| Relaxes all contacts once.
|
|
template<typename CAccessor , typename PAccessor > |
real_t | relaxInelasticGeneralizedMaximumDissipationContacts (size_t cid, real_t dtinv, CAccessor &ca, PAccessor &pa) |
| Relaxes all contacts once.
|
|
template<typename CAccessor , typename PAccessor > |
real_t | relaxInelasticContactsByProjectedGaussSeidel (size_t cid, real_t dtinv, CAccessor &ca, PAccessor &pa) |
| Relaxes all contacts once.
|
|
template<typename CAccessor , typename PAccessor >
real_t walberla::mesa_pd::kernel::HCSITSRelaxationStep::relaxApproximateInelasticCoulombContactsByDecoupling |
( |
size_t | cid, |
|
|
real_t | dtinv, |
|
|
CAccessor & | ca, |
|
|
PAccessor & | pa ) |
|
inline |
Relaxes all contacts once.
The contact model is for inelastic unilateral contacts with approximate Coulomb friction.
- Returns
- The largest variation of contact impulses in the L-infinity norm.
This function is to be called from resolveContacts(). Separating contacts are preferred over other solutions if valid. Static solutions are preferred over dynamic solutions. Dynamic solutions are computed by decoupling the normal from the frictional components. That is for a dynamic contact the normal component is relaxed first followed by the frictional components. The determination of the frictional components does not perform any subiterations and guarantees that the friction partially opposes slip.
template<typename CAccessor , typename PAccessor >
real_t walberla::mesa_pd::kernel::HCSITSRelaxationStep::relaxInelasticCoulombContactsByDecoupling |
( |
size_t | cid, |
|
|
real_t | dtinv, |
|
|
CAccessor & | ca, |
|
|
PAccessor & | pa ) |
|
inline |
Relaxes all contacts once.
The contact model is for inelastic unilateral contacts with Coulomb friction.
- Returns
- The largest variation of contact impulses in the L-infinity norm.
This function is to be called from resolveContacts(). Separating contacts are preferred over other solutions if valid. Static solutions are preferred over dynamic solutions. Dynamic solutions are computed by decoupling the normal from the frictional components. That is for a dynamic contact the normal component is relaxed first followed by the frictional components. How much the frictional components directly oppose slip as required by the Coulomb friction model depends on the number of subiterations performed. If no subiterations are performed the friction is guaranteed to be at least partially dissipative.
template<typename CAccessor , typename PAccessor >
real_t walberla::mesa_pd::kernel::HCSITSRelaxationStep::relaxInelasticCoulombContactsByOrthogonalProjections |
( |
size_t | cid, |
|
|
real_t | dtinv, |
|
|
bool | approximate, |
|
|
CAccessor & | ca, |
|
|
PAccessor & | pa ) |
|
inline |
Relaxes all contacts once.
The contact model is for inelastic unilateral contacts with Coulomb friction.
- Parameters
-
dtinv | The inverse of the current time step. |
approximate | Use the approximate model showing bouncing. |
- Returns
- The largest variation of contact impulses in the L-infinity norm.
This function is to be called from resolveContacts(). The iterative method to solve the contact problem is e.g. described in the article "A matrix-free cone complementarity approach for
solving large-scale, nonsmooth, rigid body dynamics" by A. Tasora and M. Anitescu in Computer Methods in Applied Mechanics and Engineering (Volume 200, Issues 5–8, 15 January 2011, Pages 439-453). The contact model is purely quadratic and convergence should be good but depends on a parameter. The one-contact problem has a unique solution. The frictional reactions for a dynamic contact converge to those that directly oppose slip. However, the contact is not perfectly inelastic for dynamic contacts but bounces. These vertical motions tend to go to zero for smaller time steps and can be interpreted as exaggerated vertical motions coming from micro asperities (see "Optimization-based simulation of nonsmooth rigid multibody
dynamics" by M. Anitescu in Mathematical Programming (Volume 105, Issue 1, January 2006, Pages 113-143). These motions can be prevented by a small change in the iteration proposed in "The
bipotential method: a constructive approach to design the complete contact law with friction and
improved numerical algorithms" by G. De Saxce and Z-Q. Feng in Mathematical and Computer Modelling (Volume 28, Issue 4, 1998, Pages 225-245). Which iteration is used is controlled with the approximate parameter.
template<typename CAccessor , typename PAccessor >
real_t walberla::mesa_pd::kernel::HCSITSRelaxationStep::relaxInelasticFrictionlessContacts |
( |
size_t | cid, |
|
|
real_t | dtinv, |
|
|
CAccessor & | ca, |
|
|
PAccessor & | pa ) |
|
inline |
Relaxes The contact with ID cid once.
The contact model is for inelastic unilateral contacts without friction.
- Parameters
-
cid | The index of the contact |
ca | The contact accessor |
pa | The particle accessor |
- Returns
- The largest variation of contact impulses in the L-infinity norm.
This function is to be called from resolveContacts(). Separating contacts are preferred over persisting solutions if valid.
template<typename CAccessor , typename PAccessor >
real_t walberla::mesa_pd::kernel::HCSITSRelaxationStep::relaxInelasticGeneralizedMaximumDissipationContacts |
( |
size_t | cid, |
|
|
real_t | dtinv, |
|
|
CAccessor & | ca, |
|
|
PAccessor & | pa ) |
|
inline |
Relaxes all contacts once.
The contact model is for inelastic unilateral contacts with the generalized maximum dissipation principle for friction.
- Returns
- The largest variation of contact impulses in the L-infinity norm.
This function is to be called from resolveContacts(). Dynamic solutions are computed by minimizing the kinetic energy along the intersection of the plane of maximum compression and the friction cone.