diff --git a/src/EnergyPlus/GroundHeatExchangers.cc b/src/EnergyPlus/GroundHeatExchangers.cc index 9e112f4aac5..0fbd263115b 100644 --- a/src/EnergyPlus/GroundHeatExchangers.cc +++ b/src/EnergyPlus/GroundHeatExchangers.cc @@ -62,7 +62,6 @@ #include #include #include -#include #include #include #include @@ -79,9 +78,7 @@ #include #include -namespace EnergyPlus { - -namespace GroundHeatExchangers { +namespace EnergyPlus::GroundHeatExchangers { // MODULE INFORMATION: // AUTHOR Arun Murugappan, Dan Fisher // DATE WRITTEN September 2000 @@ -122,71 +119,432 @@ namespace GroundHeatExchangers { using namespace GroundTemperatureManager; // MODULE PARAMETER DEFINITIONS - Real64 const hrsPerDay(24.0); // Number of hours in a day - Real64 const hrsPerMonth(730.0); // Number of hours in month - int const maxTSinHr(60); // Max number of time step in a hour - - // MODULE VARIABLE DECLARATIONS: - int numVerticalGLHEs(0); - int numSlinkyGLHEs(0); - int numVertArray(0); - int numVertProps(0); - int numResponseFactors(0); - int numSingleBorehole(0); - - int N(1); // COUNTER OF TIME STEP - Real64 currentSimTime(0.0); // Current simulation time in hours - int locHourOfDay(0); - int locDayOfSim(0); - bool GetInput(true); - bool errorsFound(false); - - int numAutoGeneratedResponseFactors(0); - - Array1D prevTimeSteps; // This is used to store only the Last Few time step's time - // to enable the calculation of the sub-hourly contribution.. - // Recommended size, the product of Minimum sub-hourly history required and - // the maximum no of system time steps in an hour - - // Object Data - std::vector verticalGLHE; - std::vector slinkyGLHE; - std::vector> vertArraysVector; - std::vector> vertPropsVector; - std::vector> responseFactorsVector; - std::vector> singleBoreholesVector; + constexpr Real64 hrsPerMonth(730.0); // Number of hours in month + constexpr Real64 maxTSinHr(60); // Max number of time step in a hour + + //****************************************************************************** + + GLHESlinky::GLHESlinky(EnergyPlusData &state, std::string const &objName, nlohmann::json const &j) + { + // Check for duplicates + for (auto &existingObj : state.dataGroundHeatExchanger->singleBoreholesVector) { + if (objName == existingObj->name) { + ShowFatalError(state, "Invalid input for " + this->moduleName + " object: Duplicate name found: " + existingObj->name); + } + } + + bool errorsFound = false; + + this->name = objName; + + std::string inletNodeName = UtilityRoutines::MakeUPPERCase(j["inlet_node_name"]); + std::string outletNodeName = UtilityRoutines::MakeUPPERCase(j["outlet_node_name"]); + + // get inlet node num + this->inletNodeNum = NodeInputManager::GetOnlySingleNode( + state, inletNodeName, errorsFound, this->moduleName, this->name, NodeType_Water, NodeConnectionType_Inlet, 1, ObjectIsNotParent); + + // get outlet node num + this->outletNodeNum = NodeInputManager::GetOnlySingleNode( + state, outletNodeName, errorsFound, this->moduleName, this->name, NodeType_Water, NodeConnectionType_Outlet, 1, ObjectIsNotParent); + + this->available = true; + this->on = true; + + BranchNodeConnections::TestCompSet(state, this->moduleName, this->name, inletNodeName, outletNodeName, "Condenser Water Nodes"); + + // load data + this->designFlow = j["design_flow_rate"]; + PlantUtilities::RegisterPlantCompDesignFlow(this->inletNodeNum, this->designFlow); + + this->soil.k = j["soil_thermal_conductivity"]; + this->soil.rho = j["soil_density"]; + this->soil.cp = j["soil_specific_heat"]; + this->soil.rhoCp = this->soil.rho * this->soil.cp; + this->pipe.k = j["pipe_thermal_conductivity"]; + this->pipe.rho = j["pipe_density"]; + this->pipe.cp = j["pipe_specific_heat"]; + this->pipe.outDia = j["pipe_outer_diameter"]; + this->pipe.outRadius = this->pipe.outDia / 2.0; + this->pipe.thickness = j["pipe_thickness"]; + + std::string const hxConfig = UtilityRoutines::MakeUPPERCase(j["heat_exchanger_configuration"]); + if (UtilityRoutines::SameString(hxConfig, "VERTICAL")) { + this->verticalConfig = true; + } else if (UtilityRoutines::SameString(hxConfig, "HORIZONTAL")) { + this->verticalConfig = false; + } + + this->coilDiameter = j["coil_diameter"]; + this->coilPitch = j["coil_pitch"]; + this->trenchDepth = j["trench_depth"]; + this->trenchLength = j["trench_length"]; + this->numTrenches = j["number_of_trenches"]; + this->trenchSpacing = j["horizontal_spacing_between_pipes"]; + this->maxSimYears = j["maximum_length_of_simulation"]; + + // Need to add a response factor object for the slinky model + std::shared_ptr thisRF(new GLHEResponseFactors); + thisRF->name = + "Response Factor Object Auto Generated No: " + fmt::to_string(state.dataGroundHeatExchanger->numAutoGeneratedResponseFactors + 1); + this->myRespFactors = thisRF; + state.dataGroundHeatExchanger->responseFactorsVector.push_back(thisRF); + + // Number of coils + this->numCoils = static_cast(this->trenchLength / this->coilPitch); + + // Total tube length + this->totalTubeLength = DataGlobalConstants::Pi * this->coilDiameter * this->trenchLength * this->numTrenches / this->coilPitch; + + // Get g function data + this->SubAGG = 15; + this->AGG = 192; + + // Average coil depth + if (this->verticalConfig) { + // Vertical configuration + if (this->trenchDepth - this->coilDiameter < 0.0) { + // Error: part of the coil is above ground + ShowSevereError(state, this->moduleName + "=\"" + this->name + "\", invalid value in field."); + ShowContinueError(state, format("...{}=[{:.3R}].", "Trench Depth", this->trenchDepth)); + ShowContinueError(state, format("...{}=[{:.3R}].", "Coil Depth", this->coilDepth)); + ShowContinueError(state, "...Part of coil will be above ground."); + errorsFound = true; + + } else { + // Entire coil is below ground + this->coilDepth = this->trenchDepth - (this->coilDiameter / 2.0); + } + + } else { + // Horizontal configuration + this->coilDepth = this->trenchDepth; + } + + // Thermal diffusivity of the ground + this->soil.diffusivity = this->soil.k / this->soil.rhoCp; + + state.dataGroundHeatExchanger->prevTimeSteps.allocate(static_cast((this->SubAGG + 1) * maxTSinHr + 1)); + state.dataGroundHeatExchanger->prevTimeSteps = 0.0; + + if (this->pipe.thickness >= this->pipe.outDia / 2.0) { + ShowSevereError(state, this->moduleName + "=\"" + this->name + "\", invalid value in field."); + ShowContinueError(state, format("...{}=[{:.3R}].", "Pipe Thickness", this->pipe.thickness)); + ShowContinueError(state, format("...{}=[{:.3R}].", "Pipe Outer Diameter", this->pipe.outDia)); + ShowContinueError(state, "...Radius will be <=0."); + errorsFound = true; + } + + // Initialize ground temperature model and get pointer reference + std::string const gtmType = UtilityRoutines::MakeUPPERCase(j["undisturbed_ground_temperature_model_type"]); + std::string const gtmName = UtilityRoutines::MakeUPPERCase(j["undisturbed_ground_temperature_model_name"]); + this->groundTempModel = GetGroundTempModelAndInit(state, gtmType, gtmName); + if (this->groundTempModel) { + errorsFound = this->groundTempModel->errorsFound; + } + + // Check for Errors + if (errorsFound) { + ShowFatalError(state, "Errors found in processing input for " + this->moduleName); + } + } + + //****************************************************************************** + + GLHEVert::GLHEVert(EnergyPlusData &state, std::string const &objName, nlohmann::json const &j) + { + // Check for duplicates + for (auto &existingObj : state.dataGroundHeatExchanger->singleBoreholesVector) { + if (objName == existingObj->name) { + ShowFatalError(state, "Invalid input for " + this->moduleName + " object: Duplicate name found: " + existingObj->name); + } + } + + bool errorsFound = false; + + this->name = objName; + + // get inlet node num + std::string const inletNodeName = UtilityRoutines::MakeUPPERCase(j["inlet_node_name"]); + this->inletNodeNum = NodeInputManager::GetOnlySingleNode(state, + inletNodeName, + errorsFound, + this->moduleName, + objName, + NodeType_Water, + NodeConnectionType_Inlet, + 1, + ObjectIsNotParent); + + // get outlet node num + std::string const outletNodeName = UtilityRoutines::MakeUPPERCase(j["outlet_node_name"]); + this->outletNodeNum = NodeInputManager::GetOnlySingleNode(state, + outletNodeName, + errorsFound, + this->moduleName, + objName, + NodeType_Water, + NodeConnectionType_Outlet, + 1, + ObjectIsNotParent); + this->available = true; + this->on = true; + + BranchNodeConnections::TestCompSet(state, this->moduleName, objName, inletNodeName, outletNodeName, "Condenser Water Nodes"); + + this->designFlow = j["design_flow_rate"]; + PlantUtilities::RegisterPlantCompDesignFlow(this->inletNodeNum, this->designFlow); + + this->soil.k = j["ground_thermal_conductivity"]; + this->soil.rhoCp = j["ground_thermal_heat_capacity"]; + + if (j.find("ghe_vertical_responsefactors_object_name") != j.end()) { + // Response factors come from IDF object + this->myRespFactors = GetResponseFactor(state, UtilityRoutines::MakeUPPERCase(j["ghe_vertical_responsefactors_object_name"])); + this->gFunctionsExist = true; + + if (!this->myRespFactors) { + errorsFound = true; + ShowSevereError(state, "GroundHeatExchanger:ResponseFactors object not found."); + } + } else if (j.find("ghe_vertical_array_object_name") != j.end()) { + // Response factors come from array object + this->myRespFactors = BuildAndGetResponseFactorObjectFromArray( + state, GetVertArray(state, UtilityRoutines::MakeUPPERCase(j["ghe_vertical_array_object_name"]))); + + if (!this->myRespFactors) { + errorsFound = true; + ShowSevereError(state, "GroundHeatExchanger:Vertical:Array object not found."); + } + } else { + if (j.find("vertical_well_locations") == j.end()) { + // No ResponseFactors, GHEArray, or SingleBH object are referenced + ShowSevereError(state, "No GHE:ResponseFactors, GHE:Vertical:Array, or GHE:Vertical:Single objects found"); + ShowFatalError(state, "Check references to these objects for GHE:System object: " + this->name); + } + + auto const vars = j.at("vertical_well_locations"); + + // Calculate response factors from individual boreholes + std::vector> tempVectOfBHObjects; + + for (auto const &var : vars) { + if (!var.at("ghe_vertical_single_object_name").empty()) { + std::shared_ptr tempBHptr = + GetSingleBH(state, UtilityRoutines::MakeUPPERCase(var.at("ghe_vertical_single_object_name"))); + if (tempBHptr) { + tempVectOfBHObjects.push_back(tempBHptr); + } else { + errorsFound = true; + std::string const tmpName = var.at("ghe_vertical_single_object_name"); + ShowSevereError(state, "Borehole= " + tmpName + " not found."); + break; + } + } else { + break; + } + } + + this->myRespFactors = BuildAndGetResponseFactorsObjectFromSingleBHs(state, tempVectOfBHObjects); + + if (!this->myRespFactors) { + errorsFound = true; + ShowSevereError(state, "GroundHeatExchanger:Vertical:Single objects not found."); + } + } + + this->bhDiameter = this->myRespFactors->props->bhDiameter; + this->bhRadius = this->bhDiameter / 2.0; + this->bhLength = this->myRespFactors->props->bhLength; + this->bhUTubeDist = this->myRespFactors->props->bhUTubeDist; + + // pull pipe and grout data up from response factor struct for simplicity + this->pipe.outDia = this->myRespFactors->props->pipe.outDia; + this->pipe.innerDia = this->myRespFactors->props->pipe.innerDia; + this->pipe.outRadius = this->pipe.outDia / 2; + this->pipe.innerRadius = this->pipe.innerDia / 2; + this->pipe.thickness = this->myRespFactors->props->pipe.thickness; + this->pipe.k = this->myRespFactors->props->pipe.k; + this->pipe.rhoCp = this->myRespFactors->props->pipe.rhoCp; + + this->grout.k = this->myRespFactors->props->grout.k; + this->grout.rhoCp = this->myRespFactors->props->grout.rhoCp; + + this->myRespFactors->gRefRatio = this->bhRadius / this->bhLength; + + // Number of simulation years from RunPeriod + this->myRespFactors->maxSimYears = state.dataEnvrn->MaxNumberSimYears; + + // total tube length + this->totalTubeLength = this->myRespFactors->numBoreholes * this->myRespFactors->props->bhLength; + + // ground thermal diffusivity + this->soil.diffusivity = this->soil.k / this->soil.rhoCp; + + // multipole method constants + this->theta_1 = this->bhUTubeDist / (2 * this->bhRadius); + this->theta_2 = this->bhRadius / this->pipe.outRadius; + this->theta_3 = 1 / (2 * this->theta_1 * this->theta_2); + this->sigma = (this->grout.k - this->soil.k) / (this->grout.k + this->soil.k); + + this->SubAGG = 15; + this->AGG = 192; + + // Allocation of all the dynamic arrays + this->QnMonthlyAgg.dimension(static_cast(this->myRespFactors->maxSimYears * 12), 0.0); + this->QnHr.dimension(730 + this->AGG + this->SubAGG, 0.0); + this->QnSubHr.dimension(static_cast((this->SubAGG + 1) * maxTSinHr + 1), 0.0); + this->LastHourN.dimension(this->SubAGG + 1, 0); + + state.dataGroundHeatExchanger->prevTimeSteps.allocate(static_cast((this->SubAGG + 1) * maxTSinHr + 1)); + state.dataGroundHeatExchanger->prevTimeSteps = 0.0; + + // Initialize ground temperature model and get pointer reference + this->groundTempModel = GetGroundTempModelAndInit(state, + UtilityRoutines::MakeUPPERCase(j["undisturbed_ground_temperature_model_type"]), + UtilityRoutines::MakeUPPERCase(j["undisturbed_ground_temperature_model_name"])); + if (this->groundTempModel) { + errorsFound = this->groundTempModel->errorsFound; + } + + // Check for Errors + if (errorsFound) { + ShowFatalError(state, "Errors found in processing input for " + this->moduleName); + } + } //****************************************************************************** - void clear_state() + GLHEVertSingle::GLHEVertSingle(EnergyPlusData &state, std::string const &objName, nlohmann::json const &j) { - numVerticalGLHEs = 0; - numSlinkyGLHEs = 0; - numVertArray = 0; - numVertProps = 0; - numResponseFactors = 0; - numSingleBorehole = 0; - N = 1; - currentSimTime = 0.0; - locHourOfDay = 0; - locDayOfSim = 0; - GetInput = true; - errorsFound = false; - prevTimeSteps.deallocate(); - verticalGLHE.clear(); - slinkyGLHE.clear(); - vertArraysVector.clear(); - vertPropsVector.clear(); - responseFactorsVector.clear(); - singleBoreholesVector.clear(); + // Check for duplicates + for (auto &existingObj : state.dataGroundHeatExchanger->singleBoreholesVector) { + if (objName == existingObj->name) { + ShowFatalError(state, "Invalid input for " + this->moduleName + " object: Duplicate name found: " + existingObj->name); + } + } + + this->name = objName; + this->props = GetVertProps(state, UtilityRoutines::MakeUPPERCase(j["ghe_vertical_properties_object_name"])); + this->xLoc = j["x_location"]; + this->yLoc = j["y_location"]; + this->dl_i = 0.0; + this->dl_ii = 0.0; + this->dl_j = 0.0; } //****************************************************************************** - std::shared_ptr GetVertProps(std::string const &objectName) + GLHEVertArray::GLHEVertArray(EnergyPlusData &state, std::string const &objName, nlohmann::json const &j) + { + // Check for duplicates + for (auto &existingObj : state.dataGroundHeatExchanger->vertArraysVector) { + if (objName == existingObj->name) { + ShowFatalError(state, "Invalid input for " + this->moduleName + " object: Duplicate name found: " + existingObj->name); + } + } + + this->name = objName; + this->props = GetVertProps(state, UtilityRoutines::MakeUPPERCase(j["ghe_vertical_properties_object_name"])); + this->numBHinXDirection = j["number_of_boreholes_in_x_direction"]; + this->numBHinYDirection = j["number_of_boreholes_in_y_direction"]; + this->bhSpacing = j["borehole_spacing"]; + } + + //****************************************************************************** + + GLHEResponseFactors::GLHEResponseFactors(EnergyPlusData &state, std::string const &objName, nlohmann::json const &j) + { + + // Check for duplicates + for (auto &existingObj : state.dataGroundHeatExchanger->vertPropsVector) { + if (objName == existingObj->name) { + ShowFatalError(state, "Invalid input for " + this->moduleName + " object: Duplicate name found: " + existingObj->name); + } + } + + this->name = objName; + this->props = GetVertProps(state, UtilityRoutines::MakeUPPERCase(j["ghe_vertical_properties_object_name"])); + this->numBoreholes = j["number_of_boreholes"]; + this->gRefRatio = j["g_function_reference_ratio"]; + this->maxSimYears = state.dataEnvrn->MaxNumberSimYears; + + auto const vars = j.at("g_functions"); + std::vector tmpLntts; + std::vector tmpGvals; + for (auto const &var : vars) { + tmpLntts.push_back(var.at("g_function_ln_t_ts_value")); + tmpGvals.push_back(var.at("g_function_g_value")); + } + + bool errorsFound = false; + + if (tmpLntts.size() == tmpLntts.size()) { + this->numGFuncPairs = static_cast(tmpLntts.size()); + } else { + errorsFound = true; + ShowSevereError(state, "Errors found processing response factor input for Response Factor= " + this->name); + ShowSevereError(state, "Uneven number of g-function pairs"); + } + + this->LNTTS.dimension(this->numGFuncPairs, 0.0); + this->GFNC.dimension(this->numGFuncPairs, 0.0); + + for (size_t i = 1; i <= tmpLntts.size(); ++i) { + this->LNTTS(i) = tmpLntts[i - 1]; + this->GFNC(i) = tmpGvals[i - 1]; + } + + if (errorsFound) { + ShowFatalError(state, "Errors found in processing input for " + this->moduleName); + } + } + + //****************************************************************************** + + GLHEVertProps::GLHEVertProps(EnergyPlusData &state, std::string const &objName, nlohmann::json const &j) + { + + // Check for duplicates + for (auto &existingObj : state.dataGroundHeatExchanger->vertPropsVector) { + if (objName == existingObj->name) { + ShowFatalError(state, "Invalid input for " + this->moduleName + " object: Duplicate name found: " + existingObj->name); + } + } + + // Load data from JSON + this->name = objName; + this->bhTopDepth = j["depth_of_top_of_borehole"]; + this->bhLength = j["borehole_length"]; + this->bhDiameter = j["borehole_diameter"]; + this->grout.k = j["grout_thermal_conductivity"]; + this->grout.rhoCp = j["grout_thermal_heat_capacity"]; + this->pipe.k = j["pipe_thermal_conductivity"]; + this->pipe.rhoCp = j["pipe_thermal_heat_capacity"]; + this->pipe.outDia = j["pipe_outer_diameter"]; + this->pipe.thickness = j["pipe_thickness"]; + this->bhUTubeDist = j["u_tube_distance"]; + + // Verify u-tube spacing is valid + if (this->bhUTubeDist < this->pipe.outDia) { + ShowWarningError(state, + "Borehole shank spacing is less than the pipe diameter. U-tube spacing is reference from the u-tube pipe center."); + ShowWarningError(state, "Shank spacing is set to the outer pipe diameter."); + this->bhUTubeDist = this->pipe.outDia; + } + + // Set remaining data derived from previous inputs + this->pipe.innerDia = this->pipe.outDia - 2 * this->pipe.thickness; + this->pipe.outRadius = this->pipe.outDia / 2; + this->pipe.innerRadius = this->pipe.innerDia / 2; + } + + //****************************************************************************** + + std::shared_ptr GetVertProps(EnergyPlusData &state, std::string const &objectName) { // Check if this instance of this model has already been retrieved - for (auto &thisProp : vertPropsVector) { + for (auto &thisProp : state.dataGroundHeatExchanger->vertPropsVector) { // Check if the type and name match if (objectName == thisProp->name) { return thisProp; @@ -198,10 +556,10 @@ namespace GroundHeatExchangers { //****************************************************************************** - std::shared_ptr GetSingleBH(std::string const &objectName) + std::shared_ptr GetSingleBH(EnergyPlusData &state, std::string const &objectName) { // Check if this instance of this model has already been retrieved - for (auto &thisBH : singleBoreholesVector) { + for (auto &thisBH : state.dataGroundHeatExchanger->singleBoreholesVector) { // Check if the type and name match if (objectName == thisBH->name) { return thisBH; @@ -213,10 +571,10 @@ namespace GroundHeatExchangers { //****************************************************************************** - std::shared_ptr GetVertArray(std::string const &objectName) + std::shared_ptr GetVertArray(EnergyPlusData &state, std::string const &objectName) { // Check if this instance of this model has already been retrieved - for (auto &thisProp : vertArraysVector) { + for (auto &thisProp : state.dataGroundHeatExchanger->vertArraysVector) { // Check if the type and name match if (objectName == thisProp->name) { return thisProp; @@ -228,10 +586,10 @@ namespace GroundHeatExchangers { //****************************************************************************** - std::shared_ptr GetResponseFactor(std::string const &objectName) + std::shared_ptr GetResponseFactor(EnergyPlusData &state, std::string const &objectName) { // Check if this instance of this model has already been retrieved - for (auto &thisRF : responseFactorsVector) { + for (auto &thisRF : state.dataGroundHeatExchanger->responseFactorsVector) { // Check if the type and name match if (objectName == thisRF->name) { return thisRF; @@ -243,10 +601,11 @@ namespace GroundHeatExchangers { //****************************************************************************** - std::shared_ptr BuildAndGetResponseFactorObjectFromArray(std::shared_ptr const &arrayObjectPtr) + std::shared_ptr BuildAndGetResponseFactorObjectFromArray(EnergyPlusData &state, + std::shared_ptr const &arrayObjectPtr) { // Make new response factor object and store it for later use - std::shared_ptr thisRF(new GLHEResponseFactorsStruct); + std::shared_ptr thisRF(new GLHEResponseFactors); thisRF->name = arrayObjectPtr->name; thisRF->props = arrayObjectPtr->props; @@ -257,13 +616,13 @@ namespace GroundHeatExchangers { int yLoc = 0; for (int yBH = 1; yBH <= arrayObjectPtr->numBHinYDirection; ++yBH) { bhCounter += 1; - std::shared_ptr thisBH(new GLHEVertSingleStruct); + std::shared_ptr thisBH(new GLHEVertSingle); thisBH->name = format("{} BH {} loc: ({}, {})", thisRF->name, bhCounter, xLoc, yLoc); - thisBH->props = GetVertProps(arrayObjectPtr->props->name); + thisBH->props = GetVertProps(state, arrayObjectPtr->props->name); thisBH->xLoc = xLoc; thisBH->yLoc = yLoc; thisRF->myBorholes.push_back(thisBH); - singleBoreholesVector.push_back(thisBH); + state.dataGroundHeatExchanger->singleBoreholesVector.push_back(thisBH); yLoc += arrayObjectPtr->bhSpacing; thisRF->numBoreholes += 1; } @@ -271,24 +630,25 @@ namespace GroundHeatExchangers { } SetupBHPointsForResponseFactorsObject(thisRF); - responseFactorsVector.push_back(thisRF); + state.dataGroundHeatExchanger->responseFactorsVector.push_back(thisRF); return thisRF; } //****************************************************************************** - std::shared_ptr - BuildAndGetResponseFactorsObjectFromSingleBHs(std::vector> const &singleBHsForRFVect) + std::shared_ptr + BuildAndGetResponseFactorsObjectFromSingleBHs(EnergyPlusData &state, std::vector> const &singleBHsForRFVect) { // Make new response factor object and store it for later use - std::shared_ptr thisRF(new GLHEResponseFactorsStruct); - thisRF->name = format("Response Factor Object Auto Generated No: {}", numAutoGeneratedResponseFactors + 1); + std::shared_ptr thisRF(new GLHEResponseFactors); + thisRF->name = format("Response Factor Object Auto Generated No: {}", state.dataGroundHeatExchanger->numAutoGeneratedResponseFactors + 1); // Make new props object which has the mean values of the other props objects referenced by the individual BH objects - std::shared_ptr thisProps(new GLHEVertPropsStruct); - thisProps->name = format("Response Factor Auto Generated Mean Props No: {}", numAutoGeneratedResponseFactors + 1); + std::shared_ptr thisProps(new GLHEVertProps); + thisProps->name = + format("Response Factor Auto Generated Mean Props No: {}", state.dataGroundHeatExchanger->numAutoGeneratedResponseFactors + 1); int numBH = singleBHsForRFVect.size(); - for (auto &thisBH : singleBoreholesVector) { + for (auto &thisBH : state.dataGroundHeatExchanger->singleBoreholesVector) { thisProps->bhDiameter += thisBH->props->bhDiameter; thisProps->bhLength += thisBH->props->bhLength; thisProps->bhTopDepth += thisBH->props->bhTopDepth; @@ -339,28 +699,28 @@ namespace GroundHeatExchangers { thisRF->props = thisProps; thisRF->numBoreholes = thisRF->myBorholes.size(); - vertPropsVector.push_back(thisProps); + state.dataGroundHeatExchanger->vertPropsVector.push_back(thisProps); SetupBHPointsForResponseFactorsObject(thisRF); - responseFactorsVector.push_back(thisRF); + state.dataGroundHeatExchanger->responseFactorsVector.push_back(thisRF); - numAutoGeneratedResponseFactors += 1; + state.dataGroundHeatExchanger->numAutoGeneratedResponseFactors += 1; return thisRF; } //****************************************************************************** - void SetupBHPointsForResponseFactorsObject(std::shared_ptr &thisRF) + void SetupBHPointsForResponseFactorsObject(std::shared_ptr &thisRF) { for (auto &thisBH : thisRF->myBorholes) { // Using Simpson's rule the number of points (n+1) must be odd, therefore an even number of panels is required // Starting from i = 0 to i <= NumPanels produces an odd number of points - int numPanels_i = 50; - int numPanels_ii = 50; - int numPanels_j = 560; + constexpr int numPanels_i = 50; + constexpr int numPanels_ii = 50; + constexpr int numPanels_j = 560; thisBH->dl_i = thisBH->props->bhLength / numPanels_i; for (int i = 0; i <= numPanels_i; ++i) { @@ -408,6 +768,11 @@ namespace GroundHeatExchangers { [[maybe_unused]] bool const RunFlag) { + if (this->needToSetupOutputVars) { + this->setupOutput(state); + this->needToSetupOutputVars = false; + } + if (state.dataGlobal->KickOffSimulation) { this->initGLHESimVars(state); } else { @@ -419,25 +784,26 @@ namespace GroundHeatExchangers { //****************************************************************************** - PlantComponent *GLHEBase::factory(EnergyPlusData &state, int const objectType, std::string objectName) + PlantComponent *GLHEBase::factory(EnergyPlusData &state, int const objectType, std::string const &objectName) { - if (GetInput) { + if (state.dataGroundHeatExchanger->GetInput) { GetGroundHeatExchangerInput(state); - GetInput = false; + state.dataGroundHeatExchanger->GetInput = false; } if (objectType == DataPlant::TypeOf_GrndHtExchgSystem) { - for (auto &ghx : verticalGLHE) { + for (auto &ghx : state.dataGroundHeatExchanger->verticalGLHE) { if (ghx.name == objectName) { return &ghx; } } } else if (objectType == DataPlant::TypeOf_GrndHtExchgSlinky) { - for (auto &ghx : slinkyGLHE) { + for (auto &ghx : state.dataGroundHeatExchanger->slinkyGLHE) { if (ghx.name == objectName) { return &ghx; } } } + // If we didn't find it, fatal ShowFatalError(state, "Ground Heat Exchanger Factory: Error getting inputs for GHX named: " + objectName); // Shut up the compiler @@ -475,15 +841,15 @@ namespace GroundHeatExchangers { Real64 GLHEVert::calcResponse(std::vector const &dists, Real64 const &currTime) { - Real64 pointToPointResponse = erfc(dists[0] / (2 * sqrt(soil.diffusivity * currTime))) / dists[0]; - Real64 pointToReflectedResponse = erfc(dists[1] / (2 * sqrt(soil.diffusivity * currTime))) / dists[1]; + Real64 pointToPointResponse = erfc(dists[0] / (2 * sqrt(this->soil.diffusivity * currTime))) / dists[0]; + Real64 pointToReflectedResponse = erfc(dists[1] / (2 * sqrt(this->soil.diffusivity * currTime))) / dists[1]; return pointToPointResponse - pointToReflectedResponse; } //****************************************************************************** - Real64 GLHEVert::integral(MyCartesian const &point_i, std::shared_ptr const &bh_j, Real64 const &currTime) + Real64 GLHEVert::integral(MyCartesian const &point_i, std::shared_ptr const &bh_j, Real64 const &currTime) { // This code could be optimized in a number of ways. @@ -493,22 +859,22 @@ namespace GroundHeatExchangers { // Simpson's method. After that, all points are summed together and divided by 3. Real64 sum_f = 0; - int index = 0; - int const lastIndex_j = bh_j->pointLocations_j.size() - 1; + int i = 0; + int const lastIndex_j = static_cast(bh_j->pointLocations_j.size() - 1u); for (auto &point_j : bh_j->pointLocations_j) { std::vector dists = distances(point_i, point_j); Real64 const f = calcResponse(dists, currTime); // Integrate using Simpson's - if (index == 0 || index == lastIndex_j) { + if (i == 0 || i == lastIndex_j) { sum_f += f; - } else if (isEven(index)) { + } else if (isEven(i)) { sum_f += 2 * f; } else { sum_f += 4 * f; } - ++index; + ++i; } return (bh_j->dl_j / 3.0) * sum_f; @@ -516,8 +882,8 @@ namespace GroundHeatExchangers { //****************************************************************************** - Real64 GLHEVert::doubleIntegral(std::shared_ptr const &bh_i, - std::shared_ptr const &bh_j, + Real64 GLHEVert::doubleIntegral(std::shared_ptr const &bh_i, + std::shared_ptr const &bh_j, Real64 const &currTime) { @@ -526,22 +892,22 @@ namespace GroundHeatExchangers { if (bh_i == bh_j) { Real64 sum_f = 0; - int index = 0; - int const lastIndex = bh_i->pointLocations_ii.size() - 1; + int i = 0; + int const lastIndex = static_cast(bh_i->pointLocations_ii.size() - 1u); for (auto &thisPoint : bh_i->pointLocations_ii) { Real64 f = integral(thisPoint, bh_j, currTime); // Integrate using Simpson's - if (index == 0 || index == lastIndex) { + if (i == 0 || i == lastIndex) { sum_f += f; - } else if (isEven(index)) { + } else if (isEven(i)) { sum_f += 2 * f; } else { sum_f += 4 * f; } - ++index; + ++i; } return (bh_i->dl_ii / 3.0) * sum_f; @@ -549,22 +915,22 @@ namespace GroundHeatExchangers { } else { Real64 sum_f = 0; - int index = 0; - int const lastIndex = bh_i->pointLocations_i.size() - 1; + int i = 0; + int const lastIndex = static_cast(bh_i->pointLocations_i.size() - 1u); for (auto &thisPoint : bh_i->pointLocations_i) { Real64 f = integral(thisPoint, bh_j, currTime); // Integrate using Simpson's - if (index == 0 || index == lastIndex) { + if (i == 0 || i == lastIndex) { sum_f += f; - } else if (isEven(index)) { + } else if (isEven(i)) { sum_f += 2 * f; } else { sum_f += 4 * f; } - ++index; + ++i; } return (bh_i->dl_i / 3.0) * sum_f; @@ -583,9 +949,9 @@ namespace GroundHeatExchangers { // save data for later if (!DataSystemVariables::DisableGLHECaching) { - myCacheData["Response Factors"]["time"] = std::vector(myRespFactors->time.begin(), myRespFactors->time.end()); - myCacheData["Response Factors"]["LNTTS"] = std::vector(myRespFactors->LNTTS.begin(), myRespFactors->LNTTS.end()); - myCacheData["Response Factors"]["GFNC"] = std::vector(myRespFactors->GFNC.begin(), myRespFactors->GFNC.end()); + myCacheData["Response Factors"]["time"] = std::vector(this->myRespFactors->time.begin(), this->myRespFactors->time.end()); + myCacheData["Response Factors"]["LNTTS"] = std::vector(this->myRespFactors->LNTTS.begin(), this->myRespFactors->LNTTS.end()); + myCacheData["Response Factors"]["GFNC"] = std::vector(this->myRespFactors->GFNC.begin(), this->myRespFactors->GFNC.end()); writeGLHECacheToFile(state); } } @@ -595,24 +961,25 @@ namespace GroundHeatExchangers { void GLHEVert::calcLongTimestepGFunctions(EnergyPlusData &state) { - int const numDaysInYear(365); + constexpr int numDaysInYear(365); + constexpr Real64 lnttsStepSize = 0.5; // Minimum simulation time for which finite line source method is applicable - Real64 const lntts_min_for_long_timestep = -8.5; + constexpr Real64 lntts_min_for_long_timestep = -8.5; // Time scale constant - Real64 const t_s = pow_2(bhLength) / (9 * soil.diffusivity); + Real64 const t_s = pow_2(this->bhLength) / (9 * this->soil.diffusivity); // Temporary vector for holding the LNTTS vals std::vector tempLNTTS; - Real64 const lnttsStepSize = 0.5; tempLNTTS.push_back(lntts_min_for_long_timestep); // Determine how many g-function pairs to generate based on user defined maximum simulation time while (true) { Real64 maxPossibleSimTime = exp(tempLNTTS.back()) * t_s; - if (maxPossibleSimTime < myRespFactors->maxSimYears * numDaysInYear * DataGlobalConstants::HoursInDay * DataGlobalConstants::SecInHour) { + if (maxPossibleSimTime < + this->myRespFactors->maxSimYears * numDaysInYear * DataGlobalConstants::HoursInDay * DataGlobalConstants::SecInHour) { tempLNTTS.push_back(tempLNTTS.back() + lnttsStepSize); } else { break; @@ -620,32 +987,32 @@ namespace GroundHeatExchangers { } // Setup the arrays - myRespFactors->time.dimension(tempLNTTS.size(), 0.0); - myRespFactors->LNTTS.dimension(tempLNTTS.size(), 0.0); - myRespFactors->GFNC.dimension(tempLNTTS.size(), 0.0); + this->myRespFactors->time.dimension(tempLNTTS.size(), 0.0); + this->myRespFactors->LNTTS.dimension(tempLNTTS.size(), 0.0); + this->myRespFactors->GFNC.dimension(tempLNTTS.size(), 0.0); int index = 1; for (auto &thisLNTTS : tempLNTTS) { - myRespFactors->time(index) = exp(thisLNTTS) * t_s; - myRespFactors->LNTTS(index) = thisLNTTS; + this->myRespFactors->time(index) = exp(thisLNTTS) * t_s; + this->myRespFactors->LNTTS(index) = thisLNTTS; ++index; } - DisplayString(state, "Initializing GroundHeatExchanger:System: " + name); + DisplayString(state, "Initializing GroundHeatExchanger:System: " + this->name); // Calculate the g-functions - for (size_t lntts_index = 1; lntts_index <= myRespFactors->LNTTS.size(); ++lntts_index) { - for (auto &bh_i : myRespFactors->myBorholes) { + for (size_t lntts_index = 1; lntts_index <= this->myRespFactors->LNTTS.size(); ++lntts_index) { + for (auto &bh_i : this->myRespFactors->myBorholes) { Real64 sum_T_ji = 0; - for (auto &bh_j : myRespFactors->myBorholes) { - sum_T_ji += doubleIntegral(bh_i, bh_j, myRespFactors->time(lntts_index)); + for (auto &bh_j : this->myRespFactors->myBorholes) { + sum_T_ji += doubleIntegral(bh_i, bh_j, this->myRespFactors->time(lntts_index)); } - myRespFactors->GFNC(lntts_index) += sum_T_ji; + this->myRespFactors->GFNC(lntts_index) += sum_T_ji; } - myRespFactors->GFNC(lntts_index) /= (2 * totalTubeLength); + this->myRespFactors->GFNC(lntts_index) /= (2 * this->totalTubeLength); std::stringstream ss; - ss << std::fixed << std::setprecision(1) << float(lntts_index) / myRespFactors->LNTTS.size() * 100; + ss << std::fixed << std::setprecision(1) << float(lntts_index) / this->myRespFactors->LNTTS.size() * 100; DisplayString(state, "...progress: " + ss.str() + "%"); } @@ -659,7 +1026,7 @@ namespace GroundHeatExchangers { using FluidProperties::GetSpecificHeatGlycol; // SUBROUTINE PARAMETER DEFINITIONS: - static std::string const RoutineName("calcShortTimestepGFunctions"); + constexpr const char * RoutineName("calcShortTimestepGFunctions"); enum class CellType { @@ -673,9 +1040,7 @@ namespace GroundHeatExchangers { struct Cell { - ~Cell() - { - } + ~Cell() = default; CellType type; Real64 radius_center; @@ -699,28 +1064,28 @@ namespace GroundHeatExchangers { std::vector Cells; // setup pipe, convection, and fluid layer geometries - int const num_pipe_cells = 4; - int const num_conv_cells = 1; - int const num_fluid_cells = 3; - Real64 const pipe_thickness = pipe.thickness; + constexpr int num_pipe_cells = 4; + constexpr int num_conv_cells = 1; + constexpr int num_fluid_cells = 3; + Real64 const pipe_thickness = this->pipe.thickness; Real64 const pcf_cell_thickness = pipe_thickness / num_pipe_cells; - Real64 const radius_pipe_out = std::sqrt(2) * pipe.outRadius; + Real64 const radius_pipe_out = std::sqrt(2) * this->pipe.outRadius; Real64 const radius_pipe_in = radius_pipe_out - pipe_thickness; Real64 const radius_conv = radius_pipe_in - num_conv_cells * pcf_cell_thickness; Real64 const radius_fluid = radius_conv - (num_fluid_cells - 0.5) * pcf_cell_thickness; // accounts for half thickness of boundary cell // setup grout layer geometry - int const num_grout_cells = 27; - Real64 const radius_grout = bhRadius; + constexpr int num_grout_cells = 27; + Real64 const radius_grout = this->bhRadius; Real64 const grout_cell_thickness = (radius_grout - radius_pipe_out) / num_grout_cells; // setup soil layer geometry - int const num_soil_cells = 500; - Real64 const radius_soil = 10; + constexpr int num_soil_cells = 500; + constexpr Real64 radius_soil = 10; Real64 const soil_cell_thickness = (radius_soil - radius_grout) / num_soil_cells; // use design flow rate - massFlowRate = designMassFlow; + this->massFlowRate = this->designMassFlow; // calculate equivalent thermal resistance between borehole wall and fluid Real64 bhResistance = calcBHAverageResistance(state); @@ -728,9 +1093,17 @@ namespace GroundHeatExchangers { Real64 bh_equivalent_resistance_tube_grout = bhResistance - bhConvectionResistance / 2.0; Real64 bh_equivalent_resistance_convection = bhResistance - bh_equivalent_resistance_tube_grout; - Real64 initial_temperature = inletTemp; - Real64 cpFluid_init = GetSpecificHeatGlycol(state, state.dataPlnt->PlantLoop(loopNum).FluidName, initial_temperature, state.dataPlnt->PlantLoop(loopNum).FluidIndex, RoutineName); - Real64 fluidDensity_init = GetDensityGlycol(state, state.dataPlnt->PlantLoop(loopNum).FluidName, initial_temperature, state.dataPlnt->PlantLoop(loopNum).FluidIndex, RoutineName); + Real64 initial_temperature = this->inletTemp; + Real64 cpFluid_init = GetSpecificHeatGlycol(state, + state.dataPlnt->PlantLoop(this->loopNum).FluidName, + initial_temperature, + state.dataPlnt->PlantLoop(this->loopNum).FluidIndex, + RoutineName); + Real64 fluidDensity_init = GetDensityGlycol(state, + state.dataPlnt->PlantLoop(this->loopNum).FluidName, + initial_temperature, + state.dataPlnt->PlantLoop(this->loopNum).FluidIndex, + RoutineName); // initialize the fluid cells for (int i = 0; i < num_fluid_cells; ++i) { @@ -748,7 +1121,7 @@ namespace GroundHeatExchangers { thisCell.radius_outer = thisCell.radius_center + thisCell.thickness / 2.0; thisCell.conductivity = 200; - thisCell.rhoCp = 2.0 * cpFluid_init * fluidDensity_init * pow_2(pipe.innerRadius) / (pow_2(radius_conv) - pow_2(radius_fluid)); + thisCell.rhoCp = 2.0 * cpFluid_init * fluidDensity_init * pow_2(this->pipe.innerRadius) / (pow_2(radius_conv) - pow_2(radius_fluid)); Cells.push_back(thisCell); } @@ -773,7 +1146,7 @@ namespace GroundHeatExchangers { thisCell.radius_center = thisCell.radius_inner + thisCell.thickness / 2.0; thisCell.radius_outer = thisCell.radius_inner + thisCell.thickness; thisCell.conductivity = log(radius_grout / radius_pipe_in) / (2 * DataGlobalConstants::Pi * bh_equivalent_resistance_tube_grout); - thisCell.rhoCp = pipe.rhoCp; + thisCell.rhoCp = this->pipe.rhoCp; Cells.push_back(thisCell); } @@ -798,8 +1171,8 @@ namespace GroundHeatExchangers { thisCell.radius_inner = radius_grout + i * thisCell.thickness; thisCell.radius_center = thisCell.radius_inner + thisCell.thickness / 2.0; thisCell.radius_outer = thisCell.radius_inner + thisCell.thickness; - thisCell.conductivity = soil.k; - thisCell.rhoCp = soil.rhoCp; + thisCell.conductivity = this->soil.k; + thisCell.rhoCp = this->soil.rhoCp; Cells.push_back(thisCell); } @@ -811,7 +1184,7 @@ namespace GroundHeatExchangers { // set upper limit of time for the short time-step g-function calcs so there is some overlap Real64 const lntts_max_for_short_timestep = -9.0; - Real64 const t_s = pow_2(bhLength) / (9.0 * soil.diffusivity); + Real64 const t_s = pow_2(this->bhLength) / (9.0 * this->soil.diffusivity); Real64 const time_step = 500; Real64 const time_max_for_short_timestep = exp(lntts_max_for_short_timestep) * t_s; @@ -900,8 +1273,10 @@ namespace GroundHeatExchangers { if (leftCell.type == CellType::GROUT && rightCell.type == CellType::SOIL) { - Real64 left_conductance = 2 * DataGlobalConstants::Pi * leftCell.conductivity / log(leftCell.radius_outer / leftCell.radius_inner); - Real64 right_conductance = 2 * DataGlobalConstants::Pi * rightCell.conductivity / log(rightCell.radius_center / leftCell.radius_inner); + Real64 left_conductance = + 2 * DataGlobalConstants::Pi * leftCell.conductivity / log(leftCell.radius_outer / leftCell.radius_inner); + Real64 right_conductance = + 2 * DataGlobalConstants::Pi * rightCell.conductivity / log(rightCell.radius_center / leftCell.radius_inner); T_bhWall = (left_conductance * leftCell.temperature + right_conductance * rightCell.temperature) / (left_conductance + right_conductance); @@ -911,7 +1286,8 @@ namespace GroundHeatExchangers { total_time += time_step; - GFNC_shortTimestep.push_back(2 * DataGlobalConstants::Pi * soil.k * ((Cells[0].temperature - initial_temperature) / heat_flux - bhResistance)); + GFNC_shortTimestep.push_back(2 * DataGlobalConstants::Pi * this->soil.k * + ((Cells[0].temperature - initial_temperature) / heat_flux - bhResistance)); LNTTS_shortTimestep.push_back(log(total_time / t_s)); } // end timestep loop @@ -923,7 +1299,7 @@ namespace GroundHeatExchangers { { // from: https://en.wikibooks.org/wiki/Algorithm_Implementation/Linear_Algebra/Tridiagonal_matrix_algorithm#C.2B.2B - int n = d.size() - 1; + int n = static_cast(d.size() - 1u); c[0] /= b[0]; d[0] /= b[0]; @@ -949,7 +1325,7 @@ namespace GroundHeatExchangers { std::vector GFNC_combined; std::vector LNTTS_combined; - Real64 const t_s = pow_2(bhLength) / (9.0 * soil.diffusivity); + Real64 const t_s = pow_2(this->bhLength) / (9.0 * this->soil.diffusivity); // Nothing to do. Just put the short time step g-functions on the combined vector int num_shortTimestepGFunctions = GFNC_shortTimestep.size(); @@ -959,24 +1335,24 @@ namespace GroundHeatExchangers { } // Add the rest of the long time-step g-functions to the combined curve - for (int index_longTS = myRespFactors->GFNC.l(); index_longTS <= myRespFactors->GFNC.u(); ++index_longTS) { - GFNC_combined.push_back(myRespFactors->GFNC(index_longTS)); - LNTTS_combined.push_back(myRespFactors->LNTTS(index_longTS)); + for (int index_longTS = this->myRespFactors->GFNC.l(); index_longTS <= this->myRespFactors->GFNC.u(); ++index_longTS) { + GFNC_combined.push_back(this->myRespFactors->GFNC(index_longTS)); + LNTTS_combined.push_back(this->myRespFactors->LNTTS(index_longTS)); } // Move combined values into right data struct - myRespFactors->time.deallocate(); - myRespFactors->LNTTS.deallocate(); - myRespFactors->GFNC.deallocate(); + this->myRespFactors->time.deallocate(); + this->myRespFactors->LNTTS.deallocate(); + this->myRespFactors->GFNC.deallocate(); - myRespFactors->time.dimension(GFNC_combined.size(), 0.0); - myRespFactors->LNTTS.dimension(GFNC_combined.size(), 0.0); - myRespFactors->GFNC.dimension(GFNC_combined.size(), 0.0); + this->myRespFactors->time.dimension(GFNC_combined.size(), 0.0); + this->myRespFactors->LNTTS.dimension(GFNC_combined.size(), 0.0); + this->myRespFactors->GFNC.dimension(GFNC_combined.size(), 0.0); for (unsigned int index = 0; index < GFNC_combined.size(); ++index) { - myRespFactors->time[index] = exp(LNTTS_combined[index]) * t_s; - myRespFactors->LNTTS[index] = LNTTS_combined[index]; - myRespFactors->GFNC[index] = GFNC_combined[index]; + this->myRespFactors->time[index] = exp(LNTTS_combined[index]) * t_s; + this->myRespFactors->LNTTS[index] = LNTTS_combined[index]; + this->myRespFactors->GFNC[index] = GFNC_combined[index]; } } @@ -995,23 +1371,23 @@ namespace GroundHeatExchangers { // For convenience auto &d = myCacheData["Phys Data"]; - d["Flow Rate"] = designFlow; - d["Soil k"] = soil.k; - d["Soil rhoCp"] = soil.rhoCp; - d["BH Top Depth"] = myRespFactors->props->bhTopDepth; - d["BH Length"] = myRespFactors->props->bhLength; - d["BH Diameter"] = myRespFactors->props->bhDiameter; - d["Grout k"] = myRespFactors->props->grout.k; - d["Grout rhoCp"] = myRespFactors->props->grout.rhoCp; - d["Pipe k"] = myRespFactors->props->pipe.k; - d["Pipe rhoCP"] = myRespFactors->props->pipe.rhoCp; - d["Pipe Diameter"] = myRespFactors->props->pipe.outDia; - d["Pipe Thickness"] = myRespFactors->props->pipe.thickness; - d["U-tube Dist"] = myRespFactors->props->bhUTubeDist; - d["Max Simulation Years"] = myRespFactors->maxSimYears; + d["Flow Rate"] = this->designFlow; + d["Soil k"] = this->soil.k; + d["Soil rhoCp"] = this->soil.rhoCp; + d["BH Top Depth"] = this->myRespFactors->props->bhTopDepth; + d["BH Length"] = this->myRespFactors->props->bhLength; + d["BH Diameter"] = this->myRespFactors->props->bhDiameter; + d["Grout k"] = this->myRespFactors->props->grout.k; + d["Grout rhoCp"] = this->myRespFactors->props->grout.rhoCp; + d["Pipe k"] = this->myRespFactors->props->pipe.k; + d["Pipe rhoCP"] = this->myRespFactors->props->pipe.rhoCp; + d["Pipe Diameter"] = this->myRespFactors->props->pipe.outDia; + d["Pipe Thickness"] = this->myRespFactors->props->pipe.thickness; + d["U-tube Dist"] = this->myRespFactors->props->bhUTubeDist; + d["Max Simulation Years"] = this->myRespFactors->maxSimYears; int i = 0; - for (auto &thisBH : myRespFactors->myBorholes) { + for (auto &thisBH : this->myRespFactors->myBorholes) { ++i; auto &d_bh = d["BH Data"][format("BH {}", i)]; d_bh["X-Location"] = thisBH->xLoc; @@ -1064,31 +1440,31 @@ namespace GroundHeatExchangers { // Setup the arrays int numEntries = myCacheData["Response Factors"]["LNTTS"].size(); - myRespFactors->time.dimension(numEntries, 0.0); - myRespFactors->LNTTS.dimension(numEntries, 0.0); - myRespFactors->GFNC.dimension(numEntries, 0.0); + this->myRespFactors->time.dimension(numEntries, 0.0); + this->myRespFactors->LNTTS.dimension(numEntries, 0.0); + this->myRespFactors->GFNC.dimension(numEntries, 0.0); // Populate the time array int index = 1; auto &j_time = myCacheData["Response Factors"]["time"]; - for (json::iterator it = j_time.begin(); it != j_time.end(); ++it) { - myRespFactors->time(index) = *it; + for (auto &it : j_time) { + this->myRespFactors->time(index) = it; ++index; } // Populate the lntts array index = 1; auto &j_lntts = myCacheData["Response Factors"]["LNTTS"]; - for (json::iterator it = j_lntts.begin(); it != j_lntts.end(); ++it) { - myRespFactors->LNTTS(index) = *it; + for (auto &j_lntt : j_lntts) { + this->myRespFactors->LNTTS(index) = j_lntt; ++index; } // Populate the g-function array index = 1; auto &j_gfnc = myCacheData["Response Factors"]["GFNC"]; - for (json::iterator it = j_gfnc.begin(); it != j_gfnc.end(); ++it) { - myRespFactors->GFNC(index) = *it; + for (auto &it : j_gfnc) { + this->myRespFactors->GFNC(index) = it; ++index; } } @@ -1097,7 +1473,7 @@ namespace GroundHeatExchangers { //****************************************************************************** - void GLHEVert::writeGLHECacheToFile(EnergyPlusData &state) + void GLHEVert::writeGLHECacheToFile(EnergyPlusData &state) const { // For convenience @@ -1174,7 +1550,7 @@ namespace GroundHeatExchangers { //****************************************************************************** - void GLHESlinky::calcGFunctions([[maybe_unused]] EnergyPlusData &state) + void GLHESlinky::calcGFunctions(EnergyPlusData &state) { // SUBROUTINE INFORMATION: // AUTHOR: Matt Mitchell @@ -1187,105 +1563,87 @@ namespace GroundHeatExchangers { // SUBROUTINE LOCAL VARIABLE DECLARATIONS: Real64 tLg_max(0.0); - Real64 tLg_min(-2); - Real64 tLg_grid(0.25); - Real64 ts(3600); + constexpr Real64 tLg_min(-2); + constexpr Real64 tLg_grid(0.25); + constexpr Real64 ts(3600); Real64 tLg; - Real64 t; - Real64 convertYearsToSeconds(356 * 24 * 60 * 60); - int NT; - int numLC; - int numRC; - int coil; - int trench; + constexpr Real64 convertYearsToSeconds(356 * 24 * 60 * 60); Real64 fraction; - Array2D valStored({0, numTrenches}, {0, numCoils}, -1.0); - Real64 gFunc; - Real64 gFuncin; - int m1; - int n1; - int m; - int n; - int mm1; - int nn1; - int i; - Real64 disRing; + Array2D valStored({0, this->numTrenches}, {0, this->numCoils}, -1.0); int I0; int J0; - Real64 doubleIntegralVal; - Real64 midFieldVal; - DisplayString(state, "Initializing GroundHeatExchanger:Slinky: " + name); + DisplayString(state, "Initializing GroundHeatExchanger:Slinky: " + this->name); - X0.allocate(numCoils); - Y0.allocate(numTrenches); + this->X0.allocate(this->numCoils); + this->Y0.allocate(this->numTrenches); // Calculate the number of g-functions required - tLg_max = std::log10(maxSimYears * convertYearsToSeconds / ts); - int NPairs = (tLg_max - tLg_min) / (tLg_grid) + 1; + tLg_max = std::log10(this->maxSimYears * convertYearsToSeconds / ts); + int NPairs = static_cast((tLg_max - tLg_min) / (tLg_grid) + 1); // Allocate and setup g-function arrays - myRespFactors->GFNC.allocate(NPairs); - myRespFactors->LNTTS.allocate(NPairs); - QnMonthlyAgg.allocate(maxSimYears * 12); - QnHr.allocate(730 + AGG + SubAGG); - QnSubHr.allocate((SubAGG + 1) * maxTSinHr + 1); - LastHourN.allocate(SubAGG + 1); + this->myRespFactors->GFNC.allocate(NPairs); + this->myRespFactors->LNTTS.allocate(NPairs); + this->QnMonthlyAgg.allocate(static_cast(this->maxSimYears * 12)); + this->QnHr.allocate(730 + this->AGG + this->SubAGG); + this->QnSubHr.allocate(static_cast((this->SubAGG + 1) * maxTSinHr + 1)); + this->LastHourN.allocate(this->SubAGG + 1); - for (i = 1; i <= NPairs; ++i) { - myRespFactors->GFNC(i) = 0.0; - myRespFactors->LNTTS(i) = 0.0; + for (int i = 1; i <= NPairs; ++i) { + this->myRespFactors->GFNC(i) = 0.0; + this->myRespFactors->LNTTS(i) = 0.0; } // Calculate the number of loops (per trench) and number of trenches to be involved // Due to the symmetry of a slinky GHX field, we need only calculate about // on quarter of the rings' tube wall temperature perturbation to get the // mean wall temperature perturbation of the entire slinky GHX field. - numLC = std::ceil(numCoils / 2.0); - numRC = std::ceil(numTrenches / 2.0); + int numLC = std::ceil(this->numCoils / 2.0); + int numRC = std::ceil(this->numTrenches / 2.0); // Calculate coordinates (X0, Y0, Z0) of a ring's center - for (coil = 1; coil <= numCoils; ++coil) { - X0(coil) = coilPitch * (coil - 1); + for (int coil = 1; coil <= this->numCoils; ++coil) { + this->X0(coil) = coilPitch * (coil - 1); } - for (trench = 1; trench <= numTrenches; ++trench) { - Y0(trench) = (trench - 1) * trenchSpacing; + for (int trench = 1; trench <= this->numTrenches; ++trench) { + this->Y0(trench) = (trench - 1) * this->trenchSpacing; } - Z0 = coilDepth; + this->Z0 = this->coilDepth; // If number of trenches is greater than 1, one quarter of the rings are involved. // If number of trenches is 1, one half of the rings are involved. - if (numTrenches > 1) { + if (this->numTrenches > 1) { fraction = 0.25; } else { fraction = 0.5; } // Calculate the corresponding time of each temperature response factor - for (NT = 1; NT <= NPairs; ++NT) { + for (int NT = 1; NT <= NPairs; ++NT) { tLg = tLg_min + tLg_grid * (NT - 1); - t = std::pow(10, tLg) * ts; + Real64 t = std::pow(10, tLg) * ts; // Set the average temperature response of the whole field to zero - gFunc = 0; + Real64 gFunc = 0; valStored = -1.0; - for (m1 = 1; m1 <= numRC; ++m1) { - for (n1 = 1; n1 <= numLC; ++n1) { - for (m = 1; m <= numTrenches; ++m) { - for (n = 1; n <= numCoils; ++n) { + for (int m1 = 1; m1 <= numRC; ++m1) { + for (int n1 = 1; n1 <= numLC; ++n1) { + for (int m = 1; m <= this->numTrenches; ++m) { + for (int n = 1; n <= this->numCoils; ++n) { // Zero out val after each iteration - doubleIntegralVal = 0.0; - midFieldVal = 0.0; + Real64 doubleIntegralVal = 0.0; + Real64 midFieldVal = 0.0; // Calculate the distance between ring centers - disRing = distToCenter(m, n, m1, n1); + Real64 disRing = distToCenter(m, n, m1, n1); // Save mm1 and nn1 - mm1 = std::abs(m - m1); - nn1 = std::abs(n - n1); + int mm1 = std::abs(m - m1); + int nn1 = std::abs(n - n1); // If we're calculating a ring's temperature response to itself as a ring source, // then we need some extra effort in calculating the double integral @@ -1297,8 +1655,10 @@ namespace GroundHeatExchangers { J0 = 561; } + Real64 gFuncin; + // if the ring(n1, m1) is the near-field ring of the ring(n,m) - if (disRing <= 2.5 + coilDiameter) { + if (disRing <= 2.5 + this->coilDiameter) { // if no calculated value has been stored if (valStored(mm1, nn1) < 0) { doubleIntegralVal = doubleIntegral(m, n, m1, n1, t, I0, J0); @@ -1309,18 +1669,18 @@ namespace GroundHeatExchangers { } // due to symmetry, the temperature response of ring(n1, m1) should be 0.25, 0.5, or 1 times its calculated value - if (!isEven(numTrenches) && !isEven(numCoils) && m1 == numRC && n1 == numLC && numTrenches > 1.5) { + if (!isEven(this->numTrenches) && !isEven(this->numCoils) && m1 == numRC && n1 == numLC && this->numTrenches > 1.5) { gFuncin = 0.25 * doubleIntegralVal; - } else if (!isEven(numTrenches) && m1 == numRC && numTrenches > 1.5) { + } else if (!isEven(this->numTrenches) && m1 == numRC && this->numTrenches > 1.5) { gFuncin = 0.5 * doubleIntegralVal; - } else if (!isEven(numCoils) && n1 == numLC) { + } else if (!isEven(this->numCoils) && n1 == numLC) { gFuncin = 0.5 * doubleIntegralVal; } else { gFuncin = doubleIntegralVal; } // if the ring(n1, m1) is in the far-field or the ring(n,m) - } else if (disRing > (10 + coilDiameter)) { + } else if (disRing > (10 + this->coilDiameter)) { gFuncin = 0; // else the ring(n1, m1) is in the middle-field of the ring(n,m) @@ -1335,11 +1695,11 @@ namespace GroundHeatExchangers { } // due to symmetry, the temperature response of ring(n1, m1) should be 0.25, 0.5, or 1 times its calculated value - if (!isEven(numTrenches) && !isEven(numCoils) && m1 == numRC && n1 == numLC && numTrenches > 1.5) { + if (!isEven(this->numTrenches) && !isEven(this->numCoils) && m1 == numRC && n1 == numLC && this->numTrenches > 1.5) { gFuncin = 0.25 * midFieldVal; - } else if (!isEven(numTrenches) && m1 == numRC && numTrenches > 1.5) { + } else if (!isEven(this->numTrenches) && m1 == numRC && this->numTrenches > 1.5) { gFuncin = 0.5 * midFieldVal; - } else if (!isEven(numCoils) && n1 == numLC) { + } else if (!isEven(this->numCoils) && n1 == numLC) { gFuncin = 0.5 * midFieldVal; } else { gFuncin = midFieldVal; @@ -1353,8 +1713,9 @@ namespace GroundHeatExchangers { } // n1 } // m1 - myRespFactors->GFNC(NT) = (gFunc * (coilDiameter / 2.0)) / (4 * DataGlobalConstants::Pi * fraction * numTrenches * numCoils); - myRespFactors->LNTTS(NT) = tLg; + this->myRespFactors->GFNC(NT) = + (gFunc * (this->coilDiameter / 2.0)) / (4 * DataGlobalConstants::Pi * fraction * this->numTrenches * this->numCoils); + this->myRespFactors->LNTTS(NT) = tLg; } // NT time } @@ -1386,31 +1747,22 @@ namespace GroundHeatExchangers { // Calculates the temperature response of from one near-field point to another // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - Real64 distance1; - Real64 distance2; - Real64 errFunc1; - Real64 errFunc2; - Real64 sqrtAlphaT; - Real64 sqrtDistDepth; - - distance1 = distance(m, n, m1, n1, eta, theta); - - sqrtAlphaT = std::sqrt(soil.diffusivity * t); + Real64 distance1 = distance(m, n, m1, n1, eta, theta); + Real64 sqrtAlphaT = std::sqrt(this->soil.diffusivity * t); if (!verticalConfig) { - sqrtDistDepth = std::sqrt(pow_2(distance1) + 4 * pow_2(coilDepth)); - errFunc1 = std::erfc(0.5 * distance1 / sqrtAlphaT); - errFunc2 = std::erfc(0.5 * sqrtDistDepth / sqrtAlphaT); + Real64 sqrtDistDepth = std::sqrt(pow_2(distance1) + 4 * pow_2(this->coilDepth)); + Real64 errFunc1 = std::erfc(0.5 * distance1 / sqrtAlphaT); + Real64 errFunc2 = std::erfc(0.5 * sqrtDistDepth / sqrtAlphaT); return errFunc1 / distance1 - errFunc2 / sqrtDistDepth; } else { - distance2 = distanceToFictRing(m, n, m1, n1, eta, theta); - - errFunc1 = std::erfc(0.5 * distance1 / sqrtAlphaT); - errFunc2 = std::erfc(0.5 * distance2 / sqrtAlphaT); + Real64 distance2 = distanceToFictRing(m, n, m1, n1, eta, theta); + Real64 errFunc1 = std::erfc(0.5 * distance1 / sqrtAlphaT); + Real64 errFunc2 = std::erfc(0.5 * distance2 / sqrtAlphaT); return errFunc1 / distance1 - errFunc2 / distance2; } @@ -1430,19 +1782,13 @@ namespace GroundHeatExchangers { // Calculates the temperature response of from one mid-field point to another // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - Real64 errFunc1; - Real64 errFunc2; - Real64 sqrtAlphaT; - Real64 sqrtDistDepth; - Real64 distance; - - sqrtAlphaT = std::sqrt(soil.diffusivity * t); + Real64 sqrtAlphaT = std::sqrt(this->soil.diffusivity * t); - distance = distToCenter(m, n, m1, n1); - sqrtDistDepth = std::sqrt(pow_2(distance) + 4 * pow_2(coilDepth)); + Real64 distance = distToCenter(m, n, m1, n1); + Real64 sqrtDistDepth = std::sqrt(pow_2(distance) + 4 * pow_2(this->coilDepth)); - errFunc1 = std::erfc(0.5 * distance / sqrtAlphaT); - errFunc2 = std::erfc(0.5 * sqrtDistDepth / sqrtAlphaT); + Real64 errFunc1 = std::erfc(0.5 * distance / sqrtAlphaT); + Real64 errFunc2 = std::erfc(0.5 * sqrtDistDepth / sqrtAlphaT); return 4 * pow_2(DataGlobalConstants::Pi) * (errFunc1 / distance - errFunc2 / sqrtDistDepth); } @@ -1460,21 +1806,19 @@ namespace GroundHeatExchangers { // PURPOSE OF THIS SUBROUTINE: // Calculates the distance between any two points on any two loops - Real64 pipeOuterRadius = pipe.outDia / 2.0; - Real64 const cos_theta = std::cos(theta); Real64 const sin_theta = std::sin(theta); Real64 const cos_eta = std::cos(eta); Real64 const sin_eta = std::sin(eta); - Real64 x = X0(n) + cos_theta * (coilDiameter / 2.0); - Real64 y = Y0(m) + sin_theta * (coilDiameter / 2.0); + Real64 x = this->X0(n) + cos_theta * (this->coilDiameter / 2.0); + Real64 y = this->Y0(m) + sin_theta * (this->coilDiameter / 2.0); - Real64 xIn = X0(n1) + cos_eta * (coilDiameter / 2.0 - pipeOuterRadius); - Real64 yIn = Y0(m1) + sin_eta * (coilDiameter / 2.0 - pipeOuterRadius); + Real64 xIn = this->X0(n1) + cos_eta * (this->coilDiameter / 2.0 - this->pipe.outRadius); + Real64 yIn = this->Y0(m1) + sin_eta * (this->coilDiameter / 2.0 - this->pipe.outRadius); - Real64 xOut = X0(n1) + cos_eta * (coilDiameter / 2.0 + pipeOuterRadius); - Real64 yOut = Y0(m1) + sin_eta * (coilDiameter / 2.0 + pipeOuterRadius); + Real64 xOut = this->X0(n1) + cos_eta * (this->coilDiameter / 2.0 + this->pipe.outRadius); + Real64 yOut = this->Y0(m1) + sin_eta * (this->coilDiameter / 2.0 + this->pipe.outRadius); if (!verticalConfig) { @@ -1482,13 +1826,13 @@ namespace GroundHeatExchangers { } else { - Real64 z = Z0 + sin_theta * (coilDiameter / 2.0); + Real64 z = this->Z0 + sin_theta * (this->coilDiameter / 2.0); - Real64 zIn = Z0 + sin_eta * (coilDiameter / 2.0 - pipeOuterRadius); - Real64 zOut = Z0 + sin_eta * (coilDiameter / 2.0 + pipeOuterRadius); + Real64 zIn = this->Z0 + sin_eta * (this->coilDiameter / 2.0 - this->pipe.outRadius); + Real64 zOut = this->Z0 + sin_eta * (this->coilDiameter / 2.0 + this->pipe.outRadius); - return 0.5 * std::sqrt(pow_2(x - xIn) + pow_2(Y0(m1) - Y0(m)) + pow_2(z - zIn)) + - 0.5 * std::sqrt(pow_2(x - xOut) + pow_2(Y0(m1) - Y0(m)) + pow_2(z - zOut)); + return 0.5 * std::sqrt(pow_2(x - xIn) + pow_2(this->Y0(m1) - this->Y0(m)) + pow_2(z - zIn)) + + 0.5 * std::sqrt(pow_2(x - xOut) + pow_2(this->Y0(m1) - this->Y0(m)) + pow_2(z - zOut)); } } @@ -1505,27 +1849,25 @@ namespace GroundHeatExchangers { // PURPOSE OF THIS SUBROUTINE: // Calculates the distance between any two points between real and fictitious rings - Real64 pipeOuterRadius = pipe.outDia / 2.0; - Real64 const sin_theta = std::sin(theta); Real64 const cos_theta = std::cos(theta); Real64 const sin_eta = std::sin(eta); Real64 const cos_eta = std::cos(eta); - Real64 x = X0(n) + cos_theta * (coilDiameter / 2.0); - // Real64 y = Y0( m ) + sin_theta * ( coilDiameter / 2.0 ); - Real64 z = Z0 + sin_theta * (coilDiameter / 2.0) + 2 * coilDepth; + Real64 x = this->X0(n) + cos_theta * (this->coilDiameter / 2.0); + // Real64 y = Y0( m ) + sin_theta * (coilDiameter / 2.0); + Real64 z = this->Z0 + sin_theta * (this->coilDiameter / 2.0) + 2 * this->coilDepth; - Real64 xIn = X0(n1) + cos_eta * (coilDiameter / 2.0 - pipeOuterRadius); - // Real64 yIn = Y0( m1 ) + sin_eta * ( coilDiameter / 2.0 - pipeOuterRadius ); - Real64 zIn = Z0 + sin_eta * (coilDiameter / 2.0 - pipeOuterRadius); + Real64 xIn = this->X0(n1) + cos_eta * (this->coilDiameter / 2.0 - this->pipe.outRadius); + // Real64 yIn = Y0( m1 ) + sin_eta * (coilDiameter / 2.0 - pipe.outRadius); + Real64 zIn = this->Z0 + sin_eta * (this->coilDiameter / 2.0 - this->pipe.outRadius); - Real64 xOut = X0(n1) + cos_eta * (coilDiameter / 2.0 + pipeOuterRadius); - // Real64 yOut = Y0( m1 ) + sin_eta * ( coilDiameter / 2.0 + pipeOuterRadius ); - Real64 zOut = Z0 + sin_eta * (coilDiameter / 2.0 + pipeOuterRadius); + Real64 xOut = this->X0(n1) + cos_eta * (this->coilDiameter / 2.0 + this->pipe.outRadius); + // Real64 yOut = Y0( m1 ) + sin_eta * (coilDiameter / 2.0 + outRadius); + Real64 zOut = this->Z0 + sin_eta * (this->coilDiameter / 2.0 + this->pipe.outRadius); - return 0.5 * std::sqrt(pow_2(x - xIn) + pow_2(Y0(m1) - Y0(m)) + pow_2(z - zIn)) + - 0.5 * std::sqrt(pow_2(x - xOut) + pow_2(Y0(m1) - Y0(m)) + pow_2(z - zOut)); + return 0.5 * std::sqrt(pow_2(x - xIn) + pow_2(this->Y0(m1) - this->Y0(m)) + pow_2(z - zIn)) + + 0.5 * std::sqrt(pow_2(x - xOut) + pow_2(this->Y0(m1) - this->Y0(m)) + pow_2(z - zOut)); } //****************************************************************************** @@ -1541,7 +1883,7 @@ namespace GroundHeatExchangers { // PURPOSE OF THIS SUBROUTINE: // Calculates the center-to-center distance between rings - return std::sqrt(pow_2(X0(n) - X0(n1)) + pow_2(Y0(m) - Y0(m1))); + return std::sqrt(pow_2(this->X0(n) - this->X0(n1)) + pow_2(this->Y0(m) - this->Y0(m1))); } //****************************************************************************** @@ -1584,16 +1926,14 @@ namespace GroundHeatExchangers { // SUBROUTINE LOCAL VARIABLE DECLARATIONS: Real64 sumIntF(0.0); Real64 theta(0.0); - Real64 theta1(0.0); - Real64 theta2(2 * DataGlobalConstants::Pi); - Real64 h; - int j; + constexpr Real64 theta1(0.0); + constexpr Real64 theta2(2 * DataGlobalConstants::Pi); Array1D f(J0, 0.0); - h = (theta2 - theta1) / (J0 - 1); + Real64 h = (theta2 - theta1) / (J0 - 1); // Calculate the function at various equally spaced x values - for (j = 1; j <= J0; ++j) { + for (int j = 1; j <= J0; ++j) { theta = theta1 + (j - 1) * h; @@ -1631,20 +1971,18 @@ namespace GroundHeatExchangers { // Simpson's 1/3 rule of integration // SUBROUTINE LOCAL VARIABLE DECLARATIONS: + constexpr Real64 eta1(0.0); + constexpr Real64 eta2(2 * DataGlobalConstants::Pi); + Real64 sumIntF(0.0); - Real64 eta(0.0); - Real64 eta1(0.0); - Real64 eta2(2 * DataGlobalConstants::Pi); - Real64 h; - int i; Array1D g(I0, 0.0); - h = (eta2 - eta1) / (I0 - 1); + Real64 h = (eta2 - eta1) / (I0 - 1); // Calculates the value of the function at various equally spaced values - for (i = 1; i <= I0; ++i) { + for (int i = 1; i <= I0; ++i) { - eta = eta1 + (i - 1) * h; + Real64 eta = eta1 + (i - 1) * h; g(i) = integral(m, n, m1, n1, t, eta, J0); if (i == 1 || i == I0) { @@ -1674,8 +2012,10 @@ namespace GroundHeatExchangers { // PURPOSE OF THIS SUBROUTINE: // calculate annual time constant for ground conduction - timeSS = (pow_2(bhLength) / (9.0 * soil.diffusivity)) / DataGlobalConstants::SecInHour / 8760.0; - timeSSFactor = timeSS * 8760.0; + constexpr Real64 hrInYear(8760); + + this->timeSS = (pow_2(this->bhLength) / (9.0 * this->soil.diffusivity)) / DataGlobalConstants::SecInHour / hrInYear; + this->timeSSFactor = this->timeSS * 8760.0; } //****************************************************************************** @@ -1691,7 +2031,7 @@ namespace GroundHeatExchangers { // PURPOSE OF THIS SUBROUTINE: // calculate annual time constant for ground conduction - timeSSFactor = 1.0; + this->timeSSFactor = 1.0; } //****************************************************************************** @@ -1729,35 +2069,13 @@ namespace GroundHeatExchangers { using FluidProperties::GetDensityGlycol; using FluidProperties::GetSpecificHeatGlycol; - // Locals // SUBROUTINE ARGUMENT DEFINITIONS - static std::string const RoutineName("CalcGroundHeatExchanger"); + constexpr const char * RoutineName("CalcGroundHeatExchanger"); // LOCAL PARAMETERS - Real64 fluidDensity; - Real64 kGroundFactor; - Real64 cpFluid; - Real64 gFuncVal; // Interpolated G function value at a sub-hour Real64 fluidAveTemp; - Real64 C_1; - int numOfMonths; // the number of months of simulation elapsed - int currentMonth; // The Month up to which the monthly blocks are superposed - Real64 sumQnMonthly; // tmp variable which holds the sum of the Temperature difference due to Aggregated heat extraction/rejection step - Real64 sumQnHourly; // same as above for hourly - Real64 sumQnSubHourly; // same as above for sub-hourly( with no aggregation] - Real64 RQMonth; - Real64 RQHour; - Real64 RQSubHr; - int I; - Real64 tmpQnSubHourly; // current Qn sub-hourly value - int hourlyLimit; // number of hours to be taken into account in superposition - int subHourlyLimit; // number of sub-hourly to be taken into account in sub-hourly superposition - Real64 sumTotal(0.0); // sum of all the Qn (load) blocks - Real64 C0; // **Intermediate constants used - Real64 C1; // **Intermediate constants used - Real64 C2; // **in explicit calculation of the - Real64 C3; // **temperature at the U tube outlet. - int IndexN; // Used to index the LastHourN array + Real64 tmpQnSubHourly; // current Qn sub-hourly value + Real64 sumTotal(0.0); // sum of all the Qn (load) blocks // Calculate G-Functions if (this->firstTime) { @@ -1771,32 +2089,38 @@ namespace GroundHeatExchangers { this->firstTime = false; } - inletTemp = Node(inletNodeNum).Temp; + this->inletTemp = Node(this->inletNodeNum).Temp; - cpFluid = GetSpecificHeatGlycol(state, state.dataPlnt->PlantLoop(loopNum).FluidName, inletTemp, state.dataPlnt->PlantLoop(loopNum).FluidIndex, RoutineName); - fluidDensity = GetDensityGlycol(state, state.dataPlnt->PlantLoop(loopNum).FluidName, inletTemp, state.dataPlnt->PlantLoop(loopNum).FluidIndex, RoutineName); + Real64 cpFluid = GetSpecificHeatGlycol(state, + state.dataPlnt->PlantLoop(this->loopNum).FluidName, + this->inletTemp, + state.dataPlnt->PlantLoop(this->loopNum).FluidIndex, + RoutineName); - kGroundFactor = 2.0 * DataGlobalConstants::Pi * soil.k; + Real64 kGroundFactor = 2.0 * DataGlobalConstants::Pi * this->soil.k; // Get time constants getAnnualTimeConstant(); if (triggerDesignDayReset && state.dataGlobal->WarmupFlag) updateCurSimTime = true; if (state.dataGlobal->DayOfSim == 1 && updateCurSimTime) { - currentSimTime = 0.0; - prevTimeSteps = 0.0; - QnHr = 0.0; - QnMonthlyAgg = 0.0; - QnSubHr = 0.0; - LastHourN = 1; - N = 1; + state.dataGroundHeatExchanger->currentSimTime = 0.0; + state.dataGroundHeatExchanger->prevTimeSteps = 0.0; + this->QnHr = 0.0; + this->QnMonthlyAgg = 0.0; + this->QnSubHr = 0.0; + this->LastHourN = 1; + state.dataGroundHeatExchanger->N = 1; updateCurSimTime = false; triggerDesignDayReset = false; } - currentSimTime = (state.dataGlobal->DayOfSim - 1) * 24 + state.dataGlobal->HourOfDay - 1 + (state.dataGlobal->TimeStep - 1) * state.dataGlobal->TimeStepZone + SysTimeElapsed; //+ TimeStepsys - locHourOfDay = mod(currentSimTime, hrsPerDay) + 1; - locDayOfSim = currentSimTime / 24 + 1; + state.dataGroundHeatExchanger->currentSimTime = (state.dataGlobal->DayOfSim - 1) * 24 + state.dataGlobal->HourOfDay - 1 + + (state.dataGlobal->TimeStep - 1) * state.dataGlobal->TimeStepZone + + SysTimeElapsed; //+ TimeStepsys + state.dataGroundHeatExchanger->locHourOfDay = + static_cast(mod(state.dataGroundHeatExchanger->currentSimTime, DataGlobalConstants::HoursInDay) + 1); + state.dataGroundHeatExchanger->locDayOfSim = static_cast(state.dataGroundHeatExchanger->currentSimTime / 24 + 1); if (state.dataGlobal->DayOfSim > 1) { updateCurSimTime = true; @@ -1806,197 +2130,217 @@ namespace GroundHeatExchangers { triggerDesignDayReset = true; } - if (currentSimTime <= 0.0) { - prevTimeSteps = 0.0; // This resets history when rounding 24:00 hours during warmup avoids hard crash later - calcAggregateLoad(); // Just allocates and initializes prevHour array + if (state.dataGroundHeatExchanger->currentSimTime <= 0.0) { + state.dataGroundHeatExchanger->prevTimeSteps = 0.0; // This resets history when rounding 24:00 hours during warmup avoids hard crash later + calcAggregateLoad(state); // Just allocates and initializes prevHour array return; } - // Store currentSimTime in prevTimeSteps only if a time step occurs - - if (prevTimeSteps(1) != currentSimTime) { - prevTimeSteps = eoshift(prevTimeSteps, -1, currentSimTime); - ++N; + // Store state.dataGroundHeatExchanger->currentSimTime in prevTimeSteps only if a time step occurs + if (state.dataGroundHeatExchanger->prevTimeSteps(1) != state.dataGroundHeatExchanger->currentSimTime) { + state.dataGroundHeatExchanger->prevTimeSteps = + eoshift(state.dataGroundHeatExchanger->prevTimeSteps, -1, state.dataGroundHeatExchanger->currentSimTime); + ++state.dataGroundHeatExchanger->N; } - if (N != PrevN) { - PrevN = N; - QnSubHr = eoshift(QnSubHr, -1, lastQnSubHr); + if (state.dataGroundHeatExchanger->N != PrevN) { + PrevN = state.dataGroundHeatExchanger->N; + this->QnSubHr = eoshift(this->QnSubHr, -1, this->lastQnSubHr); } - calcAggregateLoad(); + calcAggregateLoad(state); // Update the heat exchanger resistance each time - HXResistance = calcHXResistance(state); + this->HXResistance = calcHXResistance(state); - if (N == 1) { - if (massFlowRate <= 0.0) { + if (state.dataGroundHeatExchanger->N == 1) { + if (this->massFlowRate <= 0.0) { tmpQnSubHourly = 0.0; - fluidAveTemp = tempGround; - ToutNew = inletTemp; + fluidAveTemp = this->tempGround; + this->ToutNew = this->inletTemp; } else { - gFuncVal = getGFunc(currentSimTime / (timeSSFactor)); + Real64 gFuncVal = getGFunc(state.dataGroundHeatExchanger->currentSimTime / (this->timeSSFactor)); - C_1 = (totalTubeLength) / (2.0 * massFlowRate * cpFluid); - tmpQnSubHourly = (tempGround - inletTemp) / (gFuncVal / (kGroundFactor) + HXResistance + C_1); - fluidAveTemp = tempGround - tmpQnSubHourly * HXResistance; - ToutNew = tempGround - tmpQnSubHourly * (gFuncVal / (kGroundFactor) + HXResistance - C_1); + Real64 C_1 = (this->totalTubeLength) / (2.0 * this->massFlowRate * cpFluid); + tmpQnSubHourly = (this->tempGround - this->inletTemp) / (gFuncVal / (kGroundFactor) + this->HXResistance + C_1); + fluidAveTemp = this->tempGround - tmpQnSubHourly * this->HXResistance; + this->ToutNew = this->tempGround - tmpQnSubHourly * (gFuncVal / (kGroundFactor) + this->HXResistance - C_1); } } else { // no monthly super position - if (currentSimTime < (hrsPerMonth + AGG + SubAGG)) { + if (state.dataGroundHeatExchanger->currentSimTime < (hrsPerMonth + this->AGG + this->SubAGG)) { // Calculate the Sub Hourly Superposition - sumQnSubHourly = 0.0; - if (int(currentSimTime) < SubAGG) { - IndexN = int(currentSimTime) + 1; + // same as above for sub-hourly( with no aggregation] + Real64 sumQnSubHourly = 0.0; + int IndexN; + if (int(state.dataGroundHeatExchanger->currentSimTime) < this->SubAGG) { + IndexN = int(state.dataGroundHeatExchanger->currentSimTime) + 1; } else { - IndexN = SubAGG + 1; + IndexN = this->SubAGG + 1; } - subHourlyLimit = N - LastHourN(IndexN); // Check this when running simulation - for (I = 1; I <= subHourlyLimit; ++I) { + int subHourlyLimit = state.dataGroundHeatExchanger->N - this->LastHourN(IndexN); // Check this when running simulation + for (int I = 1; I <= subHourlyLimit; ++I) { if (I == subHourlyLimit) { - if (int(currentSimTime) >= SubAGG) { - gFuncVal = getGFunc((currentSimTime - prevTimeSteps(I + 1)) / (timeSSFactor)); - RQSubHr = gFuncVal / (kGroundFactor); - sumQnSubHourly += (QnSubHr(I) - QnHr(IndexN)) * RQSubHr; + if (int(state.dataGroundHeatExchanger->currentSimTime) >= this->SubAGG) { + Real64 gFuncVal = + getGFunc((state.dataGroundHeatExchanger->currentSimTime - state.dataGroundHeatExchanger->prevTimeSteps(I + 1)) / + (this->timeSSFactor)); + Real64 RQSubHr = gFuncVal / (kGroundFactor); + sumQnSubHourly += (this->QnSubHr(I) - this->QnHr(IndexN)) * RQSubHr; } else { - gFuncVal = getGFunc((currentSimTime - prevTimeSteps(I + 1)) / (timeSSFactor)); - RQSubHr = gFuncVal / (kGroundFactor); - sumQnSubHourly += QnSubHr(I) * RQSubHr; + Real64 gFuncVal = + getGFunc((state.dataGroundHeatExchanger->currentSimTime - state.dataGroundHeatExchanger->prevTimeSteps(I + 1)) / + (this->timeSSFactor)); + Real64 RQSubHr = gFuncVal / (kGroundFactor); + sumQnSubHourly += this->QnSubHr(I) * RQSubHr; } break; } // prevTimeSteps(I+1) This is "I+1" because prevTimeSteps(1) = CurrentTimestep - gFuncVal = getGFunc((currentSimTime - prevTimeSteps(I + 1)) / (timeSSFactor)); - RQSubHr = gFuncVal / (kGroundFactor); - sumQnSubHourly += (QnSubHr(I) - QnSubHr(I + 1)) * RQSubHr; + Real64 gFuncVal = getGFunc((state.dataGroundHeatExchanger->currentSimTime - state.dataGroundHeatExchanger->prevTimeSteps(I + 1)) / + (this->timeSSFactor)); + Real64 RQSubHr = gFuncVal / (kGroundFactor); + sumQnSubHourly += (this->QnSubHr(I) - this->QnSubHr(I + 1)) * RQSubHr; } // Calculate the Hourly Superposition + // same as above for hourly + Real64 sumQnHourly = 0.0; - hourlyLimit = int(currentSimTime); - sumQnHourly = 0.0; - for (I = SubAGG + 1; I <= hourlyLimit; ++I) { + int hourlyLimit = int(state.dataGroundHeatExchanger->currentSimTime); + for (int I = this->SubAGG + 1; I <= hourlyLimit; ++I) { if (I == hourlyLimit) { - gFuncVal = getGFunc(currentSimTime / (timeSSFactor)); - RQHour = gFuncVal / (kGroundFactor); - sumQnHourly += QnHr(I) * RQHour; + Real64 gFuncVal = getGFunc(state.dataGroundHeatExchanger->currentSimTime / (this->timeSSFactor)); + Real64 RQHour = gFuncVal / (kGroundFactor); + sumQnHourly += this->QnHr(I) * RQHour; break; } - gFuncVal = getGFunc((currentSimTime - int(currentSimTime) + I) / (timeSSFactor)); - RQHour = gFuncVal / (kGroundFactor); - sumQnHourly += (QnHr(I) - QnHr(I + 1)) * RQHour; + Real64 gFuncVal = getGFunc((state.dataGroundHeatExchanger->currentSimTime - int(state.dataGroundHeatExchanger->currentSimTime) + I) / + (this->timeSSFactor)); + Real64 RQHour = gFuncVal / (kGroundFactor); + sumQnHourly += (this->QnHr(I) - this->QnHr(I + 1)) * RQHour; } // Find the total Sum of the Temperature difference due to all load blocks sumTotal = sumQnSubHourly + sumQnHourly; // Calculate the sub-hourly temperature due the Last Time steps Load - gFuncVal = getGFunc((currentSimTime - prevTimeSteps(2)) / (timeSSFactor)); - RQSubHr = gFuncVal / (kGroundFactor); + Real64 gFuncVal = getGFunc((state.dataGroundHeatExchanger->currentSimTime - state.dataGroundHeatExchanger->prevTimeSteps(2)) / + (this->timeSSFactor)); + Real64 RQSubHr = gFuncVal / kGroundFactor; - if (massFlowRate <= 0.0) { + if (this->massFlowRate <= 0.0) { tmpQnSubHourly = 0.0; - fluidAveTemp = tempGround - sumTotal; // Q(N)*RB = 0 - ToutNew = inletTemp; + fluidAveTemp = this->tempGround - sumTotal; // Q(N)*RB = 0 + this->ToutNew = this->inletTemp; } else { - // Dr.Spitler's Explicit set of equations to calculate the New Outlet Temperature of the U-Tube - C0 = RQSubHr; - C1 = tempGround - (sumTotal - QnSubHr(1) * RQSubHr); - C2 = totalTubeLength / (2.0 * massFlowRate * cpFluid); - C3 = massFlowRate * cpFluid / (totalTubeLength); - tmpQnSubHourly = (C1 - inletTemp) / (HXResistance + C0 - C2 + (1 / C3)); - fluidAveTemp = C1 - (C0 + HXResistance) * tmpQnSubHourly; - ToutNew = C1 + (C2 - C0 - HXResistance) * tmpQnSubHourly; + // Dr.Sitler's Explicit set of equations to calculate the New Outlet Temperature of the U-Tube + Real64 C0 = RQSubHr; + Real64 C1 = this->tempGround - (sumTotal - this->QnSubHr(1) * RQSubHr); + Real64 C2 = this->totalTubeLength / (2.0 * this->massFlowRate * cpFluid); + Real64 C3 = this->massFlowRate * cpFluid / (this->totalTubeLength); + tmpQnSubHourly = (C1 - this->inletTemp) / (this->HXResistance + C0 - C2 + (1 / C3)); + fluidAveTemp = C1 - (C0 + this->HXResistance) * tmpQnSubHourly; + this->ToutNew = C1 + (C2 - C0 - this->HXResistance) * tmpQnSubHourly; } } else { // Monthly Aggregation and super position - numOfMonths = (currentSimTime + 1) / hrsPerMonth; + // the number of months of simulation elapsed + int numOfMonths = static_cast((state.dataGroundHeatExchanger->currentSimTime + 1) / hrsPerMonth); - if (currentSimTime < ((numOfMonths)*hrsPerMonth) + AGG + SubAGG) { + // The Month up to which the monthly blocks are superposed + int currentMonth; + + if (state.dataGroundHeatExchanger->currentSimTime < ((numOfMonths)*hrsPerMonth) + this->AGG + this->SubAGG) { currentMonth = numOfMonths - 1; } else { currentMonth = numOfMonths; } // Monthly superposition - sumQnMonthly = 0.0; - for (I = 1; I <= currentMonth; ++I) { + // tmp variable which holds the sum of the Temperature difference due to Aggregated heat extraction/rejection step + Real64 sumQnMonthly = 0.0; + + for (int I = 1; I <= currentMonth; ++I) { if (I == 1) { - gFuncVal = getGFunc(currentSimTime / (timeSSFactor)); - RQMonth = gFuncVal / (kGroundFactor); - sumQnMonthly += QnMonthlyAgg(I) * RQMonth; + Real64 gFuncVal = getGFunc(state.dataGroundHeatExchanger->currentSimTime / (this->timeSSFactor)); + Real64 RQMonth = gFuncVal / (kGroundFactor); + sumQnMonthly += this->QnMonthlyAgg(I) * RQMonth; continue; } - gFuncVal = getGFunc((currentSimTime - (I - 1) * hrsPerMonth) / (timeSSFactor)); - RQMonth = gFuncVal / (kGroundFactor); - sumQnMonthly += (QnMonthlyAgg(I) - QnMonthlyAgg(I - 1)) * RQMonth; + Real64 gFuncVal = getGFunc((state.dataGroundHeatExchanger->currentSimTime - (I - 1) * hrsPerMonth) / (this->timeSSFactor)); + Real64 RQMonth = gFuncVal / (kGroundFactor); + sumQnMonthly += (this->QnMonthlyAgg(I) - this->QnMonthlyAgg(I - 1)) * RQMonth; } // Hourly Superposition - hourlyLimit = int(currentSimTime - currentMonth * hrsPerMonth); - sumQnHourly = 0.0; - for (I = 1 + SubAGG; I <= hourlyLimit; ++I) { + Real64 sumQnHourly = 0.0; + int hourlyLimit = int(state.dataGroundHeatExchanger->currentSimTime - currentMonth * hrsPerMonth); + for (int I = 1 + this->SubAGG; I <= hourlyLimit; ++I) { if (I == hourlyLimit) { - gFuncVal = getGFunc((currentSimTime - int(currentSimTime) + I) / (timeSSFactor)); - RQHour = gFuncVal / (kGroundFactor); - sumQnHourly += (QnHr(I) - QnMonthlyAgg(currentMonth)) * RQHour; + Real64 gFuncVal = getGFunc((state.dataGroundHeatExchanger->currentSimTime - int(state.dataGroundHeatExchanger->currentSimTime) + I) / + (this->timeSSFactor)); + Real64 RQHour = gFuncVal / (kGroundFactor); + sumQnHourly += (this->QnHr(I) - this->QnMonthlyAgg(currentMonth)) * RQHour; break; } - gFuncVal = getGFunc((currentSimTime - int(currentSimTime) + I) / (timeSSFactor)); - RQHour = gFuncVal / (kGroundFactor); - sumQnHourly += (QnHr(I) - QnHr(I + 1)) * RQHour; + Real64 gFuncVal = getGFunc((state.dataGroundHeatExchanger->currentSimTime - int(state.dataGroundHeatExchanger->currentSimTime) + I) / + (this->timeSSFactor)); + Real64 RQHour = gFuncVal / (kGroundFactor); + sumQnHourly += (this->QnHr(I) - this->QnHr(I + 1)) * RQHour; } // sub-hourly Superposition - subHourlyLimit = N - LastHourN(SubAGG + 1); - sumQnSubHourly = 0.0; - for (I = 1; I <= subHourlyLimit; ++I) { + int subHourlyLimit = state.dataGroundHeatExchanger->N - this->LastHourN(this->SubAGG + 1); + Real64 sumQnSubHourly = 0.0; + for (int I = 1; I <= subHourlyLimit; ++I) { if (I == subHourlyLimit) { - gFuncVal = getGFunc((currentSimTime - prevTimeSteps(I + 1)) / (timeSSFactor)); - RQSubHr = gFuncVal / (kGroundFactor); - sumQnSubHourly += (QnSubHr(I) - QnHr(SubAGG + 1)) * RQSubHr; + Real64 gFuncVal = getGFunc((state.dataGroundHeatExchanger->currentSimTime - state.dataGroundHeatExchanger->prevTimeSteps(I + 1)) / + (this->timeSSFactor)); + Real64 RQSubHr = gFuncVal / (kGroundFactor); + sumQnSubHourly += (this->QnSubHr(I) - this->QnHr(this->SubAGG + 1)) * RQSubHr; break; } - gFuncVal = getGFunc((currentSimTime - prevTimeSteps(I + 1)) / (timeSSFactor)); - RQSubHr = gFuncVal / (kGroundFactor); - sumQnSubHourly += (QnSubHr(I) - QnSubHr(I + 1)) * RQSubHr; + Real64 gFuncVal = getGFunc((state.dataGroundHeatExchanger->currentSimTime - state.dataGroundHeatExchanger->prevTimeSteps(I + 1)) / + (this->timeSSFactor)); + Real64 RQSubHr = gFuncVal / (kGroundFactor); + sumQnSubHourly += (this->QnSubHr(I) - this->QnSubHr(I + 1)) * RQSubHr; } sumTotal = sumQnMonthly + sumQnHourly + sumQnSubHourly; // Calculate the sub-hourly temperature due the Last Time steps Load + Real64 gFuncVal = getGFunc((state.dataGroundHeatExchanger->currentSimTime - state.dataGroundHeatExchanger->prevTimeSteps(2)) / + (this->timeSSFactor)); + Real64 RQSubHr = gFuncVal / (kGroundFactor); - gFuncVal = getGFunc((currentSimTime - prevTimeSteps(2)) / (timeSSFactor)); - RQSubHr = gFuncVal / (kGroundFactor); - - if (massFlowRate <= 0.0) { + if (this->massFlowRate <= 0.0) { tmpQnSubHourly = 0.0; - fluidAveTemp = tempGround - sumTotal; // Q(N)*RB = 0 - ToutNew = inletTemp; + fluidAveTemp = this->tempGround - sumTotal; // Q(N)*RB = 0 + this->ToutNew = this->inletTemp; } else { // Explicit set of equations to calculate the New Outlet Temperature of the U-Tube - C0 = RQSubHr; - C1 = tempGround - (sumTotal - QnSubHr(1) * RQSubHr); - C2 = totalTubeLength / (2 * massFlowRate * cpFluid); - C3 = massFlowRate * cpFluid / (totalTubeLength); - tmpQnSubHourly = (C1 - inletTemp) / (HXResistance + C0 - C2 + (1 / C3)); - fluidAveTemp = C1 - (C0 + HXResistance) * tmpQnSubHourly; - ToutNew = C1 + (C2 - C0 - HXResistance) * tmpQnSubHourly; + Real64 C0 = RQSubHr; + Real64 C1 = this->tempGround - (sumTotal - this->QnSubHr(1) * RQSubHr); + Real64 C2 = this->totalTubeLength / (2 * this->massFlowRate * cpFluid); + Real64 C3 = this->massFlowRate * cpFluid / (this->totalTubeLength); + tmpQnSubHourly = (C1 - this->inletTemp) / (this->HXResistance + C0 - C2 + (1 / C3)); + fluidAveTemp = C1 - (C0 + this->HXResistance) * tmpQnSubHourly; + this->ToutNew = C1 + (C2 - C0 - this->HXResistance) * tmpQnSubHourly; } } // end of AGG OR NO AGG } // end of N = 1 branch - bhTemp = tempGround - sumTotal; - // Load the QnSubHourly Array with a new value at end of every timestep + this->bhTemp = this->tempGround - sumTotal; - lastQnSubHr = tmpQnSubHourly; - outletTemp = ToutNew; - QGLHE = tmpQnSubHourly * totalTubeLength; - aveFluidTemp = fluidAveTemp; + // Load the QnSubHourly Array with a new value at end of every timestep + this->lastQnSubHr = tmpQnSubHourly; + this->outletTemp = this->ToutNew; + this->QGLHE = tmpQnSubHourly * this->totalTubeLength; + this->aveFluidTemp = fluidAveTemp; } //****************************************************************************** @@ -2015,39 +2359,44 @@ namespace GroundHeatExchangers { // Using/Aliasing using FluidProperties::GetDensityGlycol; using FluidProperties::GetSpecificHeatGlycol; - using PlantUtilities::SafeCopyPlantNode; // SUBROUTINE ARGUMENT DEFINITIONS - static std::string const RoutineName("UpdateGroundHeatExchanger"); + constexpr const char * RoutineName("UpdateGroundHeatExchanger"); - Real64 fluidDensity; - Real64 const deltaTempLimit(100.0); // temp limit for warnings - Real64 GLHEdeltaTemp; // ABS(Outlet temp -inlet temp) + constexpr Real64 deltaTempLimit(100.0); // temp limit for warnings - SafeCopyPlantNode(state, inletNodeNum, outletNodeNum); + SafeCopyPlantNode(state, this->inletNodeNum, this->outletNodeNum); - Node(outletNodeNum).Temp = outletTemp; - Node(outletNodeNum).Enthalpy = - outletTemp * GetSpecificHeatGlycol(state, state.dataPlnt->PlantLoop(loopNum).FluidName, outletTemp, state.dataPlnt->PlantLoop(loopNum).FluidIndex, RoutineName); + Node(this->outletNodeNum).Temp = this->outletTemp; + Node(this->outletNodeNum).Enthalpy = this->outletTemp * GetSpecificHeatGlycol(state, + state.dataPlnt->PlantLoop(this->loopNum).FluidName, + this->outletTemp, + state.dataPlnt->PlantLoop(this->loopNum).FluidIndex, + RoutineName); - GLHEdeltaTemp = std::abs(outletTemp - inletTemp); + Real64 GLHEdeltaTemp = std::abs(this->outletTemp - this->inletTemp); - if (GLHEdeltaTemp > deltaTempLimit && this->numErrorCalls < numVerticalGLHEs && !state.dataGlobal->WarmupFlag) { - fluidDensity = GetDensityGlycol(state, state.dataPlnt->PlantLoop(loopNum).FluidName, inletTemp, state.dataPlnt->PlantLoop(loopNum).FluidIndex, RoutineName); - designMassFlow = designFlow * fluidDensity; + if (GLHEdeltaTemp > deltaTempLimit && this->numErrorCalls < state.dataGroundHeatExchanger->numVerticalGLHEs && + !state.dataGlobal->WarmupFlag) { + Real64 fluidDensity = GetDensityGlycol(state, + state.dataPlnt->PlantLoop(this->loopNum).FluidName, + this->inletTemp, + state.dataPlnt->PlantLoop(this->loopNum).FluidIndex, + RoutineName); + this->designMassFlow = this->designFlow * fluidDensity; ShowWarningError(state, "Check GLHE design inputs & g-functions for consistency"); - ShowContinueError(state, "For GroundHeatExchanger: " + name + "GLHE delta Temp > 100C."); + ShowContinueError(state, "For GroundHeatExchanger: " + this->name + "GLHE delta Temp > 100C."); ShowContinueError(state, "This can be encountered in cases where the GLHE mass flow rate is either significantly"); ShowContinueError(state, " lower than the design value, or cases where the mass flow rate rapidly changes."); - ShowContinueError(state, format("GLHE Current Flow Rate={:.3T}; GLHE Design Flow Rate={:.3T}", massFlowRate, designMassFlow)); + ShowContinueError(state, format("GLHE Current Flow Rate={:.3T}; GLHE Design Flow Rate={:.3T}", this->massFlowRate, this->designMassFlow)); ++this->numErrorCalls; } } //****************************************************************************** - void GLHEBase::calcAggregateLoad() + void GLHEBase::calcAggregateLoad(EnergyPlusData &state) { // SUBROUTINE INFORMATION: @@ -2071,49 +2420,45 @@ namespace GroundHeatExchangers { // Yavuzturk, C., J.D. Spitler. 1999. 'A Short Time Step Response Factor Model // for Vertical Ground Loop Heat Exchangers. ASHRAE Transactions. 105(2): 475-485. - // USE STATEMENTS: - // na + if (state.dataGroundHeatExchanger->currentSimTime <= 0.0) return; - // Locals - // LOCAL VARIABLES - Real64 SumQnMonth; // intermediate variable to store the monthly heat rejection/ - Real64 SumQnHr; - int MonthNum; - int J; // Loop counter - - if (currentSimTime <= 0.0) return; - - // FOR EVERY HOUR UPDATE THE HOURLY QN QnHr(J) + // FOR EVERY HOUR UPDATE THE HOURLY QN this->QnHr(J) // THIS IS DONE BY AGGREGATING THE sub-hourly QN FROM THE PREVIOUS HOUR TO UNTIL THE CURRENT HOUR // AND STORING IT IN verticalGLHE(GLHENum)%QnHr(J) // sub-hourly Qn IS NOT AGGREGATED . IT IS THE BASIC LOAD - if (prevHour != locHourOfDay) { - SumQnHr = 0.0; - for (J = 1; J <= (N - LastHourN(1)); ++J) { - SumQnHr += QnSubHr(J) * std::abs(prevTimeSteps(J) - prevTimeSteps(J + 1)); + if (this->prevHour != state.dataGroundHeatExchanger->locHourOfDay) { + Real64 SumQnHr = 0.0; + int J; + for (J = 1; J <= (state.dataGroundHeatExchanger->N - this->LastHourN(1)); ++J) { + SumQnHr += this->QnSubHr(J) * + std::abs(state.dataGroundHeatExchanger->prevTimeSteps(J) - state.dataGroundHeatExchanger->prevTimeSteps(J + 1)); } - if (prevTimeSteps(1) != prevTimeSteps(J)) { - SumQnHr /= std::abs(prevTimeSteps(1) - prevTimeSteps(J)); + if (state.dataGroundHeatExchanger->prevTimeSteps(1) != state.dataGroundHeatExchanger->prevTimeSteps(J)) { + SumQnHr /= std::abs(state.dataGroundHeatExchanger->prevTimeSteps(1) - state.dataGroundHeatExchanger->prevTimeSteps(J)); } else { SumQnHr /= 0.05; // estimated small timestep } - QnHr = eoshift(QnHr, -1, SumQnHr); - LastHourN = eoshift(LastHourN, -1, N); + this->QnHr = eoshift(this->QnHr, -1, SumQnHr); + this->LastHourN = eoshift(this->LastHourN, -1, state.dataGroundHeatExchanger->N); } // CHECK IF A MONTH PASSES... - if (mod(((locDayOfSim - 1) * hrsPerDay + (locHourOfDay)), hrsPerMonth) == 0 && prevHour != locHourOfDay) { - MonthNum = (locDayOfSim * hrsPerDay + locHourOfDay) / hrsPerMonth; - SumQnMonth = 0.0; - for (J = 1; J <= int(hrsPerMonth); ++J) { - SumQnMonth += QnHr(J); + if (mod(((state.dataGroundHeatExchanger->locDayOfSim - 1) * DataGlobalConstants::HoursInDay + (state.dataGroundHeatExchanger->locHourOfDay)), + hrsPerMonth) == 0 && + this->prevHour != state.dataGroundHeatExchanger->locHourOfDay) { + Real64 MonthNum = static_cast( + (state.dataGroundHeatExchanger->locDayOfSim * DataGlobalConstants::HoursInDay + state.dataGroundHeatExchanger->locHourOfDay) / + hrsPerMonth); + Real64 SumQnMonth = 0.0; + for (int J = 1; J <= int(hrsPerMonth); ++J) { + SumQnMonth += this->QnHr(J); } SumQnMonth /= hrsPerMonth; - QnMonthlyAgg(MonthNum) = SumQnMonth; + this->QnMonthlyAgg(MonthNum) = SumQnMonth; } - if (prevHour != locHourOfDay) { - prevHour = locHourOfDay; + if (this->prevHour != state.dataGroundHeatExchanger->locHourOfDay) { + this->prevHour = state.dataGroundHeatExchanger->locHourOfDay; } } @@ -2127,30 +2472,17 @@ namespace GroundHeatExchangers { // MODIFIED Arun Murugappan // RE-ENGINEERED na - // PURPOSE OF THIS SUBROUTINE: - // This subroutine needs a description. - - // METHODOLOGY EMPLOYED: - // Needs description, as appropriate. - - // REFERENCES: - // na - - // Using/Aliasing - using BranchNodeConnections::TestCompSet; - using NodeInputManager::GetOnlySingleNode; - using PlantUtilities::RegisterPlantCompDesignFlow; + bool errorsFound = false; // GET NUMBER OF ALL EQUIPMENT TYPES - - numVerticalGLHEs = inputProcessor->getNumObjectsFound(state, "GroundHeatExchanger:System"); - numSlinkyGLHEs = inputProcessor->getNumObjectsFound(state, "GroundHeatExchanger:Slinky"); - numVertArray = inputProcessor->getNumObjectsFound(state, "GroundHeatExchanger:Vertical:Array"); - numVertProps = inputProcessor->getNumObjectsFound(state, "GroundHeatExchanger:Vertical:Properties"); - numResponseFactors = inputProcessor->getNumObjectsFound(state, "GroundHeatExchanger:ResponseFactors"); - numSingleBorehole = inputProcessor->getNumObjectsFound(state, "GroundHeatExchanger:Vertical:Single"); - - if (numVerticalGLHEs <= 0 && numSlinkyGLHEs <= 0) { + state.dataGroundHeatExchanger->numVerticalGLHEs = inputProcessor->getNumObjectsFound(state, "GroundHeatExchanger:System"); + state.dataGroundHeatExchanger->numSlinkyGLHEs = inputProcessor->getNumObjectsFound(state, "GroundHeatExchanger:Slinky"); + state.dataGroundHeatExchanger->numVertArray = inputProcessor->getNumObjectsFound(state, "GroundHeatExchanger:Vertical:Array"); + state.dataGroundHeatExchanger->numVertProps = inputProcessor->getNumObjectsFound(state, "GroundHeatExchanger:Vertical:Properties"); + state.dataGroundHeatExchanger->numResponseFactors = inputProcessor->getNumObjectsFound(state, "GroundHeatExchanger:ResponseFactors"); + state.dataGroundHeatExchanger->numSingleBorehole = inputProcessor->getNumObjectsFound(state, "GroundHeatExchanger:Vertical:Single"); + + if (state.dataGroundHeatExchanger->numVerticalGLHEs <= 0 && state.dataGroundHeatExchanger->numSlinkyGLHEs <= 0) { ShowSevereError(state, "Error processing inputs for GLHE objects"); ShowContinueError(state, "Simulation indicated these objects were found, but input processor doesn't find any"); ShowContinueError(state, "Check inputs for GroundHeatExchanger:System and GroundHeatExchanger:Slinky"); @@ -2158,672 +2490,189 @@ namespace GroundHeatExchangers { errorsFound = true; } - if (numVertProps > 0) { - - DataIPShortCuts::cCurrentModuleObject = "GroundHeatExchanger:Vertical:Properties"; - - for (int propNum = 1; propNum <= numVertProps; ++propNum) { - - // just a few vars to pass in and out to GetObjectItem - int ioStatus; - int numAlphas; - int numNumbers; - - // get the input data and store it in the Shortcuts structures - inputProcessor->getObjectItem(state, - DataIPShortCuts::cCurrentModuleObject, - propNum, - DataIPShortCuts::cAlphaArgs, - numAlphas, - DataIPShortCuts::rNumericArgs, - numNumbers, - ioStatus, - DataIPShortCuts::lNumericFieldBlanks, - DataIPShortCuts::lAlphaFieldBlanks, - DataIPShortCuts::cAlphaFieldNames, - DataIPShortCuts::cNumericFieldNames); - - // the input processor validates the numeric inputs based on the IDD definition - // still validate the name to make sure there aren't any duplicates or blanks - // blanks are easy: fatal if blank - if (DataIPShortCuts::lAlphaFieldBlanks(1)) { - ShowFatalError(state, "Invalid input for " + DataIPShortCuts::cCurrentModuleObject + " object: Name cannot be blank"); - } + if (state.dataGroundHeatExchanger->numVertProps > 0) { - // we just need to loop over the existing vector elements to check for duplicates since we haven't add this one yet - for (auto &existingVertProp : vertPropsVector) { - if (DataIPShortCuts::cAlphaArgs(1) == existingVertProp->name) { - ShowFatalError(state, "Invalid input for " + DataIPShortCuts::cCurrentModuleObject + - " object: Duplicate name found: " + existingVertProp->name); - } - } + std::string currObj = "GroundHeatExchanger:Vertical:Properties"; - // Build out new instance and add it to the vector - std::shared_ptr thisProp(new GLHEVertPropsStruct); - thisProp->name = DataIPShortCuts::cAlphaArgs(1); - thisProp->bhTopDepth = DataIPShortCuts::rNumericArgs(1); - thisProp->bhLength = DataIPShortCuts::rNumericArgs(2); - thisProp->bhDiameter = DataIPShortCuts::rNumericArgs(3); - thisProp->grout.k = DataIPShortCuts::rNumericArgs(4); - thisProp->grout.rhoCp = DataIPShortCuts::rNumericArgs(5); - thisProp->pipe.k = DataIPShortCuts::rNumericArgs(6); - thisProp->pipe.rhoCp = DataIPShortCuts::rNumericArgs(7); - thisProp->pipe.outDia = DataIPShortCuts::rNumericArgs(8); - thisProp->pipe.thickness = DataIPShortCuts::rNumericArgs(9); - thisProp->bhUTubeDist = DataIPShortCuts::rNumericArgs(10); - - if (thisProp->bhUTubeDist < thisProp->pipe.outDia) { - ShowWarningError(state, - "Borehole shank spacing is less than the pipe diameter. U-tube spacing is reference from the u-tube pipe center."); - ShowWarningError(state, "Shank spacing is set to the outer pipe diameter."); - thisProp->bhUTubeDist = thisProp->pipe.outDia; - } - - thisProp->pipe.innerDia = thisProp->pipe.outDia - 2 * thisProp->pipe.thickness; - thisProp->pipe.outRadius = thisProp->pipe.outDia / 2; - thisProp->pipe.innerRadius = thisProp->pipe.innerDia / 2; + auto const instances = inputProcessor->epJSON.find(currObj); + if (instances == inputProcessor->epJSON.end()) { + ShowSevereError(state, // LCOV_EXCL_LINE + currObj + ": Somehow getNumObjectsFound was > 0 but epJSON.find found 0"); // LCOV_EXCL_LINE + } - vertPropsVector.push_back(thisProp); + auto &instancesValue = instances.value(); + for (auto it = instancesValue.begin(); it != instancesValue.end(); ++it) { + auto const &instance = it.value(); + auto const &objName = it.key(); + auto const &objNameUC = UtilityRoutines::MakeUPPERCase(objName); + inputProcessor->markObjectAsUsed(currObj, objName); + std::shared_ptr thisObj(new GLHEVertProps(state, objNameUC, instance)); + state.dataGroundHeatExchanger->vertPropsVector.push_back(thisObj); } } - if (numResponseFactors > 0) { - - DataIPShortCuts::cCurrentModuleObject = "GroundHeatExchanger:ResponseFactors"; - - for (int rfNum = 1; rfNum <= numResponseFactors; ++rfNum) { - - // just a few vars to pass in and out to GetObjectItem - int ioStatus; - int numAlphas; - int numNumbers; - - // get the input data and store it in the Shortcuts structures - inputProcessor->getObjectItem(state, - DataIPShortCuts::cCurrentModuleObject, - rfNum, - DataIPShortCuts::cAlphaArgs, - numAlphas, - DataIPShortCuts::rNumericArgs, - numNumbers, - ioStatus, - DataIPShortCuts::lNumericFieldBlanks, - DataIPShortCuts::lAlphaFieldBlanks, - DataIPShortCuts::cAlphaFieldNames, - DataIPShortCuts::cNumericFieldNames); - - // the input processor validates the numeric inputs based on the IDD definition - // still validate the name to make sure there aren't any duplicates or blanks - // blanks are easy: fatal if blank - if (DataIPShortCuts::lAlphaFieldBlanks(1)) { - ShowFatalError(state, "Invalid input for " + DataIPShortCuts::cCurrentModuleObject + " object: Name cannot be blank"); - } - - // we just need to loop over the existing vector elements to check for duplicates since we haven't add this one yet - for (auto &existingVertProp : vertPropsVector) { - if (DataIPShortCuts::cAlphaArgs(1) == existingVertProp->name) { - ShowFatalError(state, "Invalid input for " + DataIPShortCuts::cCurrentModuleObject + - " object: Duplicate name found: " + existingVertProp->name); - } - } - - // Build out new instance and add it to the vector - std::shared_ptr thisRF(new GLHEResponseFactorsStruct); - thisRF->name = DataIPShortCuts::cAlphaArgs(1); - thisRF->props = GetVertProps(DataIPShortCuts::cAlphaArgs(2)); - thisRF->numBoreholes = DataIPShortCuts::rNumericArgs(1); - thisRF->gRefRatio = DataIPShortCuts::rNumericArgs(2); - - thisRF->maxSimYears = state.dataEnvrn->MaxNumberSimYears; - - int numPreviousFields = 2; - int numFields = 0; - for (auto &isFieldBlank : DataIPShortCuts::lNumericFieldBlanks) { - if (!isFieldBlank) { - numFields += 1; - } else if (isFieldBlank) { - break; - } - } - - if ((numFields - numPreviousFields) % 2 == 0) { - thisRF->numGFuncPairs = (numFields - numPreviousFields) / 2; - } else { - errorsFound = true; - ShowSevereError(state, "Errors found processing response factor input for Response Factor= " + thisRF->name); - ShowSevereError(state, "Uneven number of g-function pairs"); - } - - thisRF->LNTTS.dimension(thisRF->numGFuncPairs, 0.0); - thisRF->GFNC.dimension(thisRF->numGFuncPairs, 0.0); + if (state.dataGroundHeatExchanger->numResponseFactors > 0) { - int indexNum = 3; - for (int pairNum = 1; pairNum <= thisRF->numGFuncPairs; ++pairNum) { - thisRF->LNTTS(pairNum) = DataIPShortCuts::rNumericArgs(indexNum); - thisRF->GFNC(pairNum) = DataIPShortCuts::rNumericArgs(indexNum + 1); - indexNum += 2; - } + std::string currObj = "GroundHeatExchanger:ResponseFactors"; - responseFactorsVector.push_back(thisRF); + auto const instances = inputProcessor->epJSON.find(currObj); + if (instances == inputProcessor->epJSON.end()) { + ShowSevereError(state, // LCOV_EXCL_LINE + currObj + ": Somehow getNumObjectsFound was > 0 but epJSON.find found 0"); // LCOV_EXCL_LINE } - } - - if (numVertArray > 0) { - - DataIPShortCuts::cCurrentModuleObject = "GroundHeatExchanger:Vertical:Array"; - - for (int arrayNum = 1; arrayNum <= numVertArray; ++arrayNum) { - - // just a few vars to pass in and out to GetObjectItem - int ioStatus; - int numAlphas; - int numNumbers; - - // get the input data and store it in the Shortcuts structures - inputProcessor->getObjectItem(state, - DataIPShortCuts::cCurrentModuleObject, - arrayNum, - DataIPShortCuts::cAlphaArgs, - numAlphas, - DataIPShortCuts::rNumericArgs, - numNumbers, - ioStatus, - DataIPShortCuts::lNumericFieldBlanks, - DataIPShortCuts::lAlphaFieldBlanks, - DataIPShortCuts::cAlphaFieldNames, - DataIPShortCuts::cNumericFieldNames); - - // the input processor validates the numeric inputs based on the IDD definition - // still validate the name to make sure there aren't any duplicates or blanks - // blanks are easy: fatal if blank - if (DataIPShortCuts::lAlphaFieldBlanks(1)) { - ShowFatalError(state, "Invalid input for " + DataIPShortCuts::cCurrentModuleObject + " object: Name cannot be blank"); - } - - // we just need to loop over the existing vector elements to check for duplicates since we haven't add this one yet - for (auto &existingVerticalArray : vertArraysVector) { - if (DataIPShortCuts::cAlphaArgs(1) == existingVerticalArray->name) { - ShowFatalError(state, "Invalid input for " + DataIPShortCuts::cCurrentModuleObject + - " object: Duplicate name found: " + existingVerticalArray->name); - } - } - // Build out new instance and add it to the vector - std::shared_ptr thisArray(new GLHEVertArrayStruct); - thisArray->name = DataIPShortCuts::cAlphaArgs(1); - thisArray->props = GetVertProps(DataIPShortCuts::cAlphaArgs(2)); - thisArray->numBHinXDirection = DataIPShortCuts::rNumericArgs(1); - thisArray->numBHinYDirection = DataIPShortCuts::rNumericArgs(2); - thisArray->bhSpacing = DataIPShortCuts::rNumericArgs(3); - vertArraysVector.push_back(thisArray); + auto &instancesValue = instances.value(); + for (auto it = instancesValue.begin(); it != instancesValue.end(); ++it) { + auto const &instance = it.value(); + auto const &objName = it.key(); + auto const &objNameUC = UtilityRoutines::MakeUPPERCase(objName); + inputProcessor->markObjectAsUsed(currObj, objName); + std::shared_ptr thisObj(new GLHEResponseFactors(state, objNameUC, instance)); + state.dataGroundHeatExchanger->responseFactorsVector.push_back(thisObj); } } - if (numSingleBorehole > 0) { - - DataIPShortCuts::cCurrentModuleObject = "GroundHeatExchanger:Vertical:Single"; - - for (int bhNum = 1; bhNum <= numSingleBorehole; ++bhNum) { - - // just a few vars to pass in and out to GetObjectItem - int ioStatus; - int numAlphas; - int numNumbers; - - // get the input data and store it in the Shortcuts structures - inputProcessor->getObjectItem(state, - DataIPShortCuts::cCurrentModuleObject, - bhNum, - DataIPShortCuts::cAlphaArgs, - numAlphas, - DataIPShortCuts::rNumericArgs, - numNumbers, - ioStatus, - DataIPShortCuts::lNumericFieldBlanks, - DataIPShortCuts::lAlphaFieldBlanks, - DataIPShortCuts::cAlphaFieldNames, - DataIPShortCuts::cNumericFieldNames); - - // the input processor validates the numeric inputs based on the IDD definition - // still validate the name to make sure there aren't any duplicates or blanks - // blanks are easy: fatal if blank - if (DataIPShortCuts::lAlphaFieldBlanks(1)) { - ShowFatalError(state, "Invalid input for " + DataIPShortCuts::cCurrentModuleObject + " object: Name cannot be blank"); - } + if (state.dataGroundHeatExchanger->numVertArray > 0) { - // we just need to loop over the existing vector elements to check for duplicates since we haven't add this one yet - for (auto &existingSingleBH : singleBoreholesVector) { - if (DataIPShortCuts::cAlphaArgs(1) == existingSingleBH->name) { - ShowFatalError(state, "Invalid input for " + DataIPShortCuts::cCurrentModuleObject + - " object: Duplicate name found: " + existingSingleBH->name); - } - } + std::string currObj = "GroundHeatExchanger:Vertical:Array"; - // Build out new instance and add it to the vector - std::shared_ptr thisArray(new GLHEVertSingleStruct); - thisArray->name = DataIPShortCuts::cAlphaArgs(1); - thisArray->props = GetVertProps(DataIPShortCuts::cAlphaArgs(2)); - thisArray->xLoc = DataIPShortCuts::rNumericArgs(1); - thisArray->yLoc = DataIPShortCuts::rNumericArgs(2); + auto const instances = inputProcessor->epJSON.find(currObj); + if (instances == inputProcessor->epJSON.end()) { + ShowSevereError(state, // LCOV_EXCL_LINE + currObj + ": Somehow getNumObjectsFound was > 0 but epJSON.find found 0"); // LCOV_EXCL_LINE + } - singleBoreholesVector.push_back(thisArray); + auto &instancesValue = instances.value(); + for (auto it = instancesValue.begin(); it != instancesValue.end(); ++it) { + auto const &instance = it.value(); + auto const &objName = it.key(); + auto const &objNameUC = UtilityRoutines::MakeUPPERCase(objName); + inputProcessor->markObjectAsUsed(currObj, objName); + std::shared_ptr thisObj(new GLHEVertArray(state, objNameUC, instance)); + state.dataGroundHeatExchanger->vertArraysVector.push_back(thisObj); } } - if (numVerticalGLHEs > 0) { - - DataIPShortCuts::cCurrentModuleObject = "GroundHeatExchanger:System"; - - for (int GLHENum = 1; GLHENum <= numVerticalGLHEs; ++GLHENum) { - - // just a few vars to pass in and out to GetObjectItem - int ioStatus; - int numAlphas; - int numNumbers; - - // get the input data and store it in the Shortcuts structures - inputProcessor->getObjectItem(state, - DataIPShortCuts::cCurrentModuleObject, - GLHENum, - DataIPShortCuts::cAlphaArgs, - numAlphas, - DataIPShortCuts::rNumericArgs, - numNumbers, - ioStatus, - DataIPShortCuts::lNumericFieldBlanks, - DataIPShortCuts::lAlphaFieldBlanks, - DataIPShortCuts::cAlphaFieldNames, - DataIPShortCuts::cNumericFieldNames); - - // the input processor validates the numeric inputs based on the IDD definition - // still validate the name to make sure there aren't any duplicates or blanks - // blanks are easy: fatal if blank - if (DataIPShortCuts::lAlphaFieldBlanks(1)) { - ShowFatalError(state, "Invalid input for " + DataIPShortCuts::cCurrentModuleObject + " object: Name cannot be blank"); - } - - // we just need to loop over the existing vector elements to check for duplicates since we haven't add this one yet - for (auto &existingVerticalGLHE : verticalGLHE) { - if (DataIPShortCuts::cAlphaArgs(1) == existingVerticalGLHE.name) { - ShowFatalError(state, "Invalid input for " + DataIPShortCuts::cCurrentModuleObject + - " object: Duplicate name found: " + existingVerticalGLHE.name); - } - } - - // Build out new instance - GLHEVert thisGLHE; - thisGLHE.name = DataIPShortCuts::cAlphaArgs(1); - - // get inlet node num - thisGLHE.inletNodeNum = GetOnlySingleNode(state, DataIPShortCuts::cAlphaArgs(2), - errorsFound, - DataIPShortCuts::cCurrentModuleObject, - DataIPShortCuts::cAlphaArgs(1), - NodeType_Water, - NodeConnectionType_Inlet, - 1, - ObjectIsNotParent); - - // get outlet node num - thisGLHE.outletNodeNum = GetOnlySingleNode(state, DataIPShortCuts::cAlphaArgs(3), - errorsFound, - DataIPShortCuts::cCurrentModuleObject, - DataIPShortCuts::cAlphaArgs(1), - NodeType_Water, - NodeConnectionType_Outlet, - 1, - ObjectIsNotParent); - thisGLHE.available = true; - thisGLHE.on = true; - - TestCompSet(state, DataIPShortCuts::cCurrentModuleObject, - DataIPShortCuts::cAlphaArgs(1), - DataIPShortCuts::cAlphaArgs(2), - DataIPShortCuts::cAlphaArgs(3), - "Condenser Water Nodes"); - - thisGLHE.designFlow = DataIPShortCuts::rNumericArgs(1); - RegisterPlantCompDesignFlow(thisGLHE.inletNodeNum, thisGLHE.designFlow); - - thisGLHE.soil.k = DataIPShortCuts::rNumericArgs(2); - thisGLHE.soil.rhoCp = DataIPShortCuts::rNumericArgs(3); - - if (!DataIPShortCuts::lAlphaFieldBlanks(6)) { - // Response factors come from IDF object - thisGLHE.myRespFactors = GetResponseFactor(DataIPShortCuts::cAlphaArgs(6)); - thisGLHE.gFunctionsExist = true; - - if (!thisGLHE.myRespFactors) { - errorsFound = true; - ShowSevereError(state, "GroundHeatExchanger:ResponseFactors object not found."); - } - } else if (!DataIPShortCuts::lAlphaFieldBlanks(7)) { - // Response factors come from array object - thisGLHE.myRespFactors = BuildAndGetResponseFactorObjectFromArray(GetVertArray(DataIPShortCuts::cAlphaArgs(7))); - - if (!thisGLHE.myRespFactors) { - errorsFound = true; - ShowSevereError(state, "GroundHeatExchanger:Vertical:Array object not found."); - } - } else { - if (DataIPShortCuts::lAlphaFieldBlanks(8)) { - // No ResponseFactors, GHEArray, or SingleBH object are referenced - ShowSevereError(state, "No GHE:ResponseFactors, GHE:Vertical:Array, or GHE:Vertical:Single object found"); - ShowFatalError(state, "Check references to these object for GHE:System object= " + thisGLHE.name); - } - - // Calculate response factors from individual boreholes - std::vector> tempVectOfBHObjects; - - for (int index = 8; index <= DataIPShortCuts::cAlphaArgs.u1(); ++index) { - if (!DataIPShortCuts::lAlphaFieldBlanks(index)) { - std::shared_ptr tempBHptr = GetSingleBH(DataIPShortCuts::cAlphaArgs(index)); - if (tempBHptr) { - tempVectOfBHObjects.push_back(tempBHptr); - } else { - errorsFound = true; - ShowSevereError(state, "Borehole= " + DataIPShortCuts::cAlphaArgs(index) + " not found."); - break; - } - } else { - break; - } - } - - thisGLHE.myRespFactors = BuildAndGetResponseFactorsObjectFromSingleBHs(tempVectOfBHObjects); - - if (!thisGLHE.myRespFactors) { - errorsFound = true; - ShowSevereError(state, "GroundHeatExchanger:Vertical:Single objects not found."); - } - } - - thisGLHE.bhDiameter = thisGLHE.myRespFactors->props->bhDiameter; - thisGLHE.bhRadius = thisGLHE.bhDiameter / 2.0; - thisGLHE.bhLength = thisGLHE.myRespFactors->props->bhLength; - thisGLHE.bhUTubeDist = thisGLHE.myRespFactors->props->bhUTubeDist; - - // pull pipe and grout data up from response factor struct for simplicity - thisGLHE.pipe.outDia = thisGLHE.myRespFactors->props->pipe.outDia; - thisGLHE.pipe.innerDia = thisGLHE.myRespFactors->props->pipe.innerDia; - thisGLHE.pipe.outRadius = thisGLHE.pipe.outDia / 2; - thisGLHE.pipe.innerRadius = thisGLHE.pipe.innerDia / 2; - thisGLHE.pipe.thickness = thisGLHE.myRespFactors->props->pipe.thickness; - thisGLHE.pipe.k = thisGLHE.myRespFactors->props->pipe.k; - thisGLHE.pipe.rhoCp = thisGLHE.myRespFactors->props->pipe.rhoCp; - - thisGLHE.grout.k = thisGLHE.myRespFactors->props->grout.k; - thisGLHE.grout.rhoCp = thisGLHE.myRespFactors->props->grout.rhoCp; - - thisGLHE.myRespFactors->gRefRatio = thisGLHE.bhRadius / thisGLHE.bhLength; + if (state.dataGroundHeatExchanger->numSingleBorehole > 0) { - // Number of simulation years from RunPeriod - thisGLHE.myRespFactors->maxSimYears = state.dataEnvrn->MaxNumberSimYears; + std::string currObj = "GroundHeatExchanger:Vertical:Single"; - // total tube length - thisGLHE.totalTubeLength = thisGLHE.myRespFactors->numBoreholes * thisGLHE.myRespFactors->props->bhLength; - - // ground thermal diffusivity - thisGLHE.soil.diffusivity = thisGLHE.soil.k / thisGLHE.soil.rhoCp; - - // multipole method constants - thisGLHE.theta_1 = thisGLHE.bhUTubeDist / (2 * thisGLHE.bhRadius); - thisGLHE.theta_2 = thisGLHE.bhRadius / thisGLHE.pipe.outRadius; - thisGLHE.theta_3 = 1 / (2 * thisGLHE.theta_1 * thisGLHE.theta_2); - thisGLHE.sigma = (thisGLHE.grout.k - thisGLHE.soil.k) / (thisGLHE.grout.k + thisGLHE.soil.k); - - thisGLHE.SubAGG = 15; - thisGLHE.AGG = 192; - - // Allocation of all the dynamic arrays - thisGLHE.QnMonthlyAgg.dimension(thisGLHE.myRespFactors->maxSimYears * 12, 0.0); - thisGLHE.QnHr.dimension(730 + thisGLHE.AGG + thisGLHE.SubAGG, 0.0); - thisGLHE.QnSubHr.dimension((thisGLHE.SubAGG + 1) * maxTSinHr + 1, 0.0); - thisGLHE.LastHourN.dimension(thisGLHE.SubAGG + 1, 0); + auto const instances = inputProcessor->epJSON.find(currObj); + if (instances == inputProcessor->epJSON.end()) { + ShowSevereError(state, // LCOV_EXCL_LINE + currObj + ": Somehow getNumObjectsFound was > 0 but epJSON.find found 0"); // LCOV_EXCL_LINE + } - prevTimeSteps.allocate((thisGLHE.SubAGG + 1) * maxTSinHr + 1); - prevTimeSteps = 0.0; + auto &instancesValue = instances.value(); + for (auto it = instancesValue.begin(); it != instancesValue.end(); ++it) { + auto const &instance = it.value(); + auto const &objName = it.key(); + auto const &objNameUC = UtilityRoutines::MakeUPPERCase(objName); + inputProcessor->markObjectAsUsed(currObj, objName); + std::shared_ptr thisObj(new GLHEVertSingle(state, objNameUC, instance)); + state.dataGroundHeatExchanger->singleBoreholesVector.push_back(thisObj); + } + } - // Initialize ground temperature model and get pointer reference - thisGLHE.groundTempModel = GetGroundTempModelAndInit(state, DataIPShortCuts::cAlphaArgs(4), DataIPShortCuts::cAlphaArgs(5)); - if (thisGLHE.groundTempModel) { - errorsFound = thisGLHE.groundTempModel->errorsFound; - } + if (state.dataGroundHeatExchanger->numVerticalGLHEs > 0) { - // Check for Errors - if (errorsFound) { - ShowFatalError(state, "Errors found in processing input for " + DataIPShortCuts::cCurrentModuleObject); - } + std::string currObj = "GroundHeatExchanger:System"; - verticalGLHE.push_back(thisGLHE); + auto const instances = inputProcessor->epJSON.find(currObj); + if (instances == inputProcessor->epJSON.end()) { + ShowSevereError(state, // LCOV_EXCL_LINE + currObj + ": Somehow getNumObjectsFound was > 0 but epJSON.find found 0"); // LCOV_EXCL_LINE } - // Set up report variables - for (int GLHENum = 0; GLHENum < numVerticalGLHEs; ++GLHENum) { - auto &thisGLHE(verticalGLHE[GLHENum]); - SetupOutputVariable(state, "Ground Heat Exchanger Average Borehole Temperature", - OutputProcessor::Unit::C, - thisGLHE.bhTemp, - "System", - "Average", - thisGLHE.name); - SetupOutputVariable(state, - "Ground Heat Exchanger Heat Transfer Rate", OutputProcessor::Unit::W, thisGLHE.QGLHE, "System", "Average", thisGLHE.name); - SetupOutputVariable(state, - "Ground Heat Exchanger Inlet Temperature", OutputProcessor::Unit::C, thisGLHE.inletTemp, "System", "Average", thisGLHE.name); - SetupOutputVariable(state, - "Ground Heat Exchanger Outlet Temperature", OutputProcessor::Unit::C, thisGLHE.outletTemp, "System", "Average", thisGLHE.name); - SetupOutputVariable(state, - "Ground Heat Exchanger Mass Flow Rate", OutputProcessor::Unit::kg_s, thisGLHE.massFlowRate, "System", "Average", thisGLHE.name); - SetupOutputVariable(state, "Ground Heat Exchanger Average Fluid Temperature", - OutputProcessor::Unit::C, - thisGLHE.aveFluidTemp, - "System", - "Average", - thisGLHE.name); - SetupOutputVariable(state, "Ground Heat Exchanger Farfield Ground Temperature", - OutputProcessor::Unit::C, - thisGLHE.tempGround, - "System", - "Average", - thisGLHE.name); + auto &instancesValue = instances.value(); + for (auto it = instancesValue.begin(); it != instancesValue.end(); ++it) { + auto const &instance = it.value(); + auto const &objName = it.key(); + auto const &objNameUC = UtilityRoutines::MakeUPPERCase(objName); + inputProcessor->markObjectAsUsed(currObj, objName); + state.dataGroundHeatExchanger->verticalGLHE.emplace_back(state, objNameUC, instance); } } // SLINKY GLHE - if (numSlinkyGLHEs > 0) { - - DataIPShortCuts::cCurrentModuleObject = "GroundHeatExchanger:Slinky"; - - for (int GLHENum = 1; GLHENum <= numSlinkyGLHEs; ++GLHENum) { - - // just a few vars to pass in and out to GetObjectItem - int ioStatus; - int numAlphas; - int numNumbers; - - // get the input data and store it in the Shortcuts structures - inputProcessor->getObjectItem(state, - DataIPShortCuts::cCurrentModuleObject, - GLHENum, - DataIPShortCuts::cAlphaArgs, - numAlphas, - DataIPShortCuts::rNumericArgs, - numNumbers, - ioStatus, - DataIPShortCuts::lNumericFieldBlanks, - DataIPShortCuts::lAlphaFieldBlanks, - DataIPShortCuts::cAlphaFieldNames, - DataIPShortCuts::cNumericFieldNames); - - // the input processor validates the numeric inputs based on the IDD definition - // still validate the name to make sure there aren't any duplicates or blanks - // blanks are easy: fatal if blank - if (DataIPShortCuts::lAlphaFieldBlanks[0]) { - ShowFatalError(state, "Invalid input for " + DataIPShortCuts::cCurrentModuleObject + " object: Name cannot be blank"); - } + if (state.dataGroundHeatExchanger->numSlinkyGLHEs > 0) { - // we just need to loop over the existing vector elements to check for duplicates since we haven't add this one yet - for (auto &existingSlinkyGLHE : slinkyGLHE) { - if (DataIPShortCuts::cAlphaArgs(1) == existingSlinkyGLHE.name) { - ShowFatalError(state, "Invalid input for " + DataIPShortCuts::cCurrentModuleObject + - " object: Duplicate name found: " + existingSlinkyGLHE.name); - } - } - - // Build out new instance - GLHESlinky thisGLHE; - thisGLHE.name = DataIPShortCuts::cAlphaArgs(1); - - // get inlet node num - thisGLHE.inletNodeNum = GetOnlySingleNode(state, DataIPShortCuts::cAlphaArgs(2), - errorsFound, - DataIPShortCuts::cCurrentModuleObject, - DataIPShortCuts::cAlphaArgs(1), - NodeType_Water, - NodeConnectionType_Inlet, - 1, - ObjectIsNotParent); - - // get outlet node num - thisGLHE.outletNodeNum = GetOnlySingleNode(state, DataIPShortCuts::cAlphaArgs(3), - errorsFound, - DataIPShortCuts::cCurrentModuleObject, - DataIPShortCuts::cAlphaArgs(1), - NodeType_Water, - NodeConnectionType_Outlet, - 1, - ObjectIsNotParent); - thisGLHE.available = true; - thisGLHE.on = true; - - TestCompSet(state, DataIPShortCuts::cCurrentModuleObject, - DataIPShortCuts::cAlphaArgs(1), - DataIPShortCuts::cAlphaArgs(2), - DataIPShortCuts::cAlphaArgs(3), - "Condenser Water Nodes"); - - // load data - thisGLHE.designFlow = DataIPShortCuts::rNumericArgs(1); - RegisterPlantCompDesignFlow(thisGLHE.inletNodeNum, thisGLHE.designFlow); - - thisGLHE.soil.k = DataIPShortCuts::rNumericArgs(2); - thisGLHE.soil.rhoCp = DataIPShortCuts::rNumericArgs(3) * DataIPShortCuts::rNumericArgs(4); - thisGLHE.pipe.k = DataIPShortCuts::rNumericArgs(5); - thisGLHE.pipe.rho = DataIPShortCuts::rNumericArgs(6); - thisGLHE.pipe.cp = DataIPShortCuts::rNumericArgs(7); - thisGLHE.pipe.outDia = DataIPShortCuts::rNumericArgs(8); - thisGLHE.pipe.thickness = DataIPShortCuts::rNumericArgs(9); - - if (UtilityRoutines::SameString(DataIPShortCuts::cAlphaArgs(4), "VERTICAL")) { - thisGLHE.verticalConfig = true; - } else if (UtilityRoutines::SameString(DataIPShortCuts::cAlphaArgs(4), "HORIZONTAL")) { - thisGLHE.verticalConfig = false; - } - - thisGLHE.coilDiameter = DataIPShortCuts::rNumericArgs(10); - thisGLHE.coilPitch = DataIPShortCuts::rNumericArgs(11); - thisGLHE.trenchDepth = DataIPShortCuts::rNumericArgs(12); - thisGLHE.trenchLength = DataIPShortCuts::rNumericArgs(13); - thisGLHE.numTrenches = DataIPShortCuts::rNumericArgs(14); - thisGLHE.trenchSpacing = DataIPShortCuts::rNumericArgs(15); - thisGLHE.maxSimYears = DataIPShortCuts::rNumericArgs(16); - - // Need to add a response factor object for the slinky model - std::shared_ptr thisRF(new GLHEResponseFactorsStruct); - thisRF->name = "Response Factor Object Auto Generated No: " + fmt::to_string(numAutoGeneratedResponseFactors + 1); - thisGLHE.myRespFactors = thisRF; - responseFactorsVector.push_back(thisRF); - - // Number of coils - thisGLHE.numCoils = thisGLHE.trenchLength / thisGLHE.coilPitch; - - // Total tube length - thisGLHE.totalTubeLength = DataGlobalConstants::Pi * thisGLHE.coilDiameter * thisGLHE.trenchLength * thisGLHE.numTrenches / thisGLHE.coilPitch; - - // Get g function data - thisGLHE.SubAGG = 15; - thisGLHE.AGG = 192; - - // Average coil depth - if (thisGLHE.verticalConfig) { - // Vertical configuration - if (thisGLHE.trenchDepth - thisGLHE.coilDiameter < 0.0) { - // Error: part of the coil is above ground - ShowSevereError(state, DataIPShortCuts::cCurrentModuleObject + "=\"" + thisGLHE.name + "\", invalid value in field."); - ShowContinueError(state, format("...{}=[{:.3R}].", DataIPShortCuts::cNumericFieldNames(13), thisGLHE.trenchDepth)); - ShowContinueError(state, format("...{}=[{:.3R}].", DataIPShortCuts::cNumericFieldNames(10), thisGLHE.coilDepth)); - ShowContinueError(state, "...Average coil depth will be <=0."); - errorsFound = true; + std::string currObj = "GroundHeatExchanger:Slinky"; - } else { - // Entire coil is below ground - thisGLHE.coilDepth = thisGLHE.trenchDepth - (thisGLHE.coilDiameter / 2.0); - } - - } else { - // Horizontal configuration - thisGLHE.coilDepth = thisGLHE.trenchDepth; - } - - // Thermal diffusivity of the ground - thisGLHE.soil.diffusivity = thisGLHE.soil.k / thisGLHE.soil.rhoCp; - - prevTimeSteps.allocate((thisGLHE.SubAGG + 1) * maxTSinHr + 1); - prevTimeSteps = 0.0; - - if (thisGLHE.pipe.thickness >= thisGLHE.pipe.outDia / 2.0) { - ShowSevereError(state, DataIPShortCuts::cCurrentModuleObject + "=\"" + thisGLHE.name + "\", invalid value in field."); - ShowContinueError(state, format("...{}=[{:.3R}].", DataIPShortCuts::cNumericFieldNames(12), thisGLHE.pipe.thickness)); - ShowContinueError(state, format("...{}=[{:.3R}].", DataIPShortCuts::cNumericFieldNames(10), thisGLHE.pipe.outDia)); - ShowContinueError(state, "...Radius will be <=0."); - errorsFound = true; - } - - // Initialize ground temperature model and get pointer reference - thisGLHE.groundTempModel = GetGroundTempModelAndInit(state, DataIPShortCuts::cAlphaArgs(5), DataIPShortCuts::cAlphaArgs(6)); - if (thisGLHE.groundTempModel) { - errorsFound = thisGLHE.groundTempModel->errorsFound; - } - - // Check for Errors - if (errorsFound) { - ShowFatalError(state, "Errors found in processing input for " + DataIPShortCuts::cCurrentModuleObject); - } - - slinkyGLHE.push_back(thisGLHE); + auto const instances = inputProcessor->epJSON.find(currObj); + if (instances == inputProcessor->epJSON.end()) { + ShowSevereError(state, // LCOV_EXCL_LINE + currObj + ": Somehow getNumObjectsFound was > 0 but epJSON.find found 0"); // LCOV_EXCL_LINE } - // Set up report variables - for (int GLHENum = 0; GLHENum < numSlinkyGLHEs; ++GLHENum) { - auto &thisGLHE(slinkyGLHE[GLHENum]); - SetupOutputVariable(state, "Ground Heat Exchanger Average Borehole Temperature", - OutputProcessor::Unit::C, - thisGLHE.bhTemp, - "System", - "Average", - thisGLHE.name); - SetupOutputVariable(state, - "Ground Heat Exchanger Heat Transfer Rate", OutputProcessor::Unit::W, thisGLHE.QGLHE, "System", "Average", thisGLHE.name); - SetupOutputVariable(state, - "Ground Heat Exchanger Inlet Temperature", OutputProcessor::Unit::C, thisGLHE.inletTemp, "System", "Average", thisGLHE.name); - SetupOutputVariable(state, - "Ground Heat Exchanger Outlet Temperature", OutputProcessor::Unit::C, thisGLHE.outletTemp, "System", "Average", thisGLHE.name); - SetupOutputVariable(state, - "Ground Heat Exchanger Mass Flow Rate", OutputProcessor::Unit::kg_s, thisGLHE.massFlowRate, "System", "Average", thisGLHE.name); - SetupOutputVariable(state, "Ground Heat Exchanger Average Fluid Temperature", - OutputProcessor::Unit::C, - thisGLHE.aveFluidTemp, - "System", - "Average", - thisGLHE.name); + auto &instancesValue = instances.value(); + for (auto it = instancesValue.begin(); it != instancesValue.end(); ++it) { + auto const &instance = it.value(); + auto const &objName = it.key(); + auto const &objNameUC = UtilityRoutines::MakeUPPERCase(objName); + inputProcessor->markObjectAsUsed(currObj, objName); + state.dataGroundHeatExchanger->slinkyGLHE.emplace_back(state, objNameUC, instance); } } } //****************************************************************************** + void GLHEBase::setupOutput(EnergyPlusData &state) + { + SetupOutputVariable(state, + "Ground Heat Exchanger Average Borehole Temperature", + OutputProcessor::Unit::C, + this->bhTemp, + "System", + "Average", + this->name); + SetupOutputVariable(state, + "Ground Heat Exchanger Heat Transfer Rate", + OutputProcessor::Unit::W, + this->QGLHE, "System", + "Average", + this->name); + SetupOutputVariable(state, + "Ground Heat Exchanger Inlet Temperature", + OutputProcessor::Unit::C, + this->inletTemp, + "System", + "Average", + this->name); + SetupOutputVariable(state, + "Ground Heat Exchanger Outlet Temperature", + OutputProcessor::Unit::C, + this->outletTemp, + "System", + "Average", + this->name); + SetupOutputVariable(state, + "Ground Heat Exchanger Mass Flow Rate", + OutputProcessor::Unit::kg_s, + this->massFlowRate, + "System", + "Average", + this->name); + SetupOutputVariable(state, + "Ground Heat Exchanger Average Fluid Temperature", + OutputProcessor::Unit::C, + this->aveFluidTemp, + "System", + "Average", + this->name); + SetupOutputVariable(state, + "Ground Heat Exchanger Farfield Ground Temperature", + OutputProcessor::Unit::C, + this->tempGround, + "System", + "Average", + this->name); + } + + //****************************************************************************** + Real64 GLHEVert::calcBHAverageResistance(EnergyPlusData &state) { // Calculates the average thermal resistance of the borehole using the first-order multipole method. @@ -2833,16 +2682,16 @@ namespace GroundHeatExchangers { // Equation 13 - Real64 const beta = 2 * DataGlobalConstants::Pi * grout.k * calcPipeResistance(state); + Real64 const beta = 2 * DataGlobalConstants::Pi * this->grout.k * calcPipeResistance(state); - Real64 const final_term_1 = log(theta_2 / (2 * theta_1 * pow(1 - pow_4(theta_1), sigma))); - Real64 const num_final_term_2 = pow_2(theta_3) * pow_2(1 - (4 * sigma * pow_4(theta_1)) / (1 - pow_4(theta_1))); + Real64 const final_term_1 = log(this->theta_2 / (2 * this->theta_1 * pow(1 - pow_4(this->theta_1), this->sigma))); + Real64 const num_final_term_2 = pow_2(this->theta_3) * pow_2(1 - (4 * this->sigma * pow_4(this->theta_1)) / (1 - pow_4(this->theta_1))); Real64 const den_final_term_2_pt_1 = (1 + beta) / (1 - beta); - Real64 const den_final_term_2_pt_2 = pow_2(theta_3) * (1 + (16 * sigma * pow_4(theta_1)) / pow_2(1 - pow_4(theta_1))); + Real64 const den_final_term_2_pt_2 = pow_2(this->theta_3) * (1 + (16 * this->sigma * pow_4(this->theta_1)) / pow_2(1 - pow_4(this->theta_1))); Real64 const den_final_term_2 = den_final_term_2_pt_1 + den_final_term_2_pt_2; Real64 const final_term_2 = num_final_term_2 / den_final_term_2; - return (1 / (4 * DataGlobalConstants::Pi * grout.k)) * (beta + final_term_1 - final_term_2); + return (1 / (4 * DataGlobalConstants::Pi * this->grout.k)) * (beta + final_term_1 - final_term_2); } //****************************************************************************** @@ -2856,17 +2705,17 @@ namespace GroundHeatExchangers { // Equation 26 - Real64 beta = 2 * DataGlobalConstants::Pi * grout.k * calcPipeResistance(state); + Real64 beta = 2 * DataGlobalConstants::Pi * this->grout.k * calcPipeResistance(state); - Real64 final_term_1 = log(pow(1 + pow_2(theta_1), sigma) / (theta_3 * pow(1 - pow_2(theta_1), sigma))); - Real64 num_term_2 = pow_2(theta_3) * pow_2(1 - pow_4(theta_1) + 4 * sigma * pow_2(theta_1)); - Real64 den_term_2_pt_1 = (1 + beta) / (1 - beta) * pow_2(1 - pow_4(theta_1)); - Real64 den_term_2_pt_2 = pow_2(theta_3) * pow_2(1 - pow_4(theta_1)); - Real64 den_term_2_pt_3 = 8 * sigma * pow_2(theta_1) * pow_2(theta_3) * (1 + pow_4(theta_1)); + Real64 final_term_1 = log(pow(1 + pow_2(this->theta_1), this->sigma) / (this->theta_3 * pow(1 - pow_2(this->theta_1), this->sigma))); + Real64 num_term_2 = pow_2(this->theta_3) * pow_2(1 - pow_4(this->theta_1) + 4 * this->sigma * pow_2(this->theta_1)); + Real64 den_term_2_pt_1 = (1 + beta) / (1 - beta) * pow_2(1 - pow_4(this->theta_1)); + Real64 den_term_2_pt_2 = pow_2(this->theta_3) * pow_2(1 - pow_4(this->theta_1)); + Real64 den_term_2_pt_3 = 8 * this->sigma * pow_2(this->theta_1) * pow_2(this->theta_3) * (1 + pow_4(this->theta_1)); Real64 den_term_2 = den_term_2_pt_1 - den_term_2_pt_2 + den_term_2_pt_3; Real64 final_term_2 = num_term_2 / den_term_2; - return (1 / (DataGlobalConstants::Pi * grout.k)) * (beta + final_term_1 - final_term_2); + return (1 / (DataGlobalConstants::Pi * this->grout.k)) * (beta + final_term_1 - final_term_2); } //****************************************************************************** @@ -2894,16 +2743,20 @@ namespace GroundHeatExchangers { // Eq: 3-67 - using FluidProperties::GetSpecificHeatGlycol; + using FluidProperties::GetSpecificHeatGlycol; - // SUBROUTINE PARAMETER DEFINITIONS: - static std::string const RoutineName("calcBHResistance"); + constexpr const char * RoutineName("calcBHResistance"); - if (massFlowRate <= 0.0) { + if (this->massFlowRate <= 0.0) { return 0; } else { - Real64 const cpFluid = GetSpecificHeatGlycol(state, state.dataPlnt->PlantLoop(loopNum).FluidName, inletTemp, state.dataPlnt->PlantLoop(loopNum).FluidIndex, RoutineName); - return calcBHAverageResistance(state) + 1 / (3 * calcBHTotalInternalResistance(state)) * pow_2(bhLength / (massFlowRate * cpFluid)); + Real64 const cpFluid = GetSpecificHeatGlycol(state, + state.dataPlnt->PlantLoop(this->loopNum).FluidName, + this->inletTemp, + state.dataPlnt->PlantLoop(this->loopNum).FluidIndex, + RoutineName); + return calcBHAverageResistance(state) + + 1 / (3 * calcBHTotalInternalResistance(state)) * pow_2(this->bhLength / (this->massFlowRate * cpFluid)); } } @@ -2916,7 +2769,7 @@ namespace GroundHeatExchangers { // Javed, S. & Spitler, J.D. 2016. 'Accuracy of Borehole Thermal Resistance Calculation Methods // for Grouted Single U-tube Ground Heat Exchangers.' Applied Energy. 187:790-806. - return log(pipe.outDia / pipe.innerDia) / (2 * DataGlobalConstants::Pi * pipe.k); + return log(this->pipe.outDia / this->pipe.innerDia) / (2 * DataGlobalConstants::Pi * this->pipe.k); } //****************************************************************************** @@ -2928,27 +2781,38 @@ namespace GroundHeatExchangers { // Gneilinski, V. 1976. 'New equations for heat and mass transfer in turbulent pipe and channel flow.' // International Chemical Engineering 16(1976), pp. 359-368. - using FluidProperties::GetConductivityGlycol; + using FluidProperties::GetConductivityGlycol; using FluidProperties::GetSpecificHeatGlycol; using FluidProperties::GetViscosityGlycol; // SUBROUTINE PARAMETER DEFINITIONS: - static std::string const RoutineName("calcPipeConvectionResistance"); + constexpr const char * RoutineName("calcPipeConvectionResistance"); // Get fluid props - inletTemp = Node(inletNodeNum).Temp; - - Real64 const cpFluid = GetSpecificHeatGlycol(state, state.dataPlnt->PlantLoop(loopNum).FluidName, inletTemp, state.dataPlnt->PlantLoop(loopNum).FluidIndex, RoutineName); - Real64 const kFluid = GetConductivityGlycol(state, state.dataPlnt->PlantLoop(loopNum).FluidName, inletTemp, state.dataPlnt->PlantLoop(loopNum).FluidIndex, RoutineName); - Real64 const fluidViscosity = GetViscosityGlycol(state, state.dataPlnt->PlantLoop(loopNum).FluidName, inletTemp, state.dataPlnt->PlantLoop(loopNum).FluidIndex, RoutineName); + this->inletTemp = Node(this->inletNodeNum).Temp; + + Real64 const cpFluid = GetSpecificHeatGlycol(state, + state.dataPlnt->PlantLoop(this->loopNum).FluidName, + this->inletTemp, + state.dataPlnt->PlantLoop(this->loopNum).FluidIndex, + RoutineName); + Real64 const kFluid = GetConductivityGlycol(state, + state.dataPlnt->PlantLoop(this->loopNum).FluidName, + this->inletTemp, + state.dataPlnt->PlantLoop(this->loopNum).FluidIndex, + RoutineName); + Real64 const fluidViscosity = GetViscosityGlycol(state, + state.dataPlnt->PlantLoop(this->loopNum).FluidName, + this->inletTemp, + state.dataPlnt->PlantLoop(this->loopNum).FluidIndex, + RoutineName); // Smoothing fit limits - Real64 const lower_limit = 2000; - Real64 const upper_limit = 4000; - - Real64 const bhMassFlowRate = massFlowRate / myRespFactors->numBoreholes; + constexpr Real64 lower_limit = 2000; + constexpr Real64 upper_limit = 4000; - Real64 const reynoldsNum = 4 * bhMassFlowRate / (fluidViscosity * DataGlobalConstants::Pi * pipe.innerDia); + Real64 const bhMassFlowRate = this->massFlowRate / this->myRespFactors->numBoreholes; + Real64 const reynoldsNum = 4 * bhMassFlowRate / (fluidViscosity * DataGlobalConstants::Pi * this->pipe.innerDia); Real64 nusseltNum = 0.0; if (reynoldsNum < lower_limit) { @@ -2958,17 +2822,17 @@ namespace GroundHeatExchangers { Real64 const f = frictionFactor(reynoldsNum); // turbulent Real64 const prandtlNum = (cpFluid * fluidViscosity) / (kFluid); Real64 const nu_high = (f / 8) * (reynoldsNum - 1000) * prandtlNum / (1 + 12.7 * std::sqrt(f / 8) * (pow(prandtlNum, 2.0 / 3.0) - 1)); - Real64 const sigma = 1 / (1 + std::exp(-(reynoldsNum - 3000) / 150.0)); // smoothing function - nusseltNum = (1 - sigma) * nu_low + sigma * nu_high; + Real64 const sf = 1 / (1 + std::exp(-(reynoldsNum - 3000) / 150.0)); // smoothing function + nusseltNum = (1 - sf) * nu_low + sf * nu_high; } else { Real64 const f = frictionFactor(reynoldsNum); Real64 const prandtlNum = (cpFluid * fluidViscosity) / (kFluid); nusseltNum = (f / 8) * (reynoldsNum - 1000) * prandtlNum / (1 + 12.7 * std::sqrt(f / 8) * (pow(prandtlNum, 2.0 / 3.0) - 1)); } - Real64 h = nusseltNum * kFluid / pipe.innerDia; + Real64 h = nusseltNum * kFluid / this->pipe.innerDia; - return 1 / (h * DataGlobalConstants::Pi * pipe.innerDia); + return 1 / (h * DataGlobalConstants::Pi * this->pipe.innerDia); } //****************************************************************************** @@ -2981,8 +2845,8 @@ namespace GroundHeatExchangers { // In Advances in Heat Transfer, ed. T.F. Irvine and J.P. Hartnett, Vol. 6. New York Academic Press. // limits picked be within about 1% of actual values - Real64 const lower_limit = 1500; - Real64 const upper_limit = 5000; + constexpr Real64 lower_limit = 1500; + constexpr Real64 upper_limit = 5000; if (reynoldsNum < lower_limit) { return 64.0 / reynoldsNum; // pure laminar flow @@ -3025,72 +2889,73 @@ namespace GroundHeatExchangers { // PURPOSE OF THIS SUBROUTINE: // Calculates the resistance of the slinky HX from the fluid to the - // outer tube wall. + // outer tube wall. - // Using/Aliasing - using FluidProperties::GetConductivityGlycol; + using FluidProperties::GetConductivityGlycol; using FluidProperties::GetDensityGlycol; using FluidProperties::GetSpecificHeatGlycol; using FluidProperties::GetViscosityGlycol; // SUBROUTINE PARAMETER DEFINITIONS: - static std::string const RoutineName("CalcSlinkyGroundHeatExchanger"); + constexpr const char * RoutineName("CalcSlinkyGroundHeatExchanger"); // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - Real64 cpFluid; - Real64 kFluid; - Real64 fluidDensity; - Real64 fluidViscosity; - Real64 pipeInnerDia; - Real64 singleSlinkyMassFlowRate; - Real64 pipeOuterRad; - Real64 pipeInnerRad; Real64 nusseltNum; - Real64 reynoldsNum; - Real64 prandtlNum; - Real64 hci; - Real64 Rcond; Real64 Rconv; - Real64 smoothingFunction; - Real64 A(3150); - Real64 B(350); - Real64 laminarNusseltNo(4.364); - Real64 turbulentNusseltNo; - - cpFluid = GetSpecificHeatGlycol(state, state.dataPlnt->PlantLoop(loopNum).FluidName, inletTemp, state.dataPlnt->PlantLoop(loopNum).FluidIndex, RoutineName); - kFluid = GetConductivityGlycol(state, state.dataPlnt->PlantLoop(loopNum).FluidName, inletTemp, state.dataPlnt->PlantLoop(loopNum).FluidIndex, RoutineName); - fluidDensity = GetDensityGlycol(state, state.dataPlnt->PlantLoop(loopNum).FluidName, inletTemp, state.dataPlnt->PlantLoop(loopNum).FluidIndex, RoutineName); - fluidViscosity = GetViscosityGlycol(state, state.dataPlnt->PlantLoop(loopNum).FluidName, inletTemp, state.dataPlnt->PlantLoop(loopNum).FluidIndex, RoutineName); + constexpr Real64 A(3150); + constexpr Real64 B(350); + constexpr Real64 laminarNusseltNo(4.364); + + Real64 cpFluid = GetSpecificHeatGlycol(state, + state.dataPlnt->PlantLoop(this->loopNum).FluidName, + this->inletTemp, + state.dataPlnt->PlantLoop(this->loopNum).FluidIndex, + RoutineName); + Real64 kFluid = GetConductivityGlycol(state, + state.dataPlnt->PlantLoop(this->loopNum).FluidName, + this->inletTemp, + state.dataPlnt->PlantLoop(this->loopNum).FluidIndex, + RoutineName); + Real64 fluidDensity = GetDensityGlycol(state, + state.dataPlnt->PlantLoop(this->loopNum).FluidName, + this->inletTemp, + state.dataPlnt->PlantLoop(this->loopNum).FluidIndex, + RoutineName); + Real64 fluidViscosity = GetViscosityGlycol(state, + state.dataPlnt->PlantLoop(this->loopNum).FluidName, + this->inletTemp, + state.dataPlnt->PlantLoop(this->loopNum).FluidIndex, + RoutineName); // calculate mass flow rate - singleSlinkyMassFlowRate = massFlowRate / numTrenches; + Real64 singleSlinkyMassFlowRate = this->massFlowRate / this->numTrenches; - pipeOuterRad = pipe.outDia / 2.0; - pipeInnerRad = pipeOuterRad - pipe.thickness; - pipeInnerDia = 2.0 * pipeInnerRad; + Real64 pipeInnerRad = this->pipe.outRadius - this->pipe.thickness; + Real64 pipeInnerDia = 2.0 * pipeInnerRad; if (singleSlinkyMassFlowRate == 0.0) { Rconv = 0.0; } else { // Re=Rho*V*D/Mu - reynoldsNum = fluidDensity * pipeInnerDia * (singleSlinkyMassFlowRate / fluidDensity / (DataGlobalConstants::Pi * pow_2(pipeInnerRad))) / fluidViscosity; - prandtlNum = (cpFluid * fluidViscosity) / (kFluid); + Real64 reynoldsNum = fluidDensity * pipeInnerDia * + (singleSlinkyMassFlowRate / fluidDensity / (DataGlobalConstants::Pi * pow_2(pipeInnerRad))) / fluidViscosity; + Real64 prandtlNum = (cpFluid * fluidViscosity) / (kFluid); // Convection Resistance if (reynoldsNum <= 2300) { nusseltNum = laminarNusseltNo; } else if (reynoldsNum > 2300 && reynoldsNum <= 4000) { - smoothingFunction = 0.5 + 0.5 * std::tanh((reynoldsNum - A) / B); - turbulentNusseltNo = 0.023 * std::pow(reynoldsNum, 0.8) * std::pow(prandtlNum, 0.35); - nusseltNum = laminarNusseltNo * (1 - smoothingFunction) + turbulentNusseltNo * smoothingFunction; + Real64 sf = 0.5 + 0.5 * std::tanh((reynoldsNum - A) / B); + Real64 turbulentNusseltNo = 0.023 * std::pow(reynoldsNum, 0.8) * std::pow(prandtlNum, 0.35); + nusseltNum = laminarNusseltNo * (1 - sf) + turbulentNusseltNo * sf; } else { nusseltNum = 0.023 * std::pow(reynoldsNum, 0.8) * std::pow(prandtlNum, 0.35); } - hci = nusseltNum * kFluid / pipeInnerDia; + Real64 hci = nusseltNum * kFluid / pipeInnerDia; Rconv = 1.0 / (2.0 * DataGlobalConstants::Pi * pipeInnerDia * hci); } // Conduction Resistance - Rcond = std::log(pipeOuterRad / pipeInnerRad) / (2.0 * DataGlobalConstants::Pi * pipe.k) / 2.0; // pipe in parallel so /2 + Real64 Rcond = std::log(this->pipe.outRadius / pipeInnerRad) / (2.0 * DataGlobalConstants::Pi * this->pipe.k) / 2.0; // pipe in parallel so /2 return Rcond + Rconv; } @@ -3098,7 +2963,7 @@ namespace GroundHeatExchangers { //****************************************************************************** Real64 GLHEBase::interpGFunc(Real64 const LnTTsVal // The value of LN(t/TimeSS) that a g-function - ) + ) const { // SUBROUTINE INFORMATION: // AUTHOR Chris L. Marshall, Jeffrey D. Spitler @@ -3111,45 +2976,29 @@ namespace GroundHeatExchangers { // to find the correct g-function value for a // known value of the natural log of (T/Ts) - // METHODOLOGY EMPLOYED: - // REFERENCE: Thermal Analysis of Heat Extraction // Boreholes. Per Eskilson, Dept. of // Mathematical Physics, University of // Lund, Sweden, June 1987. - // USE STATEMENTS: na - // Locals // SUBROUTINE ARGUMENT DEFINITIONS: // needs to be found for. // either extrapolation or interpolation - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS - // na - - // DERIVED TYPE DEFINITIONS - // na // SUBROUTINE LOCAL VARIABLE DECLARATIONS: Real64 gFuncVal; // Binary Search Algorithms Variables // REFERENCE : DATA STRUCTURES AND ALGORITHM ANALYSIS IN C BY MARK ALLEN WEISS - int Mid; - int Low; - int High; - bool Found; // The following IF loop determines the g-function for the case // when LnTTsVal is less than the first element of the LnTTs array. // In this case, the g-function must be found by extrapolation. - if (LnTTsVal <= myRespFactors->LNTTS(1)) { - gFuncVal = ((LnTTsVal - myRespFactors->LNTTS(1)) / (myRespFactors->LNTTS(2) - myRespFactors->LNTTS(1))) * - (myRespFactors->GFNC(2) - myRespFactors->GFNC(1)) + - myRespFactors->GFNC(1); + if (LnTTsVal <= this->myRespFactors->LNTTS(1)) { + gFuncVal = ((LnTTsVal - this->myRespFactors->LNTTS(1)) / (this->myRespFactors->LNTTS(2) - this->myRespFactors->LNTTS(1))) * + (this->myRespFactors->GFNC(2) - this->myRespFactors->GFNC(1)) + + this->myRespFactors->GFNC(1); return gFuncVal; } @@ -3157,12 +3006,13 @@ namespace GroundHeatExchangers { // when LnTTsVal is greater than the last element of the LnTTs array. // In this case, the g-function must be found by extrapolation. - int NPairs = myRespFactors->LNTTS.u1(); + int NPairs = this->myRespFactors->LNTTS.u1(); - if (LnTTsVal > myRespFactors->LNTTS(NPairs)) { - gFuncVal = ((LnTTsVal - myRespFactors->LNTTS(NPairs)) / (myRespFactors->LNTTS(NPairs - 1) - myRespFactors->LNTTS(NPairs))) * - (myRespFactors->GFNC(NPairs - 1) - myRespFactors->GFNC(NPairs)) + - myRespFactors->GFNC(NPairs); + if (LnTTsVal > this->myRespFactors->LNTTS(NPairs)) { + gFuncVal = + ((LnTTsVal - this->myRespFactors->LNTTS(NPairs)) / (this->myRespFactors->LNTTS(NPairs - 1) - this->myRespFactors->LNTTS(NPairs))) * + (this->myRespFactors->GFNC(NPairs - 1) - this->myRespFactors->GFNC(NPairs)) + + this->myRespFactors->GFNC(NPairs); return gFuncVal; } @@ -3170,16 +3020,17 @@ namespace GroundHeatExchangers { // the first and last elements of the LnTTs array, or is identically // equal to one of the LnTTs elements. In this case the g-function // must be found by interpolation. - // USING BINARY SEARCH TO FIND THE ELEMENET - Found = false; - Low = 1; - High = NPairs; + // USING BINARY SEARCH TO FIND THE ELEMENT + bool Found = false; + int Low = 1; + int High = NPairs; + int Mid; while (Low <= High) { Mid = (Low + High) / 2; - if (myRespFactors->LNTTS(Mid) < LnTTsVal) { + if (this->myRespFactors->LNTTS(Mid) < LnTTsVal) { Low = Mid + 1; } else { - if (myRespFactors->LNTTS(Mid) > LnTTsVal) { + if (this->myRespFactors->LNTTS(Mid) > LnTTsVal) { High = Mid - 1; } else { Found = true; @@ -3190,18 +3041,18 @@ namespace GroundHeatExchangers { // LnTTsVal is identical to one of the LnTTS array elements return gFuncVal // the gFuncVal after applying the correction if (Found) { - gFuncVal = myRespFactors->GFNC(Mid); + gFuncVal = this->myRespFactors->GFNC(Mid); return gFuncVal; } // LnTTsVal is in between any of the two LnTTS array elements find the // g-function value by interpolation and apply the correction and return gFuncVal else { - if (myRespFactors->LNTTS(Mid) < LnTTsVal) ++Mid; + if (this->myRespFactors->LNTTS(Mid) < LnTTsVal) ++Mid; - gFuncVal = ((LnTTsVal - myRespFactors->LNTTS(Mid)) / (myRespFactors->LNTTS(Mid - 1) - myRespFactors->LNTTS(Mid))) * - (myRespFactors->GFNC(Mid - 1) - myRespFactors->GFNC(Mid)) + - myRespFactors->GFNC(Mid); + gFuncVal = ((LnTTsVal - this->myRespFactors->LNTTS(Mid)) / (this->myRespFactors->LNTTS(Mid - 1) - this->myRespFactors->LNTTS(Mid))) * + (this->myRespFactors->GFNC(Mid - 1) - this->myRespFactors->GFNC(Mid)) + + this->myRespFactors->GFNC(Mid); return gFuncVal; } @@ -3221,10 +3072,7 @@ namespace GroundHeatExchangers { // Gets the g-function for slinky GHXs // Note: Base 10 here. - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - Real64 LNTTS; - - LNTTS = std::log10(time); + Real64 LNTTS = std::log10(time); return interpGFunc(LNTTS); } @@ -3243,19 +3091,12 @@ namespace GroundHeatExchangers { // Gets the g-function for vertical GHXs // Note: Base e here. - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - Real64 RATIO; - Real64 gFuncVal; - Real64 LNTTS; - - LNTTS = std::log(time); - - gFuncVal = interpGFunc(LNTTS); + Real64 LNTTS = std::log(time); + Real64 gFuncVal = interpGFunc(LNTTS); + Real64 RATIO = this->bhRadius / this->bhLength; - RATIO = bhRadius / bhLength; - - if (RATIO != myRespFactors->gRefRatio) { - gFuncVal -= std::log(bhRadius / (bhLength * myRespFactors->gRefRatio)); + if (RATIO != this->myRespFactors->gRefRatio) { + gFuncVal -= std::log(this->bhRadius / (this->bhLength * this->myRespFactors->gRefRatio)); } return gFuncVal; @@ -3271,100 +3112,99 @@ namespace GroundHeatExchangers { // MODIFIED Arun Murugappan // RE-ENGINEERED na - // PURPOSE OF THIS SUBROUTINE: - // This subroutine needs a description. - - // METHODOLOGY EMPLOYED: - // Needs description, as appropriate. - - // REFERENCES: - // na - // Using/Aliasing - using DataPlant::TypeOf_GrndHtExchgSystem; - using FluidProperties::GetDensityGlycol; - using PlantUtilities::InitComponentNodes; + using DataPlant::TypeOf_GrndHtExchgSystem; using PlantUtilities::RegulateCondenserCompFlowReqOp; using PlantUtilities::ScanPlantLoopsForObject; using PlantUtilities::SetComponentFlowRate; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - static std::string const RoutineName("initGLHESimVars"); - - // INTERFACE BLOCK SPECIFICATIONS - // na - - // DERIVED TYPE DEFINITIONS - // na - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - Real64 fluidDensity; - bool errFlag; - - Real64 currTime = ((state.dataGlobal->DayOfSim - 1) * 24 + (state.dataGlobal->HourOfDay - 1) + (state.dataGlobal->TimeStep - 1) * state.dataGlobal->TimeStepZone + SysTimeElapsed) * DataGlobalConstants::SecInHour; + Real64 currTime = ((state.dataGlobal->DayOfSim - 1) * 24 + (state.dataGlobal->HourOfDay - 1) + + (state.dataGlobal->TimeStep - 1) * state.dataGlobal->TimeStepZone + SysTimeElapsed) * + DataGlobalConstants::SecInHour; // Init more variables - if (myFlag) { + if (this->myFlag) { // Locate the hx on the plant loops for later usage - errFlag = false; - ScanPlantLoopsForObject(state, name, TypeOf_GrndHtExchgSystem, loopNum, loopSideNum, branchNum, compNum, errFlag, _, _, _, _, _); + bool errFlag = false; + ScanPlantLoopsForObject(state, + this->name, + TypeOf_GrndHtExchgSystem, + this->loopNum, + this->loopSideNum, + this->branchNum, + this->compNum, + errFlag, + _, + _, + _, + _, + _); if (errFlag) { ShowFatalError(state, "initGLHESimVars: Program terminated due to previous condition(s)."); } - myFlag = false; + this->myFlag = false; } - if (myEnvrnFlag && state.dataGlobal->BeginEnvrnFlag) { - - myEnvrnFlag = false; - - fluidDensity = GetDensityGlycol(state, state.dataPlnt->PlantLoop(loopNum).FluidName, 20.0, state.dataPlnt->PlantLoop(loopNum).FluidIndex, RoutineName); - designMassFlow = designFlow * fluidDensity; - InitComponentNodes(0.0, designMassFlow, inletNodeNum, outletNodeNum, loopNum, loopSideNum, branchNum, compNum); - - lastQnSubHr = 0.0; - Node(inletNodeNum).Temp = tempGround; - Node(outletNodeNum).Temp = tempGround; - - // zero out all history arrays - - QnHr = 0.0; - QnMonthlyAgg = 0.0; - QnSubHr = 0.0; - LastHourN = 0; - prevTimeSteps = 0.0; - currentSimTime = 0.0; - QGLHE = 0.0; - prevHour = 1; + if (this->myEnvrnFlag && state.dataGlobal->BeginEnvrnFlag) { + this->initEnvironment(state, currTime); } // Calculate the average ground temperature over the depth of the borehole - - Real64 minDepth = myRespFactors->props->bhTopDepth; - Real64 maxDepth = myRespFactors->props->bhLength + minDepth; + Real64 minDepth = this->myRespFactors->props->bhTopDepth; + Real64 maxDepth = this->myRespFactors->props->bhLength + minDepth; Real64 oneQuarterDepth = minDepth + (maxDepth - minDepth) * 0.25; Real64 halfDepth = minDepth + (maxDepth - minDepth) * 0.5; Real64 threeQuarterDepth = minDepth + (maxDepth - minDepth) * 0.75; - tempGround = 0; + this->tempGround = 0; - tempGround += this->groundTempModel->getGroundTempAtTimeInSeconds(state, minDepth, currTime); - tempGround += this->groundTempModel->getGroundTempAtTimeInSeconds(state, maxDepth, currTime); - tempGround += this->groundTempModel->getGroundTempAtTimeInSeconds(state, oneQuarterDepth, currTime); - tempGround += this->groundTempModel->getGroundTempAtTimeInSeconds(state, halfDepth, currTime); - tempGround += this->groundTempModel->getGroundTempAtTimeInSeconds(state, threeQuarterDepth, currTime); + this->tempGround += this->groundTempModel->getGroundTempAtTimeInSeconds(state, minDepth, currTime); + this->tempGround += this->groundTempModel->getGroundTempAtTimeInSeconds(state, maxDepth, currTime); + this->tempGround += this->groundTempModel->getGroundTempAtTimeInSeconds(state, oneQuarterDepth, currTime); + this->tempGround += this->groundTempModel->getGroundTempAtTimeInSeconds(state, halfDepth, currTime); + this->tempGround += this->groundTempModel->getGroundTempAtTimeInSeconds(state, threeQuarterDepth, currTime); - tempGround /= 5; + this->tempGround /= 5; - massFlowRate = RegulateCondenserCompFlowReqOp(state, loopNum, loopSideNum, branchNum, compNum, designMassFlow); + this->massFlowRate = + RegulateCondenserCompFlowReqOp(state, this->loopNum, this->loopSideNum, this->branchNum, this->compNum, this->designMassFlow); - SetComponentFlowRate(state, massFlowRate, inletNodeNum, outletNodeNum, loopNum, loopSideNum, branchNum, compNum); + SetComponentFlowRate( + state, this->massFlowRate, this->inletNodeNum, this->outletNodeNum, this->loopNum, this->loopSideNum, this->branchNum, this->compNum); // Reset local environment init flag - if (!state.dataGlobal->BeginEnvrnFlag) myEnvrnFlag = true; + if (!state.dataGlobal->BeginEnvrnFlag) this->myEnvrnFlag = true; + } + + //****************************************************************************** + + void GLHEVert::initEnvironment(EnergyPlusData &state, [[maybe_unused]] Real64 const &CurTime) + { + + constexpr const char *RoutineName("initEnvironment"); + + this->myEnvrnFlag = false; + + Real64 fluidDensity = FluidProperties::GetDensityGlycol( + state, state.dataPlnt->PlantLoop(this->loopNum).FluidName, 20.0, state.dataPlnt->PlantLoop(this->loopNum).FluidIndex, RoutineName); + this->designMassFlow = this->designFlow * fluidDensity; + PlantUtilities::InitComponentNodes( + 0.0, this->designMassFlow, this->inletNodeNum, this->outletNodeNum, this->loopNum, this->loopSideNum, this->branchNum, this->compNum); + + this->lastQnSubHr = 0.0; + Node(this->inletNodeNum).Temp = this->tempGround; + Node(this->outletNodeNum).Temp = this->tempGround; + + // zero out all history arrays + this->QnHr = 0.0; + this->QnMonthlyAgg = 0.0; + this->QnSubHr = 0.0; + this->LastHourN = 0; + state.dataGroundHeatExchanger->prevTimeSteps = 0.0; + state.dataGroundHeatExchanger->currentSimTime = 0.0; + this->QGLHE = 0.0; + this->prevHour = 1; } //****************************************************************************** @@ -3377,90 +3217,86 @@ namespace GroundHeatExchangers { // MODIFIED Arun Murugappan // RE-ENGINEERED na - // PURPOSE OF THIS SUBROUTINE: - // This subroutine needs a description. - - // METHODOLOGY EMPLOYED: - // Needs description, as appropriate. - - // REFERENCES: - // na - // Using/Aliasing - using DataPlant::TypeOf_GrndHtExchgSlinky; - using FluidProperties::GetDensityGlycol; - using PlantUtilities::InitComponentNodes; + using DataPlant::TypeOf_GrndHtExchgSlinky; using PlantUtilities::RegulateCondenserCompFlowReqOp; using PlantUtilities::ScanPlantLoopsForObject; using PlantUtilities::SetComponentFlowRate; using namespace GroundTemperatureManager; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - static std::string const RoutineName("initGLHESimVars"); - - // INTERFACE BLOCK SPECIFICATIONS - // na - - // DERIVED TYPE DEFINITIONS - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - Real64 fluidDensity; - bool errFlag; - Real64 CurTime; - - CurTime = ((state.dataGlobal->DayOfSim - 1) * 24 + (state.dataGlobal->HourOfDay - 1) + (state.dataGlobal->TimeStep - 1) * state.dataGlobal->TimeStepZone + SysTimeElapsed) * DataGlobalConstants::SecInHour; + Real64 CurTime = ((state.dataGlobal->DayOfSim - 1) * 24 + (state.dataGlobal->HourOfDay - 1) + + (state.dataGlobal->TimeStep - 1) * state.dataGlobal->TimeStepZone + SysTimeElapsed) * + DataGlobalConstants::SecInHour; // Init more variables - if (myFlag) { + if (this->myFlag) { // Locate the hx on the plant loops for later usage - errFlag = false; - ScanPlantLoopsForObject(state, name, TypeOf_GrndHtExchgSlinky, loopNum, loopSideNum, branchNum, compNum, errFlag, _, _, _, _, _); + bool errFlag = false; + ScanPlantLoopsForObject(state, + this->name, + TypeOf_GrndHtExchgSlinky, + this->loopNum, + this->loopSideNum, + this->branchNum, + this->compNum, + errFlag, + _, + _, + _, + _, + _); if (errFlag) { ShowFatalError(state, "initGLHESimVars: Program terminated due to previous condition(s)."); } - myFlag = false; + this->myFlag = false; } - if (myEnvrnFlag && state.dataGlobal->BeginEnvrnFlag) { - - myEnvrnFlag = false; - - fluidDensity = GetDensityGlycol(state, state.dataPlnt->PlantLoop(loopNum).FluidName, 20.0, state.dataPlnt->PlantLoop(loopNum).FluidIndex, RoutineName); - designMassFlow = designFlow * fluidDensity; - InitComponentNodes(0.0, designMassFlow, inletNodeNum, outletNodeNum, loopNum, loopSideNum, branchNum, compNum); - - lastQnSubHr = 0.0; - Node(inletNodeNum).Temp = this->groundTempModel->getGroundTempAtTimeInSeconds(state, coilDepth, CurTime); - Node(outletNodeNum).Temp = this->groundTempModel->getGroundTempAtTimeInSeconds(state, coilDepth, CurTime); - - // zero out all history arrays - - QnHr = 0.0; - QnMonthlyAgg = 0.0; - QnSubHr = 0.0; - LastHourN = 0; - prevTimeSteps = 0.0; - currentSimTime = 0.0; - QGLHE = 0.0; - prevHour = 1; + if (this->myEnvrnFlag && state.dataGlobal->BeginEnvrnFlag) { + this->initEnvironment(state, CurTime); } - tempGround = this->groundTempModel->getGroundTempAtTimeInSeconds(state, coilDepth, CurTime); + this->tempGround = this->groundTempModel->getGroundTempAtTimeInSeconds(state, this->coilDepth, CurTime); - massFlowRate = RegulateCondenserCompFlowReqOp(state, loopNum, loopSideNum, branchNum, compNum, designMassFlow); + this->massFlowRate = + RegulateCondenserCompFlowReqOp(state, this->loopNum, this->loopSideNum, this->branchNum, this->compNum, this->designMassFlow); - SetComponentFlowRate(state, massFlowRate, inletNodeNum, outletNodeNum, loopNum, loopSideNum, branchNum, compNum); + SetComponentFlowRate( + state, this->massFlowRate, this->inletNodeNum, this->outletNodeNum, this->loopNum, this->loopSideNum, this->branchNum, this->compNum); // Reset local environment init flag - if (!state.dataGlobal->BeginEnvrnFlag) myEnvrnFlag = true; + if (!state.dataGlobal->BeginEnvrnFlag) this->myEnvrnFlag = true; } //****************************************************************************** -} // namespace GroundHeatExchangers + void GLHESlinky::initEnvironment(EnergyPlusData &state, Real64 const & CurTime) + { + + constexpr const char *RoutineName("initEnvironment"); + + this->myEnvrnFlag = false; + + Real64 fluidDensity = FluidProperties::GetDensityGlycol( + state, state.dataPlnt->PlantLoop(this->loopNum).FluidName, 20.0, state.dataPlnt->PlantLoop(this->loopNum).FluidIndex, RoutineName); + this->designMassFlow = this->designFlow * fluidDensity; + PlantUtilities::InitComponentNodes( + 0.0, this->designMassFlow, this->inletNodeNum, this->outletNodeNum, this->loopNum, this->loopSideNum, this->branchNum, this->compNum); + + this->lastQnSubHr = 0.0; + Node(this->inletNodeNum).Temp = this->groundTempModel->getGroundTempAtTimeInSeconds(state, this->coilDepth, CurTime); + Node(this->outletNodeNum).Temp = this->groundTempModel->getGroundTempAtTimeInSeconds(state, this->coilDepth, CurTime); + + // zero out all history arrays + this->QnHr = 0.0; + this->QnMonthlyAgg = 0.0; + this->QnSubHr = 0.0; + this->LastHourN = 0; + state.dataGroundHeatExchanger->prevTimeSteps = 0.0; + state.dataGroundHeatExchanger->currentSimTime = 0.0; + this->QGLHE = 0.0; + this->prevHour = 1; + } + + //****************************************************************************** } // namespace EnergyPlus diff --git a/src/EnergyPlus/GroundHeatExchangers.hh b/src/EnergyPlus/GroundHeatExchangers.hh index f792f359a6f..74c64472245 100644 --- a/src/EnergyPlus/GroundHeatExchangers.hh +++ b/src/EnergyPlus/GroundHeatExchangers.hh @@ -71,23 +71,10 @@ namespace GroundHeatExchangers { // Using/Aliasing using namespace GroundTemperatureManager; - // Data - // DERIVED TYPE DEFINITIONS - - // MODULE PARAMETER DEFINITIONS - extern Real64 const hrsPerDay; // Number of hours in a day - extern Real64 const hrsPerMonth; // Number of hours in month - extern int const maxTSinHr; // Max number of time step in a hour - - // MODULE VARIABLE DECLARATIONS: - // na - - // Types - - struct thermoPhysicialPropsStruct { + struct ThermophysicalProps // LCOV_EXCL_LINE + { // Destructor - virtual ~thermoPhysicialPropsStruct() { - } + virtual ~ThermophysicalProps() = default; Real64 k; // Thermal conductivity [W/m-K] Real64 rho; // Density [kg/m3] @@ -95,14 +82,15 @@ namespace GroundHeatExchangers { Real64 rhoCp; // Specific heat capacity [J/kg-K] Real64 diffusivity; // Thermal diffusivity [m2/s] - thermoPhysicialPropsStruct() : k(0.0), rho(0.0), cp(0.0), rhoCp(0.0), diffusivity(0.0) { + ThermophysicalProps() : k(0.0), rho(0.0), cp(0.0), rhoCp(0.0), diffusivity(0.0) + { } }; - struct pipePropsStruct : thermoPhysicialPropsStruct { + struct PipeProps : ThermophysicalProps // LCOV_EXCL_LINE + { // Destructor - ~pipePropsStruct() { - } + ~PipeProps() override = default; // Members Real64 outDia; // Outer diameter of the pipe [m] @@ -111,105 +99,123 @@ namespace GroundHeatExchangers { Real64 innerRadius; // Inner radius of the pipe [m] Real64 thickness; // Thickness of the pipe wall [m] - pipePropsStruct() : outDia(0.0), innerDia(0.0), outRadius(0.0), innerRadius(0.0), thickness(0.0) { + PipeProps() : outDia(0.0), innerDia(0.0), outRadius(0.0), innerRadius(0.0), thickness(0.0) + { } }; - struct GLHEVertPropsStruct { + struct GLHEVertProps + { // Destructor - ~GLHEVertPropsStruct() { - } + ~GLHEVertProps() = default; // Members - std::string name; // Name - Real64 bhTopDepth; // Depth of top of borehole {m} - Real64 bhLength; // Length of borehole from top of borehole {m} - Real64 bhDiameter; // Diameter of borehole {m} - thermoPhysicialPropsStruct grout; // Grout properties - pipePropsStruct pipe; // Pipe properties - Real64 bhUTubeDist; // U-tube, shank-to-shank spacking {m} - - GLHEVertPropsStruct() : bhTopDepth(0.0), bhLength(0.0), bhDiameter(0.0), bhUTubeDist(0.0) { + std::string const moduleName = "GroundHeatExchanger:Vertical:Properties"; + std::string name; // Name + Real64 bhTopDepth; // Depth of top of borehole {m} + Real64 bhLength; // Length of borehole from top of borehole {m} + Real64 bhDiameter; // Diameter of borehole {m} + ThermophysicalProps grout; // Grout properties + PipeProps pipe; // Pipe properties + Real64 bhUTubeDist; // U-tube, shank-to-shank spacing {m} + + GLHEVertProps() : bhTopDepth(0.0), bhLength(0.0), bhDiameter(0.0), bhUTubeDist(0.0) + { } + + GLHEVertProps(EnergyPlusData &state, std::string const &objName, nlohmann::json const &j); }; - struct MyCartesian { + struct MyCartesian + { // Destructor - ~MyCartesian() { - } + ~MyCartesian() = default; Real64 x; Real64 y; Real64 z; - MyCartesian() : x(0.0), y(0.0), z(0.0) { + MyCartesian() : x(0.0), y(0.0), z(0.0) + { } }; - struct GLHEVertSingleStruct { + struct GLHEVertSingle + { // Destructor - ~GLHEVertSingleStruct() { - } + ~GLHEVertSingle() = default; // Members - std::string name; // Name - Real64 xLoc; // X-direction location {m} - Real64 yLoc; // Y-direction location {m} - Real64 dl_i; // Discretized bh length between points - Real64 dl_ii; // Discretized bh length between points - Real64 dl_j; // Discretized bh length between points - std::shared_ptr props; // Properties + std::string const moduleName = "GroundHeatExchanger:Vertical:Single"; + std::string name; // Name + Real64 xLoc; // X-direction location {m} + Real64 yLoc; // Y-direction location {m} + Real64 dl_i; // Discretized bh length between points + Real64 dl_ii; // Discretized bh length between points + Real64 dl_j; // Discretized bh length between points + std::shared_ptr props; // Properties std::vector - pointLocations_i; // Discretized point locations for when computing temperature response of other boreholes on this bh + pointLocations_i; // Discretized point locations for when computing temperature response of other boreholes on this bh std::vector pointLocations_ii; // Discretized point locations for when computing temperature response of this bh on itself std::vector - pointLocations_j; // Discretized point locations for when other bh are computing the temperature response of this bh on themselves + pointLocations_j; // Discretized point locations for when other bh are computing the temperature response of this bh on themselves - GLHEVertSingleStruct() : xLoc(0.0), yLoc(0.0), dl_i(0.0), dl_ii(0.0), dl_j(0.0) { + GLHEVertSingle() : xLoc(0.0), yLoc(0.0), dl_i(0.0), dl_ii(0.0), dl_j(0.0) + { } + + GLHEVertSingle(EnergyPlusData &state, std::string const &objName, nlohmann::json const &j); }; - struct GLHEVertArrayStruct { + struct GLHEVertArray + { // Destructor - ~GLHEVertArrayStruct() { - } + ~GLHEVertArray() = default; // Members - std::string name; // Name - int numBHinXDirection; // Number of boreholes in X direction - int numBHinYDirection; // Number of boreholes in Y direction - Real64 bhSpacing; // Borehole center-to-center spacing {m} - std::shared_ptr props; // Properties - - GLHEVertArrayStruct() : numBHinXDirection(0), numBHinYDirection(0), bhSpacing(0.0) { + std::string const moduleName = "GroundHeatExchanger:Vertical:Array"; + std::string name; // Name + int numBHinXDirection; // Number of boreholes in X direction + int numBHinYDirection; // Number of boreholes in Y direction + Real64 bhSpacing; // Borehole center-to-center spacing {m} + std::shared_ptr props; // Properties + + GLHEVertArray() : numBHinXDirection(0), numBHinYDirection(0), bhSpacing(0.0) + { } + + GLHEVertArray(EnergyPlusData &state, std::string const &objName, nlohmann::json const &j); }; - struct GLHEResponseFactorsStruct { + struct GLHEResponseFactors + { // Destructor - ~GLHEResponseFactorsStruct() { - } + ~GLHEResponseFactors() = default; // Members - std::string name; // Name - int numBoreholes; // Number of boreholes - int numGFuncPairs; // Number of g-function pairs - Real64 gRefRatio; // Reference ratio of g-function set - Real64 maxSimYears; // Maximum length of simulation in years - Array1D time; // response time in seconds - Array1D LNTTS; // natural log of Non Dimensional Time Ln(t/ts) - Array1D GFNC; // G-function ( Non Dimensional temperature response factors) - std::shared_ptr props; // Properties - std::vector> myBorholes; // Boreholes used by this response factors object - - GLHEResponseFactorsStruct() : numBoreholes(0), numGFuncPairs(0), gRefRatio(0.0), maxSimYears(0.0) { + std::string const moduleName = "GroundHeatExchanger:ResponseFactors"; + std::string name; // Name + int numBoreholes; // Number of boreholes + int numGFuncPairs; // Number of g-function pairs + Real64 gRefRatio; // Reference ratio of g-function set + Real64 maxSimYears; // Maximum length of simulation in years + Array1D time; // response time in seconds + Array1D LNTTS; // natural log of Non Dimensional Time Ln(t/ts) + Array1D GFNC; // G-function ( Non Dimensional temperature response factors) + std::shared_ptr props; // Properties + std::vector> myBorholes; // Boreholes used by this response factors object + + GLHEResponseFactors() : numBoreholes(0), numGFuncPairs(0), gRefRatio(0.0), maxSimYears(0.0) + { } + + GLHEResponseFactors(EnergyPlusData &state, std::string const &objName, nlohmann::json const &j); }; - struct GLHEBase : PlantComponent { + struct GLHEBase : PlantComponent // LCOV_EXCL_LINE + { // Destructor - virtual ~GLHEBase() { - } + virtual ~GLHEBase() = default; // Members bool available; // need an array of logicals--load identifiers of available equipment @@ -221,16 +227,16 @@ namespace GroundHeatExchangers { int compNum; int inletNodeNum; // Node number on the inlet side of the plant int outletNodeNum; // Node number on the outlet side of the plant - thermoPhysicialPropsStruct soil; - pipePropsStruct pipe; - thermoPhysicialPropsStruct grout; - std::shared_ptr myRespFactors; - Real64 designFlow; // Design volumetric flow rate [m3/s] - Real64 designMassFlow; // Design mass flow rate [kg/s] - Real64 tempGround; // The far field temperature of the ground [degC] + ThermophysicalProps soil; + PipeProps pipe; + ThermophysicalProps grout; + std::shared_ptr myRespFactors; + Real64 designFlow; // Design volumetric flow rate [m3/s] + Real64 designMassFlow; // Design mass flow rate [kg/s] + Real64 tempGround; // The far field temperature of the ground [degC] Array1D QnMonthlyAgg; // Monthly aggregated normalized heat extraction/rejection rate [W/m] Array1D QnHr; // Hourly aggregated normalized heat extraction/rejection rate [W/m] - Array1D QnSubHr; // Contains the sub-hourly heat extraction/rejection rate normalized by the total active length of bore holes [W/m] + Array1D QnSubHr; // Contains the sub-hourly heat extraction/rejection rate normalized by the total active length of bore holes [W/m] int prevHour; int AGG; // Minimum Hourly History required int SubAGG; // Minimum sub-hourly History @@ -255,32 +261,31 @@ namespace GroundHeatExchangers { bool firstTime; int numErrorCalls; Real64 ToutNew; - int PrevN; // The saved value of N at previous time step + int PrevN; // The saved value of N at previous time step bool updateCurSimTime; // Used to reset the CurSimTime to reset after WarmupFlag bool triggerDesignDayReset; + bool needToSetupOutputVars; GLHEBase() - : available(false), on(false), loopNum(0), loopSideNum(0), branchNum(0), compNum(0), - inletNodeNum(0), outletNodeNum(0), designFlow(0.0), - designMassFlow(0.0), tempGround(0.0), prevHour(1), AGG(0), SubAGG(0), bhTemp(0.0), - massFlowRate(0.0), outletTemp(0.0), inletTemp(0.0), - aveFluidTemp(0.0), QGLHE(0.0), myFlag(true), myEnvrnFlag(true), gFunctionsExist(false), - lastQnSubHr(0.0), HXResistance(0.0), - timeSS(0.0), timeSSFactor(0.0), firstTime(true), numErrorCalls(0), ToutNew(19.375), PrevN(1), - updateCurSimTime(true), triggerDesignDayReset(false) { + : available(false), on(false), loopNum(0), loopSideNum(0), branchNum(0), compNum(0), inletNodeNum(0), outletNodeNum(0), designFlow(0.0), + designMassFlow(0.0), tempGround(0.0), prevHour(1), AGG(0), SubAGG(0), bhTemp(0.0), massFlowRate(0.0), outletTemp(0.0), inletTemp(0.0), + aveFluidTemp(0.0), QGLHE(0.0), myFlag(true), myEnvrnFlag(true), gFunctionsExist(false), lastQnSubHr(0.0), HXResistance(0.0), + totalTubeLength(0.0), timeSS(0.0), timeSSFactor(0.0), firstTime(true), numErrorCalls(0), ToutNew(19.375), PrevN(1), + updateCurSimTime(true), triggerDesignDayReset(false), needToSetupOutputVars(true) + { } virtual void calcGFunctions(EnergyPlusData &state) = 0; - void calcAggregateLoad(); + void calcAggregateLoad(EnergyPlusData &state); void updateGHX(EnergyPlusData &state); void calcGroundHeatExchanger(EnergyPlusData &state); - inline bool isEven(int val); + static inline bool isEven(int val); - Real64 interpGFunc(Real64); + [[nodiscard]] Real64 interpGFunc(Real64) const; void makeThisGLHECacheAndCompareWithFileCache(EnergyPlusData &state); @@ -290,10 +295,13 @@ namespace GroundHeatExchangers { void onInitLoopEquip([[maybe_unused]] EnergyPlusData &state, const PlantLocation &calledFromLocation) override; - void simulate([[maybe_unused]] EnergyPlusData &state, const PlantLocation &calledFromLocation, bool const FirstHVACIteration, Real64 &CurLoad, - bool const RunFlag) override; + void simulate([[maybe_unused]] EnergyPlusData &state, + const PlantLocation &calledFromLocation, + bool FirstHVACIteration, + Real64 &CurLoad, + bool RunFlag) override; - static PlantComponent *factory(EnergyPlusData &state, int const objectType, std::string objectName); + static PlantComponent *factory(EnergyPlusData &state, int objectType, std::string const &objectName); virtual Real64 getGFunc(Real64) = 0; @@ -302,14 +310,20 @@ namespace GroundHeatExchangers { virtual Real64 calcHXResistance(EnergyPlusData &state) = 0; virtual void getAnnualTimeConstant() = 0; + + virtual void initEnvironment(EnergyPlusData &state, Real64 const &CurTime) = 0; + + void setupOutput(EnergyPlusData &state); }; - struct GLHEVert : GLHEBase { + struct GLHEVert : GLHEBase // LCOV_EXCL_LINE + { + // Destructor - ~GLHEVert() { - } + ~GLHEVert() override = default; // Members + std::string const moduleName = "GroundHeatExchanger:System"; Real64 bhDiameter; // Diameter of borehole {m} Real64 bhRadius; // Radius of borehole {m} Real64 bhLength; // Length of borehole {m} @@ -326,40 +340,40 @@ namespace GroundHeatExchangers { std::vector GFNC_shortTimestep; std::vector LNTTS_shortTimestep; - GLHEVert() : bhDiameter(0.0), bhRadius(0.0), bhLength(0.0), bhUTubeDist(0.0), theta_1(0.0), theta_2(0.0), - theta_3(0.0), sigma(0.0) { + GLHEVert() : bhDiameter(0.0), bhRadius(0.0), bhLength(0.0), bhUTubeDist(0.0), theta_1(0.0), theta_2(0.0), theta_3(0.0), sigma(0.0) + { } - std::vector distances(MyCartesian const &point_i, MyCartesian const &point_j); + GLHEVert(EnergyPlusData &state, std::string const &objName, nlohmann::json const &j); + + static std::vector distances(MyCartesian const &point_i, MyCartesian const &point_j); Real64 calcResponse(std::vector const &dists, Real64 const &currTime); - Real64 integral(MyCartesian const &point_i, std::shared_ptr const &bh_j, - Real64 const &currTime); + Real64 integral(MyCartesian const &point_i, std::shared_ptr const &bh_j, Real64 const &currTime); Real64 - doubleIntegral(std::shared_ptr const &bh_i, - std::shared_ptr const &bh_j, Real64 const &currTime); + doubleIntegral(std::shared_ptr const &bh_i, std::shared_ptr const &bh_j, Real64 const &currTime); void calcShortTimestepGFunctions(EnergyPlusData &state); void calcLongTimestepGFunctions(EnergyPlusData &state); - void calcGFunctions(EnergyPlusData &state); + void calcGFunctions(EnergyPlusData &state) override; - Real64 calcHXResistance(EnergyPlusData &state); + Real64 calcHXResistance(EnergyPlusData &state) override; - void initGLHESimVars(EnergyPlusData &state); + void initGLHESimVars(EnergyPlusData &state) override; - void getAnnualTimeConstant(); + void getAnnualTimeConstant() override; - Real64 getGFunc(Real64 time); + Real64 getGFunc(Real64 time) override; - void makeThisGLHECacheStruct(); + void makeThisGLHECacheStruct() override; - void readCacheFileAndCompareWithThisGLHECache(EnergyPlusData &state); + void readCacheFileAndCompareWithThisGLHECache(EnergyPlusData &state) override; - void writeGLHECacheToFile(EnergyPlusData &state); + void writeGLHECacheToFile(EnergyPlusData &state) const; Real64 calcBHAverageResistance(EnergyPlusData &state); @@ -371,20 +385,23 @@ namespace GroundHeatExchangers { Real64 calcPipeConvectionResistance(EnergyPlusData &state); - Real64 frictionFactor(Real64 reynoldsNum); + static Real64 frictionFactor(Real64 reynoldsNum); Real64 calcPipeResistance(EnergyPlusData &state); void combineShortAndLongTimestepGFunctions(); + + void initEnvironment(EnergyPlusData &state, [[maybe_unused]] Real64 const &CurTime) override; }; - struct GLHESlinky : GLHEBase { + struct GLHESlinky : GLHEBase // LCOV_EXCL_LINE + { // Destructor - ~GLHESlinky() { - } + ~GLHESlinky() override = default; // Members + std::string const moduleName = "GroundHeatExchanger:Slinky"; bool verticalConfig; // HX Configuration Flag Real64 coilDiameter; // Diameter of the slinky coils [m] Real64 coilPitch; // Center-to-center slinky coil spacing [m] @@ -402,11 +419,13 @@ namespace GroundHeatExchangers { Real64 Z0; GLHESlinky() - : verticalConfig(false), coilDiameter(0.0), coilPitch(0.0), coilDepth(0.0), trenchDepth(0.0), - trenchLength(0.0), numTrenches(0), - trenchSpacing(0.0), numCoils(0), monthOfMinSurfTemp(0), maxSimYears(0.0), minSurfTemp(0.0) { + : verticalConfig(false), coilDiameter(0.0), coilPitch(0.0), coilDepth(0.0), trenchDepth(0.0), trenchLength(0.0), numTrenches(0), + trenchSpacing(0.0), numCoils(0), monthOfMinSurfTemp(0), maxSimYears(0.0), minSurfTemp(0.0), Z0(0.0) + { } + GLHESlinky(EnergyPlusData &state, std::string const &objName, nlohmann::json const &j); + Real64 calcHXResistance(EnergyPlusData &state) override; void calcGFunctions(EnergyPlusData &state) override; @@ -415,16 +434,13 @@ namespace GroundHeatExchangers { void getAnnualTimeConstant() override; - Real64 doubleIntegral(int m, int n, int m1, int n1, Real64 t, int I0, - int J0); + Real64 doubleIntegral(int m, int n, int m1, int n1, Real64 t, int I0, int J0); - Real64 integral(int m, int n, int m1, int n1, Real64 t, Real64 eta, - Real64 J0); + Real64 integral(int m, int n, int m1, int n1, Real64 t, Real64 eta, Real64 J0); Real64 distance(int m, int n, int m1, int n1, Real64 eta, Real64 theta); - Real64 distanceToFictRing(int m, int n, int m1, int n1, Real64 eta, - Real64 theta); + Real64 distanceToFictRing(int m, int n, int m1, int n1, Real64 eta, Real64 theta); Real64 distToCenter(int m, int n, int m1, int n1); @@ -437,47 +453,83 @@ namespace GroundHeatExchangers { void makeThisGLHECacheStruct() override; void readCacheFileAndCompareWithThisGLHECache(EnergyPlusData &state) override; - }; - void clear_state(); + void initEnvironment(EnergyPlusData &state, Real64 const &CurTime) override; + }; void GetGroundHeatExchangerInput(EnergyPlusData &state); - std::shared_ptr - BuildAndGetResponseFactorObjectFromArray(std::shared_ptr const &arrayObjectPtr); - - std::shared_ptr - BuildAndGetResponseFactorsObjectFromSingleBHs( - std::vector> const &singleBHsForRFVect); + std::shared_ptr BuildAndGetResponseFactorObjectFromArray(EnergyPlusData &state, + std::shared_ptr const &arrayObjectPtr); - void SetupBHPointsForResponseFactorsObject(std::shared_ptr &thisRF); + std::shared_ptr + BuildAndGetResponseFactorsObjectFromSingleBHs(EnergyPlusData &state, + std::vector> const &singleBHsForRFVect); - std::shared_ptr GetResponseFactor(std::string const &objectName); + void SetupBHPointsForResponseFactorsObject(std::shared_ptr &thisRF); - std::shared_ptr GetSingleBH(std::string const &objectName); + std::shared_ptr GetResponseFactor(EnergyPlusData &state, std::string const &objectName); - std::shared_ptr GetVertProps(std::string const &objectName); + std::shared_ptr GetSingleBH(EnergyPlusData &state, std::string const &objectName); - std::shared_ptr GetVertArray(std::string const &objectName); + std::shared_ptr GetVertProps(EnergyPlusData &state, std::string const &objectName); - std::vector - TDMA(std::vector a, std::vector b, std::vector c, std::vector d); + std::shared_ptr GetVertArray(EnergyPlusData &state, std::string const &objectName); - // Object Data - extern std::vector verticalGLHE; // Vertical GLHEs - extern std::vector slinkyGLHE; // Slinky GLHEs - extern std::vector> vertArraysVector; // Vertical Arrays - extern std::vector> vertPropsVector; // Vertical Properties - extern std::vector> responseFactorsVector; // Vertical Response Factors - extern std::vector> singleBoreholesVector; // Vertical Single Boreholes + std::vector TDMA(std::vector a, std::vector b, std::vector c, std::vector d); } // namespace GroundHeatExchangers -struct GroundHeatExchangerData : BaseGlobalStruct { +struct GroundHeatExchangerData : BaseGlobalStruct +{ + + int numVerticalGLHEs = 0; + int numSlinkyGLHEs = 0; + int numVertArray = 0; + int numVertProps = 0; + int numResponseFactors = 0; + int numSingleBorehole = 0; + int N = 1; // COUNTER OF TIME STEP + Real64 currentSimTime = 0.0; // Current simulation time in hours + int locHourOfDay = 0; + int locDayOfSim = 0; + bool GetInput = true; + int numAutoGeneratedResponseFactors = 0; + + Array1D prevTimeSteps; // This is used to store only the Last Few time step's time + // to enable the calculation of the sub-hourly contribution.. + // Recommended size, the product of Minimum sub-hourly history required and + // the maximum no of system time steps in an hour + + // Object Data + std::vector verticalGLHE; + std::vector slinkyGLHE; + std::vector> vertArraysVector; + std::vector> vertPropsVector; + std::vector> responseFactorsVector; + std::vector> singleBoreholesVector; void clear_state() override { - + this->numVerticalGLHEs = 0; + this->numSlinkyGLHEs = 0; + this->numVertArray = 0; + this->numVertProps = 0; + this->numResponseFactors = 0; + this->numSingleBorehole = 0; + this->N = 1; + this->currentSimTime = 0.0; + this->locHourOfDay = 0; + this->locDayOfSim = 0; + this->GetInput = true; + this->numAutoGeneratedResponseFactors = 0; + this->prevTimeSteps.deallocate(); + this->verticalGLHE.clear(); + this->slinkyGLHE.clear(); + this->vertArraysVector.clear(); + this->vertPropsVector.clear(); + this->responseFactorsVector.clear(); + this->singleBoreholesVector.clear(); } }; diff --git a/src/EnergyPlus/StateManagement.cc b/src/EnergyPlus/StateManagement.cc index 30fc9715acf..7902ab2dbb7 100644 --- a/src/EnergyPlus/StateManagement.cc +++ b/src/EnergyPlus/StateManagement.cc @@ -88,7 +88,6 @@ #include #include #include -#include #include #include #include @@ -183,7 +182,6 @@ void EnergyPlus::clearAllStates(EnergyPlusData &state) Furnaces::clear_state(); General::clear_state(); GeneralRoutines_clear_state(); // GeneralRoutines does not have a namespace - GroundHeatExchangers::clear_state(); GroundTemperatureManager::clear_state(); HeatBalanceAirManager::clear_state(); HeatBalanceIntRadExchange::clear_state(); diff --git a/tst/EnergyPlus/unit/GroundHeatExchangers.unit.cc b/tst/EnergyPlus/unit/GroundHeatExchangers.unit.cc index 25b9b3fafc3..9f9efa6c4e5 100644 --- a/tst/EnergyPlus/unit/GroundHeatExchangers.unit.cc +++ b/tst/EnergyPlus/unit/GroundHeatExchangers.unit.cc @@ -84,7 +84,7 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_Interpolate) int NPairs = 2; - std::shared_ptr thisRF(new GLHEResponseFactorsStruct); + std::shared_ptr thisRF(new GLHEResponseFactors); thisGLHE.myRespFactors = thisRF; thisGLHE.myRespFactors->LNTTS.allocate(NPairs); @@ -121,7 +121,7 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_Slinky_GetGFunc) int NPairs = 2; - std::shared_ptr thisRF(new GLHEResponseFactorsStruct); + std::shared_ptr thisRF(new GLHEResponseFactors); thisGLHE.myRespFactors = thisRF; thisGLHE.myRespFactors->LNTTS.allocate(NPairs); @@ -149,7 +149,7 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_GetGFunc) int NPairs = 2; - std::shared_ptr thisRF(new GLHEResponseFactorsStruct); + std::shared_ptr thisRF(new GLHEResponseFactors); thisGLHE.myRespFactors = thisRF; thisGLHE.myRespFactors->LNTTS.allocate(NPairs); @@ -191,6 +191,7 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_Slinky_CalcHXResistance) thisGLHE.massFlowRate = 0.01; thisGLHE.numTrenches = 1; thisGLHE.pipe.outDia = 0.02667; + thisGLHE.pipe.outRadius = thisGLHE.pipe.outDia / 2.0; thisGLHE.pipe.thickness = 0.004; thisGLHE.pipe.k = 0.4; @@ -216,7 +217,7 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_Slinky_CalcGroundHeatExchanger // Initializations GLHESlinky thisGLHE; - std::shared_ptr thisRF(new GLHEResponseFactorsStruct); + std::shared_ptr thisRF(new GLHEResponseFactors); thisGLHE.myRespFactors = thisRF; thisGLHE.numCoils = 100; @@ -226,6 +227,7 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_Slinky_CalcGroundHeatExchanger thisGLHE.coilDepth = 1.5; thisGLHE.coilDiameter = 0.8; thisGLHE.pipe.outDia = 0.034; + thisGLHE.pipe.outRadius = thisGLHE.pipe.outDia / 2.0; thisGLHE.trenchSpacing = 3.0; thisGLHE.soil.diffusivity = 3.0e-007; thisGLHE.AGG = 192; @@ -243,21 +245,26 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_Slinky_CalcGroundHeatExchanger TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_Properties_IDF_Check) { - std::string const idf_objects = delimited_string( - {"GroundHeatExchanger:Vertical:Properties,", " GHE-1 Props, !- Name", " 1, !- Depth of Top of Borehole {m}", - " 100, !- Borehole Length {m}", " 0.109982, !- Borehole Diameter {m}", - " 0.744, !- Grout Thermal Conductivity {W/m-K}", " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", - " 0.389, !- Pipe Thermal Conductivity {W/m-K}", " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", - " 0.0267, !- Pipe Outer Diameter {m}", " 0.00243, !- Pipe Thickness {m}", - " 0.04556; !- U-Tube Distance {m}"}); + std::string const idf_objects = delimited_string({"GroundHeatExchanger:Vertical:Properties,", + " GHE-1 Props, !- Name", + " 1, !- Depth of Top of Borehole {m}", + " 100, !- Borehole Length {m}", + " 0.109982, !- Borehole Diameter {m}", + " 0.744, !- Grout Thermal Conductivity {W/m-K}", + " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", + " 0.389, !- Pipe Thermal Conductivity {W/m-K}", + " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", + " 0.0267, !- Pipe Outer Diameter {m}", + " 0.00243, !- Pipe Thickness {m}", + " 0.04556; !- U-Tube Distance {m}"}); ASSERT_TRUE(process_idf(idf_objects)); GetGroundHeatExchangerInput(*state); - EXPECT_EQ(1u, vertPropsVector.size()); + EXPECT_EQ(1u, state->dataGroundHeatExchanger->vertPropsVector.size()); - auto &thisProp(vertPropsVector[0]); + auto &thisProp(state->dataGroundHeatExchanger->vertPropsVector[0]); EXPECT_EQ("GHE-1 PROPS", thisProp->name); EXPECT_EQ(1, thisProp->bhTopDepth); @@ -272,186 +279,248 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_Properties_IDF_Check) EXPECT_EQ(0.04556, thisProp->bhUTubeDist); } +TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_Slinky_IDF_Check) +{ + std::string const idf_objects = + delimited_string({"GroundHeatExchanger:Slinky,", + " Slinky GHX, !- Name", + " GHE Inlet Node, !- Inlet Node Name", + " GHE Outlet Node, !- Outlet Node Name", + " 0.0033, !- Design Flow Rate {m3/s}", + " 1.2, !- Soil Thermal Conductivity {W/m-K}", + " 3200, !- Soil Density {kg/m3}", + " 850, !- Soil Specific Heat {J/kg-K}", + " 1.8, !- Pipe Thermal Conductivity {W/m-K}", + " 920, !- Pipe Density {kg/m3}", + " 2200, !- Pipe Specific Heat {J/kg-K}", + " 0.02667, !- Pipe Outer Diameter {m}", + " 0.002413, !- Pipe Thickness {m}", + " Vertical, !- Heat Exchanger Configuration", + " 1, !- Coil Diameter {m}", + " 0.2, !- Coil Pitch {m}", + " 2.5, !- Trench Depth {m}", + " 40, !- Trench Length {m}", + " 15, !- Number of Trenches", + " 2, !- Horizontal Spacing Between Pipes {m}", + " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", + " KATemps, !- Undisturbed Ground Temperature Model Name", + " 10; !- Maximum Length of Simulation {years}", + "", + "Site:GroundTemperature:Undisturbed:KusudaAchenbach,", + " KATemps, !- Name", + " 1.8, !- Soil Thermal Conductivity {W/m-K}", + " 920, !- Soil Density {kg/m3}", + " 2200, !- Soil Specific Heat {J/kg-K}", + " 15.5, !- Average Soil Surface Temperature {C}", + " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", + " 8; !- Phase Shift of Minimum Surface Temperature {days}"}); + + ASSERT_TRUE(process_idf(idf_objects)); + + GetGroundHeatExchangerInput(*state); + + EXPECT_EQ(1u, state->dataGroundHeatExchanger->slinkyGLHE.size()); + + auto &thisGHE(state->dataGroundHeatExchanger->slinkyGLHE[0]); + + EXPECT_NEAR(thisGHE.designFlow, 0.0033, 0.000001); + EXPECT_NEAR(thisGHE.soil.k, 1.2, 0.001); + EXPECT_NEAR(thisGHE.soil.rho, 3200, 1.0); + EXPECT_NEAR(thisGHE.soil.cp, 850, 1.0); + EXPECT_NEAR(thisGHE.pipe.k, 1.8, 0.001); + EXPECT_NEAR(thisGHE.pipe.rho, 920, 1.0); + EXPECT_NEAR(thisGHE.pipe.cp, 2200, 1.0); + EXPECT_NEAR(thisGHE.pipe.outDia, 0.02667, 0.00001); + EXPECT_NEAR(thisGHE.pipe.thickness, 0.002413, 0.00001); + EXPECT_NEAR(thisGHE.pipe.thickness, 0.002413, 0.00001); + EXPECT_NEAR(thisGHE.coilDiameter, 1.0, 0.01); + EXPECT_NEAR(thisGHE.coilPitch, 0.2, 0.01); + EXPECT_NEAR(thisGHE.trenchDepth, 2.5, 0.01); + EXPECT_NEAR(thisGHE.trenchLength, 40.0, 0.01); + EXPECT_NEAR(thisGHE.numTrenches, 15.0, 0.1); + EXPECT_NEAR(thisGHE.trenchSpacing, 2.0, 0.1); +} + TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_Resp_Factors_IDF_Check) { std::string const idf_objects = delimited_string({"GroundHeatExchanger:Vertical:Properties,", - " GHE-1 Props, !- Name", - " 1, !- Depth of Top of Borehole {m}", - " 100, !- Borehole Length {m}", - " 0.109982, !- Borehole Diameter {m}", - " 0.744, !- Grout Thermal Conductivity {W/m-K}", - " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", - " 0.389, !- Pipe Thermal Conductivity {W/m-K}", - " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", - " 0.0267, !- Pipe Outer Diameter {m}", - " 0.00243, !- Pipe Thickness {m}", - " 0.04556; !- U-Tube Distance {m}", + " GHE-1 Props, !- Name", + " 1, !- Depth of Top of Borehole {m}", + " 100, !- Borehole Length {m}", + " 0.109982, !- Borehole Diameter {m}", + " 0.744, !- Grout Thermal Conductivity {W/m-K}", + " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", + " 0.389, !- Pipe Thermal Conductivity {W/m-K}", + " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", + " 0.0267, !- Pipe Outer Diameter {m}", + " 0.00243, !- Pipe Thickness {m}", + " 0.04556; !- U-Tube Distance {m}", "GroundHeatExchanger:ResponseFactors,", - " GHE-1 g-functions, !- Name", - " GHE-1 Props, !- GHE Properties", - " 4, !- Number of Boreholes", - " 0.00043, !- G-Function Reference Ratio {dimensionless}", - " -15.585075, !- G-Function Ln(T/Ts) Value 1", - " -2.672011, !- G-Function G Value 1", - " -15.440481, !- G-Function Ln(T/Ts) Value 2", - " -2.575897, !- G-Function G Value 2", - " -15.295888, !- G-Function Ln(T/Ts) Value 3", - " -2.476279, !- G-Function G Value 3", - " -15.151295, !- G-Function Ln(T/Ts) Value 4", - " -2.372609, !- G-Function G Value 4", - " -15.006701, !- G-Function Ln(T/Ts) Value 5", - " -2.264564, !- G-Function G Value 5", - " -14.862108, !- G-Function Ln(T/Ts) Value 6", - " -2.151959, !- G-Function G Value 6", - " -14.717515, !- G-Function Ln(T/Ts) Value 7", - " -2.034708, !- G-Function G Value 7", - " -14.572921, !- G-Function Ln(T/Ts) Value 8", - " -1.912801, !- G-Function G Value 8", - " -14.428328, !- G-Function Ln(T/Ts) Value 9", - " -1.786299, !- G-Function G Value 9", - " -14.283734, !- G-Function Ln(T/Ts) Value 10", - " -1.655324, !- G-Function G Value 10", - " -14.139141, !- G-Function Ln(T/Ts) Value 11", - " -1.520066, !- G-Function G Value 11", - " -13.994548, !- G-Function Ln(T/Ts) Value 12", - " -1.380782, !- G-Function G Value 12", - " -13.849954, !- G-Function Ln(T/Ts) Value 13", - " -1.237813, !- G-Function G Value 13", - " -13.705361, !- G-Function Ln(T/Ts) Value 14", - " -1.091594, !- G-Function G Value 14", - " -13.560768, !- G-Function Ln(T/Ts) Value 15", - " -0.942670, !- G-Function G Value 15", - " -13.416174, !- G-Function Ln(T/Ts) Value 16", - " -0.791704, !- G-Function G Value 16", - " -13.271581, !- G-Function Ln(T/Ts) Value 17", - " -0.639479, !- G-Function G Value 17", - " -13.126988, !- G-Function Ln(T/Ts) Value 18", - " -0.486879, !- G-Function G Value 18", - " -12.982394, !- G-Function Ln(T/Ts) Value 19", - " -0.334866, !- G-Function G Value 19", - " -12.837801, !- G-Function Ln(T/Ts) Value 20", - " -0.184431, !- G-Function G Value 20", - " -12.693207, !- G-Function Ln(T/Ts) Value 21", - " -0.036546, !- G-Function G Value 21", - " -12.548614, !- G-Function Ln(T/Ts) Value 22", - " 0.107892, !- G-Function G Value 22", - " -12.404021, !- G-Function Ln(T/Ts) Value 23", - " 0.248115, !- G-Function G Value 23", - " -12.259427, !- G-Function Ln(T/Ts) Value 24", - " 0.383520, !- G-Function G Value 24", - " -12.114834, !- G-Function Ln(T/Ts) Value 25", - " 0.513700, !- G-Function G Value 25", - " -11.970241, !- G-Function Ln(T/Ts) Value 26", - " 0.638450, !- G-Function G Value 26", - " -11.825647, !- G-Function Ln(T/Ts) Value 27", - " 0.757758, !- G-Function G Value 27", - " -11.681054, !- G-Function Ln(T/Ts) Value 28", - " 0.871780, !- G-Function G Value 28", - " -11.536461, !- G-Function Ln(T/Ts) Value 29", - " 0.980805, !- G-Function G Value 29", - " -11.391867, !- G-Function Ln(T/Ts) Value 30", - " 1.085218, !- G-Function G Value 30", - " -11.247274, !- G-Function Ln(T/Ts) Value 31", - " 1.185457, !- G-Function G Value 31", - " -11.102680, !- G-Function Ln(T/Ts) Value 32", - " 1.281980, !- G-Function G Value 32", - " -10.958087, !- G-Function Ln(T/Ts) Value 33", - " 1.375237, !- G-Function G Value 33", - " -10.813494, !- G-Function Ln(T/Ts) Value 34", - " 1.465651, !- G-Function G Value 34", - " -10.668900, !- G-Function Ln(T/Ts) Value 35", - " 1.553606, !- G-Function G Value 35", - " -10.524307, !- G-Function Ln(T/Ts) Value 36", - " 1.639445, !- G-Function G Value 36", - " -10.379714, !- G-Function Ln(T/Ts) Value 37", - " 1.723466, !- G-Function G Value 37", - " -10.235120, !- G-Function Ln(T/Ts) Value 38", - " 1.805924, !- G-Function G Value 38", - " -10.090527, !- G-Function Ln(T/Ts) Value 39", - " 1.887041, !- G-Function G Value 39", - " -9.945934, !- G-Function Ln(T/Ts) Value 40", - " 1.967002, !- G-Function G Value 40", - " -9.801340, !- G-Function Ln(T/Ts) Value 41", - " 2.045967, !- G-Function G Value 41", - " -9.656747, !- G-Function Ln(T/Ts) Value 42", - " 2.124073, !- G-Function G Value 42", - " -9.512154, !- G-Function Ln(T/Ts) Value 43", - " 2.201436, !- G-Function G Value 43", - " -9.367560, !- G-Function Ln(T/Ts) Value 44", - " 2.278154, !- G-Function G Value 44", - " -9.222967, !- G-Function Ln(T/Ts) Value 45", - " 2.354312, !- G-Function G Value 45", - " -9.078373, !- G-Function Ln(T/Ts) Value 46", - " 2.429984, !- G-Function G Value 46", - " -8.933780, !- G-Function Ln(T/Ts) Value 47", - " 2.505232, !- G-Function G Value 47", - " -8.789187, !- G-Function Ln(T/Ts) Value 48", - " 2.580112, !- G-Function G Value 48", - " -8.644593, !- G-Function Ln(T/Ts) Value 49", - " 2.654669, !- G-Function G Value 49", - " -8.500000, !- G-Function Ln(T/Ts) Value 50", - " 2.830857, !- G-Function G Value 50", - " -7.800000, !- G-Function Ln(T/Ts) Value 51", - " 3.176174, !- G-Function G Value 51", - " -7.200000, !- G-Function Ln(T/Ts) Value 52", - " 3.484017, !- G-Function G Value 52", - " -6.500000, !- G-Function Ln(T/Ts) Value 53", - " 3.887770, !- G-Function G Value 53", - " -5.900000, !- G-Function Ln(T/Ts) Value 54", - " 4.311301, !- G-Function G Value 54", - " -5.200000, !- G-Function Ln(T/Ts) Value 55", - " 4.928223, !- G-Function G Value 55", - " -4.500000, !- G-Function Ln(T/Ts) Value 56", - " 5.696283, !- G-Function G Value 56", - " -3.963000, !- G-Function Ln(T/Ts) Value 57", - " 6.361422, !- G-Function G Value 57", - " -3.270000, !- G-Function Ln(T/Ts) Value 58", - " 7.375959, !- G-Function G Value 58", - " -2.864000, !- G-Function Ln(T/Ts) Value 59", - " 7.994729, !- G-Function G Value 59", - " -2.577000, !- G-Function Ln(T/Ts) Value 60", - " 8.438474, !- G-Function G Value 60", - " -2.171000, !- G-Function Ln(T/Ts) Value 61", - " 9.059916, !- G-Function G Value 61", - " -1.884000, !- G-Function Ln(T/Ts) Value 62", - " 9.492228, !- G-Function G Value 62", - " -1.191000, !- G-Function Ln(T/Ts) Value 63", - " 10.444276, !- G-Function G Value 63", - " -0.497000, !- G-Function Ln(T/Ts) Value 64", - " 11.292233, !- G-Function G Value 64", - " -0.274000, !- G-Function Ln(T/Ts) Value 65", - " 11.525537, !- G-Function G Value 65", - " -0.051000, !- G-Function Ln(T/Ts) Value 66", - " 11.735157, !- G-Function G Value 66", - " 0.196000, !- G-Function Ln(T/Ts) Value 67", - " 11.942392, !- G-Function G Value 67", - " 0.419000, !- G-Function Ln(T/Ts) Value 68", - " 12.103282, !- G-Function G Value 68", - " 0.642000, !- G-Function Ln(T/Ts) Value 69", - " 12.243398, !- G-Function G Value 69", - " 0.873000, !- G-Function Ln(T/Ts) Value 70", - " 12.365217, !- G-Function G Value 70", - " 1.112000, !- G-Function Ln(T/Ts) Value 71", - " 12.469007, !- G-Function G Value 71", - " 1.335000, !- G-Function Ln(T/Ts) Value 72", - " 12.547123, !- G-Function G Value 72", - " 1.679000, !- G-Function Ln(T/Ts) Value 73", - " 12.637890, !- G-Function G Value 73", - " 2.028000, !- G-Function Ln(T/Ts) Value 74", - " 12.699245, !- G-Function G Value 74", - " 2.275000, !- G-Function Ln(T/Ts) Value 75", - " 12.729288, !- G-Function G Value 75", - " 3.003000, !- G-Function Ln(T/Ts) Value 76", - " 12.778359; !- G-Function G Value 76"}); + " GHE-1 g-functions, !- Name", + " GHE-1 Props, !- GHE Properties", + " 4, !- Number of Boreholes", + " 0.00043, !- G-Function Reference Ratio {dimensionless}", + " -15.585075, !- G-Function Ln(T/Ts) Value 1", + " -2.672011, !- G-Function G Value 1", + " -15.440481, !- G-Function Ln(T/Ts) Value 2", + " -2.575897, !- G-Function G Value 2", + " -15.295888, !- G-Function Ln(T/Ts) Value 3", + " -2.476279, !- G-Function G Value 3", + " -15.151295, !- G-Function Ln(T/Ts) Value 4", + " -2.372609, !- G-Function G Value 4", + " -15.006701, !- G-Function Ln(T/Ts) Value 5", + " -2.264564, !- G-Function G Value 5", + " -14.862108, !- G-Function Ln(T/Ts) Value 6", + " -2.151959, !- G-Function G Value 6", + " -14.717515, !- G-Function Ln(T/Ts) Value 7", + " -2.034708, !- G-Function G Value 7", + " -14.572921, !- G-Function Ln(T/Ts) Value 8", + " -1.912801, !- G-Function G Value 8", + " -14.428328, !- G-Function Ln(T/Ts) Value 9", + " -1.786299, !- G-Function G Value 9", + " -14.283734, !- G-Function Ln(T/Ts) Value 10", + " -1.655324, !- G-Function G Value 10", + " -14.139141, !- G-Function Ln(T/Ts) Value 11", + " -1.520066, !- G-Function G Value 11", + " -13.994548, !- G-Function Ln(T/Ts) Value 12", + " -1.380782, !- G-Function G Value 12", + " -13.849954, !- G-Function Ln(T/Ts) Value 13", + " -1.237813, !- G-Function G Value 13", + " -13.705361, !- G-Function Ln(T/Ts) Value 14", + " -1.091594, !- G-Function G Value 14", + " -13.560768, !- G-Function Ln(T/Ts) Value 15", + " -0.942670, !- G-Function G Value 15", + " -13.416174, !- G-Function Ln(T/Ts) Value 16", + " -0.791704, !- G-Function G Value 16", + " -13.271581, !- G-Function Ln(T/Ts) Value 17", + " -0.639479, !- G-Function G Value 17", + " -13.126988, !- G-Function Ln(T/Ts) Value 18", + " -0.486879, !- G-Function G Value 18", + " -12.982394, !- G-Function Ln(T/Ts) Value 19", + " -0.334866, !- G-Function G Value 19", + " -12.837801, !- G-Function Ln(T/Ts) Value 20", + " -0.184431, !- G-Function G Value 20", + " -12.693207, !- G-Function Ln(T/Ts) Value 21", + " -0.036546, !- G-Function G Value 21", + " -12.548614, !- G-Function Ln(T/Ts) Value 22", + " 0.107892, !- G-Function G Value 22", + " -12.404021, !- G-Function Ln(T/Ts) Value 23", + " 0.248115, !- G-Function G Value 23", + " -12.259427, !- G-Function Ln(T/Ts) Value 24", + " 0.383520, !- G-Function G Value 24", + " -12.114834, !- G-Function Ln(T/Ts) Value 25", + " 0.513700, !- G-Function G Value 25", + " -11.970241, !- G-Function Ln(T/Ts) Value 26", + " 0.638450, !- G-Function G Value 26", + " -11.825647, !- G-Function Ln(T/Ts) Value 27", + " 0.757758, !- G-Function G Value 27", + " -11.681054, !- G-Function Ln(T/Ts) Value 28", + " 0.871780, !- G-Function G Value 28", + " -11.536461, !- G-Function Ln(T/Ts) Value 29", + " 0.980805, !- G-Function G Value 29", + " -11.391867, !- G-Function Ln(T/Ts) Value 30", + " 1.085218, !- G-Function G Value 30", + " -11.247274, !- G-Function Ln(T/Ts) Value 31", + " 1.185457, !- G-Function G Value 31", + " -11.102680, !- G-Function Ln(T/Ts) Value 32", + " 1.281980, !- G-Function G Value 32", + " -10.958087, !- G-Function Ln(T/Ts) Value 33", + " 1.375237, !- G-Function G Value 33", + " -10.813494, !- G-Function Ln(T/Ts) Value 34", + " 1.465651, !- G-Function G Value 34", + " -10.668900, !- G-Function Ln(T/Ts) Value 35", + " 1.553606, !- G-Function G Value 35", + " -10.524307, !- G-Function Ln(T/Ts) Value 36", + " 1.639445, !- G-Function G Value 36", + " -10.379714, !- G-Function Ln(T/Ts) Value 37", + " 1.723466, !- G-Function G Value 37", + " -10.235120, !- G-Function Ln(T/Ts) Value 38", + " 1.805924, !- G-Function G Value 38", + " -10.090527, !- G-Function Ln(T/Ts) Value 39", + " 1.887041, !- G-Function G Value 39", + " -9.945934, !- G-Function Ln(T/Ts) Value 40", + " 1.967002, !- G-Function G Value 40", + " -9.801340, !- G-Function Ln(T/Ts) Value 41", + " 2.045967, !- G-Function G Value 41", + " -9.656747, !- G-Function Ln(T/Ts) Value 42", + " 2.124073, !- G-Function G Value 42", + " -9.512154, !- G-Function Ln(T/Ts) Value 43", + " 2.201436, !- G-Function G Value 43", + " -9.367560, !- G-Function Ln(T/Ts) Value 44", + " 2.278154, !- G-Function G Value 44", + " -9.222967, !- G-Function Ln(T/Ts) Value 45", + " 2.354312, !- G-Function G Value 45", + " -9.078373, !- G-Function Ln(T/Ts) Value 46", + " 2.429984, !- G-Function G Value 46", + " -8.933780, !- G-Function Ln(T/Ts) Value 47", + " 2.505232, !- G-Function G Value 47", + " -8.789187, !- G-Function Ln(T/Ts) Value 48", + " 2.580112, !- G-Function G Value 48", + " -8.644593, !- G-Function Ln(T/Ts) Value 49", + " 2.654669, !- G-Function G Value 49", + " -8.500000, !- G-Function Ln(T/Ts) Value 50", + " 2.830857, !- G-Function G Value 50", + " -7.800000, !- G-Function Ln(T/Ts) Value 51", + " 3.176174, !- G-Function G Value 51", + " -7.200000, !- G-Function Ln(T/Ts) Value 52", + " 3.484017, !- G-Function G Value 52", + " -6.500000, !- G-Function Ln(T/Ts) Value 53", + " 3.887770, !- G-Function G Value 53", + " -5.900000, !- G-Function Ln(T/Ts) Value 54", + " 4.311301, !- G-Function G Value 54", + " -5.200000, !- G-Function Ln(T/Ts) Value 55", + " 4.928223, !- G-Function G Value 55", + " -4.500000, !- G-Function Ln(T/Ts) Value 56", + " 5.696283, !- G-Function G Value 56", + " -3.963000, !- G-Function Ln(T/Ts) Value 57", + " 6.361422, !- G-Function G Value 57", + " -3.270000, !- G-Function Ln(T/Ts) Value 58", + " 7.375959, !- G-Function G Value 58", + " -2.864000, !- G-Function Ln(T/Ts) Value 59", + " 7.994729, !- G-Function G Value 59", + " -2.577000, !- G-Function Ln(T/Ts) Value 60", + " 8.438474, !- G-Function G Value 60", + " -2.171000, !- G-Function Ln(T/Ts) Value 61", + " 9.059916, !- G-Function G Value 61", + " -1.884000, !- G-Function Ln(T/Ts) Value 62", + " 9.492228, !- G-Function G Value 62", + " -1.191000, !- G-Function Ln(T/Ts) Value 63", + " 10.444276, !- G-Function G Value 63", + " -0.497000, !- G-Function Ln(T/Ts) Value 64", + " 11.292233, !- G-Function G Value 64", + " -0.274000, !- G-Function Ln(T/Ts) Value 65", + " 11.525537, !- G-Function G Value 65", + " -0.051000, !- G-Function Ln(T/Ts) Value 66", + " 11.735157, !- G-Function G Value 66", + " 0.196000, !- G-Function Ln(T/Ts) Value 67", + " 11.942392, !- G-Function G Value 67", + " 0.419000, !- G-Function Ln(T/Ts) Value 68", + " 12.103282, !- G-Function G Value 68", + " 0.642000, !- G-Function Ln(T/Ts) Value 69", + " 12.243398, !- G-Function G Value 69", + " 0.873000, !- G-Function Ln(T/Ts) Value 70", + " 12.365217, !- G-Function G Value 70", + " 1.112000, !- G-Function Ln(T/Ts) Value 71", + " 12.469007, !- G-Function G Value 71", + " 1.335000, !- G-Function Ln(T/Ts) Value 72", + " 12.547123, !- G-Function G Value 72", + " 1.679000, !- G-Function Ln(T/Ts) Value 73", + " 12.637890, !- G-Function G Value 73", + " 2.028000, !- G-Function Ln(T/Ts) Value 74", + " 12.699245, !- G-Function G Value 74", + " 2.275000, !- G-Function Ln(T/Ts) Value 75", + " 12.729288, !- G-Function G Value 75", + " 3.003000, !- G-Function Ln(T/Ts) Value 76", + " 12.778359; !- G-Function G Value 76"}); ASSERT_TRUE(process_idf(idf_objects)); GetGroundHeatExchangerInput(*state); - EXPECT_EQ(1u, responseFactorsVector.size()); + EXPECT_EQ(1u, state->dataGroundHeatExchanger->responseFactorsVector.size()); - auto &thisRF(responseFactorsVector[0]); + auto &thisRF(state->dataGroundHeatExchanger->responseFactorsVector[0]); EXPECT_EQ("GHE-1 G-FUNCTIONS", thisRF->name); EXPECT_EQ("GHE-1 PROPS", thisRF->props->name); @@ -464,37 +533,66 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_Resp_Factors_IDF_Check) EXPECT_EQ(12.778359, thisRF->GFNC(76)); } +TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_Resp_Factors_Mismatched_Pairs) +{ + std::string const idf_objects = delimited_string({"GroundHeatExchanger:Vertical:Properties,", + " GHE-1 Props, !- Name", + " 1, !- Depth of Top of Borehole {m}", + " 100, !- Borehole Length {m}", + " 0.109982, !- Borehole Diameter {m}", + " 0.744, !- Grout Thermal Conductivity {W/m-K}", + " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", + " 0.389, !- Pipe Thermal Conductivity {W/m-K}", + " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", + " 0.0267, !- Pipe Outer Diameter {m}", + " 0.00243, !- Pipe Thickness {m}", + " 0.04556; !- U-Tube Distance {m}", + + "GroundHeatExchanger:ResponseFactors,", + " GHE-1 g-functions, !- Name", + " GHE-1 Props, !- GHE Properties", + " 4, !- Number of Boreholes", + " 0.00043, !- G-Function Reference Ratio {dimensionless}", + " -15.585075, !- G-Function Ln(T/Ts) Value 1", + " -2.672011, !- G-Function G Value 1", + " 2.275000, !- G-Function Ln(T/Ts) Value 2", + " 12.729288, !- G-Function G Value 2", + " 3.003000; !- G-Function Ln(T/Ts) Value 3"}); + + EXPECT_FALSE(process_idf(idf_objects, false)); +} + TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_Vertical_Array_IDF_Check) { std::string const idf_objects = delimited_string({ "GroundHeatExchanger:Vertical:Properties,", - " GHE-1 Props, !- Name", - " 1, !- Depth of Top of Borehole {m}", - " 100, !- Borehole Length {m}", - " 0.109982, !- Borehole Diameter {m}", - " 0.744, !- Grout Thermal Conductivity {W/m-K}", - " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", - " 0.389, !- Pipe Thermal Conductivity {W/m-K}", - " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", - " 0.0267, !- Pipe Outer Diameter {m}", - " 0.00243, !- Pipe Thickness {m}", - " 0.04556; !- U-Tube Distance {m}", + " GHE-1 Props, !- Name", + " 1, !- Depth of Top of Borehole {m}", + " 100, !- Borehole Length {m}", + " 0.109982, !- Borehole Diameter {m}", + " 0.744, !- Grout Thermal Conductivity {W/m-K}", + " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", + " 0.389, !- Pipe Thermal Conductivity {W/m-K}", + " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", + " 0.0267, !- Pipe Outer Diameter {m}", + " 0.00243, !- Pipe Thickness {m}", + " 0.04556; !- U-Tube Distance {m}", "GroundHeatExchanger:Vertical:Array,", - " GHE-Array, !- Name", - " GHE-1 Props, !- GHE Properties", - " 2, !- Number of Boreholes in X Direction", - " 2, !- Number of Boreholes in Y Direction", - " 2; !- Borehole Spacing {m}", + " GHE-Array, !- Name", + " GHE-1 Props, !- GHE Properties", + " 2, !- Number of Boreholes in X Direction", + " 2, !- Number of Boreholes in Y Direction", + " 2; !- Borehole Spacing {m}", }); ASSERT_TRUE(process_idf(idf_objects)); GetGroundHeatExchangerInput(*state); - EXPECT_EQ(1u, vertArraysVector.size()); + EXPECT_EQ(1u, state->dataGroundHeatExchanger->vertArraysVector.size()); - auto &thisArray(vertArraysVector[0]); + auto &thisArray(state->dataGroundHeatExchanger->vertArraysVector[0]); EXPECT_EQ("GHE-ARRAY", thisArray->name); EXPECT_EQ("GHE-1 PROPS", thisArray->props->name); @@ -506,214 +604,214 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_Given_Response_Factors_ { std::string const idf_objects = delimited_string({ "Site:GroundTemperature:Undisturbed:KusudaAchenbach,", - " KATemps, !- Name", - " 1.8, !- Soil Thermal Conductivity {W/m-K}", - " 920, !- Soil Density {kg/m3}", - " 2200, !- Soil Specific Heat {J/kg-K}", - " 15.5, !- Average Soil Surface Temperature {C}", - " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", - " 8; !- Phase Shift of Minimum Surface Temperature {days}", + " KATemps, !- Name", + " 1.8, !- Soil Thermal Conductivity {W/m-K}", + " 920, !- Soil Density {kg/m3}", + " 2200, !- Soil Specific Heat {J/kg-K}", + " 15.5, !- Average Soil Surface Temperature {C}", + " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", + " 8; !- Phase Shift of Minimum Surface Temperature {days}", "GroundHeatExchanger:Vertical:Properties,", - " GHE-1 Props, !- Name", - " 1, !- Depth of Top of Borehole {m}", - " 100, !- Borehole Length {m}", - " 0.109982, !- Borehole Diameter {m}", - " 0.744, !- Grout Thermal Conductivity {W/m-K}", - " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", - " 0.389, !- Pipe Thermal Conductivity {W/m-K}", - " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", - " 0.0267, !- Pipe Outer Diameter {m}", - " 0.00243, !- Pipe Thickness {m}", - " 0.04556; !- U-Tube Distance {m}", + " GHE-1 Props, !- Name", + " 1, !- Depth of Top of Borehole {m}", + " 100, !- Borehole Length {m}", + " 0.109982, !- Borehole Diameter {m}", + " 0.744, !- Grout Thermal Conductivity {W/m-K}", + " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", + " 0.389, !- Pipe Thermal Conductivity {W/m-K}", + " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", + " 0.0267, !- Pipe Outer Diameter {m}", + " 0.00243, !- Pipe Thickness {m}", + " 0.04556; !- U-Tube Distance {m}", "GroundHeatExchanger:ResponseFactors,", - " GHE-1 g-functions, !- Name", - " GHE-1 Props, !- GHE Properties", - " 4, !- Number of Boreholes", - " 0.00043, !- G-Function Reference Ratio {dimensionless}", - " -15.585075, !- G-Function Ln(T/Ts) Value 1", - " -2.672011, !- G-Function G Value 1", - " -15.440481, !- G-Function Ln(T/Ts) Value 2", - " -2.575897, !- G-Function G Value 2", - " -15.295888, !- G-Function Ln(T/Ts) Value 3", - " -2.476279, !- G-Function G Value 3", - " -15.151295, !- G-Function Ln(T/Ts) Value 4", - " -2.372609, !- G-Function G Value 4", - " -15.006701, !- G-Function Ln(T/Ts) Value 5", - " -2.264564, !- G-Function G Value 5", - " -14.862108, !- G-Function Ln(T/Ts) Value 6", - " -2.151959, !- G-Function G Value 6", - " -14.717515, !- G-Function Ln(T/Ts) Value 7", - " -2.034708, !- G-Function G Value 7", - " -14.572921, !- G-Function Ln(T/Ts) Value 8", - " -1.912801, !- G-Function G Value 8", - " -14.428328, !- G-Function Ln(T/Ts) Value 9", - " -1.786299, !- G-Function G Value 9", - " -14.283734, !- G-Function Ln(T/Ts) Value 10", - " -1.655324, !- G-Function G Value 10", - " -14.139141, !- G-Function Ln(T/Ts) Value 11", - " -1.520066, !- G-Function G Value 11", - " -13.994548, !- G-Function Ln(T/Ts) Value 12", - " -1.380782, !- G-Function G Value 12", - " -13.849954, !- G-Function Ln(T/Ts) Value 13", - " -1.237813, !- G-Function G Value 13", - " -13.705361, !- G-Function Ln(T/Ts) Value 14", - " -1.091594, !- G-Function G Value 14", - " -13.560768, !- G-Function Ln(T/Ts) Value 15", - " -0.942670, !- G-Function G Value 15", - " -13.416174, !- G-Function Ln(T/Ts) Value 16", - " -0.791704, !- G-Function G Value 16", - " -13.271581, !- G-Function Ln(T/Ts) Value 17", - " -0.639479, !- G-Function G Value 17", - " -13.126988, !- G-Function Ln(T/Ts) Value 18", - " -0.486879, !- G-Function G Value 18", - " -12.982394, !- G-Function Ln(T/Ts) Value 19", - " -0.334866, !- G-Function G Value 19", - " -12.837801, !- G-Function Ln(T/Ts) Value 20", - " -0.184431, !- G-Function G Value 20", - " -12.693207, !- G-Function Ln(T/Ts) Value 21", - " -0.036546, !- G-Function G Value 21", - " -12.548614, !- G-Function Ln(T/Ts) Value 22", - " 0.107892, !- G-Function G Value 22", - " -12.404021, !- G-Function Ln(T/Ts) Value 23", - " 0.248115, !- G-Function G Value 23", - " -12.259427, !- G-Function Ln(T/Ts) Value 24", - " 0.383520, !- G-Function G Value 24", - " -12.114834, !- G-Function Ln(T/Ts) Value 25", - " 0.513700, !- G-Function G Value 25", - " -11.970241, !- G-Function Ln(T/Ts) Value 26", - " 0.638450, !- G-Function G Value 26", - " -11.825647, !- G-Function Ln(T/Ts) Value 27", - " 0.757758, !- G-Function G Value 27", - " -11.681054, !- G-Function Ln(T/Ts) Value 28", - " 0.871780, !- G-Function G Value 28", - " -11.536461, !- G-Function Ln(T/Ts) Value 29", - " 0.980805, !- G-Function G Value 29", - " -11.391867, !- G-Function Ln(T/Ts) Value 30", - " 1.085218, !- G-Function G Value 30", - " -11.247274, !- G-Function Ln(T/Ts) Value 31", - " 1.185457, !- G-Function G Value 31", - " -11.102680, !- G-Function Ln(T/Ts) Value 32", - " 1.281980, !- G-Function G Value 32", - " -10.958087, !- G-Function Ln(T/Ts) Value 33", - " 1.375237, !- G-Function G Value 33", - " -10.813494, !- G-Function Ln(T/Ts) Value 34", - " 1.465651, !- G-Function G Value 34", - " -10.668900, !- G-Function Ln(T/Ts) Value 35", - " 1.553606, !- G-Function G Value 35", - " -10.524307, !- G-Function Ln(T/Ts) Value 36", - " 1.639445, !- G-Function G Value 36", - " -10.379714, !- G-Function Ln(T/Ts) Value 37", - " 1.723466, !- G-Function G Value 37", - " -10.235120, !- G-Function Ln(T/Ts) Value 38", - " 1.805924, !- G-Function G Value 38", - " -10.090527, !- G-Function Ln(T/Ts) Value 39", - " 1.887041, !- G-Function G Value 39", - " -9.945934, !- G-Function Ln(T/Ts) Value 40", - " 1.967002, !- G-Function G Value 40", - " -9.801340, !- G-Function Ln(T/Ts) Value 41", - " 2.045967, !- G-Function G Value 41", - " -9.656747, !- G-Function Ln(T/Ts) Value 42", - " 2.124073, !- G-Function G Value 42", - " -9.512154, !- G-Function Ln(T/Ts) Value 43", - " 2.201436, !- G-Function G Value 43", - " -9.367560, !- G-Function Ln(T/Ts) Value 44", - " 2.278154, !- G-Function G Value 44", - " -9.222967, !- G-Function Ln(T/Ts) Value 45", - " 2.354312, !- G-Function G Value 45", - " -9.078373, !- G-Function Ln(T/Ts) Value 46", - " 2.429984, !- G-Function G Value 46", - " -8.933780, !- G-Function Ln(T/Ts) Value 47", - " 2.505232, !- G-Function G Value 47", - " -8.789187, !- G-Function Ln(T/Ts) Value 48", - " 2.580112, !- G-Function G Value 48", - " -8.644593, !- G-Function Ln(T/Ts) Value 49", - " 2.654669, !- G-Function G Value 49", - " -8.500000, !- G-Function Ln(T/Ts) Value 50", - " 2.830857, !- G-Function G Value 50", - " -7.800000, !- G-Function Ln(T/Ts) Value 51", - " 3.176174, !- G-Function G Value 51", - " -7.200000, !- G-Function Ln(T/Ts) Value 52", - " 3.484017, !- G-Function G Value 52", - " -6.500000, !- G-Function Ln(T/Ts) Value 53", - " 3.887770, !- G-Function G Value 53", - " -5.900000, !- G-Function Ln(T/Ts) Value 54", - " 4.311301, !- G-Function G Value 54", - " -5.200000, !- G-Function Ln(T/Ts) Value 55", - " 4.928223, !- G-Function G Value 55", - " -4.500000, !- G-Function Ln(T/Ts) Value 56", - " 5.696283, !- G-Function G Value 56", - " -3.963000, !- G-Function Ln(T/Ts) Value 57", - " 6.361422, !- G-Function G Value 57", - " -3.270000, !- G-Function Ln(T/Ts) Value 58", - " 7.375959, !- G-Function G Value 58", - " -2.864000, !- G-Function Ln(T/Ts) Value 59", - " 7.994729, !- G-Function G Value 59", - " -2.577000, !- G-Function Ln(T/Ts) Value 60", - " 8.438474, !- G-Function G Value 60", - " -2.171000, !- G-Function Ln(T/Ts) Value 61", - " 9.059916, !- G-Function G Value 61", - " -1.884000, !- G-Function Ln(T/Ts) Value 62", - " 9.492228, !- G-Function G Value 62", - " -1.191000, !- G-Function Ln(T/Ts) Value 63", - " 10.444276, !- G-Function G Value 63", - " -0.497000, !- G-Function Ln(T/Ts) Value 64", - " 11.292233, !- G-Function G Value 64", - " -0.274000, !- G-Function Ln(T/Ts) Value 65", - " 11.525537, !- G-Function G Value 65", - " -0.051000, !- G-Function Ln(T/Ts) Value 66", - " 11.735157, !- G-Function G Value 66", - " 0.196000, !- G-Function Ln(T/Ts) Value 67", - " 11.942392, !- G-Function G Value 67", - " 0.419000, !- G-Function Ln(T/Ts) Value 68", - " 12.103282, !- G-Function G Value 68", - " 0.642000, !- G-Function Ln(T/Ts) Value 69", - " 12.243398, !- G-Function G Value 69", - " 0.873000, !- G-Function Ln(T/Ts) Value 70", - " 12.365217, !- G-Function G Value 70", - " 1.112000, !- G-Function Ln(T/Ts) Value 71", - " 12.469007, !- G-Function G Value 71", - " 1.335000, !- G-Function Ln(T/Ts) Value 72", - " 12.547123, !- G-Function G Value 72", - " 1.679000, !- G-Function Ln(T/Ts) Value 73", - " 12.637890, !- G-Function G Value 73", - " 2.028000, !- G-Function Ln(T/Ts) Value 74", - " 12.699245, !- G-Function G Value 74", - " 2.275000, !- G-Function Ln(T/Ts) Value 75", - " 12.729288, !- G-Function G Value 75", - " 3.003000, !- G-Function Ln(T/Ts) Value 76", - " 12.778359; !- G-Function G Value 76", + " GHE-1 g-functions, !- Name", + " GHE-1 Props, !- GHE Properties", + " 4, !- Number of Boreholes", + " 0.00043, !- G-Function Reference Ratio {dimensionless}", + " -15.585075, !- G-Function Ln(T/Ts) Value 1", + " -2.672011, !- G-Function G Value 1", + " -15.440481, !- G-Function Ln(T/Ts) Value 2", + " -2.575897, !- G-Function G Value 2", + " -15.295888, !- G-Function Ln(T/Ts) Value 3", + " -2.476279, !- G-Function G Value 3", + " -15.151295, !- G-Function Ln(T/Ts) Value 4", + " -2.372609, !- G-Function G Value 4", + " -15.006701, !- G-Function Ln(T/Ts) Value 5", + " -2.264564, !- G-Function G Value 5", + " -14.862108, !- G-Function Ln(T/Ts) Value 6", + " -2.151959, !- G-Function G Value 6", + " -14.717515, !- G-Function Ln(T/Ts) Value 7", + " -2.034708, !- G-Function G Value 7", + " -14.572921, !- G-Function Ln(T/Ts) Value 8", + " -1.912801, !- G-Function G Value 8", + " -14.428328, !- G-Function Ln(T/Ts) Value 9", + " -1.786299, !- G-Function G Value 9", + " -14.283734, !- G-Function Ln(T/Ts) Value 10", + " -1.655324, !- G-Function G Value 10", + " -14.139141, !- G-Function Ln(T/Ts) Value 11", + " -1.520066, !- G-Function G Value 11", + " -13.994548, !- G-Function Ln(T/Ts) Value 12", + " -1.380782, !- G-Function G Value 12", + " -13.849954, !- G-Function Ln(T/Ts) Value 13", + " -1.237813, !- G-Function G Value 13", + " -13.705361, !- G-Function Ln(T/Ts) Value 14", + " -1.091594, !- G-Function G Value 14", + " -13.560768, !- G-Function Ln(T/Ts) Value 15", + " -0.942670, !- G-Function G Value 15", + " -13.416174, !- G-Function Ln(T/Ts) Value 16", + " -0.791704, !- G-Function G Value 16", + " -13.271581, !- G-Function Ln(T/Ts) Value 17", + " -0.639479, !- G-Function G Value 17", + " -13.126988, !- G-Function Ln(T/Ts) Value 18", + " -0.486879, !- G-Function G Value 18", + " -12.982394, !- G-Function Ln(T/Ts) Value 19", + " -0.334866, !- G-Function G Value 19", + " -12.837801, !- G-Function Ln(T/Ts) Value 20", + " -0.184431, !- G-Function G Value 20", + " -12.693207, !- G-Function Ln(T/Ts) Value 21", + " -0.036546, !- G-Function G Value 21", + " -12.548614, !- G-Function Ln(T/Ts) Value 22", + " 0.107892, !- G-Function G Value 22", + " -12.404021, !- G-Function Ln(T/Ts) Value 23", + " 0.248115, !- G-Function G Value 23", + " -12.259427, !- G-Function Ln(T/Ts) Value 24", + " 0.383520, !- G-Function G Value 24", + " -12.114834, !- G-Function Ln(T/Ts) Value 25", + " 0.513700, !- G-Function G Value 25", + " -11.970241, !- G-Function Ln(T/Ts) Value 26", + " 0.638450, !- G-Function G Value 26", + " -11.825647, !- G-Function Ln(T/Ts) Value 27", + " 0.757758, !- G-Function G Value 27", + " -11.681054, !- G-Function Ln(T/Ts) Value 28", + " 0.871780, !- G-Function G Value 28", + " -11.536461, !- G-Function Ln(T/Ts) Value 29", + " 0.980805, !- G-Function G Value 29", + " -11.391867, !- G-Function Ln(T/Ts) Value 30", + " 1.085218, !- G-Function G Value 30", + " -11.247274, !- G-Function Ln(T/Ts) Value 31", + " 1.185457, !- G-Function G Value 31", + " -11.102680, !- G-Function Ln(T/Ts) Value 32", + " 1.281980, !- G-Function G Value 32", + " -10.958087, !- G-Function Ln(T/Ts) Value 33", + " 1.375237, !- G-Function G Value 33", + " -10.813494, !- G-Function Ln(T/Ts) Value 34", + " 1.465651, !- G-Function G Value 34", + " -10.668900, !- G-Function Ln(T/Ts) Value 35", + " 1.553606, !- G-Function G Value 35", + " -10.524307, !- G-Function Ln(T/Ts) Value 36", + " 1.639445, !- G-Function G Value 36", + " -10.379714, !- G-Function Ln(T/Ts) Value 37", + " 1.723466, !- G-Function G Value 37", + " -10.235120, !- G-Function Ln(T/Ts) Value 38", + " 1.805924, !- G-Function G Value 38", + " -10.090527, !- G-Function Ln(T/Ts) Value 39", + " 1.887041, !- G-Function G Value 39", + " -9.945934, !- G-Function Ln(T/Ts) Value 40", + " 1.967002, !- G-Function G Value 40", + " -9.801340, !- G-Function Ln(T/Ts) Value 41", + " 2.045967, !- G-Function G Value 41", + " -9.656747, !- G-Function Ln(T/Ts) Value 42", + " 2.124073, !- G-Function G Value 42", + " -9.512154, !- G-Function Ln(T/Ts) Value 43", + " 2.201436, !- G-Function G Value 43", + " -9.367560, !- G-Function Ln(T/Ts) Value 44", + " 2.278154, !- G-Function G Value 44", + " -9.222967, !- G-Function Ln(T/Ts) Value 45", + " 2.354312, !- G-Function G Value 45", + " -9.078373, !- G-Function Ln(T/Ts) Value 46", + " 2.429984, !- G-Function G Value 46", + " -8.933780, !- G-Function Ln(T/Ts) Value 47", + " 2.505232, !- G-Function G Value 47", + " -8.789187, !- G-Function Ln(T/Ts) Value 48", + " 2.580112, !- G-Function G Value 48", + " -8.644593, !- G-Function Ln(T/Ts) Value 49", + " 2.654669, !- G-Function G Value 49", + " -8.500000, !- G-Function Ln(T/Ts) Value 50", + " 2.830857, !- G-Function G Value 50", + " -7.800000, !- G-Function Ln(T/Ts) Value 51", + " 3.176174, !- G-Function G Value 51", + " -7.200000, !- G-Function Ln(T/Ts) Value 52", + " 3.484017, !- G-Function G Value 52", + " -6.500000, !- G-Function Ln(T/Ts) Value 53", + " 3.887770, !- G-Function G Value 53", + " -5.900000, !- G-Function Ln(T/Ts) Value 54", + " 4.311301, !- G-Function G Value 54", + " -5.200000, !- G-Function Ln(T/Ts) Value 55", + " 4.928223, !- G-Function G Value 55", + " -4.500000, !- G-Function Ln(T/Ts) Value 56", + " 5.696283, !- G-Function G Value 56", + " -3.963000, !- G-Function Ln(T/Ts) Value 57", + " 6.361422, !- G-Function G Value 57", + " -3.270000, !- G-Function Ln(T/Ts) Value 58", + " 7.375959, !- G-Function G Value 58", + " -2.864000, !- G-Function Ln(T/Ts) Value 59", + " 7.994729, !- G-Function G Value 59", + " -2.577000, !- G-Function Ln(T/Ts) Value 60", + " 8.438474, !- G-Function G Value 60", + " -2.171000, !- G-Function Ln(T/Ts) Value 61", + " 9.059916, !- G-Function G Value 61", + " -1.884000, !- G-Function Ln(T/Ts) Value 62", + " 9.492228, !- G-Function G Value 62", + " -1.191000, !- G-Function Ln(T/Ts) Value 63", + " 10.444276, !- G-Function G Value 63", + " -0.497000, !- G-Function Ln(T/Ts) Value 64", + " 11.292233, !- G-Function G Value 64", + " -0.274000, !- G-Function Ln(T/Ts) Value 65", + " 11.525537, !- G-Function G Value 65", + " -0.051000, !- G-Function Ln(T/Ts) Value 66", + " 11.735157, !- G-Function G Value 66", + " 0.196000, !- G-Function Ln(T/Ts) Value 67", + " 11.942392, !- G-Function G Value 67", + " 0.419000, !- G-Function Ln(T/Ts) Value 68", + " 12.103282, !- G-Function G Value 68", + " 0.642000, !- G-Function Ln(T/Ts) Value 69", + " 12.243398, !- G-Function G Value 69", + " 0.873000, !- G-Function Ln(T/Ts) Value 70", + " 12.365217, !- G-Function G Value 70", + " 1.112000, !- G-Function Ln(T/Ts) Value 71", + " 12.469007, !- G-Function G Value 71", + " 1.335000, !- G-Function Ln(T/Ts) Value 72", + " 12.547123, !- G-Function G Value 72", + " 1.679000, !- G-Function Ln(T/Ts) Value 73", + " 12.637890, !- G-Function G Value 73", + " 2.028000, !- G-Function Ln(T/Ts) Value 74", + " 12.699245, !- G-Function G Value 74", + " 2.275000, !- G-Function Ln(T/Ts) Value 75", + " 12.729288, !- G-Function G Value 75", + " 3.003000, !- G-Function Ln(T/Ts) Value 76", + " 12.778359; !- G-Function G Value 76", "GroundHeatExchanger:System,", - " Vertical GHE 1x4 Std, !- Name", - " GHLE Inlet, !- Inlet Node Name", - " GHLE Outlet, !- Outlet Node Name", - " 0.0007571, !- Design Flow Rate {m3/s}", - " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", - " KATemps, !- Undisturbed Ground Temperature Model Name", - " 2.423, !- Ground Thermal Conductivity {W/m-K}", - " 2.343E+06, !- Ground Thermal Heat Capacity {J/m3-K}", - " GHE-1 g-functions; !- Response Factors Object Name", + " Vertical GHE 1x4 Std, !- Name", + " GHLE Inlet, !- Inlet Node Name", + " GHLE Outlet, !- Outlet Node Name", + " 0.0007571, !- Design Flow Rate {m3/s}", + " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", + " KATemps, !- Undisturbed Ground Temperature Model Name", + " 2.423, !- Ground Thermal Conductivity {W/m-K}", + " 2.343E+06, !- Ground Thermal Heat Capacity {J/m3-K}", + " GHE-1 g-functions; !- Response Factors Object Name", }); ASSERT_TRUE(process_idf(idf_objects)); GetGroundHeatExchangerInput(*state); - EXPECT_EQ(1u, vertPropsVector.size()); - EXPECT_EQ(1u, responseFactorsVector.size()); - EXPECT_EQ(1u, verticalGLHE.size()); + EXPECT_EQ(1u, state->dataGroundHeatExchanger->vertPropsVector.size()); + EXPECT_EQ(1u, state->dataGroundHeatExchanger->responseFactorsVector.size()); + EXPECT_EQ(1u, state->dataGroundHeatExchanger->verticalGLHE.size()); - auto &thisRF(responseFactorsVector[0]); - auto &thisGLHE(verticalGLHE[0]); + auto &thisRF(state->dataGroundHeatExchanger->responseFactorsVector[0]); + auto &thisGLHE(state->dataGroundHeatExchanger->verticalGLHE[0]); EXPECT_EQ("VERTICAL GHE 1X4 STD", thisGLHE.name); EXPECT_EQ(true, thisGLHE.available); EXPECT_EQ(true, thisGLHE.on); EXPECT_EQ(2.423, thisGLHE.soil.k); EXPECT_EQ(2.343E6, thisGLHE.soil.rhoCp); - EXPECT_EQ(GetResponseFactor(thisRF->name), thisGLHE.myRespFactors); + EXPECT_EQ(GetResponseFactor(*state, thisRF->name), thisGLHE.myRespFactors); EXPECT_EQ(0.109982, thisGLHE.bhDiameter); EXPECT_EQ(0.109982 / 2, thisGLHE.bhRadius); EXPECT_EQ(100, thisGLHE.bhLength); @@ -727,63 +825,63 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_Given_Array_IDF_Check) { std::string const idf_objects = delimited_string({"Site:GroundTemperature:Undisturbed:KusudaAchenbach,", - " KATemps, !- Name", - " 1.8, !- Soil Thermal Conductivity {W/m-K}", - " 920, !- Soil Density {kg/m3}", - " 2200, !- Soil Specific Heat {J/kg-K}", - " 15.5, !- Average Soil Surface Temperature {C}", - " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", - " 8; !- Phase Shift of Minimum Surface Temperature {days}", + " KATemps, !- Name", + " 1.8, !- Soil Thermal Conductivity {W/m-K}", + " 920, !- Soil Density {kg/m3}", + " 2200, !- Soil Specific Heat {J/kg-K}", + " 15.5, !- Average Soil Surface Temperature {C}", + " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", + " 8; !- Phase Shift of Minimum Surface Temperature {days}", "GroundHeatExchanger:Vertical:Properties,", - " GHE-1 Props, !- Name", - " 1, !- Depth of Top of Borehole {m}", - " 100, !- Borehole Length {m}", - " 0.109982, !- Borehole Diameter {m}", - " 0.744, !- Grout Thermal Conductivity {W/m-K}", - " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", - " 0.389, !- Pipe Thermal Conductivity {W/m-K}", - " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", - " 0.0267, !- Pipe Outer Diameter {m}", - " 0.00243, !- Pipe Thickness {m}", - " 0.04556; !- U-Tube Distance {m}", + " GHE-1 Props, !- Name", + " 1, !- Depth of Top of Borehole {m}", + " 100, !- Borehole Length {m}", + " 0.109982, !- Borehole Diameter {m}", + " 0.744, !- Grout Thermal Conductivity {W/m-K}", + " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", + " 0.389, !- Pipe Thermal Conductivity {W/m-K}", + " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", + " 0.0267, !- Pipe Outer Diameter {m}", + " 0.00243, !- Pipe Thickness {m}", + " 0.04556; !- U-Tube Distance {m}", "GroundHeatExchanger:Vertical:Array,", - " GHE-Array, !- Name", - " GHE-1 Props, !- GHE Properties", - " 2, !- Number of Boreholes in X Direction", - " 2, !- Number of Boreholes in Y Direction", - " 2; !- Borehole Spacing {m}", + " GHE-Array, !- Name", + " GHE-1 Props, !- GHE Properties", + " 2, !- Number of Boreholes in X Direction", + " 2, !- Number of Boreholes in Y Direction", + " 2; !- Borehole Spacing {m}", "GroundHeatExchanger:System,", - " Vertical GHE 1x4 Std, !- Name", - " GHLE Inlet, !- Inlet Node Name", - " GHLE Outlet, !- Outlet Node Name", - " 0.0007571, !- Design Flow Rate {m3/s}", - " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", - " KATemps, !- Undisturbed Ground Temperature Model Name", - " 2.423, !- Ground Thermal Conductivity {W/m-K}", - " 2.343E+06, !- Ground Thermal Heat Capacity {J/m3-K}", - " , !- Response Factors Object Name", - " GHE-Array; !- !- GHE Array Object Name"}); + " Vertical GHE 1x4 Std, !- Name", + " GHLE Inlet, !- Inlet Node Name", + " GHLE Outlet, !- Outlet Node Name", + " 0.0007571, !- Design Flow Rate {m3/s}", + " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", + " KATemps, !- Undisturbed Ground Temperature Model Name", + " 2.423, !- Ground Thermal Conductivity {W/m-K}", + " 2.343E+06, !- Ground Thermal Heat Capacity {J/m3-K}", + " , !- Response Factors Object Name", + " GHE-Array; !- !- GHE Array Object Name"}); ASSERT_TRUE(process_idf(idf_objects)); GetGroundHeatExchangerInput(*state); - EXPECT_EQ(1u, vertPropsVector.size()); - EXPECT_EQ(1u, vertArraysVector.size()); - EXPECT_EQ(1u, verticalGLHE.size()); + EXPECT_EQ(1u, state->dataGroundHeatExchanger->vertPropsVector.size()); + EXPECT_EQ(1u, state->dataGroundHeatExchanger->vertArraysVector.size()); + EXPECT_EQ(1u, state->dataGroundHeatExchanger->verticalGLHE.size()); - auto &thisArray(vertArraysVector[0]); - auto &thisGLHE(verticalGLHE[0]); + auto &thisArray(state->dataGroundHeatExchanger->vertArraysVector[0]); + auto &thisGLHE(state->dataGroundHeatExchanger->verticalGLHE[0]); EXPECT_EQ("VERTICAL GHE 1X4 STD", thisGLHE.name); EXPECT_EQ(true, thisGLHE.available); EXPECT_EQ(true, thisGLHE.on); EXPECT_EQ(2.423, thisGLHE.soil.k); EXPECT_EQ(2.343E6, thisGLHE.soil.rhoCp); - EXPECT_EQ(GetResponseFactor(thisArray->name), thisGLHE.myRespFactors); + EXPECT_EQ(GetResponseFactor(*state, thisArray->name), thisGLHE.myRespFactors); EXPECT_EQ(0.109982, thisGLHE.bhDiameter); EXPECT_EQ(0.109982 / 2, thisGLHE.bhRadius); EXPECT_EQ(100, thisGLHE.bhLength); @@ -797,76 +895,76 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_Given_Single_BHs_IDF_Ch { std::string const idf_objects = delimited_string({"Site:GroundTemperature:Undisturbed:KusudaAchenbach,", - " KATemps, !- Name", - " 1.8, !- Soil Thermal Conductivity {W/m-K}", - " 920, !- Soil Density {kg/m3}", - " 2200, !- Soil Specific Heat {J/kg-K}", - " 15.5, !- Average Soil Surface Temperature {C}", - " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", - " 8; !- Phase Shift of Minimum Surface Temperature {days}", + " KATemps, !- Name", + " 1.8, !- Soil Thermal Conductivity {W/m-K}", + " 920, !- Soil Density {kg/m3}", + " 2200, !- Soil Specific Heat {J/kg-K}", + " 15.5, !- Average Soil Surface Temperature {C}", + " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", + " 8; !- Phase Shift of Minimum Surface Temperature {days}", "GroundHeatExchanger:Vertical:Properties,", - " GHE-1 Props, !- Name", - " 1, !- Depth of Top of Borehole {m}", - " 100, !- Borehole Length {m}", - " 0.109982, !- Borehole Diameter {m}", - " 0.744, !- Grout Thermal Conductivity {W/m-K}", - " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", - " 0.389, !- Pipe Thermal Conductivity {W/m-K}", - " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", - " 0.0267, !- Pipe Outer Diameter {m}", - " 0.00243, !- Pipe Thickness {m}", - " 0.04556; !- U-Tube Distance {m}", + " GHE-1 Props, !- Name", + " 1, !- Depth of Top of Borehole {m}", + " 100, !- Borehole Length {m}", + " 0.109982, !- Borehole Diameter {m}", + " 0.744, !- Grout Thermal Conductivity {W/m-K}", + " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", + " 0.389, !- Pipe Thermal Conductivity {W/m-K}", + " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", + " 0.0267, !- Pipe Outer Diameter {m}", + " 0.00243, !- Pipe Thickness {m}", + " 0.04556; !- U-Tube Distance {m}", "GroundHeatExchanger:Vertical:Single,", - " GHE-1, !- Name", - " GHE-1 Props, !- GHE Properties", - " 0, !- X Location {m}", - " 0; !- Y Location {m}", + " GHE-1, !- Name", + " GHE-1 Props, !- GHE Properties", + " 0, !- X Location {m}", + " 0; !- Y Location {m}", "GroundHeatExchanger:Vertical:Single,", - " GHE-2, !- Name", - " GHE-1 Props, !- GHE Properties", - " 5.5, !- X Location {m}", - " 0; !- Y Location {m}", + " GHE-2, !- Name", + " GHE-1 Props, !- GHE Properties", + " 5.5, !- X Location {m}", + " 0; !- Y Location {m}", "GroundHeatExchanger:Vertical:Single,", - " GHE-3, !- Name", - " GHE-1 Props, !- GHE Properties", - " 0, !- X Location {m}", - " 5.5; !- Y Location {m}", + " GHE-3, !- Name", + " GHE-1 Props, !- GHE Properties", + " 0, !- X Location {m}", + " 5.5; !- Y Location {m}", "GroundHeatExchanger:Vertical:Single,", - " GHE-4, !- Name", - " GHE-1 Props, !- GHE Properties", - " 5.5, !- X Location {m}", - " 5.5; !- Y Location {m}", + " GHE-4, !- Name", + " GHE-1 Props, !- GHE Properties", + " 5.5, !- X Location {m}", + " 5.5; !- Y Location {m}", "GroundHeatExchanger:System,", - " Vertical GHE 1x4 Std, !- Name", - " GHLE Inlet, !- Inlet Node Name", - " GHLE Outlet, !- Outlet Node Name", - " 0.0007571, !- Design Flow Rate {m3/s}", - " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", - " KATemps, !- Undisturbed Ground Temperature Model Name", - " 2.423, !- Ground Thermal Conductivity {W/m-K}", - " 2.343E+06, !- Ground Thermal Heat Capacity {J/m3-K}", - " , !- Response Factors Object Name", - " , !- GHE Array Object Name", - " GHE-1, !- GHE Borehole Definition 1", - " GHE-2, !- GHE Borehole Definition 2", - " GHE-3, !- GHE Borehole Definition 3", - " GHE-4; !- GHE Borehole Definition 4"}); + " Vertical GHE 1x4 Std, !- Name", + " GHLE Inlet, !- Inlet Node Name", + " GHLE Outlet, !- Outlet Node Name", + " 0.0007571, !- Design Flow Rate {m3/s}", + " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", + " KATemps, !- Undisturbed Ground Temperature Model Name", + " 2.423, !- Ground Thermal Conductivity {W/m-K}", + " 2.343E+06, !- Ground Thermal Heat Capacity {J/m3-K}", + " , !- Response Factors Object Name", + " , !- GHE Array Object Name", + " GHE-1, !- GHE Borehole Definition 1", + " GHE-2, !- GHE Borehole Definition 2", + " GHE-3, !- GHE Borehole Definition 3", + " GHE-4; !- GHE Borehole Definition 4"}); ASSERT_TRUE(process_idf(idf_objects)); GetGroundHeatExchangerInput(*state); - EXPECT_EQ(2u, vertPropsVector.size()); - EXPECT_EQ(4u, singleBoreholesVector.size()); - EXPECT_EQ(1u, verticalGLHE.size()); + EXPECT_EQ(2u, state->dataGroundHeatExchanger->vertPropsVector.size()); + EXPECT_EQ(4u, state->dataGroundHeatExchanger->singleBoreholesVector.size()); + EXPECT_EQ(1u, state->dataGroundHeatExchanger->verticalGLHE.size()); - auto &thisGLHE(verticalGLHE[0]); + auto &thisGLHE(state->dataGroundHeatExchanger->verticalGLHE[0]); EXPECT_EQ("VERTICAL GHE 1X4 STD", thisGLHE.name); EXPECT_EQ(true, thisGLHE.available); @@ -888,290 +986,290 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_calcGFunction_Check) std::string const idf_objects = delimited_string({"Site:GroundTemperature:Undisturbed:KusudaAchenbach,", - " KATemps, !- Name", - " 1.8, !- Soil Thermal Conductivity {W/m-K}", - " 920, !- Soil Density {kg/m3}", - " 2200, !- Soil Specific Heat {J/kg-K}", - " 15.5, !- Average Soil Surface Temperature {C}", - " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", - " 8; !- Phase Shift of Minimum Surface Temperature {days}", + " KATemps, !- Name", + " 1.8, !- Soil Thermal Conductivity {W/m-K}", + " 920, !- Soil Density {kg/m3}", + " 2200, !- Soil Specific Heat {J/kg-K}", + " 15.5, !- Average Soil Surface Temperature {C}", + " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", + " 8; !- Phase Shift of Minimum Surface Temperature {days}", "GroundHeatExchanger:Vertical:Properties,", - " GHE-1 Props, !- Name", - " 1, !- Depth of Top of Borehole {m}", - " 100, !- Borehole Length {m}", - " 0.109982, !- Borehole Diameter {m}", - " 0.744, !- Grout Thermal Conductivity {W/m-K}", - " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", - " 0.389, !- Pipe Thermal Conductivity {W/m-K}", - " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", - " 0.0267, !- Pipe Outer Diameter {m}", - " 0.00243, !- Pipe Thickness {m}", - " 0.04556; !- U-Tube Distance {m}", + " GHE-1 Props, !- Name", + " 1, !- Depth of Top of Borehole {m}", + " 100, !- Borehole Length {m}", + " 0.109982, !- Borehole Diameter {m}", + " 0.744, !- Grout Thermal Conductivity {W/m-K}", + " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", + " 0.389, !- Pipe Thermal Conductivity {W/m-K}", + " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", + " 0.0267, !- Pipe Outer Diameter {m}", + " 0.00243, !- Pipe Thickness {m}", + " 0.04556; !- U-Tube Distance {m}", "GroundHeatExchanger:Vertical:Single,", - " GHE-1, !- Name", - " GHE-1 Props, !- GHE Properties", - " 0, !- X Location {m}", - " 0; !- Y Location {m}", + " GHE-1, !- Name", + " GHE-1 Props, !- GHE Properties", + " 0, !- X Location {m}", + " 0; !- Y Location {m}", "GroundHeatExchanger:Vertical:Single,", - " GHE-2, !- Name", - " GHE-1 Props, !- GHE Properties", - " 5.0, !- X Location {m}", - " 0; !- Y Location {m}", + " GHE-2, !- Name", + " GHE-1 Props, !- GHE Properties", + " 5.0, !- X Location {m}", + " 0; !- Y Location {m}", "GroundHeatExchanger:Vertical:Single,", - " GHE-3, !- Name", - " GHE-1 Props, !- GHE Properties", - " 0, !- X Location {m}", - " 5.0; !- Y Location {m}", + " GHE-3, !- Name", + " GHE-1 Props, !- GHE Properties", + " 0, !- X Location {m}", + " 5.0; !- Y Location {m}", "GroundHeatExchanger:Vertical:Single,", - " GHE-4, !- Name", - " GHE-1 Props, !- GHE Properties", - " 5.0, !- X Location {m}", - " 5.0; !- Y Location {m}", + " GHE-4, !- Name", + " GHE-1 Props, !- GHE Properties", + " 5.0, !- X Location {m}", + " 5.0; !- Y Location {m}", "GroundHeatExchanger:System,", - " Vertical GHE 1x4 Std, !- Name", - " GHLE Inlet, !- Inlet Node Name", - " GHLE Outlet, !- Outlet Node Name", - " 0.00075708, !- Design Flow Rate {m3/s}", - " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", - " KATemps, !- Undisturbed Ground Temperature Model Name", - " 2.423, !- Ground Thermal Conductivity {W/m-K}", - " 2.343E+06, !- Ground Thermal Heat Capacity {J/m3-K}", - " , !- Response Factors Object Name", - " , !- GHE Array Object Name", - " GHE-1, !- GHE Borehole Definition 1", - " GHE-2, !- GHE Borehole Definition 2", - " GHE-3, !- GHE Borehole Definition 3", - " GHE-4; !- GHE Borehole Definition 4", + " Vertical GHE 1x4 Std, !- Name", + " GHLE Inlet, !- Inlet Node Name", + " GHLE Outlet, !- Outlet Node Name", + " 0.00075708, !- Design Flow Rate {m3/s}", + " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", + " KATemps, !- Undisturbed Ground Temperature Model Name", + " 2.423, !- Ground Thermal Conductivity {W/m-K}", + " 2.343E+06, !- Ground Thermal Heat Capacity {J/m3-K}", + " , !- Response Factors Object Name", + " , !- GHE Array Object Name", + " GHE-1, !- GHE Borehole Definition 1", + " GHE-2, !- GHE Borehole Definition 2", + " GHE-3, !- GHE Borehole Definition 3", + " GHE-4; !- GHE Borehole Definition 4", "Branch,", - " Main Floor Cooling Condenser Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Coil:Cooling:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", - " Main Floor WAHP Cooling Coil, !- Component 1 Name", - " Main Floor WAHP Cooling Water Inlet Node, !- Component 1 Inlet Node Name", - " Main Floor WAHP Cooling Water Outlet Node; !- Component 1 Outlet Node Name", + " Main Floor Cooling Condenser Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Coil:Cooling:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", + " Main Floor WAHP Cooling Coil, !- Component 1 Name", + " Main Floor WAHP Cooling Water Inlet Node, !- Component 1 Inlet Node Name", + " Main Floor WAHP Cooling Water Outlet Node; !- Component 1 Outlet Node Name", "Branch,", - " Main Floor Heating Condenser Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Coil:Heating:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", - " Main Floor WAHP Heating Coil, !- Component 1 Name", - " Main Floor WAHP Heating Water Inlet Node, !- Component 1 Inlet Node Name", - " Main Floor WAHP Heating Water Outlet Node; !- Component 1 Outlet Node Name", + " Main Floor Heating Condenser Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Coil:Heating:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", + " Main Floor WAHP Heating Coil, !- Component 1 Name", + " Main Floor WAHP Heating Water Inlet Node, !- Component 1 Inlet Node Name", + " Main Floor WAHP Heating Water Outlet Node; !- Component 1 Outlet Node Name", "Branch,", - " GHE-Vert Branch, !- Name", - " , !- Pressure Drop Curve Name", - " GroundHeatExchanger:System, !- Component 1 Object Type", - " Vertical GHE 1x4 Std, !- Component 1 Name", - " GHLE Inlet, !- Component 1 Inlet Node Name", - " GHLE Outlet; !- Component 1 Outlet Node Name", + " GHE-Vert Branch, !- Name", + " , !- Pressure Drop Curve Name", + " GroundHeatExchanger:System, !- Component 1 Object Type", + " Vertical GHE 1x4 Std, !- Component 1 Name", + " GHLE Inlet, !- Component 1 Inlet Node Name", + " GHLE Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Supply Inlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pump:ConstantSpeed, !- Component 1 Object Type", - " Ground Loop Supply Pump, !- Component 1 Name", - " Ground Loop Supply Inlet,!- Component 1 Inlet Node Name", - " Ground Loop Pump Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Supply Inlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pump:ConstantSpeed, !- Component 1 Object Type", + " Ground Loop Supply Pump, !- Component 1 Name", + " Ground Loop Supply Inlet,!- Component 1 Inlet Node Name", + " Ground Loop Pump Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Supply Outlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Supply Outlet Pipe, !- Component 1 Name", - " Ground Loop Supply Outlet Pipe Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Supply Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Supply Outlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Supply Outlet Pipe, !- Component 1 Name", + " Ground Loop Supply Outlet Pipe Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Supply Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Inlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Inlet Pipe, !- Component 1 Name", - " Ground Loop Demand Inlet,!- Component 1 Inlet Node Name", - " Ground Loop Demand Inlet Pipe Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Inlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Inlet Pipe, !- Component 1 Name", + " Ground Loop Demand Inlet,!- Component 1 Inlet Node Name", + " Ground Loop Demand Inlet Pipe Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Bypass Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Side Bypass Pipe, !- Component 1 Name", - " Ground Loop Demand Bypass Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Demand Bypass Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Bypass Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Side Bypass Pipe, !- Component 1 Name", + " Ground Loop Demand Bypass Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Demand Bypass Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Outlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Outlet Pipe, !- Component 1 Name", - " Ground Loop Demand Outlet Pipe Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Demand Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Outlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Outlet Pipe, !- Component 1 Name", + " Ground Loop Demand Outlet Pipe Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Demand Outlet; !- Component 1 Outlet Node Name", "BranchList,", - " Ground Loop Supply Side Branches, !- Name", - " Ground Loop Supply Inlet Branch, !- Branch 1 Name", - " GHE-Vert Branch, !- Branch 2 Name", - " Ground Loop Supply Outlet Branch; !- Branch 3 Name", + " Ground Loop Supply Side Branches, !- Name", + " Ground Loop Supply Inlet Branch, !- Branch 1 Name", + " GHE-Vert Branch, !- Branch 2 Name", + " Ground Loop Supply Outlet Branch; !- Branch 3 Name", "BranchList,", - " Ground Loop Demand Side Branches, !- Name", - " Ground Loop Demand Inlet Branch, !- Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Branch 2 Name", - " Main Floor Heating Condenser Branch, !- Branch 3 Name", - " Ground Loop Demand Bypass Branch, !- Branch 4 Name", - " Ground Loop Demand Outlet Branch; !- Branch 5 Name", + " Ground Loop Demand Side Branches, !- Name", + " Ground Loop Demand Inlet Branch, !- Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Branch 2 Name", + " Main Floor Heating Condenser Branch, !- Branch 3 Name", + " Ground Loop Demand Bypass Branch, !- Branch 4 Name", + " Ground Loop Demand Outlet Branch; !- Branch 5 Name", "Connector:Splitter,", - " Ground Loop Supply Splitter, !- Name", - " Ground Loop Supply Inlet Branch, !- Inlet Branch Name", - " GHE-Vert Branch; !- Outlet Branch 1 Name", + " Ground Loop Supply Splitter, !- Name", + " Ground Loop Supply Inlet Branch, !- Inlet Branch Name", + " GHE-Vert Branch; !- Outlet Branch 1 Name", "Connector:Splitter,", - " Ground Loop Demand Splitter, !- Name", - " Ground Loop Demand Inlet Branch, !- Inlet Branch Name", - " Ground Loop Demand Bypass Branch, !- Outlet Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Outlet Branch 2 Name", - " Main Floor Heating Condenser Branch; !- Outlet Branch 3 Name", + " Ground Loop Demand Splitter, !- Name", + " Ground Loop Demand Inlet Branch, !- Inlet Branch Name", + " Ground Loop Demand Bypass Branch, !- Outlet Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Outlet Branch 2 Name", + " Main Floor Heating Condenser Branch; !- Outlet Branch 3 Name", "Connector:Mixer,", - " Ground Loop Supply Mixer,!- Name", - " Ground Loop Supply Outlet Branch, !- Outlet Branch Name", - " GHE-Vert Branch; !- Inlet Branch 1 Name", + " Ground Loop Supply Mixer,!- Name", + " Ground Loop Supply Outlet Branch, !- Outlet Branch Name", + " GHE-Vert Branch; !- Inlet Branch 1 Name", "Connector:Mixer,", - " Ground Loop Demand Mixer,!- Name", - " Ground Loop Demand Outlet Branch, !- Outlet Branch Name", - " Ground Loop Demand Bypass Branch, !- Inlet Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Inlet Branch 2 Name", - " Main Floor Heating Condenser Branch; !- Inlet Branch 3 Name", + " Ground Loop Demand Mixer,!- Name", + " Ground Loop Demand Outlet Branch, !- Outlet Branch Name", + " Ground Loop Demand Bypass Branch, !- Inlet Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Inlet Branch 2 Name", + " Main Floor Heating Condenser Branch; !- Inlet Branch 3 Name", "ConnectorList,", - " Ground Loop Supply Side Connectors, !- Name", - " Connector:Splitter, !- Connector 1 Object Type", - " Ground Loop Supply Splitter, !- Connector 1 Name", - " Connector:Mixer, !- Connector 2 Object Type", - " Ground Loop Supply Mixer;!- Connector 2 Name", + " Ground Loop Supply Side Connectors, !- Name", + " Connector:Splitter, !- Connector 1 Object Type", + " Ground Loop Supply Splitter, !- Connector 1 Name", + " Connector:Mixer, !- Connector 2 Object Type", + " Ground Loop Supply Mixer;!- Connector 2 Name", "ConnectorList,", - " Ground Loop Demand Side Connectors, !- Name", - " Connector:Splitter, !- Connector 1 Object Type", - " Ground Loop Demand Splitter, !- Connector 1 Name", - " Connector:Mixer, !- Connector 2 Object Type", - " Ground Loop Demand Mixer;!- Connector 2 Name", + " Ground Loop Demand Side Connectors, !- Name", + " Connector:Splitter, !- Connector 1 Object Type", + " Ground Loop Demand Splitter, !- Connector 1 Name", + " Connector:Mixer, !- Connector 2 Object Type", + " Ground Loop Demand Mixer;!- Connector 2 Name", "NodeList,", - " Ground Loop Supply Setpoint Nodes, !- Name", - " GHLE Outlet, !- Node 1 Name", - " Ground Loop Supply Outlet; !- Node 2 Name", + " Ground Loop Supply Setpoint Nodes, !- Name", + " GHLE Outlet, !- Node 1 Name", + " Ground Loop Supply Outlet; !- Node 2 Name", "OutdoorAir:Node,", - " Main Floor WAHP Outside Air Inlet, !- Name", - " -1; !- Height Above Ground {m}", + " Main Floor WAHP Outside Air Inlet, !- Name", + " -1; !- Height Above Ground {m}", "Pipe:Adiabatic,", - " Ground Loop Supply Outlet Pipe, !- Name", - " Ground Loop Supply Outlet Pipe Inlet, !- Inlet Node Name", - " Ground Loop Supply Outlet; !- Outlet Node Name", + " Ground Loop Supply Outlet Pipe, !- Name", + " Ground Loop Supply Outlet Pipe Inlet, !- Inlet Node Name", + " Ground Loop Supply Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Inlet Pipe, !- Name", - " Ground Loop Demand Inlet,!- Inlet Node Name", - " Ground Loop Demand Inlet Pipe Outlet; !- Outlet Node Name", + " Ground Loop Demand Inlet Pipe, !- Name", + " Ground Loop Demand Inlet,!- Inlet Node Name", + " Ground Loop Demand Inlet Pipe Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Side Bypass Pipe, !- Name", - " Ground Loop Demand Bypass Inlet, !- Inlet Node Name", - " Ground Loop Demand Bypass Outlet; !- Outlet Node Name", + " Ground Loop Demand Side Bypass Pipe, !- Name", + " Ground Loop Demand Bypass Inlet, !- Inlet Node Name", + " Ground Loop Demand Bypass Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Outlet Pipe, !- Name", - " Ground Loop Demand Outlet Pipe Inlet, !- Inlet Node Name", - " Ground Loop Demand Outlet; !- Outlet Node Name", + " Ground Loop Demand Outlet Pipe, !- Name", + " Ground Loop Demand Outlet Pipe Inlet, !- Inlet Node Name", + " Ground Loop Demand Outlet; !- Outlet Node Name", "Pump:ConstantSpeed,", - " Ground Loop Supply Pump, !- Name", - " Ground Loop Supply Inlet,!- Inlet Node Name", - " Ground Loop Pump Outlet, !- Outlet Node Name", - " autosize, !- Design Flow Rate {m3/s}", - " 179352, !- Design Pump Head {Pa}", - " autosize, !- Design Power Consumption {W}", - " 0.9, !- Motor Efficiency", - " 0, !- Fraction of Motor Inefficiencies to Fluid Stream", - " Intermittent; !- Pump Control Type", + " Ground Loop Supply Pump, !- Name", + " Ground Loop Supply Inlet,!- Inlet Node Name", + " Ground Loop Pump Outlet, !- Outlet Node Name", + " autosize, !- Design Flow Rate {m3/s}", + " 179352, !- Design Pump Head {Pa}", + " autosize, !- Design Power Consumption {W}", + " 0.9, !- Motor Efficiency", + " 0, !- Fraction of Motor Inefficiencies to Fluid Stream", + " Intermittent; !- Pump Control Type", "PlantLoop,", - " Ground Loop Water Loop, !- Name", - " Water, !- Fluid Type", - " , !- User Defined Fluid Type", - " Only Water Loop Operation, !- Plant Equipment Operation Scheme Name", - " Ground Loop Supply Outlet, !- Loop Temperature Setpoint Node Name", - " 100, !- Maximum Loop Temperature {C}", - " 10, !- Minimum Loop Temperature {C}", - " autosize, !- Maximum Loop Flow Rate {m3/s}", - " 0, !- Minimum Loop Flow Rate {m3/s}", - " autosize, !- Plant Loop Volume {m3}", - " Ground Loop Supply Inlet,!- Plant Side Inlet Node Name", - " Ground Loop Supply Outlet, !- Plant Side Outlet Node Name", - " Ground Loop Supply Side Branches, !- Plant Side Branch List Name", - " Ground Loop Supply Side Connectors, !- Plant Side Connector List Name", - " Ground Loop Demand Inlet,!- Demand Side Inlet Node Name", - " Ground Loop Demand Outlet, !- Demand Side Outlet Node Name", - " Ground Loop Demand Side Branches, !- Demand Side Branch List Name", - " Ground Loop Demand Side Connectors, !- Demand Side Connector List Name", - " SequentialLoad, !- Load Distribution Scheme", - " , !- Availability Manager List Name", - " DualSetPointDeadband; !- Plant Loop Demand Calculation Scheme", + " Ground Loop Water Loop, !- Name", + " Water, !- Fluid Type", + " , !- User Defined Fluid Type", + " Only Water Loop Operation, !- Plant Equipment Operation Scheme Name", + " Ground Loop Supply Outlet, !- Loop Temperature Setpoint Node Name", + " 100, !- Maximum Loop Temperature {C}", + " 10, !- Minimum Loop Temperature {C}", + " autosize, !- Maximum Loop Flow Rate {m3/s}", + " 0, !- Minimum Loop Flow Rate {m3/s}", + " autosize, !- Plant Loop Volume {m3}", + " Ground Loop Supply Inlet,!- Plant Side Inlet Node Name", + " Ground Loop Supply Outlet, !- Plant Side Outlet Node Name", + " Ground Loop Supply Side Branches, !- Plant Side Branch List Name", + " Ground Loop Supply Side Connectors, !- Plant Side Connector List Name", + " Ground Loop Demand Inlet,!- Demand Side Inlet Node Name", + " Ground Loop Demand Outlet, !- Demand Side Outlet Node Name", + " Ground Loop Demand Side Branches, !- Demand Side Branch List Name", + " Ground Loop Demand Side Connectors, !- Demand Side Connector List Name", + " SequentialLoad, !- Load Distribution Scheme", + " , !- Availability Manager List Name", + " DualSetPointDeadband; !- Plant Loop Demand Calculation Scheme", "PlantEquipmentList,", - " Only Water Loop All Cooling Equipment, !- Name", - " GroundHeatExchanger:System, !- Equipment 1 Object Type", - " Vertical GHE 1x4 Std; !- Equipment 1 Name", + " Only Water Loop All Cooling Equipment, !- Name", + " GroundHeatExchanger:System, !- Equipment 1 Object Type", + " Vertical GHE 1x4 Std; !- Equipment 1 Name", "PlantEquipmentOperation:CoolingLoad,", - " Only Water Loop Cool Operation All Hours, !- Name", - " 0, !- Load Range 1 Lower Limit {W}", - " 1000000000000000, !- Load Range 1 Upper Limit {W}", - " Only Water Loop All Cooling Equipment; !- Range 1 Equipment List Name", + " Only Water Loop Cool Operation All Hours, !- Name", + " 0, !- Load Range 1 Lower Limit {W}", + " 1000000000000000, !- Load Range 1 Upper Limit {W}", + " Only Water Loop All Cooling Equipment; !- Range 1 Equipment List Name", "PlantEquipmentOperationSchemes,", - " Only Water Loop Operation, !- Name", - " PlantEquipmentOperation:CoolingLoad, !- Control Scheme 1 Object Type", - " Only Water Loop Cool Operation All Hours, !- Control Scheme 1 Name", - " HVACTemplate-Always 1; !- Control Scheme 1 Schedule Name", + " Only Water Loop Operation, !- Name", + " PlantEquipmentOperation:CoolingLoad, !- Control Scheme 1 Object Type", + " Only Water Loop Cool Operation All Hours, !- Control Scheme 1 Name", + " HVACTemplate-Always 1; !- Control Scheme 1 Schedule Name", "SetpointManager:Scheduled:DualSetpoint,", - " Ground Loop Temp Manager,!- Name", - " Temperature, !- Control Variable", - " HVACTemplate-Always 34, !- High Setpoint Schedule Name", - " HVACTemplate-Always 20, !- Low Setpoint Schedule Name", - " Ground Loop Supply Setpoint Nodes; !- Setpoint Node or NodeList Name", + " Ground Loop Temp Manager,!- Name", + " Temperature, !- Control Variable", + " HVACTemplate-Always 34, !- High Setpoint Schedule Name", + " HVACTemplate-Always 20, !- Low Setpoint Schedule Name", + " Ground Loop Supply Setpoint Nodes; !- Setpoint Node or NodeList Name", "Schedule:Compact,", - " HVACTemplate-Always 4, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,4; !- Field 3", + " HVACTemplate-Always 4, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,4; !- Field 3", "Schedule:Compact,", - " HVACTemplate-Always 34, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,34; !- Field 3", + " HVACTemplate-Always 34, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,34; !- Field 3", "Schedule:Compact,", - " HVACTemplate-Always 20, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,20; !- Field 3"}); + " HVACTemplate-Always 20, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,20; !- Field 3"}); // Envr variable DisableGLHECaching = true; @@ -1185,7 +1283,7 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_calcGFunction_Check) SetupInitialPlantCallingOrder(*state); SetupBranchControlTypes(*state); - auto &thisGLHE(verticalGLHE[0]); + auto &thisGLHE(state->dataGroundHeatExchanger->verticalGLHE[0]); thisGLHE.loopNum = 1; Node(thisGLHE.inletNodeNum).Temp = 20; thisGLHE.designFlow = 0.00075708; @@ -1241,45 +1339,45 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_calc_pipe_conduction_re std::string const idf_objects = delimited_string({"Site:GroundTemperature:Undisturbed:KusudaAchenbach,", - " KATemps, !- Name", - " 1.8, !- Soil Thermal Conductivity {W/m-K}", - " 920, !- Soil Density {kg/m3}", - " 2200, !- Soil Specific Heat {J/kg-K}", - " 15.5, !- Average Soil Surface Temperature {C}", - " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", - " 8; !- Phase Shift of Minimum Surface Temperature {days}", + " KATemps, !- Name", + " 1.8, !- Soil Thermal Conductivity {W/m-K}", + " 920, !- Soil Density {kg/m3}", + " 2200, !- Soil Specific Heat {J/kg-K}", + " 15.5, !- Average Soil Surface Temperature {C}", + " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", + " 8; !- Phase Shift of Minimum Surface Temperature {days}", "GroundHeatExchanger:Vertical:Properties,", - " GHE-1 Props, !- Name", - " 1, !- Depth of Top of Borehole {m}", - " 100, !- Borehole Length {m}", - " 0.109982, !- Borehole Diameter {m}", - " 0.744, !- Grout Thermal Conductivity {W/m-K}", - " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", - " 0.389, !- Pipe Thermal Conductivity {W/m-K}", - " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", - " 0.0267, !- Pipe Outer Diameter {m}", - " 0.00243, !- Pipe Thickness {m}", - " 0.04556; !- U-Tube Distance {m}", + " GHE-1 Props, !- Name", + " 1, !- Depth of Top of Borehole {m}", + " 100, !- Borehole Length {m}", + " 0.109982, !- Borehole Diameter {m}", + " 0.744, !- Grout Thermal Conductivity {W/m-K}", + " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", + " 0.389, !- Pipe Thermal Conductivity {W/m-K}", + " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", + " 0.0267, !- Pipe Outer Diameter {m}", + " 0.00243, !- Pipe Thickness {m}", + " 0.04556; !- U-Tube Distance {m}", "GroundHeatExchanger:Vertical:Array,", - " GHE-Array, !- Name", - " GHE-1 Props, !- GHE Properties", - " 2, !- Number of Boreholes in X Direction", - " 2, !- Number of Boreholes in Y Direction", - " 2; !- Borehole Spacing {m}", + " GHE-Array, !- Name", + " GHE-1 Props, !- GHE Properties", + " 2, !- Number of Boreholes in X Direction", + " 2, !- Number of Boreholes in Y Direction", + " 2; !- Borehole Spacing {m}", "GroundHeatExchanger:System,", - " Vertical GHE 1x4 Std, !- Name", - " GHLE Inlet, !- Inlet Node Name", - " GHLE Outlet, !- Outlet Node Name", - " 0.0007571, !- Design Flow Rate {m3/s}", - " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", - " KATemps, !- Undisturbed Ground Temperature Model Name", - " 2.423, !- Ground Thermal Conductivity {W/m-K}", - " 2.343E+06, !- Ground Thermal Heat Capacity {J/m3-K}", - " , !- Response Factors Object Name", - " GHE-Array; !- GHE Array Object Name"}); + " Vertical GHE 1x4 Std, !- Name", + " GHLE Inlet, !- Inlet Node Name", + " GHLE Outlet, !- Outlet Node Name", + " 0.0007571, !- Design Flow Rate {m3/s}", + " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", + " KATemps, !- Undisturbed Ground Temperature Model Name", + " 2.423, !- Ground Thermal Conductivity {W/m-K}", + " 2.343E+06, !- Ground Thermal Heat Capacity {J/m3-K}", + " , !- Response Factors Object Name", + " GHE-Array; !- GHE Array Object Name"}); DisableGLHECaching = true; @@ -1287,7 +1385,7 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_calc_pipe_conduction_re GetGroundHeatExchangerInput(*state); - auto &thisGLHE(verticalGLHE[0]); + auto &thisGLHE(state->dataGroundHeatExchanger->verticalGLHE[0]); Real64 const tolerance = 0.00001; @@ -1300,45 +1398,45 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_friction_factor) std::string const idf_objects = delimited_string({"Site:GroundTemperature:Undisturbed:KusudaAchenbach,", - " KATemps, !- Name", - " 1.8, !- Soil Thermal Conductivity {W/m-K}", - " 920, !- Soil Density {kg/m3}", - " 2200, !- Soil Specific Heat {J/kg-K}", - " 15.5, !- Average Soil Surface Temperature {C}", - " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", - " 8; !- Phase Shift of Minimum Surface Temperature {days}", + " KATemps, !- Name", + " 1.8, !- Soil Thermal Conductivity {W/m-K}", + " 920, !- Soil Density {kg/m3}", + " 2200, !- Soil Specific Heat {J/kg-K}", + " 15.5, !- Average Soil Surface Temperature {C}", + " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", + " 8; !- Phase Shift of Minimum Surface Temperature {days}", "GroundHeatExchanger:Vertical:Properties,", - " GHE-1 Props, !- Name", - " 1, !- Depth of Top of Borehole {m}", - " 100, !- Borehole Length {m}", - " 0.109982, !- Borehole Diameter {m}", - " 0.744, !- Grout Thermal Conductivity {W/m-K}", - " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", - " 0.389, !- Pipe Thermal Conductivity {W/m-K}", - " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", - " 0.0267, !- Pipe Outer Diameter {m}", - " 0.00243, !- Pipe Thickness {m}", - " 0.04556; !- U-Tube Distance {m}", + " GHE-1 Props, !- Name", + " 1, !- Depth of Top of Borehole {m}", + " 100, !- Borehole Length {m}", + " 0.109982, !- Borehole Diameter {m}", + " 0.744, !- Grout Thermal Conductivity {W/m-K}", + " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", + " 0.389, !- Pipe Thermal Conductivity {W/m-K}", + " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", + " 0.0267, !- Pipe Outer Diameter {m}", + " 0.00243, !- Pipe Thickness {m}", + " 0.04556; !- U-Tube Distance {m}", "GroundHeatExchanger:Vertical:Array,", - " GHE-Array, !- Name", - " GHE-1 Props, !- GHE Properties", - " 2, !- Number of Boreholes in X Direction", - " 2, !- Number of Boreholes in Y Direction", - " 2; !- Borehole Spacing {m}", + " GHE-Array, !- Name", + " GHE-1 Props, !- GHE Properties", + " 2, !- Number of Boreholes in X Direction", + " 2, !- Number of Boreholes in Y Direction", + " 2; !- Borehole Spacing {m}", "GroundHeatExchanger:System,", - " Vertical GHE 1x4 Std, !- Name", - " GHLE Inlet, !- Inlet Node Name", - " GHLE Outlet, !- Outlet Node Name", - " 0.0007571, !- Design Flow Rate {m3/s}", - " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", - " KATemps, !- Undisturbed Ground Temperature Model Name", - " 2.423, !- Ground Thermal Conductivity {W/m-K}", - " 2.343E+06, !- Ground Thermal Heat Capacity {J/m3-K}", - " , !- Response Factors Object Name", - " GHE-Array; !- GHE Array Object Name"}); + " Vertical GHE 1x4 Std, !- Name", + " GHLE Inlet, !- Inlet Node Name", + " GHLE Outlet, !- Outlet Node Name", + " 0.0007571, !- Design Flow Rate {m3/s}", + " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", + " KATemps, !- Undisturbed Ground Temperature Model Name", + " 2.423, !- Ground Thermal Conductivity {W/m-K}", + " 2.343E+06, !- Ground Thermal Heat Capacity {J/m3-K}", + " , !- Response Factors Object Name", + " GHE-Array; !- GHE Array Object Name"}); // Envr variable DisableGLHECaching = true; @@ -1348,9 +1446,9 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_friction_factor) GetGroundHeatExchangerInput(*state); - auto &thisGLHE(verticalGLHE[0]); + auto &thisGLHE(state->dataGroundHeatExchanger->verticalGLHE[0]); - Real64 reynoldsNum = 0; + Real64 reynoldsNum; Real64 const tolerance = 0.000001; @@ -1391,269 +1489,269 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_calc_pipe_convection_re std::string const idf_objects = delimited_string({"Site:GroundTemperature:Undisturbed:KusudaAchenbach,", - " KATemps, !- Name", - " 1.8, !- Soil Thermal Conductivity {W/m-K}", - " 920, !- Soil Density {kg/m3}", - " 2200, !- Soil Specific Heat {J/kg-K}", - " 15.5, !- Average Soil Surface Temperature {C}", - " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", - " 8; !- Phase Shift of Minimum Surface Temperature {days}", + " KATemps, !- Name", + " 1.8, !- Soil Thermal Conductivity {W/m-K}", + " 920, !- Soil Density {kg/m3}", + " 2200, !- Soil Specific Heat {J/kg-K}", + " 15.5, !- Average Soil Surface Temperature {C}", + " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", + " 8; !- Phase Shift of Minimum Surface Temperature {days}", "GroundHeatExchanger:Vertical:Properties,", - " GHE-1 Props, !- Name", - " 1, !- Depth of Top of Borehole {m}", - " 100, !- Borehole Length {m}", - " 0.109982, !- Borehole Diameter {m}", - " 0.744, !- Grout Thermal Conductivity {W/m-K}", - " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", - " 0.389, !- Pipe Thermal Conductivity {W/m-K}", - " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", - " 0.0267, !- Pipe Outer Diameter {m}", - " 0.00243, !- Pipe Thickness {m}", - " 0.04556; !- U-Tube Distance {m}", + " GHE-1 Props, !- Name", + " 1, !- Depth of Top of Borehole {m}", + " 100, !- Borehole Length {m}", + " 0.109982, !- Borehole Diameter {m}", + " 0.744, !- Grout Thermal Conductivity {W/m-K}", + " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", + " 0.389, !- Pipe Thermal Conductivity {W/m-K}", + " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", + " 0.0267, !- Pipe Outer Diameter {m}", + " 0.00243, !- Pipe Thickness {m}", + " 0.04556; !- U-Tube Distance {m}", "GroundHeatExchanger:Vertical:Array,", - " GHE-Array, !- Name", - " GHE-1 Props, !- GHE Properties", - " 2, !- Number of Boreholes in X Direction", - " 2, !- Number of Boreholes in Y Direction", - " 2; !- Borehole Spacing {m}", + " GHE-Array, !- Name", + " GHE-1 Props, !- GHE Properties", + " 2, !- Number of Boreholes in X Direction", + " 2, !- Number of Boreholes in Y Direction", + " 2; !- Borehole Spacing {m}", "GroundHeatExchanger:System,", - " Vertical GHE 1x4 Std, !- Name", - " GHLE Inlet, !- Inlet Node Name", - " GHLE Outlet, !- Outlet Node Name", - " 0.0007571, !- Design Flow Rate {m3/s}", - " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", - " KATemps, !- Undisturbed Ground Temperature Model Name", - " 2.423, !- Ground Thermal Conductivity {W/m-K}", - " 2.343E+06, !- Ground Thermal Heat Capacity {J/m3-K}", - " , !- Response Factors Object Name", - " GHE-Array; !- GHE Array Object Name", + " Vertical GHE 1x4 Std, !- Name", + " GHLE Inlet, !- Inlet Node Name", + " GHLE Outlet, !- Outlet Node Name", + " 0.0007571, !- Design Flow Rate {m3/s}", + " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", + " KATemps, !- Undisturbed Ground Temperature Model Name", + " 2.423, !- Ground Thermal Conductivity {W/m-K}", + " 2.343E+06, !- Ground Thermal Heat Capacity {J/m3-K}", + " , !- Response Factors Object Name", + " GHE-Array; !- GHE Array Object Name", "Branch,", - " Main Floor Cooling Condenser Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Coil:Cooling:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", - " Main Floor WAHP Cooling Coil, !- Component 1 Name", - " Main Floor WAHP Cooling Water Inlet Node, !- Component 1 Inlet Node Name", - " Main Floor WAHP Cooling Water Outlet Node; !- Component 1 Outlet Node Name", + " Main Floor Cooling Condenser Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Coil:Cooling:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", + " Main Floor WAHP Cooling Coil, !- Component 1 Name", + " Main Floor WAHP Cooling Water Inlet Node, !- Component 1 Inlet Node Name", + " Main Floor WAHP Cooling Water Outlet Node; !- Component 1 Outlet Node Name", "Branch,", - " Main Floor Heating Condenser Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Coil:Heating:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", - " Main Floor WAHP Heating Coil, !- Component 1 Name", - " Main Floor WAHP Heating Water Inlet Node, !- Component 1 Inlet Node Name", - " Main Floor WAHP Heating Water Outlet Node; !- Component 1 Outlet Node Name", + " Main Floor Heating Condenser Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Coil:Heating:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", + " Main Floor WAHP Heating Coil, !- Component 1 Name", + " Main Floor WAHP Heating Water Inlet Node, !- Component 1 Inlet Node Name", + " Main Floor WAHP Heating Water Outlet Node; !- Component 1 Outlet Node Name", "Branch,", - " GHE-Vert Branch, !- Name", - " , !- Pressure Drop Curve Name", - " GroundHeatExchanger:System, !- Component 1 Object Type", - " Vertical GHE 1x4 Std, !- Component 1 Name", - " GHLE Inlet, !- Component 1 Inlet Node Name", - " GHLE Outlet; !- Component 1 Outlet Node Name", + " GHE-Vert Branch, !- Name", + " , !- Pressure Drop Curve Name", + " GroundHeatExchanger:System, !- Component 1 Object Type", + " Vertical GHE 1x4 Std, !- Component 1 Name", + " GHLE Inlet, !- Component 1 Inlet Node Name", + " GHLE Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Supply Inlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pump:ConstantSpeed, !- Component 1 Object Type", - " Ground Loop Supply Pump, !- Component 1 Name", - " Ground Loop Supply Inlet,!- Component 1 Inlet Node Name", - " Ground Loop Pump Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Supply Inlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pump:ConstantSpeed, !- Component 1 Object Type", + " Ground Loop Supply Pump, !- Component 1 Name", + " Ground Loop Supply Inlet,!- Component 1 Inlet Node Name", + " Ground Loop Pump Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Supply Outlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Supply Outlet Pipe, !- Component 1 Name", - " Ground Loop Supply Outlet Pipe Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Supply Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Supply Outlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Supply Outlet Pipe, !- Component 1 Name", + " Ground Loop Supply Outlet Pipe Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Supply Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Inlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Inlet Pipe, !- Component 1 Name", - " Ground Loop Demand Inlet,!- Component 1 Inlet Node Name", - " Ground Loop Demand Inlet Pipe Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Inlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Inlet Pipe, !- Component 1 Name", + " Ground Loop Demand Inlet,!- Component 1 Inlet Node Name", + " Ground Loop Demand Inlet Pipe Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Bypass Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Side Bypass Pipe, !- Component 1 Name", - " Ground Loop Demand Bypass Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Demand Bypass Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Bypass Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Side Bypass Pipe, !- Component 1 Name", + " Ground Loop Demand Bypass Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Demand Bypass Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Outlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Outlet Pipe, !- Component 1 Name", - " Ground Loop Demand Outlet Pipe Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Demand Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Outlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Outlet Pipe, !- Component 1 Name", + " Ground Loop Demand Outlet Pipe Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Demand Outlet; !- Component 1 Outlet Node Name", "BranchList,", - " Ground Loop Supply Side Branches, !- Name", - " Ground Loop Supply Inlet Branch, !- Branch 1 Name", - " GHE-Vert Branch, !- Branch 2 Name", - " Ground Loop Supply Outlet Branch; !- Branch 3 Name", + " Ground Loop Supply Side Branches, !- Name", + " Ground Loop Supply Inlet Branch, !- Branch 1 Name", + " GHE-Vert Branch, !- Branch 2 Name", + " Ground Loop Supply Outlet Branch; !- Branch 3 Name", "BranchList,", - " Ground Loop Demand Side Branches, !- Name", - " Ground Loop Demand Inlet Branch, !- Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Branch 2 Name", - " Main Floor Heating Condenser Branch, !- Branch 3 Name", - " Ground Loop Demand Bypass Branch, !- Branch 4 Name", - " Ground Loop Demand Outlet Branch; !- Branch 5 Name", + " Ground Loop Demand Side Branches, !- Name", + " Ground Loop Demand Inlet Branch, !- Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Branch 2 Name", + " Main Floor Heating Condenser Branch, !- Branch 3 Name", + " Ground Loop Demand Bypass Branch, !- Branch 4 Name", + " Ground Loop Demand Outlet Branch; !- Branch 5 Name", "Connector:Splitter,", - " Ground Loop Supply Splitter, !- Name", - " Ground Loop Supply Inlet Branch, !- Inlet Branch Name", - " GHE-Vert Branch; !- Outlet Branch 1 Name", + " Ground Loop Supply Splitter, !- Name", + " Ground Loop Supply Inlet Branch, !- Inlet Branch Name", + " GHE-Vert Branch; !- Outlet Branch 1 Name", "Connector:Splitter,", - " Ground Loop Demand Splitter, !- Name", - " Ground Loop Demand Inlet Branch, !- Inlet Branch Name", - " Ground Loop Demand Bypass Branch, !- Outlet Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Outlet Branch 2 Name", - " Main Floor Heating Condenser Branch; !- Outlet Branch 3 Name", + " Ground Loop Demand Splitter, !- Name", + " Ground Loop Demand Inlet Branch, !- Inlet Branch Name", + " Ground Loop Demand Bypass Branch, !- Outlet Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Outlet Branch 2 Name", + " Main Floor Heating Condenser Branch; !- Outlet Branch 3 Name", "Connector:Mixer,", - " Ground Loop Supply Mixer,!- Name", - " Ground Loop Supply Outlet Branch, !- Outlet Branch Name", - " GHE-Vert Branch; !- Inlet Branch 1 Name", + " Ground Loop Supply Mixer,!- Name", + " Ground Loop Supply Outlet Branch, !- Outlet Branch Name", + " GHE-Vert Branch; !- Inlet Branch 1 Name", "Connector:Mixer,", - " Ground Loop Demand Mixer,!- Name", - " Ground Loop Demand Outlet Branch, !- Outlet Branch Name", - " Ground Loop Demand Bypass Branch, !- Inlet Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Inlet Branch 2 Name", - " Main Floor Heating Condenser Branch; !- Inlet Branch 3 Name", + " Ground Loop Demand Mixer,!- Name", + " Ground Loop Demand Outlet Branch, !- Outlet Branch Name", + " Ground Loop Demand Bypass Branch, !- Inlet Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Inlet Branch 2 Name", + " Main Floor Heating Condenser Branch; !- Inlet Branch 3 Name", "ConnectorList,", - " Ground Loop Supply Side Connectors, !- Name", - " Connector:Splitter, !- Connector 1 Object Type", - " Ground Loop Supply Splitter, !- Connector 1 Name", - " Connector:Mixer, !- Connector 2 Object Type", - " Ground Loop Supply Mixer;!- Connector 2 Name", + " Ground Loop Supply Side Connectors, !- Name", + " Connector:Splitter, !- Connector 1 Object Type", + " Ground Loop Supply Splitter, !- Connector 1 Name", + " Connector:Mixer, !- Connector 2 Object Type", + " Ground Loop Supply Mixer;!- Connector 2 Name", "ConnectorList,", - " Ground Loop Demand Side Connectors, !- Name", - " Connector:Splitter, !- Connector 1 Object Type", - " Ground Loop Demand Splitter, !- Connector 1 Name", - " Connector:Mixer, !- Connector 2 Object Type", - " Ground Loop Demand Mixer;!- Connector 2 Name", + " Ground Loop Demand Side Connectors, !- Name", + " Connector:Splitter, !- Connector 1 Object Type", + " Ground Loop Demand Splitter, !- Connector 1 Name", + " Connector:Mixer, !- Connector 2 Object Type", + " Ground Loop Demand Mixer;!- Connector 2 Name", "NodeList,", - " Ground Loop Supply Setpoint Nodes, !- Name", - " GHLE Outlet, !- Node 1 Name", - " Ground Loop Supply Outlet; !- Node 2 Name", + " Ground Loop Supply Setpoint Nodes, !- Name", + " GHLE Outlet, !- Node 1 Name", + " Ground Loop Supply Outlet; !- Node 2 Name", "OutdoorAir:Node,", - " Main Floor WAHP Outside Air Inlet, !- Name", - " -1; !- Height Above Ground {m}", + " Main Floor WAHP Outside Air Inlet, !- Name", + " -1; !- Height Above Ground {m}", "Pipe:Adiabatic,", - " Ground Loop Supply Outlet Pipe, !- Name", - " Ground Loop Supply Outlet Pipe Inlet, !- Inlet Node Name", - " Ground Loop Supply Outlet; !- Outlet Node Name", + " Ground Loop Supply Outlet Pipe, !- Name", + " Ground Loop Supply Outlet Pipe Inlet, !- Inlet Node Name", + " Ground Loop Supply Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Inlet Pipe, !- Name", - " Ground Loop Demand Inlet,!- Inlet Node Name", - " Ground Loop Demand Inlet Pipe Outlet; !- Outlet Node Name", + " Ground Loop Demand Inlet Pipe, !- Name", + " Ground Loop Demand Inlet,!- Inlet Node Name", + " Ground Loop Demand Inlet Pipe Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Side Bypass Pipe, !- Name", - " Ground Loop Demand Bypass Inlet, !- Inlet Node Name", - " Ground Loop Demand Bypass Outlet; !- Outlet Node Name", + " Ground Loop Demand Side Bypass Pipe, !- Name", + " Ground Loop Demand Bypass Inlet, !- Inlet Node Name", + " Ground Loop Demand Bypass Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Outlet Pipe, !- Name", - " Ground Loop Demand Outlet Pipe Inlet, !- Inlet Node Name", - " Ground Loop Demand Outlet; !- Outlet Node Name", + " Ground Loop Demand Outlet Pipe, !- Name", + " Ground Loop Demand Outlet Pipe Inlet, !- Inlet Node Name", + " Ground Loop Demand Outlet; !- Outlet Node Name", "Pump:ConstantSpeed,", - " Ground Loop Supply Pump, !- Name", - " Ground Loop Supply Inlet,!- Inlet Node Name", - " Ground Loop Pump Outlet, !- Outlet Node Name", - " autosize, !- Design Flow Rate {m3/s}", - " 179352, !- Design Pump Head {Pa}", - " autosize, !- Design Power Consumption {W}", - " 0.9, !- Motor Efficiency", - " 0, !- Fraction of Motor Inefficiencies to Fluid Stream", - " Intermittent; !- Pump Control Type", + " Ground Loop Supply Pump, !- Name", + " Ground Loop Supply Inlet,!- Inlet Node Name", + " Ground Loop Pump Outlet, !- Outlet Node Name", + " autosize, !- Design Flow Rate {m3/s}", + " 179352, !- Design Pump Head {Pa}", + " autosize, !- Design Power Consumption {W}", + " 0.9, !- Motor Efficiency", + " 0, !- Fraction of Motor Inefficiencies to Fluid Stream", + " Intermittent; !- Pump Control Type", "PlantLoop,", - " Ground Loop Water Loop, !- Name", - " Water, !- Fluid Type", - " , !- User Defined Fluid Type", - " Only Water Loop Operation, !- Plant Equipment Operation Scheme Name", - " Ground Loop Supply Outlet, !- Loop Temperature Setpoint Node Name", - " 100, !- Maximum Loop Temperature {C}", - " 10, !- Minimum Loop Temperature {C}", - " autosize, !- Maximum Loop Flow Rate {m3/s}", - " 0, !- Minimum Loop Flow Rate {m3/s}", - " autosize, !- Plant Loop Volume {m3}", - " Ground Loop Supply Inlet,!- Plant Side Inlet Node Name", - " Ground Loop Supply Outlet, !- Plant Side Outlet Node Name", - " Ground Loop Supply Side Branches, !- Plant Side Branch List Name", - " Ground Loop Supply Side Connectors, !- Plant Side Connector List Name", - " Ground Loop Demand Inlet,!- Demand Side Inlet Node Name", - " Ground Loop Demand Outlet, !- Demand Side Outlet Node Name", - " Ground Loop Demand Side Branches, !- Demand Side Branch List Name", - " Ground Loop Demand Side Connectors, !- Demand Side Connector List Name", - " SequentialLoad, !- Load Distribution Scheme", - " , !- Availability Manager List Name", - " DualSetPointDeadband; !- Plant Loop Demand Calculation Scheme", + " Ground Loop Water Loop, !- Name", + " Water, !- Fluid Type", + " , !- User Defined Fluid Type", + " Only Water Loop Operation, !- Plant Equipment Operation Scheme Name", + " Ground Loop Supply Outlet, !- Loop Temperature Setpoint Node Name", + " 100, !- Maximum Loop Temperature {C}", + " 10, !- Minimum Loop Temperature {C}", + " autosize, !- Maximum Loop Flow Rate {m3/s}", + " 0, !- Minimum Loop Flow Rate {m3/s}", + " autosize, !- Plant Loop Volume {m3}", + " Ground Loop Supply Inlet,!- Plant Side Inlet Node Name", + " Ground Loop Supply Outlet, !- Plant Side Outlet Node Name", + " Ground Loop Supply Side Branches, !- Plant Side Branch List Name", + " Ground Loop Supply Side Connectors, !- Plant Side Connector List Name", + " Ground Loop Demand Inlet,!- Demand Side Inlet Node Name", + " Ground Loop Demand Outlet, !- Demand Side Outlet Node Name", + " Ground Loop Demand Side Branches, !- Demand Side Branch List Name", + " Ground Loop Demand Side Connectors, !- Demand Side Connector List Name", + " SequentialLoad, !- Load Distribution Scheme", + " , !- Availability Manager List Name", + " DualSetPointDeadband; !- Plant Loop Demand Calculation Scheme", "PlantEquipmentList,", - " Only Water Loop All Cooling Equipment, !- Name", - " GroundHeatExchanger:System, !- Equipment 1 Object Type", - " Vertical GHE 1x4 Std; !- Equipment 1 Name", + " Only Water Loop All Cooling Equipment, !- Name", + " GroundHeatExchanger:System, !- Equipment 1 Object Type", + " Vertical GHE 1x4 Std; !- Equipment 1 Name", "PlantEquipmentOperation:CoolingLoad,", - " Only Water Loop Cool Operation All Hours, !- Name", - " 0, !- Load Range 1 Lower Limit {W}", - " 1000000000000000, !- Load Range 1 Upper Limit {W}", - " Only Water Loop All Cooling Equipment; !- Range 1 Equipment List Name", + " Only Water Loop Cool Operation All Hours, !- Name", + " 0, !- Load Range 1 Lower Limit {W}", + " 1000000000000000, !- Load Range 1 Upper Limit {W}", + " Only Water Loop All Cooling Equipment; !- Range 1 Equipment List Name", "PlantEquipmentOperationSchemes,", - " Only Water Loop Operation, !- Name", - " PlantEquipmentOperation:CoolingLoad, !- Control Scheme 1 Object Type", - " Only Water Loop Cool Operation All Hours, !- Control Scheme 1 Name", - " HVACTemplate-Always 1; !- Control Scheme 1 Schedule Name", + " Only Water Loop Operation, !- Name", + " PlantEquipmentOperation:CoolingLoad, !- Control Scheme 1 Object Type", + " Only Water Loop Cool Operation All Hours, !- Control Scheme 1 Name", + " HVACTemplate-Always 1; !- Control Scheme 1 Schedule Name", "SetpointManager:Scheduled:DualSetpoint,", - " Ground Loop Temp Manager,!- Name", - " Temperature, !- Control Variable", - " HVACTemplate-Always 34, !- High Setpoint Schedule Name", - " HVACTemplate-Always 20, !- Low Setpoint Schedule Name", - " Ground Loop Supply Setpoint Nodes; !- Setpoint Node or NodeList Name", + " Ground Loop Temp Manager,!- Name", + " Temperature, !- Control Variable", + " HVACTemplate-Always 34, !- High Setpoint Schedule Name", + " HVACTemplate-Always 20, !- Low Setpoint Schedule Name", + " Ground Loop Supply Setpoint Nodes; !- Setpoint Node or NodeList Name", "Schedule:Compact,", - " HVACTemplate-Always 4, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,4; !- Field 3", + " HVACTemplate-Always 4, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,4; !- Field 3", "Schedule:Compact,", - " HVACTemplate-Always 34, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,34; !- Field 3", + " HVACTemplate-Always 34, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,34; !- Field 3", "Schedule:Compact,", - " HVACTemplate-Always 20, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,20; !- Field 3"}); + " HVACTemplate-Always 20, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,20; !- Field 3"}); // Envr variable DisableGLHECaching = true; @@ -1667,7 +1765,7 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_calc_pipe_convection_re SetupInitialPlantCallingOrder(*state); SetupBranchControlTypes(*state); - auto &thisGLHE(verticalGLHE[0]); + auto &thisGLHE(state->dataGroundHeatExchanger->verticalGLHE[0]); thisGLHE.loopNum = 1; Node(thisGLHE.inletNodeNum).Temp = 13.0; thisGLHE.designFlow = 0.000303 * 4; @@ -1695,269 +1793,269 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_calc_pipe_resistance) std::string const idf_objects = delimited_string({"Site:GroundTemperature:Undisturbed:KusudaAchenbach,", - " KATemps, !- Name", - " 1.8, !- Soil Thermal Conductivity {W/m-K}", - " 920, !- Soil Density {kg/m3}", - " 2200, !- Soil Specific Heat {J/kg-K}", - " 15.5, !- Average Soil Surface Temperature {C}", - " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", - " 8; !- Phase Shift of Minimum Surface Temperature {days}", + " KATemps, !- Name", + " 1.8, !- Soil Thermal Conductivity {W/m-K}", + " 920, !- Soil Density {kg/m3}", + " 2200, !- Soil Specific Heat {J/kg-K}", + " 15.5, !- Average Soil Surface Temperature {C}", + " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", + " 8; !- Phase Shift of Minimum Surface Temperature {days}", "GroundHeatExchanger:Vertical:Properties,", - " GHE-1 Props, !- Name", - " 1, !- Depth of Top of Borehole {m}", - " 100, !- Borehole Length {m}", - " 0.109982, !- Borehole Diameter {m}", - " 0.744, !- Grout Thermal Conductivity {W/m-K}", - " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", - " 0.389, !- Pipe Thermal Conductivity {W/m-K}", - " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", - " 0.0267, !- Pipe Outer Diameter {m}", - " 0.00243, !- Pipe Thickness {m}", - " 0.04556; !- U-Tube Distance {m}", + " GHE-1 Props, !- Name", + " 1, !- Depth of Top of Borehole {m}", + " 100, !- Borehole Length {m}", + " 0.109982, !- Borehole Diameter {m}", + " 0.744, !- Grout Thermal Conductivity {W/m-K}", + " 3.90E+06, !- Grout Thermal Heat Capacity {J/m3-K}", + " 0.389, !- Pipe Thermal Conductivity {W/m-K}", + " 1.77E+06, !- Pipe Thermal Heat Capacity {J/m3-K}", + " 0.0267, !- Pipe Outer Diameter {m}", + " 0.00243, !- Pipe Thickness {m}", + " 0.04556; !- U-Tube Distance {m}", "GroundHeatExchanger:Vertical:Array,", - " GHE-Array, !- Name", - " GHE-1 Props, !- GHE Properties", - " 2, !- Number of Boreholes in X Direction", - " 2, !- Number of Boreholes in Y Direction", - " 2; !- Borehole Spacing {m}", + " GHE-Array, !- Name", + " GHE-1 Props, !- GHE Properties", + " 2, !- Number of Boreholes in X Direction", + " 2, !- Number of Boreholes in Y Direction", + " 2; !- Borehole Spacing {m}", "GroundHeatExchanger:System,", - " Vertical GHE 1x4 Std, !- Name", - " GHLE Inlet, !- Inlet Node Name", - " GHLE Outlet, !- Outlet Node Name", - " 0.0007571, !- Design Flow Rate {m3/s}", - " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", - " KATemps, !- Undisturbed Ground Temperature Model Name", - " 2.423, !- Ground Thermal Conductivity {W/m-K}", - " 2.343E+06, !- Ground Thermal Heat Capacity {J/m3-K}", - " , !- Response Factors Object Name", - " GHE-Array; !- GHE Array Object Name", + " Vertical GHE 1x4 Std, !- Name", + " GHLE Inlet, !- Inlet Node Name", + " GHLE Outlet, !- Outlet Node Name", + " 0.0007571, !- Design Flow Rate {m3/s}", + " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", + " KATemps, !- Undisturbed Ground Temperature Model Name", + " 2.423, !- Ground Thermal Conductivity {W/m-K}", + " 2.343E+06, !- Ground Thermal Heat Capacity {J/m3-K}", + " , !- Response Factors Object Name", + " GHE-Array; !- GHE Array Object Name", "Branch,", - " Main Floor Cooling Condenser Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Coil:Cooling:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", - " Main Floor WAHP Cooling Coil, !- Component 1 Name", - " Main Floor WAHP Cooling Water Inlet Node, !- Component 1 Inlet Node Name", - " Main Floor WAHP Cooling Water Outlet Node; !- Component 1 Outlet Node Name", + " Main Floor Cooling Condenser Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Coil:Cooling:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", + " Main Floor WAHP Cooling Coil, !- Component 1 Name", + " Main Floor WAHP Cooling Water Inlet Node, !- Component 1 Inlet Node Name", + " Main Floor WAHP Cooling Water Outlet Node; !- Component 1 Outlet Node Name", "Branch,", - " Main Floor Heating Condenser Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Coil:Heating:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", - " Main Floor WAHP Heating Coil, !- Component 1 Name", - " Main Floor WAHP Heating Water Inlet Node, !- Component 1 Inlet Node Name", - " Main Floor WAHP Heating Water Outlet Node; !- Component 1 Outlet Node Name", + " Main Floor Heating Condenser Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Coil:Heating:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", + " Main Floor WAHP Heating Coil, !- Component 1 Name", + " Main Floor WAHP Heating Water Inlet Node, !- Component 1 Inlet Node Name", + " Main Floor WAHP Heating Water Outlet Node; !- Component 1 Outlet Node Name", "Branch,", - " GHE-Vert Branch, !- Name", - " , !- Pressure Drop Curve Name", - " GroundHeatExchanger:System, !- Component 1 Object Type", - " Vertical GHE 1x4 Std, !- Component 1 Name", - " GHLE Inlet, !- Component 1 Inlet Node Name", - " GHLE Outlet; !- Component 1 Outlet Node Name", + " GHE-Vert Branch, !- Name", + " , !- Pressure Drop Curve Name", + " GroundHeatExchanger:System, !- Component 1 Object Type", + " Vertical GHE 1x4 Std, !- Component 1 Name", + " GHLE Inlet, !- Component 1 Inlet Node Name", + " GHLE Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Supply Inlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pump:ConstantSpeed, !- Component 1 Object Type", - " Ground Loop Supply Pump, !- Component 1 Name", - " Ground Loop Supply Inlet,!- Component 1 Inlet Node Name", - " Ground Loop Pump Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Supply Inlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pump:ConstantSpeed, !- Component 1 Object Type", + " Ground Loop Supply Pump, !- Component 1 Name", + " Ground Loop Supply Inlet,!- Component 1 Inlet Node Name", + " Ground Loop Pump Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Supply Outlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Supply Outlet Pipe, !- Component 1 Name", - " Ground Loop Supply Outlet Pipe Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Supply Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Supply Outlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Supply Outlet Pipe, !- Component 1 Name", + " Ground Loop Supply Outlet Pipe Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Supply Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Inlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Inlet Pipe, !- Component 1 Name", - " Ground Loop Demand Inlet,!- Component 1 Inlet Node Name", - " Ground Loop Demand Inlet Pipe Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Inlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Inlet Pipe, !- Component 1 Name", + " Ground Loop Demand Inlet,!- Component 1 Inlet Node Name", + " Ground Loop Demand Inlet Pipe Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Bypass Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Side Bypass Pipe, !- Component 1 Name", - " Ground Loop Demand Bypass Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Demand Bypass Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Bypass Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Side Bypass Pipe, !- Component 1 Name", + " Ground Loop Demand Bypass Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Demand Bypass Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Outlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Outlet Pipe, !- Component 1 Name", - " Ground Loop Demand Outlet Pipe Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Demand Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Outlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Outlet Pipe, !- Component 1 Name", + " Ground Loop Demand Outlet Pipe Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Demand Outlet; !- Component 1 Outlet Node Name", "BranchList,", - " Ground Loop Supply Side Branches, !- Name", - " Ground Loop Supply Inlet Branch, !- Branch 1 Name", - " GHE-Vert Branch, !- Branch 2 Name", - " Ground Loop Supply Outlet Branch; !- Branch 3 Name", + " Ground Loop Supply Side Branches, !- Name", + " Ground Loop Supply Inlet Branch, !- Branch 1 Name", + " GHE-Vert Branch, !- Branch 2 Name", + " Ground Loop Supply Outlet Branch; !- Branch 3 Name", "BranchList,", - " Ground Loop Demand Side Branches, !- Name", - " Ground Loop Demand Inlet Branch, !- Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Branch 2 Name", - " Main Floor Heating Condenser Branch, !- Branch 3 Name", - " Ground Loop Demand Bypass Branch, !- Branch 4 Name", - " Ground Loop Demand Outlet Branch; !- Branch 5 Name", + " Ground Loop Demand Side Branches, !- Name", + " Ground Loop Demand Inlet Branch, !- Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Branch 2 Name", + " Main Floor Heating Condenser Branch, !- Branch 3 Name", + " Ground Loop Demand Bypass Branch, !- Branch 4 Name", + " Ground Loop Demand Outlet Branch; !- Branch 5 Name", "Connector:Splitter,", - " Ground Loop Supply Splitter, !- Name", - " Ground Loop Supply Inlet Branch, !- Inlet Branch Name", - " GHE-Vert Branch; !- Outlet Branch 1 Name", + " Ground Loop Supply Splitter, !- Name", + " Ground Loop Supply Inlet Branch, !- Inlet Branch Name", + " GHE-Vert Branch; !- Outlet Branch 1 Name", "Connector:Splitter,", - " Ground Loop Demand Splitter, !- Name", - " Ground Loop Demand Inlet Branch, !- Inlet Branch Name", - " Ground Loop Demand Bypass Branch, !- Outlet Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Outlet Branch 2 Name", - " Main Floor Heating Condenser Branch; !- Outlet Branch 3 Name", + " Ground Loop Demand Splitter, !- Name", + " Ground Loop Demand Inlet Branch, !- Inlet Branch Name", + " Ground Loop Demand Bypass Branch, !- Outlet Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Outlet Branch 2 Name", + " Main Floor Heating Condenser Branch; !- Outlet Branch 3 Name", "Connector:Mixer,", - " Ground Loop Supply Mixer,!- Name", - " Ground Loop Supply Outlet Branch, !- Outlet Branch Name", - " GHE-Vert Branch; !- Inlet Branch 1 Name", + " Ground Loop Supply Mixer,!- Name", + " Ground Loop Supply Outlet Branch, !- Outlet Branch Name", + " GHE-Vert Branch; !- Inlet Branch 1 Name", "Connector:Mixer,", - " Ground Loop Demand Mixer,!- Name", - " Ground Loop Demand Outlet Branch, !- Outlet Branch Name", - " Ground Loop Demand Bypass Branch, !- Inlet Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Inlet Branch 2 Name", - " Main Floor Heating Condenser Branch; !- Inlet Branch 3 Name", + " Ground Loop Demand Mixer,!- Name", + " Ground Loop Demand Outlet Branch, !- Outlet Branch Name", + " Ground Loop Demand Bypass Branch, !- Inlet Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Inlet Branch 2 Name", + " Main Floor Heating Condenser Branch; !- Inlet Branch 3 Name", "ConnectorList,", - " Ground Loop Supply Side Connectors, !- Name", - " Connector:Splitter, !- Connector 1 Object Type", - " Ground Loop Supply Splitter, !- Connector 1 Name", - " Connector:Mixer, !- Connector 2 Object Type", - " Ground Loop Supply Mixer;!- Connector 2 Name", + " Ground Loop Supply Side Connectors, !- Name", + " Connector:Splitter, !- Connector 1 Object Type", + " Ground Loop Supply Splitter, !- Connector 1 Name", + " Connector:Mixer, !- Connector 2 Object Type", + " Ground Loop Supply Mixer;!- Connector 2 Name", "ConnectorList,", - " Ground Loop Demand Side Connectors, !- Name", - " Connector:Splitter, !- Connector 1 Object Type", - " Ground Loop Demand Splitter, !- Connector 1 Name", - " Connector:Mixer, !- Connector 2 Object Type", - " Ground Loop Demand Mixer;!- Connector 2 Name", + " Ground Loop Demand Side Connectors, !- Name", + " Connector:Splitter, !- Connector 1 Object Type", + " Ground Loop Demand Splitter, !- Connector 1 Name", + " Connector:Mixer, !- Connector 2 Object Type", + " Ground Loop Demand Mixer;!- Connector 2 Name", "NodeList,", - " Ground Loop Supply Setpoint Nodes, !- Name", - " GHLE Outlet, !- Node 1 Name", - " Ground Loop Supply Outlet; !- Node 2 Name", + " Ground Loop Supply Setpoint Nodes, !- Name", + " GHLE Outlet, !- Node 1 Name", + " Ground Loop Supply Outlet; !- Node 2 Name", "OutdoorAir:Node,", - " Main Floor WAHP Outside Air Inlet, !- Name", - " -1; !- Height Above Ground {m}", + " Main Floor WAHP Outside Air Inlet, !- Name", + " -1; !- Height Above Ground {m}", "Pipe:Adiabatic,", - " Ground Loop Supply Outlet Pipe, !- Name", - " Ground Loop Supply Outlet Pipe Inlet, !- Inlet Node Name", - " Ground Loop Supply Outlet; !- Outlet Node Name", + " Ground Loop Supply Outlet Pipe, !- Name", + " Ground Loop Supply Outlet Pipe Inlet, !- Inlet Node Name", + " Ground Loop Supply Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Inlet Pipe, !- Name", - " Ground Loop Demand Inlet,!- Inlet Node Name", - " Ground Loop Demand Inlet Pipe Outlet; !- Outlet Node Name", + " Ground Loop Demand Inlet Pipe, !- Name", + " Ground Loop Demand Inlet,!- Inlet Node Name", + " Ground Loop Demand Inlet Pipe Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Side Bypass Pipe, !- Name", - " Ground Loop Demand Bypass Inlet, !- Inlet Node Name", - " Ground Loop Demand Bypass Outlet; !- Outlet Node Name", + " Ground Loop Demand Side Bypass Pipe, !- Name", + " Ground Loop Demand Bypass Inlet, !- Inlet Node Name", + " Ground Loop Demand Bypass Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Outlet Pipe, !- Name", - " Ground Loop Demand Outlet Pipe Inlet, !- Inlet Node Name", - " Ground Loop Demand Outlet; !- Outlet Node Name", + " Ground Loop Demand Outlet Pipe, !- Name", + " Ground Loop Demand Outlet Pipe Inlet, !- Inlet Node Name", + " Ground Loop Demand Outlet; !- Outlet Node Name", "Pump:ConstantSpeed,", - " Ground Loop Supply Pump, !- Name", - " Ground Loop Supply Inlet,!- Inlet Node Name", - " Ground Loop Pump Outlet, !- Outlet Node Name", - " autosize, !- Design Flow Rate {m3/s}", - " 179352, !- Design Pump Head {Pa}", - " autosize, !- Design Power Consumption {W}", - " 0.9, !- Motor Efficiency", - " 0, !- Fraction of Motor Inefficiencies to Fluid Stream", - " Intermittent; !- Pump Control Type", + " Ground Loop Supply Pump, !- Name", + " Ground Loop Supply Inlet,!- Inlet Node Name", + " Ground Loop Pump Outlet, !- Outlet Node Name", + " autosize, !- Design Flow Rate {m3/s}", + " 179352, !- Design Pump Head {Pa}", + " autosize, !- Design Power Consumption {W}", + " 0.9, !- Motor Efficiency", + " 0, !- Fraction of Motor Inefficiencies to Fluid Stream", + " Intermittent; !- Pump Control Type", "PlantLoop,", - " Ground Loop Water Loop, !- Name", - " Water, !- Fluid Type", - " , !- User Defined Fluid Type", - " Only Water Loop Operation, !- Plant Equipment Operation Scheme Name", - " Ground Loop Supply Outlet, !- Loop Temperature Setpoint Node Name", - " 100, !- Maximum Loop Temperature {C}", - " 10, !- Minimum Loop Temperature {C}", - " autosize, !- Maximum Loop Flow Rate {m3/s}", - " 0, !- Minimum Loop Flow Rate {m3/s}", - " autosize, !- Plant Loop Volume {m3}", - " Ground Loop Supply Inlet,!- Plant Side Inlet Node Name", - " Ground Loop Supply Outlet, !- Plant Side Outlet Node Name", - " Ground Loop Supply Side Branches, !- Plant Side Branch List Name", - " Ground Loop Supply Side Connectors, !- Plant Side Connector List Name", - " Ground Loop Demand Inlet,!- Demand Side Inlet Node Name", - " Ground Loop Demand Outlet, !- Demand Side Outlet Node Name", - " Ground Loop Demand Side Branches, !- Demand Side Branch List Name", - " Ground Loop Demand Side Connectors, !- Demand Side Connector List Name", - " SequentialLoad, !- Load Distribution Scheme", - " , !- Availability Manager List Name", - " DualSetPointDeadband; !- Plant Loop Demand Calculation Scheme", + " Ground Loop Water Loop, !- Name", + " Water, !- Fluid Type", + " , !- User Defined Fluid Type", + " Only Water Loop Operation, !- Plant Equipment Operation Scheme Name", + " Ground Loop Supply Outlet, !- Loop Temperature Setpoint Node Name", + " 100, !- Maximum Loop Temperature {C}", + " 10, !- Minimum Loop Temperature {C}", + " autosize, !- Maximum Loop Flow Rate {m3/s}", + " 0, !- Minimum Loop Flow Rate {m3/s}", + " autosize, !- Plant Loop Volume {m3}", + " Ground Loop Supply Inlet,!- Plant Side Inlet Node Name", + " Ground Loop Supply Outlet, !- Plant Side Outlet Node Name", + " Ground Loop Supply Side Branches, !- Plant Side Branch List Name", + " Ground Loop Supply Side Connectors, !- Plant Side Connector List Name", + " Ground Loop Demand Inlet,!- Demand Side Inlet Node Name", + " Ground Loop Demand Outlet, !- Demand Side Outlet Node Name", + " Ground Loop Demand Side Branches, !- Demand Side Branch List Name", + " Ground Loop Demand Side Connectors, !- Demand Side Connector List Name", + " SequentialLoad, !- Load Distribution Scheme", + " , !- Availability Manager List Name", + " DualSetPointDeadband; !- Plant Loop Demand Calculation Scheme", "PlantEquipmentList,", - " Only Water Loop All Cooling Equipment, !- Name", - " GroundHeatExchanger:System, !- Equipment 1 Object Type", - " Vertical GHE 1x4 Std; !- Equipment 1 Name", + " Only Water Loop All Cooling Equipment, !- Name", + " GroundHeatExchanger:System, !- Equipment 1 Object Type", + " Vertical GHE 1x4 Std; !- Equipment 1 Name", "PlantEquipmentOperation:CoolingLoad,", - " Only Water Loop Cool Operation All Hours, !- Name", - " 0, !- Load Range 1 Lower Limit {W}", - " 1000000000000000, !- Load Range 1 Upper Limit {W}", - " Only Water Loop All Cooling Equipment; !- Range 1 Equipment List Name", + " Only Water Loop Cool Operation All Hours, !- Name", + " 0, !- Load Range 1 Lower Limit {W}", + " 1000000000000000, !- Load Range 1 Upper Limit {W}", + " Only Water Loop All Cooling Equipment; !- Range 1 Equipment List Name", "PlantEquipmentOperationSchemes,", - " Only Water Loop Operation, !- Name", - " PlantEquipmentOperation:CoolingLoad, !- Control Scheme 1 Object Type", - " Only Water Loop Cool Operation All Hours, !- Control Scheme 1 Name", - " HVACTemplate-Always 1; !- Control Scheme 1 Schedule Name", + " Only Water Loop Operation, !- Name", + " PlantEquipmentOperation:CoolingLoad, !- Control Scheme 1 Object Type", + " Only Water Loop Cool Operation All Hours, !- Control Scheme 1 Name", + " HVACTemplate-Always 1; !- Control Scheme 1 Schedule Name", "SetpointManager:Scheduled:DualSetpoint,", - " Ground Loop Temp Manager,!- Name", - " Temperature, !- Control Variable", - " HVACTemplate-Always 34, !- High Setpoint Schedule Name", - " HVACTemplate-Always 20, !- Low Setpoint Schedule Name", - " Ground Loop Supply Setpoint Nodes; !- Setpoint Node or NodeList Name", + " Ground Loop Temp Manager,!- Name", + " Temperature, !- Control Variable", + " HVACTemplate-Always 34, !- High Setpoint Schedule Name", + " HVACTemplate-Always 20, !- Low Setpoint Schedule Name", + " Ground Loop Supply Setpoint Nodes; !- Setpoint Node or NodeList Name", "Schedule:Compact,", - " HVACTemplate-Always 4, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,4; !- Field 3", + " HVACTemplate-Always 4, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,4; !- Field 3", "Schedule:Compact,", - " HVACTemplate-Always 34, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,34; !- Field 3", + " HVACTemplate-Always 34, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,34; !- Field 3", "Schedule:Compact,", - " HVACTemplate-Always 20, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,20; !- Field 3"}); + " HVACTemplate-Always 20, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,20; !- Field 3"}); // Envr variable DisableGLHECaching = true; @@ -1971,7 +2069,7 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_calc_pipe_resistance) SetupInitialPlantCallingOrder(*state); SetupBranchControlTypes(*state); - auto &thisGLHE(verticalGLHE[0]); + auto &thisGLHE(state->dataGroundHeatExchanger->verticalGLHE[0]); thisGLHE.loopNum = 1; Node(thisGLHE.inletNodeNum).Temp = 13.0; thisGLHE.designFlow = 0.000303 * 4; @@ -1991,269 +2089,269 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_calcBHGroutResistance_1 std::string const idf_objects = delimited_string({ "Branch,", - " Main Floor Cooling Condenser Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Coil:Cooling:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", - " Main Floor WAHP Cooling Coil, !- Component 1 Name", - " Main Floor WAHP Cooling Water Inlet Node, !- Component 1 Inlet Node Name", - " Main Floor WAHP Cooling Water Outlet Node; !- Component 1 Outlet Node Name", + " Main Floor Cooling Condenser Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Coil:Cooling:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", + " Main Floor WAHP Cooling Coil, !- Component 1 Name", + " Main Floor WAHP Cooling Water Inlet Node, !- Component 1 Inlet Node Name", + " Main Floor WAHP Cooling Water Outlet Node; !- Component 1 Outlet Node Name", "Branch,", - " Main Floor Heating Condenser Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Coil:Heating:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", - " Main Floor WAHP Heating Coil, !- Component 1 Name", - " Main Floor WAHP Heating Water Inlet Node, !- Component 1 Inlet Node Name", - " Main Floor WAHP Heating Water Outlet Node; !- Component 1 Outlet Node Name", + " Main Floor Heating Condenser Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Coil:Heating:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", + " Main Floor WAHP Heating Coil, !- Component 1 Name", + " Main Floor WAHP Heating Water Inlet Node, !- Component 1 Inlet Node Name", + " Main Floor WAHP Heating Water Outlet Node; !- Component 1 Outlet Node Name", "Branch,", - " GHE-Vert Branch, !- Name", - " , !- Pressure Drop Curve Name", - " GroundHeatExchanger:System, !- Component 1 Object Type", - " Vertical GHE 1x4 Std, !- Component 1 Name", - " GHLE Inlet, !- Component 1 Inlet Node Name", - " GHLE Outlet; !- Component 1 Outlet Node Name", + " GHE-Vert Branch, !- Name", + " , !- Pressure Drop Curve Name", + " GroundHeatExchanger:System, !- Component 1 Object Type", + " Vertical GHE 1x4 Std, !- Component 1 Name", + " GHLE Inlet, !- Component 1 Inlet Node Name", + " GHLE Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Supply Inlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pump:ConstantSpeed, !- Component 1 Object Type", - " Ground Loop Supply Pump, !- Component 1 Name", - " Ground Loop Supply Inlet,!- Component 1 Inlet Node Name", - " Ground Loop Pump Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Supply Inlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pump:ConstantSpeed, !- Component 1 Object Type", + " Ground Loop Supply Pump, !- Component 1 Name", + " Ground Loop Supply Inlet,!- Component 1 Inlet Node Name", + " Ground Loop Pump Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Supply Outlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Supply Outlet Pipe, !- Component 1 Name", - " Ground Loop Supply Outlet Pipe Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Supply Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Supply Outlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Supply Outlet Pipe, !- Component 1 Name", + " Ground Loop Supply Outlet Pipe Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Supply Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Inlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Inlet Pipe, !- Component 1 Name", - " Ground Loop Demand Inlet,!- Component 1 Inlet Node Name", - " Ground Loop Demand Inlet Pipe Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Inlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Inlet Pipe, !- Component 1 Name", + " Ground Loop Demand Inlet,!- Component 1 Inlet Node Name", + " Ground Loop Demand Inlet Pipe Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Bypass Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Side Bypass Pipe, !- Component 1 Name", - " Ground Loop Demand Bypass Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Demand Bypass Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Bypass Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Side Bypass Pipe, !- Component 1 Name", + " Ground Loop Demand Bypass Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Demand Bypass Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Outlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Outlet Pipe, !- Component 1 Name", - " Ground Loop Demand Outlet Pipe Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Demand Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Outlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Outlet Pipe, !- Component 1 Name", + " Ground Loop Demand Outlet Pipe Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Demand Outlet; !- Component 1 Outlet Node Name", "BranchList,", - " Ground Loop Supply Side Branches, !- Name", - " Ground Loop Supply Inlet Branch, !- Branch 1 Name", - " GHE-Vert Branch, !- Branch 2 Name", - " Ground Loop Supply Outlet Branch; !- Branch 3 Name", + " Ground Loop Supply Side Branches, !- Name", + " Ground Loop Supply Inlet Branch, !- Branch 1 Name", + " GHE-Vert Branch, !- Branch 2 Name", + " Ground Loop Supply Outlet Branch; !- Branch 3 Name", "BranchList,", - " Ground Loop Demand Side Branches, !- Name", - " Ground Loop Demand Inlet Branch, !- Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Branch 2 Name", - " Main Floor Heating Condenser Branch, !- Branch 3 Name", - " Ground Loop Demand Bypass Branch, !- Branch 4 Name", - " Ground Loop Demand Outlet Branch; !- Branch 5 Name", + " Ground Loop Demand Side Branches, !- Name", + " Ground Loop Demand Inlet Branch, !- Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Branch 2 Name", + " Main Floor Heating Condenser Branch, !- Branch 3 Name", + " Ground Loop Demand Bypass Branch, !- Branch 4 Name", + " Ground Loop Demand Outlet Branch; !- Branch 5 Name", "Connector:Splitter,", - " Ground Loop Supply Splitter, !- Name", - " Ground Loop Supply Inlet Branch, !- Inlet Branch Name", - " GHE-Vert Branch; !- Outlet Branch 1 Name", + " Ground Loop Supply Splitter, !- Name", + " Ground Loop Supply Inlet Branch, !- Inlet Branch Name", + " GHE-Vert Branch; !- Outlet Branch 1 Name", "Connector:Splitter,", - " Ground Loop Demand Splitter, !- Name", - " Ground Loop Demand Inlet Branch, !- Inlet Branch Name", - " Ground Loop Demand Bypass Branch, !- Outlet Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Outlet Branch 2 Name", - " Main Floor Heating Condenser Branch; !- Outlet Branch 3 Name", + " Ground Loop Demand Splitter, !- Name", + " Ground Loop Demand Inlet Branch, !- Inlet Branch Name", + " Ground Loop Demand Bypass Branch, !- Outlet Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Outlet Branch 2 Name", + " Main Floor Heating Condenser Branch; !- Outlet Branch 3 Name", "Connector:Mixer,", - " Ground Loop Supply Mixer,!- Name", - " Ground Loop Supply Outlet Branch, !- Outlet Branch Name", - " GHE-Vert Branch; !- Inlet Branch 1 Name", + " Ground Loop Supply Mixer,!- Name", + " Ground Loop Supply Outlet Branch, !- Outlet Branch Name", + " GHE-Vert Branch; !- Inlet Branch 1 Name", "Connector:Mixer,", - " Ground Loop Demand Mixer,!- Name", - " Ground Loop Demand Outlet Branch, !- Outlet Branch Name", - " Ground Loop Demand Bypass Branch, !- Inlet Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Inlet Branch 2 Name", - " Main Floor Heating Condenser Branch; !- Inlet Branch 3 Name", + " Ground Loop Demand Mixer,!- Name", + " Ground Loop Demand Outlet Branch, !- Outlet Branch Name", + " Ground Loop Demand Bypass Branch, !- Inlet Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Inlet Branch 2 Name", + " Main Floor Heating Condenser Branch; !- Inlet Branch 3 Name", "ConnectorList,", - " Ground Loop Supply Side Connectors, !- Name", - " Connector:Splitter, !- Connector 1 Object Type", - " Ground Loop Supply Splitter, !- Connector 1 Name", - " Connector:Mixer, !- Connector 2 Object Type", - " Ground Loop Supply Mixer;!- Connector 2 Name", + " Ground Loop Supply Side Connectors, !- Name", + " Connector:Splitter, !- Connector 1 Object Type", + " Ground Loop Supply Splitter, !- Connector 1 Name", + " Connector:Mixer, !- Connector 2 Object Type", + " Ground Loop Supply Mixer;!- Connector 2 Name", "ConnectorList,", - " Ground Loop Demand Side Connectors, !- Name", - " Connector:Splitter, !- Connector 1 Object Type", - " Ground Loop Demand Splitter, !- Connector 1 Name", - " Connector:Mixer, !- Connector 2 Object Type", - " Ground Loop Demand Mixer;!- Connector 2 Name", + " Ground Loop Demand Side Connectors, !- Name", + " Connector:Splitter, !- Connector 1 Object Type", + " Ground Loop Demand Splitter, !- Connector 1 Name", + " Connector:Mixer, !- Connector 2 Object Type", + " Ground Loop Demand Mixer;!- Connector 2 Name", "NodeList,", - " Ground Loop Supply Setpoint Nodes, !- Name", - " GHLE Outlet, !- Node 1 Name", - " Ground Loop Supply Outlet; !- Node 2 Name", + " Ground Loop Supply Setpoint Nodes, !- Name", + " GHLE Outlet, !- Node 1 Name", + " Ground Loop Supply Outlet; !- Node 2 Name", "OutdoorAir:Node,", - " Main Floor WAHP Outside Air Inlet, !- Name", - " -1; !- Height Above Ground {m}", + " Main Floor WAHP Outside Air Inlet, !- Name", + " -1; !- Height Above Ground {m}", "Pipe:Adiabatic,", - " Ground Loop Supply Outlet Pipe, !- Name", - " Ground Loop Supply Outlet Pipe Inlet, !- Inlet Node Name", - " Ground Loop Supply Outlet; !- Outlet Node Name", + " Ground Loop Supply Outlet Pipe, !- Name", + " Ground Loop Supply Outlet Pipe Inlet, !- Inlet Node Name", + " Ground Loop Supply Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Inlet Pipe, !- Name", - " Ground Loop Demand Inlet,!- Inlet Node Name", - " Ground Loop Demand Inlet Pipe Outlet; !- Outlet Node Name", + " Ground Loop Demand Inlet Pipe, !- Name", + " Ground Loop Demand Inlet,!- Inlet Node Name", + " Ground Loop Demand Inlet Pipe Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Side Bypass Pipe, !- Name", - " Ground Loop Demand Bypass Inlet, !- Inlet Node Name", - " Ground Loop Demand Bypass Outlet; !- Outlet Node Name", + " Ground Loop Demand Side Bypass Pipe, !- Name", + " Ground Loop Demand Bypass Inlet, !- Inlet Node Name", + " Ground Loop Demand Bypass Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Outlet Pipe, !- Name", - " Ground Loop Demand Outlet Pipe Inlet, !- Inlet Node Name", - " Ground Loop Demand Outlet; !- Outlet Node Name", + " Ground Loop Demand Outlet Pipe, !- Name", + " Ground Loop Demand Outlet Pipe Inlet, !- Inlet Node Name", + " Ground Loop Demand Outlet; !- Outlet Node Name", "Pump:ConstantSpeed,", - " Ground Loop Supply Pump, !- Name", - " Ground Loop Supply Inlet,!- Inlet Node Name", - " Ground Loop Pump Outlet, !- Outlet Node Name", - " autosize, !- Design Flow Rate {m3/s}", - " 179352, !- Design Pump Head {Pa}", - " autosize, !- Design Power Consumption {W}", - " 0.9, !- Motor Efficiency", - " 0, !- Fraction of Motor Inefficiencies to Fluid Stream", - " Intermittent; !- Pump Control Type", + " Ground Loop Supply Pump, !- Name", + " Ground Loop Supply Inlet,!- Inlet Node Name", + " Ground Loop Pump Outlet, !- Outlet Node Name", + " autosize, !- Design Flow Rate {m3/s}", + " 179352, !- Design Pump Head {Pa}", + " autosize, !- Design Power Consumption {W}", + " 0.9, !- Motor Efficiency", + " 0, !- Fraction of Motor Inefficiencies to Fluid Stream", + " Intermittent; !- Pump Control Type", "PlantLoop,", - " Ground Loop Water Loop, !- Name", - " Water, !- Fluid Type", - " , !- User Defined Fluid Type", - " Only Water Loop Operation, !- Plant Equipment Operation Scheme Name", - " Ground Loop Supply Outlet, !- Loop Temperature Setpoint Node Name", - " 100, !- Maximum Loop Temperature {C}", - " 10, !- Minimum Loop Temperature {C}", - " autosize, !- Maximum Loop Flow Rate {m3/s}", - " 0, !- Minimum Loop Flow Rate {m3/s}", - " autosize, !- Plant Loop Volume {m3}", - " Ground Loop Supply Inlet,!- Plant Side Inlet Node Name", - " Ground Loop Supply Outlet, !- Plant Side Outlet Node Name", - " Ground Loop Supply Side Branches, !- Plant Side Branch List Name", - " Ground Loop Supply Side Connectors, !- Plant Side Connector List Name", - " Ground Loop Demand Inlet,!- Demand Side Inlet Node Name", - " Ground Loop Demand Outlet, !- Demand Side Outlet Node Name", - " Ground Loop Demand Side Branches, !- Demand Side Branch List Name", - " Ground Loop Demand Side Connectors, !- Demand Side Connector List Name", - " SequentialLoad, !- Load Distribution Scheme", - " , !- Availability Manager List Name", - " DualSetPointDeadband; !- Plant Loop Demand Calculation Scheme", + " Ground Loop Water Loop, !- Name", + " Water, !- Fluid Type", + " , !- User Defined Fluid Type", + " Only Water Loop Operation, !- Plant Equipment Operation Scheme Name", + " Ground Loop Supply Outlet, !- Loop Temperature Setpoint Node Name", + " 100, !- Maximum Loop Temperature {C}", + " 10, !- Minimum Loop Temperature {C}", + " autosize, !- Maximum Loop Flow Rate {m3/s}", + " 0, !- Minimum Loop Flow Rate {m3/s}", + " autosize, !- Plant Loop Volume {m3}", + " Ground Loop Supply Inlet,!- Plant Side Inlet Node Name", + " Ground Loop Supply Outlet, !- Plant Side Outlet Node Name", + " Ground Loop Supply Side Branches, !- Plant Side Branch List Name", + " Ground Loop Supply Side Connectors, !- Plant Side Connector List Name", + " Ground Loop Demand Inlet,!- Demand Side Inlet Node Name", + " Ground Loop Demand Outlet, !- Demand Side Outlet Node Name", + " Ground Loop Demand Side Branches, !- Demand Side Branch List Name", + " Ground Loop Demand Side Connectors, !- Demand Side Connector List Name", + " SequentialLoad, !- Load Distribution Scheme", + " , !- Availability Manager List Name", + " DualSetPointDeadband; !- Plant Loop Demand Calculation Scheme", "PlantEquipmentList,", - " Only Water Loop All Cooling Equipment, !- Name", - " GroundHeatExchanger:System, !- Equipment 1 Object Type", - " Vertical GHE 1x4 Std; !- Equipment 1 Name", + " Only Water Loop All Cooling Equipment, !- Name", + " GroundHeatExchanger:System, !- Equipment 1 Object Type", + " Vertical GHE 1x4 Std; !- Equipment 1 Name", "PlantEquipmentOperation:CoolingLoad,", - " Only Water Loop Cool Operation All Hours, !- Name", - " 0, !- Load Range 1 Lower Limit {W}", - " 1000000000000000, !- Load Range 1 Upper Limit {W}", - " Only Water Loop All Cooling Equipment; !- Range 1 Equipment List Name", + " Only Water Loop Cool Operation All Hours, !- Name", + " 0, !- Load Range 1 Lower Limit {W}", + " 1000000000000000, !- Load Range 1 Upper Limit {W}", + " Only Water Loop All Cooling Equipment; !- Range 1 Equipment List Name", "PlantEquipmentOperationSchemes,", - " Only Water Loop Operation, !- Name", - " PlantEquipmentOperation:CoolingLoad, !- Control Scheme 1 Object Type", - " Only Water Loop Cool Operation All Hours, !- Control Scheme 1 Name", - " HVACTemplate-Always 1; !- Control Scheme 1 Schedule Name", + " Only Water Loop Operation, !- Name", + " PlantEquipmentOperation:CoolingLoad, !- Control Scheme 1 Object Type", + " Only Water Loop Cool Operation All Hours, !- Control Scheme 1 Name", + " HVACTemplate-Always 1; !- Control Scheme 1 Schedule Name", "SetpointManager:Scheduled:DualSetpoint,", - " Ground Loop Temp Manager,!- Name", - " Temperature, !- Control Variable", - " HVACTemplate-Always 34, !- High Setpoint Schedule Name", - " HVACTemplate-Always 20, !- Low Setpoint Schedule Name", - " Ground Loop Supply Setpoint Nodes; !- Setpoint Node or NodeList Name", + " Ground Loop Temp Manager,!- Name", + " Temperature, !- Control Variable", + " HVACTemplate-Always 34, !- High Setpoint Schedule Name", + " HVACTemplate-Always 20, !- Low Setpoint Schedule Name", + " Ground Loop Supply Setpoint Nodes; !- Setpoint Node or NodeList Name", "Schedule:Compact,", - " HVACTemplate-Always 4, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,4; !- Field 3", + " HVACTemplate-Always 4, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,4; !- Field 3", "Schedule:Compact,", - " HVACTemplate-Always 34, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,34; !- Field 3", + " HVACTemplate-Always 34, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,34; !- Field 3", "Schedule:Compact,", - " HVACTemplate-Always 20, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,20; !- Field 3", + " HVACTemplate-Always 20, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,20; !- Field 3", "Site:GroundTemperature:Undisturbed:KusudaAchenbach,", - " KATemps, !- Name", - " 1.8, !- Soil Thermal Conductivity {W/m-K}", - " 920, !- Soil Density {kg/m3}", - " 2200, !- Soil Specific Heat {J/kg-K}", - " 15.5, !- Average Soil Surface Temperature {C}", - " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", - " 8; !- Phase Shift of Minimum Surface Temperature {days}", + " KATemps, !- Name", + " 1.8, !- Soil Thermal Conductivity {W/m-K}", + " 920, !- Soil Density {kg/m3}", + " 2200, !- Soil Specific Heat {J/kg-K}", + " 15.5, !- Average Soil Surface Temperature {C}", + " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", + " 8; !- Phase Shift of Minimum Surface Temperature {days}", "GroundHeatExchanger:Vertical:Properties,", - " GHE-1 Props, !- Name", - " 1, !- Depth of Top of Borehole {m}", - " 76.2, !- Borehole Length {m}", - " 0.096, !- Borehole Diameter {m}", - " 0.6, !- Grout Thermal Conductivity {W/m-K}", - " 1.0E+06, !- Grout Thermal Heat Capacity {J/m3-K}", - " 0.389, !- Pipe Thermal Conductivity {W/m-K}", + " GHE-1 Props, !- Name", + " 1, !- Depth of Top of Borehole {m}", + " 76.2, !- Borehole Length {m}", + " 0.096, !- Borehole Diameter {m}", + " 0.6, !- Grout Thermal Conductivity {W/m-K}", + " 1.0E+06, !- Grout Thermal Heat Capacity {J/m3-K}", + " 0.389, !- Pipe Thermal Conductivity {W/m-K}", " 8E+05, !- Pipe Thermal Heat Capacity {J/m3-K}", - " 0.032, !- Pipe Outer Diameter {m}", - " 0.001627, !- Pipe Thickness {m}", - " 0.032; !- U-Tube Distance {m}", + " 0.032, !- Pipe Outer Diameter {m}", + " 0.001627, !- Pipe Thickness {m}", + " 0.032; !- U-Tube Distance {m}", "GroundHeatExchanger:Vertical:Array,", - " GHE-Array, !- Name", - " GHE-1 Props, !- GHE Properties", - " 2, !- Number of Boreholes in X Direction", - " 2, !- Number of Boreholes in Y Direction", - " 2; !- Borehole Spacing {m}", + " GHE-Array, !- Name", + " GHE-1 Props, !- GHE Properties", + " 2, !- Number of Boreholes in X Direction", + " 2, !- Number of Boreholes in Y Direction", + " 2; !- Borehole Spacing {m}", "GroundHeatExchanger:System,", - " Vertical GHE 1x4 Std, !- Name", - " GHLE Inlet, !- Inlet Node Name", - " GHLE Outlet, !- Outlet Node Name", - " 0.1, !- Design Flow Rate {m3/s}", - " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", - " KATemps, !- Undisturbed Ground Temperature Model Name", - " 4.0, !- Ground Thermal Conductivity {W/m-K}", - " 2.4957E+06, !- Ground Thermal Heat Capacity {J/m3-K}", - " , !- Response Factors Object Name", - " GHE-Array; !- GHE Array Object Name"}); + " Vertical GHE 1x4 Std, !- Name", + " GHLE Inlet, !- Inlet Node Name", + " GHLE Outlet, !- Outlet Node Name", + " 0.1, !- Design Flow Rate {m3/s}", + " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", + " KATemps, !- Undisturbed Ground Temperature Model Name", + " 4.0, !- Ground Thermal Conductivity {W/m-K}", + " 2.4957E+06, !- Ground Thermal Heat Capacity {J/m3-K}", + " , !- Response Factors Object Name", + " GHE-Array; !- GHE Array Object Name"}); // Envr variable DisableGLHECaching = true; @@ -2267,7 +2365,7 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_calcBHGroutResistance_1 SetupInitialPlantCallingOrder(*state); SetupBranchControlTypes(*state); - auto &thisGLHE(verticalGLHE[0]); + auto &thisGLHE(state->dataGroundHeatExchanger->verticalGLHE[0]); thisGLHE.loopNum = 1; Node(thisGLHE.inletNodeNum).Temp = 20.0; thisGLHE.massFlowRate = 1; @@ -2289,269 +2387,269 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_calcBHGroutResistance_2 std::string const idf_objects = delimited_string({ "Branch,", - " Main Floor Cooling Condenser Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Coil:Cooling:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", - " Main Floor WAHP Cooling Coil, !- Component 1 Name", - " Main Floor WAHP Cooling Water Inlet Node, !- Component 1 Inlet Node Name", - " Main Floor WAHP Cooling Water Outlet Node; !- Component 1 Outlet Node Name", + " Main Floor Cooling Condenser Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Coil:Cooling:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", + " Main Floor WAHP Cooling Coil, !- Component 1 Name", + " Main Floor WAHP Cooling Water Inlet Node, !- Component 1 Inlet Node Name", + " Main Floor WAHP Cooling Water Outlet Node; !- Component 1 Outlet Node Name", "Branch,", - " Main Floor Heating Condenser Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Coil:Heating:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", - " Main Floor WAHP Heating Coil, !- Component 1 Name", - " Main Floor WAHP Heating Water Inlet Node, !- Component 1 Inlet Node Name", - " Main Floor WAHP Heating Water Outlet Node; !- Component 1 Outlet Node Name", + " Main Floor Heating Condenser Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Coil:Heating:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", + " Main Floor WAHP Heating Coil, !- Component 1 Name", + " Main Floor WAHP Heating Water Inlet Node, !- Component 1 Inlet Node Name", + " Main Floor WAHP Heating Water Outlet Node; !- Component 1 Outlet Node Name", "Branch,", - " GHE-Vert Branch, !- Name", - " , !- Pressure Drop Curve Name", - " GroundHeatExchanger:System, !- Component 1 Object Type", - " Vertical GHE 1x4 Std, !- Component 1 Name", - " GHLE Inlet, !- Component 1 Inlet Node Name", - " GHLE Outlet; !- Component 1 Outlet Node Name", + " GHE-Vert Branch, !- Name", + " , !- Pressure Drop Curve Name", + " GroundHeatExchanger:System, !- Component 1 Object Type", + " Vertical GHE 1x4 Std, !- Component 1 Name", + " GHLE Inlet, !- Component 1 Inlet Node Name", + " GHLE Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Supply Inlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pump:ConstantSpeed, !- Component 1 Object Type", - " Ground Loop Supply Pump, !- Component 1 Name", - " Ground Loop Supply Inlet,!- Component 1 Inlet Node Name", - " Ground Loop Pump Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Supply Inlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pump:ConstantSpeed, !- Component 1 Object Type", + " Ground Loop Supply Pump, !- Component 1 Name", + " Ground Loop Supply Inlet,!- Component 1 Inlet Node Name", + " Ground Loop Pump Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Supply Outlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Supply Outlet Pipe, !- Component 1 Name", - " Ground Loop Supply Outlet Pipe Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Supply Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Supply Outlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Supply Outlet Pipe, !- Component 1 Name", + " Ground Loop Supply Outlet Pipe Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Supply Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Inlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Inlet Pipe, !- Component 1 Name", - " Ground Loop Demand Inlet,!- Component 1 Inlet Node Name", - " Ground Loop Demand Inlet Pipe Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Inlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Inlet Pipe, !- Component 1 Name", + " Ground Loop Demand Inlet,!- Component 1 Inlet Node Name", + " Ground Loop Demand Inlet Pipe Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Bypass Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Side Bypass Pipe, !- Component 1 Name", - " Ground Loop Demand Bypass Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Demand Bypass Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Bypass Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Side Bypass Pipe, !- Component 1 Name", + " Ground Loop Demand Bypass Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Demand Bypass Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Outlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Outlet Pipe, !- Component 1 Name", - " Ground Loop Demand Outlet Pipe Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Demand Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Outlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Outlet Pipe, !- Component 1 Name", + " Ground Loop Demand Outlet Pipe Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Demand Outlet; !- Component 1 Outlet Node Name", "BranchList,", - " Ground Loop Supply Side Branches, !- Name", - " Ground Loop Supply Inlet Branch, !- Branch 1 Name", - " GHE-Vert Branch, !- Branch 2 Name", - " Ground Loop Supply Outlet Branch; !- Branch 3 Name", + " Ground Loop Supply Side Branches, !- Name", + " Ground Loop Supply Inlet Branch, !- Branch 1 Name", + " GHE-Vert Branch, !- Branch 2 Name", + " Ground Loop Supply Outlet Branch; !- Branch 3 Name", "BranchList,", - " Ground Loop Demand Side Branches, !- Name", - " Ground Loop Demand Inlet Branch, !- Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Branch 2 Name", - " Main Floor Heating Condenser Branch, !- Branch 3 Name", - " Ground Loop Demand Bypass Branch, !- Branch 4 Name", - " Ground Loop Demand Outlet Branch; !- Branch 5 Name", + " Ground Loop Demand Side Branches, !- Name", + " Ground Loop Demand Inlet Branch, !- Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Branch 2 Name", + " Main Floor Heating Condenser Branch, !- Branch 3 Name", + " Ground Loop Demand Bypass Branch, !- Branch 4 Name", + " Ground Loop Demand Outlet Branch; !- Branch 5 Name", "Connector:Splitter,", - " Ground Loop Supply Splitter, !- Name", - " Ground Loop Supply Inlet Branch, !- Inlet Branch Name", - " GHE-Vert Branch; !- Outlet Branch 1 Name", + " Ground Loop Supply Splitter, !- Name", + " Ground Loop Supply Inlet Branch, !- Inlet Branch Name", + " GHE-Vert Branch; !- Outlet Branch 1 Name", "Connector:Splitter,", - " Ground Loop Demand Splitter, !- Name", - " Ground Loop Demand Inlet Branch, !- Inlet Branch Name", - " Ground Loop Demand Bypass Branch, !- Outlet Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Outlet Branch 2 Name", - " Main Floor Heating Condenser Branch; !- Outlet Branch 3 Name", + " Ground Loop Demand Splitter, !- Name", + " Ground Loop Demand Inlet Branch, !- Inlet Branch Name", + " Ground Loop Demand Bypass Branch, !- Outlet Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Outlet Branch 2 Name", + " Main Floor Heating Condenser Branch; !- Outlet Branch 3 Name", "Connector:Mixer,", - " Ground Loop Supply Mixer,!- Name", - " Ground Loop Supply Outlet Branch, !- Outlet Branch Name", - " GHE-Vert Branch; !- Inlet Branch 1 Name", + " Ground Loop Supply Mixer,!- Name", + " Ground Loop Supply Outlet Branch, !- Outlet Branch Name", + " GHE-Vert Branch; !- Inlet Branch 1 Name", "Connector:Mixer,", - " Ground Loop Demand Mixer,!- Name", - " Ground Loop Demand Outlet Branch, !- Outlet Branch Name", - " Ground Loop Demand Bypass Branch, !- Inlet Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Inlet Branch 2 Name", - " Main Floor Heating Condenser Branch; !- Inlet Branch 3 Name", + " Ground Loop Demand Mixer,!- Name", + " Ground Loop Demand Outlet Branch, !- Outlet Branch Name", + " Ground Loop Demand Bypass Branch, !- Inlet Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Inlet Branch 2 Name", + " Main Floor Heating Condenser Branch; !- Inlet Branch 3 Name", "ConnectorList,", - " Ground Loop Supply Side Connectors, !- Name", - " Connector:Splitter, !- Connector 1 Object Type", - " Ground Loop Supply Splitter, !- Connector 1 Name", - " Connector:Mixer, !- Connector 2 Object Type", - " Ground Loop Supply Mixer;!- Connector 2 Name", + " Ground Loop Supply Side Connectors, !- Name", + " Connector:Splitter, !- Connector 1 Object Type", + " Ground Loop Supply Splitter, !- Connector 1 Name", + " Connector:Mixer, !- Connector 2 Object Type", + " Ground Loop Supply Mixer;!- Connector 2 Name", "ConnectorList,", - " Ground Loop Demand Side Connectors, !- Name", - " Connector:Splitter, !- Connector 1 Object Type", - " Ground Loop Demand Splitter, !- Connector 1 Name", - " Connector:Mixer, !- Connector 2 Object Type", - " Ground Loop Demand Mixer;!- Connector 2 Name", + " Ground Loop Demand Side Connectors, !- Name", + " Connector:Splitter, !- Connector 1 Object Type", + " Ground Loop Demand Splitter, !- Connector 1 Name", + " Connector:Mixer, !- Connector 2 Object Type", + " Ground Loop Demand Mixer;!- Connector 2 Name", "NodeList,", - " Ground Loop Supply Setpoint Nodes, !- Name", - " GHLE Outlet, !- Node 1 Name", - " Ground Loop Supply Outlet; !- Node 2 Name", + " Ground Loop Supply Setpoint Nodes, !- Name", + " GHLE Outlet, !- Node 1 Name", + " Ground Loop Supply Outlet; !- Node 2 Name", "OutdoorAir:Node,", - " Main Floor WAHP Outside Air Inlet, !- Name", - " -1; !- Height Above Ground {m}", + " Main Floor WAHP Outside Air Inlet, !- Name", + " -1; !- Height Above Ground {m}", "Pipe:Adiabatic,", - " Ground Loop Supply Outlet Pipe, !- Name", - " Ground Loop Supply Outlet Pipe Inlet, !- Inlet Node Name", - " Ground Loop Supply Outlet; !- Outlet Node Name", + " Ground Loop Supply Outlet Pipe, !- Name", + " Ground Loop Supply Outlet Pipe Inlet, !- Inlet Node Name", + " Ground Loop Supply Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Inlet Pipe, !- Name", - " Ground Loop Demand Inlet,!- Inlet Node Name", - " Ground Loop Demand Inlet Pipe Outlet; !- Outlet Node Name", + " Ground Loop Demand Inlet Pipe, !- Name", + " Ground Loop Demand Inlet,!- Inlet Node Name", + " Ground Loop Demand Inlet Pipe Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Side Bypass Pipe, !- Name", - " Ground Loop Demand Bypass Inlet, !- Inlet Node Name", - " Ground Loop Demand Bypass Outlet; !- Outlet Node Name", + " Ground Loop Demand Side Bypass Pipe, !- Name", + " Ground Loop Demand Bypass Inlet, !- Inlet Node Name", + " Ground Loop Demand Bypass Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Outlet Pipe, !- Name", - " Ground Loop Demand Outlet Pipe Inlet, !- Inlet Node Name", - " Ground Loop Demand Outlet; !- Outlet Node Name", + " Ground Loop Demand Outlet Pipe, !- Name", + " Ground Loop Demand Outlet Pipe Inlet, !- Inlet Node Name", + " Ground Loop Demand Outlet; !- Outlet Node Name", "Pump:ConstantSpeed,", - " Ground Loop Supply Pump, !- Name", - " Ground Loop Supply Inlet,!- Inlet Node Name", - " Ground Loop Pump Outlet, !- Outlet Node Name", - " autosize, !- Design Flow Rate {m3/s}", - " 179352, !- Design Pump Head {Pa}", - " autosize, !- Design Power Consumption {W}", - " 0.9, !- Motor Efficiency", - " 0, !- Fraction of Motor Inefficiencies to Fluid Stream", - " Intermittent; !- Pump Control Type", + " Ground Loop Supply Pump, !- Name", + " Ground Loop Supply Inlet,!- Inlet Node Name", + " Ground Loop Pump Outlet, !- Outlet Node Name", + " autosize, !- Design Flow Rate {m3/s}", + " 179352, !- Design Pump Head {Pa}", + " autosize, !- Design Power Consumption {W}", + " 0.9, !- Motor Efficiency", + " 0, !- Fraction of Motor Inefficiencies to Fluid Stream", + " Intermittent; !- Pump Control Type", "PlantLoop,", - " Ground Loop Water Loop, !- Name", - " Water, !- Fluid Type", - " , !- User Defined Fluid Type", - " Only Water Loop Operation, !- Plant Equipment Operation Scheme Name", - " Ground Loop Supply Outlet, !- Loop Temperature Setpoint Node Name", - " 100, !- Maximum Loop Temperature {C}", - " 10, !- Minimum Loop Temperature {C}", - " autosize, !- Maximum Loop Flow Rate {m3/s}", - " 0, !- Minimum Loop Flow Rate {m3/s}", - " autosize, !- Plant Loop Volume {m3}", - " Ground Loop Supply Inlet,!- Plant Side Inlet Node Name", - " Ground Loop Supply Outlet, !- Plant Side Outlet Node Name", - " Ground Loop Supply Side Branches, !- Plant Side Branch List Name", - " Ground Loop Supply Side Connectors, !- Plant Side Connector List Name", - " Ground Loop Demand Inlet,!- Demand Side Inlet Node Name", - " Ground Loop Demand Outlet, !- Demand Side Outlet Node Name", - " Ground Loop Demand Side Branches, !- Demand Side Branch List Name", - " Ground Loop Demand Side Connectors, !- Demand Side Connector List Name", - " SequentialLoad, !- Load Distribution Scheme", - " , !- Availability Manager List Name", - " DualSetPointDeadband; !- Plant Loop Demand Calculation Scheme", + " Ground Loop Water Loop, !- Name", + " Water, !- Fluid Type", + " , !- User Defined Fluid Type", + " Only Water Loop Operation, !- Plant Equipment Operation Scheme Name", + " Ground Loop Supply Outlet, !- Loop Temperature Setpoint Node Name", + " 100, !- Maximum Loop Temperature {C}", + " 10, !- Minimum Loop Temperature {C}", + " autosize, !- Maximum Loop Flow Rate {m3/s}", + " 0, !- Minimum Loop Flow Rate {m3/s}", + " autosize, !- Plant Loop Volume {m3}", + " Ground Loop Supply Inlet,!- Plant Side Inlet Node Name", + " Ground Loop Supply Outlet, !- Plant Side Outlet Node Name", + " Ground Loop Supply Side Branches, !- Plant Side Branch List Name", + " Ground Loop Supply Side Connectors, !- Plant Side Connector List Name", + " Ground Loop Demand Inlet,!- Demand Side Inlet Node Name", + " Ground Loop Demand Outlet, !- Demand Side Outlet Node Name", + " Ground Loop Demand Side Branches, !- Demand Side Branch List Name", + " Ground Loop Demand Side Connectors, !- Demand Side Connector List Name", + " SequentialLoad, !- Load Distribution Scheme", + " , !- Availability Manager List Name", + " DualSetPointDeadband; !- Plant Loop Demand Calculation Scheme", "PlantEquipmentList,", - " Only Water Loop All Cooling Equipment, !- Name", - " GroundHeatExchanger:System, !- Equipment 1 Object Type", - " Vertical GHE 1x4 Std; !- Equipment 1 Name", + " Only Water Loop All Cooling Equipment, !- Name", + " GroundHeatExchanger:System, !- Equipment 1 Object Type", + " Vertical GHE 1x4 Std; !- Equipment 1 Name", "PlantEquipmentOperation:CoolingLoad,", - " Only Water Loop Cool Operation All Hours, !- Name", - " 0, !- Load Range 1 Lower Limit {W}", - " 1000000000000000, !- Load Range 1 Upper Limit {W}", - " Only Water Loop All Cooling Equipment; !- Range 1 Equipment List Name", + " Only Water Loop Cool Operation All Hours, !- Name", + " 0, !- Load Range 1 Lower Limit {W}", + " 1000000000000000, !- Load Range 1 Upper Limit {W}", + " Only Water Loop All Cooling Equipment; !- Range 1 Equipment List Name", "PlantEquipmentOperationSchemes,", - " Only Water Loop Operation, !- Name", - " PlantEquipmentOperation:CoolingLoad, !- Control Scheme 1 Object Type", - " Only Water Loop Cool Operation All Hours, !- Control Scheme 1 Name", - " HVACTemplate-Always 1; !- Control Scheme 1 Schedule Name", + " Only Water Loop Operation, !- Name", + " PlantEquipmentOperation:CoolingLoad, !- Control Scheme 1 Object Type", + " Only Water Loop Cool Operation All Hours, !- Control Scheme 1 Name", + " HVACTemplate-Always 1; !- Control Scheme 1 Schedule Name", "SetpointManager:Scheduled:DualSetpoint,", - " Ground Loop Temp Manager,!- Name", - " Temperature, !- Control Variable", - " HVACTemplate-Always 34, !- High Setpoint Schedule Name", - " HVACTemplate-Always 20, !- Low Setpoint Schedule Name", - " Ground Loop Supply Setpoint Nodes; !- Setpoint Node or NodeList Name", + " Ground Loop Temp Manager,!- Name", + " Temperature, !- Control Variable", + " HVACTemplate-Always 34, !- High Setpoint Schedule Name", + " HVACTemplate-Always 20, !- Low Setpoint Schedule Name", + " Ground Loop Supply Setpoint Nodes; !- Setpoint Node or NodeList Name", "Schedule:Compact,", - " HVACTemplate-Always 4, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,4; !- Field 3", + " HVACTemplate-Always 4, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,4; !- Field 3", "Schedule:Compact,", - " HVACTemplate-Always 34, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,34; !- Field 3", + " HVACTemplate-Always 34, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,34; !- Field 3", "Schedule:Compact,", - " HVACTemplate-Always 20, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,20; !- Field 3", + " HVACTemplate-Always 20, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,20; !- Field 3", "Site:GroundTemperature:Undisturbed:KusudaAchenbach,", - " KATemps, !- Name", - " 1.8, !- Soil Thermal Conductivity {W/m-K}", - " 920, !- Soil Density {kg/m3}", - " 2200, !- Soil Specific Heat {J/kg-K}", - " 15.5, !- Average Soil Surface Temperature {C}", - " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", - " 8; !- Phase Shift of Minimum Surface Temperature {days}", + " KATemps, !- Name", + " 1.8, !- Soil Thermal Conductivity {W/m-K}", + " 920, !- Soil Density {kg/m3}", + " 2200, !- Soil Specific Heat {J/kg-K}", + " 15.5, !- Average Soil Surface Temperature {C}", + " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", + " 8; !- Phase Shift of Minimum Surface Temperature {days}", "GroundHeatExchanger:Vertical:Properties,", - " GHE-1 Props, !- Name", - " 1, !- Depth of Top of Borehole {m}", - " 76.2, !- Borehole Length {m}", - " 0.096, !- Borehole Diameter {m}", - " 0.6, !- Grout Thermal Conductivity {W/m-K}", - " 1.0E+06, !- Grout Thermal Heat Capacity {J/m3-K}", - " 0.389, !- Pipe Thermal Conductivity {W/m-K}", + " GHE-1 Props, !- Name", + " 1, !- Depth of Top of Borehole {m}", + " 76.2, !- Borehole Length {m}", + " 0.096, !- Borehole Diameter {m}", + " 0.6, !- Grout Thermal Conductivity {W/m-K}", + " 1.0E+06, !- Grout Thermal Heat Capacity {J/m3-K}", + " 0.389, !- Pipe Thermal Conductivity {W/m-K}", " 8E+05, !- Pipe Thermal Heat Capacity {J/m3-K}", - " 0.032, !- Pipe Outer Diameter {m}", - " 0.001627, !- Pipe Thickness {m}", - " 0.0426666667; !- U-Tube Distance {m}", + " 0.032, !- Pipe Outer Diameter {m}", + " 0.001627, !- Pipe Thickness {m}", + " 0.0426666667; !- U-Tube Distance {m}", "GroundHeatExchanger:Vertical:Array,", - " GHE-Array, !- Name", - " GHE-1 Props, !- GHE Properties", - " 2, !- Number of Boreholes in X Direction", - " 2, !- Number of Boreholes in Y Direction", - " 2; !- Borehole Spacing {m}", + " GHE-Array, !- Name", + " GHE-1 Props, !- GHE Properties", + " 2, !- Number of Boreholes in X Direction", + " 2, !- Number of Boreholes in Y Direction", + " 2; !- Borehole Spacing {m}", "GroundHeatExchanger:System,", - " Vertical GHE 1x4 Std, !- Name", - " GHLE Inlet, !- Inlet Node Name", - " GHLE Outlet, !- Outlet Node Name", - " 0.1, !- Design Flow Rate {m3/s}", - " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", - " KATemps, !- Undisturbed Ground Temperature Model Name", - " 1.0, !- Ground Thermal Conductivity {W/m-K}", - " 2.4957E+06, !- Ground Thermal Heat Capacity {J/m3-K}", - " , !- Response Factors Object Name", - " GHE-Array; !- GHE Array Object Name"}); + " Vertical GHE 1x4 Std, !- Name", + " GHLE Inlet, !- Inlet Node Name", + " GHLE Outlet, !- Outlet Node Name", + " 0.1, !- Design Flow Rate {m3/s}", + " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", + " KATemps, !- Undisturbed Ground Temperature Model Name", + " 1.0, !- Ground Thermal Conductivity {W/m-K}", + " 2.4957E+06, !- Ground Thermal Heat Capacity {J/m3-K}", + " , !- Response Factors Object Name", + " GHE-Array; !- GHE Array Object Name"}); // Envr variable DisableGLHECaching = true; @@ -2565,7 +2663,7 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_calcBHGroutResistance_2 SetupInitialPlantCallingOrder(*state); SetupBranchControlTypes(*state); - auto &thisGLHE(verticalGLHE[0]); + auto &thisGLHE(state->dataGroundHeatExchanger->verticalGLHE[0]); thisGLHE.loopNum = 1; Node(thisGLHE.inletNodeNum).Temp = 20.0; thisGLHE.massFlowRate = 1; @@ -2587,269 +2685,269 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_calcBHGroutResistance_3 std::string const idf_objects = delimited_string({ "Branch,", - " Main Floor Cooling Condenser Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Coil:Cooling:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", - " Main Floor WAHP Cooling Coil, !- Component 1 Name", - " Main Floor WAHP Cooling Water Inlet Node, !- Component 1 Inlet Node Name", - " Main Floor WAHP Cooling Water Outlet Node; !- Component 1 Outlet Node Name", + " Main Floor Cooling Condenser Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Coil:Cooling:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", + " Main Floor WAHP Cooling Coil, !- Component 1 Name", + " Main Floor WAHP Cooling Water Inlet Node, !- Component 1 Inlet Node Name", + " Main Floor WAHP Cooling Water Outlet Node; !- Component 1 Outlet Node Name", "Branch,", - " Main Floor Heating Condenser Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Coil:Heating:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", - " Main Floor WAHP Heating Coil, !- Component 1 Name", - " Main Floor WAHP Heating Water Inlet Node, !- Component 1 Inlet Node Name", - " Main Floor WAHP Heating Water Outlet Node; !- Component 1 Outlet Node Name", + " Main Floor Heating Condenser Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Coil:Heating:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", + " Main Floor WAHP Heating Coil, !- Component 1 Name", + " Main Floor WAHP Heating Water Inlet Node, !- Component 1 Inlet Node Name", + " Main Floor WAHP Heating Water Outlet Node; !- Component 1 Outlet Node Name", "Branch,", - " GHE-Vert Branch, !- Name", - " , !- Pressure Drop Curve Name", - " GroundHeatExchanger:System, !- Component 1 Object Type", - " Vertical GHE 1x4 Std, !- Component 1 Name", - " GHLE Inlet, !- Component 1 Inlet Node Name", - " GHLE Outlet; !- Component 1 Outlet Node Name", + " GHE-Vert Branch, !- Name", + " , !- Pressure Drop Curve Name", + " GroundHeatExchanger:System, !- Component 1 Object Type", + " Vertical GHE 1x4 Std, !- Component 1 Name", + " GHLE Inlet, !- Component 1 Inlet Node Name", + " GHLE Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Supply Inlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pump:ConstantSpeed, !- Component 1 Object Type", - " Ground Loop Supply Pump, !- Component 1 Name", - " Ground Loop Supply Inlet,!- Component 1 Inlet Node Name", - " Ground Loop Pump Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Supply Inlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pump:ConstantSpeed, !- Component 1 Object Type", + " Ground Loop Supply Pump, !- Component 1 Name", + " Ground Loop Supply Inlet,!- Component 1 Inlet Node Name", + " Ground Loop Pump Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Supply Outlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Supply Outlet Pipe, !- Component 1 Name", - " Ground Loop Supply Outlet Pipe Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Supply Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Supply Outlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Supply Outlet Pipe, !- Component 1 Name", + " Ground Loop Supply Outlet Pipe Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Supply Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Inlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Inlet Pipe, !- Component 1 Name", - " Ground Loop Demand Inlet,!- Component 1 Inlet Node Name", - " Ground Loop Demand Inlet Pipe Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Inlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Inlet Pipe, !- Component 1 Name", + " Ground Loop Demand Inlet,!- Component 1 Inlet Node Name", + " Ground Loop Demand Inlet Pipe Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Bypass Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Side Bypass Pipe, !- Component 1 Name", - " Ground Loop Demand Bypass Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Demand Bypass Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Bypass Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Side Bypass Pipe, !- Component 1 Name", + " Ground Loop Demand Bypass Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Demand Bypass Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Outlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Outlet Pipe, !- Component 1 Name", - " Ground Loop Demand Outlet Pipe Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Demand Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Outlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Outlet Pipe, !- Component 1 Name", + " Ground Loop Demand Outlet Pipe Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Demand Outlet; !- Component 1 Outlet Node Name", "BranchList,", - " Ground Loop Supply Side Branches, !- Name", - " Ground Loop Supply Inlet Branch, !- Branch 1 Name", - " GHE-Vert Branch, !- Branch 2 Name", - " Ground Loop Supply Outlet Branch; !- Branch 3 Name", + " Ground Loop Supply Side Branches, !- Name", + " Ground Loop Supply Inlet Branch, !- Branch 1 Name", + " GHE-Vert Branch, !- Branch 2 Name", + " Ground Loop Supply Outlet Branch; !- Branch 3 Name", "BranchList,", - " Ground Loop Demand Side Branches, !- Name", - " Ground Loop Demand Inlet Branch, !- Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Branch 2 Name", - " Main Floor Heating Condenser Branch, !- Branch 3 Name", - " Ground Loop Demand Bypass Branch, !- Branch 4 Name", - " Ground Loop Demand Outlet Branch; !- Branch 5 Name", + " Ground Loop Demand Side Branches, !- Name", + " Ground Loop Demand Inlet Branch, !- Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Branch 2 Name", + " Main Floor Heating Condenser Branch, !- Branch 3 Name", + " Ground Loop Demand Bypass Branch, !- Branch 4 Name", + " Ground Loop Demand Outlet Branch; !- Branch 5 Name", "Connector:Splitter,", - " Ground Loop Supply Splitter, !- Name", - " Ground Loop Supply Inlet Branch, !- Inlet Branch Name", - " GHE-Vert Branch; !- Outlet Branch 1 Name", + " Ground Loop Supply Splitter, !- Name", + " Ground Loop Supply Inlet Branch, !- Inlet Branch Name", + " GHE-Vert Branch; !- Outlet Branch 1 Name", "Connector:Splitter,", - " Ground Loop Demand Splitter, !- Name", - " Ground Loop Demand Inlet Branch, !- Inlet Branch Name", - " Ground Loop Demand Bypass Branch, !- Outlet Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Outlet Branch 2 Name", - " Main Floor Heating Condenser Branch; !- Outlet Branch 3 Name", + " Ground Loop Demand Splitter, !- Name", + " Ground Loop Demand Inlet Branch, !- Inlet Branch Name", + " Ground Loop Demand Bypass Branch, !- Outlet Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Outlet Branch 2 Name", + " Main Floor Heating Condenser Branch; !- Outlet Branch 3 Name", "Connector:Mixer,", - " Ground Loop Supply Mixer,!- Name", - " Ground Loop Supply Outlet Branch, !- Outlet Branch Name", - " GHE-Vert Branch; !- Inlet Branch 1 Name", + " Ground Loop Supply Mixer,!- Name", + " Ground Loop Supply Outlet Branch, !- Outlet Branch Name", + " GHE-Vert Branch; !- Inlet Branch 1 Name", "Connector:Mixer,", - " Ground Loop Demand Mixer,!- Name", - " Ground Loop Demand Outlet Branch, !- Outlet Branch Name", - " Ground Loop Demand Bypass Branch, !- Inlet Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Inlet Branch 2 Name", - " Main Floor Heating Condenser Branch; !- Inlet Branch 3 Name", + " Ground Loop Demand Mixer,!- Name", + " Ground Loop Demand Outlet Branch, !- Outlet Branch Name", + " Ground Loop Demand Bypass Branch, !- Inlet Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Inlet Branch 2 Name", + " Main Floor Heating Condenser Branch; !- Inlet Branch 3 Name", "ConnectorList,", - " Ground Loop Supply Side Connectors, !- Name", - " Connector:Splitter, !- Connector 1 Object Type", - " Ground Loop Supply Splitter, !- Connector 1 Name", - " Connector:Mixer, !- Connector 2 Object Type", - " Ground Loop Supply Mixer;!- Connector 2 Name", + " Ground Loop Supply Side Connectors, !- Name", + " Connector:Splitter, !- Connector 1 Object Type", + " Ground Loop Supply Splitter, !- Connector 1 Name", + " Connector:Mixer, !- Connector 2 Object Type", + " Ground Loop Supply Mixer;!- Connector 2 Name", "ConnectorList,", - " Ground Loop Demand Side Connectors, !- Name", - " Connector:Splitter, !- Connector 1 Object Type", - " Ground Loop Demand Splitter, !- Connector 1 Name", - " Connector:Mixer, !- Connector 2 Object Type", - " Ground Loop Demand Mixer;!- Connector 2 Name", + " Ground Loop Demand Side Connectors, !- Name", + " Connector:Splitter, !- Connector 1 Object Type", + " Ground Loop Demand Splitter, !- Connector 1 Name", + " Connector:Mixer, !- Connector 2 Object Type", + " Ground Loop Demand Mixer;!- Connector 2 Name", "NodeList,", - " Ground Loop Supply Setpoint Nodes, !- Name", - " GHLE Outlet, !- Node 1 Name", - " Ground Loop Supply Outlet; !- Node 2 Name", + " Ground Loop Supply Setpoint Nodes, !- Name", + " GHLE Outlet, !- Node 1 Name", + " Ground Loop Supply Outlet; !- Node 2 Name", "OutdoorAir:Node,", - " Main Floor WAHP Outside Air Inlet, !- Name", - " -1; !- Height Above Ground {m}", + " Main Floor WAHP Outside Air Inlet, !- Name", + " -1; !- Height Above Ground {m}", "Pipe:Adiabatic,", - " Ground Loop Supply Outlet Pipe, !- Name", - " Ground Loop Supply Outlet Pipe Inlet, !- Inlet Node Name", - " Ground Loop Supply Outlet; !- Outlet Node Name", + " Ground Loop Supply Outlet Pipe, !- Name", + " Ground Loop Supply Outlet Pipe Inlet, !- Inlet Node Name", + " Ground Loop Supply Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Inlet Pipe, !- Name", - " Ground Loop Demand Inlet,!- Inlet Node Name", - " Ground Loop Demand Inlet Pipe Outlet; !- Outlet Node Name", + " Ground Loop Demand Inlet Pipe, !- Name", + " Ground Loop Demand Inlet,!- Inlet Node Name", + " Ground Loop Demand Inlet Pipe Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Side Bypass Pipe, !- Name", - " Ground Loop Demand Bypass Inlet, !- Inlet Node Name", - " Ground Loop Demand Bypass Outlet; !- Outlet Node Name", + " Ground Loop Demand Side Bypass Pipe, !- Name", + " Ground Loop Demand Bypass Inlet, !- Inlet Node Name", + " Ground Loop Demand Bypass Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Outlet Pipe, !- Name", - " Ground Loop Demand Outlet Pipe Inlet, !- Inlet Node Name", - " Ground Loop Demand Outlet; !- Outlet Node Name", + " Ground Loop Demand Outlet Pipe, !- Name", + " Ground Loop Demand Outlet Pipe Inlet, !- Inlet Node Name", + " Ground Loop Demand Outlet; !- Outlet Node Name", "Pump:ConstantSpeed,", - " Ground Loop Supply Pump, !- Name", - " Ground Loop Supply Inlet,!- Inlet Node Name", - " Ground Loop Pump Outlet, !- Outlet Node Name", - " autosize, !- Design Flow Rate {m3/s}", - " 179352, !- Design Pump Head {Pa}", - " autosize, !- Design Power Consumption {W}", - " 0.9, !- Motor Efficiency", - " 0, !- Fraction of Motor Inefficiencies to Fluid Stream", - " Intermittent; !- Pump Control Type", + " Ground Loop Supply Pump, !- Name", + " Ground Loop Supply Inlet,!- Inlet Node Name", + " Ground Loop Pump Outlet, !- Outlet Node Name", + " autosize, !- Design Flow Rate {m3/s}", + " 179352, !- Design Pump Head {Pa}", + " autosize, !- Design Power Consumption {W}", + " 0.9, !- Motor Efficiency", + " 0, !- Fraction of Motor Inefficiencies to Fluid Stream", + " Intermittent; !- Pump Control Type", "PlantLoop,", - " Ground Loop Water Loop, !- Name", - " Water, !- Fluid Type", - " , !- User Defined Fluid Type", - " Only Water Loop Operation, !- Plant Equipment Operation Scheme Name", - " Ground Loop Supply Outlet, !- Loop Temperature Setpoint Node Name", - " 100, !- Maximum Loop Temperature {C}", - " 10, !- Minimum Loop Temperature {C}", - " autosize, !- Maximum Loop Flow Rate {m3/s}", - " 0, !- Minimum Loop Flow Rate {m3/s}", - " autosize, !- Plant Loop Volume {m3}", - " Ground Loop Supply Inlet,!- Plant Side Inlet Node Name", - " Ground Loop Supply Outlet, !- Plant Side Outlet Node Name", - " Ground Loop Supply Side Branches, !- Plant Side Branch List Name", - " Ground Loop Supply Side Connectors, !- Plant Side Connector List Name", - " Ground Loop Demand Inlet,!- Demand Side Inlet Node Name", - " Ground Loop Demand Outlet, !- Demand Side Outlet Node Name", - " Ground Loop Demand Side Branches, !- Demand Side Branch List Name", - " Ground Loop Demand Side Connectors, !- Demand Side Connector List Name", - " SequentialLoad, !- Load Distribution Scheme", - " , !- Availability Manager List Name", - " DualSetPointDeadband; !- Plant Loop Demand Calculation Scheme", + " Ground Loop Water Loop, !- Name", + " Water, !- Fluid Type", + " , !- User Defined Fluid Type", + " Only Water Loop Operation, !- Plant Equipment Operation Scheme Name", + " Ground Loop Supply Outlet, !- Loop Temperature Setpoint Node Name", + " 100, !- Maximum Loop Temperature {C}", + " 10, !- Minimum Loop Temperature {C}", + " autosize, !- Maximum Loop Flow Rate {m3/s}", + " 0, !- Minimum Loop Flow Rate {m3/s}", + " autosize, !- Plant Loop Volume {m3}", + " Ground Loop Supply Inlet,!- Plant Side Inlet Node Name", + " Ground Loop Supply Outlet, !- Plant Side Outlet Node Name", + " Ground Loop Supply Side Branches, !- Plant Side Branch List Name", + " Ground Loop Supply Side Connectors, !- Plant Side Connector List Name", + " Ground Loop Demand Inlet,!- Demand Side Inlet Node Name", + " Ground Loop Demand Outlet, !- Demand Side Outlet Node Name", + " Ground Loop Demand Side Branches, !- Demand Side Branch List Name", + " Ground Loop Demand Side Connectors, !- Demand Side Connector List Name", + " SequentialLoad, !- Load Distribution Scheme", + " , !- Availability Manager List Name", + " DualSetPointDeadband; !- Plant Loop Demand Calculation Scheme", "PlantEquipmentList,", - " Only Water Loop All Cooling Equipment, !- Name", - " GroundHeatExchanger:System, !- Equipment 1 Object Type", - " Vertical GHE 1x4 Std; !- Equipment 1 Name", + " Only Water Loop All Cooling Equipment, !- Name", + " GroundHeatExchanger:System, !- Equipment 1 Object Type", + " Vertical GHE 1x4 Std; !- Equipment 1 Name", "PlantEquipmentOperation:CoolingLoad,", - " Only Water Loop Cool Operation All Hours, !- Name", - " 0, !- Load Range 1 Lower Limit {W}", - " 1000000000000000, !- Load Range 1 Upper Limit {W}", - " Only Water Loop All Cooling Equipment; !- Range 1 Equipment List Name", + " Only Water Loop Cool Operation All Hours, !- Name", + " 0, !- Load Range 1 Lower Limit {W}", + " 1000000000000000, !- Load Range 1 Upper Limit {W}", + " Only Water Loop All Cooling Equipment; !- Range 1 Equipment List Name", "PlantEquipmentOperationSchemes,", - " Only Water Loop Operation, !- Name", - " PlantEquipmentOperation:CoolingLoad, !- Control Scheme 1 Object Type", - " Only Water Loop Cool Operation All Hours, !- Control Scheme 1 Name", - " HVACTemplate-Always 1; !- Control Scheme 1 Schedule Name", + " Only Water Loop Operation, !- Name", + " PlantEquipmentOperation:CoolingLoad, !- Control Scheme 1 Object Type", + " Only Water Loop Cool Operation All Hours, !- Control Scheme 1 Name", + " HVACTemplate-Always 1; !- Control Scheme 1 Schedule Name", "SetpointManager:Scheduled:DualSetpoint,", - " Ground Loop Temp Manager,!- Name", - " Temperature, !- Control Variable", - " HVACTemplate-Always 34, !- High Setpoint Schedule Name", - " HVACTemplate-Always 20, !- Low Setpoint Schedule Name", - " Ground Loop Supply Setpoint Nodes; !- Setpoint Node or NodeList Name", + " Ground Loop Temp Manager,!- Name", + " Temperature, !- Control Variable", + " HVACTemplate-Always 34, !- High Setpoint Schedule Name", + " HVACTemplate-Always 20, !- Low Setpoint Schedule Name", + " Ground Loop Supply Setpoint Nodes; !- Setpoint Node or NodeList Name", "Schedule:Compact,", - " HVACTemplate-Always 4, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,4; !- Field 3", + " HVACTemplate-Always 4, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,4; !- Field 3", "Schedule:Compact,", - " HVACTemplate-Always 34, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,34; !- Field 3", + " HVACTemplate-Always 34, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,34; !- Field 3", "Schedule:Compact,", - " HVACTemplate-Always 20, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,20; !- Field 3", + " HVACTemplate-Always 20, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,20; !- Field 3", "Site:GroundTemperature:Undisturbed:KusudaAchenbach,", - " KATemps, !- Name", - " 1.8, !- Soil Thermal Conductivity {W/m-K}", - " 920, !- Soil Density {kg/m3}", - " 2200, !- Soil Specific Heat {J/kg-K}", - " 15.5, !- Average Soil Surface Temperature {C}", - " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", - " 8; !- Phase Shift of Minimum Surface Temperature {days}", + " KATemps, !- Name", + " 1.8, !- Soil Thermal Conductivity {W/m-K}", + " 920, !- Soil Density {kg/m3}", + " 2200, !- Soil Specific Heat {J/kg-K}", + " 15.5, !- Average Soil Surface Temperature {C}", + " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", + " 8; !- Phase Shift of Minimum Surface Temperature {days}", "GroundHeatExchanger:Vertical:Properties,", - " GHE-1 Props, !- Name", - " 1, !- Depth of Top of Borehole {m}", - " 76.2, !- Borehole Length {m}", - " 0.288, !- Borehole Diameter {m}", - " 1.8, !- Grout Thermal Conductivity {W/m-K}", - " 1.0E+06, !- Grout Thermal Heat Capacity {J/m3-K}", - " 0.389, !- Pipe Thermal Conductivity {W/m-K}", + " GHE-1 Props, !- Name", + " 1, !- Depth of Top of Borehole {m}", + " 76.2, !- Borehole Length {m}", + " 0.288, !- Borehole Diameter {m}", + " 1.8, !- Grout Thermal Conductivity {W/m-K}", + " 1.0E+06, !- Grout Thermal Heat Capacity {J/m3-K}", + " 0.389, !- Pipe Thermal Conductivity {W/m-K}", " 8E+05, !- Pipe Thermal Heat Capacity {J/m3-K}", - " 0.032, !- Pipe Outer Diameter {m}", - " 0.001627, !- Pipe Thickness {m}", - " 0.10666667; !- U-Tube Distance {m}", + " 0.032, !- Pipe Outer Diameter {m}", + " 0.001627, !- Pipe Thickness {m}", + " 0.10666667; !- U-Tube Distance {m}", "GroundHeatExchanger:Vertical:Array,", - " GHE-Array, !- Name", - " GHE-1 Props, !- GHE Properties", - " 2, !- Number of Boreholes in X Direction", - " 2, !- Number of Boreholes in Y Direction", - " 2; !- Borehole Spacing {m}", + " GHE-Array, !- Name", + " GHE-1 Props, !- GHE Properties", + " 2, !- Number of Boreholes in X Direction", + " 2, !- Number of Boreholes in Y Direction", + " 2; !- Borehole Spacing {m}", "GroundHeatExchanger:System,", - " Vertical GHE 1x4 Std, !- Name", - " GHLE Inlet, !- Inlet Node Name", - " GHLE Outlet, !- Outlet Node Name", - " 0.1, !- Design Flow Rate {m3/s}", - " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", - " KATemps, !- Undisturbed Ground Temperature Model Name", - " 1.0, !- Ground Thermal Conductivity {W/m-K}", - " 2.4957E+06, !- Ground Thermal Heat Capacity {J/m3-K}", - " , !- Response Factors Object Name", - " GHE-Array; !- GHE Array Object Name"}); + " Vertical GHE 1x4 Std, !- Name", + " GHLE Inlet, !- Inlet Node Name", + " GHLE Outlet, !- Outlet Node Name", + " 0.1, !- Design Flow Rate {m3/s}", + " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", + " KATemps, !- Undisturbed Ground Temperature Model Name", + " 1.0, !- Ground Thermal Conductivity {W/m-K}", + " 2.4957E+06, !- Ground Thermal Heat Capacity {J/m3-K}", + " , !- Response Factors Object Name", + " GHE-Array; !- GHE Array Object Name"}); // Envr variable DisableGLHECaching = true; @@ -2863,7 +2961,7 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_calcBHGroutResistance_3 SetupInitialPlantCallingOrder(*state); SetupBranchControlTypes(*state); - auto &thisGLHE(verticalGLHE[0]); + auto &thisGLHE(state->dataGroundHeatExchanger->verticalGLHE[0]); thisGLHE.loopNum = 1; Node(thisGLHE.inletNodeNum).Temp = 20.0; thisGLHE.massFlowRate = 1; @@ -2885,269 +2983,269 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_calcBHTotalInternalResi std::string const idf_objects = delimited_string({ "Branch,", - " Main Floor Cooling Condenser Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Coil:Cooling:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", - " Main Floor WAHP Cooling Coil, !- Component 1 Name", - " Main Floor WAHP Cooling Water Inlet Node, !- Component 1 Inlet Node Name", - " Main Floor WAHP Cooling Water Outlet Node; !- Component 1 Outlet Node Name", + " Main Floor Cooling Condenser Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Coil:Cooling:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", + " Main Floor WAHP Cooling Coil, !- Component 1 Name", + " Main Floor WAHP Cooling Water Inlet Node, !- Component 1 Inlet Node Name", + " Main Floor WAHP Cooling Water Outlet Node; !- Component 1 Outlet Node Name", "Branch,", - " Main Floor Heating Condenser Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Coil:Heating:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", - " Main Floor WAHP Heating Coil, !- Component 1 Name", - " Main Floor WAHP Heating Water Inlet Node, !- Component 1 Inlet Node Name", - " Main Floor WAHP Heating Water Outlet Node; !- Component 1 Outlet Node Name", + " Main Floor Heating Condenser Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Coil:Heating:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", + " Main Floor WAHP Heating Coil, !- Component 1 Name", + " Main Floor WAHP Heating Water Inlet Node, !- Component 1 Inlet Node Name", + " Main Floor WAHP Heating Water Outlet Node; !- Component 1 Outlet Node Name", "Branch,", - " GHE-Vert Branch, !- Name", - " , !- Pressure Drop Curve Name", - " GroundHeatExchanger:System, !- Component 1 Object Type", - " Vertical GHE 1x4 Std, !- Component 1 Name", - " GHLE Inlet, !- Component 1 Inlet Node Name", - " GHLE Outlet; !- Component 1 Outlet Node Name", + " GHE-Vert Branch, !- Name", + " , !- Pressure Drop Curve Name", + " GroundHeatExchanger:System, !- Component 1 Object Type", + " Vertical GHE 1x4 Std, !- Component 1 Name", + " GHLE Inlet, !- Component 1 Inlet Node Name", + " GHLE Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Supply Inlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pump:ConstantSpeed, !- Component 1 Object Type", - " Ground Loop Supply Pump, !- Component 1 Name", - " Ground Loop Supply Inlet,!- Component 1 Inlet Node Name", - " Ground Loop Pump Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Supply Inlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pump:ConstantSpeed, !- Component 1 Object Type", + " Ground Loop Supply Pump, !- Component 1 Name", + " Ground Loop Supply Inlet,!- Component 1 Inlet Node Name", + " Ground Loop Pump Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Supply Outlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Supply Outlet Pipe, !- Component 1 Name", - " Ground Loop Supply Outlet Pipe Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Supply Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Supply Outlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Supply Outlet Pipe, !- Component 1 Name", + " Ground Loop Supply Outlet Pipe Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Supply Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Inlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Inlet Pipe, !- Component 1 Name", - " Ground Loop Demand Inlet,!- Component 1 Inlet Node Name", - " Ground Loop Demand Inlet Pipe Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Inlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Inlet Pipe, !- Component 1 Name", + " Ground Loop Demand Inlet,!- Component 1 Inlet Node Name", + " Ground Loop Demand Inlet Pipe Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Bypass Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Side Bypass Pipe, !- Component 1 Name", - " Ground Loop Demand Bypass Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Demand Bypass Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Bypass Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Side Bypass Pipe, !- Component 1 Name", + " Ground Loop Demand Bypass Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Demand Bypass Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Outlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Outlet Pipe, !- Component 1 Name", - " Ground Loop Demand Outlet Pipe Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Demand Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Outlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Outlet Pipe, !- Component 1 Name", + " Ground Loop Demand Outlet Pipe Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Demand Outlet; !- Component 1 Outlet Node Name", "BranchList,", - " Ground Loop Supply Side Branches, !- Name", - " Ground Loop Supply Inlet Branch, !- Branch 1 Name", - " GHE-Vert Branch, !- Branch 2 Name", - " Ground Loop Supply Outlet Branch; !- Branch 3 Name", + " Ground Loop Supply Side Branches, !- Name", + " Ground Loop Supply Inlet Branch, !- Branch 1 Name", + " GHE-Vert Branch, !- Branch 2 Name", + " Ground Loop Supply Outlet Branch; !- Branch 3 Name", "BranchList,", - " Ground Loop Demand Side Branches, !- Name", - " Ground Loop Demand Inlet Branch, !- Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Branch 2 Name", - " Main Floor Heating Condenser Branch, !- Branch 3 Name", - " Ground Loop Demand Bypass Branch, !- Branch 4 Name", - " Ground Loop Demand Outlet Branch; !- Branch 5 Name", + " Ground Loop Demand Side Branches, !- Name", + " Ground Loop Demand Inlet Branch, !- Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Branch 2 Name", + " Main Floor Heating Condenser Branch, !- Branch 3 Name", + " Ground Loop Demand Bypass Branch, !- Branch 4 Name", + " Ground Loop Demand Outlet Branch; !- Branch 5 Name", "Connector:Splitter,", - " Ground Loop Supply Splitter, !- Name", - " Ground Loop Supply Inlet Branch, !- Inlet Branch Name", - " GHE-Vert Branch; !- Outlet Branch 1 Name", + " Ground Loop Supply Splitter, !- Name", + " Ground Loop Supply Inlet Branch, !- Inlet Branch Name", + " GHE-Vert Branch; !- Outlet Branch 1 Name", "Connector:Splitter,", - " Ground Loop Demand Splitter, !- Name", - " Ground Loop Demand Inlet Branch, !- Inlet Branch Name", - " Ground Loop Demand Bypass Branch, !- Outlet Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Outlet Branch 2 Name", - " Main Floor Heating Condenser Branch; !- Outlet Branch 3 Name", + " Ground Loop Demand Splitter, !- Name", + " Ground Loop Demand Inlet Branch, !- Inlet Branch Name", + " Ground Loop Demand Bypass Branch, !- Outlet Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Outlet Branch 2 Name", + " Main Floor Heating Condenser Branch; !- Outlet Branch 3 Name", "Connector:Mixer,", - " Ground Loop Supply Mixer,!- Name", - " Ground Loop Supply Outlet Branch, !- Outlet Branch Name", - " GHE-Vert Branch; !- Inlet Branch 1 Name", + " Ground Loop Supply Mixer,!- Name", + " Ground Loop Supply Outlet Branch, !- Outlet Branch Name", + " GHE-Vert Branch; !- Inlet Branch 1 Name", "Connector:Mixer,", - " Ground Loop Demand Mixer,!- Name", - " Ground Loop Demand Outlet Branch, !- Outlet Branch Name", - " Ground Loop Demand Bypass Branch, !- Inlet Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Inlet Branch 2 Name", - " Main Floor Heating Condenser Branch; !- Inlet Branch 3 Name", + " Ground Loop Demand Mixer,!- Name", + " Ground Loop Demand Outlet Branch, !- Outlet Branch Name", + " Ground Loop Demand Bypass Branch, !- Inlet Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Inlet Branch 2 Name", + " Main Floor Heating Condenser Branch; !- Inlet Branch 3 Name", "ConnectorList,", - " Ground Loop Supply Side Connectors, !- Name", - " Connector:Splitter, !- Connector 1 Object Type", - " Ground Loop Supply Splitter, !- Connector 1 Name", - " Connector:Mixer, !- Connector 2 Object Type", - " Ground Loop Supply Mixer;!- Connector 2 Name", + " Ground Loop Supply Side Connectors, !- Name", + " Connector:Splitter, !- Connector 1 Object Type", + " Ground Loop Supply Splitter, !- Connector 1 Name", + " Connector:Mixer, !- Connector 2 Object Type", + " Ground Loop Supply Mixer;!- Connector 2 Name", "ConnectorList,", - " Ground Loop Demand Side Connectors, !- Name", - " Connector:Splitter, !- Connector 1 Object Type", - " Ground Loop Demand Splitter, !- Connector 1 Name", - " Connector:Mixer, !- Connector 2 Object Type", - " Ground Loop Demand Mixer;!- Connector 2 Name", + " Ground Loop Demand Side Connectors, !- Name", + " Connector:Splitter, !- Connector 1 Object Type", + " Ground Loop Demand Splitter, !- Connector 1 Name", + " Connector:Mixer, !- Connector 2 Object Type", + " Ground Loop Demand Mixer;!- Connector 2 Name", "NodeList,", - " Ground Loop Supply Setpoint Nodes, !- Name", - " GHLE Outlet, !- Node 1 Name", - " Ground Loop Supply Outlet; !- Node 2 Name", + " Ground Loop Supply Setpoint Nodes, !- Name", + " GHLE Outlet, !- Node 1 Name", + " Ground Loop Supply Outlet; !- Node 2 Name", "OutdoorAir:Node,", - " Main Floor WAHP Outside Air Inlet, !- Name", - " -1; !- Height Above Ground {m}", + " Main Floor WAHP Outside Air Inlet, !- Name", + " -1; !- Height Above Ground {m}", "Pipe:Adiabatic,", - " Ground Loop Supply Outlet Pipe, !- Name", - " Ground Loop Supply Outlet Pipe Inlet, !- Inlet Node Name", - " Ground Loop Supply Outlet; !- Outlet Node Name", + " Ground Loop Supply Outlet Pipe, !- Name", + " Ground Loop Supply Outlet Pipe Inlet, !- Inlet Node Name", + " Ground Loop Supply Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Inlet Pipe, !- Name", - " Ground Loop Demand Inlet,!- Inlet Node Name", - " Ground Loop Demand Inlet Pipe Outlet; !- Outlet Node Name", + " Ground Loop Demand Inlet Pipe, !- Name", + " Ground Loop Demand Inlet,!- Inlet Node Name", + " Ground Loop Demand Inlet Pipe Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Side Bypass Pipe, !- Name", - " Ground Loop Demand Bypass Inlet, !- Inlet Node Name", - " Ground Loop Demand Bypass Outlet; !- Outlet Node Name", + " Ground Loop Demand Side Bypass Pipe, !- Name", + " Ground Loop Demand Bypass Inlet, !- Inlet Node Name", + " Ground Loop Demand Bypass Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Outlet Pipe, !- Name", - " Ground Loop Demand Outlet Pipe Inlet, !- Inlet Node Name", - " Ground Loop Demand Outlet; !- Outlet Node Name", + " Ground Loop Demand Outlet Pipe, !- Name", + " Ground Loop Demand Outlet Pipe Inlet, !- Inlet Node Name", + " Ground Loop Demand Outlet; !- Outlet Node Name", "Pump:ConstantSpeed,", - " Ground Loop Supply Pump, !- Name", - " Ground Loop Supply Inlet,!- Inlet Node Name", - " Ground Loop Pump Outlet, !- Outlet Node Name", - " autosize, !- Design Flow Rate {m3/s}", - " 179352, !- Design Pump Head {Pa}", - " autosize, !- Design Power Consumption {W}", - " 0.9, !- Motor Efficiency", - " 0, !- Fraction of Motor Inefficiencies to Fluid Stream", - " Intermittent; !- Pump Control Type", + " Ground Loop Supply Pump, !- Name", + " Ground Loop Supply Inlet,!- Inlet Node Name", + " Ground Loop Pump Outlet, !- Outlet Node Name", + " autosize, !- Design Flow Rate {m3/s}", + " 179352, !- Design Pump Head {Pa}", + " autosize, !- Design Power Consumption {W}", + " 0.9, !- Motor Efficiency", + " 0, !- Fraction of Motor Inefficiencies to Fluid Stream", + " Intermittent; !- Pump Control Type", "PlantLoop,", - " Ground Loop Water Loop, !- Name", - " Water, !- Fluid Type", - " , !- User Defined Fluid Type", - " Only Water Loop Operation, !- Plant Equipment Operation Scheme Name", - " Ground Loop Supply Outlet, !- Loop Temperature Setpoint Node Name", - " 100, !- Maximum Loop Temperature {C}", - " 10, !- Minimum Loop Temperature {C}", - " autosize, !- Maximum Loop Flow Rate {m3/s}", - " 0, !- Minimum Loop Flow Rate {m3/s}", - " autosize, !- Plant Loop Volume {m3}", - " Ground Loop Supply Inlet,!- Plant Side Inlet Node Name", - " Ground Loop Supply Outlet, !- Plant Side Outlet Node Name", - " Ground Loop Supply Side Branches, !- Plant Side Branch List Name", - " Ground Loop Supply Side Connectors, !- Plant Side Connector List Name", - " Ground Loop Demand Inlet,!- Demand Side Inlet Node Name", - " Ground Loop Demand Outlet, !- Demand Side Outlet Node Name", - " Ground Loop Demand Side Branches, !- Demand Side Branch List Name", - " Ground Loop Demand Side Connectors, !- Demand Side Connector List Name", - " SequentialLoad, !- Load Distribution Scheme", - " , !- Availability Manager List Name", - " DualSetPointDeadband; !- Plant Loop Demand Calculation Scheme", + " Ground Loop Water Loop, !- Name", + " Water, !- Fluid Type", + " , !- User Defined Fluid Type", + " Only Water Loop Operation, !- Plant Equipment Operation Scheme Name", + " Ground Loop Supply Outlet, !- Loop Temperature Setpoint Node Name", + " 100, !- Maximum Loop Temperature {C}", + " 10, !- Minimum Loop Temperature {C}", + " autosize, !- Maximum Loop Flow Rate {m3/s}", + " 0, !- Minimum Loop Flow Rate {m3/s}", + " autosize, !- Plant Loop Volume {m3}", + " Ground Loop Supply Inlet,!- Plant Side Inlet Node Name", + " Ground Loop Supply Outlet, !- Plant Side Outlet Node Name", + " Ground Loop Supply Side Branches, !- Plant Side Branch List Name", + " Ground Loop Supply Side Connectors, !- Plant Side Connector List Name", + " Ground Loop Demand Inlet,!- Demand Side Inlet Node Name", + " Ground Loop Demand Outlet, !- Demand Side Outlet Node Name", + " Ground Loop Demand Side Branches, !- Demand Side Branch List Name", + " Ground Loop Demand Side Connectors, !- Demand Side Connector List Name", + " SequentialLoad, !- Load Distribution Scheme", + " , !- Availability Manager List Name", + " DualSetPointDeadband; !- Plant Loop Demand Calculation Scheme", "PlantEquipmentList,", - " Only Water Loop All Cooling Equipment, !- Name", - " GroundHeatExchanger:System, !- Equipment 1 Object Type", - " Vertical GHE 1x4 Std; !- Equipment 1 Name", + " Only Water Loop All Cooling Equipment, !- Name", + " GroundHeatExchanger:System, !- Equipment 1 Object Type", + " Vertical GHE 1x4 Std; !- Equipment 1 Name", "PlantEquipmentOperation:CoolingLoad,", - " Only Water Loop Cool Operation All Hours, !- Name", - " 0, !- Load Range 1 Lower Limit {W}", - " 1000000000000000, !- Load Range 1 Upper Limit {W}", - " Only Water Loop All Cooling Equipment; !- Range 1 Equipment List Name", + " Only Water Loop Cool Operation All Hours, !- Name", + " 0, !- Load Range 1 Lower Limit {W}", + " 1000000000000000, !- Load Range 1 Upper Limit {W}", + " Only Water Loop All Cooling Equipment; !- Range 1 Equipment List Name", "PlantEquipmentOperationSchemes,", - " Only Water Loop Operation, !- Name", - " PlantEquipmentOperation:CoolingLoad, !- Control Scheme 1 Object Type", - " Only Water Loop Cool Operation All Hours, !- Control Scheme 1 Name", - " HVACTemplate-Always 1; !- Control Scheme 1 Schedule Name", + " Only Water Loop Operation, !- Name", + " PlantEquipmentOperation:CoolingLoad, !- Control Scheme 1 Object Type", + " Only Water Loop Cool Operation All Hours, !- Control Scheme 1 Name", + " HVACTemplate-Always 1; !- Control Scheme 1 Schedule Name", "SetpointManager:Scheduled:DualSetpoint,", - " Ground Loop Temp Manager,!- Name", - " Temperature, !- Control Variable", - " HVACTemplate-Always 34, !- High Setpoint Schedule Name", - " HVACTemplate-Always 20, !- Low Setpoint Schedule Name", - " Ground Loop Supply Setpoint Nodes; !- Setpoint Node or NodeList Name", + " Ground Loop Temp Manager,!- Name", + " Temperature, !- Control Variable", + " HVACTemplate-Always 34, !- High Setpoint Schedule Name", + " HVACTemplate-Always 20, !- Low Setpoint Schedule Name", + " Ground Loop Supply Setpoint Nodes; !- Setpoint Node or NodeList Name", "Schedule:Compact,", - " HVACTemplate-Always 4, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,4; !- Field 3", + " HVACTemplate-Always 4, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,4; !- Field 3", "Schedule:Compact,", - " HVACTemplate-Always 34, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,34; !- Field 3", + " HVACTemplate-Always 34, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,34; !- Field 3", "Schedule:Compact,", - " HVACTemplate-Always 20, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,20; !- Field 3", + " HVACTemplate-Always 20, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,20; !- Field 3", "Site:GroundTemperature:Undisturbed:KusudaAchenbach,", - " KATemps, !- Name", - " 1.8, !- Soil Thermal Conductivity {W/m-K}", - " 920, !- Soil Density {kg/m3}", - " 2200, !- Soil Specific Heat {J/kg-K}", - " 15.5, !- Average Soil Surface Temperature {C}", - " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", - " 8; !- Phase Shift of Minimum Surface Temperature {days}", + " KATemps, !- Name", + " 1.8, !- Soil Thermal Conductivity {W/m-K}", + " 920, !- Soil Density {kg/m3}", + " 2200, !- Soil Specific Heat {J/kg-K}", + " 15.5, !- Average Soil Surface Temperature {C}", + " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", + " 8; !- Phase Shift of Minimum Surface Temperature {days}", "GroundHeatExchanger:Vertical:Properties,", - " GHE-1 Props, !- Name", - " 1, !- Depth of Top of Borehole {m}", - " 76.2, !- Borehole Length {m}", - " 0.096, !- Borehole Diameter {m}", - " 0.6, !- Grout Thermal Conductivity {W/m-K}", - " 1.0E+06, !- Grout Thermal Heat Capacity {J/m3-K}", - " 0.389, !- Pipe Thermal Conductivity {W/m-K}", + " GHE-1 Props, !- Name", + " 1, !- Depth of Top of Borehole {m}", + " 76.2, !- Borehole Length {m}", + " 0.096, !- Borehole Diameter {m}", + " 0.6, !- Grout Thermal Conductivity {W/m-K}", + " 1.0E+06, !- Grout Thermal Heat Capacity {J/m3-K}", + " 0.389, !- Pipe Thermal Conductivity {W/m-K}", " 8E+05, !- Pipe Thermal Heat Capacity {J/m3-K}", - " 0.032, !- Pipe Outer Diameter {m}", - " 0.0016279, !- Pipe Thickness {m}", - " 0.032; !- U-Tube Distance {m}", + " 0.032, !- Pipe Outer Diameter {m}", + " 0.0016279, !- Pipe Thickness {m}", + " 0.032; !- U-Tube Distance {m}", "GroundHeatExchanger:Vertical:Array,", - " GHE-Array, !- Name", - " GHE-1 Props, !- GHE Properties", - " 2, !- Number of Boreholes in X Direction", - " 2, !- Number of Boreholes in Y Direction", - " 2; !- Borehole Spacing {m}", + " GHE-Array, !- Name", + " GHE-1 Props, !- GHE Properties", + " 2, !- Number of Boreholes in X Direction", + " 2, !- Number of Boreholes in Y Direction", + " 2; !- Borehole Spacing {m}", "GroundHeatExchanger:System,", - " Vertical GHE 1x4 Std, !- Name", - " GHLE Inlet, !- Inlet Node Name", - " GHLE Outlet, !- Outlet Node Name", - " 0.1, !- Design Flow Rate {m3/s}", - " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", - " KATemps, !- Undisturbed Ground Temperature Model Name", - " 4.0, !- Ground Thermal Conductivity {W/m-K}", - " 2.4957E+06, !- Ground Thermal Heat Capacity {J/m3-K}", - " , !- Response Factors Object Name", - " GHE-Array; !- GHE Array Object Name"}); + " Vertical GHE 1x4 Std, !- Name", + " GHLE Inlet, !- Inlet Node Name", + " GHLE Outlet, !- Outlet Node Name", + " 0.1, !- Design Flow Rate {m3/s}", + " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", + " KATemps, !- Undisturbed Ground Temperature Model Name", + " 4.0, !- Ground Thermal Conductivity {W/m-K}", + " 2.4957E+06, !- Ground Thermal Heat Capacity {J/m3-K}", + " , !- Response Factors Object Name", + " GHE-Array; !- GHE Array Object Name"}); // Envr variable DisableGLHECaching = true; @@ -3161,7 +3259,7 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_calcBHTotalInternalResi SetupInitialPlantCallingOrder(*state); SetupBranchControlTypes(*state); - auto &thisGLHE(verticalGLHE[0]); + auto &thisGLHE(state->dataGroundHeatExchanger->verticalGLHE[0]); thisGLHE.loopNum = 1; Node(thisGLHE.inletNodeNum).Temp = 20.0; thisGLHE.massFlowRate = 1; @@ -3183,269 +3281,269 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_calcBHTotalInternalResi std::string const idf_objects = delimited_string({ "Branch,", - " Main Floor Cooling Condenser Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Coil:Cooling:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", - " Main Floor WAHP Cooling Coil, !- Component 1 Name", - " Main Floor WAHP Cooling Water Inlet Node, !- Component 1 Inlet Node Name", - " Main Floor WAHP Cooling Water Outlet Node; !- Component 1 Outlet Node Name", + " Main Floor Cooling Condenser Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Coil:Cooling:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", + " Main Floor WAHP Cooling Coil, !- Component 1 Name", + " Main Floor WAHP Cooling Water Inlet Node, !- Component 1 Inlet Node Name", + " Main Floor WAHP Cooling Water Outlet Node; !- Component 1 Outlet Node Name", "Branch,", - " Main Floor Heating Condenser Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Coil:Heating:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", - " Main Floor WAHP Heating Coil, !- Component 1 Name", - " Main Floor WAHP Heating Water Inlet Node, !- Component 1 Inlet Node Name", - " Main Floor WAHP Heating Water Outlet Node; !- Component 1 Outlet Node Name", + " Main Floor Heating Condenser Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Coil:Heating:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", + " Main Floor WAHP Heating Coil, !- Component 1 Name", + " Main Floor WAHP Heating Water Inlet Node, !- Component 1 Inlet Node Name", + " Main Floor WAHP Heating Water Outlet Node; !- Component 1 Outlet Node Name", "Branch,", - " GHE-Vert Branch, !- Name", - " , !- Pressure Drop Curve Name", - " GroundHeatExchanger:System, !- Component 1 Object Type", - " Vertical GHE 1x4 Std, !- Component 1 Name", - " GHLE Inlet, !- Component 1 Inlet Node Name", - " GHLE Outlet; !- Component 1 Outlet Node Name", + " GHE-Vert Branch, !- Name", + " , !- Pressure Drop Curve Name", + " GroundHeatExchanger:System, !- Component 1 Object Type", + " Vertical GHE 1x4 Std, !- Component 1 Name", + " GHLE Inlet, !- Component 1 Inlet Node Name", + " GHLE Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Supply Inlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pump:ConstantSpeed, !- Component 1 Object Type", - " Ground Loop Supply Pump, !- Component 1 Name", - " Ground Loop Supply Inlet,!- Component 1 Inlet Node Name", - " Ground Loop Pump Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Supply Inlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pump:ConstantSpeed, !- Component 1 Object Type", + " Ground Loop Supply Pump, !- Component 1 Name", + " Ground Loop Supply Inlet,!- Component 1 Inlet Node Name", + " Ground Loop Pump Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Supply Outlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Supply Outlet Pipe, !- Component 1 Name", - " Ground Loop Supply Outlet Pipe Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Supply Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Supply Outlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Supply Outlet Pipe, !- Component 1 Name", + " Ground Loop Supply Outlet Pipe Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Supply Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Inlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Inlet Pipe, !- Component 1 Name", - " Ground Loop Demand Inlet,!- Component 1 Inlet Node Name", - " Ground Loop Demand Inlet Pipe Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Inlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Inlet Pipe, !- Component 1 Name", + " Ground Loop Demand Inlet,!- Component 1 Inlet Node Name", + " Ground Loop Demand Inlet Pipe Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Bypass Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Side Bypass Pipe, !- Component 1 Name", - " Ground Loop Demand Bypass Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Demand Bypass Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Bypass Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Side Bypass Pipe, !- Component 1 Name", + " Ground Loop Demand Bypass Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Demand Bypass Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Outlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Outlet Pipe, !- Component 1 Name", - " Ground Loop Demand Outlet Pipe Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Demand Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Outlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Outlet Pipe, !- Component 1 Name", + " Ground Loop Demand Outlet Pipe Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Demand Outlet; !- Component 1 Outlet Node Name", "BranchList,", - " Ground Loop Supply Side Branches, !- Name", - " Ground Loop Supply Inlet Branch, !- Branch 1 Name", - " GHE-Vert Branch, !- Branch 2 Name", - " Ground Loop Supply Outlet Branch; !- Branch 3 Name", + " Ground Loop Supply Side Branches, !- Name", + " Ground Loop Supply Inlet Branch, !- Branch 1 Name", + " GHE-Vert Branch, !- Branch 2 Name", + " Ground Loop Supply Outlet Branch; !- Branch 3 Name", "BranchList,", - " Ground Loop Demand Side Branches, !- Name", - " Ground Loop Demand Inlet Branch, !- Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Branch 2 Name", - " Main Floor Heating Condenser Branch, !- Branch 3 Name", - " Ground Loop Demand Bypass Branch, !- Branch 4 Name", - " Ground Loop Demand Outlet Branch; !- Branch 5 Name", + " Ground Loop Demand Side Branches, !- Name", + " Ground Loop Demand Inlet Branch, !- Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Branch 2 Name", + " Main Floor Heating Condenser Branch, !- Branch 3 Name", + " Ground Loop Demand Bypass Branch, !- Branch 4 Name", + " Ground Loop Demand Outlet Branch; !- Branch 5 Name", "Connector:Splitter,", - " Ground Loop Supply Splitter, !- Name", - " Ground Loop Supply Inlet Branch, !- Inlet Branch Name", - " GHE-Vert Branch; !- Outlet Branch 1 Name", + " Ground Loop Supply Splitter, !- Name", + " Ground Loop Supply Inlet Branch, !- Inlet Branch Name", + " GHE-Vert Branch; !- Outlet Branch 1 Name", "Connector:Splitter,", - " Ground Loop Demand Splitter, !- Name", - " Ground Loop Demand Inlet Branch, !- Inlet Branch Name", - " Ground Loop Demand Bypass Branch, !- Outlet Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Outlet Branch 2 Name", - " Main Floor Heating Condenser Branch; !- Outlet Branch 3 Name", + " Ground Loop Demand Splitter, !- Name", + " Ground Loop Demand Inlet Branch, !- Inlet Branch Name", + " Ground Loop Demand Bypass Branch, !- Outlet Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Outlet Branch 2 Name", + " Main Floor Heating Condenser Branch; !- Outlet Branch 3 Name", "Connector:Mixer,", - " Ground Loop Supply Mixer,!- Name", - " Ground Loop Supply Outlet Branch, !- Outlet Branch Name", - " GHE-Vert Branch; !- Inlet Branch 1 Name", + " Ground Loop Supply Mixer,!- Name", + " Ground Loop Supply Outlet Branch, !- Outlet Branch Name", + " GHE-Vert Branch; !- Inlet Branch 1 Name", "Connector:Mixer,", - " Ground Loop Demand Mixer,!- Name", - " Ground Loop Demand Outlet Branch, !- Outlet Branch Name", - " Ground Loop Demand Bypass Branch, !- Inlet Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Inlet Branch 2 Name", - " Main Floor Heating Condenser Branch; !- Inlet Branch 3 Name", + " Ground Loop Demand Mixer,!- Name", + " Ground Loop Demand Outlet Branch, !- Outlet Branch Name", + " Ground Loop Demand Bypass Branch, !- Inlet Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Inlet Branch 2 Name", + " Main Floor Heating Condenser Branch; !- Inlet Branch 3 Name", "ConnectorList,", - " Ground Loop Supply Side Connectors, !- Name", - " Connector:Splitter, !- Connector 1 Object Type", - " Ground Loop Supply Splitter, !- Connector 1 Name", - " Connector:Mixer, !- Connector 2 Object Type", - " Ground Loop Supply Mixer;!- Connector 2 Name", + " Ground Loop Supply Side Connectors, !- Name", + " Connector:Splitter, !- Connector 1 Object Type", + " Ground Loop Supply Splitter, !- Connector 1 Name", + " Connector:Mixer, !- Connector 2 Object Type", + " Ground Loop Supply Mixer;!- Connector 2 Name", "ConnectorList,", - " Ground Loop Demand Side Connectors, !- Name", - " Connector:Splitter, !- Connector 1 Object Type", - " Ground Loop Demand Splitter, !- Connector 1 Name", - " Connector:Mixer, !- Connector 2 Object Type", - " Ground Loop Demand Mixer;!- Connector 2 Name", + " Ground Loop Demand Side Connectors, !- Name", + " Connector:Splitter, !- Connector 1 Object Type", + " Ground Loop Demand Splitter, !- Connector 1 Name", + " Connector:Mixer, !- Connector 2 Object Type", + " Ground Loop Demand Mixer;!- Connector 2 Name", "NodeList,", - " Ground Loop Supply Setpoint Nodes, !- Name", - " GHLE Outlet, !- Node 1 Name", - " Ground Loop Supply Outlet; !- Node 2 Name", + " Ground Loop Supply Setpoint Nodes, !- Name", + " GHLE Outlet, !- Node 1 Name", + " Ground Loop Supply Outlet; !- Node 2 Name", "OutdoorAir:Node,", - " Main Floor WAHP Outside Air Inlet, !- Name", - " -1; !- Height Above Ground {m}", + " Main Floor WAHP Outside Air Inlet, !- Name", + " -1; !- Height Above Ground {m}", "Pipe:Adiabatic,", - " Ground Loop Supply Outlet Pipe, !- Name", - " Ground Loop Supply Outlet Pipe Inlet, !- Inlet Node Name", - " Ground Loop Supply Outlet; !- Outlet Node Name", + " Ground Loop Supply Outlet Pipe, !- Name", + " Ground Loop Supply Outlet Pipe Inlet, !- Inlet Node Name", + " Ground Loop Supply Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Inlet Pipe, !- Name", - " Ground Loop Demand Inlet,!- Inlet Node Name", - " Ground Loop Demand Inlet Pipe Outlet; !- Outlet Node Name", + " Ground Loop Demand Inlet Pipe, !- Name", + " Ground Loop Demand Inlet,!- Inlet Node Name", + " Ground Loop Demand Inlet Pipe Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Side Bypass Pipe, !- Name", - " Ground Loop Demand Bypass Inlet, !- Inlet Node Name", - " Ground Loop Demand Bypass Outlet; !- Outlet Node Name", + " Ground Loop Demand Side Bypass Pipe, !- Name", + " Ground Loop Demand Bypass Inlet, !- Inlet Node Name", + " Ground Loop Demand Bypass Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Outlet Pipe, !- Name", - " Ground Loop Demand Outlet Pipe Inlet, !- Inlet Node Name", - " Ground Loop Demand Outlet; !- Outlet Node Name", + " Ground Loop Demand Outlet Pipe, !- Name", + " Ground Loop Demand Outlet Pipe Inlet, !- Inlet Node Name", + " Ground Loop Demand Outlet; !- Outlet Node Name", "Pump:ConstantSpeed,", - " Ground Loop Supply Pump, !- Name", - " Ground Loop Supply Inlet,!- Inlet Node Name", - " Ground Loop Pump Outlet, !- Outlet Node Name", - " autosize, !- Design Flow Rate {m3/s}", - " 179352, !- Design Pump Head {Pa}", - " autosize, !- Design Power Consumption {W}", - " 0.9, !- Motor Efficiency", - " 0, !- Fraction of Motor Inefficiencies to Fluid Stream", - " Intermittent; !- Pump Control Type", + " Ground Loop Supply Pump, !- Name", + " Ground Loop Supply Inlet,!- Inlet Node Name", + " Ground Loop Pump Outlet, !- Outlet Node Name", + " autosize, !- Design Flow Rate {m3/s}", + " 179352, !- Design Pump Head {Pa}", + " autosize, !- Design Power Consumption {W}", + " 0.9, !- Motor Efficiency", + " 0, !- Fraction of Motor Inefficiencies to Fluid Stream", + " Intermittent; !- Pump Control Type", "PlantLoop,", - " Ground Loop Water Loop, !- Name", - " Water, !- Fluid Type", - " , !- User Defined Fluid Type", - " Only Water Loop Operation, !- Plant Equipment Operation Scheme Name", - " Ground Loop Supply Outlet, !- Loop Temperature Setpoint Node Name", - " 100, !- Maximum Loop Temperature {C}", - " 10, !- Minimum Loop Temperature {C}", - " autosize, !- Maximum Loop Flow Rate {m3/s}", - " 0, !- Minimum Loop Flow Rate {m3/s}", - " autosize, !- Plant Loop Volume {m3}", - " Ground Loop Supply Inlet,!- Plant Side Inlet Node Name", - " Ground Loop Supply Outlet, !- Plant Side Outlet Node Name", - " Ground Loop Supply Side Branches, !- Plant Side Branch List Name", - " Ground Loop Supply Side Connectors, !- Plant Side Connector List Name", - " Ground Loop Demand Inlet,!- Demand Side Inlet Node Name", - " Ground Loop Demand Outlet, !- Demand Side Outlet Node Name", - " Ground Loop Demand Side Branches, !- Demand Side Branch List Name", - " Ground Loop Demand Side Connectors, !- Demand Side Connector List Name", - " SequentialLoad, !- Load Distribution Scheme", - " , !- Availability Manager List Name", - " DualSetPointDeadband; !- Plant Loop Demand Calculation Scheme", + " Ground Loop Water Loop, !- Name", + " Water, !- Fluid Type", + " , !- User Defined Fluid Type", + " Only Water Loop Operation, !- Plant Equipment Operation Scheme Name", + " Ground Loop Supply Outlet, !- Loop Temperature Setpoint Node Name", + " 100, !- Maximum Loop Temperature {C}", + " 10, !- Minimum Loop Temperature {C}", + " autosize, !- Maximum Loop Flow Rate {m3/s}", + " 0, !- Minimum Loop Flow Rate {m3/s}", + " autosize, !- Plant Loop Volume {m3}", + " Ground Loop Supply Inlet,!- Plant Side Inlet Node Name", + " Ground Loop Supply Outlet, !- Plant Side Outlet Node Name", + " Ground Loop Supply Side Branches, !- Plant Side Branch List Name", + " Ground Loop Supply Side Connectors, !- Plant Side Connector List Name", + " Ground Loop Demand Inlet,!- Demand Side Inlet Node Name", + " Ground Loop Demand Outlet, !- Demand Side Outlet Node Name", + " Ground Loop Demand Side Branches, !- Demand Side Branch List Name", + " Ground Loop Demand Side Connectors, !- Demand Side Connector List Name", + " SequentialLoad, !- Load Distribution Scheme", + " , !- Availability Manager List Name", + " DualSetPointDeadband; !- Plant Loop Demand Calculation Scheme", "PlantEquipmentList,", - " Only Water Loop All Cooling Equipment, !- Name", - " GroundHeatExchanger:System, !- Equipment 1 Object Type", - " Vertical GHE 1x4 Std; !- Equipment 1 Name", + " Only Water Loop All Cooling Equipment, !- Name", + " GroundHeatExchanger:System, !- Equipment 1 Object Type", + " Vertical GHE 1x4 Std; !- Equipment 1 Name", "PlantEquipmentOperation:CoolingLoad,", - " Only Water Loop Cool Operation All Hours, !- Name", - " 0, !- Load Range 1 Lower Limit {W}", - " 1000000000000000, !- Load Range 1 Upper Limit {W}", - " Only Water Loop All Cooling Equipment; !- Range 1 Equipment List Name", + " Only Water Loop Cool Operation All Hours, !- Name", + " 0, !- Load Range 1 Lower Limit {W}", + " 1000000000000000, !- Load Range 1 Upper Limit {W}", + " Only Water Loop All Cooling Equipment; !- Range 1 Equipment List Name", "PlantEquipmentOperationSchemes,", - " Only Water Loop Operation, !- Name", - " PlantEquipmentOperation:CoolingLoad, !- Control Scheme 1 Object Type", - " Only Water Loop Cool Operation All Hours, !- Control Scheme 1 Name", - " HVACTemplate-Always 1; !- Control Scheme 1 Schedule Name", + " Only Water Loop Operation, !- Name", + " PlantEquipmentOperation:CoolingLoad, !- Control Scheme 1 Object Type", + " Only Water Loop Cool Operation All Hours, !- Control Scheme 1 Name", + " HVACTemplate-Always 1; !- Control Scheme 1 Schedule Name", "SetpointManager:Scheduled:DualSetpoint,", - " Ground Loop Temp Manager,!- Name", - " Temperature, !- Control Variable", - " HVACTemplate-Always 34, !- High Setpoint Schedule Name", - " HVACTemplate-Always 20, !- Low Setpoint Schedule Name", - " Ground Loop Supply Setpoint Nodes; !- Setpoint Node or NodeList Name", + " Ground Loop Temp Manager,!- Name", + " Temperature, !- Control Variable", + " HVACTemplate-Always 34, !- High Setpoint Schedule Name", + " HVACTemplate-Always 20, !- Low Setpoint Schedule Name", + " Ground Loop Supply Setpoint Nodes; !- Setpoint Node or NodeList Name", "Schedule:Compact,", - " HVACTemplate-Always 4, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,4; !- Field 3", + " HVACTemplate-Always 4, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,4; !- Field 3", "Schedule:Compact,", - " HVACTemplate-Always 34, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,34; !- Field 3", + " HVACTemplate-Always 34, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,34; !- Field 3", "Schedule:Compact,", - " HVACTemplate-Always 20, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,20; !- Field 3", + " HVACTemplate-Always 20, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,20; !- Field 3", "Site:GroundTemperature:Undisturbed:KusudaAchenbach,", - " KATemps, !- Name", - " 1.8, !- Soil Thermal Conductivity {W/m-K}", - " 920, !- Soil Density {kg/m3}", - " 2200, !- Soil Specific Heat {J/kg-K}", - " 15.5, !- Average Soil Surface Temperature {C}", - " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", - " 8; !- Phase Shift of Minimum Surface Temperature {days}", + " KATemps, !- Name", + " 1.8, !- Soil Thermal Conductivity {W/m-K}", + " 920, !- Soil Density {kg/m3}", + " 2200, !- Soil Specific Heat {J/kg-K}", + " 15.5, !- Average Soil Surface Temperature {C}", + " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", + " 8; !- Phase Shift of Minimum Surface Temperature {days}", "GroundHeatExchanger:Vertical:Properties,", - " GHE-1 Props, !- Name", - " 1, !- Depth of Top of Borehole {m}", - " 76.2, !- Borehole Length {m}", - " 0.192, !- Borehole Diameter {m}", - " 3.6, !- Grout Thermal Conductivity {W/m-K}", - " 1.0E+06, !- Grout Thermal Heat Capacity {J/m3-K}", - " 0.389, !- Pipe Thermal Conductivity {W/m-K}", + " GHE-1 Props, !- Name", + " 1, !- Depth of Top of Borehole {m}", + " 76.2, !- Borehole Length {m}", + " 0.192, !- Borehole Diameter {m}", + " 3.6, !- Grout Thermal Conductivity {W/m-K}", + " 1.0E+06, !- Grout Thermal Heat Capacity {J/m3-K}", + " 0.389, !- Pipe Thermal Conductivity {W/m-K}", " 8E+05, !- Pipe Thermal Heat Capacity {J/m3-K}", - " 0.032, !- Pipe Outer Diameter {m}", - " 0.0016279, !- Pipe Thickness {m}", - " 0.032; !- U-Tube Distance {m}", + " 0.032, !- Pipe Outer Diameter {m}", + " 0.0016279, !- Pipe Thickness {m}", + " 0.032; !- U-Tube Distance {m}", "GroundHeatExchanger:Vertical:Array,", - " GHE-Array, !- Name", - " GHE-1 Props, !- GHE Properties", - " 2, !- Number of Boreholes in X Direction", - " 2, !- Number of Boreholes in Y Direction", - " 2; !- Borehole Spacing {m}", + " GHE-Array, !- Name", + " GHE-1 Props, !- GHE Properties", + " 2, !- Number of Boreholes in X Direction", + " 2, !- Number of Boreholes in Y Direction", + " 2; !- Borehole Spacing {m}", "GroundHeatExchanger:System,", - " Vertical GHE 1x4 Std, !- Name", - " GHLE Inlet, !- Inlet Node Name", - " GHLE Outlet, !- Outlet Node Name", - " 0.1, !- Design Flow Rate {m3/s}", - " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", - " KATemps, !- Undisturbed Ground Temperature Model Name", - " 3.0, !- Ground Thermal Conductivity {W/m-K}", - " 2.4957E+06, !- Ground Thermal Heat Capacity {J/m3-K}", - " , !- Response Factors Object Name", - " GHE-Array; !- GHE Array Object Name"}); + " Vertical GHE 1x4 Std, !- Name", + " GHLE Inlet, !- Inlet Node Name", + " GHLE Outlet, !- Outlet Node Name", + " 0.1, !- Design Flow Rate {m3/s}", + " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", + " KATemps, !- Undisturbed Ground Temperature Model Name", + " 3.0, !- Ground Thermal Conductivity {W/m-K}", + " 2.4957E+06, !- Ground Thermal Heat Capacity {J/m3-K}", + " , !- Response Factors Object Name", + " GHE-Array; !- GHE Array Object Name"}); // Envr variable DisableGLHECaching = true; @@ -3459,7 +3557,7 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_calcBHTotalInternalResi SetupInitialPlantCallingOrder(*state); SetupBranchControlTypes(*state); - auto &thisGLHE(verticalGLHE[0]); + auto &thisGLHE(state->dataGroundHeatExchanger->verticalGLHE[0]); thisGLHE.loopNum = 1; Node(thisGLHE.inletNodeNum).Temp = 20.0; thisGLHE.massFlowRate = 1; @@ -3481,269 +3579,269 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_calcBHTotalInternalResi std::string const idf_objects = delimited_string({ "Branch,", - " Main Floor Cooling Condenser Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Coil:Cooling:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", - " Main Floor WAHP Cooling Coil, !- Component 1 Name", - " Main Floor WAHP Cooling Water Inlet Node, !- Component 1 Inlet Node Name", - " Main Floor WAHP Cooling Water Outlet Node; !- Component 1 Outlet Node Name", + " Main Floor Cooling Condenser Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Coil:Cooling:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", + " Main Floor WAHP Cooling Coil, !- Component 1 Name", + " Main Floor WAHP Cooling Water Inlet Node, !- Component 1 Inlet Node Name", + " Main Floor WAHP Cooling Water Outlet Node; !- Component 1 Outlet Node Name", "Branch,", - " Main Floor Heating Condenser Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Coil:Heating:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", - " Main Floor WAHP Heating Coil, !- Component 1 Name", - " Main Floor WAHP Heating Water Inlet Node, !- Component 1 Inlet Node Name", - " Main Floor WAHP Heating Water Outlet Node; !- Component 1 Outlet Node Name", + " Main Floor Heating Condenser Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Coil:Heating:WaterToAirHeatPump:EquationFit, !- Component 1 Object Type", + " Main Floor WAHP Heating Coil, !- Component 1 Name", + " Main Floor WAHP Heating Water Inlet Node, !- Component 1 Inlet Node Name", + " Main Floor WAHP Heating Water Outlet Node; !- Component 1 Outlet Node Name", "Branch,", - " GHE-Vert Branch, !- Name", - " , !- Pressure Drop Curve Name", - " GroundHeatExchanger:System, !- Component 1 Object Type", - " Vertical GHE 1x4 Std, !- Component 1 Name", - " GHLE Inlet, !- Component 1 Inlet Node Name", - " GHLE Outlet; !- Component 1 Outlet Node Name", + " GHE-Vert Branch, !- Name", + " , !- Pressure Drop Curve Name", + " GroundHeatExchanger:System, !- Component 1 Object Type", + " Vertical GHE 1x4 Std, !- Component 1 Name", + " GHLE Inlet, !- Component 1 Inlet Node Name", + " GHLE Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Supply Inlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pump:ConstantSpeed, !- Component 1 Object Type", - " Ground Loop Supply Pump, !- Component 1 Name", - " Ground Loop Supply Inlet,!- Component 1 Inlet Node Name", - " Ground Loop Pump Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Supply Inlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pump:ConstantSpeed, !- Component 1 Object Type", + " Ground Loop Supply Pump, !- Component 1 Name", + " Ground Loop Supply Inlet,!- Component 1 Inlet Node Name", + " Ground Loop Pump Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Supply Outlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Supply Outlet Pipe, !- Component 1 Name", - " Ground Loop Supply Outlet Pipe Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Supply Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Supply Outlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Supply Outlet Pipe, !- Component 1 Name", + " Ground Loop Supply Outlet Pipe Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Supply Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Inlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Inlet Pipe, !- Component 1 Name", - " Ground Loop Demand Inlet,!- Component 1 Inlet Node Name", - " Ground Loop Demand Inlet Pipe Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Inlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Inlet Pipe, !- Component 1 Name", + " Ground Loop Demand Inlet,!- Component 1 Inlet Node Name", + " Ground Loop Demand Inlet Pipe Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Bypass Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Side Bypass Pipe, !- Component 1 Name", - " Ground Loop Demand Bypass Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Demand Bypass Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Bypass Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Side Bypass Pipe, !- Component 1 Name", + " Ground Loop Demand Bypass Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Demand Bypass Outlet; !- Component 1 Outlet Node Name", "Branch,", - " Ground Loop Demand Outlet Branch, !- Name", - " , !- Pressure Drop Curve Name", - " Pipe:Adiabatic, !- Component 1 Object Type", - " Ground Loop Demand Outlet Pipe, !- Component 1 Name", - " Ground Loop Demand Outlet Pipe Inlet, !- Component 1 Inlet Node Name", - " Ground Loop Demand Outlet; !- Component 1 Outlet Node Name", + " Ground Loop Demand Outlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " Ground Loop Demand Outlet Pipe, !- Component 1 Name", + " Ground Loop Demand Outlet Pipe Inlet, !- Component 1 Inlet Node Name", + " Ground Loop Demand Outlet; !- Component 1 Outlet Node Name", "BranchList,", - " Ground Loop Supply Side Branches, !- Name", - " Ground Loop Supply Inlet Branch, !- Branch 1 Name", - " GHE-Vert Branch, !- Branch 2 Name", - " Ground Loop Supply Outlet Branch; !- Branch 3 Name", + " Ground Loop Supply Side Branches, !- Name", + " Ground Loop Supply Inlet Branch, !- Branch 1 Name", + " GHE-Vert Branch, !- Branch 2 Name", + " Ground Loop Supply Outlet Branch; !- Branch 3 Name", "BranchList,", - " Ground Loop Demand Side Branches, !- Name", - " Ground Loop Demand Inlet Branch, !- Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Branch 2 Name", - " Main Floor Heating Condenser Branch, !- Branch 3 Name", - " Ground Loop Demand Bypass Branch, !- Branch 4 Name", - " Ground Loop Demand Outlet Branch; !- Branch 5 Name", + " Ground Loop Demand Side Branches, !- Name", + " Ground Loop Demand Inlet Branch, !- Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Branch 2 Name", + " Main Floor Heating Condenser Branch, !- Branch 3 Name", + " Ground Loop Demand Bypass Branch, !- Branch 4 Name", + " Ground Loop Demand Outlet Branch; !- Branch 5 Name", "Connector:Splitter,", - " Ground Loop Supply Splitter, !- Name", - " Ground Loop Supply Inlet Branch, !- Inlet Branch Name", - " GHE-Vert Branch; !- Outlet Branch 1 Name", + " Ground Loop Supply Splitter, !- Name", + " Ground Loop Supply Inlet Branch, !- Inlet Branch Name", + " GHE-Vert Branch; !- Outlet Branch 1 Name", "Connector:Splitter,", - " Ground Loop Demand Splitter, !- Name", - " Ground Loop Demand Inlet Branch, !- Inlet Branch Name", - " Ground Loop Demand Bypass Branch, !- Outlet Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Outlet Branch 2 Name", - " Main Floor Heating Condenser Branch; !- Outlet Branch 3 Name", + " Ground Loop Demand Splitter, !- Name", + " Ground Loop Demand Inlet Branch, !- Inlet Branch Name", + " Ground Loop Demand Bypass Branch, !- Outlet Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Outlet Branch 2 Name", + " Main Floor Heating Condenser Branch; !- Outlet Branch 3 Name", "Connector:Mixer,", - " Ground Loop Supply Mixer,!- Name", - " Ground Loop Supply Outlet Branch, !- Outlet Branch Name", - " GHE-Vert Branch; !- Inlet Branch 1 Name", + " Ground Loop Supply Mixer,!- Name", + " Ground Loop Supply Outlet Branch, !- Outlet Branch Name", + " GHE-Vert Branch; !- Inlet Branch 1 Name", "Connector:Mixer,", - " Ground Loop Demand Mixer,!- Name", - " Ground Loop Demand Outlet Branch, !- Outlet Branch Name", - " Ground Loop Demand Bypass Branch, !- Inlet Branch 1 Name", - " Main Floor Cooling Condenser Branch, !- Inlet Branch 2 Name", - " Main Floor Heating Condenser Branch; !- Inlet Branch 3 Name", + " Ground Loop Demand Mixer,!- Name", + " Ground Loop Demand Outlet Branch, !- Outlet Branch Name", + " Ground Loop Demand Bypass Branch, !- Inlet Branch 1 Name", + " Main Floor Cooling Condenser Branch, !- Inlet Branch 2 Name", + " Main Floor Heating Condenser Branch; !- Inlet Branch 3 Name", "ConnectorList,", - " Ground Loop Supply Side Connectors, !- Name", - " Connector:Splitter, !- Connector 1 Object Type", - " Ground Loop Supply Splitter, !- Connector 1 Name", - " Connector:Mixer, !- Connector 2 Object Type", - " Ground Loop Supply Mixer;!- Connector 2 Name", + " Ground Loop Supply Side Connectors, !- Name", + " Connector:Splitter, !- Connector 1 Object Type", + " Ground Loop Supply Splitter, !- Connector 1 Name", + " Connector:Mixer, !- Connector 2 Object Type", + " Ground Loop Supply Mixer;!- Connector 2 Name", "ConnectorList,", - " Ground Loop Demand Side Connectors, !- Name", - " Connector:Splitter, !- Connector 1 Object Type", - " Ground Loop Demand Splitter, !- Connector 1 Name", - " Connector:Mixer, !- Connector 2 Object Type", - " Ground Loop Demand Mixer;!- Connector 2 Name", + " Ground Loop Demand Side Connectors, !- Name", + " Connector:Splitter, !- Connector 1 Object Type", + " Ground Loop Demand Splitter, !- Connector 1 Name", + " Connector:Mixer, !- Connector 2 Object Type", + " Ground Loop Demand Mixer;!- Connector 2 Name", "NodeList,", - " Ground Loop Supply Setpoint Nodes, !- Name", - " GHLE Outlet, !- Node 1 Name", - " Ground Loop Supply Outlet; !- Node 2 Name", + " Ground Loop Supply Setpoint Nodes, !- Name", + " GHLE Outlet, !- Node 1 Name", + " Ground Loop Supply Outlet; !- Node 2 Name", "OutdoorAir:Node,", - " Main Floor WAHP Outside Air Inlet, !- Name", - " -1; !- Height Above Ground {m}", + " Main Floor WAHP Outside Air Inlet, !- Name", + " -1; !- Height Above Ground {m}", "Pipe:Adiabatic,", - " Ground Loop Supply Outlet Pipe, !- Name", - " Ground Loop Supply Outlet Pipe Inlet, !- Inlet Node Name", - " Ground Loop Supply Outlet; !- Outlet Node Name", + " Ground Loop Supply Outlet Pipe, !- Name", + " Ground Loop Supply Outlet Pipe Inlet, !- Inlet Node Name", + " Ground Loop Supply Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Inlet Pipe, !- Name", - " Ground Loop Demand Inlet,!- Inlet Node Name", - " Ground Loop Demand Inlet Pipe Outlet; !- Outlet Node Name", + " Ground Loop Demand Inlet Pipe, !- Name", + " Ground Loop Demand Inlet,!- Inlet Node Name", + " Ground Loop Demand Inlet Pipe Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Side Bypass Pipe, !- Name", - " Ground Loop Demand Bypass Inlet, !- Inlet Node Name", - " Ground Loop Demand Bypass Outlet; !- Outlet Node Name", + " Ground Loop Demand Side Bypass Pipe, !- Name", + " Ground Loop Demand Bypass Inlet, !- Inlet Node Name", + " Ground Loop Demand Bypass Outlet; !- Outlet Node Name", "Pipe:Adiabatic,", - " Ground Loop Demand Outlet Pipe, !- Name", - " Ground Loop Demand Outlet Pipe Inlet, !- Inlet Node Name", - " Ground Loop Demand Outlet; !- Outlet Node Name", + " Ground Loop Demand Outlet Pipe, !- Name", + " Ground Loop Demand Outlet Pipe Inlet, !- Inlet Node Name", + " Ground Loop Demand Outlet; !- Outlet Node Name", "Pump:ConstantSpeed,", - " Ground Loop Supply Pump, !- Name", - " Ground Loop Supply Inlet,!- Inlet Node Name", - " Ground Loop Pump Outlet, !- Outlet Node Name", - " autosize, !- Design Flow Rate {m3/s}", - " 179352, !- Design Pump Head {Pa}", - " autosize, !- Design Power Consumption {W}", - " 0.9, !- Motor Efficiency", - " 0, !- Fraction of Motor Inefficiencies to Fluid Stream", - " Intermittent; !- Pump Control Type", + " Ground Loop Supply Pump, !- Name", + " Ground Loop Supply Inlet,!- Inlet Node Name", + " Ground Loop Pump Outlet, !- Outlet Node Name", + " autosize, !- Design Flow Rate {m3/s}", + " 179352, !- Design Pump Head {Pa}", + " autosize, !- Design Power Consumption {W}", + " 0.9, !- Motor Efficiency", + " 0, !- Fraction of Motor Inefficiencies to Fluid Stream", + " Intermittent; !- Pump Control Type", "PlantLoop,", - " Ground Loop Water Loop, !- Name", - " Water, !- Fluid Type", - " , !- User Defined Fluid Type", - " Only Water Loop Operation, !- Plant Equipment Operation Scheme Name", - " Ground Loop Supply Outlet, !- Loop Temperature Setpoint Node Name", - " 100, !- Maximum Loop Temperature {C}", - " 10, !- Minimum Loop Temperature {C}", - " autosize, !- Maximum Loop Flow Rate {m3/s}", - " 0, !- Minimum Loop Flow Rate {m3/s}", - " autosize, !- Plant Loop Volume {m3}", - " Ground Loop Supply Inlet,!- Plant Side Inlet Node Name", - " Ground Loop Supply Outlet, !- Plant Side Outlet Node Name", - " Ground Loop Supply Side Branches, !- Plant Side Branch List Name", - " Ground Loop Supply Side Connectors, !- Plant Side Connector List Name", - " Ground Loop Demand Inlet,!- Demand Side Inlet Node Name", - " Ground Loop Demand Outlet, !- Demand Side Outlet Node Name", - " Ground Loop Demand Side Branches, !- Demand Side Branch List Name", - " Ground Loop Demand Side Connectors, !- Demand Side Connector List Name", - " SequentialLoad, !- Load Distribution Scheme", - " , !- Availability Manager List Name", - " DualSetPointDeadband; !- Plant Loop Demand Calculation Scheme", + " Ground Loop Water Loop, !- Name", + " Water, !- Fluid Type", + " , !- User Defined Fluid Type", + " Only Water Loop Operation, !- Plant Equipment Operation Scheme Name", + " Ground Loop Supply Outlet, !- Loop Temperature Setpoint Node Name", + " 100, !- Maximum Loop Temperature {C}", + " 10, !- Minimum Loop Temperature {C}", + " autosize, !- Maximum Loop Flow Rate {m3/s}", + " 0, !- Minimum Loop Flow Rate {m3/s}", + " autosize, !- Plant Loop Volume {m3}", + " Ground Loop Supply Inlet,!- Plant Side Inlet Node Name", + " Ground Loop Supply Outlet, !- Plant Side Outlet Node Name", + " Ground Loop Supply Side Branches, !- Plant Side Branch List Name", + " Ground Loop Supply Side Connectors, !- Plant Side Connector List Name", + " Ground Loop Demand Inlet,!- Demand Side Inlet Node Name", + " Ground Loop Demand Outlet, !- Demand Side Outlet Node Name", + " Ground Loop Demand Side Branches, !- Demand Side Branch List Name", + " Ground Loop Demand Side Connectors, !- Demand Side Connector List Name", + " SequentialLoad, !- Load Distribution Scheme", + " , !- Availability Manager List Name", + " DualSetPointDeadband; !- Plant Loop Demand Calculation Scheme", "PlantEquipmentList,", - " Only Water Loop All Cooling Equipment, !- Name", - " GroundHeatExchanger:System, !- Equipment 1 Object Type", - " Vertical GHE 1x4 Std; !- Equipment 1 Name", + " Only Water Loop All Cooling Equipment, !- Name", + " GroundHeatExchanger:System, !- Equipment 1 Object Type", + " Vertical GHE 1x4 Std; !- Equipment 1 Name", "PlantEquipmentOperation:CoolingLoad,", - " Only Water Loop Cool Operation All Hours, !- Name", - " 0, !- Load Range 1 Lower Limit {W}", - " 1000000000000000, !- Load Range 1 Upper Limit {W}", - " Only Water Loop All Cooling Equipment; !- Range 1 Equipment List Name", + " Only Water Loop Cool Operation All Hours, !- Name", + " 0, !- Load Range 1 Lower Limit {W}", + " 1000000000000000, !- Load Range 1 Upper Limit {W}", + " Only Water Loop All Cooling Equipment; !- Range 1 Equipment List Name", "PlantEquipmentOperationSchemes,", - " Only Water Loop Operation, !- Name", - " PlantEquipmentOperation:CoolingLoad, !- Control Scheme 1 Object Type", - " Only Water Loop Cool Operation All Hours, !- Control Scheme 1 Name", - " HVACTemplate-Always 1; !- Control Scheme 1 Schedule Name", + " Only Water Loop Operation, !- Name", + " PlantEquipmentOperation:CoolingLoad, !- Control Scheme 1 Object Type", + " Only Water Loop Cool Operation All Hours, !- Control Scheme 1 Name", + " HVACTemplate-Always 1; !- Control Scheme 1 Schedule Name", "SetpointManager:Scheduled:DualSetpoint,", - " Ground Loop Temp Manager,!- Name", - " Temperature, !- Control Variable", - " HVACTemplate-Always 34, !- High Setpoint Schedule Name", - " HVACTemplate-Always 20, !- Low Setpoint Schedule Name", - " Ground Loop Supply Setpoint Nodes; !- Setpoint Node or NodeList Name", + " Ground Loop Temp Manager,!- Name", + " Temperature, !- Control Variable", + " HVACTemplate-Always 34, !- High Setpoint Schedule Name", + " HVACTemplate-Always 20, !- Low Setpoint Schedule Name", + " Ground Loop Supply Setpoint Nodes; !- Setpoint Node or NodeList Name", "Schedule:Compact,", - " HVACTemplate-Always 4, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,4; !- Field 3", + " HVACTemplate-Always 4, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,4; !- Field 3", "Schedule:Compact,", - " HVACTemplate-Always 34, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,34; !- Field 3", + " HVACTemplate-Always 34, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,34; !- Field 3", "Schedule:Compact,", - " HVACTemplate-Always 20, !- Name", - " HVACTemplate Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,20; !- Field 3", + " HVACTemplate-Always 20, !- Name", + " HVACTemplate Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,20; !- Field 3", "Site:GroundTemperature:Undisturbed:KusudaAchenbach,", - " KATemps, !- Name", - " 1.8, !- Soil Thermal Conductivity {W/m-K}", - " 920, !- Soil Density {kg/m3}", - " 2200, !- Soil Specific Heat {J/kg-K}", - " 15.5, !- Average Soil Surface Temperature {C}", - " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", - " 8; !- Phase Shift of Minimum Surface Temperature {days}", + " KATemps, !- Name", + " 1.8, !- Soil Thermal Conductivity {W/m-K}", + " 920, !- Soil Density {kg/m3}", + " 2200, !- Soil Specific Heat {J/kg-K}", + " 15.5, !- Average Soil Surface Temperature {C}", + " 3.2, !- Average Amplitude of Surface Temperature {deltaC}", + " 8; !- Phase Shift of Minimum Surface Temperature {days}", "GroundHeatExchanger:Vertical:Properties,", - " GHE-1 Props, !- Name", - " 1, !- Depth of Top of Borehole {m}", - " 76.2, !- Borehole Length {m}", - " 0.288, !- Borehole Diameter {m}", - " 3.0, !- Grout Thermal Conductivity {W/m-K}", - " 1.0E+06, !- Grout Thermal Heat Capacity {J/m3-K}", - " 0.389, !- Pipe Thermal Conductivity {W/m-K}", + " GHE-1 Props, !- Name", + " 1, !- Depth of Top of Borehole {m}", + " 76.2, !- Borehole Length {m}", + " 0.288, !- Borehole Diameter {m}", + " 3.0, !- Grout Thermal Conductivity {W/m-K}", + " 1.0E+06, !- Grout Thermal Heat Capacity {J/m3-K}", + " 0.389, !- Pipe Thermal Conductivity {W/m-K}", " 8E+05, !- Pipe Thermal Heat Capacity {J/m3-K}", - " 0.032, !- Pipe Outer Diameter {m}", - " 0.0016279, !- Pipe Thickness {m}", - " 0.1066667; !- U-Tube Distance {m}", + " 0.032, !- Pipe Outer Diameter {m}", + " 0.0016279, !- Pipe Thickness {m}", + " 0.1066667; !- U-Tube Distance {m}", "GroundHeatExchanger:Vertical:Array,", - " GHE-Array, !- Name", - " GHE-1 Props, !- GHE Properties", - " 2, !- Number of Boreholes in X Direction", - " 2, !- Number of Boreholes in Y Direction", - " 2; !- Borehole Spacing {m}", + " GHE-Array, !- Name", + " GHE-1 Props, !- GHE Properties", + " 2, !- Number of Boreholes in X Direction", + " 2, !- Number of Boreholes in Y Direction", + " 2; !- Borehole Spacing {m}", "GroundHeatExchanger:System,", - " Vertical GHE 1x4 Std, !- Name", - " GHLE Inlet, !- Inlet Node Name", - " GHLE Outlet, !- Outlet Node Name", - " 0.1, !- Design Flow Rate {m3/s}", - " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", - " KATemps, !- Undisturbed Ground Temperature Model Name", - " 1.0, !- Ground Thermal Conductivity {W/m-K}", - " 2.4957E+06, !- Ground Thermal Heat Capacity {J/m3-K}", - " , !- Response Factors Object Name", - " GHE-Array; !- GHE Array Object Name"}); + " Vertical GHE 1x4 Std, !- Name", + " GHLE Inlet, !- Inlet Node Name", + " GHLE Outlet, !- Outlet Node Name", + " 0.1, !- Design Flow Rate {m3/s}", + " Site:GroundTemperature:Undisturbed:KusudaAchenbach, !- Undisturbed Ground Temperature Model Type", + " KATemps, !- Undisturbed Ground Temperature Model Name", + " 1.0, !- Ground Thermal Conductivity {W/m-K}", + " 2.4957E+06, !- Ground Thermal Heat Capacity {J/m3-K}", + " , !- Response Factors Object Name", + " GHE-Array; !- GHE Array Object Name"}); // Envr variable DisableGLHECaching = true; @@ -3757,7 +3855,7 @@ TEST_F(EnergyPlusFixture, GroundHeatExchangerTest_System_calcBHTotalInternalResi SetupInitialPlantCallingOrder(*state); SetupBranchControlTypes(*state); - auto &thisGLHE(verticalGLHE[0]); + auto &thisGLHE(state->dataGroundHeatExchanger->verticalGLHE[0]); thisGLHE.loopNum = 1; Node(thisGLHE.inletNodeNum).Temp = 20.0; thisGLHE.massFlowRate = 1;