当前位置: 首页>>代码示例>>C++>>正文


C++ StructuralInterfaceMaterialStatus::giveTempJump方法代码示例

本文整理汇总了C++中StructuralInterfaceMaterialStatus::giveTempJump方法的典型用法代码示例。如果您正苦于以下问题:C++ StructuralInterfaceMaterialStatus::giveTempJump方法的具体用法?C++ StructuralInterfaceMaterialStatus::giveTempJump怎么用?C++ StructuralInterfaceMaterialStatus::giveTempJump使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在StructuralInterfaceMaterialStatus的用法示例。


在下文中一共展示了StructuralInterfaceMaterialStatus::giveTempJump方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

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
}
开发者ID:framby,项目名称:OOFEM_Johannes,代码行数:28,代码来源:structuralinterfacematerial.C

示例2:

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
    }
}
开发者ID:JimBrouzoulis,项目名称:OOFEM_Jim,代码行数:32,代码来源:structuralinterfacematerial.C

示例3: giveTraction

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
    }
}
开发者ID:JimBrouzoulis,项目名称:OOFEM_Jim,代码行数:31,代码来源:structuralinterfacematerial.C

示例4: atan

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;
}
开发者ID:aishugang,项目名称:oofem,代码行数:45,代码来源:cohint.C


注:本文中的StructuralInterfaceMaterialStatus::giveTempJump方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。