From 85778f5228d97b039de0c8ba9a8343622fa1e129 Mon Sep 17 00:00:00 2001 From: Jermy Thomas Date: Wed, 24 Feb 2021 12:24:08 -0700 Subject: [PATCH] removed extern arrays --- src/EnergyPlus/LowTempRadiantSystem.cc | 950 ++++++++++++------------- src/EnergyPlus/LowTempRadiantSystem.hh | 34 +- src/EnergyPlus/OutputReportTabular.cc | 29 +- 3 files changed, 503 insertions(+), 510 deletions(-) diff --git a/src/EnergyPlus/LowTempRadiantSystem.cc b/src/EnergyPlus/LowTempRadiantSystem.cc index 6ccbf73c58e..9319e21a09c 100644 --- a/src/EnergyPlus/LowTempRadiantSystem.cc +++ b/src/EnergyPlus/LowTempRadiantSystem.cc @@ -205,17 +205,9 @@ namespace LowTempRadiantSystem { Array1D_bool CheckEquipName; // Object Data - Array1D HydrRadSys; - Array1D CFloRadSys; - Array1D ElecRadSys; - Array1D RadSysTypes; std::unordered_map LowTempRadUniqueNames; - Array1D ElecRadSysNumericFields; - Array1D HydronicRadiantSysNumericFields; - Array1D HydronicRadiantSysDesign; - Array1D CflowRadiantSysDesign; - bool FirstTimeFlag = true; // for setting size of Ckj, Cmj, WaterTempOut arrays + bool FirstTimeFlag = true; // for setting size of Ckj, Cmj, WaterTempOut arrays // state bool MyEnvrnFlagGeneral = true; bool ZoneEquipmentListChecked = false; // True after the Zone Equipment List has been checked for items bool MyOneTimeFlag = true; // Initialization flag @@ -245,12 +237,6 @@ namespace LowTempRadiantSystem { MySizeFlagCFlo.deallocate(); MySizeFlagElec.deallocate(); CheckEquipName.deallocate(); - HydrRadSys.deallocate(); - CFloRadSys.deallocate(); - ElecRadSys.deallocate(); - RadSysTypes.deallocate(); - ElecRadSysNumericFields.deallocate(); - HydronicRadiantSysNumericFields.deallocate(); LowTempRadUniqueNames.clear(); GetInputFlag = true; FirstTimeFlag = true; @@ -287,25 +273,25 @@ namespace LowTempRadiantSystem { // Find the correct Low Temp Radiant System if (CompIndex == 0) { - RadSysNum = UtilityRoutines::FindItemInList(CompName, RadSysTypes); + RadSysNum = UtilityRoutines::FindItemInList(CompName, state.dataLowTempRadSys->RadSysTypes); if (RadSysNum == 0) { ShowFatalError(state, "SimLowTempRadiantSystem: Unit not found=" + CompName); } CompIndex = RadSysNum; - SystemType = RadSysTypes(RadSysNum).SystemType; + SystemType = state.dataLowTempRadSys->RadSysTypes(RadSysNum).SystemType; { auto const SELECT_CASE_var(SystemType); if (SELECT_CASE_var == LowTempRadiantSystem::SystemType::HydronicSystem) { - RadSysTypes(RadSysNum).CompIndex = UtilityRoutines::FindItemInList(CompName, HydrRadSys); + state.dataLowTempRadSys->RadSysTypes(RadSysNum).CompIndex = UtilityRoutines::FindItemInList(CompName, state.dataLowTempRadSys->HydrRadSys); } else if (SELECT_CASE_var == LowTempRadiantSystem::SystemType::ConstantFlowSystem) { - RadSysTypes(RadSysNum).CompIndex = UtilityRoutines::FindItemInList(CompName, CFloRadSys); + state.dataLowTempRadSys->RadSysTypes(RadSysNum).CompIndex = UtilityRoutines::FindItemInList(CompName, state.dataLowTempRadSys->CFloRadSys); } else if (SELECT_CASE_var == LowTempRadiantSystem::SystemType::ElectricSystem) { - RadSysTypes(RadSysNum).CompIndex = UtilityRoutines::FindItemInList(CompName, ElecRadSys); + state.dataLowTempRadSys->RadSysTypes(RadSysNum).CompIndex = UtilityRoutines::FindItemInList(CompName, state.dataLowTempRadSys->ElecRadSys); } } } else { RadSysNum = CompIndex; - SystemType = RadSysTypes(RadSysNum).SystemType; + SystemType = state.dataLowTempRadSys->RadSysTypes(RadSysNum).SystemType; if (RadSysNum > TotalNumOfRadSystems || RadSysNum < 1) { ShowFatalError(state, format("SimLowTempRadiantSystem: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", @@ -314,18 +300,18 @@ namespace LowTempRadiantSystem { CompName)); } if (CheckEquipName(RadSysNum)) { - if (CompName != RadSysTypes(RadSysNum).Name) { + if (CompName != state.dataLowTempRadSys->RadSysTypes(RadSysNum).Name) { ShowFatalError(state, format("SimLowTempRadiantSystem: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", RadSysNum, CompName, - RadSysTypes(RadSysNum).Name)); + state.dataLowTempRadSys->RadSysTypes(RadSysNum).Name)); } CheckEquipName(RadSysNum) = false; } } - InitLowTempRadiantSystem(state, FirstHVACIteration, RadSysTypes(RadSysNum).CompIndex, SystemType, InitErrorFound); + InitLowTempRadiantSystem(state, FirstHVACIteration, state.dataLowTempRadSys->RadSysTypes(RadSysNum).CompIndex, SystemType, InitErrorFound); if (InitErrorFound) { ShowFatalError(state, "InitLowTempRadiantSystem: Preceding error is not allowed to proceed with the simulation. Correct this input problem."); } @@ -334,11 +320,11 @@ namespace LowTempRadiantSystem { { RadiantSystemBaseData *baseSystem; if (SystemType == LowTempRadiantSystem::SystemType::HydronicSystem) { - baseSystem = &HydrRadSys(RadSysTypes(RadSysNum).CompIndex); + baseSystem = &state.dataLowTempRadSys->HydrRadSys(state.dataLowTempRadSys->RadSysTypes(RadSysNum).CompIndex); } else if (SystemType == LowTempRadiantSystem::SystemType::ConstantFlowSystem) { - baseSystem = &CFloRadSys(RadSysTypes(RadSysNum).CompIndex); + baseSystem = &state.dataLowTempRadSys->CFloRadSys(state.dataLowTempRadSys->RadSysTypes(RadSysNum).CompIndex); } else if (SystemType == LowTempRadiantSystem::SystemType::ElectricSystem) { - baseSystem = &ElecRadSys(RadSysTypes(RadSysNum).CompIndex); + baseSystem = &state.dataLowTempRadSys->ElecRadSys(state.dataLowTempRadSys->RadSysTypes(RadSysNum).CompIndex); } else { ShowFatalError(state, "SimLowTempRadiantSystem: Illegal system type for system " + CompName); } @@ -457,43 +443,43 @@ namespace LowTempRadiantSystem { NumOfCFloLowTempRadSysDes = inputProcessor->getNumObjectsFound(state, "ZoneHVAC:LowTemperatureRadiant:ConstantFlow:Design"); TotalNumOfRadSystems = NumOfHydrLowTempRadSys + NumOfElecLowTempRadSys + NumOfCFloLowTempRadSys; - RadSysTypes.allocate(TotalNumOfRadSystems); + state.dataLowTempRadSys->RadSysTypes.allocate(TotalNumOfRadSystems); LowTempRadUniqueNames.reserve(static_cast(TotalNumOfRadSystems)); CheckEquipName.dimension(TotalNumOfRadSystems, true); - HydrRadSys.allocate(NumOfHydrLowTempRadSys); + state.dataLowTempRadSys->HydrRadSys.allocate(NumOfHydrLowTempRadSys); if (NumOfHydrLowTempRadSys > 0) { GlycolIndex = FindGlycol(state, fluidNameWater); - for (auto &e : HydrRadSys) + for (auto &e : state.dataLowTempRadSys->HydrRadSys) e.GlycolIndex = GlycolIndex; if (GlycolIndex == 0) { ShowSevereError(state, "Hydronic radiant systems: no water property data found in input"); ErrorsFound = true; } } else { - for (auto &e : HydrRadSys) + for (auto &e : state.dataLowTempRadSys->HydrRadSys) e.GlycolIndex = 0; } - CFloRadSys.allocate(NumOfCFloLowTempRadSys); + state.dataLowTempRadSys->CFloRadSys.allocate(NumOfCFloLowTempRadSys); if (NumOfCFloLowTempRadSys > 0) { GlycolIndex = FindGlycol(state, fluidNameWater); - for (auto &e : CFloRadSys) + for (auto &e : state.dataLowTempRadSys->CFloRadSys) e.GlycolIndex = GlycolIndex; if (GlycolIndex == 0) { ShowSevereError(state, "Constant flow radiant systems: no water property data found in input"); ErrorsFound = true; } } else { - for (auto &e : CFloRadSys) + for (auto &e : state.dataLowTempRadSys->CFloRadSys) e.GlycolIndex = 0; } - ElecRadSys.allocate(NumOfElecLowTempRadSys); - ElecRadSysNumericFields.allocate(NumOfElecLowTempRadSys); - HydronicRadiantSysNumericFields.allocate(NumOfHydrLowTempRadSys); - HydronicRadiantSysDesign.allocate(NumOfHydrLowTempRadSysDes); - CflowRadiantSysDesign.allocate(NumOfCFloLowTempRadSysDes); + state.dataLowTempRadSys->ElecRadSys.allocate(NumOfElecLowTempRadSys); + state.dataLowTempRadSys->ElecRadSysNumericFields.allocate(NumOfElecLowTempRadSys); + state.dataLowTempRadSys->HydronicRadiantSysNumericFields.allocate(NumOfHydrLowTempRadSys); + state.dataLowTempRadSys->HydronicRadiantSysDesign.allocate(NumOfHydrLowTempRadSysDes); + state.dataLowTempRadSys->CflowRadiantSysDesign.allocate(NumOfCFloLowTempRadSysDes); //state-> VarFlowRadDesignNames.allocate(NumOfHydrLowTempRadSysDes); CFlowRadDesignNames.allocate(NumOfCFloLowTempRadSysDes); @@ -520,13 +506,13 @@ namespace LowTempRadiantSystem { ); - HydronicRadiantSysDesign(Item).FieldNames.allocate(NumNumbers); - HydronicRadiantSysDesign(Item).FieldNames = ""; - HydronicRadiantSysDesign(Item).FieldNames = cNumericFields; + state.dataLowTempRadSys->HydronicRadiantSysDesign(Item).FieldNames.allocate(NumNumbers); + state.dataLowTempRadSys->HydronicRadiantSysDesign(Item).FieldNames = ""; + state.dataLowTempRadSys->HydronicRadiantSysDesign(Item).FieldNames = cNumericFields; GlobalNames::VerifyUniqueInterObjectName(state, LowTempRadUniqueNames, Alphas(1), CurrentModuleObject, cAlphaFields(1), ErrorsFound); ++BaseNum; - auto &thisRadSysDesign(HydronicRadiantSysDesign(Item)); + auto &thisRadSysDesign(state.dataLowTempRadSys->HydronicRadiantSysDesign(Item)); // General user input data thisRadSysDesign.designName = Alphas(1); @@ -703,23 +689,23 @@ namespace LowTempRadiantSystem { cAlphaFields, cNumericFields); - HydronicRadiantSysNumericFields(Item).FieldNames.allocate(NumNumbers); - HydronicRadiantSysNumericFields(Item).FieldNames = ""; - HydronicRadiantSysNumericFields(Item).FieldNames = cNumericFields; + state.dataLowTempRadSys->HydronicRadiantSysNumericFields(Item).FieldNames.allocate(NumNumbers); + state.dataLowTempRadSys->HydronicRadiantSysNumericFields(Item).FieldNames = ""; + state.dataLowTempRadSys->HydronicRadiantSysNumericFields(Item).FieldNames = cNumericFields; GlobalNames::VerifyUniqueInterObjectName(state, LowTempRadUniqueNames, Alphas(1), CurrentModuleObject, cAlphaFields(1), ErrorsFound); ++BaseNum; - RadSysTypes(BaseNum).Name = Alphas(1); - RadSysTypes(BaseNum).SystemType = LowTempRadiantSystem::SystemType::HydronicSystem; + state.dataLowTempRadSys->RadSysTypes(BaseNum).Name = Alphas(1); + state.dataLowTempRadSys->RadSysTypes(BaseNum).SystemType = LowTempRadiantSystem::SystemType::HydronicSystem; - auto &thisRadSys(HydrRadSys(Item)); + auto &thisRadSys(state.dataLowTempRadSys->HydrRadSys(Item)); // General user input data thisRadSys.Name = Alphas(1); thisRadSys.designObjectName = Alphas(2); thisRadSys.DesignObjectPtr = UtilityRoutines::FindItemInList( thisRadSys.designObjectName, VarFlowRadDesignNames); - VarFlowRadDesignData variableFlowDesignDataObject{HydronicRadiantSysDesign(thisRadSys.DesignObjectPtr)}; // Contains the data for variable flow hydronic systems + VarFlowRadDesignData variableFlowDesignDataObject{state.dataLowTempRadSys->HydronicRadiantSysDesign(thisRadSys.DesignObjectPtr)}; // Contains the data for variable flow hydronic systems thisRadSys.SchedName = Alphas(3); if (lAlphaBlanks(3)) { @@ -915,13 +901,13 @@ namespace LowTempRadiantSystem { ); - CflowRadiantSysDesign(Item).FieldNames.allocate(NumNumbers); - CflowRadiantSysDesign(Item).FieldNames = ""; - CflowRadiantSysDesign(Item).FieldNames = cNumericFields; + state.dataLowTempRadSys->CflowRadiantSysDesign(Item).FieldNames.allocate(NumNumbers); + state.dataLowTempRadSys->CflowRadiantSysDesign(Item).FieldNames = ""; + state.dataLowTempRadSys->CflowRadiantSysDesign(Item).FieldNames = cNumericFields; GlobalNames::VerifyUniqueInterObjectName(state, LowTempRadUniqueNames, Alphas(1), CurrentModuleObject, cAlphaFields(1), ErrorsFound); ++BaseNum; - auto &thisRadSysDesign(CflowRadiantSysDesign(Item)); + auto &thisRadSysDesign(state.dataLowTempRadSys->CflowRadiantSysDesign(Item)); // General user input data thisRadSysDesign.designName = Alphas(1); @@ -984,16 +970,16 @@ namespace LowTempRadiantSystem { cNumericFields); GlobalNames::VerifyUniqueInterObjectName(state, LowTempRadUniqueNames, Alphas(1), CurrentModuleObject, cAlphaFields(1), ErrorsFound); ++BaseNum; - RadSysTypes(BaseNum).Name = Alphas(1); - RadSysTypes(BaseNum).SystemType = LowTempRadiantSystem::SystemType::ConstantFlowSystem; + state.dataLowTempRadSys->RadSysTypes(BaseNum).Name = Alphas(1); + state.dataLowTempRadSys->RadSysTypes(BaseNum).SystemType = LowTempRadiantSystem::SystemType::ConstantFlowSystem; // General user input data - auto &thisCFloSys(CFloRadSys(Item)); + auto &thisCFloSys(state.dataLowTempRadSys->CFloRadSys(Item)); thisCFloSys.Name = Alphas(1); thisCFloSys.designObjectName = Alphas(2); thisCFloSys.DesignObjectPtr = UtilityRoutines::FindItemInList( thisCFloSys.designObjectName, CFlowRadDesignNames); - ConstantFlowRadDesignData ConstantFlowRadDesignDataObject{CflowRadiantSysDesign(thisCFloSys.DesignObjectPtr)}; // Contains the data for variable flow hydronic systems + ConstantFlowRadDesignData ConstantFlowRadDesignDataObject{state.dataLowTempRadSys->CflowRadiantSysDesign(thisCFloSys.DesignObjectPtr)}; // Contains the data for variable flow hydronic systems thisCFloSys.SchedName = Alphas(3); if (lAlphaBlanks(3)) { @@ -1197,17 +1183,17 @@ namespace LowTempRadiantSystem { cAlphaFields, cNumericFields); - ElecRadSysNumericFields(Item).FieldNames.allocate(NumNumbers); - ElecRadSysNumericFields(Item).FieldNames = ""; - ElecRadSysNumericFields(Item).FieldNames = cNumericFields; + state.dataLowTempRadSys->ElecRadSysNumericFields(Item).FieldNames.allocate(NumNumbers); + state.dataLowTempRadSys->ElecRadSysNumericFields(Item).FieldNames = ""; + state.dataLowTempRadSys->ElecRadSysNumericFields(Item).FieldNames = cNumericFields; GlobalNames::VerifyUniqueInterObjectName(state, LowTempRadUniqueNames, Alphas(1), CurrentModuleObject, cAlphaFields(1), ErrorsFound); ++BaseNum; - RadSysTypes(BaseNum).Name = Alphas(1); - RadSysTypes(BaseNum).SystemType = LowTempRadiantSystem::SystemType::ElectricSystem; + state.dataLowTempRadSys->RadSysTypes(BaseNum).Name = Alphas(1); + state.dataLowTempRadSys->RadSysTypes(BaseNum).SystemType = LowTempRadiantSystem::SystemType::ElectricSystem; // General user input data - auto &thisElecSys(ElecRadSys(Item)); + auto &thisElecSys(state.dataLowTempRadSys->ElecRadSys(Item)); thisElecSys.Name = Alphas(1); @@ -1263,7 +1249,7 @@ namespace LowTempRadiantSystem { ErrorsFound = true; } if (thisElecSys.SurfacePtr(1) != 0) { - Surface(ElecRadSys(Item).SurfacePtr(1)).IsRadSurfOrVentSlabOrPool = true; + Surface(state.dataLowTempRadSys->ElecRadSys(Item).SurfacePtr(1)).IsRadSurfOrVentSlabOrPool = true; } } @@ -1368,8 +1354,8 @@ namespace LowTempRadiantSystem { AssignedAsRadiantSurface.dimension(TotSurfaces, false); for (Item = 1; Item <= NumOfHydrLowTempRadSys; ++Item) { - for (SurfNum = 1; SurfNum <= HydrRadSys(Item).NumOfSurfaces; ++SurfNum) { - CheckSurfNum = HydrRadSys(Item).SurfacePtr(SurfNum); + for (SurfNum = 1; SurfNum <= state.dataLowTempRadSys->HydrRadSys(Item).NumOfSurfaces; ++SurfNum) { + CheckSurfNum = state.dataLowTempRadSys->HydrRadSys(Item).SurfacePtr(SurfNum); if (CheckSurfNum == 0) continue; if (AssignedAsRadiantSurface(CheckSurfNum)) { ShowSevereError(state, "Surface " + Surface(CheckSurfNum).Name + " is referenced by more than one radiant system--this is not allowed"); @@ -1391,8 +1377,8 @@ namespace LowTempRadiantSystem { } for (Item = 1; Item <= NumOfCFloLowTempRadSys; ++Item) { - for (SurfNum = 1; SurfNum <= CFloRadSys(Item).NumOfSurfaces; ++SurfNum) { - CheckSurfNum = CFloRadSys(Item).SurfacePtr(SurfNum); + for (SurfNum = 1; SurfNum <= state.dataLowTempRadSys->CFloRadSys(Item).NumOfSurfaces; ++SurfNum) { + CheckSurfNum = state.dataLowTempRadSys->CFloRadSys(Item).SurfacePtr(SurfNum); if (CheckSurfNum == 0) continue; if (AssignedAsRadiantSurface(CheckSurfNum)) { ShowSevereError(state, "Surface " + Surface(CheckSurfNum).Name + " is referenced by more than one radiant system--this is not allowed"); @@ -1414,8 +1400,8 @@ namespace LowTempRadiantSystem { } for (Item = 1; Item <= NumOfElecLowTempRadSys; ++Item) { - for (SurfNum = 1; SurfNum <= ElecRadSys(Item).NumOfSurfaces; ++SurfNum) { - CheckSurfNum = ElecRadSys(Item).SurfacePtr(SurfNum); + for (SurfNum = 1; SurfNum <= state.dataLowTempRadSys->ElecRadSys(Item).NumOfSurfaces; ++SurfNum) { + CheckSurfNum = state.dataLowTempRadSys->ElecRadSys(Item).SurfacePtr(SurfNum); if (CheckSurfNum == 0) continue; if (AssignedAsRadiantSurface(CheckSurfNum)) { ShowSevereError(state, "Surface " + Surface(CheckSurfNum).Name + " is referenced by more than one radiant system--this is not allowed"); @@ -1452,7 +1438,7 @@ namespace LowTempRadiantSystem { // ZoneHVAC:LowTemperatureRadiant:VariableFlow (HydrRadSys) for (Item = 1; Item <= NumOfHydrLowTempRadSys; ++Item) { - auto &thisHydrSys(HydrRadSys(Item)); + auto &thisHydrSys(state.dataLowTempRadSys->HydrRadSys(Item)); SetupOutputVariable(state, "Zone Radiant HVAC Heating Rate", OutputProcessor::Unit::W, thisHydrSys.HeatPower, "System", "Average", thisHydrSys.Name); @@ -1543,7 +1529,7 @@ namespace LowTempRadiantSystem { // ZoneHVAC:LowTemperatureRadiant:ConstantFlow (CFloRadSys) for (Item = 1; Item <= NumOfCFloLowTempRadSys; ++Item) { - auto &thisCFloSys(CFloRadSys(Item)); + auto &thisCFloSys(state.dataLowTempRadSys->CFloRadSys(Item)); SetupOutputVariable(state, "Zone Radiant HVAC Heating Rate", OutputProcessor::Unit::W, thisCFloSys.HeatPower, "System", "Average", thisCFloSys.Name); @@ -1696,7 +1682,7 @@ namespace LowTempRadiantSystem { // Set up the output variables for low temperature radiant systems // ZoneHVAC:LowTemperatureRadiant:Electric (ElecRadSys) - auto &thisElecSys(ElecRadSys(Item)); + auto &thisElecSys(state.dataLowTempRadSys->ElecRadSys(Item)); SetupOutputVariable(state, "Zone Radiant HVAC Electricity Rate", OutputProcessor::Unit::W, thisElecSys.ElecPower, "System", "Average", thisElecSys.Name); @@ -1919,27 +1905,27 @@ namespace LowTempRadiantSystem { // Initialize total areas for all radiant systems for (RadNum = 1; RadNum <= NumOfHydrLowTempRadSys; ++RadNum) { - HydrRadSys(RadNum).TotalSurfaceArea = 0.0; - for (SurfNum = 1; SurfNum <= HydrRadSys(RadNum).NumOfSurfaces; ++SurfNum) { - HydrRadSys(RadNum).TotalSurfaceArea += Surface(HydrRadSys(RadNum).SurfacePtr(SurfNum)).Area; + state.dataLowTempRadSys->HydrRadSys(RadNum).TotalSurfaceArea = 0.0; + for (SurfNum = 1; SurfNum <= state.dataLowTempRadSys->HydrRadSys(RadNum).NumOfSurfaces; ++SurfNum) { + state.dataLowTempRadSys->HydrRadSys(RadNum).TotalSurfaceArea += Surface(state.dataLowTempRadSys->HydrRadSys(RadNum).SurfacePtr(SurfNum)).Area; } } for (RadNum = 1; RadNum <= NumOfCFloLowTempRadSys; ++RadNum) { - CFloRadSys(RadNum).TotalSurfaceArea = 0.0; - for (SurfNum = 1; SurfNum <= CFloRadSys(RadNum).NumOfSurfaces; ++SurfNum) { - CFloRadSys(RadNum).TotalSurfaceArea += Surface(CFloRadSys(RadNum).SurfacePtr(SurfNum)).Area; + state.dataLowTempRadSys->CFloRadSys(RadNum).TotalSurfaceArea = 0.0; + for (SurfNum = 1; SurfNum <= state.dataLowTempRadSys->CFloRadSys(RadNum).NumOfSurfaces; ++SurfNum) { + state.dataLowTempRadSys->CFloRadSys(RadNum).TotalSurfaceArea += Surface(state.dataLowTempRadSys->CFloRadSys(RadNum).SurfacePtr(SurfNum)).Area; } } for (RadNum = 1; RadNum <= NumOfElecLowTempRadSys; ++RadNum) { - ElecRadSys(RadNum).TotalSurfaceArea = 0.0; - for (SurfNum = 1; SurfNum <= ElecRadSys(RadNum).NumOfSurfaces; ++SurfNum) { - ElecRadSys(RadNum).TotalSurfaceArea += Surface(ElecRadSys(RadNum).SurfacePtr(SurfNum)).Area; + state.dataLowTempRadSys->ElecRadSys(RadNum).TotalSurfaceArea = 0.0; + for (SurfNum = 1; SurfNum <= state.dataLowTempRadSys->ElecRadSys(RadNum).NumOfSurfaces; ++SurfNum) { + state.dataLowTempRadSys->ElecRadSys(RadNum).TotalSurfaceArea += Surface(state.dataLowTempRadSys->ElecRadSys(RadNum).SurfacePtr(SurfNum)).Area; } } Real64 MotorEffic(0.0); if (SystemType == LowTempRadiantSystem::SystemType::ConstantFlowSystem) { - ConstantFlowRadDesignData constantFlowDesignDataObject{CflowRadiantSysDesign(CFloRadSys(RadSysNum).DesignObjectPtr)}; // Contains the data for constant flow hydronic systems + ConstantFlowRadDesignData constantFlowDesignDataObject{state.dataLowTempRadSys->CflowRadiantSysDesign(state.dataLowTempRadSys->CFloRadSys(RadSysNum).DesignObjectPtr)}; // Contains the data for constant flow hydronic systems MotorEffic = constantFlowDesignDataObject.MotorEffic; } @@ -1947,27 +1933,27 @@ namespace LowTempRadiantSystem { for (RadNum = 1; RadNum <= NumOfCFloLowTempRadSys; ++RadNum) { // Calculate the efficiency for each pump: The calculation // is based on the PMPSIM code in the ASHRAE Secondary Toolkit - Real64 PEC = CFloRadSys(RadNum).PumpEffic; - if ((CFloRadSys(RadNum).NomPowerUse > ZeroTol) && (MotorEffic > ZeroTol) && - (CFloRadSys(RadNum).WaterVolFlowMax != AutoSize)) { - TotalEffic = CFloRadSys(RadNum).WaterVolFlowMax * CFloRadSys(RadNum).NomPumpHead / CFloRadSys(RadNum).NomPowerUse; - CFloRadSys(RadNum).PumpEffic = TotalEffic / MotorEffic; - PEC = CFloRadSys(RadNum).PumpEffic; + Real64 PEC = state.dataLowTempRadSys->CFloRadSys(RadNum).PumpEffic; + if ((state.dataLowTempRadSys->CFloRadSys(RadNum).NomPowerUse > ZeroTol) && (MotorEffic > ZeroTol) && + (state.dataLowTempRadSys->CFloRadSys(RadNum).WaterVolFlowMax != AutoSize)) { + TotalEffic = state.dataLowTempRadSys->CFloRadSys(RadNum).WaterVolFlowMax * state.dataLowTempRadSys->CFloRadSys(RadNum).NomPumpHead / state.dataLowTempRadSys->CFloRadSys(RadNum).NomPowerUse; + state.dataLowTempRadSys->CFloRadSys(RadNum).PumpEffic = TotalEffic / MotorEffic; + PEC = state.dataLowTempRadSys->CFloRadSys(RadNum).PumpEffic; static constexpr auto fmt = "Check input. Calc Pump Efficiency={:.5R}% {}, for pump in radiant system {}"; - Real64 pumpEfficiency = CFloRadSys(RadNum).PumpEffic * 100.0; - PEC = CFloRadSys(RadNum).PumpEffic; - if (CFloRadSys(RadNum).PumpEffic < 0.50) { - ShowWarningError(state, format(fmt, pumpEfficiency, "which is less than 50%", CFloRadSys(RadNum).Name)); - } else if ((CFloRadSys(RadNum).PumpEffic > 0.95) && (CFloRadSys(RadNum).PumpEffic <= 1.0)) { - ShowWarningError(state, format(fmt, pumpEfficiency, "is approaching 100%", CFloRadSys(RadNum).Name)); - } else if (CFloRadSys(RadNum).PumpEffic > 1.0) { - ShowSevereError(state, format(fmt, pumpEfficiency, "which is bigger than 100%", CFloRadSys(RadNum).Name)); + Real64 pumpEfficiency = state.dataLowTempRadSys->CFloRadSys(RadNum).PumpEffic * 100.0; + PEC = state.dataLowTempRadSys->CFloRadSys(RadNum).PumpEffic; + if (state.dataLowTempRadSys->CFloRadSys(RadNum).PumpEffic < 0.50) { + ShowWarningError(state, format(fmt, pumpEfficiency, "which is less than 50%", state.dataLowTempRadSys->CFloRadSys(RadNum).Name)); + } else if ((state.dataLowTempRadSys->CFloRadSys(RadNum).PumpEffic > 0.95) && (state.dataLowTempRadSys->CFloRadSys(RadNum).PumpEffic <= 1.0)) { + ShowWarningError(state, format(fmt, pumpEfficiency, "is approaching 100%", state.dataLowTempRadSys->CFloRadSys(RadNum).Name)); + } else if (state.dataLowTempRadSys->CFloRadSys(RadNum).PumpEffic > 1.0) { + ShowSevereError(state, format(fmt, pumpEfficiency, "which is bigger than 100%", state.dataLowTempRadSys->CFloRadSys(RadNum).Name)); InitErrorsFound = true; } } else { - if (CFloRadSys(RadNum).WaterVolFlowMax != + if (state.dataLowTempRadSys->CFloRadSys(RadNum).WaterVolFlowMax != AutoSize) { // Autosize is not an error but it does not need to check pump efficiency here - ShowSevereError(state, "Check input. Pump nominal power and motor efficiency cannot be 0, for pump=" + CFloRadSys(RadNum).Name); + ShowSevereError(state, "Check input. Pump nominal power and motor efficiency cannot be 0, for pump=" + state.dataLowTempRadSys->CFloRadSys(RadNum).Name); InitErrorsFound = true; } } @@ -1979,37 +1965,37 @@ namespace LowTempRadiantSystem { if (SystemType == LowTempRadiantSystem::SystemType::HydronicSystem) { if (MyPlantScanFlagHydr(RadSysNum) && allocated(state.dataPlnt->PlantLoop)) { errFlag = false; - if (HydrRadSys(RadSysNum).HotWaterInNode > 0) { + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).HotWaterInNode > 0) { ScanPlantLoopsForObject(state, - HydrRadSys(RadSysNum).Name, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name, TypeOf_LowTempRadiant_VarFlow, - HydrRadSys(RadSysNum).HWLoopNum, - HydrRadSys(RadSysNum).HWLoopSide, - HydrRadSys(RadSysNum).HWBranchNum, - HydrRadSys(RadSysNum).HWCompNum, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWLoopNum, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWLoopSide, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWBranchNum, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWCompNum, errFlag, _, _, _, - HydrRadSys(RadSysNum).HotWaterInNode, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HotWaterInNode, _); if (errFlag) { ShowFatalError(state, "InitLowTempRadiantSystem: Program terminated due to previous condition(s)."); } } - if (HydrRadSys(RadSysNum).ColdWaterInNode > 0) { + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).ColdWaterInNode > 0) { ScanPlantLoopsForObject(state, - HydrRadSys(RadSysNum).Name, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name, TypeOf_LowTempRadiant_VarFlow, - HydrRadSys(RadSysNum).CWLoopNum, - HydrRadSys(RadSysNum).CWLoopSide, - HydrRadSys(RadSysNum).CWBranchNum, - HydrRadSys(RadSysNum).CWCompNum, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWLoopNum, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWLoopSide, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWBranchNum, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWCompNum, errFlag, _, _, _, - HydrRadSys(RadSysNum).ColdWaterInNode, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).ColdWaterInNode, _); if (errFlag) { ShowFatalError(state, "InitLowTempRadiantSystem: Program terminated due to previous condition(s)."); @@ -2024,37 +2010,37 @@ namespace LowTempRadiantSystem { if (SystemType == LowTempRadiantSystem::SystemType::ConstantFlowSystem) { if (MyPlantScanFlagCFlo(RadSysNum) && allocated(state.dataPlnt->PlantLoop)) { errFlag = false; - if (CFloRadSys(RadSysNum).HotWaterInNode > 0) { + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterInNode > 0) { ScanPlantLoopsForObject(state, - CFloRadSys(RadSysNum).Name, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name, TypeOf_LowTempRadiant_ConstFlow, - CFloRadSys(RadSysNum).HWLoopNum, - CFloRadSys(RadSysNum).HWLoopSide, - CFloRadSys(RadSysNum).HWBranchNum, - CFloRadSys(RadSysNum).HWCompNum, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWLoopNum, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWLoopSide, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWBranchNum, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWCompNum, errFlag, _, _, _, - CFloRadSys(RadSysNum).HotWaterInNode, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterInNode, _); if (errFlag) { ShowFatalError(state, "InitLowTempRadiantSystem: Program terminated due to previous condition(s)."); } } - if (CFloRadSys(RadSysNum).ColdWaterInNode > 0) { + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdWaterInNode > 0) { ScanPlantLoopsForObject(state, - CFloRadSys(RadSysNum).Name, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name, TypeOf_LowTempRadiant_ConstFlow, - CFloRadSys(RadSysNum).CWLoopNum, - CFloRadSys(RadSysNum).CWLoopSide, - CFloRadSys(RadSysNum).CWBranchNum, - CFloRadSys(RadSysNum).CWCompNum, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWLoopNum, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWLoopSide, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWBranchNum, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWCompNum, errFlag, _, _, _, - CFloRadSys(RadSysNum).ColdWaterInNode, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdWaterInNode, _); if (errFlag) { ShowFatalError(state, "InitLowTempRadiantSystem: Program terminated due to previous condition(s)."); @@ -2071,19 +2057,19 @@ namespace LowTempRadiantSystem { ZoneEquipmentListChecked = true; for (Loop = 1; Loop <= TotalNumOfRadSystems; ++Loop) { { - auto const SELECT_CASE_var(RadSysTypes(Loop).SystemType); + auto const SELECT_CASE_var(state.dataLowTempRadSys->RadSysTypes(Loop).SystemType); if (SELECT_CASE_var == LowTempRadiantSystem::SystemType::HydronicSystem) { - if (CheckZoneEquipmentList(state, "ZoneHVAC:LowTemperatureRadiant:VariableFlow", RadSysTypes(Loop).Name)) continue; - ShowSevereError(state, "InitLowTempRadiantSystem: Unit=[ZoneHVAC:LowTemperatureRadiant:VariableFlow," + RadSysTypes(Loop).Name + + if (CheckZoneEquipmentList(state, "ZoneHVAC:LowTemperatureRadiant:VariableFlow", state.dataLowTempRadSys->RadSysTypes(Loop).Name)) continue; + ShowSevereError(state, "InitLowTempRadiantSystem: Unit=[ZoneHVAC:LowTemperatureRadiant:VariableFlow," + state.dataLowTempRadSys->RadSysTypes(Loop).Name + "] is not on any ZoneHVAC:EquipmentList. It will not be simulated."); } else if (SELECT_CASE_var == LowTempRadiantSystem::SystemType::ConstantFlowSystem) { - if (CheckZoneEquipmentList(state, "ZoneHVAC:LowTemperatureRadiant:ConstantFlow", RadSysTypes(Loop).Name)) continue; - ShowSevereError(state, "InitLowTempRadiantSystem: Unit=[ZoneHVAC:LowTemperatureRadiant:ConstantFlow," + RadSysTypes(Loop).Name + + if (CheckZoneEquipmentList(state, "ZoneHVAC:LowTemperatureRadiant:ConstantFlow", state.dataLowTempRadSys->RadSysTypes(Loop).Name)) continue; + ShowSevereError(state, "InitLowTempRadiantSystem: Unit=[ZoneHVAC:LowTemperatureRadiant:ConstantFlow," + state.dataLowTempRadSys->RadSysTypes(Loop).Name + "] is not on any ZoneHVAC:EquipmentList. It will not be simulated."); } else if (SELECT_CASE_var == LowTempRadiantSystem::SystemType::ElectricSystem) { - if (CheckZoneEquipmentList(state, "ZoneHVAC:LowTemperatureRadiant:Electric", RadSysTypes(Loop).Name)) continue; - ShowSevereError(state, "InitLowTempRadiantSystem: Unit=[ZoneHVAC:LowTemperatureRadiant:Electric," + RadSysTypes(Loop).Name + + if (CheckZoneEquipmentList(state, "ZoneHVAC:LowTemperatureRadiant:Electric", state.dataLowTempRadSys->RadSysTypes(Loop).Name)) continue; + ShowSevereError(state, "InitLowTempRadiantSystem: Unit=[ZoneHVAC:LowTemperatureRadiant:Electric," + state.dataLowTempRadSys->RadSysTypes(Loop).Name + "] is not on any ZoneHVAC:EquipmentList. It will not be simulated."); } else { // Illegal system, but checked earlier } @@ -2100,55 +2086,55 @@ namespace LowTempRadiantSystem { int ColdSetptSchedPtr(0), HotSetptSchedPtr(0); if (SystemType == LowTempRadiantSystem::SystemType::HydronicSystem) { - VarFlowRadDesignData variableFlowDesignDataObject{HydronicRadiantSysDesign(HydrRadSys(RadSysNum).DesignObjectPtr)}; // Contains the data for variable flow hydronic systems; + VarFlowRadDesignData variableFlowDesignDataObject{state.dataLowTempRadSys->HydronicRadiantSysDesign(state.dataLowTempRadSys->HydrRadSys(RadSysNum).DesignObjectPtr)}; // Contains the data for variable flow hydronic systems; ColdSetptSchedPtr = variableFlowDesignDataObject.ColdSetptSchedPtr; HotSetptSchedPtr = variableFlowDesignDataObject.HotSetptSchedPtr; } // Can this system actually do cooling? - if ((HydrRadSys(RadSysNum).WaterVolFlowMaxCool > 0.0) && (HydrRadSys(RadSysNum).ColdWaterInNode > 0) && - (HydrRadSys(RadSysNum).ColdWaterOutNode > 0) && ColdSetptSchedPtr > 0) { - HydrRadSys(RadSysNum).CoolingSystem = true; + if ((state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxCool > 0.0) && (state.dataLowTempRadSys->HydrRadSys(RadSysNum).ColdWaterInNode > 0) && + (state.dataLowTempRadSys->HydrRadSys(RadSysNum).ColdWaterOutNode > 0) && ColdSetptSchedPtr > 0) { + state.dataLowTempRadSys->HydrRadSys(RadSysNum).CoolingSystem = true; } // Can this system actually do heating? - if ((HydrRadSys(RadSysNum).WaterVolFlowMaxHeat > 0.0) && (HydrRadSys(RadSysNum).HotWaterInNode > 0) && - (HydrRadSys(RadSysNum).HotWaterOutNode > 0) && (HotSetptSchedPtr > 0)) { - HydrRadSys(RadSysNum).HeatingSystem = true; + if ((state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxHeat > 0.0) && (state.dataLowTempRadSys->HydrRadSys(RadSysNum).HotWaterInNode > 0) && + (state.dataLowTempRadSys->HydrRadSys(RadSysNum).HotWaterOutNode > 0) && (HotSetptSchedPtr > 0)) { + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HeatingSystem = true; } // set design mass flow rates - if (HydrRadSys(RadSysNum).HotWaterInNode > 0) { + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).HotWaterInNode > 0) { rho = GetDensityGlycol(state, - state.dataPlnt->PlantLoop(HydrRadSys(RadSysNum).HWLoopNum).FluidName, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWLoopNum).FluidName, DataGlobalConstants::HWInitConvTemp, - state.dataPlnt->PlantLoop(HydrRadSys(RadSysNum).HWLoopNum).FluidIndex, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWLoopNum).FluidIndex, RoutineName); - HydrRadSys(RadSysNum).WaterFlowMaxHeat = rho * HydrRadSys(RadSysNum).WaterVolFlowMaxHeat; + state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterFlowMaxHeat = rho * state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxHeat; InitComponentNodes(0.0, - HydrRadSys(RadSysNum).WaterFlowMaxHeat, - HydrRadSys(RadSysNum).HotWaterInNode, - HydrRadSys(RadSysNum).HotWaterOutNode, - HydrRadSys(RadSysNum).HWLoopNum, - HydrRadSys(RadSysNum).HWLoopSide, - HydrRadSys(RadSysNum).HWBranchNum, - HydrRadSys(RadSysNum).HWCompNum); + state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterFlowMaxHeat, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HotWaterInNode, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HotWaterOutNode, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWLoopNum, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWLoopSide, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWBranchNum, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWCompNum); } - if (HydrRadSys(RadSysNum).ColdWaterInNode > 0) { + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).ColdWaterInNode > 0) { rho = GetDensityGlycol(state, - state.dataPlnt->PlantLoop(HydrRadSys(RadSysNum).CWLoopNum).FluidName, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWLoopNum).FluidName, DataGlobalConstants::CWInitConvTemp, - state.dataPlnt->PlantLoop(HydrRadSys(RadSysNum).CWLoopNum).FluidIndex, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWLoopNum).FluidIndex, RoutineName); - HydrRadSys(RadSysNum).WaterFlowMaxCool = rho * HydrRadSys(RadSysNum).WaterVolFlowMaxCool; + state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterFlowMaxCool = rho * state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxCool; InitComponentNodes(0.0, - HydrRadSys(RadSysNum).WaterFlowMaxCool, - HydrRadSys(RadSysNum).ColdWaterInNode, - HydrRadSys(RadSysNum).ColdWaterOutNode, - HydrRadSys(RadSysNum).CWLoopNum, - HydrRadSys(RadSysNum).CWLoopSide, - HydrRadSys(RadSysNum).CWBranchNum, - HydrRadSys(RadSysNum).CWCompNum); + state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterFlowMaxCool, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).ColdWaterInNode, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).ColdWaterOutNode, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWLoopNum, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWLoopSide, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWBranchNum, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWCompNum); } } } @@ -2159,37 +2145,37 @@ namespace LowTempRadiantSystem { SizeLowTempRadiantSystem(state, RadSysNum, SystemType); // set design mass flow rates - if (CFloRadSys(RadSysNum).HotWaterInNode > 0) { + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterInNode > 0) { rho = GetDensityGlycol(state, - state.dataPlnt->PlantLoop(CFloRadSys(RadSysNum).HWLoopNum).FluidName, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWLoopNum).FluidName, DataGlobalConstants::HWInitConvTemp, - state.dataPlnt->PlantLoop(CFloRadSys(RadSysNum).HWLoopNum).FluidIndex, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWLoopNum).FluidIndex, RoutineName); - CFloRadSys(RadSysNum).HotDesignWaterMassFlowRate = rho * CFloRadSys(RadSysNum).WaterVolFlowMax; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotDesignWaterMassFlowRate = rho * state.dataLowTempRadSys->CFloRadSys(RadSysNum).WaterVolFlowMax; InitComponentNodes(0.0, - CFloRadSys(RadSysNum).HotDesignWaterMassFlowRate, - CFloRadSys(RadSysNum).HotWaterInNode, - CFloRadSys(RadSysNum).HotWaterOutNode, - CFloRadSys(RadSysNum).HWLoopNum, - CFloRadSys(RadSysNum).HWLoopSide, - CFloRadSys(RadSysNum).HWBranchNum, - CFloRadSys(RadSysNum).HWCompNum); + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotDesignWaterMassFlowRate, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterInNode, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterOutNode, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWLoopNum, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWLoopSide, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWBranchNum, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWCompNum); } - if (CFloRadSys(RadSysNum).ColdWaterInNode > 0) { + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdWaterInNode > 0) { rho = GetDensityGlycol(state, - state.dataPlnt->PlantLoop(CFloRadSys(RadSysNum).CWLoopNum).FluidName, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWLoopNum).FluidName, DataGlobalConstants::CWInitConvTemp, - state.dataPlnt->PlantLoop(CFloRadSys(RadSysNum).CWLoopNum).FluidIndex, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWLoopNum).FluidIndex, RoutineName); - CFloRadSys(RadSysNum).ColdDesignWaterMassFlowRate = rho * CFloRadSys(RadSysNum).WaterVolFlowMax; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdDesignWaterMassFlowRate = rho * state.dataLowTempRadSys->CFloRadSys(RadSysNum).WaterVolFlowMax; InitComponentNodes(0.0, - CFloRadSys(RadSysNum).ColdDesignWaterMassFlowRate, - CFloRadSys(RadSysNum).ColdWaterInNode, - CFloRadSys(RadSysNum).ColdWaterOutNode, - CFloRadSys(RadSysNum).CWLoopNum, - CFloRadSys(RadSysNum).CWLoopSide, - CFloRadSys(RadSysNum).CWBranchNum, - CFloRadSys(RadSysNum).CWCompNum); + state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdDesignWaterMassFlowRate, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdWaterInNode, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdWaterOutNode, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWLoopNum, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWLoopSide, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWBranchNum, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWCompNum); } MySizeFlagCFlo(RadSysNum) = false; } @@ -2219,49 +2205,49 @@ namespace LowTempRadiantSystem { (!state.dataGlobal->WarmupFlag && state.dataGlobal->BeginDayFlag && FirstHVACIteration && state.dataGlobal->DayOfSim == 1)) { // Reset values related to changeover if (SystemType == LowTempRadiantSystem::SystemType::HydronicSystem) { - HydrRadSys(RadSysNum).lastOperatingMode = NotOperating; - HydrRadSys(RadSysNum).lastDayOfSim = 0; - HydrRadSys(RadSysNum).lastHourOfDay = 0; - HydrRadSys(RadSysNum).lastTimeStep = 0; + state.dataLowTempRadSys->HydrRadSys(RadSysNum).lastOperatingMode = NotOperating; + state.dataLowTempRadSys->HydrRadSys(RadSysNum).lastDayOfSim = 0; + state.dataLowTempRadSys->HydrRadSys(RadSysNum).lastHourOfDay = 0; + state.dataLowTempRadSys->HydrRadSys(RadSysNum).lastTimeStep = 0; } if (SystemType == LowTempRadiantSystem::SystemType::ConstantFlowSystem) { - CFloRadSys(RadSysNum).lastOperatingMode = NotOperating; - CFloRadSys(RadSysNum).lastDayOfSim = 0; - CFloRadSys(RadSysNum).lastHourOfDay = 0; - CFloRadSys(RadSysNum).lastTimeStep = 0; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).lastOperatingMode = NotOperating; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).lastDayOfSim = 0; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).lastHourOfDay = 0; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).lastTimeStep = 0; } } if (SystemType == LowTempRadiantSystem::SystemType::HydronicSystem) { if (state.dataGlobal->BeginEnvrnFlag && MyEnvrnFlagHydr(RadSysNum)) { - HydrRadSys(RadSysNum).HeatPower = 0.0; - HydrRadSys(RadSysNum).HeatEnergy = 0.0; - HydrRadSys(RadSysNum).CoolPower = 0.0; - HydrRadSys(RadSysNum).CoolEnergy = 0.0; - HydrRadSys(RadSysNum).WaterInletTemp = 0.0; - HydrRadSys(RadSysNum).WaterOutletTemp = 0.0; - HydrRadSys(RadSysNum).WaterMassFlowRate = 0.0; + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HeatPower = 0.0; + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HeatEnergy = 0.0; + state.dataLowTempRadSys->HydrRadSys(RadSysNum).CoolPower = 0.0; + state.dataLowTempRadSys->HydrRadSys(RadSysNum).CoolEnergy = 0.0; + state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterInletTemp = 0.0; + state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterOutletTemp = 0.0; + state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterMassFlowRate = 0.0; if (!MyPlantScanFlagHydr(RadSysNum)) { - if (HydrRadSys(RadSysNum).HotWaterInNode > 0) { + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).HotWaterInNode > 0) { InitComponentNodes(0.0, - HydrRadSys(RadSysNum).WaterFlowMaxHeat, - HydrRadSys(RadSysNum).HotWaterInNode, - HydrRadSys(RadSysNum).HotWaterOutNode, - HydrRadSys(RadSysNum).HWLoopNum, - HydrRadSys(RadSysNum).HWLoopSide, - HydrRadSys(RadSysNum).HWBranchNum, - HydrRadSys(RadSysNum).HWCompNum); + state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterFlowMaxHeat, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HotWaterInNode, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HotWaterOutNode, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWLoopNum, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWLoopSide, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWBranchNum, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWCompNum); } - if (HydrRadSys(RadSysNum).ColdWaterInNode > 0) { + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).ColdWaterInNode > 0) { InitComponentNodes(0.0, - HydrRadSys(RadSysNum).WaterFlowMaxCool, - HydrRadSys(RadSysNum).ColdWaterInNode, - HydrRadSys(RadSysNum).ColdWaterOutNode, - HydrRadSys(RadSysNum).CWLoopNum, - HydrRadSys(RadSysNum).CWLoopSide, - HydrRadSys(RadSysNum).CWBranchNum, - HydrRadSys(RadSysNum).CWCompNum); + state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterFlowMaxCool, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).ColdWaterInNode, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).ColdWaterOutNode, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWLoopNum, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWLoopSide, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWBranchNum, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWCompNum); } } MyEnvrnFlagHydr(RadSysNum) = false; @@ -2271,51 +2257,51 @@ namespace LowTempRadiantSystem { if (SystemType == LowTempRadiantSystem::SystemType::ConstantFlowSystem) { if (state.dataGlobal->BeginEnvrnFlag && MyEnvrnFlagCFlo(RadSysNum)) { - CFloRadSys(RadSysNum).WaterInletTemp = 0.0; - CFloRadSys(RadSysNum).WaterOutletTemp = 0.0; - CFloRadSys(RadSysNum).PumpInletTemp = 0.0; - CFloRadSys(RadSysNum).WaterMassFlowRate = 0.0; - CFloRadSys(RadSysNum).WaterInjectionRate = 0.0; - CFloRadSys(RadSysNum).WaterRecircRate = 0.0; - CFloRadSys(RadSysNum).HeatPower = 0.0; - CFloRadSys(RadSysNum).HeatEnergy = 0.0; - CFloRadSys(RadSysNum).CoolPower = 0.0; - CFloRadSys(RadSysNum).CoolEnergy = 0.0; - CFloRadSys(RadSysNum).PumpPower = 0.0; - CFloRadSys(RadSysNum).PumpMassFlowRate = 0.0; - CFloRadSys(RadSysNum).PumpHeattoFluid = 0.0; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).WaterInletTemp = 0.0; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).WaterOutletTemp = 0.0; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).PumpInletTemp = 0.0; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).WaterMassFlowRate = 0.0; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).WaterInjectionRate = 0.0; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).WaterRecircRate = 0.0; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HeatPower = 0.0; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HeatEnergy = 0.0; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).CoolPower = 0.0; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).CoolEnergy = 0.0; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).PumpPower = 0.0; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).PumpMassFlowRate = 0.0; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).PumpHeattoFluid = 0.0; if (!MyPlantScanFlagCFlo(RadSysNum)) { - if (CFloRadSys(RadSysNum).HotWaterInNode > 0) { + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterInNode > 0) { InitComponentNodes(0.0, - CFloRadSys(RadSysNum).HotDesignWaterMassFlowRate, - CFloRadSys(RadSysNum).HotWaterInNode, - CFloRadSys(RadSysNum).HotWaterOutNode, - CFloRadSys(RadSysNum).HWLoopNum, - CFloRadSys(RadSysNum).HWLoopSide, - CFloRadSys(RadSysNum).HWBranchNum, - CFloRadSys(RadSysNum).HWCompNum); + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotDesignWaterMassFlowRate, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterInNode, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterOutNode, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWLoopNum, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWLoopSide, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWBranchNum, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWCompNum); } - if (CFloRadSys(RadSysNum).ColdWaterInNode > 0) { + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdWaterInNode > 0) { InitComponentNodes(0.0, - CFloRadSys(RadSysNum).ColdDesignWaterMassFlowRate, - CFloRadSys(RadSysNum).ColdWaterInNode, - CFloRadSys(RadSysNum).ColdWaterOutNode, - CFloRadSys(RadSysNum).CWLoopNum, - CFloRadSys(RadSysNum).CWLoopSide, - CFloRadSys(RadSysNum).CWBranchNum, - CFloRadSys(RadSysNum).CWCompNum); + state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdDesignWaterMassFlowRate, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdWaterInNode, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdWaterOutNode, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWLoopNum, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWLoopSide, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWBranchNum, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWCompNum); } } MyEnvrnFlagCFlo(RadSysNum) = false; } if (anyRadiantSystemUsingRunningMeanAverage) { - if (state.dataGlobal->BeginDayFlag && CFloRadSys(RadSysNum).setRunningMeanValuesAtBeginningOfDay) { - CFloRadSys(RadSysNum).calculateRunningMeanAverageTemperature(state, RadSysNum); - CFloRadSys(RadSysNum).setRunningMeanValuesAtBeginningOfDay = false; // only set these once per system - } else if (!state.dataGlobal->BeginDayFlag && !CFloRadSys(RadSysNum).setRunningMeanValuesAtBeginningOfDay) { - CFloRadSys(RadSysNum).setRunningMeanValuesAtBeginningOfDay = + if (state.dataGlobal->BeginDayFlag && state.dataLowTempRadSys->CFloRadSys(RadSysNum).setRunningMeanValuesAtBeginningOfDay) { + state.dataLowTempRadSys->CFloRadSys(RadSysNum).calculateRunningMeanAverageTemperature(state, RadSysNum); + state.dataLowTempRadSys->CFloRadSys(RadSysNum).setRunningMeanValuesAtBeginningOfDay = false; // only set these once per system + } else if (!state.dataGlobal->BeginDayFlag && !state.dataLowTempRadSys->CFloRadSys(RadSysNum).setRunningMeanValuesAtBeginningOfDay) { + state.dataLowTempRadSys->CFloRadSys(RadSysNum).setRunningMeanValuesAtBeginningOfDay = true; // reset so that the next time state.dataGlobal->BeginDayFlag is true this can get set } } @@ -2325,10 +2311,10 @@ namespace LowTempRadiantSystem { if (SystemType == LowTempRadiantSystem::SystemType::ElectricSystem) { if (state.dataGlobal->BeginEnvrnFlag && MyEnvrnFlagElec(RadSysNum)) { - ElecRadSys(RadSysNum).HeatPower = 0.0; - ElecRadSys(RadSysNum).HeatEnergy = 0.0; - ElecRadSys(RadSysNum).ElecPower = 0.0; - ElecRadSys(RadSysNum).ElecEnergy = 0.0; + state.dataLowTempRadSys->ElecRadSys(RadSysNum).HeatPower = 0.0; + state.dataLowTempRadSys->ElecRadSys(RadSysNum).HeatEnergy = 0.0; + state.dataLowTempRadSys->ElecRadSys(RadSysNum).ElecPower = 0.0; + state.dataLowTempRadSys->ElecRadSys(RadSysNum).ElecEnergy = 0.0; } MyEnvrnFlagElec(RadSysNum) = false; } @@ -2337,19 +2323,19 @@ namespace LowTempRadiantSystem { if (SystemType == LowTempRadiantSystem::SystemType::ConstantFlowSystem) { // Can this system actually do heating? - if ((CFloRadSys(RadSysNum).WaterVolFlowMax > 0.0) && (CFloRadSys(RadSysNum).HotWaterInNode > 0) && - (CFloRadSys(RadSysNum).HotWaterOutNode > 0) && (CFloRadSys(RadSysNum).HotWaterHiTempSchedPtr > 0) && - (CFloRadSys(RadSysNum).HotWaterLoTempSchedPtr > 0) && (CFloRadSys(RadSysNum).HotCtrlHiTempSchedPtr > 0) && - (CFloRadSys(RadSysNum).HotCtrlLoTempSchedPtr > 0)) { - CFloRadSys(RadSysNum).HeatingSystem = true; + if ((state.dataLowTempRadSys->CFloRadSys(RadSysNum).WaterVolFlowMax > 0.0) && (state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterInNode > 0) && + (state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterOutNode > 0) && (state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterHiTempSchedPtr > 0) && + (state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterLoTempSchedPtr > 0) && (state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotCtrlHiTempSchedPtr > 0) && + (state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotCtrlLoTempSchedPtr > 0)) { + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HeatingSystem = true; } // Can this system actually do cooling? - if ((CFloRadSys(RadSysNum).WaterVolFlowMax > 0.0) && (CFloRadSys(RadSysNum).ColdWaterInNode > 0) && - (CFloRadSys(RadSysNum).ColdWaterOutNode > 0) && (CFloRadSys(RadSysNum).ColdWaterHiTempSchedPtr > 0) && - (CFloRadSys(RadSysNum).ColdWaterLoTempSchedPtr > 0) && (CFloRadSys(RadSysNum).ColdCtrlHiTempSchedPtr > 0) && - (CFloRadSys(RadSysNum).ColdCtrlLoTempSchedPtr > 0)) { - CFloRadSys(RadSysNum).CoolingSystem = true; + if ((state.dataLowTempRadSys->CFloRadSys(RadSysNum).WaterVolFlowMax > 0.0) && (state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdWaterInNode > 0) && + (state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdWaterOutNode > 0) && (state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdWaterHiTempSchedPtr > 0) && + (state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdWaterLoTempSchedPtr > 0) && (state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdCtrlHiTempSchedPtr > 0) && + (state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdCtrlLoTempSchedPtr > 0)) { + state.dataLowTempRadSys->CFloRadSys(RadSysNum).CoolingSystem = true; } } @@ -2360,10 +2346,10 @@ namespace LowTempRadiantSystem { if (SELECT_CASE_var == LowTempRadiantSystem::SystemType::HydronicSystem) { - ZoneNum = HydrRadSys(RadSysNum).ZonePtr; + ZoneNum = state.dataLowTempRadSys->HydrRadSys(RadSysNum).ZonePtr; ZeroSourceSumHATsurf(ZoneNum) = SumHATsurf(ZoneNum); // Set this to figure what part of the load the radiant system meets - for (RadSurfNum = 1; RadSurfNum <= HydrRadSys(RadSysNum).NumOfSurfaces; ++RadSurfNum) { - SurfNum = HydrRadSys(RadSysNum).SurfacePtr(RadSurfNum); + for (RadSurfNum = 1; RadSurfNum <= state.dataLowTempRadSys->HydrRadSys(RadSysNum).NumOfSurfaces; ++RadSurfNum) { + SurfNum = state.dataLowTempRadSys->HydrRadSys(RadSysNum).SurfacePtr(RadSurfNum); QRadSysSrcAvg(SurfNum) = 0.0; // Initialize this variable to zero (radiant system defaults to off) LastQRadSysSrc(SurfNum) = 0.0; // At the start of a time step, reset to zero so average calculation can begin again LastSysTimeElapsed(SurfNum) = 0.0; // At the start of a time step, reset to zero so average calculation can begin again @@ -2372,10 +2358,10 @@ namespace LowTempRadiantSystem { } else if (SELECT_CASE_var == LowTempRadiantSystem::SystemType::ConstantFlowSystem) { - ZoneNum = CFloRadSys(RadSysNum).ZonePtr; + ZoneNum = state.dataLowTempRadSys->CFloRadSys(RadSysNum).ZonePtr; ZeroSourceSumHATsurf(ZoneNum) = SumHATsurf(ZoneNum); // Set this to figure what part of the load the radiant system meets - for (RadSurfNum = 1; RadSurfNum <= CFloRadSys(RadSysNum).NumOfSurfaces; ++RadSurfNum) { - SurfNum = CFloRadSys(RadSysNum).SurfacePtr(RadSurfNum); + for (RadSurfNum = 1; RadSurfNum <= state.dataLowTempRadSys->CFloRadSys(RadSysNum).NumOfSurfaces; ++RadSurfNum) { + SurfNum = state.dataLowTempRadSys->CFloRadSys(RadSysNum).SurfacePtr(RadSurfNum); QRadSysSrcAvg(SurfNum) = 0.0; // Initialize this variable to zero (radiant system defaults to off) LastQRadSysSrc(SurfNum) = 0.0; // At the start of a time step, reset to zero so average calculation can begin again LastSysTimeElapsed(SurfNum) = 0.0; // At the start of a time step, reset to zero so average calculation can begin again @@ -2384,10 +2370,10 @@ namespace LowTempRadiantSystem { } else if (SELECT_CASE_var == LowTempRadiantSystem::SystemType::ElectricSystem) { - ZoneNum = ElecRadSys(RadSysNum).ZonePtr; + ZoneNum = state.dataLowTempRadSys->ElecRadSys(RadSysNum).ZonePtr; ZeroSourceSumHATsurf(ZoneNum) = SumHATsurf(ZoneNum); // Set this to figure what part of the load the radiant system meets - for (RadSurfNum = 1; RadSurfNum <= ElecRadSys(RadSysNum).NumOfSurfaces; ++RadSurfNum) { - SurfNum = ElecRadSys(RadSysNum).SurfacePtr(RadSurfNum); + for (RadSurfNum = 1; RadSurfNum <= state.dataLowTempRadSys->ElecRadSys(RadSysNum).NumOfSurfaces; ++RadSurfNum) { + SurfNum = state.dataLowTempRadSys->ElecRadSys(RadSysNum).SurfacePtr(RadSurfNum); QRadSysSrcAvg(SurfNum) = 0.0; // Initialize this variable to zero (radiant system defaults to off) LastQRadSysSrc(SurfNum) = 0.0; // At the start of a time step, reset to zero so average calculation can begin again LastSysTimeElapsed(SurfNum) = 0.0; // At the start of a time step, reset to zero so average calculation can begin again @@ -2397,7 +2383,7 @@ namespace LowTempRadiantSystem { } else { ShowSevereError(state, "Radiant system entered without specification of type: electric, constant flow, or hydronic?"); - ShowContinueError(state, "Occurs in Radiant System=" + HydrRadSys(RadSysNum).Name); + ShowContinueError(state, "Occurs in Radiant System=" + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name); ShowFatalError(state, "Preceding condition causes termination."); } } @@ -2410,81 +2396,81 @@ namespace LowTempRadiantSystem { if (SELECT_CASE_var == LowTempRadiantSystem::SystemType::HydronicSystem) { // Initialize the appropriate node data - if (HydrRadSys(RadSysNum).HeatingSystem) { + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).HeatingSystem) { mdot = 0.0; SetComponentFlowRate(state, mdot, - HydrRadSys(RadSysNum).HotWaterInNode, - HydrRadSys(RadSysNum).HotWaterOutNode, - HydrRadSys(RadSysNum).HWLoopNum, - HydrRadSys(RadSysNum).HWLoopSide, - HydrRadSys(RadSysNum).HWBranchNum, - HydrRadSys(RadSysNum).HWCompNum); + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HotWaterInNode, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HotWaterOutNode, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWLoopNum, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWLoopSide, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWBranchNum, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWCompNum); } - if (HydrRadSys(RadSysNum).CoolingSystem) { + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).CoolingSystem) { mdot = 0.0; SetComponentFlowRate(state, mdot, - HydrRadSys(RadSysNum).ColdWaterInNode, - HydrRadSys(RadSysNum).ColdWaterOutNode, - HydrRadSys(RadSysNum).CWLoopNum, - HydrRadSys(RadSysNum).CWLoopSide, - HydrRadSys(RadSysNum).CWBranchNum, - HydrRadSys(RadSysNum).CWCompNum); + state.dataLowTempRadSys->HydrRadSys(RadSysNum).ColdWaterInNode, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).ColdWaterOutNode, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWLoopNum, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWLoopSide, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWBranchNum, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWCompNum); } - if (HydrRadSys(RadSysNum).OperatingMode != NotOperating && FirstHVACIteration) HydrRadSys(RadSysNum).updateOperatingModeHistory(state); + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).OperatingMode != NotOperating && FirstHVACIteration) state.dataLowTempRadSys->HydrRadSys(RadSysNum).updateOperatingModeHistory(state); } else if (SELECT_CASE_var == LowTempRadiantSystem::SystemType::ConstantFlowSystem) { - CFloRadSys(RadSysNum).WaterMassFlowRate = 0.0; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).WaterMassFlowRate = 0.0; // Initialize the appropriate node data - if (CFloRadSys(RadSysNum).HeatingSystem) { - if (CFloRadSys(RadSysNum).VolFlowSchedPtr > 0) { - CurrentFlowSchedule = GetCurrentScheduleValue(state, CFloRadSys(RadSysNum).VolFlowSchedPtr); + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).HeatingSystem) { + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).VolFlowSchedPtr > 0) { + CurrentFlowSchedule = GetCurrentScheduleValue(state, state.dataLowTempRadSys->CFloRadSys(RadSysNum).VolFlowSchedPtr); } else { CurrentFlowSchedule = 1.0; // Allow user to avoid putting in a schedule (defaults to constant flow at all times) } if (CurrentFlowSchedule > 1.0) CurrentFlowSchedule = 1.0; // Do not allow more flow than design maximum if (CurrentFlowSchedule < 0.0) CurrentFlowSchedule = 0.0; // Do not allow negative flow - CFloRadSys(RadSysNum).HotWaterMassFlowRate = CFloRadSys(RadSysNum).HotDesignWaterMassFlowRate * CurrentFlowSchedule; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterMassFlowRate = state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotDesignWaterMassFlowRate * CurrentFlowSchedule; - if (CFloRadSys(RadSysNum).EMSOverrideOnWaterMdot) - CFloRadSys(RadSysNum).HotWaterMassFlowRate = CFloRadSys(RadSysNum).EMSWaterMdotOverrideValue; + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).EMSOverrideOnWaterMdot) + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterMassFlowRate = state.dataLowTempRadSys->CFloRadSys(RadSysNum).EMSWaterMdotOverrideValue; - if (CFloRadSys(RadSysNum).HotWaterInNode > 0) - SetComponentFlowRate(state, CFloRadSys(RadSysNum).HotWaterMassFlowRate, - CFloRadSys(RadSysNum).HotWaterInNode, - CFloRadSys(RadSysNum).HotWaterOutNode, - CFloRadSys(RadSysNum).HWLoopNum, - CFloRadSys(RadSysNum).HWLoopSide, - CFloRadSys(RadSysNum).HWBranchNum, - CFloRadSys(RadSysNum).HWCompNum); + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterInNode > 0) + SetComponentFlowRate(state, state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterMassFlowRate, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterInNode, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterOutNode, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWLoopNum, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWLoopSide, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWBranchNum, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWCompNum); } - if (CFloRadSys(RadSysNum).CoolingSystem) { - if (CFloRadSys(RadSysNum).VolFlowSchedPtr > 0) { - CurrentFlowSchedule = GetCurrentScheduleValue(state, CFloRadSys(RadSysNum).VolFlowSchedPtr); + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).CoolingSystem) { + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).VolFlowSchedPtr > 0) { + CurrentFlowSchedule = GetCurrentScheduleValue(state, state.dataLowTempRadSys->CFloRadSys(RadSysNum).VolFlowSchedPtr); } else { CurrentFlowSchedule = 1.0; // Allow user to avoid putting in a schedule (defaults to constant flow at all times) } if (CurrentFlowSchedule > 1.0) CurrentFlowSchedule = 1.0; // Do not allow more flow than design maximum if (CurrentFlowSchedule < 0.0) CurrentFlowSchedule = 0.0; // Do not allow negative flow - CFloRadSys(RadSysNum).ChWaterMassFlowRate = CFloRadSys(RadSysNum).ColdDesignWaterMassFlowRate * CurrentFlowSchedule; - - if (CFloRadSys(RadSysNum).EMSOverrideOnWaterMdot) - CFloRadSys(RadSysNum).ChWaterMassFlowRate = CFloRadSys(RadSysNum).EMSWaterMdotOverrideValue; - - if (CFloRadSys(RadSysNum).ColdWaterInNode > 0) - SetComponentFlowRate(state, CFloRadSys(RadSysNum).ChWaterMassFlowRate, - CFloRadSys(RadSysNum).ColdWaterInNode, - CFloRadSys(RadSysNum).ColdWaterOutNode, - CFloRadSys(RadSysNum).CWLoopNum, - CFloRadSys(RadSysNum).CWLoopSide, - CFloRadSys(RadSysNum).CWBranchNum, - CFloRadSys(RadSysNum).CWCompNum); + state.dataLowTempRadSys->CFloRadSys(RadSysNum).ChWaterMassFlowRate = state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdDesignWaterMassFlowRate * CurrentFlowSchedule; + + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).EMSOverrideOnWaterMdot) + state.dataLowTempRadSys->CFloRadSys(RadSysNum).ChWaterMassFlowRate = state.dataLowTempRadSys->CFloRadSys(RadSysNum).EMSWaterMdotOverrideValue; + + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdWaterInNode > 0) + SetComponentFlowRate(state, state.dataLowTempRadSys->CFloRadSys(RadSysNum).ChWaterMassFlowRate, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdWaterInNode, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdWaterOutNode, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWLoopNum, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWLoopSide, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWBranchNum, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWCompNum); } - if (CFloRadSys(RadSysNum).OperatingMode != NotOperating && FirstHVACIteration) CFloRadSys(RadSysNum).updateOperatingModeHistory(state); + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).OperatingMode != NotOperating && FirstHVACIteration) state.dataLowTempRadSys->CFloRadSys(RadSysNum).updateOperatingModeHistory(state); } else if (SELECT_CASE_var == LowTempRadiantSystem::SystemType::ElectricSystem) { - ElecRadSys(RadSysNum).OperatingMode = NotOperating; + state.dataLowTempRadSys->ElecRadSys(RadSysNum).OperatingMode = NotOperating; } } @@ -2647,24 +2633,24 @@ namespace LowTempRadiantSystem { if (SystemType == LowTempRadiantSystem::SystemType::ElectricSystem) { - if (ElecRadSys(RadSysNum).MaxElecPower == AutoSize) { + if (state.dataLowTempRadSys->ElecRadSys(RadSysNum).MaxElecPower == AutoSize) { IsAutoSize = true; } if (CurZoneEqNum > 0) { CompType = "ZoneHVAC:LowTemperatureRadiant:Electric"; - CompName = ElecRadSys(RadSysNum).Name; + CompName = state.dataLowTempRadSys->ElecRadSys(RadSysNum).Name; SizingMethod = HeatingCapacitySizing; FieldNum = 1; PrintFlag = true; - SizingString = ElecRadSysNumericFields(RadSysNum).FieldNames(FieldNum) + " [W]"; - CapSizingMethod = ElecRadSys(RadSysNum).HeatingCapMethod; + SizingString = state.dataLowTempRadSys->ElecRadSysNumericFields(RadSysNum).FieldNames(FieldNum) + " [W]"; + CapSizingMethod = state.dataLowTempRadSys->ElecRadSys(RadSysNum).HeatingCapMethod; ZoneEqSizing(CurZoneEqNum).SizingMethod(SizingMethod) = CapSizingMethod; if (!IsAutoSize && !ZoneSizingRunDone) { // simulation continue - if (CapSizingMethod == HeatingDesignCapacity && ElecRadSys(RadSysNum).ScaledHeatingCapacity > 0.0) { - TempSize = ElecRadSys(RadSysNum).ScaledHeatingCapacity; + if (CapSizingMethod == HeatingDesignCapacity && state.dataLowTempRadSys->ElecRadSys(RadSysNum).ScaledHeatingCapacity > 0.0) { + TempSize = state.dataLowTempRadSys->ElecRadSys(RadSysNum).ScaledHeatingCapacity; bool errorsFound = false; HeatingCapacitySizer sizerHeatingCapacity; sizerHeatingCapacity.overrideSizingString(SizingString); @@ -2672,16 +2658,16 @@ namespace LowTempRadiantSystem { DesCoilLoad = sizerHeatingCapacity.size(state, TempSize, errorsFound); } else if (CapSizingMethod == CapacityPerFloorArea) { DataScalableCapSizingON = true; - TempSize = ElecRadSys(RadSysNum).ScaledHeatingCapacity * Zone(ElecRadSys(RadSysNum).ZonePtr).FloorArea; + TempSize = state.dataLowTempRadSys->ElecRadSys(RadSysNum).ScaledHeatingCapacity * Zone(state.dataLowTempRadSys->ElecRadSys(RadSysNum).ZonePtr).FloorArea; bool errorsFound = false; HeatingCapacitySizer sizerHeatingCapacity; sizerHeatingCapacity.overrideSizingString(SizingString); sizerHeatingCapacity.initializeWithinEP(state, CompType, CompName, PrintFlag, RoutineName); DesCoilLoad = sizerHeatingCapacity.size(state, TempSize, errorsFound); DataScalableCapSizingON = false; - ElecRadSys(RadSysNum).MaxElecPower = TempSize; + state.dataLowTempRadSys->ElecRadSys(RadSysNum).MaxElecPower = TempSize; } else if (CapSizingMethod == FractionOfAutosizedHeatingCapacity) { - ShowSevereError(state, RoutineName + ": auto-sizing cannot be done for " + CompType + " = " + ElecRadSys(RadSysNum).Name + "\"."); + ShowSevereError(state, RoutineName + ": auto-sizing cannot be done for " + CompType + " = " + state.dataLowTempRadSys->ElecRadSys(RadSysNum).Name + "\"."); ShowContinueError(state, "The \"SimulationControl\" object must have the field \"Do Zone Sizing Calculation\" set to Yes when the " "Heating Design Capacity Method = \"FractionOfAutosizedHeatingCapacity\"."); ErrorsFound = true; @@ -2696,10 +2682,10 @@ namespace LowTempRadiantSystem { DataConstantUsedForSizing = FinalZoneSizing(CurZoneEqNum).NonAirSysDesHeatLoad; DataFractionUsedForSizing = 1.0; } - if (ElecRadSys(RadSysNum).ScaledHeatingCapacity == AutoSize) { + if (state.dataLowTempRadSys->ElecRadSys(RadSysNum).ScaledHeatingCapacity == AutoSize) { TempSize = AutoSize; } else { - TempSize = ElecRadSys(RadSysNum).ScaledHeatingCapacity; + TempSize = state.dataLowTempRadSys->ElecRadSys(RadSysNum).ScaledHeatingCapacity; } } else if (CapSizingMethod == CapacityPerFloorArea) { if (ZoneSizingRunDone) { @@ -2707,22 +2693,22 @@ namespace LowTempRadiantSystem { ZoneEqSizing(CurZoneEqNum).HeatingCapacity = true; ZoneEqSizing(CurZoneEqNum).DesHeatingLoad = FinalZoneSizing(CurZoneEqNum).NonAirSysDesHeatLoad; } - TempSize = ElecRadSys(RadSysNum).ScaledHeatingCapacity * Zone(ElecRadSys(RadSysNum).ZonePtr).FloorArea; + TempSize = state.dataLowTempRadSys->ElecRadSys(RadSysNum).ScaledHeatingCapacity * Zone(state.dataLowTempRadSys->ElecRadSys(RadSysNum).ZonePtr).FloorArea; DataScalableCapSizingON = true; } else if (CapSizingMethod == FractionOfAutosizedHeatingCapacity) { CheckZoneSizing(state, CompType, CompName); ZoneEqSizing(CurZoneEqNum).HeatingCapacity = true; ZoneEqSizing(CurZoneEqNum).DesHeatingLoad = FinalZoneSizing(CurZoneEqNum).NonAirSysDesHeatLoad; - TempSize = ZoneEqSizing(CurZoneEqNum).DesHeatingLoad * ElecRadSys(RadSysNum).ScaledHeatingCapacity; + TempSize = ZoneEqSizing(CurZoneEqNum).DesHeatingLoad * state.dataLowTempRadSys->ElecRadSys(RadSysNum).ScaledHeatingCapacity; DataScalableCapSizingON = true; } else { - TempSize = ElecRadSys(RadSysNum).ScaledHeatingCapacity; + TempSize = state.dataLowTempRadSys->ElecRadSys(RadSysNum).ScaledHeatingCapacity; } HeatingCapacitySizer sizerHeatingCapacity; sizerHeatingCapacity.overrideSizingString(SizingString); sizerHeatingCapacity.initializeWithinEP(state, CompType, CompName, PrintFlag, RoutineName); - ElecRadSys(RadSysNum).MaxElecPower = sizerHeatingCapacity.size(state, TempSize, ErrorsFound); + state.dataLowTempRadSys->ElecRadSys(RadSysNum).MaxElecPower = sizerHeatingCapacity.size(state, TempSize, ErrorsFound); DataConstantUsedForSizing = 0.0; DataFractionUsedForSizing = 0.0; DataScalableCapSizingON = false; @@ -2734,10 +2720,10 @@ namespace LowTempRadiantSystem { if (SystemType == LowTempRadiantSystem::SystemType::HydronicSystem) { CompType = "ZoneHVAC:LowTemperatureRadiant:VariableFlow"; - CompName = HydrRadSys(RadSysNum).Name; + CompName = state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name; IsAutoSize = false; - if (HydrRadSys(RadSysNum).ScaledHeatingCapacity == AutoSize) { + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).ScaledHeatingCapacity == AutoSize) { IsAutoSize = true; } @@ -2746,13 +2732,13 @@ namespace LowTempRadiantSystem { SizingMethod = HeatingCapacitySizing; FieldNum = 2; PrintFlag = true; - SizingString = HydronicRadiantSysNumericFields(RadSysNum).FieldNames(FieldNum) + " [W]"; - CapSizingMethod = HydrRadSys(RadSysNum).HeatingCapMethod; + SizingString = state.dataLowTempRadSys->HydronicRadiantSysNumericFields(RadSysNum).FieldNames(FieldNum) + " [W]"; + CapSizingMethod = state.dataLowTempRadSys->HydrRadSys(RadSysNum).HeatingCapMethod; ZoneEqSizing(CurZoneEqNum).SizingMethod(SizingMethod) = CapSizingMethod; if (!IsAutoSize && !ZoneSizingRunDone) { // simulation continue - if (CapSizingMethod == HeatingDesignCapacity && HydrRadSys(RadSysNum).ScaledHeatingCapacity > 0.0) { - TempSize = HydrRadSys(RadSysNum).ScaledHeatingCapacity; + if (CapSizingMethod == HeatingDesignCapacity && state.dataLowTempRadSys->HydrRadSys(RadSysNum).ScaledHeatingCapacity > 0.0) { + TempSize = state.dataLowTempRadSys->HydrRadSys(RadSysNum).ScaledHeatingCapacity; bool errorsFound = false; HeatingCapacitySizer sizerHeatingCapacity; sizerHeatingCapacity.overrideSizingString(SizingString); @@ -2760,15 +2746,15 @@ namespace LowTempRadiantSystem { DesCoilLoad = sizerHeatingCapacity.size(state, TempSize, errorsFound); } else if (CapSizingMethod == CapacityPerFloorArea) { DataScalableCapSizingON = true; - TempSize = HydrRadSys(RadSysNum).ScaledHeatingCapacity * Zone(HydrRadSys(RadSysNum).ZonePtr).FloorArea; + TempSize = state.dataLowTempRadSys->HydrRadSys(RadSysNum).ScaledHeatingCapacity * Zone(state.dataLowTempRadSys->HydrRadSys(RadSysNum).ZonePtr).FloorArea; HeatingCapacitySizer sizerHeatingCapacity; sizerHeatingCapacity.overrideSizingString(SizingString); sizerHeatingCapacity.initializeWithinEP(state, CompType, CompName, PrintFlag, RoutineName); DesCoilLoad = sizerHeatingCapacity.size(state, TempSize, ErrorsFound); DataScalableCapSizingON = false; } else if (CapSizingMethod == FractionOfAutosizedHeatingCapacity) { - if (HydrRadSys(RadSysNum).WaterVolFlowMaxHeat == AutoSize) { - ShowSevereError(state, RoutineName + ": auto-sizing cannot be done for " + CompType + " = " + HydrRadSys(RadSysNum).Name + + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxHeat == AutoSize) { + ShowSevereError(state, RoutineName + ": auto-sizing cannot be done for " + CompType + " = " + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name + "\"."); ShowContinueError(state, "The \"SimulationControl\" object must have the field \"Do Zone Sizing Calculation\" set to Yes when " "the Heating Design Capacity Method = \"FractionOfAutosizedHeatingCapacity\"."); @@ -2785,10 +2771,10 @@ namespace LowTempRadiantSystem { DataConstantUsedForSizing = FinalZoneSizing(CurZoneEqNum).NonAirSysDesHeatLoad; DataFractionUsedForSizing = 1.0; } - if (HydrRadSys(RadSysNum).ScaledHeatingCapacity == AutoSize) { + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).ScaledHeatingCapacity == AutoSize) { TempSize = AutoSize; } else { - TempSize = HydrRadSys(RadSysNum).ScaledHeatingCapacity; + TempSize = state.dataLowTempRadSys->HydrRadSys(RadSysNum).ScaledHeatingCapacity; } } else if (CapSizingMethod == CapacityPerFloorArea) { if (ZoneSizingRunDone) { @@ -2796,16 +2782,16 @@ namespace LowTempRadiantSystem { ZoneEqSizing(CurZoneEqNum).HeatingCapacity = true; ZoneEqSizing(CurZoneEqNum).DesHeatingLoad = FinalZoneSizing(CurZoneEqNum).NonAirSysDesHeatLoad; } - TempSize = HydrRadSys(RadSysNum).ScaledHeatingCapacity * Zone(HydrRadSys(RadSysNum).ZonePtr).FloorArea; + TempSize = state.dataLowTempRadSys->HydrRadSys(RadSysNum).ScaledHeatingCapacity * Zone(state.dataLowTempRadSys->HydrRadSys(RadSysNum).ZonePtr).FloorArea; DataScalableCapSizingON = true; } else if (CapSizingMethod == FractionOfAutosizedHeatingCapacity) { CheckZoneSizing(state, CompType, CompName); ZoneEqSizing(CurZoneEqNum).HeatingCapacity = true; ZoneEqSizing(CurZoneEqNum).DesHeatingLoad = FinalZoneSizing(CurZoneEqNum).NonAirSysDesHeatLoad; - TempSize = ZoneEqSizing(CurZoneEqNum).DesHeatingLoad * HydrRadSys(RadSysNum).ScaledHeatingCapacity; + TempSize = ZoneEqSizing(CurZoneEqNum).DesHeatingLoad * state.dataLowTempRadSys->HydrRadSys(RadSysNum).ScaledHeatingCapacity; DataScalableCapSizingON = true; } else { - TempSize = HydrRadSys(RadSysNum).ScaledHeatingCapacity; + TempSize = state.dataLowTempRadSys->HydrRadSys(RadSysNum).ScaledHeatingCapacity; } HeatingCapacitySizer sizerHeatingCapacity; sizerHeatingCapacity.overrideSizingString(SizingString); @@ -2819,40 +2805,40 @@ namespace LowTempRadiantSystem { } } // finally heating capacity is saved in this variable - HydrRadSys(RadSysNum).ScaledHeatingCapacity = DesCoilLoad; + state.dataLowTempRadSys->HydrRadSys(RadSysNum).ScaledHeatingCapacity = DesCoilLoad; } IsAutoSize = false; - if (HydrRadSys(RadSysNum).WaterVolFlowMaxHeat == AutoSize) { + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxHeat == AutoSize) { IsAutoSize = true; } if (CurZoneEqNum > 0) { if (!IsAutoSize && !ZoneSizingRunDone) { // simulation continue - if (HydrRadSys(RadSysNum).WaterVolFlowMaxHeat > 0.0) { + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxHeat > 0.0) { BaseSizer::reportSizerOutput(state, CompType, - HydrRadSys(RadSysNum).Name, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name, "User-Specified Maximum Hot Water Flow [m3/s]", - HydrRadSys(RadSysNum).WaterVolFlowMaxHeat); + state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxHeat); } } else { // Autosize or hard-size with sizing run - if (HydrRadSys(RadSysNum).HotWaterInNode > 0 && HydrRadSys(RadSysNum).HotWaterOutNode > 0) { + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).HotWaterInNode > 0 && state.dataLowTempRadSys->HydrRadSys(RadSysNum).HotWaterOutNode > 0) { PltSizHeatNum = MyPlantSizingIndex(state, CompType, - HydrRadSys(RadSysNum).Name, - HydrRadSys(RadSysNum).HotWaterInNode, - HydrRadSys(RadSysNum).HotWaterOutNode, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HotWaterInNode, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).HotWaterOutNode, ErrorsFound); if (PltSizHeatNum > 0) { if (DesCoilLoad >= SmallLoad) { rho = GetDensityGlycol(state, - state.dataPlnt->PlantLoop(HydrRadSys(RadSysNum).HWLoopNum).FluidName, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWLoopNum).FluidName, DataGlobalConstants::HWInitConvTemp, - state.dataPlnt->PlantLoop(HydrRadSys(RadSysNum).HWLoopNum).FluidIndex, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWLoopNum).FluidIndex, RoutineName); Cp = GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(HydrRadSys(RadSysNum).HWLoopNum).FluidName, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWLoopNum).FluidName, DataGlobalConstants::HWInitConvTemp, - state.dataPlnt->PlantLoop(HydrRadSys(RadSysNum).HWLoopNum).FluidIndex, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->HydrRadSys(RadSysNum).HWLoopNum).FluidIndex, RoutineName); WaterVolFlowMaxHeatDes = DesCoilLoad / (PlantSizData(PltSizHeatNum).DeltaT * Cp * rho); } else { @@ -2860,20 +2846,20 @@ namespace LowTempRadiantSystem { } } else { ShowSevereError(state, "Autosizing of water flow requires a heating loop Sizing:Plant object"); - ShowContinueError(state, "Occurs in ZoneHVAC:LowTemperatureRadiant:VariableFlow Object=" + HydrRadSys(RadSysNum).Name); + ShowContinueError(state, "Occurs in ZoneHVAC:LowTemperatureRadiant:VariableFlow Object=" + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name); ErrorsFound = true; } } if (IsAutoSize) { - HydrRadSys(RadSysNum).WaterVolFlowMaxHeat = WaterVolFlowMaxHeatDes; + state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxHeat = WaterVolFlowMaxHeatDes; BaseSizer::reportSizerOutput(state, - CompType, HydrRadSys(RadSysNum).Name, "Design Size Maximum Hot Water Flow [m3/s]", WaterVolFlowMaxHeatDes); + CompType, state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name, "Design Size Maximum Hot Water Flow [m3/s]", WaterVolFlowMaxHeatDes); } else { // hard-size with sizing data - if (HydrRadSys(RadSysNum).WaterVolFlowMaxHeat > 0.0 && WaterVolFlowMaxHeatDes > 0.0) { - WaterVolFlowMaxHeatUser = HydrRadSys(RadSysNum).WaterVolFlowMaxHeat; + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxHeat > 0.0 && WaterVolFlowMaxHeatDes > 0.0) { + WaterVolFlowMaxHeatUser = state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxHeat; BaseSizer::reportSizerOutput(state, CompType, - HydrRadSys(RadSysNum).Name, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name, "Design Size Maximum Hot Water Flow [m3/s]", WaterVolFlowMaxHeatDes, "User-Specified Maximum Hot Water Flow [m3/s]", @@ -2883,7 +2869,7 @@ namespace LowTempRadiantSystem { AutoVsHardSizingThreshold) { ShowMessage(state, "SizeLowTempRadiantSystem: Potential issue with equipment sizing for " "ZoneHVAC:LowTemperatureRadiant:VariableFlow = \"" + - HydrRadSys(RadSysNum).Name + "\"."); + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name + "\"."); ShowContinueError(state, format("User-Specified Maximum Hot Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxHeatUser)); ShowContinueError( @@ -2898,7 +2884,7 @@ namespace LowTempRadiantSystem { } IsAutoSize = false; - if (HydrRadSys(RadSysNum).ScaledCoolingCapacity == AutoSize) { + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).ScaledCoolingCapacity == AutoSize) { IsAutoSize = true; } @@ -2907,28 +2893,28 @@ namespace LowTempRadiantSystem { SizingMethod = CoolingCapacitySizing; FieldNum = 4; PrintFlag = true; - SizingString = HydronicRadiantSysNumericFields(RadSysNum).FieldNames(FieldNum) + " [W]"; - CapSizingMethod = HydrRadSys(RadSysNum).CoolingCapMethod; + SizingString = state.dataLowTempRadSys->HydronicRadiantSysNumericFields(RadSysNum).FieldNames(FieldNum) + " [W]"; + CapSizingMethod = state.dataLowTempRadSys->HydrRadSys(RadSysNum).CoolingCapMethod; ZoneEqSizing(CurZoneEqNum).SizingMethod(SizingMethod) = CapSizingMethod; if (!IsAutoSize && !ZoneSizingRunDone) { // simulation continue - if (CapSizingMethod == CoolingDesignCapacity && HydrRadSys(RadSysNum).ScaledCoolingCapacity > 0.0) { - TempSize = HydrRadSys(RadSysNum).ScaledCoolingCapacity; + if (CapSizingMethod == CoolingDesignCapacity && state.dataLowTempRadSys->HydrRadSys(RadSysNum).ScaledCoolingCapacity > 0.0) { + TempSize = state.dataLowTempRadSys->HydrRadSys(RadSysNum).ScaledCoolingCapacity; CoolingCapacitySizer sizerCoolingCapacity; sizerCoolingCapacity.overrideSizingString(SizingString); sizerCoolingCapacity.initializeWithinEP(state, CompType, CompName, PrintFlag, RoutineName); DesCoilLoad = sizerCoolingCapacity.size(state, TempSize, ErrorsFound); } else if (CapSizingMethod == CapacityPerFloorArea) { DataScalableCapSizingON = true; - TempSize = HydrRadSys(RadSysNum).ScaledCoolingCapacity * Zone(HydrRadSys(RadSysNum).ZonePtr).FloorArea; + TempSize = state.dataLowTempRadSys->HydrRadSys(RadSysNum).ScaledCoolingCapacity * Zone(state.dataLowTempRadSys->HydrRadSys(RadSysNum).ZonePtr).FloorArea; CoolingCapacitySizer sizerCoolingCapacity; sizerCoolingCapacity.overrideSizingString(SizingString); sizerCoolingCapacity.initializeWithinEP(state, CompType, CompName, PrintFlag, RoutineName); DesCoilLoad = sizerCoolingCapacity.size(state, TempSize, ErrorsFound); DataScalableCapSizingON = false; } else if (CapSizingMethod == FractionOfAutosizedCoolingCapacity) { - if (HydrRadSys(RadSysNum).WaterVolFlowMaxCool == AutoSize) { - ShowSevereError(state, RoutineName + ": auto-sizing cannot be done for " + CompType + " = " + HydrRadSys(RadSysNum).Name + + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxCool == AutoSize) { + ShowSevereError(state, RoutineName + ": auto-sizing cannot be done for " + CompType + " = " + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name + "\"."); ShowContinueError(state, "The \"SimulationControl\" object must have the field \"Do Zone Sizing Calculation\" set to Yes when " "the Cooling Design Capacity Method = \"FractionOfAutosizedCoolingCapacity\"."); @@ -2945,10 +2931,10 @@ namespace LowTempRadiantSystem { DataConstantUsedForSizing = FinalZoneSizing(CurZoneEqNum).NonAirSysDesCoolLoad; DataFractionUsedForSizing = 1.0; } - if (HydrRadSys(RadSysNum).ScaledCoolingCapacity == AutoSize) { + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).ScaledCoolingCapacity == AutoSize) { TempSize = AutoSize; } else { - TempSize = HydrRadSys(RadSysNum).ScaledCoolingCapacity; + TempSize = state.dataLowTempRadSys->HydrRadSys(RadSysNum).ScaledCoolingCapacity; } } else if (CapSizingMethod == CapacityPerFloorArea) { if (ZoneSizingRunDone) { @@ -2956,17 +2942,17 @@ namespace LowTempRadiantSystem { ZoneEqSizing(CurZoneEqNum).CoolingCapacity = true; ZoneEqSizing(CurZoneEqNum).DesCoolingLoad = FinalZoneSizing(CurZoneEqNum).NonAirSysDesCoolLoad; } - TempSize = HydrRadSys(RadSysNum).ScaledCoolingCapacity * Zone(HydrRadSys(RadSysNum).ZonePtr).FloorArea; + TempSize = state.dataLowTempRadSys->HydrRadSys(RadSysNum).ScaledCoolingCapacity * Zone(state.dataLowTempRadSys->HydrRadSys(RadSysNum).ZonePtr).FloorArea; DataScalableCapSizingON = true; } else if (CapSizingMethod == FractionOfAutosizedCoolingCapacity) { CheckZoneSizing(state, CompType, CompName); ZoneEqSizing(CurZoneEqNum).CoolingCapacity = true; ZoneEqSizing(CurZoneEqNum).DesCoolingLoad = FinalZoneSizing(CurZoneEqNum).NonAirSysDesCoolLoad; - TempSize = ZoneEqSizing(CurZoneEqNum).DesCoolingLoad * HydrRadSys(RadSysNum).ScaledCoolingCapacity; + TempSize = ZoneEqSizing(CurZoneEqNum).DesCoolingLoad * state.dataLowTempRadSys->HydrRadSys(RadSysNum).ScaledCoolingCapacity; DataScalableCapSizingON = true; } else { - TempSize = HydrRadSys(RadSysNum).ScaledCoolingCapacity; + TempSize = state.dataLowTempRadSys->HydrRadSys(RadSysNum).ScaledCoolingCapacity; } CoolingCapacitySizer sizerCoolingCapacity; sizerCoolingCapacity.overrideSizingString(SizingString); @@ -2980,39 +2966,39 @@ namespace LowTempRadiantSystem { } } // finally cooling capacity is saved in this variable - HydrRadSys(RadSysNum).ScaledCoolingCapacity = DesCoilLoad; + state.dataLowTempRadSys->HydrRadSys(RadSysNum).ScaledCoolingCapacity = DesCoilLoad; } IsAutoSize = false; - if (HydrRadSys(RadSysNum).WaterVolFlowMaxCool == AutoSize) { + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxCool == AutoSize) { IsAutoSize = true; } if (CurZoneEqNum > 0) { if (!IsAutoSize && !ZoneSizingRunDone) { // simulation continue - if (HydrRadSys(RadSysNum).WaterVolFlowMaxCool > 0.0) { + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxCool > 0.0) { BaseSizer::reportSizerOutput(state, CompType, - HydrRadSys(RadSysNum).Name, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name, "User-Specified Maximum Cold Water Flow [m3/s]", - HydrRadSys(RadSysNum).WaterVolFlowMaxCool); + state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxCool); } } else { // Autosize or hard-size with sizing run - if (HydrRadSys(RadSysNum).ColdWaterInNode > 0 && HydrRadSys(RadSysNum).ColdWaterOutNode > 0) { + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).ColdWaterInNode > 0 && state.dataLowTempRadSys->HydrRadSys(RadSysNum).ColdWaterOutNode > 0) { PltSizCoolNum = MyPlantSizingIndex(state, CompType, - HydrRadSys(RadSysNum).Name, - HydrRadSys(RadSysNum).ColdWaterInNode, - HydrRadSys(RadSysNum).ColdWaterOutNode, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).ColdWaterInNode, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).ColdWaterOutNode, ErrorsFound); if (PltSizCoolNum > 0) { if (DesCoilLoad >= SmallLoad) { rho = GetDensityGlycol(state, - state.dataPlnt->PlantLoop(HydrRadSys(RadSysNum).CWLoopNum).FluidName, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWLoopNum).FluidName, DataGlobalConstants::CWInitConvTemp, - state.dataPlnt->PlantLoop(HydrRadSys(RadSysNum).CWLoopNum).FluidIndex, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWLoopNum).FluidIndex, RoutineName); Cp = GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(HydrRadSys(RadSysNum).CWLoopNum).FluidName, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWLoopNum).FluidName, DataGlobalConstants::CWInitConvTemp, - state.dataPlnt->PlantLoop(HydrRadSys(RadSysNum).CWLoopNum).FluidIndex, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->HydrRadSys(RadSysNum).CWLoopNum).FluidIndex, RoutineName); WaterVolFlowMaxCoolDes = DesCoilLoad / (PlantSizData(PltSizCoolNum).DeltaT * Cp * rho); } else { @@ -3020,20 +3006,20 @@ namespace LowTempRadiantSystem { } } else { ShowSevereError(state, "Autosizing of water flow requires a cooling loop Sizing:Plant object"); - ShowContinueError(state, "Occurs in ZoneHVAC:LowTemperatureRadiant:VariableFlow Object=" + HydrRadSys(RadSysNum).Name); + ShowContinueError(state, "Occurs in ZoneHVAC:LowTemperatureRadiant:VariableFlow Object=" + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name); ErrorsFound = true; } } if (IsAutoSize) { - HydrRadSys(RadSysNum).WaterVolFlowMaxCool = WaterVolFlowMaxCoolDes; + state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxCool = WaterVolFlowMaxCoolDes; BaseSizer::reportSizerOutput(state, - CompType, HydrRadSys(RadSysNum).Name, "Design Size Maximum Cold Water Flow [m3/s]", WaterVolFlowMaxCoolDes); + CompType, state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name, "Design Size Maximum Cold Water Flow [m3/s]", WaterVolFlowMaxCoolDes); } else { // hard-size with sizing data - if (HydrRadSys(RadSysNum).WaterVolFlowMaxCool > 0.0 && WaterVolFlowMaxCoolDes > 0.0) { - WaterVolFlowMaxCoolUser = HydrRadSys(RadSysNum).WaterVolFlowMaxCool; + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxCool > 0.0 && WaterVolFlowMaxCoolDes > 0.0) { + WaterVolFlowMaxCoolUser = state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxCool; BaseSizer::reportSizerOutput(state, CompType, - HydrRadSys(RadSysNum).Name, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name, "Design Size Maximum Cold Water Flow [m3/s]", WaterVolFlowMaxCoolDes, "User-Specified Maximum Cold Water Flow [m3/s]", @@ -3043,7 +3029,7 @@ namespace LowTempRadiantSystem { AutoVsHardSizingThreshold) { ShowMessage(state, "SizeLowTempRadiantSystem: Potential issue with equipment sizing for " "ZoneHVAC:LowTemperatureRadiant:VariableFlow = \"" + - HydrRadSys(RadSysNum).Name + "\"."); + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name + "\"."); ShowContinueError(state, format("User-Specified Maximum Cool Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxCoolUser)); ShowContinueError( @@ -3058,26 +3044,26 @@ namespace LowTempRadiantSystem { } IsAutoSize = false; - if (HydrRadSys(RadSysNum).TubeLength == AutoSize) { + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).TubeLength == AutoSize) { IsAutoSize = true; } if (CurZoneEqNum > 0) { if (!IsAutoSize && !ZoneSizingRunDone) { // simulation continue - if (HydrRadSys(RadSysNum).TubeLength > 0.0) { + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).TubeLength > 0.0) { BaseSizer::reportSizerOutput(state, - CompType, HydrRadSys(RadSysNum).Name, "User-Specified Hydronic Tubing Length [m]", HydrRadSys(RadSysNum).TubeLength); + CompType, state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name, "User-Specified Hydronic Tubing Length [m]", state.dataLowTempRadSys->HydrRadSys(RadSysNum).TubeLength); } } else { // Autosize or hard-size with sizing run // CheckZoneSizing is not required here because the tube length calculation is not dependent on zone sizing calculation results - TubeLengthDes = HydrRadSys(RadSysNum).sizeRadiantSystemTubeLength(state); + TubeLengthDes = state.dataLowTempRadSys->HydrRadSys(RadSysNum).sizeRadiantSystemTubeLength(state); if (IsAutoSize) { - HydrRadSys(RadSysNum).TubeLength = TubeLengthDes; - BaseSizer::reportSizerOutput(state, CompType, HydrRadSys(RadSysNum).Name, "Design Size Hydronic Tubing Length [m]", TubeLengthDes); + state.dataLowTempRadSys->HydrRadSys(RadSysNum).TubeLength = TubeLengthDes; + BaseSizer::reportSizerOutput(state, CompType, state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name, "Design Size Hydronic Tubing Length [m]", TubeLengthDes); } else { // hard-size with sizing data - if (HydrRadSys(RadSysNum).TubeLength > 0.0 && TubeLengthDes > 0.0) { - TubeLengthUser = HydrRadSys(RadSysNum).TubeLength; + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).TubeLength > 0.0 && TubeLengthDes > 0.0) { + TubeLengthUser = state.dataLowTempRadSys->HydrRadSys(RadSysNum).TubeLength; BaseSizer::reportSizerOutput(state, CompType, - HydrRadSys(RadSysNum).Name, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name, "Design Size Hydronic Tubing Length [m]", TubeLengthDes, "User-Specified Hydronic Tubing Length [m]", @@ -3086,7 +3072,7 @@ namespace LowTempRadiantSystem { if ((std::abs(TubeLengthDes - TubeLengthUser) / TubeLengthUser) > AutoVsHardSizingThreshold) { ShowMessage(state, "SizeLowTempRadiantSystem: Potential issue with equipment sizing for " "ZoneHVAC:LowTemperatureRadiant:VariableFlow = \"" + - HydrRadSys(RadSysNum).Name + "\"."); + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name + "\"."); ShowContinueError(state, format("User-Specified Hydronic Tubing Length of {:.5R} [m]", TubeLengthUser)); ShowContinueError(state, format("differs from Design Size Hydronic Tubing Length of {:.5R} [m]", TubeLengthDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); @@ -3098,28 +3084,28 @@ namespace LowTempRadiantSystem { } } - for (SurfNum = 1; SurfNum <= HydrRadSys(RadSysNum).NumOfSurfaces; ++SurfNum) { - if (HydrRadSys(RadSysNum).NumCircCalcMethod == CalculateFromLength) { - HydrRadSys(RadSysNum).NumCircuits(SurfNum) = - (HydrRadSys(RadSysNum).SurfaceFrac(SurfNum) * HydrRadSys(RadSysNum).TubeLength) / HydrRadSys(RadSysNum).CircLength; - HydrRadSys(RadSysNum).NumCircuits(SurfNum) = max(HydrRadSys(RadSysNum).NumCircuits(SurfNum), 1.0); + for (SurfNum = 1; SurfNum <= state.dataLowTempRadSys->HydrRadSys(RadSysNum).NumOfSurfaces; ++SurfNum) { + if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).NumCircCalcMethod == CalculateFromLength) { + state.dataLowTempRadSys->HydrRadSys(RadSysNum).NumCircuits(SurfNum) = + (state.dataLowTempRadSys->HydrRadSys(RadSysNum).SurfaceFrac(SurfNum) * state.dataLowTempRadSys->HydrRadSys(RadSysNum).TubeLength) / state.dataLowTempRadSys->HydrRadSys(RadSysNum).CircLength; + state.dataLowTempRadSys->HydrRadSys(RadSysNum).NumCircuits(SurfNum) = max(state.dataLowTempRadSys->HydrRadSys(RadSysNum).NumCircuits(SurfNum), 1.0); } else { - HydrRadSys(RadSysNum).NumCircuits(SurfNum) = 1.0; + state.dataLowTempRadSys->HydrRadSys(RadSysNum).NumCircuits(SurfNum) = 1.0; } } - RegisterPlantCompDesignFlow(HydrRadSys(RadSysNum).HotWaterInNode, HydrRadSys(RadSysNum).WaterVolFlowMaxHeat); - RegisterPlantCompDesignFlow(HydrRadSys(RadSysNum).ColdWaterInNode, HydrRadSys(RadSysNum).WaterVolFlowMaxCool); + RegisterPlantCompDesignFlow(state.dataLowTempRadSys->HydrRadSys(RadSysNum).HotWaterInNode, state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxHeat); + RegisterPlantCompDesignFlow(state.dataLowTempRadSys->HydrRadSys(RadSysNum).ColdWaterInNode, state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxCool); } if (SystemType == LowTempRadiantSystem::SystemType::ConstantFlowSystem) { CompType = "ZoneHVAC:LowTemperatureRadiant:ConstantFlow"; - CompName = CFloRadSys(RadSysNum).Name; + CompName = state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name; // Check which operating system it is - HeatNode = CFloRadSys(RadSysNum).HotWaterInNode; - CoolNode = CFloRadSys(RadSysNum).ColdWaterInNode; + HeatNode = state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterInNode; + CoolNode = state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdWaterInNode; if (HeatNode > 0 && CoolNode > 0) { OpMode = ClgHtg; } else if (HeatNode > 0 && CoolNode <= 0) { @@ -3130,38 +3116,38 @@ namespace LowTempRadiantSystem { OpMode = OFF; // It shouldn't happen here } - if (CFloRadSys(RadSysNum).WaterVolFlowMax == AutoSize) { + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).WaterVolFlowMax == AutoSize) { IsAutoSize = true; } if (CurZoneEqNum > 0) { if (!IsAutoSize && !ZoneSizingRunDone) { // simulation continue - if (CFloRadSys(RadSysNum).WaterVolFlowMax > 0.0) { + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).WaterVolFlowMax > 0.0) { BaseSizer::reportSizerOutput(state, - CompType, CFloRadSys(RadSysNum).Name, "User-Specified Maximum Water Flow [m3/s]", CFloRadSys(RadSysNum).WaterVolFlowMax); + CompType, state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name, "User-Specified Maximum Water Flow [m3/s]", state.dataLowTempRadSys->CFloRadSys(RadSysNum).WaterVolFlowMax); } } else { // Autosize or hard-size with sizing run - CheckZoneSizing(state, CompType, CFloRadSys(RadSysNum).Name); + CheckZoneSizing(state, CompType, state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name); // Estimate hot water and chilled water flows // Index only if it provides heating to avoid severe error if (OpMode == ClgHtg || OpMode == HtgOnly) { PltSizHeatNum = MyPlantSizingIndex(state, CompType, - CFloRadSys(RadSysNum).Name, - CFloRadSys(RadSysNum).HotWaterInNode, - CFloRadSys(RadSysNum).HotWaterOutNode, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterInNode, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterOutNode, ErrorsFound); } if (PltSizHeatNum > 0) { if (FinalZoneSizing(CurZoneEqNum).NonAirSysDesHeatLoad >= SmallLoad) { rho = GetDensityGlycol(state, - state.dataPlnt->PlantLoop(CFloRadSys(RadSysNum).HWLoopNum).FluidName, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWLoopNum).FluidName, DataGlobalConstants::HWInitConvTemp, - state.dataPlnt->PlantLoop(CFloRadSys(RadSysNum).HWLoopNum).FluidIndex, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWLoopNum).FluidIndex, "SizeLowTempRadiantSystem"); Cp = GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(CFloRadSys(RadSysNum).HWLoopNum).FluidName, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWLoopNum).FluidName, DataGlobalConstants::HWInitConvTemp, - state.dataPlnt->PlantLoop(CFloRadSys(RadSysNum).HWLoopNum).FluidIndex, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->CFloRadSys(RadSysNum).HWLoopNum).FluidIndex, "SizeLowTempRadiantSystem"); WaterVolFlowMaxHeatDes = FinalZoneSizing(CurZoneEqNum).NonAirSysDesHeatLoad / (PlantSizData(PltSizHeatNum).DeltaT * Cp * rho); @@ -3171,7 +3157,7 @@ namespace LowTempRadiantSystem { } else { if (OpMode == ClgHtg || OpMode == HtgOnly) { ShowSevereError(state, "Autosizing of water flow requires a heating loop Sizing:Plant object"); - ShowContinueError(state, "Occurs in ZoneHVAC:LowTemperatureRadiant:ConstantFlow Object=" + CFloRadSys(RadSysNum).Name); + ShowContinueError(state, "Occurs in ZoneHVAC:LowTemperatureRadiant:ConstantFlow Object=" + state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name); ErrorsFound = true; } } @@ -3179,22 +3165,22 @@ namespace LowTempRadiantSystem { // Index only if it provides cooling system to avoid severe error if (OpMode == ClgHtg || OpMode == ClgOnly) { PltSizCoolNum = MyPlantSizingIndex(state, CompType, - CFloRadSys(RadSysNum).Name, - CFloRadSys(RadSysNum).ColdWaterInNode, - CFloRadSys(RadSysNum).ColdWaterOutNode, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdWaterInNode, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdWaterOutNode, ErrorsFound); } if (PltSizCoolNum > 0) { if (FinalZoneSizing(CurZoneEqNum).NonAirSysDesCoolLoad >= SmallLoad) { rho = GetDensityGlycol(state, - state.dataPlnt->PlantLoop(CFloRadSys(RadSysNum).CWLoopNum).FluidName, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWLoopNum).FluidName, DataGlobalConstants::CWInitConvTemp, - state.dataPlnt->PlantLoop(CFloRadSys(RadSysNum).CWLoopNum).FluidIndex, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWLoopNum).FluidIndex, "SizeLowTempRadiantSystem"); Cp = GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(CFloRadSys(RadSysNum).CWLoopNum).FluidName, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWLoopNum).FluidName, DataGlobalConstants::CWInitConvTemp, - state.dataPlnt->PlantLoop(CFloRadSys(RadSysNum).CWLoopNum).FluidIndex, + state.dataPlnt->PlantLoop(state.dataLowTempRadSys->CFloRadSys(RadSysNum).CWLoopNum).FluidIndex, "SizeLowTempRadiantSystem"); WaterVolFlowMaxCoolDes = FinalZoneSizing(CurZoneEqNum).NonAirSysDesCoolLoad / (PlantSizData(PltSizCoolNum).DeltaT * Cp * rho); @@ -3204,7 +3190,7 @@ namespace LowTempRadiantSystem { } else { if (OpMode == ClgHtg || OpMode == ClgOnly) { ShowSevereError(state, "Autosizing of water flow requires a cooling loop Sizing:Plant object"); - ShowContinueError(state, "Occurs in ZoneHVAC:LowTemperatureRadiant:ConstantFlow Object=" + CFloRadSys(RadSysNum).Name); + ShowContinueError(state, "Occurs in ZoneHVAC:LowTemperatureRadiant:ConstantFlow Object=" + state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name); ErrorsFound = true; } } @@ -3221,14 +3207,14 @@ namespace LowTempRadiantSystem { } if (IsAutoSize) { - CFloRadSys(RadSysNum).WaterVolFlowMax = WaterVolFlowMaxDes; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).WaterVolFlowMax = WaterVolFlowMaxDes; BaseSizer::reportSizerOutput(state, - CompType, CFloRadSys(RadSysNum).Name, "Design Size Maximum Water Flow [m3/s]", WaterVolFlowMaxDes); + CompType, state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name, "Design Size Maximum Water Flow [m3/s]", WaterVolFlowMaxDes); } else { // hard-size with sizing data - if (CFloRadSys(RadSysNum).WaterVolFlowMax > 0.0 && WaterVolFlowMaxDes > 0.0) { - WaterVolFlowMaxUser = CFloRadSys(RadSysNum).WaterVolFlowMax; + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).WaterVolFlowMax > 0.0 && WaterVolFlowMaxDes > 0.0) { + WaterVolFlowMaxUser = state.dataLowTempRadSys->CFloRadSys(RadSysNum).WaterVolFlowMax; BaseSizer::reportSizerOutput(state, CompType, - CFloRadSys(RadSysNum).Name, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name, "Design Size Maximum Water Flow [m3/s]", WaterVolFlowMaxDes, "User-Specified Maximum Water Flow [m3/s]", @@ -3237,7 +3223,7 @@ namespace LowTempRadiantSystem { if ((std::abs(WaterVolFlowMaxDes - WaterVolFlowMaxUser) / WaterVolFlowMaxUser) > AutoVsHardSizingThreshold) { ShowMessage(state, "SizeLowTempRadiantSystem: Potential issue with equipment sizing for " "ZoneHVAC:LowTemperatureRadiant:ConstantFlow = \" " + - CFloRadSys(RadSysNum).Name + "\"."); + state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name + "\"."); ShowContinueError(state, format("User-Specified Maximum Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxUser)); ShowContinueError(state, format("differs from Design Size Maximum Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxDes)); @@ -3251,32 +3237,32 @@ namespace LowTempRadiantSystem { } IsAutoSize = false; - if (CFloRadSys(RadSysNum).TubeLength == AutoSize) { + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).TubeLength == AutoSize) { IsAutoSize = true; } if (CurZoneEqNum > 0) { if (!IsAutoSize && !ZoneSizingRunDone) { // simulation continue - if (CFloRadSys(RadSysNum).TubeLength > 0.0) { + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).TubeLength > 0.0) { BaseSizer::reportSizerOutput(state, "ZoneHVAC:LowTemperatureRadiant:ConstantFlow", - CFloRadSys(RadSysNum).Name, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name, "User-Specified Hydronic Tubing Length [m]", - CFloRadSys(RadSysNum).TubeLength); + state.dataLowTempRadSys->CFloRadSys(RadSysNum).TubeLength); } } else { // Autosize or hard-size with sizing run // CheckZoneSizing is not required here because the tube length calculation is not dependent on zone sizing calculation results - TubeLengthDes = CFloRadSys(RadSysNum).sizeRadiantSystemTubeLength(state); + TubeLengthDes = state.dataLowTempRadSys->CFloRadSys(RadSysNum).sizeRadiantSystemTubeLength(state); if (IsAutoSize) { - CFloRadSys(RadSysNum).TubeLength = TubeLengthDes; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).TubeLength = TubeLengthDes; BaseSizer::reportSizerOutput(state, "ZoneHVAC:LowTemperatureRadiant:ConstantFlow", - CFloRadSys(RadSysNum).Name, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name, "Design Size Hydronic Tubing Length [m]", TubeLengthDes); } else { // hard-size with sizing data - if (CFloRadSys(RadSysNum).TubeLength > 0.0 && TubeLengthDes > 0.0) { - TubeLengthUser = CFloRadSys(RadSysNum).TubeLength; + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).TubeLength > 0.0 && TubeLengthDes > 0.0) { + TubeLengthUser = state.dataLowTempRadSys->CFloRadSys(RadSysNum).TubeLength; BaseSizer::reportSizerOutput(state, "ZoneHVAC:LowTemperatureRadiant:ConstantFlow", - CFloRadSys(RadSysNum).Name, + state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name, "Design Size Hydronic Tubing Length [m]", TubeLengthDes, "User-Specified Hydronic Tubing Length [m]", @@ -3285,7 +3271,7 @@ namespace LowTempRadiantSystem { if ((std::abs(TubeLengthDes - TubeLengthUser) / TubeLengthUser) > AutoVsHardSizingThreshold) { ShowMessage(state, "SizeLowTempRadiantSystem: Potential issue with equipment sizing for " "ZoneHVAC:LowTemperatureRadiant:ConstantFlow = \" " + - CFloRadSys(RadSysNum).Name + "\"."); + state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name + "\"."); ShowContinueError(state, format("User-Specified Hydronic Tubing Length of {:.5R} [m]", TubeLengthUser)); ShowContinueError(state, format("differs from Design Size Hydronic Tubing Length of {:.5R} [m]", TubeLengthDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); @@ -3297,20 +3283,20 @@ namespace LowTempRadiantSystem { } } - for (SurfNum = 1; SurfNum <= CFloRadSys(RadSysNum).NumOfSurfaces; ++SurfNum) { - if (CFloRadSys(RadSysNum).NumCircCalcMethod == CalculateFromLength) { - CFloRadSys(RadSysNum).NumCircuits(SurfNum) = - (CFloRadSys(RadSysNum).SurfaceFrac(SurfNum) * CFloRadSys(RadSysNum).TubeLength) / CFloRadSys(RadSysNum).CircLength; - CFloRadSys(RadSysNum).NumCircuits(SurfNum) = max(CFloRadSys(RadSysNum).NumCircuits(SurfNum), 1.0); + for (SurfNum = 1; SurfNum <= state.dataLowTempRadSys->CFloRadSys(RadSysNum).NumOfSurfaces; ++SurfNum) { + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).NumCircCalcMethod == CalculateFromLength) { + state.dataLowTempRadSys->CFloRadSys(RadSysNum).NumCircuits(SurfNum) = + (state.dataLowTempRadSys->CFloRadSys(RadSysNum).SurfaceFrac(SurfNum) * state.dataLowTempRadSys->CFloRadSys(RadSysNum).TubeLength) / state.dataLowTempRadSys->CFloRadSys(RadSysNum).CircLength; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).NumCircuits(SurfNum) = max(state.dataLowTempRadSys->CFloRadSys(RadSysNum).NumCircuits(SurfNum), 1.0); } else { - CFloRadSys(RadSysNum).NumCircuits(SurfNum) = 1.0; + state.dataLowTempRadSys->CFloRadSys(RadSysNum).NumCircuits(SurfNum) = 1.0; } } - if (CFloRadSys(RadSysNum).HotWaterInNode > 0) { - RegisterPlantCompDesignFlow(CFloRadSys(RadSysNum).HotWaterInNode, CFloRadSys(RadSysNum).WaterVolFlowMax); + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterInNode > 0) { + RegisterPlantCompDesignFlow(state.dataLowTempRadSys->CFloRadSys(RadSysNum).HotWaterInNode, state.dataLowTempRadSys->CFloRadSys(RadSysNum).WaterVolFlowMax); } - if (CFloRadSys(RadSysNum).ColdWaterInNode > 0) { - RegisterPlantCompDesignFlow(CFloRadSys(RadSysNum).ColdWaterInNode, CFloRadSys(RadSysNum).WaterVolFlowMax); + if (state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdWaterInNode > 0) { + RegisterPlantCompDesignFlow(state.dataLowTempRadSys->CFloRadSys(RadSysNum).ColdWaterInNode, state.dataLowTempRadSys->CFloRadSys(RadSysNum).WaterVolFlowMax); } } @@ -3401,7 +3387,7 @@ namespace LowTempRadiantSystem { Real64 mdot; // local temporary for fluid mass flow rate bool SysRunning; // True when system is running - VarFlowRadDesignData variableFlowDesignDataObject{HydronicRadiantSysDesign(this->DesignObjectPtr)}; // Contains the data for variable flow hydronic systems + VarFlowRadDesignData variableFlowDesignDataObject{state.dataLowTempRadSys->HydronicRadiantSysDesign(this->DesignObjectPtr)}; // Contains the data for variable flow hydronic systems ControlNode = 0; MaxWaterFlow = 0.0; @@ -3592,7 +3578,7 @@ namespace LowTempRadiantSystem { Real64 ZeroFlowSurfTemp; // Temperature of radiant surface when flow is zero int ZoneNum; // Zone pointer for this radiant system - VarFlowRadDesignData variableFlowDesignDataObject{HydronicRadiantSysDesign(this->DesignObjectPtr)}; // Contains the data for variable flow hydronic systems + VarFlowRadDesignData variableFlowDesignDataObject{state.dataLowTempRadSys->HydronicRadiantSysDesign(this->DesignObjectPtr)}; // Contains the data for variable flow hydronic systems Real64 Ca; // Coefficients to relate the inlet water temperature to the heat source Real64 Cb; @@ -4101,7 +4087,7 @@ namespace LowTempRadiantSystem { int ZoneNum; // number of zone being served Real64 mdot; // local temporary for water mass flow rate kg/s - ConstantFlowRadDesignData ConstantFlowDesignDataObject{CflowRadiantSysDesign(this->DesignObjectPtr)}; // Contains the data for variable flow hydronic systems + ConstantFlowRadDesignData ConstantFlowDesignDataObject{state.dataLowTempRadSys->CflowRadiantSysDesign(this->DesignObjectPtr)}; // Contains the data for variable flow hydronic systems // initialize local variables ZoneNum = this->ZonePtr; @@ -4616,7 +4602,7 @@ namespace LowTempRadiantSystem { int ZoneNum; // number of zone being served Real64 ZoneMult; // Zone multiplier for this system - ConstantFlowRadDesignData ConstantFlowDesignDataObject{CflowRadiantSysDesign(this->DesignObjectPtr)}; // Contains the data for variable flow hydronic systems + ConstantFlowRadDesignData ConstantFlowDesignDataObject{state.dataLowTempRadSys->CflowRadiantSysDesign(this->DesignObjectPtr)}; // Contains the data for variable flow hydronic systems Real64 Ca; // Coefficients to relate the inlet water temperature to the heat source Real64 Cb; @@ -5067,7 +5053,7 @@ namespace LowTempRadiantSystem { // values are calculated and then shifted at the beginning of the next day to the tomorrow variables. It is these tomorrow variables // that are then used in the formula. So, that is why some of the assignments are done in the order that they are in below. - ConstantFlowRadDesignData constantFlowDesignDataObject{CflowRadiantSysDesign(CFloRadSys(RadSysNum).DesignObjectPtr)}; // Contains the data for constant flow hydronic systems + ConstantFlowRadDesignData constantFlowDesignDataObject{state.dataLowTempRadSys->CflowRadiantSysDesign(state.dataLowTempRadSys->CFloRadSys(RadSysNum).DesignObjectPtr)}; // Contains the data for constant flow hydronic systems if (state.dataGlobal->DayOfSim == 1 && state.dataGlobal->WarmupFlag) { // there is no "history" here--assume everything that came before was the same (this applies to design days also--weather is always the same @@ -5593,13 +5579,13 @@ namespace LowTempRadiantSystem { Real64 TubeDiameterOuter(0.0); // outside tube diameter for embedded tubing (meters) if (typeOfRadiantSystem == LowTempRadiantSystem::SystemType::HydronicSystem) { - VarFlowRadDesignData variableFlowDesignDataObject{HydronicRadiantSysDesign(DesignObjPtr)}; // Contains the data for variable flow hydronic systems + VarFlowRadDesignData variableFlowDesignDataObject{state.dataLowTempRadSys->HydronicRadiantSysDesign(DesignObjPtr)}; // Contains the data for variable flow hydronic systems FluidToSlabHeatTransfer = variableFlowDesignDataObject.FluidToSlabHeatTransfer; TubeDiameterInner = variableFlowDesignDataObject.TubeDiameterInner; TubeDiameterOuter = variableFlowDesignDataObject.TubeDiameterOuter; } if (typeOfRadiantSystem == LowTempRadiantSystem::SystemType::ConstantFlowSystem){ - ConstantFlowRadDesignData constantFlowDesignDataObject{CflowRadiantSysDesign(DesignObjPtr)}; // Contains the data for constant flow hydronic systems + ConstantFlowRadDesignData constantFlowDesignDataObject{state.dataLowTempRadSys->CflowRadiantSysDesign(DesignObjPtr)}; // Contains the data for constant flow hydronic systems FluidToSlabHeatTransfer = constantFlowDesignDataObject.FluidToSlabHeatTransfer; TubeDiameterInner = constantFlowDesignDataObject.TubeDiameterInner; TubeDiameterOuter = constantFlowDesignDataObject.TubeDiameterOuter; @@ -5713,13 +5699,13 @@ namespace LowTempRadiantSystem { Real64 TubeConductivity(0.0); if (typeOfRadiantSystem == LowTempRadiantSystem::SystemType::HydronicSystem) { - VarFlowRadDesignData variableFlowDesignDataObject{HydronicRadiantSysDesign(DesignObjPtr)}; // Contains the data for variable flow hydronic systems + VarFlowRadDesignData variableFlowDesignDataObject{state.dataLowTempRadSys->HydronicRadiantSysDesign(DesignObjPtr)}; // Contains the data for variable flow hydronic systems TubeDiameterOuter = variableFlowDesignDataObject.TubeDiameterOuter; TubeDiameterInner = variableFlowDesignDataObject.TubeDiameterInner; TubeConductivity = variableFlowDesignDataObject.VarFlowTubeConductivity; } if (typeOfRadiantSystem == LowTempRadiantSystem::SystemType::ConstantFlowSystem){ - ConstantFlowRadDesignData constantFlowDesignDataObject{CflowRadiantSysDesign(DesignObjPtr)}; // Contains the data for constant flow hydronic systems + ConstantFlowRadDesignData constantFlowDesignDataObject{state.dataLowTempRadSys->CflowRadiantSysDesign(DesignObjPtr)}; // Contains the data for constant flow hydronic systems TubeDiameterOuter = constantFlowDesignDataObject.TubeDiameterOuter; TubeDiameterInner = constantFlowDesignDataObject.TubeDiameterInner; TubeConductivity = constantFlowDesignDataObject.ConstFlowTubeConductivity; diff --git a/src/EnergyPlus/LowTempRadiantSystem.hh b/src/EnergyPlus/LowTempRadiantSystem.hh index 2f81540234c..a8a86d3209f 100644 --- a/src/EnergyPlus/LowTempRadiantSystem.hh +++ b/src/EnergyPlus/LowTempRadiantSystem.hh @@ -429,6 +429,9 @@ namespace LowTempRadiantSystem { Array1D_string FieldNames; int CondCtrlType = 1; // Condensation control type (initialize to simple off) Real64 CondDewPtDeltaT = 1.0; // Diff between surface temperature and dew point for cond. shut-off + + ConstantFlowRadDesignData() = default; + ~ConstantFlowRadDesignData() = default; }; struct ElectricRadiantSystemData : RadiantSystemBaseData @@ -492,17 +495,6 @@ namespace LowTempRadiantSystem { } }; - // Object Data - extern Array1D HydrRadSys; - extern Array1D CFloRadSys; - extern Array1D ElecRadSys; - extern Array1D RadSysTypes; - extern Array1D ElecRadSysNumericFields; - extern Array1D HydronicRadiantSysNumericFields; - - extern Array1D HydronicRadiantSysDesign; - extern Array1D CflowRadiantSysDesign; - // Functions void clear_state(); @@ -532,9 +524,27 @@ namespace LowTempRadiantSystem { struct LowTempRadiantSystemData : BaseGlobalStruct { + // Object Data + Array1D HydrRadSys; + Array1D CFloRadSys; + Array1D ElecRadSys; + Array1D RadSysTypes; + Array1D ElecRadSysNumericFields; + Array1D HydronicRadiantSysNumericFields; + Array1D CflowRadiantSysDesign; + Array1D HydronicRadiantSysDesign; + + void clear_state() override { - + HydrRadSys.clear(); + CFloRadSys.clear(); + ElecRadSys.clear(); + RadSysTypes.clear(); + ElecRadSysNumericFields.clear(); + HydronicRadiantSysNumericFields.clear(); + HydronicRadiantSysDesign.clear(); + CflowRadiantSysDesign.clear(); } }; diff --git a/src/EnergyPlus/OutputReportTabular.cc b/src/EnergyPlus/OutputReportTabular.cc index 7436e830bb9..584bf86adab 100644 --- a/src/EnergyPlus/OutputReportTabular.cc +++ b/src/EnergyPlus/OutputReportTabular.cc @@ -4570,9 +4570,6 @@ namespace EnergyPlus::OutputReportTabular { using DataHVACGlobals::TimeStepSys; using General::DetermineMinuteForReporting; using General::EncodeMonDayHrMin; - using LowTempRadiantSystem::CFloRadSys; - using LowTempRadiantSystem::ElecRadSys; - using LowTempRadiantSystem::HydrRadSys; using LowTempRadiantSystem::NumOfCFloLowTempRadSys; using LowTempRadiantSystem::NumOfElecLowTempRadSys; using LowTempRadiantSystem::NumOfHydrLowTempRadSys; @@ -4694,31 +4691,31 @@ namespace EnergyPlus::OutputReportTabular { } } for (iRadiant = 1; iRadiant <= NumOfHydrLowTempRadSys; ++iRadiant) { - curZone = HydrRadSys(iRadiant).ZonePtr; + curZone = state.dataLowTempRadSys->HydrRadSys(iRadiant).ZonePtr; mult = Zone(curZone).Multiplier * Zone(curZone).ListMultiplier; if ((curZone > 0) && (curZone <= state.dataGlobal->NumOfZones)) { - ZonePreDefRep(curZone).SHGSAnSurfHt += HydrRadSys(iRadiant).HeatEnergy * mult; - ZonePreDefRep(curZone).SHGSAnSurfCl -= HydrRadSys(iRadiant).CoolEnergy * mult; - radiantHeat(curZone) += HydrRadSys(iRadiant).HeatPower * mult; - radiantCool(curZone) -= HydrRadSys(iRadiant).CoolPower * mult; + ZonePreDefRep(curZone).SHGSAnSurfHt += state.dataLowTempRadSys->HydrRadSys(iRadiant).HeatEnergy * mult; + ZonePreDefRep(curZone).SHGSAnSurfCl -= state.dataLowTempRadSys->HydrRadSys(iRadiant).CoolEnergy * mult; + radiantHeat(curZone) += state.dataLowTempRadSys->HydrRadSys(iRadiant).HeatPower * mult; + radiantCool(curZone) -= state.dataLowTempRadSys->HydrRadSys(iRadiant).CoolPower * mult; } } for (iRadiant = 1; iRadiant <= NumOfCFloLowTempRadSys; ++iRadiant) { - curZone = CFloRadSys(iRadiant).ZonePtr; + curZone = state.dataLowTempRadSys->CFloRadSys(iRadiant).ZonePtr; mult = Zone(curZone).Multiplier * Zone(curZone).ListMultiplier; if ((curZone > 0) && (curZone <= state.dataGlobal->NumOfZones)) { - ZonePreDefRep(curZone).SHGSAnSurfHt += CFloRadSys(iRadiant).HeatEnergy * mult; - ZonePreDefRep(curZone).SHGSAnSurfCl -= CFloRadSys(iRadiant).CoolEnergy * mult; - radiantHeat(curZone) += CFloRadSys(iRadiant).HeatPower * mult; - radiantCool(curZone) -= CFloRadSys(iRadiant).CoolPower * mult; + ZonePreDefRep(curZone).SHGSAnSurfHt += state.dataLowTempRadSys->CFloRadSys(iRadiant).HeatEnergy * mult; + ZonePreDefRep(curZone).SHGSAnSurfCl -= state.dataLowTempRadSys->CFloRadSys(iRadiant).CoolEnergy * mult; + radiantHeat(curZone) += state.dataLowTempRadSys->CFloRadSys(iRadiant).HeatPower * mult; + radiantCool(curZone) -= state.dataLowTempRadSys->CFloRadSys(iRadiant).CoolPower * mult; } } for (iRadiant = 1; iRadiant <= NumOfElecLowTempRadSys; ++iRadiant) { - curZone = ElecRadSys(iRadiant).ZonePtr; + curZone = state.dataLowTempRadSys->ElecRadSys(iRadiant).ZonePtr; mult = Zone(curZone).Multiplier * Zone(curZone).ListMultiplier; if ((curZone > 0) && (curZone <= state.dataGlobal->NumOfZones)) { - ZonePreDefRep(curZone).SHGSAnSurfHt += ElecRadSys(iRadiant).HeatEnergy * mult; - radiantHeat(curZone) += ElecRadSys(iRadiant).HeatPower * mult; + ZonePreDefRep(curZone).SHGSAnSurfHt += state.dataLowTempRadSys->ElecRadSys(iRadiant).HeatEnergy * mult; + radiantHeat(curZone) += state.dataLowTempRadSys->ElecRadSys(iRadiant).HeatPower * mult; } } // Opaque Surface Conduction and Other Heat Addition