Changeset 21208
- Timestamp:
- 09/16/16 09:07:59 (9 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/HydrologySommersAnalysis.cpp
r21192 r21208 120 120 iomodel->FetchDataToInput(elements,"md.initialization.vx",VxEnum); 121 121 iomodel->FetchDataToInput(elements,"md.initialization.vy",VyEnum); 122 122 iomodel->FetchDataToInput(elements,"md.hydrology.head",HydrologyHeadOldEnum); 123 /*iomodel->FetchDataToInput(elements,"md.hydrology.eff_pressure",EffectivePressureEnum); 124 */ 123 125 iomodel->FindConstant(&frictionlaw,"md.friction.law"); 124 126 /*Friction law variables*/ … … 210 212 /*Intermediaries */ 211 213 IssmDouble Jdet,meltrate,G,dh[2],B,A,n; 212 IssmDouble gap,bed,thickness,head,ieb ;214 IssmDouble gap,bed,thickness,head,ieb,head_old; 213 215 IssmDouble lr,br,vx,vy,beta; 214 216 IssmDouble alpha2,frictionheat; … … 241 243 Input* lr_input = element->GetInput(HydrologyBumpSpacingEnum); _assert_(lr_input); 242 244 Input* br_input = element->GetInput(HydrologyBumpHeightEnum); _assert_(br_input); 245 Input* headold_input = element->GetInput(HydrologyHeadOldEnum); _assert_(headold_input); 243 246 244 247 /*Get conductivity from inputs*/ … … 270 273 vx_input->GetInputValue(&vx,gauss); 271 274 vy_input->GetInputValue(&vy,gauss); 275 headold_input->GetInputValue(&head_old,gauss); 272 276 273 277 /*Get ice A parameter*/ … … 293 297 if(pressure_water>pressure_ice) pressure_water = pressure_ice; 294 298 299 /*Get water pressure from previous time step to use in lagged creep term*/ 300 IssmDouble pressure_water_old = rho_water*g*(head_old-bed); 301 if(pressure_water_old>pressure_ice) pressure_water_old = pressure_ice; 302 295 303 /*Compute change in sensible heat due to changes in pressure melting point*/ 296 304 dpressure_water[0] = rho_water*g*(dh[0] - dbed[0]); … … 304 312 ( 305 313 meltrate*(1/rho_water-1/rho_ice) 306 +A*pow(fabs(pressure_ice -pressure_water),n-1)*(pressure_ice-pressure_water)*gap314 +A*pow(fabs(pressure_ice - pressure_water_old),n-1)*(pressure_ice - pressure_water_old)*gap 307 315 -beta*sqrt(vx*vx+vy*vy) 308 316 +ieb 309 317 )*basis[i]; 310 } 311 318 } 312 319 /*Clean up and return*/ 313 320 xDelete<IssmDouble>(xyz_list); … … 379 386 head_input->GetInputDerivativeAverageValue(&dh[0],xyz_list); 380 387 IssmDouble conductivity = GetConductivity(element); 381 //if(element->Id()==1){382 // printf("Conductivity in UpdateInputFromSolution: %g \n",conductivity);383 //}384 388 385 389 IssmDouble reynolds = conductivity*sqrt(dh[0]*dh[0]+dh[1]*dh[1])/(2.*NU); … … 535 539 /*Divide by connectivity*/ 536 540 newgap = newgap/totalweights; 537 IssmDouble mingap = 0.001;541 IssmDouble mingap = 1e-5; 538 542 if(newgap<mingap) newgap=mingap; 539 543 -
issm/trunk-jpl/src/c/classes/Elements/Element.cpp
r21207 r21208 1524 1524 name==HydrologydcEplThicknessEnum || 1525 1525 name==HydrologydcMaskEplactiveNodeEnum || 1526 name==HydrologyHeadEnum || 1527 name==HydrologyHeadOldEnum || 1526 1528 name==StressbalanceConvergenceNumStepsEnum || 1527 1529 name==MeshVertexonbaseEnum -
issm/trunk-jpl/src/c/cores/hydrology_core.cpp
r21145 r21208 78 78 } 79 79 80 else if (hydrology_model==HydrologysommersEnum){ 81 femmodel->SetCurrentConfiguration(HydrologySommersAnalysisEnum); 82 solutionsequence_nonlinear(femmodel,modify_loads); 80 else if (hydrology_model==HydrologysommersEnum){ 81 femmodel->SetCurrentConfiguration(HydrologySommersAnalysisEnum); 82 InputDuplicatex(femmodel,HydrologyHeadEnum,HydrologyHeadOldEnum); 83 solutionsequence_nonlinear(femmodel,modify_loads); 83 84 if(VerboseSolution()) _printf0_(" updating gap height\n"); 84 85 HydrologySommersAnalysis* analysis = new HydrologySommersAnalysis(); 85 86 analysis->UpdateGapHeight(femmodel); 86 delete analysis; 87 delete analysis; 87 88 88 89 if(save_results){ -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r21103 r21208 166 166 HydrologysommersEnum, 167 167 HydrologyHeadEnum, 168 HydrologyHeadOldEnum, 168 169 HydrologyGapHeightEnum, 169 170 HydrologyBumpSpacingEnum, … … 544 545 GiaCrossSectionShapeEnum, 545 546 GiadWdtEnum, 546 GiaWEnum, 547 GiaWEnum, 547 548 /*}}}*/ 548 549 /*Results{{{*/
Note:
See TracChangeset
for help on using the changeset viewer.