Changeset 24140 for issm/trunk-jpl/src/c/analyses/EnthalpyAnalysis.cpp
- Timestamp:
- 09/11/19 09:30:58 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/EnthalpyAnalysis.cpp
r24136 r24140 275 275 parameters->AddObject(iomodel->CopyConstantObject("md.thermal.isenthalpy",ThermalIsenthalpyEnum)); 276 276 parameters->AddObject(iomodel->CopyConstantObject("md.thermal.isdynamicbasalspc",ThermalIsdynamicbasalspcEnum)); 277 parameters->AddObject(iomodel->CopyConstantObject("md.thermal.isdrainicecolumn",ThermalIsdrainicecolumnEnum)); 278 parameters->AddObject(iomodel->CopyConstantObject("md.thermal.watercolumn_upperlimit",ThermalWatercolumnUpperlimitEnum)); 277 279 parameters->AddObject(iomodel->CopyConstantObject("md.friction.law",FrictionLawEnum)); 278 280 … … 424 426 element->GetInputListOnNodes(basalmeltingrates,BasalforcingsGroundediceMeltingRateEnum); 425 427 428 IssmDouble watercolumnupperlimit = element->FindParam(ThermalWatercolumnUpperlimitEnum); 429 426 430 Gauss* gauss=element->NewGauss(); 427 431 for(is=0;is<numsegments;is++){ … … 484 488 watercolumns[nodedown]+=dt*meltingrate_enthalpy[is]; 485 489 } 490 if(watercolumns[nodedown]>watercolumnupperlimit) watercolumns[nodedown]=watercolumnupperlimit; 486 491 } 487 492 else{ … … 1168 1173 1169 1174 for(k=0;k<numnodes;k++){ 1170 waterfractions[k]-=dt*drainage[k]; 1175 if(dt==0.) 1176 waterfractions[k]-=drainage[k]; 1177 else 1178 waterfractions[k]-=dt*drainage[k]; 1179 1171 1180 element->ThermalToEnthalpy(&enthalpies[k], temperatures[k], waterfractions[k], pressures[k]); 1172 1181 } … … 1187 1196 IssmDouble thermalconductivity = element->FindParam(MaterialsThermalconductivityEnum); 1188 1197 1189 if(enthalpy < PureIceEnthalpy(element,pressure)) {1198 if(enthalpy < PureIceEnthalpy(element,pressure)) 1190 1199 return thermalconductivity/heatcapacity; 1191 } 1192 else{ 1200 else 1193 1201 return temperateiceconductivity/heatcapacity; 1194 }1195 1202 }/*}}}*/ 1196 1203 IssmDouble EnthalpyAnalysis::EnthalpyDiffusionParameterVolume(Element* element,int enthalpy_enum){/*{{{*/ … … 1678 1685 /*Intermediaries*/ 1679 1686 bool computebasalmeltingrates=true; 1680 bool drainicecolumn=true;1687 bool isdrainicecolumn; 1681 1688 IssmDouble dt; 1682 1689 1683 1690 femmodel->parameters->FindParam(&dt,TimesteppingTimeStepEnum); 1684 1685 if(drainicecolumn && (dt>0.)) DrainWaterfraction(femmodel); 1691 femmodel->parameters->FindParam(&isdrainicecolumn,ThermalIsdrainicecolumnEnum); 1692 1693 if(isdrainicecolumn) DrainWaterfraction(femmodel); 1686 1694 if(computebasalmeltingrates) ComputeBasalMeltingrate(femmodel); 1687 1695
Note:
See TracChangeset
for help on using the changeset viewer.