Changeset 10565


Ignore:
Timestamp:
11/10/11 08:27:02 (13 years ago)
Author:
Eric.Larour
Message:

Added mu_water field for hydrology solutoin.
Missing enums.

Location:
issm/trunk/src
Files:
4 added
9 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h

    r10523 r10565  
    100100        MaterialsRhoIceEnum,
    101101        MaterialsRhoWaterEnum,
     102        MaterialsMuWaterEnum,
    102103        MaterialsThermalExchangeVelocityEnum,
    103104        MaterialsThermalconductivityEnum,
  • issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp

    r10521 r10565  
    104104                case MaterialsRhoIceEnum : return "MaterialsRhoIce";
    105105                case MaterialsRhoWaterEnum : return "MaterialsRhoWater";
     106                case MaterialsMuWaterEnum : return "MaterialsMuWater";
    106107                case MaterialsThermalExchangeVelocityEnum : return "MaterialsThermalExchangeVelocity";
    107108                case MaterialsThermalconductivityEnum : return "MaterialsThermalconductivity";
     
    418419                case BilinearInterpEnum : return "BilinearInterp";
    419420                case NearestInterpEnum : return "NearestInterp";
     421                case XYEnum : return "XY";
     422                case XYZPEnum : return "XYZP";
    420423                case OptionEnum : return "Option";
    421424                case OptionCellEnum : return "OptionCell";
  • issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp

    r10521 r10565  
    102102        else if (strcmp(name,"MaterialsRhoIce")==0) return MaterialsRhoIceEnum;
    103103        else if (strcmp(name,"MaterialsRhoWater")==0) return MaterialsRhoWaterEnum;
     104        else if (strcmp(name,"MaterialsMuWater")==0) return MaterialsMuWaterEnum;
    104105        else if (strcmp(name,"MaterialsThermalExchangeVelocity")==0) return MaterialsThermalExchangeVelocityEnum;
    105106        else if (strcmp(name,"MaterialsThermalconductivity")==0) return MaterialsThermalconductivityEnum;
     
    416417        else if (strcmp(name,"BilinearInterp")==0) return BilinearInterpEnum;
    417418        else if (strcmp(name,"NearestInterp")==0) return NearestInterpEnum;
     419        else if (strcmp(name,"XY")==0) return XYEnum;
     420        else if (strcmp(name,"XYZP")==0) return XYZPEnum;
    418421        else if (strcmp(name,"Option")==0) return OptionEnum;
    419422        else if (strcmp(name,"OptionCell")==0) return OptionCellEnum;
  • issm/trunk/src/c/objects/Elements/Tria.cpp

    r10556 r10565  
    46024602
    46034603        /*material parameters: */
    4604         double mu_water=0.001787;  //unit= [N s/m2]
     4604        double mu_water;
    46054605        double VelocityFactor;  // This factor represents the number 12 in laminar flow velocity which can vary by differnt hydrology.CR
    46064606        double n_man,CR;
     
    46184618        CR=matpar->GetHydrologyCR(); // To have Lebrocq equavalent equation: CR=0.01,n_man=0.02
    46194619        n_man=matpar->GetHydrologyN();
     4620        mu_water=matpar->GetMuWater();
    46204621        Input* surfaceslopex_input=inputs->GetInput(SurfaceSlopeXEnum); _assert_(surfaceslopex_input);
    46214622        Input* surfaceslopey_input=inputs->GetInput(SurfaceSlopeYEnum); _assert_(surfaceslopey_input);
     
    46264627        /* compute VelocityFactor */
    46274628        VelocityFactor= n_man*pow(CR,2)*rho_water*g/mu_water;
    4628 
     4629       
    46294630        gauss=new GaussTria();
    46304631        for (int iv=0;iv<NUMVERTICES;iv++){
  • issm/trunk/src/c/objects/Materials/Matpar.cpp

    r9883 r10565  
    2828        iomodel->Constant(&this->rho_ice,MaterialsRhoIceEnum);
    2929        iomodel->Constant(&this->rho_water,MaterialsRhoWaterEnum);
     30        iomodel->Constant(&this->mu_water,MaterialsMuWaterEnum);
    3031        iomodel->Constant(&this->heatcapacity,MaterialsHeatcapacityEnum);
    3132        iomodel->Constant(&this->thermalconductivity,MaterialsThermalconductivityEnum);
     
    5960        printf("   rho_ice: %g\n",rho_ice);
    6061        printf("   rho_water: %g\n",rho_water);
     62        printf("   mu_water: %g\n",mu_water);
    6163        printf("   heatcapacity: %g\n",heatcapacity);
    6264        printf("   thermalconductivity: %g\n",thermalconductivity);
     
    7880        printf("   rho_ice: %g\n",rho_ice);
    7981        printf("   rho_water: %g\n",rho_water);
     82        printf("   mu_water: %g\n",mu_water);
    8083        printf("   heatcapacity: %g\n",heatcapacity);
    8184        printf("   thermalconductivity: %g\n",thermalconductivity);
     
    119122        memcpy(marshalled_dataset,&rho_ice,sizeof(rho_ice));marshalled_dataset+=sizeof(rho_ice);
    120123        memcpy(marshalled_dataset,&rho_water,sizeof(rho_water));marshalled_dataset+=sizeof(rho_water);
     124        memcpy(marshalled_dataset,&mu_water,sizeof(mu_water));marshalled_dataset+=sizeof(mu_water);
    121125        memcpy(marshalled_dataset,&heatcapacity,sizeof(heatcapacity));marshalled_dataset+=sizeof(heatcapacity);
    122126        memcpy(marshalled_dataset,&thermalconductivity,sizeof(thermalconductivity));marshalled_dataset+=sizeof(thermalconductivity);
     
    139143                sizeof(rho_ice)+
    140144                sizeof(rho_water)+
     145                sizeof(mu_water)+
    141146                sizeof(heatcapacity)+
    142147                sizeof(thermalconductivity)+
     
    165170        memcpy(&rho_ice,marshalled_dataset,sizeof(rho_ice));marshalled_dataset+=sizeof(rho_ice);
    166171        memcpy(&rho_water,marshalled_dataset,sizeof(rho_water));marshalled_dataset+=sizeof(rho_water);
     172        memcpy(&mu_water,marshalled_dataset,sizeof(mu_water));marshalled_dataset+=sizeof(mu_water);
    167173        memcpy(&heatcapacity,marshalled_dataset,sizeof(heatcapacity));marshalled_dataset+=sizeof(heatcapacity);
    168174        memcpy(&thermalconductivity,marshalled_dataset,sizeof(thermalconductivity));marshalled_dataset+=sizeof(thermalconductivity);
     
    237243                        break;
    238244
     245                case MaterialsMuWaterEnum:
     246                        this->mu_water=constant;
     247                        break;
     248
    239249                case MaterialsHeatcapacityEnum:
    240250                        this->heatcapacity=constant;
     
    347357double Matpar::GetRhoWater(){
    348358        return rho_water;
     359}
     360/*}}}1*/
     361/*FUNCTION Matpar::GetMuWater {{{1*/
     362double Matpar::GetMuWater(){
     363        return mu_water;
    349364}
    350365/*}}}1*/
  • issm/trunk/src/c/objects/Materials/Matpar.h

    r9883 r10565  
    1818                double  rho_ice;
    1919                double  rho_water;
     20                double  mu_water;
    2021                double  heatcapacity;
    2122                double  thermalconductivity;
     
    7576                double GetRhoIce();
    7677                double GetRhoWater();
     78                double GetMuWater();
    7779                double GetMixedLayerCapacity();
    7880                double GetThermalExchangeVelocity();
  • issm/trunk/src/m/classes/hydrology.m

    r10538 r10565  
    4141                        %Parameters from Johnson's 2002 thesis, section 3.5.4                   
    4242                        obj.n=.02;                       
    43                         obj.CR=2;               
     43                        obj.CR=.01;
    4444                        obj.p=2;                 
    4545                        obj.q=1;                 
  • issm/trunk/src/m/classes/materials.m

    r9862 r10565  
    88                rho_ice                    = modelfield('default',0,'marshall',true,'format','Double');
    99                rho_water                  = modelfield('default',0,'marshall',true,'format','Double');
     10                mu_water                   = modelfield('default',0,'marshall',true,'format','Double');
    1011                heatcapacity               = modelfield('default',0,'marshall',true,'format','Double');
    1112                latentheat                 = modelfield('default',0,'marshall',true,'format','Double');
     
    5051                        obj.rho_water=1023;
    5152
     53                        %water viscosity (N.s/m^2)
     54                        obj.mu_water=0.001787; 
     55
    5256                        %ice heat capacity cp (J/kg/K)
    5357                        obj.heatcapacity=2093;
     
    7882                        checkfield(md,'materials.rho_ice','>',0);
    7983                        checkfield(md,'materials.rho_water','>',0);
     84                        checkfield(md,'materials.mu_water','>',0);
    8085                        checkfield(md,'materials.rheology_B','>',0,'size',[md.mesh.numberofvertices 1]);
    8186                        checkfield(md,'materials.rheology_n','>',0,'size',[md.mesh.numberofelements 1]);
     
    8792                        fielddisplay(obj,'rho_ice','ice density [kg/m^3]');
    8893                        fielddisplay(obj,'rho_water','water density [kg/m^3]');
     94                        fielddisplay(obj,'mu_water','water viscosity [N s/m^2]');
    8995                        fielddisplay(obj,'heatcapacity','heat capacity [J/kg/K]');
    9096                        fielddisplay(obj,'thermalconductivity','ice thermal conductivity [W/m/K]');
  • issm/trunk/src/m/usr/larour/Alias/cdhydro.m

    r9562 r10565  
    1 cd([issmdir '/projects/LarourHydroJGR2011']);
     1cd([issmdir '/projects/LarourJGR2012Hydro']);
    22
Note: See TracChangeset for help on using the changeset viewer.