void
StructuralInterfaceMaterial :: give2dStiffnessMatrix_Eng_Num(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep)
{
    // Default implementation for computation of the numerical tangent d(sig)/d(jump)
    // Computes the material stiffness using a central difference method

    StructuralInterfaceMaterialStatus *status = static_cast< StructuralInterfaceMaterialStatus * >( this->giveStatus( gp ) );
    double eps = 1.0e-12;
    FloatArray t, tPlus, tMinus;
    FloatArray tempJump, jumpPlus, jumpMinus, Kcolumn;
    FloatArray jump = {status->giveTempJump().at(1), status->giveTempJump().at(3)};
    int dim = jump.giveSize();
    answer.resize(dim, dim);
    answer.zero();

    for(int i = 1; i <= dim; i++) {
        jumpPlus = jumpMinus = jump;
        jumpPlus.at( i ) += eps;
        jumpMinus.at( i ) -= eps;
        this->giveEngTraction_2d(tPlus, gp, jumpPlus, tStep);
        this->giveEngTraction_2d(tMinus, gp, jumpMinus, tStep);

        Kcolumn.beDifferenceOf(tPlus, tMinus);
        answer.setColumn(Kcolumn, i);
    }
    answer.times( 1.0 / ( 2 * eps ) );
    this->giveEngTraction_2d( t, gp, jump, tStep ); // reset temp values by recomputing the stress
}
void
StructuralInterfaceMaterial :: giveStiffnessMatrix_dTdj_Num(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
{
    // Default implementation for computation of the numerical tangent
    // Computes the material stiffness using a central difference method

    StructuralInterfaceMaterialStatus *status = static_cast< StructuralInterfaceMaterialStatus * >( this->giveStatus(gp) );
    if ( status ) {
        FloatMatrix F;
        F = status->giveTempF();
        int dim = F.giveNumberOfRows();
        answer.resize(dim, dim);
        answer.zero();
        const double eps = 1.0e-9;
        FloatArray T, TPlus, TMinus;

        FloatArray jump, jumpPlus, jumpMinus, Kcolumn;
        jump = status->giveTempJump();
        for ( int i = 1; i <= dim; i++ ) {
            jumpPlus = jumpMinus = jump;
            jumpPlus.at(i)  += eps;
            jumpMinus.at(i) -= eps;
            this->giveFirstPKTraction_3d(TPlus, gp, jumpPlus, F, tStep);
            this->giveFirstPKTraction_3d(TMinus, gp, jumpMinus, F, tStep);

            Kcolumn = ( TPlus - TMinus );
            answer.setColumn(Kcolumn, i);
        }
        answer.times( 1.0 / ( 2 * eps ) );
        this->giveFirstPKTraction_3d(T, gp, jump, F, tStep); // reset temp values by recomputing the stress
    }
}
void
StructuralInterfaceMaterial::giveStiffnessMatrix_Eng_Num( FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep,
void( *giveTraction )( FloatArray &answer, GaussPoint *gp, const FloatArray &jump, TimeStep *tStep ) )
{
    // Default implementation for computation of the numerical tangent d(sig)/d(jump)
    // Computes the material stiffness using a central difference method

    StructuralInterfaceMaterialStatus *status = static_cast< StructuralInterfaceMaterialStatus * >( this->giveStatus( gp ) );
    if(status) {
        const double eps = 1.0e-9;
        FloatArray t, tPlus, tMinus;
        FloatArray jump, jumpPlus, jumpMinus, Kcolumn;
        jump = status->giveTempJump( );
        int dim = jump.giveSize();
        answer.resize( dim, dim );
        answer.zero( );

        for(int i = 1; i <= dim; i++) {
            jumpPlus = jumpMinus = jump;
            jumpPlus.at( i ) += eps;
            jumpMinus.at( i ) -= eps;
            giveTraction( tPlus, gp, jumpPlus, tStep );
            giveTraction( tMinus, gp, jumpMinus, tStep );

            Kcolumn = ( tPlus - tMinus );
            answer.setColumn( Kcolumn, i );
        }
        answer.times( 1.0 / ( 2 * eps ) );
        giveTraction( t, gp, jump, tStep ); // reset temp values by recomputing the stress
    }
}
Beispiel #4
0
void
CohesiveInterfaceMaterial :: give3dStiffnessMatrix_Eng(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
{
    answer.resize(3, 3);
    answer.zero();
    
    StructuralInterfaceMaterialStatus *status = static_cast< StructuralInterfaceMaterialStatus * >( this->giveStatus(gp) );
//     double normalJump = status->giveTempJump().at(1);
    
//     if (normalJump > 0.) {
//         if(normalJump<transitionOpening){ // reduce traction in tension
//             double stiffTmp = kn*stiffCoeffKn + (kn - kn*stiffCoeffKn) * (1. - normalJump/transitionOpening);
//             answer.at(1, 1) = stiffTmp;
//         } else {
//             answer.at(1, 1) = kn * stiffCoeffKn;
//         }
//     } else {
//         // standard part of elastic stress-strain law
//         answer.at(1, 1) = kn;
//     }
//     
//     if ( rMode == SecantStiffness || rMode == TangentStiffness ) {
//         if ( normalJump + transitionOpening <= 0. ) { //local CS
//             answer.at(1, 1) = kn; //compression
//         } else {
//             answer.at(1, 1) = 0*kn*stiffCoeffKn; //tension
//         }
//     } else {
//         answer.at(1, 1) = kn; 
//     }
    
    
    double x = status->giveTempJump().at(1) + transitionOpening;
    
    if (stiffCoeffKn == 1.){//tension stiffness = compression stiffness
        answer.at(1,1) = kn;
    } else {
        //TangentStiffness by derivating traction with regards to x (=relative displacement)
        answer.at(1,1) = (M_PI/2. + atan(smoothMag*x))/M_PI*kn*stiffCoeffKn + (M_PI/2.-atan(smoothMag*x))/M_PI*kn + smoothMag*kn*stiffCoeffKn*x/M_PI/(smoothMag*smoothMag*x*x+1) - smoothMag*kn*x/M_PI/(smoothMag*smoothMag*x*x+1);
    }
    
    //answer.at(1, 1) = kn; 
    answer.at(2, 2) = ks;
    answer.at(3, 3) = ks;
}