Changeset 16590


Ignore:
Timestamp:
10/31/13 02:40:38 (11 years ago)
Author:
jbondzio
Message:

ADD: thermal conductivity of temperate ice "materials.temperateiceconductivity", minor bugs

Location:
issm/trunk-jpl
Files:
1 added
17 edited

Legend:

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

    r16589 r16590  
    38153815
    38163816        /* Start  looping on the number of gaussian points: */
    3817         gauss=new GaussPenta(2,2);
     3817        gauss=new GaussPenta(3,3);
    38183818        for(int ig=gauss->begin();ig<gauss->end();ig++){
    38193819
     
    38283828                pressure_input->GetInputValue(&pressure, gauss);
    38293829                kappa=matpar->GetEnthalpyDiffusionParameter(enthalpy,pressure); _assert_(kappa>0.);
     3830
    38303831                D_scalar_conduct=gauss->weight*Jdet*kappa/rho_ice;
    38313832                if(reCast<bool,IssmDouble>(dt)) D_scalar_conduct=D_scalar_conduct*dt;
     
    38953896                else if(stabilization==2){
    38963897                        GetNodalFunctionsP1Derivatives(&dbasis[0][0],&xyz_list[0][0], gauss);
    3897                         tau_parameter=GetStabilizationParameter(u-um,v-vm,w-wm,diameter,kappa);
     3898                        tau_parameter=GetStabilizationParameter(u-um,v-vm,w-wm,diameter,kappa/rho_ice);
    38983899
    38993900                        for(i=0;i<numdof;i++){
  • issm/trunk-jpl/src/c/classes/Materials/Matpar.cpp

    r16545 r16590  
    3434        iomodel->Constant(&this->heatcapacity,MaterialsHeatcapacityEnum);
    3535        iomodel->Constant(&this->thermalconductivity,MaterialsThermalconductivityEnum);
     36        iomodel->Constant(&this->temperateiceconductivity,MaterialsTemperateiceconductivityEnum);
    3637        iomodel->Constant(&this->latentheat,MaterialsLatentheatEnum);
    3738        iomodel->Constant(&this->beta,MaterialsBetaEnum);
     
    100101        _printf_("   heatcapacity: " << heatcapacity << "\n");
    101102        _printf_("   thermalconductivity: " << thermalconductivity << "\n");
     103        _printf_("   temperateiceconductivity: " << temperateiceconductivity << "\n");
    102104        _printf_("   latentheat: " << latentheat << "\n");
    103105        _printf_("   beta: " << beta << "\n");
     
    169171                        this->heatcapacity=constant;
    170172                        break;
    171                 case MaterialsThermalconductivityEnum:
     173                case MaterialsThermalconductivityEnum:
    172174                        this->thermalconductivity=constant;
     175                        break;
     176                case MaterialsTemperateiceconductivityEnum:
     177                        this->temperateiceconductivity=constant;
    173178                        break;
    174179                case  MaterialsLatentheatEnum:
     
    306311IssmDouble Matpar::GetThermalConductivity(){
    307312        return thermalconductivity;
     313}
     314/*}}}*/
     315/*FUNCTION Matpar::GetTemperateIceConductivity {{{*/
     316IssmDouble Matpar::GetTemperateIceConductivity(){
     317        return temperateiceconductivity;
    308318}
    309319/*}}}*/
     
    383393        */
    384394
    385         IssmDouble eps=0.05*heatcapacity;
     395        IssmDouble eps=0.1*heatcapacity;
    386396        IssmDouble hpmp=PureIceEnthalpy(pressure);
    387397        IssmDouble kappa_c=thermalconductivity/heatcapacity;
    388         IssmDouble kappa_t=thermalconductivity/heatcapacity*pow(10.,-1);
    389         return 1./(1.+exp(-(enthalpy-(hpmp))/eps))*(kappa_t-kappa_c) + kappa_c;
     398        IssmDouble kappa_t=temperateiceconductivity/heatcapacity;
     399       
     400        if(enthalpy<=hpmp-eps)
     401                return kappa_c;
     402        else if(enthalpy>=hpmp+eps)
     403                return kappa_t;
     404        else {
     405                IssmDouble xi=enthalpy-hpmp;
     406                IssmDouble pi=3.141592653589793238462643;
     407                return kappa_c + (kappa_t-kappa_c)*((xi+eps)/(2*eps) + sin(pi*xi/eps)/(2*pi));
     408        }
     409
     410        //return 1./(1.+exp(-(enthalpy-(hpmp))/eps))*(kappa_t-kappa_c) + kappa_c;
    390411}
    391412/*}}}*/
  • issm/trunk-jpl/src/c/classes/Materials/Matpar.h

    r16359 r16590  
    2222                IssmDouble  heatcapacity;
    2323                IssmDouble  thermalconductivity;
     24                IssmDouble  temperateiceconductivity;
    2425                IssmDouble  latentheat;
    2526                IssmDouble  beta;
     
    109110                IssmDouble GetHeatCapacity();
    110111                IssmDouble GetThermalConductivity();
     112                IssmDouble GetTemperateIceConductivity();
    111113                IssmDouble GetLatentHeat();
    112114                IssmDouble GetBeta();
  • issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h

    r16529 r16590  
    178178        MaterialsThermalExchangeVelocityEnum,
    179179        MaterialsThermalconductivityEnum,
     180  MaterialsTemperateiceconductivityEnum,
    180181        MaterialsLithosphereShearModulusEnum,
    181182        MaterialsLithosphereDensityEnum,
  • issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp

    r16529 r16590  
    186186                case MaterialsThermalExchangeVelocityEnum : return "MaterialsThermalExchangeVelocity";
    187187                case MaterialsThermalconductivityEnum : return "MaterialsThermalconductivity";
     188                case MaterialsTemperateiceconductivityEnum : return "MaterialsTemperateiceconductivity";
    188189                case MaterialsLithosphereShearModulusEnum : return "MaterialsLithosphereShearModulus";
    189190                case MaterialsLithosphereDensityEnum : return "MaterialsLithosphereDensity";
  • issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp

    r16529 r16590  
    189189              else if (strcmp(name,"MaterialsThermalExchangeVelocity")==0) return MaterialsThermalExchangeVelocityEnum;
    190190              else if (strcmp(name,"MaterialsThermalconductivity")==0) return MaterialsThermalconductivityEnum;
     191              else if (strcmp(name,"MaterialsTemperateiceconductivity")==0) return MaterialsTemperateiceconductivityEnum;
    191192              else if (strcmp(name,"MaterialsLithosphereShearModulus")==0) return MaterialsLithosphereShearModulusEnum;
    192193              else if (strcmp(name,"MaterialsLithosphereDensity")==0) return MaterialsLithosphereDensityEnum;
     
    259260              else if (strcmp(name,"SurfaceforcingsMassBalance")==0) return SurfaceforcingsMassBalanceEnum;
    260261              else if (strcmp(name,"SurfaceforcingsIspdd")==0) return SurfaceforcingsIspddEnum;
    261               else if (strcmp(name,"SurfaceforcingsDesfac")==0) return SurfaceforcingsDesfacEnum;
    262262         else stage=3;
    263263   }
    264264   if(stage==3){
    265               if (strcmp(name,"SurfaceforcingsS0p")==0) return SurfaceforcingsS0pEnum;
     265              if (strcmp(name,"SurfaceforcingsDesfac")==0) return SurfaceforcingsDesfacEnum;
     266              else if (strcmp(name,"SurfaceforcingsS0p")==0) return SurfaceforcingsS0pEnum;
    266267              else if (strcmp(name,"SurfaceforcingsIssmbgradients")==0) return SurfaceforcingsIssmbgradientsEnum;
    267268              else if (strcmp(name,"SurfaceforcingsMonthlytemperatures")==0) return SurfaceforcingsMonthlytemperaturesEnum;
     
    382383              else if (strcmp(name,"IntInput")==0) return IntInputEnum;
    383384              else if (strcmp(name,"InputToExtrude")==0) return InputToExtrudeEnum;
    384               else if (strcmp(name,"InputToL2Project")==0) return InputToL2ProjectEnum;
    385385         else stage=4;
    386386   }
    387387   if(stage==4){
    388               if (strcmp(name,"IntParam")==0) return IntParamEnum;
     388              if (strcmp(name,"InputToL2Project")==0) return InputToL2ProjectEnum;
     389              else if (strcmp(name,"IntParam")==0) return IntParamEnum;
    389390              else if (strcmp(name,"IntVecParam")==0) return IntVecParamEnum;
    390391              else if (strcmp(name,"TransientParam")==0) return TransientParamEnum;
     
    505506              else if (strcmp(name,"StressTensorxx")==0) return StressTensorxxEnum;
    506507              else if (strcmp(name,"StressTensorxy")==0) return StressTensorxyEnum;
    507               else if (strcmp(name,"StressTensorxz")==0) return StressTensorxzEnum;
    508508         else stage=5;
    509509   }
    510510   if(stage==5){
    511               if (strcmp(name,"StressTensoryy")==0) return StressTensoryyEnum;
     511              if (strcmp(name,"StressTensorxz")==0) return StressTensorxzEnum;
     512              else if (strcmp(name,"StressTensoryy")==0) return StressTensoryyEnum;
    512513              else if (strcmp(name,"StressTensoryz")==0) return StressTensoryzEnum;
    513514              else if (strcmp(name,"StressTensorzz")==0) return StressTensorzzEnum;
  • issm/trunk-jpl/src/m/classes/matice.m

    r15823 r16590  
    1313                latentheat                 = 0.;
    1414                thermalconductivity        = 0.;
     15                temperateiceconductivity         = 0.;
    1516                meltingpoint               = 0.;
    1617                beta                       = 0.;
     
    6970                        %ice thermal conductivity (W/m/K)
    7071                        obj.thermalconductivity=2.4;
     72                       
     73                        %wet ice thermal conductivity (W/m/K)
     74                        obj.temperateiceconductivity=.24;
    7175
    7276                        %the melting point of ice at 1 atmosphere of pressure in K
     
    118122                        fielddisplay(obj,'mu_water','water viscosity [N s/m^2]');
    119123                        fielddisplay(obj,'heatcapacity','heat capacity [J/kg/K]');
    120                         fielddisplay(obj,'thermalconductivity','ice thermal conductivity [W/m/K]');
     124                        fielddisplay(obj,'thermalconductivity',['ice thermal conductivity [W/m/K]']);
     125                        fielddisplay(obj,'temperateiceconductivity','temperate ice thermal conductivity [W/m/K]');
    121126                        fielddisplay(obj,'meltingpoint','melting point of ice at 1atm in K');
    122127                        fielddisplay(obj,'latentheat','latent heat of fusion [J/m^3]');
     
    141146                        WriteData(fid,'object',obj,'class','materials','fieldname','latentheat','format','Double');
    142147                        WriteData(fid,'object',obj,'class','materials','fieldname','thermalconductivity','format','Double');
     148                        WriteData(fid,'object',obj,'class','materials','fieldname','temperateiceconductivity','format','Double');
    143149                        WriteData(fid,'object',obj,'class','materials','fieldname','meltingpoint','format','Double');
    144150                        WriteData(fid,'object',obj,'class','materials','fieldname','beta','format','Double');
  • issm/trunk-jpl/src/m/classes/matice.py

    r15824 r16590  
    2121                self.latentheat                = 0.
    2222                self.thermalconductivity       = 0.
     23                self.temperateiceconductivity  = 0.
    2324                self.meltingpoint              = 0.
    2425                self.beta                      = 0.
     
    4647                string="%s\n%s"%(string,fielddisplay(self,"heatcapacity","heat capacity [J/kg/K]"))
    4748                string="%s\n%s"%(string,fielddisplay(self,"thermalconductivity","ice thermal conductivity [W/m/K]"))
     49                string="%s\n%s"%(string,fielddisplay(self,"temperateiceconductivity","temperate ice thermal conductivity [W/m/K]"))
    4850                string="%s\n%s"%(string,fielddisplay(self,"meltingpoint","melting point of ice at 1atm in K"))
    4951                string="%s\n%s"%(string,fielddisplay(self,"latentheat","latent heat of fusion [J/m^3]"))
     
    8284                #ice thermal conductivity (W/m/K)
    8385                self.thermalconductivity=2.4
     86
     87                #temperate ice thermal conductivity (W/m/K)
     88                self.temperateiceconductivity=0.24
    8489
    8590                #the melting point of ice at 1 atmosphere of pressure in K
     
    130135                WriteData(fid,'object',self,'class','materials','fieldname','latentheat','format','Double')
    131136                WriteData(fid,'object',self,'class','materials','fieldname','thermalconductivity','format','Double')
     137                WriteData(fid,'object',self,'class','materials','fieldname','temperateiceconductivity','format','Double')
    132138                WriteData(fid,'object',self,'class','materials','fieldname','meltingpoint','format','Double')
    133139                WriteData(fid,'object',self,'class','materials','fieldname','beta','format','Double')
  • issm/trunk-jpl/src/m/enum/EnumDefinitions.py

    r16529 r16590  
    178178def MaterialsThermalExchangeVelocityEnum(): return StringToEnum("MaterialsThermalExchangeVelocity")[0]
    179179def MaterialsThermalconductivityEnum(): return StringToEnum("MaterialsThermalconductivity")[0]
     180def MaterialsTemperateiceconductivityEnum(): return StringToEnum("MaterialsTemperateiceconductivity")[0]
    180181def MaterialsLithosphereShearModulusEnum(): return StringToEnum("MaterialsLithosphereShearModulus")[0]
    181182def MaterialsLithosphereDensityEnum(): return StringToEnum("MaterialsLithosphereDensity")[0]
Note: See TracChangeset for help on using the changeset viewer.