public void ExternalWindPressureCalculationsTest_AS_SX01a_Success()
        {
            //Arrange:
            var building = new EqualHeightWalls(
                length: 72, width: 30, height: 7.3);
            var terrain      = new TerrainCategoryII();
            var buildingSite = new BuildingSite(325, WindZone.II, terrain);
            var windLoadData = new WindLoadData(buildingSite, building);
            var verticalWallOfRectangularBuilding = new WallsWindLoads(building, windLoadData);

            //Act:
            var result = verticalWallOfRectangularBuilding.GetExternalWindPressureMaxAt(building.Height);

            //Assert:
            Assert.Multiple(() =>
            {
                Assert.That(result[Field.D], Is.EqualTo(0.638).Within(0.001));
                Assert.That(result[Field.E], Is.EqualTo(-0.273).Within(0.001));
            });
        }
        public void ReferenceHeightsTest_HeightBuilding_Success()
        {
            var buildingSite = new Mock <IBuildingSite>();
            var building     = new Mock <IStructure>();

            building.Setup(b => b.Height).Returns(30);
            building.Setup(b => b.Width).Returns(10);
            building.Setup(b => b.Length).Returns(15);
            var windLoad = new WindLoadData(buildingSite.Object, building.Object);

            Assert.That(windLoad.GetReferenceHeightAt(0), Is.EqualTo(10));
            Assert.That(windLoad.GetReferenceHeightAt(10), Is.EqualTo(10));
            Assert.That(windLoad.GetReferenceHeightAt(10.001), Is.EqualTo(11));
            Assert.That(windLoad.GetReferenceHeightAt(18), Is.EqualTo(18));
            Assert.That(windLoad.GetReferenceHeightAt(17.5), Is.EqualTo(18));
            Assert.That(windLoad.GetReferenceHeightAt(20), Is.EqualTo(20));
            Assert.That(windLoad.GetReferenceHeightAt(20.001), Is.EqualTo(30));
            Assert.That(windLoad.GetReferenceHeightAt(25), Is.EqualTo(30));
            Assert.That(windLoad.GetReferenceHeightAt(30), Is.EqualTo(30));
        }
        public void GetTurbulenceIntensityAtTest_Success(double minimumHeight, double result)
        {
            var terrainOrography = new Mock <IFactorAt>();

            terrainOrography.Setup(to => to.GetFactorAt(It.IsAny <double>())).Returns(2);
            var terrain = new Mock <ITerrain>();

            terrain.Setup(t => t.RoughnessLength).Returns(3);
            terrain.Setup(t => t.MinimumHeight).Returns(minimumHeight);
            terrain.Setup(t => t.TerrainOrography).Returns(terrainOrography.Object);
            var buildingSite = new Mock <IBuildingSite>();

            buildingSite.Setup(bs => bs.Terrain).Returns(terrain.Object);
            var building = new Mock <IStructure>();

            building.Setup(b => b.Height).Returns(5);
            building.Setup(b => b.Width).Returns(3);
            var windLoad = new WindLoadData(buildingSite.Object, building.Object);

            Assert.That(windLoad.GetTurbulenceIntensityAt(4), Is.EqualTo(result).Within(0.001));
        }
        public void GetMeanWindVelocityAtTest_Success()
        {
            var terrainOrography = new Mock <IFactorAt>();

            terrainOrography.Setup(to => to.GetFactorAt(2)).Returns(2);
            var terrain = new Mock <ITerrain>();

            terrain.Setup(t => t.TerrainOrography).Returns(terrainOrography.Object);
            terrain.Setup(t => t.GetRoughnessFactorAt(2)).Returns(3);
            var buildingSite = new Mock <IBuildingSite>();

            buildingSite.Setup(bs => bs.BasicWindVelocity).Returns(5);
            buildingSite.Setup(bs => bs.Terrain).Returns(terrain.Object);
            var building = new Mock <IStructure>();

            building.Setup(b => b.Height).Returns(2);
            building.Setup(b => b.Width).Returns(3);
            var windLoad = new WindLoadData(buildingSite.Object, building.Object);

            Assert.That(windLoad.GetMeanWindVelocityAt(2), Is.EqualTo(30));
        }
        public void ExternalWindPressureCalculationsTest_Walls_Success()
        {
            //Arrange:
            var building     = new EqualHeightWalls(10, 10, 15);
            var terrain      = new TerrainCategoryIII();
            var buildingSite = new BuildingSite(325, WindZone.I_III, terrain);
            var windLoadData = new WindLoadData(buildingSite, building);
            var verticalWallOfRectangularBuilding = new WallsWindLoads(building, windLoadData);

            //Act:
            var result = verticalWallOfRectangularBuilding.GetExternalWindPressureMaxAt(building.Height);

            //Assert:
            Assert.Multiple(() =>
            {
                Assert.That(result[Field.A], Is.EqualTo(-0.754).Within(0.001));
                Assert.That(result[Field.B], Is.EqualTo(-0.503).Within(0.001));
                Assert.That(result[Field.D], Is.EqualTo(0.503).Within(0.001));
                Assert.That(result[Field.E], Is.EqualTo(-0.330).Within(0.001));
            });
        }
        public void GetPeakVelocityPressureAtTest_Success()
        {
            var terrainOrography = new Mock <IFactorAt>();

            terrainOrography.Setup(to => to.GetFactorAt(It.IsAny <double>())).Returns(2);
            var terrain = new Mock <ITerrain>();

            terrain.Setup(t => t.RoughnessLength).Returns(1);
            terrain.Setup(t => t.MinimumHeight).Returns(1);
            terrain.Setup(t => t.GetRoughnessFactorAt(It.IsAny <double>())).Returns(3);
            terrain.Setup(t => t.TerrainOrography).Returns(terrainOrography.Object);
            var buildingSite = new Mock <IBuildingSite>();

            buildingSite.Setup(bs => bs.BasicWindVelocity).Returns(5);
            buildingSite.Setup(bs => bs.Terrain).Returns(terrain.Object);
            var building = new Mock <IStructure>();

            building.Setup(b => b.Height).Returns(2);
            building.Setup(b => b.Width).Returns(3);
            var windLoad = new WindLoadData(buildingSite.Object, building.Object);

            Assert.That(windLoad.GetPeakVelocityPressureAt(2), Is.EqualTo(3.403).Within(0.001));
        }
        public void ExternalWindPressureCalculationsTest_8_1a_Success()
        {
            //Arrange:
            var building = new EqualHeightWalls(
                length: 28.8, width: 42, height: 10.6);
            var terrain      = new TerrainCategoryIII();
            var buildingSite = new BuildingSite(175, WindZone.I, terrain);
            var windLoadData = new WindLoadData(buildingSite, building);
            var verticalWallOfRectangularBuilding = new WallsWindLoads(building, windLoadData);

            //Act:
            var result = verticalWallOfRectangularBuilding.GetExternalWindPressureMaxAt(building.Height);

            //Assert:
            Assert.Multiple(() =>
            {
                Assert.That(result[Field.A], Is.EqualTo(-0.704).Within(0.001));
                Assert.That(result[Field.B], Is.EqualTo(-0.470).Within(0.001));
                Assert.That(result[Field.C], Is.EqualTo(-0.294).Within(0.001));
                Assert.That(result[Field.D], Is.EqualTo(0.420).Within(0.001));
                Assert.That(result[Field.E], Is.EqualTo(-0.194).Within(0.001));
            });
        }
        public void ExternalWindPressureForceCalculationsTest_8_2_20m_Success()
        {
            //Arrange:
            var building = new EqualHeightWalls(
                length: 16, width: 20, height: 48);
            var heightDisplacement = new HeightDisplacement(
                building,
                horizontalDistanceToObstruction: 10,
                obstructionHeight: 15);
            var terrain      = new TerrainCategoryIV(heightDisplacement);
            var buildingSite = new BuildingSite(360, WindZone.III, terrain);
            var windLoadData = new WindLoadData(buildingSite, building);
            var verticalWallOfRectangularBuilding = new WallsWindLoads(building, windLoadData);

            var structuralFactorCalculator = new StructuralFactorCalculator(
                building, terrain, windLoadData, StructuralType.SteelBuilding);

            var externalPressureWindForce =
                new ExternalPressureWindForce(
                    windLoadData,
                    verticalWallOfRectangularBuilding,
                    structuralFactorCalculator);

            //Act:
            var result = externalPressureWindForce.GetExternalPressureWindForceMaxAt(
                20, calculateStructuralFactor: true);

            //Assert:
            Assert.Multiple(() =>
            {
                Assert.That(result[Field.A], Is.EqualTo(-0.464).Within(0.001));
                Assert.That(result[Field.B], Is.EqualTo(-0.309).Within(0.001));
                Assert.That(result[Field.D], Is.EqualTo(0.309).Within(0.001));
                Assert.That(result[Field.E], Is.EqualTo(-0.232).Within(0.001));
            });
        }
        public void ExternalWindPressureForceCalculationsTest_Success()
        {
            //Arrange:
            double   heightAboveSeaLevel = 250;
            double   length          = 30;
            double   width           = 30;
            double   outerHeight     = 17.355;
            double   middleHeight    = 20;
            WindZone windZone        = WindZone.I;
            double   referenceHeight = outerHeight;

            var building = new DuopitchRoof(
                length, width, outerHeight, middleHeight, DuopitchRoof.Rotation.Degrees_90);
            var heightDisplacement = new HeightDisplacement(
                building, horizontalDistanceToObstruction: 10, obstructionHeight: 15);
            var terrain           = new TerrainCategoryIV(heightDisplacement);
            var buildingSite      = new BuildingSite(heightAboveSeaLevel, windZone, terrain);
            var windLoadData      = new WindLoadData(buildingSite, building);
            var flatRoofWindLoads = new DuopitchRoofWindLoadsRotation90(
                building, windLoadData);

            var externalPressureWindForce =
                new ExternalPressureWindForce(
                    windLoadData,
                    flatRoofWindLoads);

            referenceHeight = windLoadData.GetReferenceHeightAt(referenceHeight)
                              - heightDisplacement.GetFactor();

            //Act:
            var resultMax = externalPressureWindForce.GetExternalPressureWindForceMaxAt(
                building.Height, calculateStructuralFactor: true);
            var resultMin = externalPressureWindForce.GetExternalPressureWindForceMinAt(
                building.Height, calculateStructuralFactor: true);

            //Assert:
            Assert.Multiple(() =>
            {
                // e
                Assert.That(building.EdgeDistance, Is.EqualTo(30));
                // v_b,0
                Assert.That(buildingSite.FundamentalValueBasicWindVelocity, Is.EqualTo(22).Within(0.01));
                // c_dir

                // v_b
                Assert.That(buildingSite.BasicWindVelocity, Is.EqualTo(22).Within(0.01));
                // z_e

                // c_r(z_e)
                Assert.That(terrain.GetRoughnessFactorAt(referenceHeight), Is.EqualTo(0.6).Within(0.01));
                // c_0(z_e)

                // v_m(z_e)
                Assert.That(windLoadData.GetMeanWindVelocityAt(referenceHeight),
                            Is.EqualTo(13.2).Within(0.01));
                // I_v(z_e)
                Assert.That(windLoadData.GetTurbulenceIntensityAt(referenceHeight),
                            Is.EqualTo(0.434).Within(0.001));
                // q_p(z_e)
                Assert.That(windLoadData.GetPeakVelocityPressureAt(referenceHeight),
                            Is.EqualTo(0.440).Within(0.001));
                // c_sc_d

                Assert.That(resultMax[Field.F], Is.EqualTo(-0.638).Within(0.001));
                Assert.That(resultMax[Field.G], Is.EqualTo(-0.572).Within(0.001));
                Assert.That(resultMax[Field.H], Is.EqualTo(-0.286).Within(0.001));
                Assert.That(resultMax[Field.I], Is.EqualTo(-0.242).Within(0.001));

                Assert.That(resultMin[Field.F], Is.EqualTo(-0.638).Within(0.001));
                Assert.That(resultMin[Field.G], Is.EqualTo(-0.572).Within(0.001));
                Assert.That(resultMin[Field.H], Is.EqualTo(-0.286).Within(0.001));
                Assert.That(resultMin[Field.I], Is.EqualTo(-0.242).Within(0.001));
            });
        }
