Changeset 17884


Ignore:
Timestamp:
04/29/14 15:09:47 (11 years ago)
Author:
Mathieu Morlighem
Message:

BUG: fixed Shreve's new implementation

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

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r17875 r17884  
    42444244}
    42454245/*}}}*/
    4246 /*FUNCTION Tria::CreateHydrologyWaterVelocityInput {{{*/
    4247 void Tria::CreateHydrologyWaterVelocityInput(void){
    4248 
    4249         /*material parameters: */
    4250         IssmDouble mu_water;
    4251         IssmDouble VelocityFactor;  // This factor represents the number 12 in laminar flow velocity which can vary by differnt hydrology.CR
    4252         IssmDouble n_man,CR;
    4253         IssmDouble w;
    4254         IssmDouble rho_ice, rho_water, g;
    4255         IssmDouble dsdx,dsdy,dbdx,dbdy;
    4256         IssmDouble vx[NUMVERTICES];
    4257         IssmDouble vy[NUMVERTICES];
    4258         GaussTria *gauss = NULL;
    4259 
    4260         /*Retrieve all inputs and parameters*/
    4261         rho_ice=matpar->GetRhoIce();
    4262         rho_water=matpar->GetRhoWater();
    4263         g=matpar->GetG();
    4264         CR=matpar->GetHydrologyCR(); // To have Lebrocq equavalent equation: CR=0.01,n_man=0.02
    4265         n_man=matpar->GetHydrologyN();
    4266         mu_water=matpar->GetMuWater();
    4267         Input* surfaceslopex_input=inputs->GetInput(SurfaceSlopeXEnum); _assert_(surfaceslopex_input);
    4268         Input* surfaceslopey_input=inputs->GetInput(SurfaceSlopeYEnum); _assert_(surfaceslopey_input);
    4269         Input* bedslopex_input=inputs->GetInput(BedSlopeXEnum);         _assert_(bedslopex_input);
    4270         Input* bedslopey_input=inputs->GetInput(BedSlopeYEnum);         _assert_(bedslopey_input);
    4271         Input* watercolumn_input=inputs->GetInput(WatercolumnEnum);     _assert_(watercolumn_input);
    4272 
    4273         /* compute VelocityFactor */
    4274         VelocityFactor= n_man*CR*CR*rho_water*g/mu_water;
    4275 
    4276         gauss=new GaussTria();
    4277         for(int iv=0;iv<NUMVERTICES;iv++){
    4278                 gauss->GaussVertex(iv);
    4279                 surfaceslopex_input->GetInputValue(&dsdx,gauss);
    4280                 surfaceslopey_input->GetInputValue(&dsdy,gauss);
    4281                 bedslopex_input->GetInputValue(&dbdx,gauss);
    4282                 bedslopey_input->GetInputValue(&dbdy,gauss);
    4283                 watercolumn_input->GetInputValue(&w,gauss);
    4284 
    4285                 /* Water velocity x and y components */
    4286         //      vx[iv]= - w*w/(12 * mu_water)*(rho_ice*g*dsdx+(rho_water-rho_ice)*g*dbdx);
    4287         //      vy[iv]= - w*w/(12 * mu_water)*(rho_ice*g*dsdy+(rho_water-rho_ice)*g*dbdy);
    4288                 vx[iv]= - w*w/(VelocityFactor* mu_water)*(rho_ice*g*dsdx+(rho_water-rho_ice)*g*dbdx);
    4289                 vy[iv]= - w*w/(VelocityFactor* mu_water)*(rho_ice*g*dsdy+(rho_water-rho_ice)*g*dbdy);
    4290         }
    4291 
    4292         /*clean-up*/
    4293         delete gauss;
    4294 
    4295         /*Add to inputs*/
    4296         this->inputs->AddInput(new TriaInput(HydrologyWaterVxEnum,vx,P1Enum));
    4297         this->inputs->AddInput(new TriaInput(HydrologyWaterVyEnum,vy,P1Enum));
    4298 }
    4299 /*}}}*/
    43004246/*FUNCTION Tria::GetSolutionFromInputsOneDof{{{*/
    43014247void  Tria::GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution, int enum_type){
  • issm/trunk-jpl/src/c/classes/Elements/Tria.h

    r17874 r17884  
    226226                void UpdateConstraintsExtrudeFromBase(void);
    227227                void UpdateConstraintsExtrudeFromTop(void);
    228 
    229                 void           CreateHydrologyWaterVelocityInput(void);
    230228                /*}}}*/
    231229
  • issm/trunk-jpl/src/c/classes/Materials/Matpar.cpp

    r17882 r17884  
    7474                                iomodel->Constant(&this->epl_conductivity,HydrologydcEplConductivityEnum);
    7575                }
     76        }
     77        else if(hydrology_model==HydrologyshreveEnum){
     78                /*Nothing to add*/
    7679        }
    7780        else{
     
    258261                case HydrologydcEplMaxThicknessEnum:         return this->epl_max_thickness;
    259262                case HydrologydcWaterCompressibilityEnum:    return this->water_compressibility;
    260                 case HydrologyshreveCREnum:                  return this->hydro_CR;
    261                 case HydrologyshreveKnEnum:                  return this->hydro_kn;
    262                 case HydrologyshreveNEnum:                   return this->hydro_n;
    263                 case HydrologyshrevePEnum:                   return this->hydro_p;
    264                 case HydrologyshreveQEnum:                   return this->hydro_q;
    265263                case ConstantsGEnum:                         return this->g;
    266264                default: _error_("Enum "<<EnumToStringx(enum_in)<<" not supported yet");
     
    350348}
    351349/*}}}*/
    352 /*FUNCTION Matpar::GetHydrologyKn {{{*/
    353 IssmDouble Matpar::GetHydrologyKn(){
    354         return hydro_kn;                 
    355 }               
    356 /*}}}*/                 
    357 /*FUNCTION Matpar::GetHydrologyP {{{*/                   
    358 IssmDouble Matpar::GetHydrologyP(){             
    359         return hydro_p;                 
    360 }               
    361 /*}}}*/                 
    362 /*FUNCTION Matqar::GetHydrologyQ {{{*/                   
    363 IssmDouble Matpar::GetHydrologyQ(){             
    364         return hydro_q;                 
    365 }               
    366 /*}}}*/                 
    367 /*FUNCTION Matpar::GetHydrologyCR {{{*/         
    368 IssmDouble Matpar::GetHydrologyCR(){             
    369         return hydro_CR;                 
    370 }               
    371 /*}}}*/                 
    372 /*FUNCTION Matpar::GetHydrologyN {{{*/                   
    373 IssmDouble Matpar::GetHydrologyN(){             
    374         return hydro_n;                 
    375 }               
    376 /*}}}*/
    377350/*FUNCTION Matpar::GetSedimentStoring {{{*/
    378351IssmDouble Matpar::GetSedimentStoring(){
  • issm/trunk-jpl/src/c/classes/Materials/Matpar.h

    r17759 r17884  
    3232                IssmDouble  desfac;
    3333                IssmDouble  s0p;
    34 
    35                 /*hydrology Shreve: */   
    36                 IssmDouble  hydro_kn;                   
    37                 IssmDouble  hydro_p;             
    38                 IssmDouble  hydro_q;             
    39                 IssmDouble  hydro_CR;                   
    40                 IssmDouble  hydro_n;
    4134
    4235                /*hydrology Dual Porous Continuum: */   
     
    113106                IssmDouble GetMeltingPoint();
    114107                IssmDouble GetReferenceTemperature();
    115                 IssmDouble GetHydrologyKn();
    116                 IssmDouble GetHydrologyP();
    117                 IssmDouble GetHydrologyQ();
    118                 IssmDouble GetHydrologyCR();
    119                 IssmDouble GetHydrologyN();
    120108                IssmDouble GetSedimentStoring();
    121109                IssmDouble GetEplSpecificStoring();
Note: See TracChangeset for help on using the changeset viewer.