예제 #1
0
파일: tr_shell01.C 프로젝트: vivianyw/oofem
void
TR_SHELL01 :: printOutputAt(FILE *file, TimeStep *tStep)
// Performs end-of-step operations.
{
    FloatArray v, aux;
    GaussPoint *membraneGP;
    IntegrationRule *iRule = this->giveDefaultIntegrationRulePtr();
    fprintf( file, "element %d (%8d) :\n", this->giveLabel(), this->giveNumber() );

    for ( GaussPoint *gp: *iRule ) {
        fprintf( file, "  GP %2d.%-2d :", iRule->giveNumber(), gp->giveNumber() );
        membraneGP = membrane->giveDefaultIntegrationRulePtr()->getIntegrationPoint(gp->giveNumber() - 1);
        // Strain - Curvature
        plate->giveIPValue(v, gp, IST_ShellStrainTensor, tStep);
        membrane->giveIPValue(aux, membraneGP, IST_ShellStrainTensor, tStep);
        v.add(aux);

        fprintf(file, "  strains    ");
        // eps_x, eps_y, eps_z, eps_yz, eps_xz, eps_xy (global)
        fprintf( file,
                " % .4e % .4e % .4e % .4e % .4e % .4e ",
                v.at(1), v.at(5), v.at(9),  v.at(6), v.at(3), v.at(2) );

        plate->giveIPValue(v, gp, IST_ShellCurvatureTensor, tStep);
        membrane->giveIPValue(aux, membraneGP, IST_ShellCurvatureTensor, tStep);
        v.add(aux);

        fprintf(file, "\n              curvatures ");
        // k_x, k_y, k_z, k_yz, k_xz, k_xy (global)
        fprintf( file,
                " % .4e % .4e % .4e % .4e % .4e % .4e ",
                v.at(1), v.at(5), v.at(9),  v.at(6), v.at(3), v.at(2) );

        // Forces - Moments
        plate->giveIPValue(v, gp, IST_ShellForceTensor, tStep);
        membrane->giveIPValue(aux, membraneGP, IST_ShellForceTensor, tStep);
        v.add(aux);

        fprintf(file, "\n              stresses   ");
        // n_x, n_y, n_z, v_yz, v_xz, v_xy (global)
        fprintf( file,
                " % .4e % .4e % .4e % .4e % .4e % .4e ",
                v.at(1), v.at(5), v.at(9),  v.at(6), v.at(3), v.at(2) );

        plate->giveIPValue(v, gp, IST_ShellMomentumTensor, tStep);
        membrane->giveIPValue(aux, membraneGP, IST_ShellMomentumTensor, tStep);
        v.add(aux);

        fprintf(file, "\n              moments    ");
        // m_x, m_y, m_z, m_yz, m_xz, m_xy (global)
        fprintf( file,
                " % .4e % .4e % .4e % .4e % .4e % .4e ",
                v.at(1), v.at(5), v.at(9),  v.at(6), v.at(3), v.at(2) );

        fprintf(file, "\n");
    }
}
예제 #2
0
void
TR_SHELL02 :: printOutputAt(FILE *file, TimeStep *tStep)
// Performs end-of-step operations.
{
    FloatArray v, aux;
    IntegrationRule *iRule = this->giveDefaultIntegrationRulePtr();
    fprintf( file, "element %d (%8d) :\n", this->giveLabel(), this->giveNumber() );

    for ( GaussPoint *gp: *iRule ) {
        fprintf( file, "  GP %2d.%-2d :", iRule->giveNumber(), gp->giveNumber() );
        GaussPoint *membraneGP = membrane->giveDefaultIntegrationRulePtr()->getIntegrationPoint(gp->giveNumber() - 1);
        // Strain - Curvature
        plate->giveIPValue(v, gp, IST_ShellStrainTensor, tStep);
        membrane->giveIPValue(aux, membraneGP, IST_ShellStrainTensor, tStep);
        v.add(aux);

        fprintf(file, "  strains    ");
        for ( auto &val : v ) fprintf(file, " %.4e", val);

        plate->giveIPValue(v, gp, IST_CurvatureTensor, tStep);
        membrane->giveIPValue(aux, membraneGP, IST_CurvatureTensor, tStep);
        v.add(aux);

        fprintf(file, "\n              curvatures ");
        for ( auto &val : v ) fprintf(file, " %.4e", val);

        // Forces - Moments
        plate->giveIPValue(v, gp, IST_ShellForceTensor, tStep);
        membrane->giveIPValue(aux, membraneGP, IST_ShellForceTensor, tStep);
        v.add(aux);

        fprintf(file, "\n              stresses   ");
        for ( auto &val : v ) fprintf(file, " %.4e", val);

        plate->giveIPValue(v, gp, IST_ShellMomentTensor, tStep);
        membrane->giveIPValue(aux, membraneGP, IST_ShellMomentTensor, tStep);
        v.add(aux);

        fprintf(file, "\n              moments    ");
        for ( auto &val : v ) fprintf(file, " %.4e", val);

        fprintf(file, "\n");
    }
}
예제 #3
0
void
TR_SHELL01 :: printOutputAt(FILE *file, TimeStep *tStep)
// Performs end-of-step operations.
{
    FloatArray v, aux;
    GaussPoint *gp, *membraneGP;
    IntegrationRule *iRule = this->giveDefaultIntegrationRulePtr();
    fprintf( file, "element %d (%8d) :\n", this->giveLabel(), this->giveNumber() );

    for ( int i = 0; i < iRule->giveNumberOfIntegrationPoints(); i++ ) {
      gp  = iRule->getIntegrationPoint(i);
      fprintf(file, "  GP %2d.%-2d :", iRule->giveNumber(), gp->giveNumber());
      membraneGP = membrane->giveDefaultIntegrationRulePtr()->getIntegrationPoint(gp->giveNumber()-1);
      // Strain - Curvature
      plate->giveIPValue(v, gp, IST_ShellStrainCurvatureTensor, tStep);
      membrane->giveIPValue(aux, membraneGP, IST_ShellStrainCurvatureTensor, tStep);
      v.add(aux);

      fprintf(file, "  strains ");
      fprintf( file,
            " % .4e % .4e % .4e % .4e % .4e % .4e % .4e % .4e % .4e % .4e % .4e % .4e ",
            v.at(1), v.at(2), v.at(3),  2. * v.at(4), 2. * v.at(5), 2. * v.at(6),
            v.at(7), v.at(8), v.at(9),  2. * v.at(10), 2. * v.at(11), 2. * v.at(12) );
      
      // Strain - Curvature
      plate->giveIPValue(v, gp, IST_ShellForceMomentumTensor, tStep);
      membrane->giveIPValue(aux, membraneGP, IST_ShellForceMomentumTensor, tStep);
      v.add(aux);
      
      fprintf(file, "\n              stresses");
      fprintf( file,
            " % .4e % .4e % .4e % .4e % .4e % .4e % .4e % .4e % .4e % .4e % .4e % .4e ",
            v.at(1), v.at(2), v.at(3),  v.at(4), v.at(5), v.at(6),
            v.at(7), v.at(8), v.at(9),  v.at(10), v.at(11), v.at(12) );
      
      fprintf(file, "\n");
    }
}