Changeset 27232 for issm/trunk/src/c/classes/Loads/Friction.cpp
- Timestamp:
- 08/25/22 16:50:29 (3 years ago)
- Location:
- issm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
-
issm/trunk/src
- Property svn:mergeinfo changed
-
issm/trunk/src/c/classes/Loads/Friction.cpp
r26744 r27232 321 321 322 322 /*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*/ 324 325 325 326 /*diverse: */ 326 327 IssmDouble r,s; 327 328 IssmDouble drag_p, drag_q; 328 IssmDouble thickness,base,floatation_thickness,sealevel;329 329 IssmDouble drag_coefficient,drag_coefficient_coulomb; 330 330 IssmDouble alpha2,alpha2_coulomb; … … 333 333 element->GetInputValue(&drag_p,gauss,FrictionPEnum); 334 334 element->GetInputValue(&drag_q,gauss,FrictionQEnum); 335 element->GetInputValue(&thickness, gauss,ThicknessEnum);336 element->GetInputValue(&base, gauss,BaseEnum);337 element->GetInputValue(&sealevel, gauss,SealevelEnum);338 335 element->GetInputValue(&drag_coefficient, gauss,FrictionCoefficientEnum); 339 336 element->GetInputValue(&drag_coefficient_coulomb, gauss,FrictionCoefficientcoulombEnum); … … 347 344 348 345 /*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*/ 350 363 IssmDouble vmag = VelMag(gauss); 351 364 … … 360 373 } 361 374 362 floatation_thickness=0;363 if(base<0) floatation_thickness=-(rho_water/rho_ice)*base;364 375 if(vmag==0.){ 365 376 alpha2_coulomb=0.; 366 377 } 367 378 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; 369 381 } 370 382 … … 749 761 * C |u_b|^(m-1) 750 762 * alpha2= __________________________ 751 * (1+(C/(Cmax N ))^1/m |u_b| )^m763 * (1+(C/(Cmax Neff))^1/m |u_b| )^m 752 764 * 753 765 * */ … … 764 776 C = coeff*coeff; 765 777 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*/ 768 796 IssmDouble ub = VelMag(gauss); 769 797 770 798 /*Compute alpha^2*/ 771 if((ub<1e-10) ||(N ==0.0)){799 if((ub<1e-10) ||(Neff==0.0)){ 772 800 alpha2 = 0.; 773 801 } 774 802 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); 776 804 } 777 805
Note:
See TracChangeset
for help on using the changeset viewer.