diff --git a/src/EnergyPlus/Plant/Loop.hh b/src/EnergyPlus/Plant/Loop.hh index 9e53f46a868..2c3cff78e1d 100644 --- a/src/EnergyPlus/Plant/Loop.hh +++ b/src/EnergyPlus/Plant/Loop.hh @@ -90,7 +90,7 @@ namespace DataPlant { std::string Name; // Name of the component list std::string FluidName; // Name of the fluid specified for this loop DataLoopNode::NodeFluidType FluidType; // Type of fluid in the loop - int FluidIndex; // Index for Fluid in FluidProperties + int FluidIndex = 0; FluidProperties::GlycolProps *glycol = nullptr; FluidProperties::RefrigProps *steam = nullptr; @@ -154,7 +154,7 @@ namespace DataPlant { // Default Constructor PlantLoopData() - : FluidType(DataLoopNode::NodeFluidType::Blank), FluidIndex(1), // default to water + : FluidType(DataLoopNode::NodeFluidType::Blank), MFErrIndex(0), MFErrIndex1(0), MFErrIndex2(0), TempSetPointNodeNum(0), MaxBranch(0), MinTemp(0.0), MaxTemp(0.0), MinTempErrIndex(0), MaxTempErrIndex(0), MinVolFlowRate(0.0), MaxVolFlowRate(0.0), MaxVolFlowRateWasAutoSized(false), MinMassFlowRate(0.0), MaxMassFlowRate(0.0), Volume(0.0), VolumeWasAutoSized(false), CirculationTime(2.0), Mass(0.0), EMSCtrl(false), EMSValue(0.0), diff --git a/src/EnergyPlus/Plant/PlantManager.cc b/src/EnergyPlus/Plant/PlantManager.cc index b743337a7a2..e5f26566426 100644 --- a/src/EnergyPlus/Plant/PlantManager.cc +++ b/src/EnergyPlus/Plant/PlantManager.cc @@ -387,6 +387,7 @@ void GetPlantLoopData(EnergyPlusData &state) if (Util::SameString(Alpha(2), "STEAM")) { this_loop.FluidType = DataLoopNode::NodeFluidType::Steam; this_loop.FluidName = Alpha(2); + this_loop.FluidIndex = 0; this_loop.steam = FluidProperties::GetSteam(state); } else if (Util::SameString(Alpha(2), "WATER")) { this_loop.FluidType = DataLoopNode::NodeFluidType::Water; @@ -395,7 +396,8 @@ void GetPlantLoopData(EnergyPlusData &state) this_loop.glycol = FluidProperties::GetWater(state); } else if (Util::SameString(Alpha(2), "USERDEFINEDFLUIDTYPE")) { this_loop.FluidType = DataLoopNode::NodeFluidType::Water; - // this_loop.FluidName = Alpha(3); + this_loop.FluidName = Alpha(3); + this_loop.FluidIndex = 0; // check for valid fluid name this_loop.glycol = FluidProperties::GetGlycol(state, Alpha(3)); if (this_loop.glycol == nullptr) {