Example #1
0
void
M1Material :: giveRealStressVector_PlaneStress(FloatArray &answer,
                                               GaussPoint *gp,
                                               const FloatArray &totalStrain,
                                               TimeStep *tStep)
{
    int i, imp;
    FloatArray sigmaN, deps, sigmaNyield;
    double depsN, epsN;

    answer.resize(3);
    answer.zero();
    sigmaNyield.resize(nmp);
    sigmaNyield.zero();

    M1MaterialStatus *status = static_cast< M1MaterialStatus * >( this->giveStatus(gp) );
    this->initTempStatus(gp);
    sigmaN = status->giveNormalMplaneStresses();
    if ( sigmaN.giveSize() < nmp ) {
        sigmaN.resize(nmp);
        sigmaN.zero();
    }
    deps.beDifferenceOf( totalStrain, status->giveStrainVector() );

    for ( imp = 1; imp <= nmp; imp++ ) {
        depsN = N.at(imp, 1) * deps.at(1) + N.at(imp, 2) * deps.at(2) + N.at(imp, 3) * deps.at(3);
        epsN = N.at(imp, 1) * totalStrain.at(1) + N.at(imp, 2) * totalStrain.at(2) + N.at(imp, 3) * totalStrain.at(3);
        sigmaN.at(imp) += EN * depsN;
        double sy = EN * ( s0 + HN * epsN ) / ( EN + HN ); // current microplane yield stress
        if ( sy < 0. ) {
            sy = 0.;
        }
        if ( sigmaN.at(imp) > sy ) {
            sigmaN.at(imp) = sy;
        }
        sigmaNyield.at(imp) = sy;
        for ( i = 1; i <= 3; i++ ) {
            answer.at(i) += N.at(imp, i) * sigmaN.at(imp) * mw.at(imp);
        }
    }

    // update status
    status->letTempStrainVectorBe(totalStrain);
    status->letTempNormalMplaneStressesBe(sigmaN);
    status->letNormalMplaneYieldStressesBe(sigmaNyield);
    status->letTempStressVectorBe(answer);
}
Example #2
0
int
M1Material :: giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
{
    M1MaterialStatus *status = static_cast< M1MaterialStatus * >( this->giveStatus(gp) );
    if ( type == IST_PlasticStrainTensor ) {
        // plastic strain is computed as total strain minus elastic strain
        // (note that integration of microplane plastic strains would give a different result)
        answer = status->giveStrainVector();
        FloatArray sig = status->giveStressVector();
        double aux = nu * ( sig.at(1) + sig.at(2) + sig.at(3) );
        double G = E / ( 2. * ( 1. + nu ) );
        answer.at(1) -= ( ( 1. + nu ) * sig.at(1) - aux ) / E;
        answer.at(2) -= ( ( 1. + nu ) * sig.at(2) - aux ) / E;
        answer.at(3) -= ( ( 1. + nu ) * sig.at(3) - aux ) / E;
        answer.at(4) -= sig.at(4) / G;
        answer.at(5) -= sig.at(5) / G;
        answer.at(6) -= sig.at(6) / G;
        return 1;
    } else {
        return StructuralMaterial :: giveIPValue(answer, gp, type, tStep);
    }
}