Changeset 18804
- Timestamp:
- 11/18/14 11:25:37 (10 years ago)
- Location:
- issm/trunk-jpl/src
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/EnthalpyAnalysis.cpp
r18778 r18804 30 30 int frictionlaw; 31 31 iomodel->Constant(&frictionlaw,FrictionLawEnum); 32 if(frictionlaw==4 ) parameters->AddObject(iomodel->CopyConstantObject(FrictionGammaEnum));32 if(frictionlaw==4 || frictionlaw==6) parameters->AddObject(iomodel->CopyConstantObject(FrictionGammaEnum)); 33 33 }/*}}}*/ 34 34 void EnthalpyAnalysis::UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type){/*{{{*/ … … 120 120 iomodel->FetchDataToInput(elements,FrictionWaterLayerEnum); 121 121 break; 122 case 6: 123 iomodel->FetchDataToInput(elements,FrictionCEnum); 124 iomodel->FetchDataToInput(elements,FrictionMEnum); 125 iomodel->FetchDataToInput(elements,PressureEnum); 126 iomodel->FetchDataToInput(elements,TemperatureEnum); 127 break; 122 128 default: 123 129 _error_("not supported"); -
issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp
r18778 r18804 133 133 int frictionlaw; 134 134 iomodel->Constant(&frictionlaw,FrictionLawEnum); 135 if(frictionlaw==4 ) parameters->AddObject(iomodel->CopyConstantObject(FrictionGammaEnum));135 if(frictionlaw==4 || frictionlaw==6) parameters->AddObject(iomodel->CopyConstantObject(FrictionGammaEnum)); 136 136 137 137 }/*}}}*/ … … 285 285 iomodel->FetchDataToInput(elements,FrictionQEnum); 286 286 iomodel->FetchDataToInput(elements,FrictionWaterLayerEnum); 287 break; 288 case 6: 289 iomodel->FetchDataToInput(elements,FrictionCEnum); 290 iomodel->FetchDataToInput(elements,FrictionMEnum); 291 iomodel->FetchDataToInput(elements,PressureEnum); 292 iomodel->FetchDataToInput(elements,TemperatureEnum); 287 293 break; 288 294 default: -
issm/trunk-jpl/src/c/analyses/ThermalAnalysis.cpp
r18778 r18804 28 28 iomodel->DeleteData(&requestedoutputs,numoutputs,ThermalRequestedOutputsEnum); 29 29 30 /*Deal with friction parameters*/ 31 int frictionlaw; 32 iomodel->Constant(&frictionlaw,FrictionLawEnum); 33 if(frictionlaw==4 || frictionlaw==6) parameters->AddObject(iomodel->CopyConstantObject(FrictionGammaEnum)); 30 34 }/*}}}*/ 31 35 void ThermalAnalysis::UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type){/*{{{*/ … … 108 112 iomodel->FetchDataToInput(elements,FrictionWaterLayerEnum); 109 113 break; 114 case 6: 115 iomodel->FetchDataToInput(elements,FrictionCEnum); 116 iomodel->FetchDataToInput(elements,FrictionMEnum); 117 iomodel->FetchDataToInput(elements,PressureEnum); 118 iomodel->FetchDataToInput(elements,TemperatureEnum); 119 break; 110 120 default: 111 121 _error_("not supported"); -
issm/trunk-jpl/src/c/classes/Loads/Friction.cpp
r18797 r18804 57 57 case 5: 58 58 GetAlpha2WaterLayer(palpha2,gauss); 59 break; 60 case 6: 61 GetAlpha2WeertmanTemp(palpha2,gauss); 59 62 break; 60 63 default: … … 233 236 /*Here, we want to parameterize the friction as a function of temperature 234 237 * 235 * alpha2 = alpha2_viscous * f(T)238 * alpha2 = alpha2_viscous * 1/f(T) 236 239 * 237 240 * where f(T) = exp((T-Tpmp)/gamma) … … 252 255 /*Compute scaling parameter*/ 253 256 element->parameters->FindParam(&gamma,FrictionGammaEnum); 254 alpha2 = alpha2 *exp((T-Tpmp)/gamma);257 alpha2 = alpha2 / exp((T-Tpmp)/gamma); 255 258 256 259 /*Assign output pointers:*/ … … 318 321 *palpha2=alpha2; 319 322 }/*}}}*/ 323 void Friction::GetAlpha2WeertmanTemp(IssmDouble* palpha2, Gauss* gauss){/*{{{*/ 324 /*Here, we want to parameterize the friction as a function of temperature 325 * 326 * alpha2 = alpha2_weertman * 1/f(T) 327 * 328 * where f(T) = exp((T-Tpmp)/gamma) 329 */ 330 331 /*Intermediaries: */ 332 IssmDouble f,T,pressure,Tpmp,gamma; 333 IssmDouble alpha2; 334 335 /*Get viscous part*/ 336 this->GetAlpha2Weertman(&alpha2,gauss); 337 338 /*Get pressure melting point (Tpmp) for local pressure and get current temperature*/ 339 element->GetInputValue(&T,gauss,TemperatureEnum); 340 element->GetInputValue(&pressure,gauss,PressureEnum); 341 Tpmp = element->TMeltingPoint(pressure); 342 343 /*Compute scaling parameter*/ 344 element->parameters->FindParam(&gamma,FrictionGammaEnum); 345 alpha2 = alpha2 / exp((T-Tpmp)/gamma); 346 347 /*Assign output pointers:*/ 348 *palpha2=alpha2; 349 }/*}}}*/ 320 350 void Friction::GetAlphaComplement(IssmDouble* palpha_complement, Gauss* gauss){/*{{{*/ 321 351 -
issm/trunk-jpl/src/c/classes/Loads/Friction.h
r18770 r18804 35 35 void GetAlpha2Temp(IssmDouble* palpha2,Gauss* gauss); 36 36 void GetAlpha2WaterLayer(IssmDouble* palpha2,Gauss* gauss); 37 void GetAlpha2WeertmanTemp(IssmDouble* palpha2,Gauss* gauss); 37 38 void GetAlphaComplement(IssmDouble* alpha_complement,Gauss* gauss); 38 39 };
Note:
See TracChangeset
for help on using the changeset viewer.