Changeset 21468
- Timestamp:
- 01/09/17 08:32:15 (8 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp
r21439 r21468 235 235 basalelement ->JacobianDeterminant(&Jdet,xyz_list,gauss); 236 236 237 epl_transmitivity = EplTransmitivity(basalelement,gauss,epl_thick_input );238 epl_storing = EplStoring(basalelement,gauss,epl_thick_input );237 epl_transmitivity = EplTransmitivity(basalelement,gauss,epl_thick_input,epl_head_input,base_input); 238 epl_storing = EplStoring(basalelement,gauss,epl_thick_input,epl_head_input,base_input); 239 239 240 240 /*Diffusivity*/ … … 348 348 basalelement ->NodalFunctions(basis,gauss); 349 349 350 epl_storing = EplStoring(basalelement,gauss,epl_thick_input );350 epl_storing = EplStoring(basalelement,gauss,epl_thick_input,epl_head_input,base_input); 351 351 /*Loading term*/ 352 352 water_input->GetInputValue(&water_load,gauss); 353 353 scalar = Jdet*gauss->weight*(water_load); 354 354 if(dt!=0.) scalar = scalar*dt; 355 for(int i=0;i<numnodes;i++){ 356 pe->values[i]+=scalar*basis[i]; 357 } 355 for(int i=0;i<numnodes;i++)pe->values[i]+=scalar*basis[i]; 358 356 359 357 /*Transient and transfer terms*/ 360 358 if(dt!=0.){ 361 old_wh_input ->GetInputValue(&water_head,gauss); 362 359 old_wh_input->GetInputValue(&water_head,gauss); 363 360 /*Dealing with the epl part of the transfer term*/ 364 361 transfer=GetHydrologyPVectorTransfer(basalelement,gauss,sed_head_input); … … 425 422 426 423 /*Use the dof list to index into the solution vector: */ 427 /*If the EPL is not active we revert to the initialisation vallue*/ 428 /* For now we keep OldValue but it is probably not the best*/ 424 /*If the EPL is not active we revert to the bedrock elevation*/ 429 425 if(active_element){ 430 426 for(int i=0;i<numnodes;i++){ … … 435 431 } 436 432 else{ 437 basalelement->GetInputListOnVertices(&eplHeads[0], EplHeadOldEnum);433 basalelement->GetInputListOnVertices(&eplHeads[0],BaseEnum); 438 434 for(int i=0;i<numnodes;i++){ 439 435 if(xIsNan<IssmDouble>(eplHeads[i])) _error_("NaN found in solution vector"); … … 519 515 520 516 Element* element=(Element*)femmodel->elements->GetObjectByOffset(j); 521 /* element->parameters->FindParam(&iseplthickcomp,HydrologydcEplThickCompEnum); */522 /* if(iseplthickcomp==0) return; */523 517 524 518 switch(domaintype){ … … 576 570 /*Compute first the effective pressure in the EPL*/ 577 571 EPL_N=gravity*((rho_ice*ice_thickness[i])-(rho_water*(eplhead[i]-bed[i]))); 578 if(EPL_N<0.0)EPL_N=0.0;572 // if(EPL_N<0.0)EPL_N=0.0; 579 573 /*Get then the square of the gradient of EPL heads*/ 580 574 EPLgrad2 = (epl_slopeX[i]*epl_slopeX[i])+(epl_slopeY[i]*epl_slopeY[i]); … … 688 682 else if(old_active[i]>0.){ 689 683 vec_mask->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL); 690 /* If epl thickness gets under colapse thickness, close the layer*/684 /* If epl thickness gets under colapse thickness, close the layer */ 691 685 if(epl_thickness[i]<colapse_thick){ 692 686 vec_mask->SetValue(basalelement->nodes[i]->Sid(),0.,INS_VAL); 693 687 recurence->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL); 694 688 } 695 /* /\*If epl head gets under base elevation, close the layer*\/*/696 /* else if(eplhead[i]<base[i]){ */697 /* vec_mask->SetValue(basalelement->nodes[i]->Sid(),0.,INS_VAL); */698 /* recurence->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL); */699 /* } */689 /*If epl head gets under base elevation, close the layer*/ 690 else if(eplhead[i]<base[i]){ 691 vec_mask->SetValue(basalelement->nodes[i]->Sid(),0.,INS_VAL); 692 recurence->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL); 693 } 700 694 } 701 695 /*Increase of the efficient system is needed if the epl head reach the maximum value (sediment max value for now)*/ … … 724 718 } 725 719 /*}}}*/ 726 IssmDouble HydrologyDCEfficientAnalysis::EplStoring(Element* element,Gauss* gauss, Input* epl_thick_input ){/*{{{*/720 IssmDouble HydrologyDCEfficientAnalysis::EplStoring(Element* element,Gauss* gauss, Input* epl_thick_input, Input* epl_head_input, Input* base_input){/*{{{*/ 727 721 IssmDouble epl_storing; 728 IssmDouble epl_thick; 722 IssmDouble water_sheet,storing; 723 IssmDouble epl_thickness,prestep_head,base_elev; 729 724 IssmDouble rho_freshwater = element->GetMaterialParameter(MaterialsRhoFreshwaterEnum); 730 725 IssmDouble g = element->GetMaterialParameter(ConstantsGEnum); … … 733 728 IssmDouble water_compressibility = element->GetMaterialParameter(HydrologydcWaterCompressibilityEnum); 734 729 735 epl_thick_input->GetInputValue(&epl_thick,gauss); 730 epl_thick_input->GetInputValue(&epl_thickness,gauss); 731 epl_head_input->GetInputValue(&prestep_head,gauss); 732 base_input->GetInputValue(&base_elev,gauss); 733 water_sheet=max(0.0,(prestep_head-base_elev)); 734 735 storing=rho_freshwater*g*epl_porosity*epl_thickness*(water_compressibility+(epl_compressibility/epl_porosity)); 736 737 //porosity for unconfined region 738 if (water_sheet<=0.9*epl_thickness){ 739 epl_storing=epl_porosity; 740 } 741 //continuity ramp 742 else if((water_sheet<epl_thickness) && (water_sheet>0.9*epl_thickness)){ 743 epl_storing=(epl_thickness-water_sheet)*(epl_porosity-storing)/(0.1*epl_thickness)+storing; 744 } 745 //storing coefficient for confined 746 else{ 747 epl_storing=storing; 748 } 749 //return storing; 750 return epl_storing; 751 }/*}}}*/ 752 753 IssmDouble HydrologyDCEfficientAnalysis::EplTransmitivity(Element* element,Gauss* gauss, Input* epl_thick_input, Input* epl_head_input, Input* base_input){/*{{{*/ 754 IssmDouble epl_transmitivity; 755 IssmDouble water_sheet; 756 IssmDouble epl_thickness,base_elev,prestep_head; 757 IssmDouble epl_conductivity = element->GetMaterialParameter(HydrologydcEplConductivityEnum); 758 epl_thick_input->GetInputValue(&epl_thickness,gauss); 759 epl_head_input->GetInputValue(&prestep_head,gauss); 760 base_input->GetInputValue(&base_elev,gauss); 761 762 water_sheet=max(0.0,(prestep_head-base_elev)); 736 763 737 epl_storing=rho_freshwater*g*epl_porosity*epl_thick*(water_compressibility+(epl_compressibility/epl_porosity)); 738 return epl_storing; 739 }/*}}}*/ 740 741 IssmDouble HydrologyDCEfficientAnalysis::EplTransmitivity(Element* element,Gauss* gauss, Input* epl_thick_input){/*{{{*/ 742 IssmDouble epl_transmitivity; 743 IssmDouble epl_thick; 744 IssmDouble epl_conductivity = element->GetMaterialParameter(HydrologydcEplConductivityEnum); 745 epl_thick_input->GetInputValue(&epl_thick,gauss); 746 747 epl_transmitivity=epl_conductivity*epl_thick; 748 764 //epl_transmitivity=epl_conductivity*epl_thickness; 765 epl_transmitivity=epl_conductivity*min(water_sheet,epl_thickness); 749 766 return epl_transmitivity; 750 767 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.h
r21438 r21468 38 38 IssmDouble GetHydrologyKMatrixTransfer(Element* element); 39 39 IssmDouble GetHydrologyPVectorTransfer(Element* element, Gauss* gauss, Input* sed_head_input); 40 IssmDouble EplStoring(Element* element,Gauss* gauss, Input* epl_thick_input );41 IssmDouble EplTransmitivity(Element* element,Gauss* gauss, Input* epl_thick_input );40 IssmDouble EplStoring(Element* element,Gauss* gauss, Input* epl_thick_input, Input* epl_head_input, Input* base_input); 41 IssmDouble EplTransmitivity(Element* element,Gauss* gauss, Input* epl_thick_input, Input* epl_head_input, Input* base_input); 42 42 void HydrologyEPLGetMask(Vector<IssmDouble>* vec_mask, Vector<IssmDouble>* recurence, int* eplzigzag_counter, Element* element); 43 43 void HydrologyEPLGetActive(Vector<IssmDouble>* active_vec, Element* element); -
issm/trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp
r21279 r21468 170 170 /*{{{*//*Retrieve the EPL head slopes and compute EPL Thickness*/ 171 171 if(VerboseSolution()) _printf0_("computing EPL Head slope...\n"); 172 //inefanalysis->ElementizeEplMask(femmodel);173 172 femmodel->SetCurrentConfiguration(L2ProjectionEPLAnalysisEnum); 174 173 femmodel->UpdateConstraintsL2ProjectionEPLx(&L2Count); … … 182 181 effanalysis->ComputeEPLThickness(femmodel); 183 182 //updating mask after the computation of the epl thickness (Allow to close too thin EPL) 184 femmodel->HydrologyEPLupdateDomainx(&ThickCount);185 inefanalysis->ElementizeEplMask(femmodel);183 /* femmodel->HydrologyEPLupdateDomainx(&ThickCount); */ 184 /* inefanalysis->ElementizeEplMask(femmodel); */ 186 185 /*}}}*/ 187 186
Note:
See TracChangeset
for help on using the changeset viewer.