@Derivative#

Description#

This method is used for explicit integration. The model will be required to furnish time derivatives for all the VarInt variables as a function of the gradient rate and the current VarInt values.

\[\dot{{\cal V}}_{int} = fn\left( \dot{\bf g}_{tot}, {\cal A}\left({\cal V}^t_{int}\right) \right)\]

where \(\bf g\) being the gradient variables. The program automatically initializes the gradient under the name grad, and its time derivative named dgrad.

For each variable vname defined, there will be an associated allocated math object named dvname. This object is attached appropriately to the integration variable vector such that all calculated variable rates are to be assigned to these variables. The method therefore has the gradient variable, all the current VarInt variables, and the dvname rate variables active. Other variables may be activated using the @SetVar command.

CODE

DESCRIPTION

tau

double for the fractional time in the increment

var

total vector of the integrated variables (const)

dvar

vector to be filled with the variable derivatives

dgrad

time derivative of gradient variables; this is changed from the standard definition which is the increment of gradient

For finite element behaviors, after the behavior is integrated, assignment of the auxiliary variables, calculation of the flux variable, flux, be made, and assignment of the tangent matrix must be made. These calculations should be made in the @PostStep method.

Example#

This is the derivative function for the first example header on page .

@Derivative {
  double CC1=C1/1.5; double CC2=C2/1.5; double fact=1.0;
  if (Fp.determin()<=0.0) { Fp=0.0; Fp[0]=Fp[1]=Fp[2]=1.0; }
  if (Dtime>0.0) fact=(tau-Time_ini)/Dtime;

  TENSOR2 Ft    = F - ((1.-fact)*Dtime)*dF;
  TENSOR2 Fe    = Ft*inverse(Fp);
  TENSOR2 R(usz), U(psz); Fe.strain_partion(R, U);
  TENSOR2 E     = U.log_tensor();

               sig = *elasticity*E;
  TENSOR2      Xv1 = CC1*alpha1;
  TENSOR2      Xv2 = CC2*alpha2;
  double       Rad = isotropic->radius(evcum);

  TENSOR2 sprime = deviator(sig);
  TENSOR2 sigeff = sprime-Xv1-Xv2;
  double  J      = sqrt(1.5*(sigeff|sigeff));
  double  f      = J - Rad;

  if (f>0.0) {
     TENSOR2          norm     = sigeff*(1.5/J);
                      devcum = flow->flow_rate(evcum,f);
                      dFp      = norm*devcum*Fp;
     if (CC1>0.0)     dalpha1  = devcum*(norm - (D1/CC1)*Xv1);
     if (CC2>0.0)     dalpha2  = devcum*(norm - (D2/CC2)*Xv2);
  }
}