Changeset 22995
- Timestamp:
- 07/22/18 12:06:19 (7 years ago)
- 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 195 195 /*Check to prevent dividing by zero if vmag==0*/ 196 196 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)); 198 201 199 202 /*Assign output pointers:*/ … … 230 233 case 9: 231 234 GetAlpha2Josh(palpha2,gauss); 235 break; 236 case 10: 237 GetAlpha2PISM(palpha2,gauss); 232 238 break; 233 239 default: … … 666 672 element->parameters->FindParam(&gamma,FrictionGammaEnum); 667 673 alpha2 = alpha2 / exp((T-Tpmp)/gamma); 674 675 /*Assign output pointers:*/ 676 *palpha2=alpha2; 677 }/*}}}*/ 678 void 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)); 668 711 669 712 /*Assign output pointers:*/ -
issm/trunk-jpl/src/c/classes/Loads/Friction.h
r22847 r22995 43 43 void GetAlpha2Weertman(IssmDouble* palpha2,Gauss* gauss); 44 44 void GetAlpha2WeertmanTemp(IssmDouble* palpha2,Gauss* gauss); 45 void GetAlpha2PISM(IssmDouble* palpha2,Gauss* gauss); 45 46 46 47 IssmDouble EffectivePressure(Gauss* gauss);
Note:
See TracChangeset
for help on using the changeset viewer.