Example #1
0
tensor MDYieldSurface::xi_t1( const EPState *EPS) const {
  tensor dFoverds( 2, def_dim_2, 0.0);
  tensor I2("I", 2, def_dim_2);

  stresstensor S = EPS->getStress().deviator();

  double p = EPS->getStress().p_hydrostatic();
 
  stresstensor n = EPS->getTensorVar( 2 );
  //stresstensor n;
  	    
  ////-------------------------------------------------
  //double m = EPS->getScalarVar( 1 );
  //stresstensor alpha = EPS->getTensorVar( 1 ); // getting alpha_ij from EPState  
  //stresstensor r = S * (1.0 / p);
  //stresstensor r_bar = r - alpha;
  //stresstensor norm2 = r_bar("ij") * r_bar("ij");
  //double norm = sqrt( norm2.trace() );
  //
  //if ( norm >= d_macheps() ){ 
  //  n = r_bar *(1.0 / norm );
  //}
  //else {
  //  opserr->fatal("MDYieldSurface::dFods  |n_ij| = 0, divide by zero! Program exits.");
  //  exit(-1);
  //}
  //n = r_bar *(1.0 / sqrt23rd / m );
  ////-------------------------------------------------
    
  return  n  * (-1.0)* p;
}
Example #2
0
tensor RMC01YieldSurface::dFods(const EPState *EPS) const 
  {
  
    tensor dFoverds( 2, def_dim_2, 0.0);

//    double p = EPS->getStress().p_hydrostatic();
    double q = EPS->getStress().q_deviatoric();
    double theta = EPS->getStress().theta(); 
//    double temp_phi = EPS->getScalarVar(1)*3.14159265358979/180.0;
//    double temp_cohesive = EPS->getScalarVar(2);
    tensor DpoDs = EPS->getStress().dpoverds(); // dp/ds
    tensor DqoDs = EPS->getStress().dqoverds(); // dq/ds
    tensor DthetaoDs = EPS->getStress().dthetaoverds();  // d(theta)/ds
//    double a1 = -6*sin(temp_phi)/(3.0-sin(temp_phi));
//    double a2 = -6*temp_cohesive*cos(temp_phi)/(3.0-sin(temp_phi));
    double alfa = EPS->getScalarVar(1);
//    double k = EPS->getScalarVar(2);
    double a1 = (3.0*1.7320508076*alfa) / (2.0+1.7320508076*alfa);
    double e = (3.0-a1)/(3.0+a1);
    double Frou = g_0(theta, e);
    double Frou_prime = g_prime(theta, e);
    double dFoverdp = alfa*(-3.0);
//    double dFoverdq = Frou;
//    double dFoverdtheta = q*Frou_prime;    
    double dFoverdq = Frou/1.7320508076;
    double dFoverdtheta = q*Frou_prime/1.7320508076;

    dFoverds = DpoDs  * dFoverdp +
               DqoDs  * dFoverdq +
               DthetaoDs * dFoverdtheta; // dF/ds

    return dFoverds;

  }
