Summary behind the problem: The following code aims at solving a static elasto-plastic problem. Like a 2D square mesh based on an elasto-plastic constitutive model like Von-Mises or Drucker-Prager with isotropic hardening. It is a demo from Fenics - Solid Mechanics App. They use a return mapping algorithm called 'Closest-point projection' (Simo and Hughes 1998) with Newton method to solve the non-linear problem.
Full Code: https://bitbucket.org/fenics-apps/fenics-solid-mechanics/src/0f813a2e8726821a08d112809421517aab9dd24e/demo/square/main.cpp?at=master&fileviewer=file-view-default
The problem: In the c++ demo, they use the following time stepping which I have never seen before. There are multiple time steps 'dt0', 'dt1'..etc. One of them is even NEGATIVE. They are defined in comments as 'load regions'. I don't understand what this means physically and mathematically. Can anyone offer a simple explanation about what could be the possible intention?
// Elastic time step, always one step.
double Edt = 0.0095;
// Load region 0, time step and number of steps
double dt0 = 0.001;
unsigned int dt0_steps = 3;
// Load region 1, time step and number of steps
double dt1 = -0.002;
unsigned int dt1_steps = 1;
// Load region 2, time step and number of steps
double dt2 = 0.001;
unsigned int dt2_steps = 4;
// Load-disp info
unsigned int step = 0;
unsigned int steps = dt0_steps + dt1_steps + dt2_steps + 1;
while (step < steps)
{
// Use elastic tangent for first time step
if (step == 0)
t += Edt;
else if (step < 1 + dt0_steps)
t += dt0;
else if (step < 1 + dt0_steps + dt1_steps)
t += dt1;
else if (step < 1 + dt0_steps + dt1_steps + dt2_steps)
t += dt2;
step++;