Exemple #10
0
        public void ExternalWindPressureForceCalculationsTest_Success()
        {
            //Arrange:
            double   heightAboveSeaLevel = 250;
            double   length          = 30;
            double   width           = 30;
            double   height          = 10;
            double   curvature       = 2;
            WindZone windZone        = WindZone.I;
            double   referenceHeight = height;

            double actualLengthUpwindSlope        = 70;
            double actualLengthDownwindSlope      = 10;
            double effectiveFeatureHeight         = 10;
            double horizontalDistanceFromCrestTop = -7;

            double windDirection = 0;

            var building = new FlatRoof(
                length, width, height, FlatRoof.Rotation.Degrees_0);
            var orographyFactor = new HillRidgeOrography(
                actualLengthUpwindSlope,
                actualLengthDownwindSlope,
                effectiveFeatureHeight,
                horizontalDistanceFromCrestTop);
            var terrain           = new TerrainCategory0(orographyFactor);
            var directionalFactor = new DirectionalFactor(windZone, windDirection);
            var buildingSite      = new BuildingSite(heightAboveSeaLevel, windZone, terrain,
                                                     directionalFactor: directionalFactor);
            var referenceHeightDueToNeighbouringStructures =
                new ReferenceHeightDueToNeighbouringStructures(
                    highBuildingWidth: 20, highBuildingLength: 100,
                    highBuildingHeight: 100, distanceToBuilding: 30);
            var windLoadData = new WindLoadData(buildingSite, building,
                                                referenceHeightDueToNeighbouringStructures: referenceHeightDueToNeighbouringStructures);
            var flatRoofWindLoads = new FlatRoofWithCurvedEavesWindLoads(
                building, windLoadData, curvature);

            var structuralFactorCalculator = new StructuralFactorCalculator(
                building, terrain, windLoadData, StructuralType.SteelBuilding);

            var externalPressureWindForce =
                new ExternalPressureWindForce(
                    windLoadData,
                    flatRoofWindLoads,
                    structuralFactorCalculator);

            referenceHeight = windLoadData.GetReferenceHeightAt(referenceHeight);

            //Act:
            var resultMax = externalPressureWindForce.GetExternalPressureWindForceMaxAt(
                referenceHeight, calculateStructuralFactor: true);
            var resultMin = externalPressureWindForce.GetExternalPressureWindForceMinAt(
                referenceHeight, calculateStructuralFactor: true);

            //Assert:
            Assert.Multiple(() =>
            {
                // e
                Assert.That(building.EdgeDistance, Is.EqualTo(20));
                // v_b,0
                Assert.That(buildingSite.FundamentalValueBasicWindVelocity, Is.EqualTo(22).Within(0.01));
                // c_dir
                Assert.That(directionalFactor.GetFactor(), Is.EqualTo(0.8));
                // v_b
                Assert.That(buildingSite.BasicWindVelocity, Is.EqualTo(17.6).Within(0.01));
                // z_e

                // c_r(z_e)
                Assert.That(terrain.GetRoughnessFactorAt(referenceHeight), Is.EqualTo(1.30).Within(0.01));
                // c_0(z_e)
                Assert.That(orographyFactor.GetFactorAt(referenceHeight), Is.EqualTo(1.17).Within(0.01));
                // v_m(z_e)
                Assert.That(windLoadData.GetMeanWindVelocityAt(referenceHeight),
                            Is.EqualTo(29.22).Within(0.01));
                // I_v(z_e)
                Assert.That(windLoadData.GetTurbulenceIntensityAt(referenceHeight),
                            Is.EqualTo(0.096).Within(0.001));
                // q_p(z_e)
                Assert.That(windLoadData.GetPeakVelocityPressureAt(referenceHeight),
                            Is.EqualTo(0.893).Within(0.001));
                // c_sc_d
                Assert.That(structuralFactorCalculator.GetStructuralFactor(true),
                            Is.EqualTo(1).Within(0.001));

                Assert.That(resultMax[Field.F], Is.EqualTo(-0.446).Within(0.001));
                Assert.That(resultMax[Field.G], Is.EqualTo(-0.446).Within(0.001));
                Assert.That(resultMax[Field.H], Is.EqualTo(-0.268).Within(0.001));
                Assert.That(resultMax[Field.I], Is.EqualTo(0.179).Within(0.001));

                Assert.That(resultMin[Field.F], Is.EqualTo(-0.446).Within(0.001));
                Assert.That(resultMin[Field.G], Is.EqualTo(-0.446).Within(0.001));
                Assert.That(resultMin[Field.H], Is.EqualTo(-0.268).Within(0.001));
                Assert.That(resultMin[Field.I], Is.EqualTo(-0.179).Within(0.001));
            });
        }
