Changeset 26443


Ignore:
Timestamp:
09/20/21 13:21:48 (3 years ago)
Author:
Mathieu Morlighem
Message:

CHG: rewriting/reorganizing crevasse depth law

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r26329 r26443  
    405405
    406406        IssmDouble  calvingrate[NUMVERTICES];
    407         IssmDouble  vx,vy,vel;
     407        IssmDouble  vx,vy;
    408408        IssmDouble  water_height, bed,Ho,thickness,surface;
    409409        IssmDouble  surface_crevasse[NUMVERTICES], basal_crevasse[NUMVERTICES], crevasse_depth[NUMVERTICES], H_surf, H_surfbasal;
    410         IssmDouble  B, strainparallel, straineffective,n;
     410        IssmDouble  strainparallel, straineffective,B,n;
    411411        IssmDouble  s_xx,s_xy,s_yy,s1,s2,stmp;
    412         int crevasse_opening_stress;
     412        int         crevasse_opening_stress;
    413413
    414414        /*retrieve the type of crevasse_opening_stress*/
     
    442442                bed_input->GetInputValue(&bed,&gauss);
    443443                surface_input->GetInputValue(&surface,&gauss);
    444                 strainrateparallel_input->GetInputValue(&strainparallel,&gauss);
    445                 strainrateeffective_input->GetInputValue(&straineffective,&gauss);
     444
    446445                vx_input->GetInputValue(&vx,&gauss);
    447446                vy_input->GetInputValue(&vy,&gauss);
     
    450449                s_xy_input->GetInputValue(&s_xy,&gauss);
    451450                s_yy_input->GetInputValue(&s_yy,&gauss);
    452                 B_input->GetInputValue(&B,&gauss);
    453                 n_input->GetInputValue(&n,&gauss);
    454 
    455                 vel=sqrt(vx*vx+vy*vy)+1.e-14;
    456 
    457                 s1=(s_xx+s_yy)/2.+sqrt(pow((s_xx-s_yy)/2.,2)+pow(s_xy,2));
    458                 s2=(s_xx+s_yy)/2.-sqrt(pow((s_xx-s_yy)/2.,2)+pow(s_xy,2));
    459                 if(fabs(s2)>fabs(s1)){stmp=s2; s2=s1; s1=stmp;}
    460 
    461                 Ho = thickness - (rho_seawater/rho_ice) * (-bed);
    462                 if(Ho<0.)  Ho=0.;
    463 
    464                 if(crevasse_opening_stress==0){         /*Otero2010: balance between the tensile deviatoric stress and ice overburden pressure*/
    465                         surface_crevasse[iv] = B * strainparallel * pow(straineffective, ((1 / n)-1)) / (rho_ice * constant_g);
    466                         basal_crevasse[iv] = (rho_ice/(rho_seawater-rho_ice)) * (B * strainparallel * pow(straineffective,((1/n)-1)) / (rho_ice*constant_g) - Ho);
    467                 }
    468                 else if(crevasse_opening_stress==1){     /*Benn2017,Todd2018: maximum principal stress */
    469                         surface_crevasse[iv] = s1 / (rho_ice*constant_g);
    470                         basal_crevasse[iv] = (rho_ice/(rho_seawater-rho_ice))* (s1/ (rho_ice*constant_g)-Ho);
    471                 }
    472 
    473                 /* some constraints */
    474                 if (surface_crevasse[iv]<0.) {
     451
     452      /*Get longitudinal or maximum Eigen stress*/
     453                if(crevasse_opening_stress==0){
     454         /*Otero2010: balance between the tensile deviatoric stress and ice overburden pressure*/
     455                        strainrateparallel_input->GetInputValue(&strainparallel,&gauss);
     456                        strainrateeffective_input->GetInputValue(&straineffective,&gauss);
     457                        B_input->GetInputValue(&B,&gauss);
     458                        n_input->GetInputValue(&n,&gauss);
     459         s1 =  B * strainparallel * pow(straineffective, (1./n)-1);
     460                }
     461                else if(crevasse_opening_stress==1){
     462         /*Benn2017,Todd2018: maximum principal stress */
     463                        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         }
     467                }
     468      else{
     469         _error_("not supported");
     470      }
     471
     472      /*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;
     474                if(surface_crevasse[iv]<0.){
    475475                        surface_crevasse[iv]=0.;
    476476                        water_height = 0.;
    477477                }
    478                 if (basal_crevasse[iv]<0.) basal_crevasse[iv]=0.;
    479                 if (bed>0.) basal_crevasse[iv] = 0.;
    480 
    481                 //if (surface_crevasse[iv]<water_height){
    482                 //      water_height = surface_crevasse[iv];
    483                 //}
    484 
    485                 /* add water in surface crevasse */
    486                 surface_crevasse[iv] = surface_crevasse[iv] + (rho_freshwater/rho_ice)*water_height; /* surface crevasse + water */
    487                 crevasse_depth[iv] = surface_crevasse[iv] + (rho_freshwater/rho_ice)*water_height + basal_crevasse[iv]; /* surface crevasse + basal crevasse + water */
    488 
     478
     479      /*Basal crevasse: sigma'_xx - rho_i g (H-d) - rho_w g (b+d) = 0*/
     480      if(bed>0.){
     481         basal_crevasse[iv] = 0.;
     482      }
     483      else{
     484         Ho = thickness - (rho_seawater/rho_ice) * (-bed);
     485         if(Ho<0.)  Ho=0.;
     486         basal_crevasse[iv] = (rho_ice/(rho_seawater-rho_ice))* (s1/ (rho_ice*constant_g)-Ho);
     487         if(basal_crevasse[iv]<0.) basal_crevasse[iv]=0.;
     488      }
     489
     490      /*Total crevasse depth (surface + basal)*/
     491                crevasse_depth[iv]   = surface_crevasse[iv] + basal_crevasse[iv];
    489492        }
    490493
Note: See TracChangeset for help on using the changeset viewer.