Commit b0e6903a authored by Gurecky, William's avatar Gurecky, William Committed by Salko Jr, Robert
Browse files

Chan area fix

parent b2aac129
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -273,7 +273,6 @@ class Hdf5Interface(object):
       me._pinIndexValid(pin)
       return me.pinAxialNodes[0:me.pinNumAxial[pin-1], pin-1]


    def getChanArea(me, ch):
        """ Returns the nominal channel flow area [m**2]

@@ -282,7 +281,7 @@ class Hdf5Interface(object):

        """
        me._chanIndexValid(ch)
        return me.h5['CORE/chan_area'][ch-1].value
        return me.h5['CORE/chan_area'][ch-1]

    def getPinThetas(me, pin, level):
        """ Returns the azimuthal fractions for the passed pin and level
+8 −0
Original line number Diff line number Diff line
@@ -485,6 +485,14 @@ class test_Hdf5Tools(unittest.TestCase):
       Tave = np.average(Temp, weights=mdotTot)
       me.assertAlmostEqual(Tave, me.obj.getAveTemp(section=2, level=2, state=2))

   def test_getChanArea(me):
      chArea = [8.536799999999999E-5, 8.536799999999999E-5, 8.536799999999999E-5,
                8.536799999999999E-5, 8.536799999999999E-5, 8.536799999999999E-5,
                8.536799999999999E-5, 1.7073999999999998E-4, 1.7073999999999998E-4,
                1.7073999999999998E-4]
      for i, ch in enumerate(range(10)):
          me.assertAlmostEqual(me.obj.getChanArea(ch + 1), chArea[i])

   def test_getChanVoid(me):
       axial, void = me.obj.getChanMeshAndData('chan_void_vap', chan=2, state=2)
       state2_chan2_level4 = 1.0007418278303053E-6