Changeset 55 for trunk/examples
- Timestamp:
- Sep 9, 2005 10:03:21 AM (17 years ago)
- Location:
- trunk/examples/app-fermi
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/app-fermi/fermi.py
r10 r55 26 26 E = Emin; dE = 0.005*(Emax-Emin) 27 27 28 Rappture.driver.put("output.curve(f12).about.label", "Fermi-Dirac Factor") 29 Rappture.driver.put("output.curve(f12).xaxis.label", "Energy") 30 Rappture.driver.put("output.curve(f12).xaxis.units", "eV") 31 path = "output.curve(f12).component.xy" 32 28 33 while E < Emax: 29 34 f = 1.0/(1.0 + exp((E - Ef)/kT)) 30 result.append( [E,f] ) 35 # result.append( [E,f] ) 36 value = "%s %s\n" % (f,E) 37 Rappture.driver.put(path,value,append=1) 31 38 E += dE 39 -
trunk/examples/app-fermi/fermi_io.py
r10 r55 18 18 #result = [] 19 19 20 T = Rappture.number('input .temperature', units='K', default=300)21 Ef = Rappture.number('input .Ef', units='eV', default=-5.5)20 T = Rappture.number('input', id="temperature", units='K', default=300) 21 Ef = Rappture.number('input', id="Ef", units='eV', default=-5.5) 22 22 23 23 #result = Rappture.table('output.result') \ 24 24 # .column('Energy (eV)',units='eV') \ 25 25 # .column('Fermi-Dirac Factor') 26 result = []26 #result = []
Note: See TracChangeset
for help on using the changeset viewer.