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 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));
            });
        }
Beispiel #3
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));
            });
        }
Beispiel #4
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));
            });
        }
Beispiel #5
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));
            });
        }