Merged
Conversation
3d037a0 to
8cae6f8
Compare
Collaborator
Author
|
So before fix tests logically fails: https://ci.openstudio.net/blue/organizations/jenkins/openstudio-incremental-ubuntu-18-04/detail/PR-4733/2/pipeline/68#step-72-log-19 |
jmarrec
commented
Oct 31, 2022
Comment on lines
+167
to
+168
| idfObject.setString(GroundHeatExchanger_HorizontalTrenchFields::UndisturbedGroundTemperatureModelType, | ||
| "Site:GroundTemperature:Undisturbed:KusudaAchenbach"); |
Comment on lines
+171
to
+187
| // SoilThermalConductivity | ||
| { | ||
| auto value = modelObject.soilThermalConductivity(); | ||
| groundModel.setDouble(Site_GroundTemperature_Undisturbed_KusudaAchenbachFields::SoilThermalConductivity, value); | ||
| } | ||
|
|
||
| // SoilDensity | ||
| { | ||
| auto value = modelObject.soilDensity(); | ||
| groundModel.setDouble(Site_GroundTemperature_Undisturbed_KusudaAchenbachFields::SoilDensity, value); | ||
| } | ||
|
|
||
| // SoilSpecificHeat | ||
| { | ||
| auto value = modelObject.soilSpecificHeat(); | ||
| groundModel.setDouble(Site_GroundTemperature_Undisturbed_KusudaAchenbachFields::SoilSpecificHeat, value); | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
Write soil properties on the Kusuda object
Collaborator
Author
|
@tijcolem @joseph-robertson I recommend pulling this into the 3.5.0 branch, this is safe. Only fixes the FT, doesn't affect model. PLus I added tests |
26a4a68 to
2b8e677
Compare
jmarrec
commented
Oct 31, 2022
Comment on lines
+56
to
+135
| TEST_F(EnergyPlusFixture, ForwardTranslator_GroundHeatExchangerHorizontalTrench) { | ||
|
|
||
| ForwardTranslator ft; | ||
|
|
||
| // Create a model | ||
| Model m; | ||
|
|
||
| GroundHeatExchangerHorizontalTrench ghx(m); | ||
|
|
||
| EXPECT_TRUE(ghx.setDesignFlowRate(0.05)); | ||
| EXPECT_TRUE(ghx.setTrenchLengthinPipeAxialDirection(72.0)); | ||
| EXPECT_TRUE(ghx.setNumberofTrenches(3)); | ||
| EXPECT_TRUE(ghx.setHorizontalSpacingBetweenPipes(2.1)); | ||
| EXPECT_TRUE(ghx.setPipeInnerDiameter(0.019)); | ||
| EXPECT_TRUE(ghx.setPipeOuterDiameter(0.029)); | ||
| EXPECT_TRUE(ghx.setBurialDepth(1.35)); | ||
| EXPECT_TRUE(ghx.setSoilThermalConductivity(1.02)); | ||
| EXPECT_TRUE(ghx.setSoilDensity(970.0)); | ||
| EXPECT_TRUE(ghx.setSoilSpecificHeat(2430.0)); | ||
| EXPECT_TRUE(ghx.setPipeThermalConductivity(0.32)); | ||
| EXPECT_TRUE(ghx.setPipeDensity(620.0)); | ||
| EXPECT_TRUE(ghx.setPipeSpecificHeat(2200.0)); | ||
| EXPECT_TRUE(ghx.setSoilMoistureContentPercent(32.0)); | ||
| EXPECT_TRUE(ghx.setSoilMoistureContentPercentatSaturation(53.0)); | ||
| EXPECT_TRUE(ghx.setGroundTemperatureModel("KusudaAchenbach")); | ||
| EXPECT_TRUE(ghx.setKusudaAchenbachAverageSurfaceTemperature(16.5)); | ||
| EXPECT_TRUE(ghx.setKusudaAchenbachAverageAmplitudeofSurfaceTemperature(13.8)); | ||
| EXPECT_TRUE(ghx.setKusudaAchenbachPhaseShiftofMinimumSurfaceTemperature(18.3)); | ||
| EXPECT_TRUE(ghx.setEvapotranspirationGroundCoverParameter(0.358)); | ||
|
|
||
| PlantLoop p(m); | ||
| EXPECT_TRUE(p.addSupplyBranchForComponent(ghx)); | ||
|
|
||
| ASSERT_TRUE(ghx.inletModelObject()); | ||
| ASSERT_TRUE(ghx.inletModelObject()->optionalCast<Node>()); | ||
| ghx.inletModelObject()->cast<Node>().setName("GHX Inlet Node"); | ||
|
|
||
| ASSERT_TRUE(ghx.outletModelObject()); | ||
| ASSERT_TRUE(ghx.outletModelObject()->optionalCast<Node>()); | ||
| ghx.outletModelObject()->cast<Node>().setName("GHX Outlet Node"); | ||
|
|
||
| const Workspace w = ft.translateModel(m); | ||
|
|
||
| WorkspaceObjectVector idfObjs = w.getObjectsByType(IddObjectType::GroundHeatExchanger_HorizontalTrench); | ||
| ASSERT_EQ(1u, idfObjs.size()); | ||
| auto idfObject = idfObjs.front(); | ||
|
|
||
| EXPECT_EQ("Ground Heat Exchanger Horizontal Trench 1", idfObject.getString(GroundHeatExchanger_HorizontalTrenchFields::Name).get()); | ||
| EXPECT_EQ("GHX Inlet Node", idfObject.getString(GroundHeatExchanger_HorizontalTrenchFields::InletNodeName).get()); | ||
| EXPECT_EQ("GHX Outlet Node", idfObject.getString(GroundHeatExchanger_HorizontalTrenchFields::OutletNodeName).get()); | ||
| EXPECT_EQ(0.05, idfObject.getDouble(GroundHeatExchanger_HorizontalTrenchFields::DesignFlowRate).get()); | ||
| EXPECT_EQ(72.0, idfObject.getDouble(GroundHeatExchanger_HorizontalTrenchFields::TrenchLengthinPipeAxialDirection).get()); | ||
| EXPECT_EQ(3, idfObject.getInt(GroundHeatExchanger_HorizontalTrenchFields::NumberofTrenches).get()); | ||
| EXPECT_EQ(2.1, idfObject.getDouble(GroundHeatExchanger_HorizontalTrenchFields::HorizontalSpacingBetweenPipes).get()); | ||
| EXPECT_EQ(0.019, idfObject.getDouble(GroundHeatExchanger_HorizontalTrenchFields::PipeInnerDiameter).get()); | ||
| EXPECT_EQ(0.029, idfObject.getDouble(GroundHeatExchanger_HorizontalTrenchFields::PipeOuterDiameter).get()); | ||
| EXPECT_EQ(1.35, idfObject.getDouble(GroundHeatExchanger_HorizontalTrenchFields::BurialDepth).get()); | ||
| EXPECT_EQ(1.02, idfObject.getDouble(GroundHeatExchanger_HorizontalTrenchFields::SoilThermalConductivity).get()); | ||
| EXPECT_EQ(970.0, idfObject.getDouble(GroundHeatExchanger_HorizontalTrenchFields::SoilDensity).get()); | ||
| EXPECT_EQ(2430.0, idfObject.getDouble(GroundHeatExchanger_HorizontalTrenchFields::SoilSpecificHeat).get()); | ||
| EXPECT_EQ(0.32, idfObject.getDouble(GroundHeatExchanger_HorizontalTrenchFields::PipeThermalConductivity).get()); | ||
| EXPECT_EQ(620.0, idfObject.getDouble(GroundHeatExchanger_HorizontalTrenchFields::PipeDensity).get()); | ||
| EXPECT_EQ(2200.0, idfObject.getDouble(GroundHeatExchanger_HorizontalTrenchFields::PipeSpecificHeat).get()); | ||
| EXPECT_EQ(32.0, idfObject.getDouble(GroundHeatExchanger_HorizontalTrenchFields::SoilMoistureContentPercent).get()); | ||
| EXPECT_EQ(53.0, idfObject.getDouble(GroundHeatExchanger_HorizontalTrenchFields::SoilMoistureContentPercentatSaturation).get()); | ||
|
|
||
| EXPECT_EQ("Site:GroundTemperature:Undisturbed:KusudaAchenbach", | ||
| idfObject.getString(GroundHeatExchanger_HorizontalTrenchFields::UndisturbedGroundTemperatureModelType).get()); | ||
|
|
||
| ASSERT_TRUE(idfObject.getTarget(GroundHeatExchanger_HorizontalTrenchFields::UndisturbedGroundTemperatureModelName)); | ||
| const WorkspaceObject kusuda = idfObject.getTarget(GroundHeatExchanger_HorizontalTrenchFields::UndisturbedGroundTemperatureModelName).get(); | ||
| EXPECT_EQ(IddObjectType{IddObjectType::Site_GroundTemperature_Undisturbed_KusudaAchenbach}, kusuda.iddObject().type()); | ||
| EXPECT_EQ(0.358, idfObject.getDouble(GroundHeatExchanger_HorizontalTrenchFields::EvapotranspirationGroundCoverParameter).get()); | ||
|
|
||
| EXPECT_EQ(1.02, kusuda.getDouble(Site_GroundTemperature_Undisturbed_KusudaAchenbachFields::SoilThermalConductivity).get()); | ||
| EXPECT_EQ(970.0, kusuda.getDouble(Site_GroundTemperature_Undisturbed_KusudaAchenbachFields::SoilDensity).get()); | ||
| EXPECT_EQ(2430.0, kusuda.getDouble(Site_GroundTemperature_Undisturbed_KusudaAchenbachFields::SoilSpecificHeat).get()); | ||
| EXPECT_EQ(16.5, kusuda.getDouble(Site_GroundTemperature_Undisturbed_KusudaAchenbachFields::AverageSoilSurfaceTemperature).get()); | ||
| EXPECT_EQ(13.8, kusuda.getDouble(Site_GroundTemperature_Undisturbed_KusudaAchenbachFields::AverageAmplitudeofSurfaceTemperature).get()); | ||
| EXPECT_EQ(18.3, kusuda.getDouble(Site_GroundTemperature_Undisturbed_KusudaAchenbachFields::PhaseShiftofMinimumSurfaceTemperature).get()); |
Collaborator
|
CI Results for 2b8e677:
|
tijcolem
approved these changes
Oct 31, 2022
Collaborator
tijcolem
left a comment
There was a problem hiding this comment.
Looks good to me. The BCL tests are failing which is unrelate to this PR.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request overview
Pull Request Author
src/model/test)src/energyplus/Test)src/osversion/VersionTranslator.cpp)Labels:
IDDChangeAPIChangePull Request - Ready for CIso that CI builds your PRReview Checklist
This will not be exhaustively relevant to every PR.