Skip to content

Commit

Permalink
#3111 Add tertiary nodes for ChillerAbsorption
Browse files Browse the repository at this point in the history
also Add Loop convenience function for both ChillerAbsorption and ChillerAbsorptionIndirect
  • Loading branch information
jmarrec committed Jan 16, 2020
1 parent 66cf2e0 commit 80e8b95
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 14 deletions.
36 changes: 36 additions & 0 deletions src/model/ChillerAbsorption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<PlantLoop> ChillerAbsorption_Impl::chilledWaterLoop() const {
return WaterToWaterComponent_Impl::plantLoop();
}

/** Convenience Function to return the Condenser Water Loop (chiller on demand side) **/
boost::optional<PlantLoop> ChillerAbsorption_Impl::condenserWaterLoop() const {
return WaterToWaterComponent_Impl::secondaryPlantLoop();
}

/** Convenience Function to return the Heat Recovery Loop **/
boost::optional<PlantLoop> ChillerAbsorption_Impl::generatorLoop() const {
return WaterToWaterComponent_Impl::tertiaryPlantLoop();
}

boost::optional<double> ChillerAbsorption_Impl::autosizedNominalCapacity() const {
return getAutosizedValue("Design Size Nominal Capacity", "W");
}
Expand Down Expand Up @@ -690,6 +713,19 @@ bool ChillerAbsorption::setSizingFactor(double sizingFactor) {
return getImpl<detail::ChillerAbsorption_Impl>()->setSizingFactor(sizingFactor);
}

// Convenience functions
boost::optional<PlantLoop> ChillerAbsorption::chilledWaterLoop() const {
return getImpl<detail::ChillerAbsorption_Impl>()->chilledWaterLoop();
}

boost::optional<PlantLoop> ChillerAbsorption::condenserWaterLoop() const {
return getImpl<detail::ChillerAbsorption_Impl>()->condenserWaterLoop();
}

boost::optional<PlantLoop> ChillerAbsorption::generatorLoop() const {
return getImpl<detail::ChillerAbsorption_Impl>()->generatorLoop();
}

/// @cond
ChillerAbsorption::ChillerAbsorption(std::shared_ptr<detail::ChillerAbsorption_Impl> impl)
: WaterToWaterComponent(std::move(impl))
Expand Down
9 changes: 9 additions & 0 deletions src/model/ChillerAbsorption.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<PlantLoop> chilledWaterLoop() const;

/** Convenience Function to return the Condenser Water Loop (chiller on demand side) **/
boost::optional<PlantLoop> condenserWaterLoop() const;

/** Convenience Function to return the Generator Loop **/
boost::optional<PlantLoop> generatorLoop() const;

//@}
/** @name Setters */
//@{
Expand Down
28 changes: 28 additions & 0 deletions src/model/ChillerAbsorptionIndirect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<PlantLoop> ChillerAbsorptionIndirect_Impl::chilledWaterLoop() const {
return WaterToWaterComponent_Impl::plantLoop();
}

/** Convenience Function to return the Condenser Water Loop (chiller on demand side) **/
boost::optional<PlantLoop> ChillerAbsorptionIndirect_Impl::condenserWaterLoop() const {
return WaterToWaterComponent_Impl::secondaryPlantLoop();
}

/** Convenience Function to return the Heat Recovery Loop **/
boost::optional<PlantLoop> ChillerAbsorptionIndirect_Impl::generatorLoop() const {
return WaterToWaterComponent_Impl::tertiaryPlantLoop();
}

boost::optional<double> ChillerAbsorptionIndirect_Impl::autosizedNominalCapacity() const {
return getAutosizedValue("Design Size Nominal Capacity", "W");
}
Expand Down Expand Up @@ -954,6 +969,19 @@ bool ChillerAbsorptionIndirect::setSizingFactor(double sizingFactor) {
return getImpl<detail::ChillerAbsorptionIndirect_Impl>()->setSizingFactor(sizingFactor);
}

// Convenience functions
boost::optional<PlantLoop> ChillerAbsorptionIndirect::chilledWaterLoop() const {
return getImpl<detail::ChillerAbsorptionIndirect_Impl>()->chilledWaterLoop();
}

