Changeset 17348
- Timestamp:
- 02/25/14 08:11:21 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/StressbalanceSIAAnalysis.cpp
r17212 r17348 257 257 258 258 /*Intermediaries */ 259 IssmDouble ub,vb,slope2,drag,thickness,connectivity; 259 int frictionlaw = 1; 260 IssmDouble ub,vb,slope2,drag,thickness,surface,connectivity; 260 261 IssmDouble slope[2]; 261 262 … … 274 275 Input* slopey_input = element->GetInput(SurfaceSlopeYEnum); _assert_(slopey_input); 275 276 Input* thickness_input = element->GetInput(ThicknessEnum); _assert_(thickness_input); 277 Input* surface_input = element->GetInput(SurfaceEnum); _assert_(surface_input); 276 278 Input* drag_input = element->GetInput(FrictionCoefficientEnum); _assert_(drag_input); 277 279 … … 283 285 284 286 thickness_input->GetInputValue(&thickness,gauss); 287 surface_input->GetInputValue(&surface,gauss); 285 288 drag_input->GetInputValue(&drag,gauss); 286 289 slopex_input->GetInputValue(&slope[0],gauss); … … 288 291 slope2=slope[0]*slope[0]+slope[1]*slope[1]; 289 292 290 /*Payne 1995 (m = 1, B = 5e-3/yts = 1.58e-10 m/s/Pa*/ 291 ub=-1.58*1.e-10*rho_ice*gravity*thickness*slope[0]; 292 vb=-1.58*1.e-10*rho_ice*gravity*thickness*slope[1]; 293 ///*Ritz et al. 1996*/ 294 //ub=drag*(rho_ice*gravity*thickness)*(rho_ice*gravity*thickness)*slope[0]/sqrt(slope2); 295 //vb=drag*(rho_ice*gravity*thickness)*(rho_ice*gravity*thickness)*slope[1]/sqrt(slope2); 296 ///*Rutt et al. 2009*/ 297 //ub=-drag*rho_ice*gravity*thickness*slope[0]; 298 //vb=-drag*rho_ice*gravity*thickness*slope[1]; 293 switch(frictionlaw){ 294 case 1: 295 /*Payne 1995 (m = 1, B = 5e-3/yts = 1.58e-10 m/s/Pa*/ 296 ub=-1.58*1.e-10*rho_ice*gravity*thickness*slope[0]; 297 vb=-1.58*1.e-10*rho_ice*gravity*thickness*slope[1]; 298 break; 299 case 2: 300 /*Ritz et al. 1996*/ 301 ub=drag*(rho_ice*gravity*thickness)*(rho_ice*gravity*thickness)*slope[0]/sqrt(slope2); 302 vb=drag*(rho_ice*gravity*thickness)*(rho_ice*gravity*thickness)*slope[1]/sqrt(slope2); 303 break; 304 case 3: 305 /*Rutt et al. 2009*/ 306 ub=-drag*rho_ice*gravity*thickness*slope[0]; 307 vb=-drag*rho_ice*gravity*thickness*slope[1]; 308 break; 309 case 4: 310 /*Henning Akesson*/ 311 drag = -4e-15 * surface + 8.6e-12; 312 ub=-drag*rho_ice*gravity*thickness*slope[0]; 313 vb=-drag*rho_ice*gravity*thickness*slope[1]; 314 break; 315 default: 316 _error_("Not supported yet"); 317 } 299 318 300 319 pe->values[2*iv+0]=(ub-2.*pow(rho_ice*gravity,n)*pow(slope2,((n-1.)/2.))*pow(thickness,n)/(pow(B,n)*(n+1))*slope[0])/connectivity; … … 309 328 310 329 /*Intermediaries */ 330 int frictionlaw = 1; 311 331 int nodeup,nodedown,numsegments; 312 332 IssmDouble ub,vb,slope2,drag,surface,thickness,constant_part,z,Jdet; … … 374 394 drag_input->GetInputValue(&drag,gauss); 375 395 376 /*Payne 1995 (m = 1, B = 5e-3/yts = 1.58e-10 m/s/Pa*/ 377 ub=-1.58*1.e-10*rho_ice*gravity*thickness*slope[0]; 378 vb=-1.58*1.e-10*rho_ice*gravity*thickness*slope[1]; 379 ///*Ritz et al. 1996*/ 380 //ub=drag*(rho_ice*gravity*thickness)*(rho_ice*gravity*thickness)*slope[0]/sqrt(slope2); 381 //vb=drag*(rho_ice*gravity*thickness)*(rho_ice*gravity*thickness)*slope[1]/sqrt(slope2); 382 ///*Rutt et al. 2009*/ 383 //ub=-drag*rho_ice*gravity*thickness*slope[0]; 384 //vb=-drag*rho_ice*gravity*thickness*slope[1]; 396 switch(frictionlaw){ 397 case 1: 398 /*Payne 1995 (m = 1, B = 5e-3/yts = 1.58e-10 m/s/Pa*/ 399 ub=-1.58*1.e-10*rho_ice*gravity*thickness*slope[0]; 400 vb=-1.58*1.e-10*rho_ice*gravity*thickness*slope[1]; 401 break; 402 case 2: 403 /*Ritz et al. 1996*/ 404 ub=drag*(rho_ice*gravity*thickness)*(rho_ice*gravity*thickness)*slope[0]/sqrt(slope2); 405 vb=drag*(rho_ice*gravity*thickness)*(rho_ice*gravity*thickness)*slope[1]/sqrt(slope2); 406 break; 407 case 3: 408 /*Rutt et al. 2009*/ 409 ub=-drag*rho_ice*gravity*thickness*slope[0]; 410 vb=-drag*rho_ice*gravity*thickness*slope[1]; 411 break; 412 case 4: 413 /*Henning Akesson*/ 414 drag = -4e-15 * surface + 8.6e-12; 415 ub=-drag*rho_ice*gravity*thickness*slope[0]; 416 vb=-drag*rho_ice*gravity*thickness*slope[1]; 417 break; 418 default: 419 _error_("Not supported yet"); 420 } 385 421 386 422 pe->values[2*nodedown+0]+=ub/connectivity[0];
Note:
See TracChangeset
for help on using the changeset viewer.