MCPcopy Create free account
hub / github.com/NatLabRockies/EnergyPlus / UpdateRadSysSourceValAvg

Function UpdateRadSysSourceValAvg

src/EnergyPlus/LowTempRadiantSystem.cc:5666–5751  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5664 }
5665
5666 void UpdateRadSysSourceValAvg(EnergyPlusData &state,
5667 bool &LowTempRadSysOn) // .TRUE. if the radiant system has run this zone time step
5668 {
5669
5670 // SUBROUTINE INFORMATION:
5671 // AUTHOR Rick Strand
5672 // DATE WRITTEN November 2000
5673
5674 // PURPOSE OF THIS SUBROUTINE:
5675 // To transfer the average value of the heat source/sink over the entire
5676 // zone time step back to the heat balance routines so that the heat
5677 // balance algorithms can simulate one last time with the average source
5678 // to maintain some reasonable amount of continuity and energy balance
5679 // in the temperature and flux histories.
5680
5681 // METHODOLOGY EMPLOYED:
5682 // All of the record keeping for the average term is done in the Update
5683 // routine so the only other thing that this subroutine does is check to
5684 // see if the system was even on. If any average term is non-zero, then
5685 // one or more of the radiant systems was running.
5686
5687 // SUBROUTINE PARAMETER DEFINITIONS:
5688 Real64 constexpr CloseEnough(0.01); // Some arbitrarily small value to avoid zeros and numbers that are almost the same
5689
5690 // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
5691 int SurfNum; // DO loop counter for surface index
5692
5693 LowTempRadSysOn = false;
5694
5695 // If there are no radiant systems in this input file, just RETURN
5696 if (state.dataLowTempRadSys->TotalNumOfRadSystems == 0) {
5697 return;
5698 }
5699
5700 // Now check to see if anything is running and transfer information from the "average" variables to
5701 // the array that will be used within the heat balance.
5702 state.dataHeatBalFanSys->QRadSysSource = 0.0; // Zero this out first
5703 for (int numRadSys = 1; numRadSys <= state.dataLowTempRadSys->NumOfHydrLowTempRadSys; ++numRadSys) {
5704 auto &thisLTR = state.dataLowTempRadSys->HydrRadSys(numRadSys);
5705 for (int numRadSurf = 1; numRadSurf <= thisLTR.NumOfSurfaces; ++numRadSurf) {
5706 if (thisLTR.QRadSysSrcAvg(numRadSurf) != 0.0) {
5707 LowTempRadSysOn = true;
5708 }
5709 SurfNum = thisLTR.SurfacePtr(numRadSurf);
5710 state.dataHeatBalFanSys->QRadSysSource(SurfNum) = thisLTR.QRadSysSrcAvg(numRadSurf);
5711 }
5712 }
5713 for (int numRadSys = 1; numRadSys <= state.dataLowTempRadSys->NumOfCFloLowTempRadSys; ++numRadSys) {
5714 auto &thisLTR = state.dataLowTempRadSys->CFloRadSys(numRadSys);
5715 for (int numRadSurf = 1; numRadSurf <= thisLTR.NumOfSurfaces; ++numRadSurf) {
5716 if (thisLTR.QRadSysSrcAvg(numRadSurf) != 0.0) {
5717 LowTempRadSysOn = true;
5718 }
5719 SurfNum = thisLTR.SurfacePtr(numRadSurf);
5720 state.dataHeatBalFanSys->QRadSysSource(SurfNum) = thisLTR.QRadSysSrcAvg(numRadSurf);
5721 }
5722 }
5723 for (int numRadSys = 1; numRadSys <= state.dataLowTempRadSys->NumOfElecLowTempRadSys; ++numRadSys) {

Callers 2

TEST_FFunction · 0.85

Calls 1

SurfaceClass · 0.85

Tested by

no test coverage detected