Changeset 24073 for issm/trunk-jpl/src/c/shared/Elements/NyeH2O.cpp
- Timestamp:
- 07/09/19 08:28:35 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/shared/Elements/NyeH2O.cpp
r24060 r24073 1 1 /* \file NyeH2O.cpp 2 * \brief figure out B of H2O ice for a certain temperature2 * brief figure out B of H2O ice for a certain temperature 3 3 * INPUT function B=NyeH2O(temperature) 4 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- ). … … 20 20 IssmDouble NyeH2O(IssmDouble temperature){ 21 21 22 IssmDouble B,T; 22 /*Coefficients*/ 23 const IssmPDouble Rg = 8.3144598; /* J mol^-1 K^-1 */ 24 const IssmPDouble A_const = 9.e4; /*s^-1 MPa */ 25 const IssmPDouble Q = 60000.; /*J mol^-1 */ 26 const IssmPDouble n = 3.; /*Glen's exponent*/ 23 27 24 /*Switch to celsius from Kelvin: */ 25 T=temperature-273.15; 28 /*Arrhenius Law*/ 29 IssmDouble A = A_const *exp(-Q/(temperature*Rg)); /*s^-1 MPa */ 30 IssmDouble B = 1e6*pow(A,-1/n); /*s^(1/n) Pa */ 26 31 27 if(T<=-100){ 28 B=29901899089.3257; 29 } 30 else if((T>=-100.0) && (T<=-95.0)){ 31 B=20004935214.6693; 32 } 33 else if((T>=-95.0) && (T<=-90.0)){ 34 B=13685054490.7813; 35 } 36 else if((T>=-90.0) && (T<=-85.0)){ 37 B=9555312498.71763; 38 } 39 else if((T>=-85.0) && (T<=-80.0)){ 40 B=6798800864.99471; 41 } 42 else if((T>=-80.0) && (T<=-75.0)){ 43 B=4922440695.83365; 44 } 45 else if((T>=-75.0) && (T<=-70.0)){ 46 B=3621794191.06010; 47 } 48 else if((T>=-70.0) && (T<=-65.0)){ 49 B=2704902125.98878; 50 } 51 else if((T>=-65.0) && (T<=-60.0)){ 52 B=2048338724.47737; 53 } 54 else if((T>=-60.0) && (T<=-55.0)){ 55 B=1571285974.28101; 56 } 57 else if((T>=-55.0) && (T<=-50.0)){ 58 B=1219918332.04930; 59 } 60 else if((T>=-50.0) && (T<=-45.0)){ 61 B=957813559.547873; 62 } 63 else if((T>=-45.0) && (T<=-40.0)){ 64 B=759956402.731125; 65 } 66 else if((T>=-40.0) && (T<=-35.0)){ 67 B=608924663.484756; 68 } 69 else if((T>=-35.0) && (T<=-30.0)){ 70 B=492424321.822968; 71 } 72 else if((T>=-30.0) && (T<=-25.0)){ 73 B=401672414.952195; 74 } 75 else if((T>=-25.0) && (T<=-20.0)){ 76 B=330320977.865296; 77 } 78 else if((T>=-20.0) && (T<=-15.0)){ 79 B=273731390.267536; 80 } 81 else if((T>=-15.0) && (T<=-10.0)){ 82 B=228478811.983490; 83 } 84 else if((T>=-10.0) && (T<=-5.0)){ 85 B=192009688.386368; 86 } 87 else if((T>=-5.0) && (T<=0.0)){ 88 B=162402355.392225; 89 } 90 else{ 91 B=138197905.740112; 92 } 93 32 /*Return output*/ 94 33 return B; 95 34 }
Note:
See TracChangeset
for help on using the changeset viewer.