Title: PhononThermo.py
1PhononThermo.py
- B. Fultz
- August 2003
-
- Calculate thermodynamic functions from phonon DOS
data
2ASCII Data Files on Disk (DOS reduced from
Pharos Data)
- ltPuDOS.pygt
- header "Energy", "Intensity", "Error"
- table 0.0, 0.0, 0.0,
- 0.075, 0.026478, 0.01150,
- 0.225, 0.083316, 0.02041,
- 0.375, 0.11699235, 0.02418,
3Data Structures 2 -- Add Temperature
4Disk File Data Temperature Series
- ltEXdict.pygt
- ...
- Pu150K 0.0, 0.0, 0.0 , 0.25, 0.121, 0.0 ,
... , 32.0, 3.47, 0.0 - Pu300K 0.0, 0.0, 0.0 , 0.25, 0.041, 0.0 ,
... , 32.0, -5.55, 0.0 - temperature 15.0, 65.0, 150.0, 300.0
- header 'Energy', 'Intensity', 'Error'
- Xdict 'temperature' temperature,
'header'header, '15.0'Pu15K, '65.0'Pu65K,
'150.0'Pu150K, '300.0'Pu300K
5Internal Data Structures Arbitrary Temperature
g_params slope0, intercept0, E0, slope1,
intercept1, E1, slope2, intercept2, E2 ...
pDOS T triplet0 triplet1 E
triplet2
6My Program Control (old)
def S_harm j0 S0 normaliz 0 while j lt
DOSpoints Prior operation calculated length
of Energylist if (temperature ltgt 0.0 and
float(Energylistj) ltgt 0.0) energy
float(Energylistj) DOS float(DOSlistj)
S S DOS S_mode(energy, temperature) norm
aliz normaliz DOS jj1 else jj1
return Entropy S/normaliz
7My Program Control (new)
S 0 normaliz 0 for pair in DS.gE
Nested list pair0 is DOS, pair1 is
Energy pDOS pair0 E pair1 if (T
ltgt 0.0 and E ltgt 0.0 and E lt E_cutoff) S
pDOS SF.S_mode(E,T) normaliz
pDOS S_harm self.data S/normaliz return
S_harm
8Functions
Bose-Einstein factor def BE(E,T) n 1 / (
math.exp(E/T) - 1 ) return n
9Functor Design (objects that are functions)
Quadratic.py class Quadratic def
__init__(self, A, B, C) self.A A self.B
B self.C C return def __eval__(self,
x) return self.Ax2 self.Bx self.C
Calculates Ax2 Bx C
10Use the Functor
import Quadratic, math instantiate
functor quad Quadratic.Quadratic(A1.0, B0.0,
C0.0) evaluate parametrically for i in
range(10) print i, quad.__eval__(i)
11Classes of PhononThermo.py
- class DOS "A single DOS from one measurement."
- class DOS_qh "Parameters for T-dependent DOS are
constructed from data at different temperatures. - class StandardFunction "Phonon thermodynamic
functions that depend on DOS(E), P, T" - BE(E,T) is the Bose-Einstein factor.
- This S_mode(E,T) has the elegant form
developed . - This S_osc(E,T) was developed by Max Planck
- class S_harm "Phonon entropy in the harmonic
approx." - class E_harm "Phonon energy in the harmonic
approx." - class E_quasi "Phonon energy in the
quasiharmonic approx." - class E_quasi "Phonon energy in the
quasiharmonic approx." - class S_anh "Anharmonic phonon entropy."
- class E_anh "Anharmonic phonon energy."
12Modules
13 14Supporting Modules.py -- old
- ReadMultipleFiles.py
- Scans file names to find all temperatures
- Simple files of all independent data
- ReadColumn.py
- Counts ltCRgt
- Counts Words in File
- Figures out Number of Columns
15ASCII Data Files on Disk -- old style (DOS
reduced from Pharos Data)
- Pu_Temp_Data/
- Pu77_E.dat Pu77_I.dat
- Energy_1ltCRgt Intensity_1ltCRgt
- Energy_2ltCRgt Intensity_2ltCRgt
- Energy_3ltCRgt Intensity_3ltCRgt
- . .
- . .
- . .