Changeset 21468


Ignore:
Timestamp:
01/09/17 08:32:15 (8 years ago)
Author:
bdef
Message:

CHG:changes in efficient layer computations

Location:
issm/trunk-jpl/src/c
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp

    r21439 r21468  
    235235                basalelement    ->JacobianDeterminant(&Jdet,xyz_list,gauss);
    236236
    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);
    239239
    240240                /*Diffusivity*/
     
    348348                basalelement ->NodalFunctions(basis,gauss);
    349349
    350                 epl_storing     = EplStoring(basalelement,gauss,epl_thick_input);
     350                epl_storing     = EplStoring(basalelement,gauss,epl_thick_input,epl_head_input,base_input);
    351351                /*Loading term*/
    352352                water_input->GetInputValue(&water_load,gauss);
    353353                scalar = Jdet*gauss->weight*(water_load);
    354354                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];
    358356               
    359357                /*Transient and transfer terms*/
    360358                if(dt!=0.){
    361                         old_wh_input    ->GetInputValue(&water_head,gauss);
    362                        
     359                        old_wh_input->GetInputValue(&water_head,gauss);
    363360                        /*Dealing with the epl part of the transfer term*/
    364361                        transfer=GetHydrologyPVectorTransfer(basalelement,gauss,sed_head_input);
     
    425422
    426423        /*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*/
    429425        if(active_element){
    430426                for(int i=0;i<numnodes;i++){
     
    435431        }
    436432        else{
    437                 basalelement->GetInputListOnVertices(&eplHeads[0],EplHeadOldEnum);
     433                basalelement->GetInputListOnVertices(&eplHeads[0],BaseEnum);
    438434                for(int i=0;i<numnodes;i++){
    439435                        if(xIsNan<IssmDouble>(eplHeads[i])) _error_("NaN found in solution vector");
     
    519515               
    520516                Element* element=(Element*)femmodel->elements->GetObjectByOffset(j);
    521                 /* element->parameters->FindParam(&iseplthickcomp,HydrologydcEplThickCompEnum); */
    522                 /* if(iseplthickcomp==0) return; */
    523517               
    524518                switch(domaintype){
     
    576570                                /*Compute first the effective pressure in the EPL*/
    577571                                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;
    579573                                /*Get then the square of the gradient of EPL heads*/
    580574                                EPLgrad2 = (epl_slopeX[i]*epl_slopeX[i])+(epl_slopeY[i]*epl_slopeY[i]);
     
    688682                else if(old_active[i]>0.){
    689683                        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 */
    691685                        if(epl_thickness[i]<colapse_thick){
    692686                                vec_mask->SetValue(basalelement->nodes[i]->Sid(),0.,INS_VAL);
    693687                                recurence->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL);
    694688                        }
    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                        }
    700694                }
    701695                /*Increase of the efficient system is needed if the epl head reach the maximum value (sediment max value for now)*/
     
    724718}
    725719/*}}}*/
    726 IssmDouble HydrologyDCEfficientAnalysis::EplStoring(Element* element,Gauss* gauss, Input* epl_thick_input){/*{{{*/
     720IssmDouble HydrologyDCEfficientAnalysis::EplStoring(Element* element,Gauss* gauss, Input* epl_thick_input, Input* epl_head_input, Input* base_input){/*{{{*/
    727721        IssmDouble epl_storing;
    728         IssmDouble epl_thick;
     722        IssmDouble water_sheet,storing;
     723        IssmDouble epl_thickness,prestep_head,base_elev;
    729724        IssmDouble rho_freshwater        = element->GetMaterialParameter(MaterialsRhoFreshwaterEnum);
    730725        IssmDouble g                     = element->GetMaterialParameter(ConstantsGEnum);
     
    733728        IssmDouble water_compressibility = element->GetMaterialParameter(HydrologydcWaterCompressibilityEnum);
    734729
    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
     753IssmDouble 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));
    736763       
    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);
    749766        return epl_transmitivity;
    750767}/*}}}*/
  • issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.h

    r21438 r21468  
    3838                IssmDouble GetHydrologyKMatrixTransfer(Element* element);
    3939                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);
    4242                void HydrologyEPLGetMask(Vector<IssmDouble>* vec_mask, Vector<IssmDouble>* recurence, int* eplzigzag_counter, Element* element);
    4343                void HydrologyEPLGetActive(Vector<IssmDouble>* active_vec, Element* element);
  • issm/trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp

    r21279 r21468  
    170170                                /*{{{*//*Retrieve the EPL head slopes and compute EPL Thickness*/
    171171                                if(VerboseSolution()) _printf0_("computing EPL Head slope...\n");
    172                                 //inefanalysis->ElementizeEplMask(femmodel);
    173172                                femmodel->SetCurrentConfiguration(L2ProjectionEPLAnalysisEnum);
    174173                                femmodel->UpdateConstraintsL2ProjectionEPLx(&L2Count);
     
    182181                                effanalysis->ComputeEPLThickness(femmodel);
    183182                                //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); */
    186185                                /*}}}*/
    187186                                       
Note: See TracChangeset for help on using the changeset viewer.