コード例 #1
0
ファイル: rcm2.C プロジェクト: JimBrouzoulis/oofem-1
void
RCM2Material :: giveRealStressVector(FloatArray &answer, MatResponseForm form, GaussPoint *gp,
                                     const FloatArray &totalStrain,
                                     TimeStep *atTime)
//
// returns real stress vector in 3d stress space of receiver according to
// previous level of stress and current
// strain increment, the only way, how to correctly update gp records
//
{
    FloatArray princStress, reducedStressVector, crackStrain, reducedAnswer;
    FloatArray reducedTotalStrainVector, principalStrain, strainVector;
    FloatMatrix tempCrackDirs;
    RCM2MaterialStatus *status = ( RCM2MaterialStatus * ) this->giveStatus(gp);
    StructuralCrossSection *crossSection = ( StructuralCrossSection * ) gp->giveElement()->giveCrossSection();

    this->initTempStatus(gp);
    this->initGpForNewStep(gp);

    // subtract stress independent part
    // note: eigenStrains (temperature) is not contained in mechanical strain stored in gp
    // therefore it is necessary to subtract always the total eigen strain value
    this->giveStressDependentPartOfStrainVector(reducedTotalStrainVector, gp, totalStrain, atTime, VM_Total);
    //

    crossSection->giveFullCharacteristicVector(strainVector, gp, reducedTotalStrainVector);

    status->giveTempCrackDirs(tempCrackDirs);
    this->computePrincipalValDir(principalStrain, tempCrackDirs,
                                 strainVector,
                                 principal_strain);

    this->giveRealPrincipalStressVector3d(princStress, gp, principalStrain, tempCrackDirs, atTime);

    princStress.resize(6);
    status->giveTempCrackDirs(tempCrackDirs);
    this->transformStressVectorTo(answer, tempCrackDirs, princStress, 1);

    status->letTempStrainVectorBe(totalStrain);
    crossSection->giveReducedCharacteristicVector(reducedStressVector, gp, answer);
    status->letTempStressVectorBe(reducedStressVector);
    status->giveCrackStrainVector(crackStrain);
    this->updateCrackStatus(gp, crackStrain);

    if ( form == FullForm ) {
        return;
    }

    crossSection->giveReducedCharacteristicVector(reducedAnswer, gp, answer);
    answer = reducedAnswer;
}
コード例 #2
0
FloatArray *
J2plasticMaterial :: ComputeStressSpaceHardeningVarsReducedGradient(GaussPoint *gp, FloatArray *stressVector,
                                                                    FloatArray *stressSpaceHardeningVars)
{
    /* computes stress space hardening gradient in reduced stress-strain space */

    int i, kcount = 0, size = this->giveSizeOfReducedHardeningVarsVector(gp);
    //double f,ax,ay,az,sx,sy,sz;
    FloatArray *answer;
    FloatArray *fullKinematicGradient, reducedKinematicGrad;
    StructuralCrossSection *crossSection = ( StructuralCrossSection * )
                                           ( gp->giveElement()->giveCrossSection() );

    if ( !hasHardening() ) {
        return NULL;
    }

    answer = new FloatArray(size);

    /* kinematic hardening variables first */
    if ( this->kinematicHardeningFlag ) {
        fullKinematicGradient = this->ComputeStressGradient(gp, stressVector, stressSpaceHardeningVars);
        crossSection->giveReducedCharacteristicVector(reducedKinematicGrad, gp, * fullKinematicGradient);
        delete fullKinematicGradient;

        kcount = reducedKinematicGrad.giveSize();
    }

    if ( this->kinematicHardeningFlag ) {
        for ( i = 1; i <= kcount; i++ ) {
            answer->at(i) = reducedKinematicGrad.at(i);
        }
    }

    if ( this->isotropicHardeningFlag ) {
        answer->at(size) = sqrt(1. / 3.);
    }

    return answer;
}