Changeset 16823


Ignore:
Timestamp:
11/18/13 16:03:02 (11 years ago)
Author:
Mathieu Morlighem
Message:

CHG: adding other sliding laws in SIA

Location:
issm/trunk-jpl/src/c/classes/Elements
Files:
2 edited

Legend:

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

    r16818 r16823  
    84478447        IssmDouble  z_list[NUMVERTICES];
    84488448        IssmDouble  slope[2];
    8449         IssmDouble  slope2,constant_part;
     8449        IssmDouble  slope2,constant_part,drag;
    84508450        IssmDouble  rho_ice,gravity,n,B;
    84518451        IssmDouble  ub,vb,z_g,surface,thickness;
     
    84688468        Input* slopex_input=inputs->GetInput(SurfaceSlopeXEnum); _assert_(slopex_input);
    84698469        Input* slopey_input=inputs->GetInput(SurfaceSlopeYEnum); _assert_(slopey_input);
     8470        Input* drag_input=inputs->GetInput(FrictionCoefficientEnum);  _assert_(drag_input);
    84708471        for(i=0;i<NUMVERTICES;i++)z_list[i]=xyz_list[i][2];
    84718472
     
    85128513                /*Deal with lower surface*/
    85138514                if(IsOnBed()){
    8514                         constant_part=-1.58*1.e-10*rho_ice*gravity*thickness;
    8515                         ub=constant_part*slope[0];
    8516                         vb=constant_part*slope[1];
     8515                        drag_input->GetInputValue(&drag,gauss);
     8516
     8517                        /*No ref...*/
     8518                        ub=-1.58*1.e-10*rho_ice*gravity*thickness*slope[0];
     8519                        vb=-1.58*1.e-10*rho_ice*gravity*thickness*slope[1];
     8520                        ///*Ritz et al. 1996*/
     8521                        //ub=drag*(rho_ice*gravity*thickness)*(rho_ice*gravity*thickness)*slope[0]/sqrt(slope2);
     8522                        //vb=drag*(rho_ice*gravity*thickness)*(rho_ice*gravity*thickness)*slope[1]/sqrt(slope2);
     8523                        ///*Rutt et al. 2009*/
     8524                        //ub=-drag*rho_ice*gravity*thickness*slope[0];
     8525                        //vb=-drag*rho_ice*gravity*thickness*slope[1];
    85178526
    85188527                        pe->values[2*node0+0]+=ub/connectivity[0];
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r16818 r16823  
    42204220
    42214221        /*Intermediaries */
    4222         IssmDouble constant_part,ub,vb;
    4223         IssmDouble rho_ice,gravity,n,B;
     4222        IssmDouble ub,vb;
     4223        IssmDouble rho_ice,gravity,n,B,drag;
    42244224        IssmDouble slope2,thickness,connectivity;
    42254225        IssmDouble slope[2];
     
    42394239        Input* slopey_input=inputs->GetInput(SurfaceSlopeYEnum); _assert_(slopey_input);
    42404240        Input* thickness_input=inputs->GetInput(ThicknessEnum);  _assert_(thickness_input);
     4241        Input* drag_input=inputs->GetInput(FrictionCoefficientEnum);  _assert_(drag_input);
    42414242
    42424243        /*Spawn 3 sing elements: */
     
    42494250
    42504251                thickness_input->GetInputValue(&thickness,gauss);
     4252                drag_input->GetInputValue(&drag,gauss);
    42514253                slopex_input->GetInputValue(&slope[0],gauss);
    42524254                slopey_input->GetInputValue(&slope[1],gauss);
    4253                 slope2=pow(slope[0],2)+pow(slope[1],2);
    4254 
    4255                 constant_part=-2.*pow(rho_ice*gravity,n)*pow(slope2,((n-1.)/2.));
    4256 
     4255                slope2=slope[0]*slope[0]+slope[1]*slope[1];
     4256
     4257                /*No ref...*/
    42574258                ub=-1.58*1.e-10*rho_ice*gravity*thickness*slope[0];
    42584259                vb=-1.58*1.e-10*rho_ice*gravity*thickness*slope[1];
     4260                ///*Ritz et al. 1996*/
     4261                //ub=drag*(rho_ice*gravity*thickness)*(rho_ice*gravity*thickness)*slope[0]/sqrt(slope2);
     4262                //vb=drag*(rho_ice*gravity*thickness)*(rho_ice*gravity*thickness)*slope[1]/sqrt(slope2);
     4263                ///*Rutt et al. 2009*/
     4264                //ub=-drag*rho_ice*gravity*thickness*slope[0];
     4265                //vb=-drag*rho_ice*gravity*thickness*slope[1];
    42594266
    42604267                pe->values[2*i+0]=(ub-2.*pow(rho_ice*gravity,n)*pow(slope2,((n-1.)/2.))*pow(thickness,n)/(pow(B,n)*(n+1))*slope[0])/connectivity;
Note: See TracChangeset for help on using the changeset viewer.