Changeset 27673


Ignore:
Timestamp:
04/03/23 11:12:35 (2 years ago)
Author:
Mathieu Morlighem
Message:

CHG: added inversions for Coulomb2

Location:
issm/trunk-jpl/src/c/classes/Loads
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Loads/Friction.cpp

    r27508 r27673  
    141141                                GetAlphaSchoofComplement(palpha_complement,gauss);
    142142                                break;
     143                        case 13:
     144                                GetAlphaCoulomb2Complement(palpha_complement,gauss);
     145                                break;
    143146                        case 14:
    144147                                GetAlphaRegCoulombComplement(palpha_complement,gauss);
     
    354357        /*Assign output pointers:*/
    355358        *palpha_complement=alpha_complement;
     359}/*}}}*/
     360void Friction::GetAlphaCoulomb2Complement(IssmDouble* palpha_complement, Gauss* gauss){/*{{{*/
     361
     362        /* Compute the complement of Cornford's friction law for inversion
     363         * d alpha2                       
     364         * ------ = (C*N*v^m)/(C^(2/m)*v + (N/2)^(1/m))^m - (C^(2/m - 1)*C^2*N*v*v^m)/(C^(2/m)*v + (N/2)^(1/m))^(m + 1)
     365         *  dC                           
     366         */
     367
     368        /*diverse: */
     369        IssmDouble  m, C;
     370        IssmDouble  alpha_complement;
     371
     372        /*Recover parameters: */
     373        element->GetInputValue(&C,gauss,FrictionCEnum);
     374        element->GetInputValue(&m,gauss,FrictionMEnum);
     375
     376        /*Get effective pressure and velocity magnitude*/
     377        IssmDouble N = EffectivePressure(gauss);
     378        IssmDouble v = VelMag(gauss);
     379
     380        /*Compute alpha*/
     381        if(v<1e-10){
     382                alpha_complement = 0.;
     383        }
     384        else{
     385                alpha_complement= pow(0.5*N,1./m+1)* pow(v,m-1.) * pow(v*pow(C,1./m) +pow(0.5*N,1./m) ,-m-1.);
     386        }
     387
     388        /*Assign output pointers:*/
     389        *palpha_complement=alpha_complement/2.;
    356390}/*}}}*/
    357391void Friction::GetAlpha2(IssmDouble* palpha2, Gauss* gauss){/*{{{*/
  • issm/trunk-jpl/src/c/classes/Loads/Friction.h

    r27508 r27673  
    4141                void  GetAlphaViscousComplement(IssmDouble* alpha_complement,Gauss* gauss);
    4242                void  GetAlphaSchoofComplement(IssmDouble* alpha_complement,Gauss* gauss);
     43                void  GetAlphaCoulomb2Complement(IssmDouble* alpha_complement,Gauss* gauss);
    4344                void  GetAlphaRegCoulombComplement(IssmDouble* alpha_complement,Gauss* gauss);
    4445                void  GetAlphaWeertmanComplement(IssmDouble* alpha_complement,Gauss* gauss);
Note: See TracChangeset for help on using the changeset viewer.