Class RollingFrictionContact#

Defined in Program listing for file kernel/src/simulationTools/RollingFrictionContact.hpp

class RollingFrictionContact : public LinearOSNS#

Formalization and Resolution of a Friction-Contact Problem.

This class is devoted to the formalization and the resolution of friction contact problems defined by :

\[\begin{split} velocity = q + M reaction \\ \\ velocity \geq 0, reaction \geq 0, reaction^{T} velocity =0 \end{split}\]

and a Coulomb friction law.

With:

  • \( velocity \in R^{n} \) and \( reaction \in R^{n} \) the unknowns,

  • \( M \in R^{n \times n } \) and \( q \in R^{n} \)

The dimension of the problem (2D or 3D) is given by the variable contactProblemDim and the proper Numerics driver will be called according to this value.

Construction: just set Numerics Solver id

Main functions:

Usage:

  • compute(time) formalize, solve and post-process the problem.

pre- and post-pro are common to all LinearOSNS and defined in this class.

Public Functions

RollingFrictionContact(int dimPb = 5, int numericsSolverId = SICONOS_ROLLING_FRICTION_3D_NSGS)#

constructor (solver id and dimension)

Parameters:
  • dimPb – dimension, default = 5

  • numericsSolverId – id of the solver to be used, optional, default : SICONOS_ROLLING_FRICTION_3D_NSGS

RollingFrictionContact(int dimPb, SP::SolverOptions options)#

constructor from a pre-defined solver options set.

Parameters:
  • dim – pb dimension, 5 only

  • options – the options set

inline virtual ~RollingFrictionContact()#

destructor

inline int getRollingFrictionContactDim() const#

get the type of RollingFrictionContact problem (2D or 3D)

Returns:

an int (2 or 3)

inline const MuStorage getMu() const#

get the vector mu, list of the friction coefficients

Returns:

a vector of double

inline SP::MuStorage mu() const#

get a pointer to mu, the list of the friction coefficients

Returns:

pointer on a std::vector<double>

inline double getMu(unsigned int i) const#

get the value of the component number i of mu, the vector of the friction coefficients

Parameters:

i – the component number (starting from 0)

Returns:

double value of mu

void updateMu()#

update mu vector

inline void setNumericsDriver(RollingDriver newFunction)#

set the driver-function used to solve the problem

Parameters:

newFunction – function of prototype Driver

virtual void initialize(SP::Simulation simulation) override#

initialize the RollingFrictionContact problem(compute topology …)

Parameters:

simulation – the simulation, owner of this OSNSPB

SP::RollingFrictionContactProblem frictionContactProblem()#
Returns:

the friction contact problem from Numerics

RollingFrictionContactProblem *frictionContactProblemPtr()#
Returns:

the friction contact problem from Numerics (raw ptr, do not free)

int solve(SP::RollingFrictionContactProblem problem = SP::RollingFrictionContactProblem())#

solve a friction contact problem

Parameters:

problem – the friction contact problem

Returns:

info solver information result

virtual int compute(double time) override#

Compute the unknown reaction and velocity and update the Interaction (y and lambda )

Parameters:

time – the current time

Returns:

int information about the solver convergence (0: ok, >0 problem, see Numerics documentation)

virtual void display() const override#

print the data to the screen

virtual bool checkCompatibleNSLaw(NonSmoothLaw &nslaw) override#

Check the compatibility fol the nslaw with the targeted OSNSP.