Exemple #11
0
        public void ExternalWindPressureForceCalculationsTest_Success()
        {
            //Arrange:
            double   heightAboveSeaLevel = 123;
            double   length          = 70;
            double   width           = 100;
            double   height          = 45;
            double   parapetHeight   = 3;
            WindZone windZone        = WindZone.I_III;
            double   referenceHeight = height + parapetHeight;

            double actualLengthUpwindSlope        = 20;
            double actualLengthDownwindSlope      = 20;
            double effectiveFeatureHeight         = 10;
            double horizontalDistanceFromCrestTop = 7;

            double windDirection = 220;

            var building = new FlatRoofWithParapetes(
                length, width, height, parapetHeight, FlatRoof.Rotation.Degrees_90);
            var orographyFactor = new HillRidgeOrography(
                actualLengthUpwindSlope,
                actualLengthDownwindSlope,
                effectiveFeatureHeight,
                horizontalDistanceFromCrestTop);
            var terrain           = new TerrainCategoryII(orographyFactor);
            var directionalFactor = new DirectionalFactor(windZone, windDirection);
            var buildingSite      = new BuildingSite(heightAboveSeaLevel, windZone, terrain,
                                                     directionalFactor: directionalFactor);
            var windLoadData      = new WindLoadData(buildingSite, building);
            var flatRoofWindLoads = new FlatRoofWithParapetesWindLoads(
                building, windLoadData, parapetHeight);
            // var heightDisplacement = new HeightDisplacement(building:, )

            var structuralFactorCalculator = new StructuralFactorCalculator(
                building, terrain, windLoadData, StructuralType.ReinforcementConcreteBuilding);

            var externalPressureWindForce =
                new ExternalPressureWindForce(
                    windLoadData,
                    flatRoofWindLoads,
                    structuralFactorCalculator);

            referenceHeight = windLoadData.GetReferenceHeightAt(referenceHeight);

            //Act:
            var resultMax = externalPressureWindForce.GetExternalPressureWindForceMaxAt(
                referenceHeight, calculateStructuralFactor: true);
            var resultMin = externalPressureWindForce.GetExternalPressureWindForceMinAt(
                referenceHeight, calculateStructuralFactor: true);

            //Assert:
            Assert.Multiple(() =>
            {
                // e
                Assert.That(building.EdgeDistance, Is.EqualTo(70));
                // v_b,0
                Assert.That(buildingSite.FundamentalValueBasicWindVelocity, Is.EqualTo(22).Within(0.01));
                // c_dir
                Assert.That(directionalFactor.GetFactor(), Is.EqualTo(1));
                // v_b
                Assert.That(buildingSite.BasicWindVelocity, Is.EqualTo(22).Within(0.01));
                // z_e

                // c_r(z_e)
                Assert.That(terrain.GetRoughnessFactorAt(referenceHeight), Is.EqualTo(1.31).Within(0.01));
                // c_0(z_e)
                Assert.That(orographyFactor.GetFactorAt(referenceHeight), Is.EqualTo(1.06).Within(0.01));
                // v_m(z_e)
                Assert.That(windLoadData.GetMeanWindVelocityAt(referenceHeight),
                            Is.EqualTo(30.30).Within(0.01));
                // I_v(z_e)
                Assert.That(windLoadData.GetTurbulenceIntensityAt(referenceHeight),
                            Is.EqualTo(0.138).Within(0.001));
                // q_p(z_e)
                Assert.That(windLoadData.GetPeakVelocityPressureAt(referenceHeight),
                            Is.EqualTo(1.128).Within(0.001));
                // c_sc_d
                Assert.That(structuralFactorCalculator.GetStructuralFactor(true),
                            Is.EqualTo(0.852).Within(0.001));

                Assert.That(resultMax[Field.F], Is.EqualTo(-1.298).Within(0.001));
                Assert.That(resultMax[Field.G], Is.EqualTo(-0.842).Within(0.001));
                Assert.That(resultMax[Field.H], Is.EqualTo(-0.673).Within(0.001));
                Assert.That(resultMax[Field.I], Is.EqualTo(0.192).Within(0.001));

                Assert.That(resultMin[Field.F], Is.EqualTo(-1.298).Within(0.001));
                Assert.That(resultMin[Field.G], Is.EqualTo(-0.842).Within(0.001));
                Assert.That(resultMin[Field.H], Is.EqualTo(-0.673).Within(0.001));
                Assert.That(resultMin[Field.I], Is.EqualTo(-0.192).Within(0.001));
            });
        }
