Changeset 24072


Ignore:
Timestamp:
07/09/19 08:21:00 (6 years ago)
Author:
Mathieu Morlighem
Message:

BUG: improved poorly coded law

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk-jpl/src/m/materials/nye.m

    r24060 r24072  
    11function rigidity = nye(temperature,ice_type)
    2         %NYE - figure out the rigidity of ice (either CO2 or H2O) for a given temperature
    3         %   rigidity (in s^(1/3)Pa) is the flow law parameter in the flow law sigma=B*e(1/3) (Nye, p2000).
    4         %   temperature is in Kelvin degrees
    5         %   Usage:
    6         %      rigidity=nye(temperature,ice_type) % ice_type = 1: CO2 ice // ice_type = 2: H2O ice
     2%NYE - Nye viscosity coefficient
     3%
     4%   Compute rigidity of ice (either CO2 or H2O) for a given temperature
     5%   rigidity (in s^(1/3)Pa) is the flow law parameter in the flow law
     6%   sigma=B*e(1/3) (Nye, p2000).  temperature is in Kelvin degrees
     7%
     8%   Usage:
     9%      rigidity=nye(temperature,ice_type) % ice_type = 1: CO2 ice // ice_type = 2: H2O ice
    710
    811        if (any(temperature < 130) || any(temperature > 273))
     
    1215        Rg = 8.3144598; % J mol^-1 K^-1
    1316
    14         if ice_type == 1 % CO2 ice
     17        if(ice_type==1) %CO2 ice
    1518                A_const = 10^(10.8); % s^-1 MPa
    16                 Q = 63000; % J mol^-1
    17                 n = 7; % Glen's exponent
    18                 T = 250:-5:100; % K
    19                 A = A_const*exp(-Q./(T*Rg)); % s^-1 MPa
    20                 B = A.^(-1/n)*1e6; % s^(1/n) Pa
     19                Q       = 63000;     % J mol^-1
     20                n       = 7;         % Glen's exponent
     21
     22        elseif(ice_type==2) % H2O ice
     23                A_const = 9e4;   % s^-1 MPa
     24                Q       = 60000; % J mol^-1
     25                n       = 3;     % Glen's exponent
     26
     27        else
     28                error('ice type not supported');
    2129        end
    2230
    23         if ice_type == 2 % H2O ice
    24                 A_const = 9e4; % s^-1 MPa
    25                 Q = 60000; %  J mol^-1
    26                 n = 3; % Glen's exponent
    27                 T = -100:5:0; % Celsius
    28                 T = T + 273; % K
    29                 A = A_const*exp(-Q./(T*Rg)); % s^-1 MPa
    30                 B = A.^(-1/n)*1e6; % s^(1/n) Pa
    31         end
    32 
    33         % Now, do a cubic fit between Temp and B:
    34         fittedmodel = fit(T',B','cubicspline');
    35         rigidity = fittedmodel(temperature);
     31        %Arhenius law
     32        A = A_const*exp(-Q./(temperature*Rg)); % s^-1 MPa
     33        B = A.^(-1/n)*1e6; % s^(1/n) Pa
    3634
    3735end
Note: See TracChangeset for help on using the changeset viewer.