Changeset 17021
- Timestamp:
- 12/16/13 10:31:04 (11 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp
r17012 r17021 247 247 scalar = Jdet*gauss->weight*(-transfer); 248 248 if(dt!=0.) scalar = scalar*dt; 249 for(int i=0;i<numnodes;i++) pe->values[i]+=scalar*basis[i]; 250 249 250 for(int i=0;i<numnodes;i++)pe->values[i]+=scalar*basis[i]; 251 251 252 /*Transient term*/ 252 253 if(dt!=0.){ … … 254 255 old_wh_input->GetInputValue(&water_head,gauss); 255 256 scalar = Jdet*gauss->weight*water_head*epl_specificstoring*epl_thickness; 256 for(int i=0;i<numnodes;i++) pe->values[i]+=scalar*basis[i]; 257 258 for(int i=0;i<numnodes;i++)pe->values[i]+=scalar*basis[i]; 257 259 } 258 260 } -
issm/trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp
r17005 r17021 85 85 iomodel->FetchDataToInput(elements,BasalforcingsMeltingRateEnum); 86 86 iomodel->FetchDataToInput(elements,SedimentHeadEnum); 87 iomodel->FetchDataToInput(elements,HydrologydcSedimentTransmitivityEnum); 88 87 89 if(isefficientlayer)iomodel->FetchDataToInput(elements,HydrologydcMaskEplactiveNodeEnum); 88 90 }/*}}}*/ … … 168 170 /*Intermediaries */ 169 171 IssmDouble D_scalar,Jdet,dt; 172 IssmDouble sediment_transmitivity; 170 173 IssmDouble *xyz_list = NULL; 171 174 … … 177 180 IssmDouble* B = xNew<IssmDouble>(2*numnodes); 178 181 IssmDouble* basis = xNew<IssmDouble>(numnodes); 179 IssmDouble D[2][2]= {0.};182 IssmDouble D[2][2]= {0.}; 180 183 181 184 /*Retrieve all inputs and parameters*/ 182 basalelement ->GetVerticesCoordinates(&xyz_list);183 IssmDouble sediment_storing = SedimentStoring(basalelement);184 I ssmDouble sediment_transmitivity = basalelement->GetMaterialParameter(HydrologydcSedimentTransmitivityEnum);185 basalelement ->FindParam(&dt,TimesteppingTimeStepEnum);185 basalelement ->GetVerticesCoordinates(&xyz_list); 186 IssmDouble sediment_storing = SedimentStoring(basalelement); 187 Input* SedTrans_input=basalelement ->GetInput(HydrologydcSedimentTransmitivityEnum); _assert_(SedTrans_input); 188 basalelement ->FindParam(&dt,TimesteppingTimeStepEnum); 186 189 187 190 /* Start looping on the number of gaussian points: */ 188 191 Gauss* gauss=basalelement->NewGauss(2); 189 for(int ig=gauss ->begin();ig<gauss->end();ig++){190 gauss ->GaussPoint(ig);191 192 basalelement->JacobianDeterminant(&Jdet,xyz_list,gauss);192 for(int ig=gauss -> begin();ig<gauss->end();ig++){ 193 gauss -> GaussPoint(ig); 194 basalelement -> JacobianDeterminant(&Jdet,xyz_list,gauss); 195 SedTrans_input -> GetInputValue(&sediment_transmitivity,gauss); 193 196 194 197 /*Diffusivity*/ -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r17012 r17021 4660 4660 bool active_element; 4661 4661 int transfermethod,step; 4662 IssmDouble sed_trans,sed_thick;4663 4662 IssmDouble leakage,h_max; 4664 IssmDouble wh_trans ;4663 IssmDouble wh_trans,sed_thick; 4665 4664 IssmDouble activeEpl[numdof],epl_thickness[numdof]; 4666 4665 IssmDouble epl_specificstoring[numdof],sedstoring[numdof]; 4667 4666 IssmDouble epl_head[numdof],sed_head[numdof]; 4668 IssmDouble old_transfer[numdof] ;4667 IssmDouble old_transfer[numdof],sed_trans[numdof]; 4669 4668 4670 4669 Input* active_element_input=NULL; … … 4694 4693 4695 4694 GetInputListOnVertices(&sed_head[0],SedimentHeadEnum); 4695 GetInputListOnVertices(&sed_trans[0],HydrologydcSedimentTransmitivityEnum); 4696 4696 GetInputListOnVertices(&epl_head[0],EplHeadEnum); 4697 4697 GetInputListOnVertices(&epl_thickness[0],HydrologydcEplThicknessEnum); … … 4699 4699 this->parameters->FindParam(&leakage,HydrologydcLeakageFactorEnum); 4700 4700 4701 sed_trans = matpar->GetSedimentTransmitivity();4702 4701 sed_thick = matpar->GetSedimentThickness(); 4703 4702 4704 4703 if(!active_element){ 4705 4704 /*No transfer if the EPL is not active*/ 4706 /* for(int i=0;i<numdof;i++){ */4707 /* wh_trans=0.0; */4708 /* /\*Assign output pointer*\/ */4709 /* transfer->SetValue(doflist[i],wh_trans,INS_VAL); */4710 /* } */4711 4705 } 4712 4706 else{ 4713 4707 4714 //GetInputListOnVertices(&old_transfer[0],WaterTransferEnum);4708 GetInputListOnVertices(&old_transfer[0],WaterTransferEnum); 4715 4709 4716 4710 for(int i=0;i<numdof;i++){ … … 4718 4712 sedstoring[i]=matpar->GetSedimentStoring(); 4719 4713 this->GetHydrologyDCInefficientHmax(&h_max,i); 4720 4714 4715 //avoiding transfer at first time 4716 if(epl_head[i]==0.0)epl_head[i]=sed_head[i]; 4721 4717 /*EPL head higher than sediment head, transfer from the epl to the sediment*/ 4722 4718 if(epl_head[i]>sed_head[i]){ 4723 wh_trans=epl_specificstoring[i]*epl_thickness[i]*sed_trans*(epl_head[i]-sed_head[i])/(leakage*sed_thick); 4724 4719 wh_trans=epl_specificstoring[i]*epl_thickness[i]*sed_trans[i]*(epl_head[i]-sed_head[i])/(leakage*sed_thick); 4725 4720 /*No transfer if the sediment head is allready at the maximum*/ 4726 4721 if(sed_head[i]>=h_max){ … … 4730 4725 /*EPL head lower than sediment head, transfer from the sediment to the epl*/ 4731 4726 else if(epl_head[i]<=sed_head[i]){ 4732 wh_trans=sedstoring[i]*sed_trans *(epl_head[i]-sed_head[i])/(leakage*sed_thick);4727 wh_trans=sedstoring[i]*sed_trans[i]*(epl_head[i]-sed_head[i])/(leakage*sed_thick); 4733 4728 } 4734 4729 4735 4730 /*Introduce relaxation*/ 4736 //wh_trans=old_transfer[i]+0.9*(wh_trans-old_transfer[i]);4731 wh_trans=old_transfer[i]+0.66*(wh_trans-old_transfer[i]); 4737 4732 4738 4733 /*Assign output pointer*/ 4739 4734 transfer->SetValue(doflist[i],wh_trans,INS_VAL); 4735 4736 4740 4737 } 4741 4738 } … … 4881 4878 /*And proceed to the real thing*/ 4882 4879 thickness[i] = old_thickness[i]*(1+((rho_water*gravity*dt)/(rho_ice*latentheat))*epl_conductivity*EPLgrad2-2.0*(A*dt/(pow(n,n)))*(pow(EPL_N,n))); 4883 4884 4880 } 4885 4881 } -
issm/trunk-jpl/src/c/classes/Materials/Matpar.cpp
r17006 r17021 59 59 iomodel->Constant(&this->sediment_porosity,HydrologydcSedimentPorosityEnum); 60 60 iomodel->Constant(&this->sediment_thickness,HydrologydcSedimentThicknessEnum); 61 iomodel->Constant(&this->sediment_transmitivity,HydrologydcSedimentTransmitivityEnum);62 61 iomodel->Constant(&this->water_compressibility,HydrologydcWaterCompressibilityEnum); 63 62 iomodel->Constant(&isefficientlayer,HydrologydcIsefficientlayerEnum); … … 262 261 case HydrologydcEplInitialThicknessEnum: return this->epl_init_thickness; 263 262 case HydrologydcWaterCompressibilityEnum: return this->water_compressibility; 264 case HydrologydcSedimentTransmitivityEnum: return this->sediment_transmitivity;265 263 case HydrologyshreveCREnum: return this->hydro_CR; 266 264 case HydrologyshreveKnEnum: return this->hydro_kn; … … 390 388 return this->rho_freshwater * this->g * this->epl_porosity * 391 389 (this->water_compressibility + (this->epl_compressibility / this->epl_porosity)); 392 } 393 /*}}}*/ 394 /*FUNCTION Matpar::GetSedimentTransitivity {{{*/ 395 IssmDouble Matpar::GetSedimentTransmitivity(){ 396 return sediment_transmitivity; 397 } 390 } 398 391 /*}}}*/ 399 392 /*FUNCTION Matpar::GetSedimentThickness {{{*/ -
issm/trunk-jpl/src/c/classes/Materials/Matpar.h
r16812 r17021 44 44 IssmDouble sediment_porosity; 45 45 IssmDouble sediment_thickness; 46 IssmDouble sediment_transmitivity;47 46 IssmDouble water_compressibility; 48 47 … … 122 121 IssmDouble GetSedimentStoring(); 123 122 IssmDouble GetEplSpecificStoring(); 124 IssmDouble GetSedimentTransmitivity();125 123 IssmDouble GetSedimentThickness(); 126 124 IssmDouble GetEplConductivity(); -
issm/trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp
r17012 r17021 97 97 sedconverged=false; 98 98 for(;;){ 99 99 /* if(isefficientlayer){ */ 100 /* /\*Updating Elemental Mask*\/ */ 101 /* HydrologyDCInefficientAnalysis* analysis = new HydrologyDCInefficientAnalysis(); */ 102 /* analysis->ElementizeEplMask(femmodel); */ 103 /* delete analysis; */ 104 /* femmodel->HydrologyTransferx(); */ 105 /* } */ 100 106 uf_sed_sub_iter=uf_sed->Duplicate();_assert_(uf_sed_sub_iter); 101 107 uf_sed->Copy(uf_sed_sub_iter); … … 123 129 124 130 if(sedconverged){ 125 if(isefficientlayer){126 /*Updating Elemental Mask*/127 HydrologyDCInefficientAnalysis* analysis = new HydrologyDCInefficientAnalysis();128 analysis->ElementizeEplMask(femmodel);129 delete analysis;130 femmodel->HydrologyTransferx();131 }132 131 sedconverged=false; 133 132 /*Checking convegence on the value of the sediment head*/ … … 149 148 150 149 if(sedconverged){ 150 if(isefficientlayer){ 151 /*Updating Elemental Mask*/ 152 HydrologyDCInefficientAnalysis* analysis = new HydrologyDCInefficientAnalysis(); 153 analysis->ElementizeEplMask(femmodel); 154 delete analysis; 155 femmodel->HydrologyTransferx(); 156 } 151 157 femmodel->parameters->SetParam(sediment_kmax,HydrologySedimentKmaxEnum); 152 158 InputUpdateFromConstantx(femmodel,sedconverged,ConvergedEnum); … … 159 165 /*Second layer*/ 160 166 if(isefficientlayer){ 161 167 162 168 femmodel->SetCurrentConfiguration(HydrologyDCEfficientAnalysisEnum); 163 169 InputUpdateFromConstantx(femmodel,true,ResetPenaltiesEnum); 164 170 InputUpdateFromConstantx(femmodel,false,ConvergedEnum); 165 171 femmodel->parameters->SetParam(HydrologyEfficientEnum,HydrologyLayerEnum); 172 173 166 174 167 175 /*Iteration on the EPL layer*/ 168 176 eplconverged = false; 169 177 for(;;){ 170 171 /*Start by retrieving the EPL head slopes*/ 178 179 //updating mask after the computation of the epl thickness (Allow to close too thin EPL) 180 femmodel->HydrologyEPLupdateDomainx(); 181 /*Start by retrieving the EPL head slopes and compute EPL Thickness*/ 172 182 if(VerboseSolution()) _printf0_("computing EPL Head slope...\n"); 173 183 femmodel->SetCurrentConfiguration(L2ProjectionEPLAnalysisEnum); … … 177 187 femmodel->parameters->SetParam(EplHeadSlopeYEnum,InputToL2ProjectEnum); 178 188 solutionsequence_linear(femmodel); 179 180 181 189 femmodel->HydrologyEPLThicknessx(); 182 190 183 191 femmodel->SetCurrentConfiguration(HydrologyDCEfficientAnalysisEnum); 184 185 //updating mask after the computation of the epl thickness (Allow to close too thin EPL) 186 femmodel->HydrologyEPLupdateDomainx(); 192 193 /*Updating Elemental Mask*/ 194 HydrologyDCInefficientAnalysis* analysis = new HydrologyDCInefficientAnalysis(); 195 analysis->ElementizeEplMask(femmodel); 196 delete analysis; 197 femmodel->HydrologyTransferx(); 187 198 188 199 ug_epl_sub_iter=ug_epl->Duplicate();_assert_(ug_epl_sub_iter); 189 200 ug_epl->Copy(ug_epl_sub_iter); 201 190 202 SystemMatricesx(&Kff,&Kfs,&pf,&df,NULL,femmodel); 191 203 CreateNodalConstraintsx(&ys,femmodel->nodes,HydrologyDCEfficientAnalysisEnum); … … 213 225 eplcount++; 214 226 215 216 227 if(eplconverged){ 217 228 eplconverged=false; … … 232 243 233 244 if(eplconverged){ 234 /*Updating Elemental Mask*/ 235 HydrologyDCInefficientAnalysis* analysis = new HydrologyDCInefficientAnalysis(); 236 analysis->ElementizeEplMask(femmodel); 237 delete analysis; 238 femmodel->HydrologyTransferx(); 239 245 240 246 InputUpdateFromConstantx(femmodel,eplconverged,ConvergedEnum); 241 247 InputUpdateFromConstantx(femmodel,sediment_kmax,MeltingOffsetEnum);
Note:
See TracChangeset
for help on using the changeset viewer.