Пример #1
0
    //--------------------------------------------------------------------------------
    //
    //  ApplyConstitutiveEquations
    //  -- Apply Constitutive Equation to a given stress state and return the
    //     strain rate as a result.
    //
    //     Current used for testing the other parts of the code.
    //
    //--------------------------------------------------------------------------------
    EigenRep ApplyConstitutiveEquations( const EigenRep           & StressState,
                                         const vector<EigenRep>   & SchmidtTensors,
                                         const vector<Float>      & CRSS,
                                         const vector<Float>      & GammaDotBase,         // reference shear rate
                                         const vector<int>      & RateSensitivity)
    {

      EigenRep StrainRate( 0, 0, 0, 0, 0);
      for( int i = 0; i < SchmidtTensors.size(); i ++ )
      {
        Float GammaDot;
        Float RSS = InnerProduct( SchmidtTensors[i], StressState) / CRSS[i];
        if( RateSensitivity[i] > 0 )
          GammaDot = GammaDotBase[i] * std::pow( std::fabs( RSS ), static_cast<int>( RateSensitivity[i] ) );
        else
          GammaDot = GammaDotBase[i];
        StrainRate += SchmidtTensors[i] * GammaDot * sign( RSS );
      }
      return StrainRate;
    }
Пример #2
0
Array<double, 3> NWCriterion(
                             CFD_STRUCT_Fluido *F, 
                             MeshTool::MeshBlock & Grid
                            )
{
    
    Array<double,3> Nw(Grid.Nx,Grid.Ny,Grid.Nz);
    Array<double,5> Omega(4,4,Grid.Nx,Grid.Ny,Grid.Nz);
    Array<double,5> Strain(4,4,Grid.Nx,Grid.Ny,Grid.Nz);

    Omega = OmegaRate(F ,Grid); 
    Strain = StrainRate(F ,Grid); 

    for(int i = 0 ; i < Grid.Nx ; i++){
        for(int j = 0 ; j < Grid.Ny ; j++){
            for(int k = 0 ; k< Grid.Nz ; k++){
                Nw(i,j,k) = (
                           ( Omega(1,2,i,j,k)*Omega(1,2,i,j,k)
                           + Omega(1,3,i,j,k)*Omega(1,3,i,j,k)
                           + Omega(2,1,i,j,k)*Omega(2,1,i,j,k)
                           + Omega(2,3,i,j,k)*Omega(2,3,i,j,k)
                           + Omega(3,1,i,j,k)*Omega(3,1,i,j,k)
                           + Omega(3,2,i,j,k)*Omega(3,2,i,j,k) )
                           /
                           ( Strain(1,1,i,j,k)*Strain(1,1,i,j,k)
                           + Strain(2,2,i,j,k)*Strain(2,2,i,j,k)
                           + Strain(3,3,i,j,k)*Strain(3,3,i,j,k)
                           + 2.0*Strain(1,2,i,j,k)*Strain(1,2,i,j,k)
                           + 2.0*Strain(1,3,i,j,k)*Strain(1,3,i,j,k)
                           + 2.0*Strain(2,3,i,j,k)*Strain(2,3,i,j,k))
                           + 0.00001 
                            ); 
            }
        }
    }

    return Nw;
}