コード例 #1
0
void
SimpleCrossSection :: giveGeneralizedStress_Beam2d(FloatArray &answer, GaussPoint *gp, const FloatArray &strain, TimeStep *tStep)
{
  /**Note: (by bp): This assumes that the behaviour is elastic
     there exist a nuumber of nonlinear integral material models for beams defined directly in terms of integral forces and moments and corresponding 
     deformations and curvatures. This would require to implement support at material model level.
     Mikael: That would not be a continuum material model, but it would highly depend on the cross-section shape, thus, it should be a special cross-section model instead.
     This cross-section assumes you can split the response into inertia moments and pure material response. This is only possible for a constant, elastic response (i.e. elastic).
     Therefore, this cross-section may only be allowed to give the elastic response.
  */
    StructuralMaterial *mat = static_cast< StructuralMaterial * >( this->giveMaterial(gp) );
    FloatArray elasticStrain, et, e0;
    FloatMatrix tangent;
    elasticStrain = strain;
    this->giveTemperatureVector(et, gp, tStep);
    if ( et.giveSize() > 0 ) {
        mat->giveThermalDilatationVector(e0, gp, tStep);
        double thick = this->give(CS_Thickness, gp);
        elasticStrain.at(1) -= e0.at(1) * ( et.at(1) - mat->giveReferenceTemperature() );
        if ( et.giveSize() > 1 ) {
            elasticStrain.at(2) -= e0.at(1) * et.at(2) / thick;     // kappa_x
        }
    }
    this->give2dBeamStiffMtrx(tangent, ElasticStiffness, gp, tStep);
    answer.beProductOf(tangent, elasticStrain);
    StructuralMaterialStatus *status = static_cast< StructuralMaterialStatus * >( mat->giveStatus(gp) );
    status->letTempStrainVectorBe(strain);
    status->letTempStressVectorBe(answer);
}
コード例 #2
0
void
SimpleCrossSection :: giveGeneralizedStress_Shell(FloatArray &answer, GaussPoint *gp, const FloatArray &strain, TimeStep *tStep)
{
  /**Note: (by bp): This assumes that the behaviour is elastic
     there exist a nuumber of nonlinear integral material models for beams/plates/shells
     defined directly in terms of integral forces and moments and corresponding 
     deformations and curvatures. This would require to implement support at material model level.
     Mikael: See earlier response to comment
  */
    StructuralMaterial *mat = static_cast< StructuralMaterial * >( this->giveMaterial(gp) );
    FloatArray elasticStrain, et, e0;
    FloatMatrix tangent;
    elasticStrain = strain;
    this->giveTemperatureVector(et, gp, tStep);
    if ( et.giveSize() ) {
        double thick = this->give(CS_Thickness, gp);
        mat->giveThermalDilatationVector(e0, gp, tStep);
        elasticStrain.at(1) -= e0.at(1) * ( et.at(1) - mat->giveReferenceTemperature() );
        elasticStrain.at(2) -= e0.at(2) * ( et.at(1) - mat->giveReferenceTemperature() );
        if ( et.giveSize() > 1 ) {
            elasticStrain.at(4) -= e0.at(1) * et.at(2) / thick;     // kappa_x
            elasticStrain.at(5) -= e0.at(2) * et.at(2) / thick;     // kappa_y
        }
    }
    this->give3dShellStiffMtrx(tangent, ElasticStiffness, gp, tStep);
    answer.beProductOf(tangent, elasticStrain);
    StructuralMaterialStatus *status = static_cast< StructuralMaterialStatus * >( mat->giveStatus(gp) );
    status->letTempStrainVectorBe(strain);
    status->letTempStressVectorBe(answer);
}
コード例 #3
0
void
SimpleCrossSection :: computeStressIndependentStrainVector(FloatArray &answer,
                                                           GaussPoint *gp, TimeStep *stepN, ValueModeType mode)
//
// returns initial strain vector induced by stress independent effects
// like temperatue or shrinkage.
// takes into account form of load vector assumed by engngModel (Incremental or Total Load form).
//
{
    StructuralMaterial *mat = ( StructuralMaterial * ) gp->giveElement()->giveMaterial();
    ///@todo  Deprecated or not? If so, remove it! / Mikael
#if 0
    MaterialMode matmode = gp-> giveMaterialMode ();
    FloatArray et, e0, fullAnswer;
    double thick, width;

    if ((matmode == _2dBeam) || (matmode == _3dBeam) || (matmode == _3dShell) || (matmode == _2dPlate)) {

        StructuralElement *elem = (StructuralElement*)gp->giveElement();
        elem -> computeResultingIPTemperatureAt (et, stepN, gp, mode);
        FloatArray redAnswer;

        if (et.giveSize() == 0) {answer.resize(0); return ;}
        if (et.giveSize() < 1) {
            _error ("computeStressIndependentStrainVector - Bad format of TemperatureLoad");
            exit (1);
        }
        mat->giveThermalDilatationVector (e0, gp,stepN);

        if (matmode == _2dBeam) {
            answer.resize (3);
            answer.zero();
            answer.at(1) = e0.at(1) * (et.at(1)- mat->giveReferenceTemperature());
            if (et.giveSize() > 1) {
                thick = this->give(THICKNESS);
                answer.at(2) = e0.at(1) * et.at(2)/ thick;   // kappa_x
            }
        } else if (matmode == _3dBeam) {
            answer.resize (6);
            answer.zero();

            answer.at(1) = e0.at(1) * (et.at(1)- mat->giveReferenceTemperature());
            if (et.giveSize() > 1) {
                thick = this->give(THICKNESS);
                width = this->give(WIDTH);
                answer.at(5) = e0.at(1) * et.at(2)/ thick;   // kappa_y
                if (et.giveSize() > 2)
                    answer.at(6) = e0.at(1) * et.at(3)/ width;   // kappa_z
            }
        } else if (matmode == _2dPlate) {

            if (et.giveSize() > 1) {
                answer.resize (5);
                answer.zero();

                thick = this->give(THICKNESS);
                if (et.giveSize() > 1) {
                    answer.at(1) = e0.at(1) * et.at(2)/ thick;   // kappa_x
                    answer.at(2) = e0.at(2) * et.at(2)/ thick;   // kappa_y
                }
            }
        } else if (matmode == _3dShell) {
            answer.resize (8);
            answer.zero();

            answer.at(1) = e0.at(1) * (et.at(1)- mat->giveReferenceTemperature());
            answer.at(2) = e0.at(2) * (et.at(1)- mat->giveReferenceTemperature());
            if (et.giveSize() > 1) {
                thick = this->give(THICKNESS);
                answer.at(4) = e0.at(1) * et.at(2)/ thick;   // kappa_x
                answer.at(5) = e0.at(2) * et.at(2)/ thick;   // kappa_y
            }
        } else _error ("Unsupported material mode");
    } else {
        mat->computeStressIndependentStrainVector (answer, gp, stepN, mode);
    }
#endif
    mat->computeStressIndependentStrainVector(answer, gp, stepN, mode);
}