From 80e8b95e69c35378866885fd0367ef516b42f694 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Thu, 16 Jan 2020 13:39:57 +0100 Subject: [PATCH] #3111 Add tertiary nodes for ChillerAbsorption also Add Loop convenience function for both ChillerAbsorption and ChillerAbsorptionIndirect --- src/model/ChillerAbsorption.cpp | 36 ++++++++++++++++++++ src/model/ChillerAbsorption.hpp | 9 +++++ src/model/ChillerAbsorptionIndirect.cpp | 28 +++++++++++++++ src/model/ChillerAbsorptionIndirect.hpp | 9 +++++ src/model/ChillerAbsorptionIndirect_Impl.hpp | 28 +++++++++++---- src/model/ChillerAbsorption_Impl.hpp | 30 ++++++++++++---- 6 files changed, 126 insertions(+), 14 deletions(-) diff --git a/src/model/ChillerAbsorption.cpp b/src/model/ChillerAbsorption.cpp index dc97a3b214e..be8cbe7a67b 100644 --- a/src/model/ChillerAbsorption.cpp +++ b/src/model/ChillerAbsorption.cpp @@ -391,6 +391,29 @@ namespace detail { return OS_Chiller_AbsorptionFields::CondenserOutletNodeName; } + unsigned ChillerAbsorption_Impl::tertiaryInletPort() const { + return OS_Chiller_AbsorptionFields::GeneratorInletNodeName; + } + + unsigned ChillerAbsorption_Impl::tertiaryOutletPort() const { + return OS_Chiller_AbsorptionFields::GeneratorOutletNodeName; + } + + /** Convenience Function to return the Chilled Water Loop (chiller on supply) **/ + boost::optional ChillerAbsorption_Impl::chilledWaterLoop() const { + return WaterToWaterComponent_Impl::plantLoop(); + } + + /** Convenience Function to return the Condenser Water Loop (chiller on demand side) **/ + boost::optional ChillerAbsorption_Impl::condenserWaterLoop() const { + return WaterToWaterComponent_Impl::secondaryPlantLoop(); + } + + /** Convenience Function to return the Heat Recovery Loop **/ + boost::optional ChillerAbsorption_Impl::generatorLoop() const { + return WaterToWaterComponent_Impl::tertiaryPlantLoop(); + } + boost::optional ChillerAbsorption_Impl::autosizedNominalCapacity() const { return getAutosizedValue("Design Size Nominal Capacity", "W"); } @@ -690,6 +713,19 @@ bool ChillerAbsorption::setSizingFactor(double sizingFactor) { return getImpl()->setSizingFactor(sizingFactor); } +// Convenience functions +boost::optional ChillerAbsorption::chilledWaterLoop() const { + return getImpl()->chilledWaterLoop(); +} + +boost::optional ChillerAbsorption::condenserWaterLoop() const { + return getImpl()->condenserWaterLoop(); +} + +boost::optional ChillerAbsorption::generatorLoop() const { + return getImpl()->generatorLoop(); +} + /// @cond ChillerAbsorption::ChillerAbsorption(std::shared_ptr impl) : WaterToWaterComponent(std::move(impl)) diff --git a/src/model/ChillerAbsorption.hpp b/src/model/ChillerAbsorption.hpp index 4363d3b3d37..7d95d0dc490 100644 --- a/src/model/ChillerAbsorption.hpp +++ b/src/model/ChillerAbsorption.hpp @@ -114,6 +114,15 @@ class MODEL_API ChillerAbsorption : public WaterToWaterComponent { double sizingFactor() const; + /** Convenience Function to return the Chilled Water Loop (chiller on supply) **/ + boost::optional chilledWaterLoop() const; + + /** Convenience Function to return the Condenser Water Loop (chiller on demand side) **/ + boost::optional condenserWaterLoop() const; + + /** Convenience Function to return the Generator Loop **/ + boost::optional generatorLoop() const; + //@} /** @name Setters */ //@{ diff --git a/src/model/ChillerAbsorptionIndirect.cpp b/src/model/ChillerAbsorptionIndirect.cpp index b859d46ff9f..dae283aa872 100644 --- a/src/model/ChillerAbsorptionIndirect.cpp +++ b/src/model/ChillerAbsorptionIndirect.cpp @@ -549,6 +549,21 @@ namespace detail { return OS_Chiller_Absorption_IndirectFields::GeneratorOutletNode; } + /** Convenience Function to return the Chilled Water Loop (chiller on supply) **/ + boost::optional ChillerAbsorptionIndirect_Impl::chilledWaterLoop() const { + return WaterToWaterComponent_Impl::plantLoop(); + } + + /** Convenience Function to return the Condenser Water Loop (chiller on demand side) **/ + boost::optional ChillerAbsorptionIndirect_Impl::condenserWaterLoop() const { + return WaterToWaterComponent_Impl::secondaryPlantLoop(); + } + + /** Convenience Function to return the Heat Recovery Loop **/ + boost::optional ChillerAbsorptionIndirect_Impl::generatorLoop() const { + return WaterToWaterComponent_Impl::tertiaryPlantLoop(); + } + boost::optional ChillerAbsorptionIndirect_Impl::autosizedNominalCapacity() const { return getAutosizedValue("Design Size Nominal Capacity", "W"); } @@ -954,6 +969,19 @@ bool ChillerAbsorptionIndirect::setSizingFactor(double sizingFactor) { return getImpl()->setSizingFactor(sizingFactor); } +// Convenience functions +boost::optional ChillerAbsorptionIndirect::chilledWaterLoop() const { + return getImpl()->chilledWaterLoop(); +} + +boost::optional ChillerAbsorptionIndirect::condenserWaterLoop() const { + return getImpl()->condenserWaterLoop(); +} + +boost::optional ChillerAbsorptionIndirect::generatorLoop() const { + return getImpl()->generatorLoop(); +} + /// @cond ChillerAbsorptionIndirect::ChillerAbsorptionIndirect(std::shared_ptr impl) : WaterToWaterComponent(std::move(impl)) diff --git a/src/model/ChillerAbsorptionIndirect.hpp b/src/model/ChillerAbsorptionIndirect.hpp index 1b295364082..e79e6d0db30 100644 --- a/src/model/ChillerAbsorptionIndirect.hpp +++ b/src/model/ChillerAbsorptionIndirect.hpp @@ -124,6 +124,15 @@ class MODEL_API ChillerAbsorptionIndirect : public WaterToWaterComponent { double sizingFactor() const; + /** Convenience Function to return the Chilled Water Loop (chiller on supply) **/ + boost::optional chilledWaterLoop() const; + + /** Convenience Function to return the Condenser Water Loop (chiller on demand side) **/ + boost::optional condenserWaterLoop() const; + + /** Convenience Function to return the Generator Loop **/ + boost::optional generatorLoop() const; + //@} /** @name Setters */ //@{ diff --git a/src/model/ChillerAbsorptionIndirect_Impl.hpp b/src/model/ChillerAbsorptionIndirect_Impl.hpp index 5fcf9df39cb..d92584e8b5f 100644 --- a/src/model/ChillerAbsorptionIndirect_Impl.hpp +++ b/src/model/ChillerAbsorptionIndirect_Impl.hpp @@ -68,10 +68,15 @@ namespace detail { virtual IddObjectType iddObjectType() const override; + // chilledWaterLoop virtual unsigned supplyInletPort() const override; virtual unsigned supplyOutletPort() const override; + + // condenserWaterLoop virtual unsigned demandInletPort() const override; virtual unsigned demandOutletPort() const override; + + //generatorLoop virtual unsigned tertiaryInletPort() const override; virtual unsigned tertiaryOutletPort() const override; @@ -137,19 +142,28 @@ namespace detail { double sizingFactor() const; - boost::optional autosizedNominalCapacity() const ; + boost::optional autosizedNominalCapacity() const ; + + boost::optional autosizedNominalPumpingPower() const ; + + boost::optional autosizedDesignChilledWaterFlowRate() const ; + + boost::optional autosizedDesignCondenserWaterFlowRate() const ; - boost::optional autosizedNominalPumpingPower() const ; + boost::optional autosizedDesignGeneratorFluidFlowRate() const ; - boost::optional autosizedDesignChilledWaterFlowRate() const ; + virtual void autosize() override; - boost::optional autosizedDesignCondenserWaterFlowRate() const ; + virtual void applySizingValues() override; - boost::optional autosizedDesignGeneratorFluidFlowRate() const ; + /** Convenience Function to return the Chilled Water Loop (chiller on supply) **/ + boost::optional chilledWaterLoop() const; - virtual void autosize() override; + /** Convenience Function to return the Condenser Water Loop (chiller on demand side) **/ + boost::optional condenserWaterLoop() const; - virtual void applySizingValues() override; + /** Convenience Function to return the Generator Loop **/ + boost::optional generatorLoop() const; //@} /** @name Setters */ diff --git a/src/model/ChillerAbsorption_Impl.hpp b/src/model/ChillerAbsorption_Impl.hpp index 466cf6a60df..4a5ad5a4cfe 100644 --- a/src/model/ChillerAbsorption_Impl.hpp +++ b/src/model/ChillerAbsorption_Impl.hpp @@ -66,11 +66,18 @@ namespace detail { virtual IddObjectType iddObjectType() const override; + // chilledWaterLoop virtual unsigned supplyInletPort() const override; virtual unsigned supplyOutletPort() const override; + + // condenserWaterLoop virtual unsigned demandInletPort() const override; virtual unsigned demandOutletPort() const override; + //generatorLoop + virtual unsigned tertiaryInletPort() const override; + virtual unsigned tertiaryOutletPort() const override; + //@} /** @name Getters */ //@{ @@ -125,19 +132,28 @@ namespace detail { double sizingFactor() const; - boost::optional autosizedNominalCapacity() const ; + boost::optional autosizedNominalCapacity() const ; + + boost::optional autosizedNominalPumpingPower() const ; + + boost::optional autosizedDesignChilledWaterFlowRate() const ; + + boost::optional autosizedDesignCondenserWaterFlowRate() const ; - boost::optional autosizedNominalPumpingPower() const ; + boost::optional autosizedDesignGeneratorFluidFlowRate() const ; - boost::optional autosizedDesignChilledWaterFlowRate() const ; + virtual void autosize() override; - boost::optional autosizedDesignCondenserWaterFlowRate() const ; + virtual void applySizingValues() override; - boost::optional autosizedDesignGeneratorFluidFlowRate() const ; + /** Convenience Function to return the Chilled Water Loop (chiller on supply) **/ + boost::optional chilledWaterLoop() const; - virtual void autosize() override; + /** Convenience Function to return the Condenser Water Loop (chiller on demand side) **/ + boost::optional condenserWaterLoop() const; - virtual void applySizingValues() override; + /** Convenience Function to return the Generator Loop **/ + boost::optional generatorLoop() const; //@} /** @name Setters */