Example #3
0
tensor DPYieldSurface01::xi_t1( const EPState *EPS) const {
    tensor dFoverds( 2, def_dim_2, 0.0);
    tensor I2("I", 2, def_dim_2);

    stresstensor S = EPS->getStress().deviator();

    double p = EPS->getStress().p_hydrostatic();
    p = p - Pc;

    stresstensor alpha = EPS->getTensorVar( 1 ); // getting alpha_ij from EPState

    stresstensor r = S * (1.0 / p); //for p = sig_kk/3
    stresstensor r_bar = r - alpha;
    stresstensor norm2 = r_bar("ij") * r_bar("ij");
    double norm = sqrt( norm2.trace() );

    stresstensor n;
    if ( norm >= d_macheps() ) {
        n = r_bar *(1.0 / norm );
    }
    else {
        opserr << "DPYieldSurface01::dFods  |n_ij| = 0, divide by zero! Program exits.\n";
        exit(-1);
    }

    return (-1.0) * n * p;
}
Example #4
0
tensor DPYieldSurface01::dFods(const EPState *EPS) const {

    tensor dFoverds( 2, def_dim_2, 0.0);
    tensor I2("I", 2, def_dim_2);

    stresstensor S = EPS->getStress().deviator();
    //S.reportshort("S");

    double p = EPS->getStress().p_hydrostatic();
    p = p - Pc;
    //printf("Here we go!  p %f\n", p);

    stresstensor alpha = EPS->getTensorVar( 1 ); // getting alpha_ij from EPState
    //alpha.reportshort("alpha");

    //stresstensor n = EPS->getTensorVar( 3 );     // getting n_ij from EPState
    //n.reportshort("n");

    //-------------------------------------------------
    // might be moved to Evolution Law
    stresstensor r = S * (1.0 / p);
    //r.reportshort("r");
    stresstensor r_bar = r - alpha;
    //r_bar.reportshort("r_bar");
    stresstensor norm2 = r_bar("ij") * r_bar("ij");
    double norm = sqrt( norm2.trace() );

    //opserr << "d_macheps " << d_macheps() << endlnn;

    stresstensor n;
    if ( norm >= d_macheps() ) {
        n =  r_bar*(1.0 / norm );
    }
    else {
        opserr << "DPYieldSurface01::dFods  |n_ij| = 0, divide by zero! Program exits.\n";
        exit(-1);
    }
    //EPS->setTensorVar( 3, n); //update n_ij//
    //-------------------------------------------------


    double m = EPS->getScalarVar( 1 );


    //tensorial multiplication produces 1st-order tensor
    //tensor temp = n("ij") * n("ij");
    //double temp1 = temp.trace();
    //printf("==== n_ij*n_ij %e\n", temp1);

    //!!Very important:  N = n_pq * alpha_pq +sqrt(2/3)*m (always) = n_pq*r_pq(not hold when not on the yield surface)
    tensor temp = n("ij") * alpha("ij");
    double N = temp.trace() + sqrt(2.0/3.0)*m;
    //printf("    N =  %e\n", N);

    dFoverds =  n - N *I2 *(1.0/3.0);

    return dFoverds;

}
Example #5
0
tensor CAMYieldSurface::dFods(const EPState *EPS) const {
  
  tensor dFoverds( 2, def_dim_2, 0.0);
  tensor I2("I", 2, def_dim_2);

  double p = EPS->getStress().p_hydrostatic();
  double q = EPS->getStress().q_deviatoric();
  double po = EPS->getScalarVar( 1 );
	 tensor DpoDs = EPS->getStress().dpoverds();
	 tensor DqoDs = EPS->getStress().dqoverds();

  double dFoverdp = -1.0*M*M*( po - 2.0*p );
  double dFoverdq = 2.0*q;

  dFoverds = DpoDs  * dFoverdp +
             DqoDs  * dFoverdq;

  return dFoverds;

}
Example #6
0
//! @brief BJtensor dF/dsigma_ij  (this is the place wher a derivativ over yield function is coded)
XC::BJtensor XC::TriFCYieldSurface::dFods(const XC::EPState *EPS ) const 
  {
     BJtensor dFoverds( 2, def_dim_2, 0.0);
     
     //double xi= EPS->getStress().xi();                   //  functions to get  Haigh-Westergard   
     double rho= EPS->getStress().rho();                   //  stress invariants for   
     double th= EPS->getStress().theta();          //  explanation look Jeremic&Sture,1998  


     BJtensor DpoDs= EPS->getStress().dpoverds();           //  functions to get  already defined
     BJtensor DqoDs= EPS->getStress().dqoverds();           //  drivatives of p, q and theta which are defined
     BJtensor DtoDs= EPS->getStress().dthetaoverds(); //  in stress.cpp file. With method getStress()  
							//  it is made sure that function is filled with curent stress 

     // some parametres neccecary to define yield function and make calculation more transparent

     double el= EPS->getScalarVar(1);                   // parameters called through      
     //double c= EPS->getScalarVar(2);                   // definitions of 'set EPS'
     double b1= pow (3.,(1./2.) ); 
     double b2= pow (2.,(1./2.) ); 
     //double b3= pow (1.5,(1./2.) );
     double b4= pow (6.,(1./2.) ); 

     double a4= 3.0*((fcomp * fcomp) - (ftens * ftens));         // variables neccecary to define 
     double a5= (fcomp * ftens);                                 // factor   m 
     double a6= (el/(1.0+ el));                                         // which is an expresion for 
     double m= a4*a6/a5;                                         // friction parameter
        
        
     // William warnke function
    
     double ww1= 4.0*(1.0-el*el)*cos(th)*cos(th) + (2.0*el-1.0)*(2.0*el-1.0);
     double ww2= 2.0*(1.0-el*el)*cos(th) + 
						 (2.0*el-1)*pow((4.0*(1.0-el*el)*cos(th)*cos(th) + 
																				 5.0*el*el -4.0*el),(1./2.));
     double ww= ww1/ww2; 

     //derivation of the William Warnke fuction over theta

     // some factors enabling me to check the function. It might not be 
     // the example of clearness but it was clear to me at the time I
     // wrote this and to be honest function is really ugly 

             
     double dWW1= (-1.0 + 2.0 * el) ;
     double dWW2= (1.0 - el * el) ;
     double dWW3= cos(th);
     double dWW4= cos(th) * cos(th);
     double dWW5= sin(th);
     double dWW6= pow ( ( -4.0 * el + 5.0 * el * el + 4.0 * dWW2 * dWW4  ) , (1.0/2.0 )  );
     double dWW7= -8.0 * dWW2 * dWW3 * dWW5;
     double dWW8= 2.0 * dWW2 * dWW3;
     double dWW9= dWW1 * dWW6;
     double dWW10 =           dWW1 * dWW1 + 4.0 * dWW2 * dWW4;   
     double dWW11 =           -2.0 * dWW2 * dWW5; 
     double dWW12 =           (4.0 * dWW1 * dWW2 * dWW3 * dWW5) / dWW6;
     double dWW13= dWW10 * (dWW11 - dWW12);
     double dWW14= (2.0 * dWW2 * dWW3) + (dWW1 * dWW6);  
         
     //William Warnke fuction derived over theta

     double dWWodth= (dWW7 / (dWW8 + dWW9)) - (dWW13 / (dWW14 * dWW14));  


     double dFoverdp= (  (3.0/b1) * m/(b1*fcomp) ); // derivation of yield function over xi
     double dFoverdq= ((( 3.0*rho/(fcomp*fcomp)) + ( m*ww/(b4*fcomp)))* b2/b1   );  // derivation of yield function over rho
     double dFoverdt= (  (m*rho/(b4*fcomp) )*dWWodth    ); // derivation of yield function over theta
    
     dFoverds= DpoDs   * dFoverdp +          // factors are added to this function  to take into 
                 DqoDs  * dFoverdq +         // account small differences between Haigh - Westergard
                 DtoDs  * dFoverdt;          // coordinats and  defined p an q functions. Vnesel sem jih v vrste 174-175
                                             // ker definica BJ tenzorja ne dopusca deljenje ce ni v tenzoski obliki
     return dFoverds;
  }