Loading SubKit/build/Model.py +14 −3 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ from Section import Section import Solid import BoundaryCondition import warnings import pdb DEFAULT_FUEL_ROD_GAP_CONDUCTANCE = 5700.0 # W/m/K DEFAULT_GAP_FORM_LOSS = 0.5 Loading Loading @@ -565,11 +566,12 @@ class Model: heat generated in the rods will be directly deposited into the fluid and bypass going through the rod surface. """ nPins = me.getTotalPins() if nPins == 0: # nRods = me.getTotalPins() nRods = me.getTotalFuelRods() if nRods == 0: raise RuntimeError('setTotalCorePower must be called after the solid geometries are defined.') coreHeight = me._getModelHeight() qprime = power / (coreHeight * nPins) qprime = power / (coreHeight * nRods) me.setAveragePower(qprime, dhfrac) def getTotalPins(me): Loading @@ -580,6 +582,15 @@ class Model: nPins += pin.mult return nPins def getTotalFuelRods(me): """ Returns the total number of fuel rods (including pin multipliers) in the model """ nRods = 0. for (ipin,pin) in me.solidObjects.items(): objType = me.solidTypeIDs[ipin] if isinstance(me.solidTypes[objType], Solid.FuelRod): nRods += pin.mult return nRods def addSection(me, secID, section): """ Use this to add a section to the model. Loading Loading
SubKit/build/Model.py +14 −3 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ from Section import Section import Solid import BoundaryCondition import warnings import pdb DEFAULT_FUEL_ROD_GAP_CONDUCTANCE = 5700.0 # W/m/K DEFAULT_GAP_FORM_LOSS = 0.5 Loading Loading @@ -565,11 +566,12 @@ class Model: heat generated in the rods will be directly deposited into the fluid and bypass going through the rod surface. """ nPins = me.getTotalPins() if nPins == 0: # nRods = me.getTotalPins() nRods = me.getTotalFuelRods() if nRods == 0: raise RuntimeError('setTotalCorePower must be called after the solid geometries are defined.') coreHeight = me._getModelHeight() qprime = power / (coreHeight * nPins) qprime = power / (coreHeight * nRods) me.setAveragePower(qprime, dhfrac) def getTotalPins(me): Loading @@ -580,6 +582,15 @@ class Model: nPins += pin.mult return nPins def getTotalFuelRods(me): """ Returns the total number of fuel rods (including pin multipliers) in the model """ nRods = 0. for (ipin,pin) in me.solidObjects.items(): objType = me.solidTypeIDs[ipin] if isinstance(me.solidTypes[objType], Solid.FuelRod): nRods += pin.mult return nRods def addSection(me, secID, section): """ Use this to add a section to the model. Loading