コード例 #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