Changeset 21208


Ignore:
Timestamp:
09/16/16 09:07:59 (9 years ago)
Author:
aleahsommers
Message:

CHG: Changed creep term on RHS of elliptic eqn to use lagged head from previous time step and added new HydrologyHeadEnum

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

Legend:

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

    r21192 r21208  
    120120        iomodel->FetchDataToInput(elements,"md.initialization.vx",VxEnum);
    121121        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*/
    123125        iomodel->FindConstant(&frictionlaw,"md.friction.law");
    124126        /*Friction law variables*/
     
    210212        /*Intermediaries */
    211213        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;
    213215        IssmDouble  lr,br,vx,vy,beta;
    214216        IssmDouble  alpha2,frictionheat;
     
    241243        Input* lr_input             = element->GetInput(HydrologyBumpSpacingEnum);       _assert_(lr_input);
    242244        Input* br_input             = element->GetInput(HydrologyBumpHeightEnum);        _assert_(br_input);
     245   Input* headold_input        = element->GetInput(HydrologyHeadOldEnum);           _assert_(headold_input);
    243246
    244247        /*Get conductivity from inputs*/
     
    270273                vx_input->GetInputValue(&vx,gauss);
    271274                vy_input->GetInputValue(&vy,gauss);
     275      headold_input->GetInputValue(&head_old,gauss);
    272276
    273277                /*Get ice A parameter*/
     
    293297                if(pressure_water>pressure_ice) pressure_water = pressure_ice;
    294298
     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
    295303                /*Compute change in sensible heat due to changes in pressure melting point*/
    296304        dpressure_water[0] = rho_water*g*(dh[0] - dbed[0]);
     
    304312                 (
    305313                  meltrate*(1/rho_water-1/rho_ice)
    306                   +A*pow(fabs(pressure_ice-pressure_water),n-1)*(pressure_ice-pressure_water)*gap
     314                  +A*pow(fabs(pressure_ice - pressure_water_old),n-1)*(pressure_ice - pressure_water_old)*gap
    307315                  -beta*sqrt(vx*vx+vy*vy)
    308316                  +ieb
    309317                  )*basis[i];           
    310         }
    311 
     318        }
    312319        /*Clean up and return*/
    313320        xDelete<IssmDouble>(xyz_list);
     
    379386        head_input->GetInputDerivativeAverageValue(&dh[0],xyz_list);
    380387        IssmDouble conductivity = GetConductivity(element);
    381 //if(element->Id()==1){
    382 //      printf("Conductivity in UpdateInputFromSolution: %g \n",conductivity);
    383 //}
    384388
    385389        IssmDouble reynolds = conductivity*sqrt(dh[0]*dh[0]+dh[1]*dh[1])/(2.*NU);
     
    535539        /*Divide by connectivity*/
    536540        newgap = newgap/totalweights;
    537         IssmDouble mingap = 0.001;
     541        IssmDouble mingap = 1e-5;
    538542        if(newgap<mingap) newgap=mingap;
    539543
  • issm/trunk-jpl/src/c/classes/Elements/Element.cpp

    r21207 r21208  
    15241524                                name==HydrologydcEplThicknessEnum ||
    15251525                                name==HydrologydcMaskEplactiveNodeEnum ||
     1526                                name==HydrologyHeadEnum ||
     1527                 name==HydrologyHeadOldEnum ||         
    15261528                                name==StressbalanceConvergenceNumStepsEnum ||
    15271529                                name==MeshVertexonbaseEnum
  • issm/trunk-jpl/src/c/cores/hydrology_core.cpp

    r21145 r21208  
    7878        }
    7979
    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);
    8384                if(VerboseSolution()) _printf0_("   updating gap height\n");
    8485                HydrologySommersAnalysis* analysis = new HydrologySommersAnalysis();
    8586                analysis->UpdateGapHeight(femmodel);
    86                 delete analysis;       
     87                delete analysis;
    8788               
    8889                if(save_results){
  • issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h

    r21103 r21208  
    166166        HydrologysommersEnum,
    167167        HydrologyHeadEnum,
     168   HydrologyHeadOldEnum,
    168169        HydrologyGapHeightEnum,
    169170        HydrologyBumpSpacingEnum,
     
    544545        GiaCrossSectionShapeEnum,
    545546        GiadWdtEnum,
    546         GiaWEnum,
     547        GiaWEnum, 
    547548        /*}}}*/
    548549        /*Results{{{*/
Note: See TracChangeset for help on using the changeset viewer.