FrictionQPotSpringBlock v0.22.7
Loading...
Searching...
No Matches
FrictionQPotSpringBlock::detail::QuarticGradient1d Class Reference

Short range interaction based on a quartic potential. More...

#include <FrictionQPotSpringBlock/detail.h>

Public Member Functions

 QuarticGradient1d (double k2, double k4, size_type N)
 
template<class T >
void force (const T &u, T &f)
 Update forces based on current slips.
 

Protected Attributes

size_type m_N
 Number of particles.
 
double m_k2
 Stiffness of the interactions.
 
double m_k4
 Stiffness of the interactions.
 
double m_k4_4
 == 0.25 * m_k4
 

Detailed Description

Short range interaction based on a quartic potential.

The idea is to have a potential

\( E(r) = \frac{1}{2} k_2 (\varepsilon(r))^2 + \frac{1}{12} k_4 (\varepsilon(r))^4 \)

with

\( \varepsilon(r) = \frac{\partial u}{\partial r} \)

such that

\( \sigma(r) = \frac{\partial E}{\partial \varepsilon} = k_2 \varepsilon(r) + \frac{k_4}{3} \varepsilon(r)^3 \)

such that

\( f(r) = \frac{\partial \sigma}{\partial r} = \frac{\partial \varepsilon}{\partial r}(k_2 + k_4 \varepsilon(r)^2) \)

which is discretised as

\( f_\mathrm{inter}^{(i)} = \left( u_{i + 1} + u_{i - 1} - 2 u_i \right) \left( k_2 + k_4 / 4 (u_{i + 1} - u_{i - 1})^2 \right)\)

where the gradient term is approximated by central difference (which leads to \( 1/4 \) factor).

Please note that \( k_4 \) does not have the same units as \( k_2 \).

Definition at line 616 of file detail.h.

Constructor & Destructor Documentation

◆ QuarticGradient1d()

FrictionQPotSpringBlock::detail::QuarticGradient1d::QuarticGradient1d ( double k2,
double k4,
size_type N )
inline
Parameters
k2Stiffness of the interactions.
k4Stiffness of the interactions.
NNumber of particles.

Definition at line 631 of file detail.h.

Member Function Documentation

◆ force()

template<class T >
void FrictionQPotSpringBlock::detail::QuarticGradient1d::force ( const T & u,
T & f )
inline

Update forces based on current slips.

Parameters
uSlip per particle.
fForce per particle (output).

Definition at line 640 of file detail.h.

Member Data Documentation

◆ m_k2

double FrictionQPotSpringBlock::detail::QuarticGradient1d::m_k2
protected

Stiffness of the interactions.

Definition at line 619 of file detail.h.

◆ m_k4

double FrictionQPotSpringBlock::detail::QuarticGradient1d::m_k4
protected

Stiffness of the interactions.

Definition at line 620 of file detail.h.

◆ m_k4_4

double FrictionQPotSpringBlock::detail::QuarticGradient1d::m_k4_4
protected

== 0.25 * m_k4

Definition at line 621 of file detail.h.

◆ m_N

size_type FrictionQPotSpringBlock::detail::QuarticGradient1d::m_N
protected

Number of particles.

Definition at line 618 of file detail.h.


The documentation for this class was generated from the following file: