Commit 04a7ec4f authored by Salko Jr, Robert's avatar Salko Jr, Robert
Browse files

Fix for parallel models

Need to specify massflux when modeling parallel
parent 1128e639
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -166,6 +166,8 @@ class Model:

      """
      me.mdotInit = mdotInit
      # Also set massFlux in case we need it
      me.massFlux = me.mdotInit/me.sections[1].getFlowArea()
      me.pressureInit = pressureInit
      me.tempInit = tempInit
      me.setInitialConditionsMassFluxCalled = False
@@ -186,6 +188,8 @@ class Model:

      """
      me.massFlux = massFlux
      # Also set mdot in case we need it
      me.mdotInit = me.massFlux*me.sections[1].getFlowArea()
      me.pressureInit = pressureInit
      me.tempInit = tempInit
      me.setInitialConditionsCalled = False
@@ -219,7 +223,7 @@ class Model:

      """
      assert(isinstance(secID, int))
      assert(secID>=0)
      assert(secID>0)
      me.sections[secID] = section
      chanIDs = []
      for c in me.sections[secID].channels:
@@ -947,6 +951,9 @@ class Model:
      This method is run prior to generating the deck to check for model consistency.
      """

      if 1 not in me.sections:
         raise RuntimeError("No section with ID=1 found")

      # Create a default axial power shape of uniform to use for rods that had no power shape set
      if 0.0 not in me.axialPowerShapeAxial:
         me.axialPowerShapeAxial[0.0] = {}