Skip to content

Commit

Permalink
Merge pull request #4950 from NREL/table-lookup-fixes
Browse files Browse the repository at this point in the history
Addresses #4946, allow TableLookup curves for Coil:*:WaterToAirHeatPump:EquationFit objects
  • Loading branch information
jmarrec authored Sep 26, 2023
2 parents 255c623 + b0f6f2e commit 950172b
Show file tree
Hide file tree
Showing 11 changed files with 361 additions and 174 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ You can also refer to the [OpenStudio SDK Python Binding Version Compatibility M
* Fix #4930 - Support undisturbed ground temperature models on GroundHeatExchangerVertical
* Update `GroundHeatExchanger:Vertical` to actually use the Ground Temeprature Model field
* [#4923](https://github.com/NREL/OpenStudio/pull/4923) - Fix #4692 - Modify `Model::load` to use the VersionTranslator instead of loading it assuming the version of the loaded OSM is the same as the current SDK version being used.
* [#4950](https://github.com/NREL/OpenStudio/pull/4950) - Addresses #4946, allow Table:Lookup curves for Coil:*:WaterToAirHeatPumpEquationFit objects
* `Coil:Cooling:WaterToAirHeatPumpEquationFit` and `Coil:Heating:WaterToAirHeatPumpEquationFit` have a few API-breaking changes related to its Curves. The types for the constructor, getters, and setters used to be explicit (e.g., `CurveQuadLinear`); it is now the base class, more generic, `Curve` type for added flexibility.

## Minor changes and bug fixes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
#include "../../model/Node_Impl.hpp"
#include "../../model/CoilCoolingWaterToAirHeatPumpEquationFit.hpp"
#include "../../model/CoilCoolingWaterToAirHeatPumpEquationFit_Impl.hpp"
#include "../../model/CurveQuadLinear.hpp"
#include "../../model/CurveQuintLinear.hpp"
#include "../../model/Curve.hpp"

#include "../../utilities/core/Logger.hpp"
#include "../../utilities/core/Assert.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "../../model/Node_Impl.hpp"
#include "../../model/CoilHeatingWaterToAirHeatPumpEquationFit.hpp"
#include "../../model/CoilHeatingWaterToAirHeatPumpEquationFit_Impl.hpp"
#include "../../model/CurveQuadLinear.hpp"
#include "../../model/Curve.hpp"

#include "../../utilities/core/Logger.hpp"
#include "../../utilities/core/Assert.hpp"
Expand Down
199 changes: 116 additions & 83 deletions src/model/CoilCoolingWaterToAirHeatPumpEquationFit.cpp

Large diffs are not rendered by default.

20 changes: 9 additions & 11 deletions src/model/CoilCoolingWaterToAirHeatPumpEquationFit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ namespace openstudio {

namespace model {

class CurveQuadLinear;
class CurveQuintLinear;
class Curve;

namespace detail {
class CoilCoolingWaterToAirHeatPumpEquationFit_Impl;
Expand All @@ -29,9 +28,8 @@ namespace model {
/** @name Constructors and Destructors */

/** Constructs a new CoilCoolingWaterToAirHeatPumpEquationFit with required curve objects */
CoilCoolingWaterToAirHeatPumpEquationFit(const Model& model, const CurveQuadLinear& totalCoolingCapacityCurve,
const CurveQuintLinear& sensibleCoolingCapacityCurve,
const CurveQuadLinear& coolingPowerConsumptionCurve);
CoilCoolingWaterToAirHeatPumpEquationFit(const Model& model, const Curve& totalCoolingCapacityCurve, const Curve& sensibleCoolingCapacityCurve,
const Curve& coolingPowerConsumptionCurve);

/** Constructs a new CoilCoolingWaterToAirHeatPumpEquationFit object and places it inside the model. The coil is fully initialized with all companion objects. */
CoilCoolingWaterToAirHeatPumpEquationFit(const Model& model);
Expand Down Expand Up @@ -81,15 +79,15 @@ namespace model {

double ratedEnteringAirWetBulbTemperature() const;

CurveQuadLinear totalCoolingCapacityCurve() const;
Curve totalCoolingCapacityCurve() const;

OS_DEPRECATED(3, 2, 0) double totalCoolingCapacityCoefficient1() const;
OS_DEPRECATED(3, 2, 0) double totalCoolingCapacityCoefficient2() const;
OS_DEPRECATED(3, 2, 0) double totalCoolingCapacityCoefficient3() const;
OS_DEPRECATED(3, 2, 0) double totalCoolingCapacityCoefficient4() const;
OS_DEPRECATED(3, 2, 0) double totalCoolingCapacityCoefficient5() const;

CurveQuintLinear sensibleCoolingCapacityCurve() const;
Curve sensibleCoolingCapacityCurve() const;

OS_DEPRECATED(3, 2, 0) double sensibleCoolingCapacityCoefficient1() const;
OS_DEPRECATED(3, 2, 0) double sensibleCoolingCapacityCoefficient2() const;
Expand All @@ -98,7 +96,7 @@ namespace model {
OS_DEPRECATED(3, 2, 0) double sensibleCoolingCapacityCoefficient5() const;
OS_DEPRECATED(3, 2, 0) double sensibleCoolingCapacityCoefficient6() const;

CurveQuadLinear coolingPowerConsumptionCurve() const;
Curve coolingPowerConsumptionCurve() const;

OS_DEPRECATED(3, 2, 0) double coolingPowerConsumptionCoefficient1() const;
OS_DEPRECATED(3, 2, 0) double coolingPowerConsumptionCoefficient2() const;
Expand Down Expand Up @@ -148,15 +146,15 @@ namespace model {

bool setRatedEnteringAirWetBulbTemperature(double ratedEnteringAirWetBulbTemperature);

bool setTotalCoolingCapacityCurve(const CurveQuadLinear& totalCoolingCapacityCurve);
bool setTotalCoolingCapacityCurve(const Curve& totalCoolingCapacityCurve);

OS_DEPRECATED(3, 2, 0) bool setTotalCoolingCapacityCoefficient1(double totalCoolingCapacityCoefficient1);
OS_DEPRECATED(3, 2, 0) bool setTotalCoolingCapacityCoefficient2(double totalCoolingCapacityCoefficient2);
OS_DEPRECATED(3, 2, 0) bool setTotalCoolingCapacityCoefficient3(double totalCoolingCapacityCoefficient3);
OS_DEPRECATED(3, 2, 0) bool setTotalCoolingCapacityCoefficient4(double totalCoolingCapacityCoefficient4);
OS_DEPRECATED(3, 2, 0) bool setTotalCoolingCapacityCoefficient5(double totalCoolingCapacityCoefficient5);

bool setSensibleCoolingCapacityCurve(const CurveQuintLinear& sensibleCoolingCapacityCurve);
bool setSensibleCoolingCapacityCurve(const Curve& sensibleCoolingCapacityCurve);

OS_DEPRECATED(3, 2, 0) bool setSensibleCoolingCapacityCoefficient1(double sensibleCoolingCapacityCoefficient1);
OS_DEPRECATED(3, 2, 0) bool setSensibleCoolingCapacityCoefficient2(double sensibleCoolingCapacityCoefficient2);
Expand All @@ -165,7 +163,7 @@ namespace model {
OS_DEPRECATED(3, 2, 0) bool setSensibleCoolingCapacityCoefficient5(double sensibleCoolingCapacityCoefficient5);
OS_DEPRECATED(3, 2, 0) bool setSensibleCoolingCapacityCoefficient6(double sensibleCoolingCapacityCoefficient6);

bool setCoolingPowerConsumptionCurve(const CurveQuadLinear& coolingPowerConsumptionCurve);
bool setCoolingPowerConsumptionCurve(const Curve& coolingPowerConsumptionCurve);

OS_DEPRECATED(3, 2, 0) bool setCoolingPowerConsumptionCoefficient1(double coolingPowerConsumptionCoefficient1);
OS_DEPRECATED(3, 2, 0) bool setCoolingPowerConsumptionCoefficient2(double coolingPowerConsumptionCoefficient2);
Expand Down
15 changes: 7 additions & 8 deletions src/model/CoilCoolingWaterToAirHeatPumpEquationFit_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
namespace openstudio {
namespace model {

class CurveQuadLinear;
class CurveQuintLinear;
class Curve;

namespace detail {

Expand Down Expand Up @@ -98,11 +97,11 @@ namespace model {

double ratedEnteringAirWetBulbTemperature() const;

CurveQuadLinear totalCoolingCapacityCurve() const;
Curve totalCoolingCapacityCurve() const;

CurveQuintLinear sensibleCoolingCapacityCurve() const;
Curve sensibleCoolingCapacityCurve() const;

CurveQuadLinear coolingPowerConsumptionCurve() const;
Curve coolingPowerConsumptionCurve() const;

double nominalTimeforCondensateRemovaltoBegin() const;

Expand Down Expand Up @@ -160,11 +159,11 @@ namespace model {

bool setRatedEnteringAirWetBulbTemperature(double ratedEnteringAirWetBulbTemperature);

bool setTotalCoolingCapacityCurve(const CurveQuadLinear& totalCoolingCapacityCurve);
bool setTotalCoolingCapacityCurve(const Curve& totalCoolingCapacityCurve);

bool setSensibleCoolingCapacityCurve(const CurveQuintLinear& sensibleCoolingCapacityCurve);
bool setSensibleCoolingCapacityCurve(const Curve& sensibleCoolingCapacityCurve);

bool setCoolingPowerConsumptionCurve(const CurveQuadLinear& coolingPowerConsumptionCurve);
bool setCoolingPowerConsumptionCurve(const Curve& coolingPowerConsumptionCurve);

bool setNominalTimeforCondensateRemovaltoBegin(double nominalTimeforCondensateRemovaltoBegin);

Expand Down
Loading

0 comments on commit 950172b

Please sign in to comment.