FrictionPotential

class FrictionPotential : public ipc::TangentialPotential;

The friction dissipative potential.

Public Functions

explicit FrictionPotential(const double eps_v);

Construct a friction potential.

Parameters:
const double eps_v

The smooth friction mollifier parameter \(\epsilon_v\).

inline double eps_v() const;

Get the smooth friction mollifier parameter \(\epsilon_v\).

inline void set_eps_v(const double eps_v);

Set the smooth friction mollifier parameter \(\epsilon_v\).

Parameters:
const double eps_v

The smooth friction mollifier parameter \(\epsilon_v\).

Protected Functions

virtual double mu_f0(const double xconst double mu_s,
    
const double mu_k) const override;

Compute the value of the ∫ μ(y) f₁(y) dy, where f₁ is the first derivative of the smooth mollifier.

Parameters:
const double x

The tangential relative speed.

const double mu_s

Coefficient of static friction.

const double mu_k

Coefficient of kinetic friction.

Returns:

The value of the integral at x.

virtual double mu_f1_over_x(const double xconst double mu_s,
    
const double mu_k) const override;

Compute the value of the [μ(y) f₁(y)] / x, where f₁ is the first derivative of the smooth mollifier.

Parameters:
const double x

The tangential relative speed.

const double mu_s

Coefficient of static friction.

const double mu_k

Coefficient of kinetic friction.

Returns:

The value of the product at x.

virtual double mu_f2_x_minus_mu_f1_over_x3(const double x,
    
const double mu_sconst double mu_k) const override;

Compute the value of [(d/dx (μ(y) f₁(y))) x - μ(y) f₁(y)] / x³, where f₁ is the first derivative of the smooth mollifier.

Parameters:
const double x

The tangential relative speed.

const double mu_s

Coefficient of static friction.

const double mu_k

Coefficient of kinetic friction.

Returns:

The value of the derivative at x.

inline virtual bool is_dynamic(const double speed) const override;

Check if the potential is dynamic.

Parameters:
const double speed

The tangential relative speed.

Returns:

True if the potential is dynamic, false otherwise.

Protected Attributes

double m_eps_v;

The smooth friction mollifier parameter \(\epsilon_v\).

Private Types

using Super = TangentialPotential;