예제 #1
0
파일: thermo.py 프로젝트: murderoch/thesis
    def __init__(self,
                 species,
                 completeLevels,
                 tempRange,
                 cutoffMethod,
                 numberDensity=0):
        self.species = species
        self.completeLevels = completeLevels
        self.tempRange = tempRange
        self.numberDensity = numberDensity

        if type(cutoffMethod) in [float, int]:
            self.cutoffMethod = 'fixedLowering'
            self.cutoffEnergy = cutoffMethod
        else:
            self.cutoffMethod = cutoffMethod

        self.constants = util.Constants()

        self.epsilon = []
        self.J = []

        for config in self.completeLevels:
            for level in config.term.levels:
                if level.energy is not None:
                    self.epsilon.append(level.energy *
                                        self.constants.Cm_1ToJoules)
                    self.J.append(level.J)
예제 #2
0
    def __init__(self, species, configuration, level):
        self.species = species
        self.configuration = configuration
        self.level = level
        self.constants = util.Constants()

        self.energy = self.hydrogenicApprox()
예제 #3
0
    def __init__(self, species):
        self.name = species
        self.constants = util.Constants()

        if '2' in self.name:
            self.readDiatomProperties()
        else:
            self.readAtomProperties()
예제 #4
0
파일: thermo.py 프로젝트: murderoch/thesis
    def __init__(self, species, completeLevels, tempRange, cutoffEnergy):
        self.species = species
        self.completeLevels = completeLevels
        self.tempRange = tempRange
        self.cutoffEnergy = cutoffEnergy

        self.constants = util.Constants()

        self.epsilon = []
        self.J = []

        for config in self.completeLevels:
            for level in config.term.levels:
                self.epsilon.append(level.energy * self.constants.Cm_1ToJoules)
                self.J.append(level.J)
예제 #5
0
    def __init__(self, nMax, species, NIST, theory, allSpecies):
        self.nMax = nMax
        self.species = species
        self.NIST = NIST
        self.theory = theory
        self.allSpecies = allSpecies
        self.constants = util.Constants()

        self.ions = []
        for ionSpecies in self.allSpecies:
            speciesObj = ionSpecies[0]
            if speciesObj.noElectrons == self.species.noElectrons and speciesObj.name != self.species.name:
                self.ions.append(ionSpecies)

        for ionSpecies in self.allSpecies:
            speciesObj = ionSpecies[0]
            if speciesObj.atomicNumber == self.species.atomicNumber and speciesObj.noElectrons == self.species.noElectrons - 1:
                self.speciesIon = ionSpecies
                break
예제 #6
0
파일: spectra.py 프로젝트: murderoch/thesis
    def __init__(self, nMax, species, NIST, theory, allSpecies):
        self.nMax = nMax
        self.species = species
        self.NIST = NIST
        self.theory = theory
        self.constants = util.Constants()

        self.speciesIon = None

        self.comprableIons = []
        for ionSpecies in allSpecies:
            speciesObj = ionSpecies[0]
            if speciesObj.noElectrons == self.species.noElectrons and speciesObj.name != self.species.name:
                self.comprableIons.append(ionSpecies)

            elif speciesObj.atomicNumber == self.species.atomicNumber and speciesObj.noElectrons == self.species.noElectrons - 1:
                self.speciesIon = ionSpecies

        if len(self.comprableIons) == 0:
            print('missing ion data for ', self.species.name)
예제 #7
0
    def __init__(self, nMax, species, NIST, theory, allSpecies):
        self.nMax = nMax
        self.species = species
        self.NIST = NIST
        self.theory = theory
        self.constants = util.Constants()

        self.speciesIon = None

        with open('hi.dat', 'w') as outFile:
            for config in self.NIST:
                outFile.write(config.ID + '\n')

        self.comprableIons = []
        for ionSpecies in allSpecies:
            speciesObj = ionSpecies[0]
            if speciesObj.noElectrons == self.species.noElectrons and speciesObj.name != self.species.name:
                self.comprableIons.append(ionSpecies)

            elif speciesObj.atomicNumber == self.species.atomicNumber and speciesObj.noElectrons == self.species.noElectrons - 1:
                self.speciesIon = ionSpecies

        if len(self.comprableIons) == 0:
            print('missing ion data for ', self.species.name)
예제 #8
0
파일: thermo.py 프로젝트: murderoch/thesis
                           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
                       ]]

    Gordon1999 = [[
        100, 200, 500, 700, 1000, 2000, 3000, 5000, 7000, 10000, 15000, 20000
    ],
                  [
                      23.703, 22.734, 21.257, 21.040, 20.915, 20.827, 20.937,
                      21.799, 22.708, 23.150, 23.868, 24.722
                  ]]

    constants = util.Constants()

    #oi = Species('oi', 1000)
    #oii = Species('oii', 1000)
    #ni = Species('ni', 1000)
    #nii = Species('nii', 1000)
    #ci = Species('ci', 1000)

    #oi.calcCpRange(range(1000, 51000, 1000))
    #oii.calcCpRange(range(1000, 51000, 1000))
    #ni.calcCpRange(range(1000, 51000, 1000))
    #nii.calcCpRange(range(1000, 51000, 1000))

    #he = Species('he', 1000)

    #for level in he.states:
예제 #9
0
파일: species.py 프로젝트: murderoch/thesis
 def __init__(self, species):
     self.name = species
     self.constants = util.Constants()
     self.readProperties()
예제 #10
0
 def __init__(self, species):
     self.constants = util.Constants()
     self.species = species