FrictionQPotSpringBlock v0.22.7
|
Standard system with a cuspy potential energy landscape and short range interactions. More...
#include <FrictionQPotSpringBlock/Line1d.h>
Public Member Functions | |
System_Cuspy_Laplace (double m, double eta, double mu, double k_interactions, double k_frame, double dt, const std::array< size_t, 1 > &shape, uint64_t seed, const std::string &distribution, const std::vector< double > ¶meters, double offset=-100.0, size_t nchunk=5000) | |
const auto & | chunk () const |
Chunk of (cumulative sum of) random numbers. | |
auto | size () const |
Number of particles. | |
const auto & | shape () const |
Shape of the system. | |
auto | dt () const |
The time step (parameter). | |
auto | mu () const |
The curvature of each well (parameter). | |
auto | eta () const |
The damping coefficient (parameter). | |
auto | m () const |
The mass of each particle (parameter). | |
auto | k_frame () const |
The stiffness of the loading frame (parameter). | |
const auto & | external () const |
Class that generates and external force that is add to the residual force. | |
void | set_t (double arg) |
Set time. | |
void | set_inc (ptrdiff_t arg) |
Set increment number. | |
void | set_u_frame (double arg) |
Set position of the load frame. | |
double | u_frame () const |
Position of the load frame. | |
void | set_u (const array_type::tensor< double, rank > &arg) |
Set the slip ('position') of each particle. | |
void | set_v (const array_type::tensor< double, rank > &arg) |
Set the velocity of each particle (the first time derivative of the slip). | |
void | set_a (const array_type::tensor< double, rank > &arg) |
Set the acceleration of each particle (the second time derivative of the slip). | |
void | refresh () |
Recompute all forces. | |
const auto & | u () const |
Slip ('position') of each particle. | |
const auto & | v () const |
Velocity of each particle. | |
const auto & | a () const |
Acceleration of each particle. | |
const auto & | f () const |
Resultant force acting on each particle. | |
const auto & | f_potential () const |
Force associated to potentials acting on each particle. | |
const auto & | f_frame () const |
Force associated to the load frame acting on each particle. | |
const auto & | f_interactions () const |
Force associated to interactions between particles. | |
const auto & | f_damping () const |
Force associated to damping on each particle. | |
auto | t () const |
The time. | |
auto | inc () const |
The increment number. | |
double | temperature () const |
The instantaneous temperature. | |
double | residual () const |
Residual. | |
void | quench () |
Set velocities and accelerations to zero. | |
void | timeStep () |
Effectuate one time step using the velocity Verlet algorithm. | |
void | timeSteps (size_t n) |
Make a number of time steps, see timeStep(). | |
size_t | timeStepsUntilEvent (double tol=1e-5, size_t niter_tol=10, size_t max_iter=1e9) |
Perform a series of time-steps until the next plastic event, or equilibrium. | |
void | flowSteps (size_t n, double v_frame) |
Make a number of steps with the frame moving at a constant velocity. | |
size_t | minimise (double tol=1e-5, size_t niter_tol=10, size_t max_iter=1e9, bool time_activity=false, bool max_iter_is_error=true) |
Minimise energy: run timeStep() until a mechanical equilibrium has been reached. | |
size_t | quasistaticActivityFirst () const |
Increment with the first plastic event. | |
size_t | quasistaticActivityLast () const |
Increment with the last plastic event. | |
size_t | minimise_truncate (array_type::tensor< ptrdiff_t, rank > i_n, size_t A_truncate=0, size_t S_truncate=0, double tol=1e-5, size_t niter_tol=10, size_t max_iter=1e9, bool time_activity=true, bool max_iter_is_error=true) |
Minimise energy: run timeStep() until a mechanical equilibrium has been reached. | |
double | maxUniformDisplacement (int direction) |
Find maximum particle displacement for which the system is linear and uniform. | |
double | eventDrivenStep (double eps, bool kick, int direction=1) |
Make event driven step. | |
void | trigger (size_t p, double eps, int direction=1) |
Trigger a specific particle. | |
void | advanceToFixedForce (double f_frame, bool allow_plastic=false) |
Change the position of the particles and of the loading frame such that the mean of f_frame() is equal to a target value, and mechanical equilibrium is maintained. | |
Protected Member Functions | |
void | initSystem (double m, double eta, double k_frame, double mu, double dt, detail::Cuspy< Generator > *potential, Generator *chunk, detail::Laplace1d *interactions=nullptr, void *external=nullptr) |
Initialise the system. | |
void | computeForce () |
Compute residual force. | |
void | computeForcePotential () |
Compute force due to the potential energy. | |
void | computeForceInteractions () |
Compute force due to interactions between particles. | |
void | computeForceFrame () |
Compute force due to the loading frame. | |
void | computeForceDamping () |
Compute force due to damping. | |
void | updated_inc () |
Update forces that depend on time. | |
void | updated_u () |
Update forces that depend on slip. | |
void | updated_v () |
Update forces that depend on velocity. | |
double | advanceUniformly (double du, bool input_is_frame=true) |
Advance the system uniformly. | |
Protected Attributes | |
Generator | m_gen |
Pointer to chunk of yield 'positions' (automatically updated if needed) | |
detail::Cuspy< Generator > | m_pot |
Class to get the forces from the local potential energy landscape. | |
detail::Laplace1d | m_int |
Class to get the forces from particle interaction. | |
size_type | m_N |
Number of particles. | |
array_type::tensor< double, rank > | m_f |
Resultant force acting on each particle. | |
array_type::tensor< double, rank > | m_f_thermal |
Force due to thermal fluctuations. | |
array_type::tensor< double, rank > | m_f_potential |
Force associated to potentials acting on each particle. | |
array_type::tensor< double, rank > | m_f_interactions |
Force associated to interactions between particles. | |
array_type::tensor< double, rank > | m_f_frame |
Force associated to the load frame acting on each particle. | |
array_type::tensor< double, rank > | m_f_damping |
Force associated to damping on each particle. | |
array_type::tensor< double, rank > | m_u |
Slip ('position') of each particle. | |
array_type::tensor< double, rank > | m_v |
Velocity of each particle. | |
array_type::tensor< double, rank > | m_a |
Acceleration of each particle. | |
array_type::tensor< double, rank > | m_v_n |
Temporary for integration. | |
array_type::tensor< double, rank > | m_a_n |
Temporary for integration. | |
ptrdiff_t | m_inc |
The increment number. | |
ptrdiff_t | m_qs_inc_first |
Increment with the first plastic event. | |
ptrdiff_t | m_qs_inc_last |
Increment with the last plastic event. | |
double | m_dt |
Time step. | |
double | m_eta |
Damping constant (same for all particles). | |
double | m_m |
Mass (same for all particles). | |
double | m_inv_m |
== 1 / m_m | |
double | m_mu |
Curvature of the potentials. | |
double | m_k_frame |
Stiffness of the load fame (same for all particles). | |
double | m_u_frame |
Position of the load frame. | |
detail::Cuspy< Generator > * | m_potential |
Class to get the forces from the local potential energy landscape. | |
Generator * | m_chunk |
Pointer to chunk of yield 'positions' (automatically updated if needed) | |
detail::Laplace1d * | m_interactions |
Class to get the forces from particle interaction. | |
void * | m_external |
Add an (time dependent) externally defined force to the residual. | |
Standard system with a cuspy potential energy landscape and short range interactions.
The system consists of particles of mass \( m \). The principle degree of freedom is the slip ('position') \( u_i \) of each particle \( i \). Each particle follows Newtonian dynamics \( m \ddot{u}_i = f_i \), with the residual force \( f_i \) given by the sum of:
A piece-wise quadratic local potential energy.
The resulting force is piece-wise linear: \( f_\mathrm{pot}^{(i)} = \mu (u_{\min}^{(i)} - u_i) \). where \( \mu \) is the curvature of the quadratic potentials, and \( u_{\min}^{(i)} \) the position of the current local minimum. The landscape is given by a cumulative sum of random numbers.
Short range elastic interactions with other particles.
The interactions are the short-range Laplacian \( \Delta u_i \): \( f_\mathrm{inter}^{(i)} = k (u_{i - 1} - 2 u_i + u_{i + 1}) \).
A drive though a spring attached to a load frame.
This corresponds to a parabolic potential energy for each particle, with the minimum at a set \( u_\text{frame} \): \( f_\text{frame}^{(i)} = k_\text{frame} (u_\text{frame} - u_i) \).
Damping.
\( f_\text{damping}^{(i)} = - \eta v_i \), with the particle's velocity \( v_i \equiv \dot{u}_i \equiv \partial_t u_i \).
The following scaling argument holds to set \( k_\text{frame} \). Because of the competition between disorder and elastic interactions, the interface gets a roughness \( \delta u \sim \ell^\zeta \). This corresponds to fluctuations of interactions \( \delta f_\text{inter} \sim k_\text{inter} \partial^2 \delta u \sim k_\text{inter} \ell^{\zeta - 2} \). The fluctuations of the drive are \( \delta f_\text{frame} \sim k_\text{frame} \delta u \sim k_\text{frame} \ell^\zeta \). For the disorder to be relevant \( \delta f_\text{inter} \sim \delta f_\text{frame} \). Such that \( k_\text{frame} / k_\text{inter} \sim 1 / \ell^2 \). With \( L = 1 / N \) the linear size of the system \( k_\text{frame} / k_\text{inter} \sim 1 / L^2 \)
The dynamics follow \( m a_i = f_i \), with the particle's acceleration \( a_i \equiv \ddot{u}_i \equiv \partial_t^2 u_i \), and the residual force \( f_i = f_\text{damping}^{(i)} + f_\text{pot}^{(i)} + f_\text{inter}^{(i)} + f_\text{frame}^{(i)} \). This differential equation is integrated using Velocity-Verlet in timeStep() Note that this function updates the time t (or in fact the increment number inc), and that this is the only function that does so.
The implementation is is such that all forces are updated (if needed) every time the positions and velocities are updated, either internally in timeStep(), or externally when calling set_u() and set_v(). In absolute need refresh() can be called to force re-computation of forces, but this should normally not be needed.
|
inline |
m | Mass (same for all particles). |
eta | Damping constant (same for all particles). |
mu | Curvature of the potentials. |
k_interactions | Stiffness of the interactions. |
k_frame | Stiffness of the load fame (same for all particles). |
dt | Time step. |
shape | Shape of the system. |
seed | Global seed to use (size seeds will be consumed). |
distribution | Type of distribution (see prrng). |
parameters | Parameters of the distribution (see prrng). |
offset | Global offset to apply to the sequence of yield positions. |
nchunk | Number of random numbers to keep in memory. |
|
inlineinherited |
|
inlineinherited |
Change the position of the particles and of the loading frame such that the mean of f_frame() is equal to a target value, and mechanical equilibrium is maintained.
f_frame | Target value for the mean of f_frame(). |
allow_plastic | Allow plastic events during the advance. |
|
inlineprotectedinherited |
Advance the system uniformly.
f_potential
is compensated by the change in f_frame
).Thereby:
\( \Delta f^\mathrm{potential}_i = \mu \Delta u_i \)
\( \Delta f^\mathrm{frame} = k (\Delta u^\mathrm{frame} - \Delta u_i) \)
Setting \( \Delta f^\mathrm{potential}_i = \Delta f^\mathrm{frame} \) gives:
du | Displacement. |
input_is_frame | If true : du \( = \Delta u^\mathrm{frame} \), if false : du \( = \Delta u_i \), |
du
for the particles in input_is_frame == true
, otherwise du
of the frame.
|
inlineinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Make event driven step.
kick = false
: Increment the position of the load-frame and that of the particles to a new mechanical equilibrium just before yielding (if direction = 1
, the new position for particle p
closest to yielding to the right is x[p] = y[p] - eps / 2
). This assumes incrementing the load-frame infinitely slowly such that, because there is no yielding, the equilibrium configuration for a new position of the load frame is known.kick = true
: Advance the system uniformly (the particles and the frame are moved proportionally) such that the particle closest to yielding is brought just past yielding (if direction = 1
, the new position for particle p
closest to yielding right is x[p] = y[p] + eps / 2
).eps | Margin to keep to the position to the closest yield position. |
kick | If false , the increment is elastic (no minimisation has to be applied after). If true , the increment leads to a state out of mechanical equilibrium. |
direction | If +1 : move right. If -1 move left. |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Make a number of steps with the frame moving at a constant velocity.
Make a number of steps with the following protocol.
n | Number of steps to make. |
v_frame | Velocity of the frame. |
|
inlineinherited |
|
inlineprotectedinherited |
Initialise the system.
m | Mass (same for all particles). |
eta | Damping constant (same for all particles). |
k_frame | Stiffness of the load fame (same for all particles). |
mu | Curvature of the potentials. |
dt | Time step. |
potential | Class to get the forces from the local potential energy landscape. |
chunk | Pointer to chunk of yield 'positions' (automatically updated if needed) |
interactions | Class to get the forces from particle interaction. |
external | Add an (time dependent) externally defined force to the residual. |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Minimise energy: run timeStep() until a mechanical equilibrium has been reached.
tol | Relative force tolerance for equilibrium. See residual() for definition. |
niter_tol | Enforce the residual check for niter_tol consecutive increments. |
max_iter | Maximum number of time-steps. Throws std::runtime_error otherwise. |
time_activity | If true plastic activity is timed. After this function you can find:
|
max_iter_is_error | If true an error is thrown when the maximum number of time-steps is reached. If false the function simply returns max_iter . |
0
: if stopped when the residual is reached (and number of steps < max_iter
).max_iter
: if no residual was reached, and max_iter_is_error = false
.
|
inlineinherited |
Minimise energy: run timeStep() until a mechanical equilibrium has been reached.
tol | Relative force tolerance for equilibrium. See residual() for definition. |
niter_tol | Enforce the residual check for niter_tol consecutive increments. |
max_iter | Maximum number of time-steps. Throws std::runtime_error otherwise. |
time_activity | If true plastic activity is timed. After this function you can find:
|
max_iter_is_error | If true an error is thrown when the maximum number of time-steps is reached. If false the function simply returns max_iter . |
0
: if stopped when the residual is reached (and number of steps < max_iter
).max_iter
: if no residual was reached, and max_iter_is_error = false
. A_truncate | Truncate if A_truncate blocks have yielded at least once (return > 0). Only considered if A_truncate > 0 . |
S_truncate | Truncate if the number of times blocks yielded is equal to S_truncate (return > 0). Only considered if S_truncate > 0 . |
i_n | Reference potential index of the first integration point. |
|
inlineinherited |
|
inlineinherited |
Increment with the first plastic event.
This value is only relevant if time_activity = true
was used in the last call of minimise().
|
inlineinherited |
Increment with the last plastic event.
This value is only relevant if time_activity = true
was used in the last call of minimise().
|
inlineinherited |
Set velocities and accelerations to zero.
Call this function after an energy minimisation (taken care of in minimise()).
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Make a number of time steps, see timeStep().
n | Number of steps to make. |
|
inlineinherited |
Perform a series of time-steps until the next plastic event, or equilibrium.
tol | Relative force tolerance for equilibrium. See residual() for definition. |
niter_tol | Enforce the residual check for niter_tol consecutive increments. |
max_iter | Maximum number of iterations. Throws std::runtime_error otherwise. |
0
if there was no plastic activity and the residual was reached.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protected |
|
protectedinherited |
|
protected |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protected |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |