Ejemplo n.º 1
0
 def test_getEnthalpy(self):
     """
     Test the getEnthalpy() method.
     """
     Tlist = numpy.array([300,500,1000,1500,2000])
     Hexplist = numpy.array([0.9984012, 0.9990409, 0.9995205, 0.9996803, 0.9997603])
     for T, Hexp in zip(Tlist, Hexplist):
         Hact = getEnthalpy(T, self.energy, self.degeneracy, self.n0)
         self.assertAlmostEqual(Hexp / Hact, 1.0, 4, '{0} != {1} within 4 figures'.format(Hexp, Hact))
Ejemplo n.º 2
0
 def test_getEnthalpy(self):
     """
     Test the getEnthalpy() method.
     """
     Tlist = numpy.array([300,500,1000,1500,2000])
     Hexplist = numpy.array([0.9984012, 0.9990409, 0.9995205, 0.9996803, 0.9997603])
     for T, Hexp in zip(Tlist, Hexplist):
         Hact = getEnthalpy(T, self.energy, self.degeneracy, self.n0)
         self.assertAlmostEqual(Hexp / Hact, 1.0, 4, '{0} != {1} within 4 figures'.format(Hexp, Hact))
Ejemplo n.º 3
0
 def getEnthalpy(self, T):
     return schrodinger.getEnthalpy(T,self.energy,nmax=len(self.evals))