-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into 89911514-Allow-OtherSideCoefficients-in-AFN
Conflicts: src/EnergyPlus/AirflowNetworkBalanceManager.cc tst/EnergyPlus/unit/CMakeLists.txt
- Loading branch information
Showing
9 changed files
with
267 additions
and
32 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
// EnergyPlus::AirflowNetworkSolver unit tests | ||
|
||
// Google test headers | ||
#include <gtest/gtest.h> | ||
|
||
// C++ Headers | ||
//#include <cassert> | ||
//#include <cmath> | ||
//#include <string> | ||
|
||
// ObjexxFCL Headers | ||
//#include <ObjexxFCL/FArray.functions.hh> | ||
//#include <ObjexxFCL/Fmath.hh> | ||
//#include <ObjexxFCL/gio.hh> | ||
|
||
// EnergyPlus Headers | ||
#include <DataAirflowNetwork.hh> | ||
#include <AirflowNetworkBalanceManager.hh> | ||
#include <AirflowNetworkSolver.hh> | ||
|
||
using namespace EnergyPlus; | ||
using namespace AirflowNetworkBalanceManager; | ||
using namespace DataAirflowNetwork; | ||
using namespace AirflowNetworkSolver; | ||
|
||
TEST( AirflowNetworkSolverTest, HorizontalOpening ) | ||
{ | ||
|
||
int i = 1; | ||
int j = 1; | ||
int CurveNum; | ||
int n; | ||
int m; | ||
int NF; | ||
FArray1D< Real64 > F; | ||
FArray1D< Real64 > DF; | ||
|
||
n = 1; | ||
m = 2; | ||
|
||
|
||
AirflowNetworkCompData.allocate( j ); | ||
AirflowNetworkCompData( j ).TypeNum = 1; | ||
MultizoneSurfaceData.allocate( i ); | ||
MultizoneSurfaceData( i ).Width = 10.0; | ||
MultizoneSurfaceData( i ).Height = 5.0; | ||
MultizoneSurfaceData( i ).OpenFactor = 1.0; | ||
|
||
RHOZ.allocate( 2 ); | ||
RHOZ( 1 ) = 1.2; | ||
RHOZ( 2 ) = 1.18; | ||
|
||
MultizoneCompHorOpeningData.allocate( 1 ); | ||
MultizoneCompHorOpeningData( 1 ).FlowCoef = 0.1; | ||
MultizoneCompHorOpeningData( 1 ).FlowExpo = 0.5; | ||
MultizoneCompHorOpeningData( 1 ).Slope = 90.0; | ||
MultizoneCompHorOpeningData( 1 ).DischCoeff = 0.2; | ||
|
||
F.allocate( 2 ); | ||
DF.allocate( 2 ); | ||
|
||
AirflowNetworkLinkageData.allocate( i ); | ||
AirflowNetworkLinkageData( i ).NodeHeights( 1 ) = 4.0; | ||
AirflowNetworkLinkageData( i ).NodeHeights( 2 ) = 2.0; | ||
|
||
AFEHOP( 1, 1, 0.05, 1, 1, 2, F, DF, NF ); | ||
EXPECT_NEAR( 3.47863, F( 1 ), 0.00001 ); | ||
EXPECT_NEAR( 34.7863, DF( 1 ), 0.0001 ); | ||
EXPECT_NEAR( 2.96657, F( 2 ), 0.00001 ); | ||
EXPECT_EQ( 0.0, DF( 2 ) ); | ||
|
||
AFEHOP( 1, 1, -0.05, 1, 1, 2, F, DF, NF ); | ||
EXPECT_NEAR( -3.42065, F( 1 ), 0.00001 ); | ||
EXPECT_NEAR( 34.20649, DF( 1 ), 0.0001 ); | ||
EXPECT_NEAR( 2.96657, F( 2 ), 0.00001 ); | ||
EXPECT_EQ( 0.0, DF( 2 ) ); | ||
|
||
AirflowNetworkLinkageData.deallocate(); | ||
DF.deallocate(); | ||
F.deallocate(); | ||
RHOZ.deallocate(); | ||
MultizoneCompHorOpeningData.deallocate(); | ||
MultizoneSurfaceData.deallocate(); | ||
AirflowNetworkCompData.deallocate(); | ||
} | ||
|
||
|
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
Oops, something went wrong.
23232c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
89911514-Allow-OtherSideCoefficients-in-AFN (lgu1234) - x86_64-Linux-Ubuntu-14.04-gcc-4.8: OK (1656 of 1656 tests passed)
23232c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
89911514-Allow-OtherSideCoefficients-in-AFN (lgu1234) - x86_64-Linux-Ubuntu-14.04-cppcheck-1.61: OK (0 of 0 tests passed)
23232c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
89911514-Allow-OtherSideCoefficients-in-AFN (lgu1234) - i386-Windows-7-VisualStudio-12: OK (1656 of 1656 tests passed)
23232c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
89911514-Allow-OtherSideCoefficients-in-AFN (lgu1234) - x86_64-Linux-Ubuntu-14.04-gcc-4.8-UnitTestsCoverage-Debug: OK (640 of 640 tests passed)
23232c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
89911514-Allow-OtherSideCoefficients-in-AFN (lgu1234) - x86_64-MacOS-10.9-clang: OK (1650 of 1650 tests passed)
23232c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
89911514-Allow-OtherSideCoefficients-in-AFN (lgu1234) - x86_64-Linux-Ubuntu-14.04-gcc-4.8-IntegrationCoverage-Debug: OK (1149 of 1149 tests passed)
23232c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
89911514-Allow-OtherSideCoefficients-in-AFN (lgu1234) - Win64-Windows-7-VisualStudio-12: OK (1656 of 1656 tests passed)