def _applyTemperaturesToComponents(reactor): """Update temperatures of block components now that densities have been set. Thermally expand them if there's coupled TH Useful only if the case is being loaded from did NOT have coupled T/H. See Also -------- _setInputComponentTemperatures : deals with loading from coupled TH cases """ from terrapower.physics.thermalHydraulics import thutils if (settings.getMasterCs()["useInputTemperaturesOnDBLoad"] and reactor.o.couplingIsActive()): thutils.applyTemperaturesToComponents(reactor)
def _setInputComponentTemperatures(reactor): """Update all materials to their proper temperatures. If we are doing a coupled T/H case but the case we're loading from did not have T/H coupling activated, then its composition was written to DB based on user-input temperatures. Thus, they should be read from these temps as well so as to factor out thermal expansion. :py:meth:`_applyTemperaturesToComponents` will do the proper coupled T/H expansion after the load. On the other hand, if the case we're loading from did have coupled T/H activated, then we must apply the proper temperatures/thermal expansion/dimensions BEFORE loading the number densities and then there will be nothing to do after the load. """ from terrapower.physics.thermalHydraulics import thutils thutils.applyTemperaturesToComponents(reactor, updateDensityParams=False)