Ignore:
Timestamp:
08/25/22 16:50:29 (3 years ago)
Author:
Mathieu Morlighem
Message:

merged trunk-jpl and trunk for revision 27230

Location:
issm/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk

  • issm/trunk/src

  • issm/trunk/src/c/classes/Loads/Friction.cpp

    r26744 r27232  
    321321
    322322        /*This routine calculates the basal friction coefficient
    323           alpha2= drag^2 * Neff ^r * | vel | ^(s-1), with Neff=rho_ice*g*thickness+rho_ice*g*base, r=q/p and s=1/p**/
     323          alpha2= drag^2 * Neff ^r * | vel | ^(s-1), with Neff=rho_ice*g*thickness+rho_ice*g*base, r=q/p and s=1/p
     324          alpha2= min(drag^2 * Neff ^r * | vel | ^(s-1), drag_coulomb^2 * Neff*/
    324325
    325326        /*diverse: */
    326327        IssmDouble  r,s;
    327328        IssmDouble  drag_p, drag_q;
    328         IssmDouble  thickness,base,floatation_thickness,sealevel;
    329329        IssmDouble  drag_coefficient,drag_coefficient_coulomb;
    330330        IssmDouble  alpha2,alpha2_coulomb;
     
    333333        element->GetInputValue(&drag_p,gauss,FrictionPEnum);
    334334        element->GetInputValue(&drag_q,gauss,FrictionQEnum);
    335         element->GetInputValue(&thickness, gauss,ThicknessEnum);
    336         element->GetInputValue(&base, gauss,BaseEnum);
    337         element->GetInputValue(&sealevel, gauss,SealevelEnum);
    338335        element->GetInputValue(&drag_coefficient, gauss,FrictionCoefficientEnum);
    339336        element->GetInputValue(&drag_coefficient_coulomb, gauss,FrictionCoefficientcoulombEnum);
     
    347344
    348345        /*Get effective pressure*/
    349         IssmDouble Neff = EffectivePressure(gauss);
     346        bool ispwStochastic;
     347        IssmDouble Neff;
     348        element->parameters->FindParam(&ispwStochastic,StochasticForcingIsWaterPressureEnum);
     349        if(ispwStochastic){
     350                /*Retrieve stochastic water pressure and compute ice pressure*/
     351                IssmDouble p_ice,p_water,Neff_limit;
     352                element->GetInputValue(&p_water,gauss,FrictionCoulombWaterPressureEnum);
     353                element->parameters->FindParam(&Neff_limit,FrictionEffectivePressureLimitEnum);
     354                p_ice = IcePressure(gauss);
     355                Neff  = max(Neff_limit*p_ice, p_ice - p_water);
     356        }       
     357        else{
     358                /*Compute effective pressure directly*/
     359                Neff = EffectivePressure(gauss);
     360        }
     361       
     362        /*Get velocity magnitude*/
    350363        IssmDouble vmag = VelMag(gauss);
    351364
     
    360373        }
    361374
    362         floatation_thickness=0;
    363         if(base<0) floatation_thickness=-(rho_water/rho_ice)*base;
    364375        if(vmag==0.){
    365376                alpha2_coulomb=0.;
    366377        }
    367378        else{
    368                 alpha2_coulomb=drag_coefficient_coulomb*drag_coefficient_coulomb*rho_ice*gravity*max(0.,thickness-floatation_thickness)/vmag;
     379                //alpha2_coulomb=drag_coefficient_coulomb*drag_coefficient_coulomb*rho_ice*gravity*max(0.,thickness-floatation_thickness)/vmag;
     380                alpha2_coulomb=drag_coefficient_coulomb*drag_coefficient_coulomb*Neff/vmag;
    369381        }
    370382
     
    749761         *               C |u_b|^(m-1)
    750762         * alpha2= __________________________
    751          *          (1+(C/(Cmax N))^1/m |u_b| )^m
     763         *          (1+(C/(Cmax Neff))^1/m |u_b| )^m
    752764         *
    753765         * */
     
    764776        C = coeff*coeff;
    765777
    766         /*Get effective pressure and velocity magnitude*/
    767         IssmDouble N  = EffectivePressure(gauss);
     778        /*Get effective pressure*/
     779        bool ispwStochastic;
     780        IssmDouble Neff;
     781        element->parameters->FindParam(&ispwStochastic,StochasticForcingIsWaterPressureEnum);
     782        if(ispwStochastic){
     783                /*Retrieve stochastic water pressure and compute ice pressure*/
     784                IssmDouble p_ice,p_water,Neff_limit;
     785                element->GetInputValue(&p_water,gauss,FrictionSchoofWaterPressureEnum);
     786                element->parameters->FindParam(&Neff_limit,FrictionEffectivePressureLimitEnum);
     787                p_ice = IcePressure(gauss);
     788                Neff  = max(Neff_limit*p_ice, p_ice - p_water);
     789        }       
     790        else{
     791                /*Compute effective pressure directly*/
     792                Neff = EffectivePressure(gauss);
     793        }
     794
     795        /*Get velocity magnitude*/
    768796        IssmDouble ub = VelMag(gauss);
    769797
    770798        /*Compute alpha^2*/
    771         if((ub<1e-10) ||(N==0.0)){
     799        if((ub<1e-10) ||(Neff==0.0)){
    772800                alpha2 = 0.;
    773801        }
    774802        else{
    775                 alpha2= (C*pow(ub,m-1.)) / pow(1.+  pow(C/(Cmax*N),1./m)*ub,m);
     803                alpha2= (C*pow(ub,m-1.)) / pow(1.+  pow(C/(Cmax*Neff),1./m)*ub,m);
    776804        }
    777805
Note: See TracChangeset for help on using the changeset viewer.