Changeset 22995


Ignore:
Timestamp:
07/22/18 12:06:19 (7 years ago)
Author:
Mathieu Morlighem
Message:

CHG: working on new friction law for Henning

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

Legend:

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

    r22856 r22995  
    195195        /*Check to prevent dividing by zero if vmag==0*/
    196196        if(vmag==0. && (s-1.)<0.) alpha_complement=0.;
    197         else alpha_complement=pow(Neff,r)*pow(vmag,(s-1));_assert_(!xIsNan<IssmDouble>(alpha_complement));
     197        else alpha_complement=pow(Neff,r)*pow(vmag,(s-1));
     198       
     199        _assert_(!xIsNan<IssmDouble>(alpha_complement));
     200        _assert_(!xIsInf<IssmDouble>(alpha_complement));
    198201
    199202        /*Assign output pointers:*/
     
    230233                case 9:
    231234                        GetAlpha2Josh(palpha2,gauss);
     235                        break;
     236                case 10:
     237                        GetAlpha2PISM(palpha2,gauss);
    232238                        break;
    233239          default:
     
    666672        element->parameters->FindParam(&gamma,FrictionGammaEnum);
    667673        alpha2 = alpha2 / exp((T-Tpmp)/gamma);
     674
     675        /*Assign output pointers:*/
     676        *palpha2=alpha2;
     677}/*}}}*/
     678void Friction::GetAlpha2PISM(IssmDouble* palpha2, Gauss* gauss){/*{{{*/
     679        /*Here, we want to parameterize the friction as
     680         *
     681         * ... more comments to come
     682         */
     683
     684        /*Compute effective pressure first */
     685        IssmDouble  N,delta,W,Wmax,e0,Cc,P0;
     686        //element->parameters->FindParam(&delta,TimeEnum);
     687        //element->parameters->FindParam(&e0,TimeEnum);
     688        //element->parameters->FindParam(&P0,TimeEnum);
     689        //element->GetInputValue(&Cc,gauss,FrictionPressureAdjustedTemperatureEnum);
     690        //element->GetInputValue(&W,gauss,FrictionPressureAdjustedTemperatureEnum);
     691        N = delta*P0*pow(10.,(e0/Cc)*(1.-W/Wmax));
     692
     693        /*Compute yield stress following a Mohr-Colomb criterion*/
     694        IssmDouble phi;
     695        //element->GetInputValue(&phi,gauss,FrictionPressureAdjustedTemperatureEnum);
     696        IssmDouble tau_c = N*tan(phi);
     697
     698        /*Compute basal speed*/
     699        IssmDouble ub;
     700        element->GetInputValue(&ub,gauss,VelEnum);
     701
     702        /*now compute alpha^2*/
     703        IssmDouble u0,q;
     704        //element->parameters->FindParam(&u0,TimeEnum);
     705        //element->parameters->FindParam(&q,TimeEnum);
     706        IssmDouble alpha2 = tau_c/(pow(ub,1.-q)*pow(u0,q));
     707
     708        /*Final checks in debuging mode*/
     709        _assert_(!xIsNan<IssmDouble>(alpha2));
     710        _assert_(!xIsInf<IssmDouble>(alpha2));
    668711
    669712        /*Assign output pointers:*/
  • issm/trunk-jpl/src/c/classes/Loads/Friction.h

    r22847 r22995  
    4343                void  GetAlpha2Weertman(IssmDouble* palpha2,Gauss* gauss);
    4444                void  GetAlpha2WeertmanTemp(IssmDouble* palpha2,Gauss* gauss);
     45                void  GetAlpha2PISM(IssmDouble* palpha2,Gauss* gauss);
    4546
    4647                IssmDouble EffectivePressure(Gauss* gauss);
Note: See TracChangeset for help on using the changeset viewer.