Changeset 27476
- Timestamp:
- 12/21/22 13:46:29 (2 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/AdjointHorizAnalysis.cpp
r27102 r27476 2391 2391 case 2: 2392 2392 case 11: 2393 case 14: 2393 2394 dragcoefficient_input = basalelement->GetInput(FrictionCEnum); _assert_(dragcoefficient_input); 2394 2395 break; … … 2484 2485 case 2: 2485 2486 case 11: 2487 case 14: 2486 2488 dragcoeff_input = element->GetInput(FrictionCEnum); _assert_(dragcoeff_input); 2487 2489 break; … … 2593 2595 case 2: 2594 2596 case 11: 2597 case 14: 2595 2598 dragcoeff_input = element->GetInput(FrictionCEnum); _assert_(dragcoeff_input); 2596 2599 break; … … 2714 2717 case 2: 2715 2718 case 11: 2719 case 14: 2716 2720 dragcoeff_input = basalelement->GetInput(FrictionCEnum); _assert_(dragcoeff_input); 2717 2721 break; … … 2832 2836 case 2: 2833 2837 case 11: 2838 case 14: 2834 2839 dragcoeff_input = basalelement->GetInput(FrictionCEnum); _assert_(dragcoeff_input); 2835 2840 break; -
issm/trunk-jpl/src/c/classes/Loads/Friction.cpp
r27475 r27476 125 125 GetAlphaSchoofComplement(palpha_complement,gauss); 126 126 break; 127 case 14: 128 GetAlphaRegCoulombComplement(palpha_complement,gauss); 129 break; 127 130 default: 128 131 _error_("not supported"); … … 295 298 *palpha_complement=alpha_complement; 296 299 }/*}}}*/ 300 void Friction::GetAlphaRegCoulombComplement(IssmDouble* palpha_complement, Gauss* gauss){/*{{{*/ 301 302 /* Compute the complement of Schoof's law for inversion 303 * d alpha2 304 * -------- = |u_b|^(1/m-1) * (|u_b + u_0|)^(-1/m) 305 * dC 306 */ 307 308 /*diverse: */ 309 IssmDouble m, u0; 310 IssmDouble alpha_complement; 311 312 /*Recover parameters: */ 313 element->GetInputValue(&m,gauss,FrictionMEnum); 314 element->parameters->FindParam(&u0,FrictionU0Enum); 315 316 /*Get velocity magnitude*/ 317 IssmDouble ub = VelMag(gauss); 318 319 /*Check to prevent dividing by zero if vmag==0*/ 320 if(ub==0.) { 321 alpha_complement=0.; 322 } 323 else { 324 /*Compute friction complement*/ 325 alpha_complement= (pow(ub,1./m-1.)) / pow(ub/u0 + 1.,1./m); 326 } 327 328 /*Assign output pointers:*/ 329 *palpha_complement=alpha_complement; 330 }/*}}}*/ 297 331 void Friction::GetAlpha2(IssmDouble* palpha2, Gauss* gauss){/*{{{*/ 298 332 … … 341 375 case 13: 342 376 GetAlpha2Coulomb2(palpha2,gauss); 377 break; 378 case 14: 379 GetAlpha2RegCoulomb(palpha2,gauss); 343 380 break; 344 381 default: … … 910 947 *palpha2=alpha2; 911 948 }/*}}}*/ 912 949 void Friction::GetAlpha2RegCoulomb(IssmDouble* palpha2, Gauss* gauss){/*{{{*/ 950 951 /*This routine calculates the basal friction coefficient 952 * 953 * C |u_b|^(1/m-1) 954 * alpha2= __________________________ 955 * (|u_b|/u0 + 1 )^(1/m) 956 * 957 * */ 958 959 /*diverse: */ 960 IssmDouble C,coeff,u0,m,alpha2; 961 962 /*Recover parameters: */ 963 element->GetInputValue(&coeff,gauss,FrictionCEnum); 964 element->GetInputValue(&m,gauss,FrictionMEnum); 965 element->parameters->FindParam(&u0,FrictionU0Enum); 966 967 /* scale C for a better inversion */ 968 C = coeff*coeff; 969 970 /*Get velocity magnitude*/ 971 IssmDouble ub = VelMag(gauss); 972 973 /*Check to prevent dividing by zero if vmag==0*/ 974 if(ub==0.) { 975 alpha2=0.; 976 } 977 else { 978 /*Compute alpha^2*/ 979 alpha2= (C*pow(ub,1./m-1.)) / pow(ub/u0 + 1.,1./m); 980 } 981 982 /*Assign output pointers:*/ 983 *palpha2=alpha2; 984 }/*}}}*/ 913 985 IssmDouble Friction::EffectivePressure(Gauss* gauss){/*{{{*/ 914 986 /*Get effective pressure as a function of flag */ … … 1192 1264 } 1193 1265 break; 1266 case 14: 1267 iomodel->FetchDataToInput(inputs,elements,"md.friction.C",FrictionCEnum); 1268 iomodel->FetchDataToInput(inputs,elements,"md.friction.m",FrictionMEnum); 1269 break; 1194 1270 default: 1195 1271 _error_("friction law "<< frictionlaw <<" not supported"); … … 1264 1340 parameters->AddObject(iomodel->CopyConstantObject("md.friction.effective_pressure_limit",FrictionEffectivePressureLimitEnum)); 1265 1341 break; 1342 case 14: 1343 parameters->AddObject(iomodel->CopyConstantObject("md.friction.u0",FrictionU0Enum)); 1344 break; 1266 1345 default: _error_("Friction law "<<frictionlaw<<" not implemented yet"); 1267 1346 } -
issm/trunk-jpl/src/c/classes/Loads/Friction.h
r27473 r27476 41 41 void GetAlphaViscousComplement(IssmDouble* alpha_complement,Gauss* gauss); 42 42 void GetAlphaSchoofComplement(IssmDouble* alpha_complement,Gauss* gauss); 43 void GetAlphaRegCoulombComplement(IssmDouble* alpha_complement,Gauss* gauss); 43 44 void GetAlphaWeertmanComplement(IssmDouble* alpha_complement,Gauss* gauss); 44 45 void GetAlpha2(IssmDouble* palpha2,Gauss* gauss); … … 55 56 void GetAlpha2PISM(IssmDouble* palpha2,Gauss* gauss); 56 57 void GetAlpha2Schoof(IssmDouble* palpha2,Gauss* gauss); 58 void GetAlpha2RegCoulomb(IssmDouble* palpha2,Gauss* gauss); 57 59 void GetAlpha2Tsai(IssmDouble* palpha2,Gauss* gauss); 58 60 -
issm/trunk-jpl/src/c/modules/DragCoefficientAbsGradientx/DragCoefficientAbsGradientx.cpp
r26090 r27476 63 63 DatasetInput* weights_input=basalelement->GetDatasetInput(InversionCostFunctionsCoefficientsEnum); _assert_(weights_input); 64 64 65 /* get the friction law: if 11-Schoof, which has a different nameof C */65 /* get the friction law: if 2-Weertman, 11-Schoof or 14-RegularizedCoulomb, which has a different names of C */ 66 66 element->FindParam(&frictionlaw, FrictionLawEnum); 67 67 Input* drag_input; … … 69 69 case 2: 70 70 case 11: 71 case 14: 71 72 drag_input = basalelement->GetInput(FrictionCEnum); _assert_(drag_input); 72 73 break; -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r27469 r27476 205 205 FrictionLinearizeEnum, 206 206 FrictionPseudoplasticityExponentEnum, 207 FrictionU0Enum, 207 208 FrictionThresholdSpeedEnum, 208 209 FrictionVoidRatioEnum,
Note:
See TracChangeset
for help on using the changeset viewer.