File kernel/src/simulationTools/RollingFrictionContact.hpp

Go to the source code of this file

Fricton-Contact Non-Smooth Problem.

Typedefs

typedef int (*RollingDriver)(RollingFrictionContactProblem *, double *, double *, SolverOptions *)

Pointer to function of the type used for drivers for RollingFrictionContact problems in Numerics.

class RollingFrictionContact : public LinearOSNS
#include <RollingFrictionContact.hpp>

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

RollingFrictionContact(int dimPb, SP::SolverOptions options)

constructor from a pre-defined solver options set.

Parameters

virtual ~RollingFrictionContact()

destructor

ACCEPT_STD_VISITORS()

visitors hook

virtual int compute(double time)

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

Return

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

Parameters
  • time: the current time

void display() const

print the data to the screen

SP::RollingFrictionContactProblem frictionContactProblem()

Return

the friction contact problem from Numerics

RollingFrictionContactProblem *frictionContactProblemPtr()

Return

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

const MuStorage getMu() const

get the vector mu, list of the friction coefficients

Return

a vector of double

double getMu(unsigned int i) const

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

Return

double value of mu

Parameters
  • i: the component number (starting from 0)

int getRollingFrictionContactDim() const

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

Return

an int (2 or 3)

virtual void initialize(SP::Simulation simulation)

initialize the RollingFrictionContact problem(compute topology …)

Parameters
  • simulation: the simulation, owner of this OSNSPB

SP::MuStorage mu() const

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

Return

pointer on a std::vector<double>

void setNumericsDriver(RollingDriver newFunction)

set the driver-function used to solve the problem

Parameters
  • newFunction: function of prototype Driver

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

solve a friction contact problem

Return

info solver information result

Parameters
  • problem: the friction contact problem

void updateMu()

update mu vector

Protected Functions

ACCEPT_SERIALIZATION(RollingFrictionContact)

serialization hooks

Protected Attributes

int _contactProblemDim

Type (dimension) of the contact problem (2D or 3D)

SP::MuStorage _mu

  • friction coefficients

SP::MuStorage _muR

  • friction coefficients

RollingFrictionContactProblem _numerics_problem
RollingDriver _rolling_frictionContact_driver

Pointer to the function used to call the Numerics driver to solve the problem.