Changeset 100:e7d27289faaf
- Timestamp:
- Jan 11, 2009, 12:03:25 PM (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/class/pf/base/Species.js
r88 r100 180 180 { 181 181 return 1.602164e-12*this._n*this._t; 182 }, 183 184 getCoulombLog: function(s2) 185 { 186 var lambda; 187 if (this.id == "e" && s2.id == "e") { 188 lambda = 24 - Math.log(Math.sqrt(this._n)/this._t) 189 } else 190 if (this.id != "e" && s2.id != "e") { 191 lambda = 23 - Math.log( 192 this._q*s2._q*(this._m + s2._m)/(this._m*s2._t + s2._m*this._t)* 193 Math.sqrt(this._n*this._q*this._q/this._t + s2._n*s2._q*s2._q/s2._t)); 194 } else { 195 var se, si; 196 if (this.id == "e") { 197 se = this; 198 si = s2; 199 } else { 200 si = this; 201 se = s2; 202 } 203 204 var tmm = si._t*se._m/si._m; 205 206 if (se._t < si._q*tmm) { 207 lambda = 30 - Math.log(Math.sqrt(si._n)/Math.pow(si._t, 3/2)* 208 si._q*si._q/si._m); 209 } else 210 if (tmm < 10*si._q*si._q && se._t > 10*si._q*si._q) { 211 lambda = 24 - Math.log(Math.sqrt(se._n)/se._t); 212 } else 213 if (tmm < se._t && se._t < 10*si._q*si._q) { 214 lambda = 23 - 215 Math.log(Math.sqrt(se._n)*si._q/Math.pow(se._t, 3/2)); 216 } else { 217 // no way??? 218 lambda = 0; 219 } 220 } 221 222 return lambda; 182 223 } 183 224 },
Note: See TracChangeset
for help on using the changeset viewer.