Exemple #12
0
        public void ExternalWindPressureForceCalculationsTest_Example2019_04_28_Success()
        {
            //Arrange:
            double   heightAboveSeaLevel = 123;
            double   length          = 40;
            double   width           = 50;
            double   height          = 30;
            WindZone windZone        = WindZone.II;
            double   referenceHeight = 30;

            double actualLengthUpwindSlope        = 20;
            double actualLengthDownwindSlope      = 10;
            double effectiveFeatureHeight         = 10;
            double horizontalDistanceFromCrestTop = 2;

            double windDirection = 220;

            var building = new FlatRoof(
                length, width, height);
            var orographyFactor = new HillRidgeOrography(
                actualLengthUpwindSlope,
                actualLengthDownwindSlope,
                effectiveFeatureHeight,
                horizontalDistanceFromCrestTop);
            var terrain           = new TerrainCategoryIII(orographyFactor);
            var directionalFactor = new DirectionalFactor(windZone, windDirection);
            var buildingSite      = new BuildingSite(heightAboveSeaLevel, windZone, terrain,
                                                     directionalFactor: directionalFactor);
            var windLoadData      = new WindLoadData(buildingSite, building);
            var flatRoofWindLoads = new FlatRoofWindLoads(building, windLoadData);

            var structuralFactorCalculator = new StructuralFactorCalculator(
                building, terrain, windLoadData, StructuralType.ReinforcementConcreteBuilding);

            var externalPressureWindForce =
                new ExternalPressureWindForce(
                    windLoadData,
                    flatRoofWindLoads,
                    structuralFactorCalculator);

            //Act:
            var resultMax = externalPressureWindForce.GetExternalPressureWindForceMaxAt(
                referenceHeight, calculateStructuralFactor: true);
            var resultMin = externalPressureWindForce.GetExternalPressureWindForceMinAt(
                referenceHeight, calculateStructuralFactor: true);

            //Assert:
            Assert.Multiple(() =>
            {
                // e
                Assert.That(building.EdgeDistance, Is.EqualTo(50));
                // v_b,0
                Assert.That(buildingSite.FundamentalValueBasicWindVelocity, Is.EqualTo(26).Within(0.01));
                // c_dir
                Assert.That(directionalFactor.GetFactor(), Is.EqualTo(0.8));
                // v_b
                Assert.That(buildingSite.BasicWindVelocity, Is.EqualTo(20.8).Within(0.01));
                // z_e

                // c_r(z_e)
                Assert.That(terrain.GetRoughnessFactorAt(referenceHeight), Is.EqualTo(0.99).Within(0.01));
                // c_0(z_e)
                Assert.That(orographyFactor.GetFactorAt(referenceHeight), Is.EqualTo(1.11).Within(0.01));
                // v_m(z_e)
                Assert.That(windLoadData.GetMeanWindVelocityAt(referenceHeight),
                            Is.EqualTo(22.85).Within(0.01));
                // I_v(z_e)
                Assert.That(windLoadData.GetTurbulenceIntensityAt(referenceHeight),
                            Is.EqualTo(0.195).Within(0.001));
                // q_p(z_e)
                Assert.That(windLoadData.GetPeakVelocityPressureAt(referenceHeight),
                            Is.EqualTo(0.771).Within(0.001));
                // c_sc_d
                Assert.That(structuralFactorCalculator.GetStructuralFactor(true),
                            Is.EqualTo(0.817).Within(0.001));

                Assert.That(resultMax[Field.F], Is.EqualTo(-1.134).Within(0.001));
                Assert.That(resultMax[Field.G], Is.EqualTo(-0.756).Within(0.001));
                Assert.That(resultMax[Field.H], Is.EqualTo(-0.441).Within(0.001));
                Assert.That(resultMax[Field.I], Is.EqualTo(0.126).Within(0.001));

                Assert.That(resultMin[Field.F], Is.EqualTo(-1.134).Within(0.001));
                Assert.That(resultMin[Field.G], Is.EqualTo(-0.756).Within(0.001));
                Assert.That(resultMin[Field.H], Is.EqualTo(-0.441).Within(0.001));
                Assert.That(resultMin[Field.I], Is.EqualTo(-0.126).Within(0.001));
            });
        }
        public void ExternalWindPressureForceCalculationsTest_Example2019_04_27_At100meters_Success()
        {
            //Arrange:
            double   heightAboveSeaLevel = 400;
            double   length          = 110;
            double   width           = 70;
            double   height          = 200;
            WindZone windZone        = WindZone.III;
            double   referenceHeight = 100;

            double actualLengthUpwindSlope        = 20;
            double actualLengthDownwindSlope      = 10;
            double effectiveFeatureHeight         = 10;
            double horizontalDistanceFromCrestTop = -2;

            double windDirection = 20;

            var building = new EqualHeightWalls(
                length, width, height);
            var orographyFactor = new HillRidgeOrography(
                actualLengthUpwindSlope,
                actualLengthDownwindSlope,
                effectiveFeatureHeight,
                horizontalDistanceFromCrestTop);
            var terrain           = new TerrainCategoryI(orographyFactor);
            var directionalFactor = new DirectionalFactor(windZone, windDirection);
            var buildingSite      = new BuildingSite(heightAboveSeaLevel, windZone, terrain,
                                                     directionalFactor: directionalFactor);
            var windLoadData = new WindLoadData(buildingSite, building);
            var verticalWallOfRectangularBuilding = new WallsWindLoads(building, windLoadData);

            var structuralFactorCalculator = new StructuralFactorCalculator(
                building, terrain, windLoadData, StructuralType.ReinforcementConcreteBuilding);

            var externalPressureWindForce =
                new ExternalPressureWindForce(
                    windLoadData,
                    verticalWallOfRectangularBuilding,
                    structuralFactorCalculator);

            //Act:
            var result = externalPressureWindForce.GetExternalPressureWindForceMaxAt(
                referenceHeight, calculateStructuralFactor: true);

            //Assert:
            Assert.Multiple(() =>
            {
                // e
                Assert.That(building.EdgeDistance, Is.EqualTo(70));
                // v_b,0
                Assert.That(buildingSite.FundamentalValueBasicWindVelocity, Is.EqualTo(23.32).Within(0.01));
                // c_dir
                Assert.That(directionalFactor.GetFactor(), Is.EqualTo(0.7));
                // v_b
                Assert.That(buildingSite.BasicWindVelocity, Is.EqualTo(16.32).Within(0.01));
                // z_e

                // c_r(z_e)
                Assert.That(terrain.GetRoughnessFactorAt(referenceHeight), Is.EqualTo(1.62).Within(0.01));
                // c_0(z_e)
                Assert.That(orographyFactor.GetFactorAt(referenceHeight), Is.EqualTo(1));
                // v_m(z_e)
                Assert.That(windLoadData.GetMeanWindVelocityAt(referenceHeight),
                            Is.EqualTo(26.42).Within(0.01));
                // I_v(z_e)
                Assert.That(windLoadData.GetTurbulenceIntensityAt(referenceHeight),
                            Is.EqualTo(0.109).Within(0.001));
                // q_p(z_e)
                Assert.That(windLoadData.GetPeakVelocityPressureAt(referenceHeight),
                            Is.EqualTo(0.738).Within(0.001));
                // c_sc_d
                Assert.That(structuralFactorCalculator.GetStructuralFactor(true),
                            Is.EqualTo(0.878).Within(0.001));

                Assert.That(result[Field.A], Is.EqualTo(-0.778).Within(0.001));
                Assert.That(result[Field.B], Is.EqualTo(-0.518).Within(0.001));
                Assert.That(result[Field.C], Is.EqualTo(-0.324).Within(0.001));
                Assert.That(result[Field.D], Is.EqualTo(0.518).Within(0.001));
                Assert.That(result[Field.E], Is.EqualTo(-0.350).Within(0.001));
            });
        }