-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#3976 - Coil:Cooling:DX:VariableSpeed code changes
* Added double getter, isDefaulted, setter and resetter * Added to Model Test * Added VersionTranslation for inserted field * Added VersionTranslation test * Added new field to the FT * Added a FT test * RT doesn't exist at all
- Loading branch information
Showing
10 changed files
with
246 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/*********************************************************************************************************************** | ||
* OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the | ||
* following conditions are met: | ||
* | ||
* (1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following | ||
* disclaimer. | ||
* | ||
* (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following | ||
* disclaimer in the documentation and/or other materials provided with the distribution. | ||
* | ||
* (3) Neither the name of the copyright holder nor the names of any contributors may be used to endorse or promote products | ||
* derived from this software without specific prior written permission from the respective party. | ||
* | ||
* (4) Other than as required in clauses (1) and (2), distributions in any form of modifications or other derivative works | ||
* may not use the "OpenStudio" trademark, "OS", "os", or any other confusingly similar designation without specific prior | ||
* written permission from Alliance for Sustainable Energy, LLC. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED STATES GOVERNMENT, OR THE UNITED | ||
* STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | ||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
***********************************************************************************************************************/ | ||
|
||
#include <gtest/gtest.h> | ||
#include "EnergyPlusFixture.hpp" | ||
|
||
#include "../ForwardTranslator.hpp" | ||
|
||
#include "../../model/Model.hpp" | ||
#include "../../model/CoilCoolingDXVariableSpeed.hpp" | ||
#include "../../model/CoilCoolingDXVariableSpeed_Impl.hpp" | ||
#include "../../model/AirLoopHVAC.hpp" | ||
#include "../../model/Node.hpp" | ||
|
||
#include <utilities/idd/Coil_Cooling_DX_VariableSpeed_FieldEnums.hxx> | ||
#include <utilities/idd/IddEnums.hxx> | ||
|
||
using namespace openstudio::energyplus; | ||
using namespace openstudio::model; | ||
using namespace openstudio; | ||
|
||
TEST_F(EnergyPlusFixture, ForwardTranslator_CoilCoolingDXVariableSpeed_MinOATCompressor) { | ||
Model m; | ||
|
||
CoilCoolingDXVariableSpeed coil(m); | ||
coil.setMinimumOutdoorDryBulbTemperatureforCompressorOperation(-7.5); | ||
|
||
// Need to be used to be translated | ||
AirLoopHVAC airLoop(m); | ||
Node supplyOutletNode = airLoop.supplyOutletNode(); | ||
coil.addToNode(supplyOutletNode); | ||
|
||
ForwardTranslator ft; | ||
Workspace w = ft.translateModel(m); | ||
|
||
WorkspaceObjectVector idf_coils(w.getObjectsByType(IddObjectType::Coil_Cooling_DX_VariableSpeed)); | ||
ASSERT_EQ(1u, idf_coils.size()); | ||
WorkspaceObject idf_coil(idf_coils[0]); | ||
|
||
auto _d = idf_coil.getDouble(Coil_Cooling_DX_VariableSpeedFields::MinimumOutdoorDryBulbTemperatureforCompressorOperation); | ||
ASSERT_TRUE(_d); | ||
EXPECT_DOUBLE_EQ(-7.5, _d.get()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/osversion/test/3_0_1/test_vt_CoilCoolingDXVariableSpeed.osm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
OS:Version, | ||
{af733672-23c2-4eea-93d6-1017dc341614}, !- Handle | ||
3.0.0; !- Version Identifier | ||
|
||
OS:Coil:Cooling:DX:VariableSpeed, | ||
{e2e4bac6-5849-4c06-a35b-5b512e89e84f}, !- Handle | ||
Coil Cooling DX Variable Speed 1, !- Name | ||
, !- Indoor Air Inlet Node Name | ||
, !- Indoor Air Outlet Node Name | ||
1, !- Nominal Speed Level {dimensionless} | ||
autosize, !- Gross Rated Total Cooling Capacity At Selected Nominal Speed Level {W} | ||
autosize, !- Rated Air Flow Rate At Selected Nominal Speed Level {m3/s} | ||
0, !- Nominal Time for Condensate to Begin Leaving the Coil {s} | ||
0, !- Initial Moisture Evaporation Rate Divided by Steady-State AC Latent Capacity {dimensionless} | ||
{dd042707-2520-4672-9cf2-194e21086783}, !- Energy Part Load Fraction Curve Name | ||
, !- Condenser Air Inlet Node Name | ||
AirCooled, !- Condenser Type | ||
0, !- Evaporative Condenser Pump Rated Power Consumption {W} | ||
0, !- Crankcase Heater Capacity {W} | ||
11, !- Maximum Outdoor Dry-Bulb Temperature for Crankcase Heater Operation {C} | ||
, !- Supply Water Storage Tank Name | ||
, !- Condensate Collection Water Storage Tank Name | ||
0, !- Basin Heater Capacity {W/K} | ||
2, !- Basin Heater Setpoint Temperature {C} | ||
, !- Basin Heater Operating Schedule Name | ||
{a59a5a80-3bed-4c6b-99fe-4ef7a4dc758e}; !- Speed Data List | ||
|
||
OS:Curve:Quadratic, | ||
{dd042707-2520-4672-9cf2-194e21086783}, !- Handle | ||
Curve Quadratic 1, !- Name | ||
0.85, !- Coefficient1 Constant | ||
0.15, !- Coefficient2 x | ||
0, !- Coefficient3 x**2 | ||
0, !- Minimum Value of x | ||
1; !- Maximum Value of x | ||
|
||
OS:ModelObjectList, | ||
{a59a5a80-3bed-4c6b-99fe-4ef7a4dc758e}, !- Handle | ||
Coil Cooling DX Variable Speed 1 Speed Data List; !- Name | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters