Changeset 26464
- Timestamp:
- 09/30/21 05:38:15 (3 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r26443 r26464 29 29 #define NUMVERTICES 3 30 30 #define NUMVERTICES1D 2 31 //#define ISMICI 1 31 32 32 33 /*Constructors/destructor/copy*/ … … 406 407 IssmDouble calvingrate[NUMVERTICES]; 407 408 IssmDouble vx,vy; 408 IssmDouble water_height, bed,H o,thickness,surface;409 IssmDouble water_height, bed,Hab,thickness,surface; 409 410 IssmDouble surface_crevasse[NUMVERTICES], basal_crevasse[NUMVERTICES], crevasse_depth[NUMVERTICES], H_surf, H_surfbasal; 410 411 IssmDouble strainparallel, straineffective,B,n; 411 412 IssmDouble s_xx,s_xy,s_yy,s1,s2,stmp; 412 413 int crevasse_opening_stress; 414 415 416 /*reset if no ice in element*/ 417 if(!this->IsIceInElement()){ 418 for(int i=0;i<NUMVERTICES;i++){ 419 surface_crevasse[i] = 0.; 420 basal_crevasse[i] = 0.; 421 crevasse_depth[i] = 0.; 422 } 423 this->AddInput(SurfaceCrevasseEnum,&surface_crevasse[0],P1DGEnum); 424 this->AddInput(BasalCrevasseEnum,&basal_crevasse[0],P1DGEnum); 425 this->AddInput(CrevasseDepthEnum,&crevasse_depth[0],P1DGEnum); 426 return; 427 } 428 413 429 414 430 /*retrieve the type of crevasse_opening_stress*/ … … 462 478 /*Benn2017,Todd2018: maximum principal stress */ 463 479 Matrix2x2Eigen(&s1,&s2,NULL,NULL,s_xx,s_xy,s_yy); 464 if(fabs(s2)>fabs(s1)){ 465 stmp=s2; s2=s1; s1=stmp; 466 } 480 s1 = max(0.,max(s1,s2)); 467 481 } 468 482 else{ … … 471 485 472 486 /*Surface crevasse: sigma'_xx - rho_i g d + rho_fw g d_w = 0*/ 473 surface_crevasse[iv] = s1 / (rho_ice*constant_g) + (rho_freshwater/rho_ice)*water_height;487 surface_crevasse[iv] = 2*s1 / (rho_ice*constant_g) + (rho_freshwater/rho_ice)*water_height; 474 488 if(surface_crevasse[iv]<0.){ 475 489 surface_crevasse[iv]=0.; … … 482 496 } 483 497 else{ 484 H o= thickness - (rho_seawater/rho_ice) * (-bed);485 if(H o<0.) Ho=0.;486 basal_crevasse[iv] = (rho_ice/(rho_seawater-rho_ice))* ( s1/ (rho_ice*constant_g)-Ho);498 Hab = thickness - (rho_seawater/rho_ice) * (-bed); 499 if(Hab<0.) Hab=0.; 500 basal_crevasse[iv] = (rho_ice/(rho_seawater-rho_ice))* (2*s1/ (rho_ice*constant_g)-Hab); 487 501 if(basal_crevasse[iv]<0.) basal_crevasse[iv]=0.; 488 502 } … … 4323 4337 } 4324 4338 4339 #ifdef MICI 4325 4340 /************************************** MICI START ************************************/ 4326 4341 /*MICI from Crawford et al. 2021: … … 4331 4346 * Tice = 5C; Bn -> I = 1.9e-16; α = 7.3 4332 4347 */ 4333 //Input* surface_input = this->GetInput(SurfaceEnum); _assert_(surface_input); 4334 //Input* bed_input = this->GetInput(BedEnum); _assert_(bed_input); 4335 //Input* ls_input = this->GetInput(MaskIceLevelsetEnum); _assert_(ls_input); 4336 //IssmDouble Hc,bed,ls; 4337 //for(int iv=0;iv<NUMVERTICES;iv++){ 4338 // gauss.GaussVertex(iv); 4339 4340 // surface_input->GetInputValue(&Hc,&gauss); 4341 // bed_input->GetInputValue(&bed,&gauss); 4342 // ls_input->GetInputValue(&ls,&gauss); 4343 4344 // if(Hc>135. && bed<0. && fabs(ls)<100.e3){ 4345 4346 // lsf_slopex_input->GetInputValue(&dlsf[0],&gauss); 4347 // norm_dlsf=0.; 4348 // for(i=0;i<dim;i++) norm_dlsf+=pow(dlsf[i],2); 4349 // norm_dlsf=sqrt(norm_dlsf); 4350 4351 // /*5C Bn (worst case scenario)*/ 4352 // IssmDouble I = 1.9e-16; 4353 // IssmDouble alpha = 7.3; 4354 // IssmDouble C = I*pow(Hc,alpha)/(24*3600.); /*convert from m/day to m/s*/ 4355 // movingfrontvx[iv] = -C*dlsf[0]/norm_dlsf; 4356 // movingfrontvy[iv] = -C*dlsf[1]/norm_dlsf; 4357 // } 4358 //} 4348 Input* surface_input = this->GetInput(SurfaceEnum); _assert_(surface_input); 4349 Input* bed_input = this->GetInput(BedEnum); _assert_(bed_input); 4350 Input* ls_input = this->GetInput(MaskIceLevelsetEnum); _assert_(ls_input); 4351 IssmDouble Hc,bed,ls; 4352 for(int iv=0;iv<NUMVERTICES;iv++){ 4353 gauss.GaussVertex(iv); 4354 4355 surface_input->GetInputValue(&Hc,&gauss); 4356 bed_input->GetInputValue(&bed,&gauss); 4357 ls_input->GetInputValue(&ls,&gauss); 4358 4359 /*Do we assume that the calving front does not move?*/ 4360 //movingfrontvx[iv] = 0.; 4361 //movingfrontvy[iv] = 0.; 4362 4363 //if(Hc>80. && bed<0. && fabs(ls)<100.e3){ //Pollard & De Conto 4364 if(Hc>135. && bed<0. && fabs(ls)<100.e3){ // Crawford et all 4365 4366 lsf_slopex_input->GetInputValue(&dlsf[0],&gauss); 4367 norm_dlsf=0.; 4368 for(i=0;i<dim;i++) norm_dlsf+=pow(dlsf[i],2); 4369 norm_dlsf=sqrt(norm_dlsf); 4370 4371 /*use vel direction instead of LSF*/ 4372 vx_input->GetInputValue(&v[0],&gauss); 4373 vy_input->GetInputValue(&v[1],&gauss); 4374 vel=sqrt(v[0]*v[0] + v[1]*v[1]); 4375 norm_dlsf = max(vel,1.e-10); 4376 dlsf[0] = v[0]; 4377 dlsf[1] = v[1]; 4378 4379 /*5C Bn (worst case scenario)*/ 4380 IssmDouble I = 1.9e-16; 4381 IssmDouble alpha = 7.3; 4382 IssmDouble C = min(2000.,I*pow(Hc,alpha))/(24*3600.); /*convert from m/day to m/s*/ 4383 //IssmDouble C = (min(max(Hc,80.),100.) - 80.)/20. * 10./(24*3600.); /*Original MICI! convert from m/day to m/s*/ 4384 movingfrontvx[iv] = -C*dlsf[0]/norm_dlsf; 4385 movingfrontvy[iv] = -C*dlsf[1]/norm_dlsf; 4386 } 4387 } 4388 #endif 4359 4389 /************************************** END MICI *************************************/ 4360 4390
Note:
See TracChangeset
for help on using the changeset viewer.