|
std::string | repr () const |
| Basic class info.
|
|
const auto & | shape () const |
| Return the shape.
|
|
auto | size () const |
| Return the size (== prod(shape) ).
|
|
const array_type::tensor< double, Dim > & | propagator () const |
| Get the propagator (as used internally: reordered/normalised compared to the input).
|
|
array_type::tensor< ptrdiff_t, 1 > | distances (size_t axis=0) const |
| Distances along an axis of the propagator.
|
|
auto | alpha () const |
| Exponent characterising the shape of the potential.
|
|
auto | failure_rate () const |
| Failure rate (parameter).
|
|
auto | failure_idx () const |
| For the last failure: index of the failing block.
|
|
auto | failure_x () const |
| For the last failure: distance to yielding before failure.
|
|
void | set_t (double t) |
| Set the time.
|
|
double | t () const |
| Get the time.
|
|
void | set_state (uint64_t state) |
| Set the state of the random number generator.
|
|
uint64_t | state () const |
| Get the state of the random number generator.
|
|
void | set_epsp (const array_type::tensor< double, Dim > &epsp) |
| Set the plastic strain.
|
|
const array_type::tensor< double, Dim > & | epsp () const |
| Get the plastic strain.
|
|
void | set_nfails (const array_type::tensor< size_t, Dim > &nfails) |
| Set the number of times each block failed.
|
|
const array_type::tensor< size_t, Dim > & | nfails () const |
| Get the number of times each block failed.
|
|
void | set_sigmay (const array_type::tensor< double, Dim > &sigmay) |
| Set the yield stress.
|
|
const array_type::tensor< double, Dim > & | sigmay () const |
| Get the yield stress.
|
|
void | set_sigmay_mean (const array_type::tensor< double, Dim > &value) |
| Set the mean wherefrom the yield stress of each block is drawn.
|
|
const array_type::tensor< double, Dim > & | sigmay_mean () const |
| Get the mean wherefrom the yield stress of each block is drawn.
|
|
void | set_sigmay_std (const array_type::tensor< double, Dim > &value) |
| Set the standard deviation wherefrom the yield stress of each block is drawn.
|
|
const array_type::tensor< double, Dim > & | sigmay_std () const |
| Get the standard deviation wherefrom the yield stress of each block is drawn.
|
|
void | set_sigma (const array_type::tensor< double, Dim > &sigma) |
| Set the stress.
|
|
const array_type::tensor< double, Dim > & | sigma () const |
| Get the stress.
|
|
void | set_sigmabar (double sigmabar) |
| Adjust the stress such that the average stress is equal to the argument.
|
|
double | sigmabar () const |
| Get the average stress.
|
|
double | epsframe () const |
| Get the current position of the loading frame.
|
|
void | set_epsframe (double u) |
| Overwrite the current position of the loading frame.
|
|
void | initSigmaFast (double sigma_std, size_t delta_r) |
| Generate a stress field that is compatible, using a fast but approximative technique.
|
|
void | initSigmaPropogator (double sigma_std) |
| Generate a stress field that is compatible.
|
|
void | makeAthermalFailureStep () |
| Fail an unstable block, chosen randomly from all unstable blocks.
|
|
void | makeAthermalFailureSteps (size_t n) |
| Make n steps with SystemBase::makeAthermalFailureStep.
|
|
size_t | makeAthermalFailureSteps_chrono (size_t n, double elapsed) |
| Make n steps with SystemBase::makeAthermalFailureStep.
|
|
void | makeWeakestFailureStep (bool allow_stable=false) |
| Fail weakest block (unstable) and advance the time by one.
|
|
void | makeWeakestFailureSteps (size_t n, bool allow_stable=false) |
| Make n steps with SystemBase::makeWeakestFailureStep.
|
|
size_t | makeWeakestFailureSteps_chrono (size_t n, double elapsed, bool allow_stable=false) |
| Make n steps with SystemBase::makeWeakestFailureStep.
|
|
double | temperature () const |
| Get the applied temperature.
|
|
void | set_temperature (double temperature) |
| Set the applied temperature.
|
|
array_type::tensor< double, Dim > | time_to_failure () const |
| Time to failure.
|
|
void | makeThermalFailureStep () |
| Make a thermal failure step.
|
|
void | makeThermalFailureSteps (size_t n) |
| Make n steps with SystemBase::makeThermalFailureStep.
|
|
size_t | makeThermalFailureSteps_chrono (size_t n, double elapsed) |
| Make n steps with SystemBase::makeThermalFailureStep.
|
|
const array_type::tensor< double, Dim > | x () const |
| Distance to failure.
|
|
const array_type::tensor< bool, Dim > & | unstable () const |
| If a block is unstable.
|
|
void | spatialParticleFailure (size_t idx) |
| Fail a block.
|
|
double | shiftImposedShear (int direction=1) |
| Change the imposed shear strain such that one block fails in the direction of shear.
|
|
size_t | relaxAthermal (size_t max_steps=1e9, bool max_steps_is_error=true) |
| Relax the system by calling SystemBase::makeAthermalFailureStep until there are no more unstable blocks.
|
|
size_t | relaxWeakest (size_t max_steps=1e9, bool max_steps_is_error=true) |
| Relax the system by calling SystemBase::makeWeakestFailureStep until there are no more unstable blocks.
|
|
|
prrng::pcg32 | m_gen |
| Random number generator.
|
|
array_type::tensor< double, Dim > | m_propagator |
| Propagator.
|
|
std::array< ptrdiff_t, Dim > | m_offset |
| Minimal distance in each direction, used as offset.
|
|
array_type::tensor< double, Dim > | m_sig |
| Stress.
|
|
array_type::tensor< double, Dim > | m_sigy |
| Yield stress.
|
|
array_type::tensor< double, Dim > | m_sigy_mu |
| Mean yield stress.
|
|
array_type::tensor< double, Dim > | m_sigy_std |
| Standard deviation of yield stress.
|
|
array_type::tensor< double, Dim > | m_epsp |
| Plastic strain.
|
|
array_type::tensor< size_t, Dim > | m_nfails |
| Number of times a block failed.
|
|
array_type::tensor< bool, Dim > | m_unstable |
| Per block: is the block unstable?
|
|
array_type::tensor< double, Dim > | m_tau_thermal |
| Thermal failure rate.
|
|
double | m_t |
| Time.
|
|
double | m_alpha |
| Exponent characterising the shape of the potential.
|
|
StressFixer * | m_stress_fixer |
| Method to fix the average stress.
|
|
double | m_temperature |
| Temperature.
|
|
double | m_inv_temp |
| Inverse temperature.
|
|
double | m_tau |
| Inverse failure rate.
|
|
double | m_failure_rate |
| Failure rate (parameter).
|
|
size_t | m_failure_idx |
| For the last failure: index of the failing block.
|
|
double | m_failure_x |
| For the last failure: distance to yielding before failure.
|
|
template<size_t Dimension, class StressFixer, class Temperature, class FailureRules>
class GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >
Failure
If a block \( f \) fails:
- The block looses stress: \( \sigma_f (t + \tau) = \sigma_f (t) - \Delta \sigma_f \) (see above).
- The stress in surrounding blocks is changed according to the propagator: \( \sigma (\vec{r}_f + \Delta \vec{r}, t + \tau) =
\sigma (\vec{r}_f + \Delta \vec{r}, t) + G(\Delta \vec{r}) \Delta \sigma_f \), with \( \vec{r}_f \) is the position of the failing block and \( \Delta \vec{r} \neq \vec{0} \) the distance to it. Note: the propagator is modified internally, see below.
- The plastic strain of the block is increased by: \( \varepsilon^p_f (t + \tau) = \varepsilon^p_f (t) + \Delta \sigma_f / \mu \), where \( \mu \equiv 1 \) is the shear modulus.
- Note
- In practice the stress of the failing and surrounding blocks is updated in a single step: \( \sigma (\vec{r}_f + \Delta \vec{r}, t + \tau) =
\sigma (\vec{r}_f + \Delta \vec{r}, t) + G(\Delta \vec{r}) \Delta \sigma_f \), with \( G(\Delta \vec{r} = \vec{0}) \equiv -1 \). This requirement is enforced internally upon construction.
Dynamics
Which block fails is determined based on the 'temperature', as follows:
- "Athermal": One of the unstable ( \( x < 0 \)) blocks fails.
"Thermal": The blocks with the smallest time to failure fails. For unstable blocks the time to failure is \( \tau \), for stable blocks it is \( \tau \exp( x^\alpha / T ) \).
(Only available for thermal systems.)
- "Extreme Dynamics": Assume that the temperature \( T = 0^+ \). Consequently, the difference in failure times are so great that the weakest block (for which \( x = \min(x) \)) always fails.
Dimension
The dimensionality of the system is the template parameter Dim
. In the Python API the system is pre-compiled in all available dimensions. For example:
// C++
GooseEPM::SystemStressControl<2> system(...);
# Python
system = GooseEPM.SystemStressControl2(...)
Initialisation
By default the stress is chosen randomly (from normal distribution with mean 0 and standard deviation 0.1) according to compatibility, and the system is relaxed to being stable. For customisation you can (in Python code):
system = System(..., random_stress=False)
system.sigma = ...
...
Since initialisation can be a expensive, you can also use the above to re-use the same initial stress distribution in multiple simulations.
Definition at line 559 of file System.h.