Changeset 16823
- Timestamp:
- 11/18/13 16:03:02 (11 years ago)
- 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 8447 8447 IssmDouble z_list[NUMVERTICES]; 8448 8448 IssmDouble slope[2]; 8449 IssmDouble slope2,constant_part ;8449 IssmDouble slope2,constant_part,drag; 8450 8450 IssmDouble rho_ice,gravity,n,B; 8451 8451 IssmDouble ub,vb,z_g,surface,thickness; … … 8468 8468 Input* slopex_input=inputs->GetInput(SurfaceSlopeXEnum); _assert_(slopex_input); 8469 8469 Input* slopey_input=inputs->GetInput(SurfaceSlopeYEnum); _assert_(slopey_input); 8470 Input* drag_input=inputs->GetInput(FrictionCoefficientEnum); _assert_(drag_input); 8470 8471 for(i=0;i<NUMVERTICES;i++)z_list[i]=xyz_list[i][2]; 8471 8472 … … 8512 8513 /*Deal with lower surface*/ 8513 8514 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]; 8517 8526 8518 8527 pe->values[2*node0+0]+=ub/connectivity[0]; -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r16818 r16823 4220 4220 4221 4221 /*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; 4224 4224 IssmDouble slope2,thickness,connectivity; 4225 4225 IssmDouble slope[2]; … … 4239 4239 Input* slopey_input=inputs->GetInput(SurfaceSlopeYEnum); _assert_(slopey_input); 4240 4240 Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input); 4241 Input* drag_input=inputs->GetInput(FrictionCoefficientEnum); _assert_(drag_input); 4241 4242 4242 4243 /*Spawn 3 sing elements: */ … … 4249 4250 4250 4251 thickness_input->GetInputValue(&thickness,gauss); 4252 drag_input->GetInputValue(&drag,gauss); 4251 4253 slopex_input->GetInputValue(&slope[0],gauss); 4252 4254 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...*/ 4257 4258 ub=-1.58*1.e-10*rho_ice*gravity*thickness*slope[0]; 4258 4259 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]; 4259 4266 4260 4267 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.