boost::optional<PlantLoop> ChillerAbsorptionIndirect::condenserWaterLoop() const {
return getImpl<detail::ChillerAbsorptionIndirect_Impl>()->condenserWaterLoop();
}

boost::optional<PlantLoop> ChillerAbsorptionIndirect::generatorLoop() const {
return getImpl<detail::ChillerAbsorptionIndirect_Impl>()->generatorLoop();
}

/// @cond
ChillerAbsorptionIndirect::ChillerAbsorptionIndirect(std::shared_ptr<detail::ChillerAbsorptionIndirect_Impl> impl)
: WaterToWaterComponent(std::move(impl))
Expand Down
9 changes: 9 additions & 0 deletions src/model/ChillerAbsorptionIndirect.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<PlantLoop> chilledWaterLoop() const;

/** Convenience Function to return the Condenser Water Loop (chiller on demand side) **/
boost::optional<PlantLoop> condenserWaterLoop() const;

/** Convenience Function to return the Generator Loop **/
boost::optional<PlantLoop> generatorLoop() const;

//@}
/** @name Setters */
//@{
Expand Down
28 changes: 21 additions & 7 deletions src/model/ChillerAbsorptionIndirect_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -137,19 +142,28 @@ namespace detail {

double sizingFactor() const;

boost::optional<double> autosizedNominalCapacity() const ;
boost::optional<double> autosizedNominalCapacity() const ;

boost::optional<double> autosizedNominalPumpingPower() const ;

boost::optional<double> autosizedDesignChilledWaterFlowRate() const ;

boost::optional<double> autosizedDesignCondenserWaterFlowRate() const ;

boost::optional<double> autosizedNominalPumpingPower() const ;
boost::optional<double> autosizedDesignGeneratorFluidFlowRate() const ;

boost::optional<double> autosizedDesignChilledWaterFlowRate() const ;
virtual void autosize() override;

boost::optional<double> autosizedDesignCondenserWaterFlowRate() const ;
virtual void applySizingValues() override;

boost::optional<double> autosizedDesignGeneratorFluidFlowRate() const ;
/** Convenience Function to return the Chilled Water Loop (chiller on supply) **/
boost::optional<PlantLoop> chilledWaterLoop() const;

virtual void autosize() override;
/** Convenience Function to return the Condenser Water Loop (chiller on demand side) **/
boost::optional<PlantLoop> condenserWaterLoop() const;

virtual void applySizingValues() override;
/** Convenience Function to return the Generator Loop **/
boost::optional<PlantLoop> generatorLoop() const;

//@}
/** @name Setters */
Expand Down
30 changes: 23 additions & 7 deletions src/model/ChillerAbsorption_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
//@{
Expand Down Expand Up @@ -125,19 +132,28 @@ namespace detail {

double sizingFactor() const;

boost::optional<double> autosizedNominalCapacity() const ;
boost::optional<double> autosizedNominalCapacity() const ;

boost::optional<double> autosizedNominalPumpingPower() const ;

boost::optional<double> autosizedDesignChilledWaterFlowRate() const ;

boost::optional<double> autosizedDesignCondenserWaterFlowRate() const ;

boost::optional<double> autosizedNominalPumpingPower() const ;
boost::optional<double> autosizedDesignGeneratorFluidFlowRate() const ;

boost::optional<double> autosizedDesignChilledWaterFlowRate() const ;
virtual void autosize() override;

boost::optional<double> autosizedDesignCondenserWaterFlowRate() const ;
virtual void applySizingValues() override;

boost::optional<double> autosizedDesignGeneratorFluidFlowRate() const ;
/** Convenience Function to return the Chilled Water Loop (chiller on supply) **/
boost::optional<PlantLoop> chilledWaterLoop() const;

virtual void autosize() override;
/** Convenience Function to return the Condenser Water Loop (chiller on demand side) **/
boost::optional<PlantLoop> condenserWaterLoop() const;

virtual void applySizingValues() override;
/** Convenience Function to return the Generator Loop **/
boost::optional<PlantLoop> generatorLoop() const;

//@}
/** @name Setters */
Expand Down

0 comments on commit 80e8b95

Please sign in to comment.