예제 #1
0
파일: main.py 프로젝트: murderoch/thesis
constants = util.Constants()

nMax = 10
O = species.Species('O')
#He = species.Species('He')

use = O

NIST = spectra.readNISTSpectra(use)
theory = spectra.calculateExpectedStates(use, nMax)
completeLevels = spectra.calculateEnergies(nMax, use, NIST, theory)

tempRange = range(300, 50000, 50)

asdf = thermo.Thermo(O, NIST, tempRange, 250)
CpRange = asdf.getCpRange()

#print(CpRange)
#print(len(CpRange), len(tempRange))

Capitelli2005oi = [[
    100, 200, 500, 700, 1000, 2000, 3000, 5000, 10000, 12000, 13000, 14000,
    15000, 16000, 17000, 18000, 19000, 20000, 22000, 23000, 24000, 25000,
    26000, 27000, 28000, 30000, 34000, 40000, 44000, 50000
],
                   [
                       23.70, 22.74, 21.26, 21.04, 20.91, 20.83, 20.94, 21.80,
                       23.29, 24.35, 25.74, 28.15, 31.89, 37.19, 44.04, 52.19,
                       61.11, 70.00, 84.37, 88.54, 90.36, 89.94, 87.66, 84.00,
                       79.46, 69.37, 51.52, 35.92, 30.6, 26.30
예제 #2
0
NIST = spectra.readNISTSpectra(use)
theory = spectra.calculateExpectedStates(use, nMax)

calcEnergy = spectra.CalcEnergy(nMax, use, NIST, theory, allSpecies)
completeLevels, calculatedLevels = calcEnergy.populateTheory()

calculatedLevels = spectra.sortSpectra(calculatedLevels, 'calculated')
completeLevels = spectra.sortSpectra(completeLevels, 'complete')

NISTSorted = spectra.sortSpectra(NIST, 'NIST')

if 1:
    tempRange = range(300, 50000, 50)

    asdf = thermo.Thermo(use, completeLevels, tempRange, 1000)
    CpRange = asdf.getCpRange()

    Capitelli2005oi = [[
        100, 200, 500, 700, 1000, 2000, 3000, 5000, 10000, 12000, 13000, 14000,
        15000, 16000, 17000, 18000, 19000, 20000, 22000, 23000, 24000, 25000,
        26000, 27000, 28000, 30000, 34000, 40000, 44000, 50000
    ],
                       [
                           23.70, 22.74, 21.26, 21.04, 20.91, 20.83, 20.94,
                           21.80, 23.29, 24.35, 25.74, 28.15, 31.89, 37.19,
                           44.04, 52.19, 61.11, 70.00, 84.37, 88.54, 90.36,
                           89.94, 87.66, 84.00, 79.46, 69.37, 51.52, 35.92,
                           30.6, 26.30
                       ]]
예제 #3
0
allSpecies = []
for speciesStr in speciesList:
    speciesObj = species.Species(speciesStr)
    allSpecies.append([speciesObj, spectra.readNISTSpectra(speciesObj)])

O = species.Species('O')
N = species.Species('N')
OI = species.Species('O+')
NI = species.Species('N+')

use = NI

NIST = spectra.readNISTSpectra(use)
theory = spectra.calculateExpectedStates(use, nMax)

calcEnergy = spectra.CalcEnergy(nMax, use, NIST, theory, allSpecies)
completeLevels, calculatedLevels = calcEnergy.populateTheory()

calculatedLevels = spectra.sortSpectra(calculatedLevels, None)
completeLevels = spectra.sortSpectra(completeLevels, None)
NISTSorted = spectra.sortSpectra(NIST, None)

tempRange = range(300, 50000, 50)
ionizationLowering = 500
#ionizationLowering = 'DebyeHuckel'
numberDensity = 3E23

asdf = thermo.Thermo(use, completeLevels, tempRange, ionizationLowering,
                     numberDensity)

plotter.plotCp(use, tempRange, asdf, ionizationLowering, True, False)