FrictionQPotSpringBlock v0.22.7
|
Identical to Line1d::System_Cuspy_QuarticGradient() but with '2d' interactions. More...
#include <FrictionQPotSpringBlock/Line2d.h>
Public Member Functions | |
System_Cuspy_QuarticGradient (double m, double eta, double mu, double k2, double k4, double k_frame, double dt, const std::array< size_t, 2 > &shape, uint64_t seed, const std::string &distribution, const std::vector< double > ¶meters, double offset=-100.0, size_t nchunk=5000) | |
Same as System_Cuspy_Laplace() but with a quartic interactions. | |
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::QuarticGradient2d *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::QuarticGradient2d | 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::QuarticGradient2d * | m_interactions |
Class to get the forces from particle interaction. | |
void * | m_external |
Add an (time dependent) externally defined force to the residual. | |
Identical to Line1d::System_Cuspy_QuarticGradient() but with '2d' interactions.
Short range interactions based on quartic interactions.
|
inline |
|
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 |