Changeset 24103
- Timestamp:
- 07/22/19 14:15:42 (6 years ago)
- Location:
- issm/trunk-jpl/src/c/shared/Elements
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/shared/Elements/NyeCO2.cpp
r24073 r24103 2 2 * \brief figure out B of CO2 ice for a certain temperature 3 3 * INPUT function B=NyeCO2(temperature) 4 * where rigidigty (in s^(1/ 3)Pa) is the flow law paramter in the flow law sigma=B*e(1/3) (Nye, p -COMPLETE-).4 * where rigidigty (in s^(1/n)Pa) is the flow law paramter in the flow law sigma=B*e(1/n) (Nye, p2000). 5 5 */ 6 6 7 #include <math.h> 8 #include "../Numerics/types.h" 7 #include "../io/io.h" #include <math.h> #include "../Numerics/types.h" 9 8 10 9 IssmDouble NyeCO2(IssmDouble temperature){ 11 10 12 11 /*Coefficients*/ 13 const IssmPDouble Rg = 8.3144598; /* J mol^-1 K^-1 */ 14 const IssmPDouble A_const = pow(10.,10.8); /*s^-1 MPa */15 const IssmPDouble Q = 63000.; /*J mol^-1 */16 const IssmPDouble n =7.; /*Glen's exponent*/12 const IssmPDouble Rg = 8.3144598; /* J mol^-1 K^-1 */ const 13 IssmPDouble A_const = pow(10.,10.8); /*s^-1 MPa */ const IssmPDouble 14 Q = 63000.; /*J mol^-1 */ const IssmPDouble n = 15 7.; /*Glen's exponent*/ 17 16 18 17 /*Arrhenius Law*/ 19 IssmDouble A = A_const *exp(-Q/(temperature*Rg)); /*s^-1 MPa */18 IssmDouble A = A_const *exp(-Q/(temperature*Rg)); /*s^-1 MPa */ 20 19 IssmDouble B = 1e6*pow(A,-1/n); /*s^(1/n) Pa */ 21 20 21 /*Beyond-melting-point cases*/ 22 if((temperature>200.)&&(temperature<220.)) printf("CO2 ICE - POSSIBLE 23 MELTING. Some temperature values are between 200K and 220K.\n"); 24 else if(temperature>=220.) _printf0_("CO2 ICE - GUARANTEED MELTING. Some 25 temperature values are beyond 220K.\n"); 26 22 27 /*Return output*/ 23 return B; 28 return B; 24 29 } -
issm/trunk-jpl/src/c/shared/Elements/NyeH2O.cpp
r24073 r24103 2 2 * brief figure out B of H2O ice for a certain temperature 3 3 * INPUT function B=NyeH2O(temperature) 4 * where rigidigty (in s^(1/3)Pa) is the flow law paramter in the flow law sigma=B*e(1/3) (Nye, p -COMPLETE- ). 5 6 VALUES CALCULATED USING THE FOLLOWING MATLAB CODE 7 8 Rg = 8.3144598; % J mol^-1 K^-1 9 A_const = 9e4; % s^-1 MPa 10 Q = 60000; % J mol^-1 11 n = 3; % Glen's exponent 12 T = -102.5:5:2.5; T = T + 273; % K 13 A = A_const*exp(-Q./(T*Rg)); % s^-1 MPa 14 B = A.^(-1/n)*1e6; % s^(1/n) Pa 4 * where rigidigty (in s^(1/n)Pa) is the flow law paramter in the flow law sigma=B*e(1/n) (Nye, p2000). 15 5 */ 16 6 7 #include "../io/io.h" 17 8 #include <math.h> 18 9 #include "../Numerics/types.h" … … 27 18 28 19 /*Arrhenius Law*/ 29 IssmDouble A = A_const *exp(-Q/(temperature*Rg)); /*s^-1 MPa */20 IssmDouble A = A_const *exp(-Q/(temperature*Rg)); /*s^-1 MPa */ 30 21 IssmDouble B = 1e6*pow(A,-1/n); /*s^(1/n) Pa */ 22 23 /*Beyond-melting-point case*/ 24 if(temperature>=273.15) _printf0_("H2O ICE - GUARANTEED MELTING. Some temperature values are beyond 273.15K.\n"); 31 25 32 26 /*Return output*/
Note:
See TracChangeset
for help on using the changeset viewer.