Changeset 295:2a4c16d406f9 for source
- Timestamp:
- Sep 15, 2011, 12:01:58 PM (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- source
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
source/class/pf/Application.js
r282 r295 135 135 this.gui_n_l.setMaximum(n_u - 1); 136 136 137 this.plasma. n_u = n_u;137 this.plasma.r.setN_u(n_u); 138 138 this.updateGUI(); 139 139 } … … 146 146 this.gui_n_u.setMinimum(n_l + 1); 147 147 148 this.plasma. n_l = n_l;148 this.plasma.r.setN_l(n_l); 149 149 this.updateGUI(); 150 150 } … … 463 463 464 464 // Make sure n_u > n_l holds during update 465 if (this.gui_n_l.getValue() >= this.plasma. n_u) {466 this.gui_n_l.setValue(this.plasma. n_l);467 this.gui_n_u.setValue(this.plasma. n_u);465 if (this.gui_n_l.getValue() >= this.plasma.r.getN_u()) { 466 this.gui_n_l.setValue(this.plasma.r.getN_l()); 467 this.gui_n_u.setValue(this.plasma.r.getN_u()); 468 468 } else { 469 this.gui_n_u.setValue(this.plasma. n_u);470 this.gui_n_l.setValue(this.plasma. n_l);469 this.gui_n_u.setValue(this.plasma.r.getN_u()); 470 this.gui_n_l.setValue(this.plasma.r.getN_l()); 471 471 } 472 472 … … 1096 1096 l.setRich(true); 1097 1097 gl.add(l, {row: 1, column: 0}); 1098 e = new qx.ui.form.Spinner(this.plasma.n_l + 1, this.plasma.n_u, 1000); 1098 e = new qx.ui.form.Spinner(this.plasma.r.getN_l() + 1, 1099 this.plasma.r.getN_u(), 1000); 1099 1100 gl.add(e, {row: 1, column: 1}); 1100 1101 e.addListener("changeValue", changeN_u, this); … … 1104 1105 l.setRich(true); 1105 1106 gl.add(l, {row: 2, column: 0}); 1106 e = new qx.ui.form.Spinner(1, this.plasma.n_l, this.plasma.n_u - 1); 1107 e = new qx.ui.form.Spinner(1, this.plasma.r.getN_l(), 1108 this.plasma.r.getN_u() - 1); 1107 1109 gl.add(e, {row: 2, column: 1}); 1108 1110 e.addListener("changeValue", changeN_l, this); … … 2361 2363 config.B = this.plasma.B ; 2362 2364 2363 config.n_u = this.plasma. n_u;2364 config.n_l = this.plasma. n_l;2365 config.n_u = this.plasma.r.getN_u(); 2366 config.n_l = this.plasma.r.getN_l(); 2365 2367 2366 2368 if (this.prefs.saveFavsWithConfig) { … … 2426 2428 this.plasma.B = config.B/au_fB; 2427 2429 2428 this.plasma. n_u = config.n_u;2429 this.plasma. n_l = config.n_l;2430 this.plasma.r.setN_u(config.n_u); 2431 this.plasma.r.setN_l(config.n_l); 2430 2432 2431 2433 if (this.prefs.saveFavsWithConfig && config.favorites) { -
source/class/pf/Plasma.js
r293 r295 12 12 P_r: 0, 13 13 B : 0, 14 15 getTransitionEnergy: function()16 {17 var n_u = this.n_u;18 var n_l = this.n_l;19 var Z_core = this.r.getQ() + 1;20 var m_core = this.r.getM();21 22 return pf.base.Bohr.transitionEnergy(Z_core, m_core, n_u, n_l);23 },24 25 getFineStructure: function()26 {27 var n_u = this.n_u;28 var n_l = this.n_l;29 var Z_core = this.r.getQ() + 1;30 31 return pf.base.Bohr.transitionFineStructure(Z_core, n_u, n_l);32 },33 34 getMinEnergyDistance: function()35 {36 var n;37 if (this.n_u < this.n_l) {38 n = this.n_l;39 } else {40 n = this.n_u;41 }42 43 var Z_core = this.r.getQ() + 1;44 var m_core = this.r.getM();45 46 return pf.base.Bohr.transitionEnergy(Z_core, m_core, n + 1, n);47 },48 49 getNaturalWidth: function()50 {51 var n_u = this.n_u;52 var n_l = this.n_l;53 var Z_core = this.r.getQ() + 1;54 55 return pf.base.Bohr.LymanA(Z_core, n_u) +56 pf.base.Bohr.LymanA(Z_core, n_l);57 },58 59 getOscillatorStrength: function()60 {61 var n_u = this.n_u;62 var n_l = this.n_l;63 64 return pf.base.Bohr.oscillatorStrength(n_u, n_l);65 },66 67 getEinsteinA: function()68 {69 var n_u = this.n_u;70 var n_l = this.n_l;71 var Z_core = this.r.getQ() + 1;72 var m_core = this.r.getM();73 74 return pf.base.Bohr.EinsteinA(Z_core, m_core, n_u, n_l);75 },76 77 getDopplerHwhm: function()78 {79 var v = this.r.getThermalVelocity();80 var nu = this.getTransitionEnergy();81 82 return Math.sqrt(2*Math.log(2))*nu*v/pf.base.Bohr.c;83 },84 14 85 15 getMicrofieldFrequency: function(s) … … 143 73 getDelta0: function(s) 144 74 { 145 var n_u = this. n_u;146 var n_l = this. n_l;147 var Z_core = this.r.get Q() + 1;75 var n_u = this.r.getN_u(); 76 var n_l = this.r.getN_l(); 77 var Z_core = this.r.getZcore(); 148 78 var ef = s.getHoltsmarkField(); 149 79 … … 153 83 getQsHwhm: function(s) 154 84 { 155 var n_u = this. n_u;156 var n_l = this. n_l;85 var n_u = this.r.getN_u(); 86 var n_l = this.r.getN_l(); 157 87 158 88 var ppi = this.getPpiFactor(s); … … 227 157 var s_hwhm = this.getStarkHwhm(); 228 158 var z_hwhm = this.getZeemanSplitting(); 229 var d_hwhm = this. getDopplerHwhm();159 var d_hwhm = this.r.getDopplerHwhm(); 230 160 return 2*Math.sqrt(s_hwhm*s_hwhm + z_hwhm*z_hwhm + d_hwhm*d_hwhm); 231 161 }, … … 243 173 getBremsstrahlungSpectralDensity: function() 244 174 { 245 var photon_en = this. getTransitionEnergy();175 var photon_en = this.r.getTransitionEnergy(); 246 176 return this.getBremsstrahlungLosses()/this.e.getT()* 247 177 Math.exp(-photon_en/this.e.getT()); … … 263 193 getFreeBoundSpectralDensity: function() 264 194 { 265 var photon_en = this. getTransitionEnergy();195 var photon_en = this.r.getTransitionEnergy(); 266 196 return this.getFreeBoundLosses()/this.e.getT()* 267 197 Math.exp(-photon_en/this.e.getT()); … … 355 285 356 286 return 4*Math.PI*lambda*n_e/T_e; 357 },358 359 getClassicalIonizationField: function()360 {361 var Z_core = this.r.getQ() + 1;362 363 return pf.base.Bohr.classicalIonizationField(Z_core, this.n_u);364 },365 366 getInglisTellerField: function()367 {368 var Z_core = this.r.getQ() + 1;369 var n = this.n_u;370 371 return Math.pow(Z_core, 3)*372 (2*n + 1)/(6*Math.pow(n, 4)*(n + 1)*(n + 1));373 287 }, 374 288 … … 425 339 426 340 // Defaults: 1e16 1/cc, 1 eV 427 this. r = new pf.base.Species("r", m_p, 0,0, 1.0/E0);428 this. e = new pf.base.Species("e", 1.0, -1, 1e16*V0, 1.0/E0);429 this. i = new pf.base.Species("i", m_p, +1, 1e16*V0, 1.0/E0);341 this.e = new pf.base.Species ("e", 1.0, -1, 1e16*V0, 1.0/E0); 342 this.i = new pf.base.Species ("i", m_p, +1, 1e16*V0, 1.0/E0); 343 this.r = new pf.base.Radiator("r", m_p, 0, 0, 1.0/E0); 430 344 431 345 this.P_r = 0; 432 346 433 347 this.B = 0; 434 435 this.n_u = 2;436 this.n_l = 1;437 348 } 438 349 }); -
source/entities.js
r292 r295 125 125 nspecies : 0, 126 126 section : "spectroscopy", 127 formula : "this.plasma. getTransitionEnergy()"127 formula : "this.plasma.r.getTransitionEnergy()" 128 128 }, 129 129 { … … 133 133 nspecies : 0, 134 134 section : "spectroscopy", 135 formula : "this.plasma. getNaturalWidth()"135 formula : "this.plasma.r.getNaturalWidth()" 136 136 }, 137 137 { … … 141 141 nspecies : 0, 142 142 section : "spectroscopy", 143 formula : "this.plasma. getFineStructure()",143 formula : "this.plasma.r.getFineStructure()", 144 144 wikiLink : "Fine_structure" 145 145 }, … … 150 150 nspecies : 0, 151 151 section : "spectroscopy", 152 formula : "2*this.plasma. getDopplerHwhm()",152 formula : "2*this.plasma.r.getDopplerHwhm()", 153 153 wikiLink : "Doppler_broadening" 154 154 }, … … 204 204 nspecies : 0, 205 205 section : "spectroscopy", 206 formula : "this.plasma. getMinEnergyDistance()"206 formula : "this.plasma.r.getMinEnergyDistance()" 207 207 }, 208 208 { … … 269 269 nspecies : 0, 270 270 section : "spectroscopy", 271 formula : "this.plasma. getOscillatorStrength()",271 formula : "this.plasma.r.getOscillatorStrength()", 272 272 wikiLink : "Oscillator_strength" 273 273 }, … … 278 278 nspecies : 0, 279 279 section : "spectroscopy", 280 formula : "this.plasma. getEinsteinA()",280 formula : "this.plasma.r.getEinsteinA()", 281 281 wikiLink : "Einstein_coefficients" 282 282 }, … … 305 305 nspecies : 0, 306 306 section : "spectroscopy", 307 formula : "pf.base.Bohr.c/this.plasma. getTransitionEnergy()*(2*Math.PI)"307 formula : "pf.base.Bohr.c/this.plasma.r.getTransitionEnergy()*(2*Math.PI)" 308 308 }, 309 309 … … 314 314 nspecies : 0, 315 315 section : "spectroscopy", 316 formula : "this.plasma. getTransitionEnergy()/(2*Math.PI)"316 formula : "this.plasma.r.getTransitionEnergy()/(2*Math.PI)" 317 317 }, 318 318 … … 447 447 nspecies : 0, 448 448 section : "spectroscopy", 449 formula : "this.plasma. getClassicalIonizationField()"449 formula : "this.plasma.r.getClassicalIonizationField()" 450 450 }, 451 451 { … … 455 455 nspecies : 0, 456 456 section : "spectroscopy", 457 formula : "this.plasma. getInglisTellerField()",457 formula : "this.plasma.r.getInglisTellerField()", 458 458 wikiLink : "Inglis-Teller_equation" 459 459 },
Note: See TracChangeset
for help on using the changeset viewer.