Exemplo n.º 1
0
        public void ExampleTest3_CalculateSnowLoad_Success()
        {
            var buildingSite = new BuildingSite(Zones.FirstZone, Topographies.Normal, 127);

            buildingSite.CalculateExposureCoefficient();
            var snowLoad = new SnowLoad(buildingSite, DesignSituation.B2, true);

            snowLoad.CalculateSnowLoad();
            var building = new Building(snowLoad);

            building.CalculateThermalCoefficient();

            var roofAbuttingToTallerConstruction5Degrees = new ExceptionalRoofAbuttingToTallerConstruction(building, 12, 14.6, 4.5, 5);

            roofAbuttingToTallerConstruction5Degrees.CalculateDriftLength();
            roofAbuttingToTallerConstruction5Degrees.CalculateSnowLoad();

            var roofAbuttingToTallerConstruction35Degrees = new ExceptionalRoofAbuttingToTallerConstruction(building, 12, 14.6, 4.5, 35);

            roofAbuttingToTallerConstruction35Degrees.CalculateDriftLength();
            roofAbuttingToTallerConstruction35Degrees.CalculateSnowLoad();

            Assert.AreEqual(14.6, Math.Round(roofAbuttingToTallerConstruction5Degrees.DriftLength, 3),
                            "Drift length is not calculated properly.");
            Assert.AreEqual(1.4, Math.Round(roofAbuttingToTallerConstruction5Degrees.SnowLoadNearTheTop, 3),
                            "Snow load for roof is not calculated properly.");
            Assert.AreEqual(1.4, Math.Round(roofAbuttingToTallerConstruction5Degrees.SnowLoadNearTheEdge, 3),
                            "Snow load for roof is not calculated properly.");
            Assert.AreEqual(0, Math.Round(roofAbuttingToTallerConstruction35Degrees.SnowLoadNearTheTop, 3),
                            "Snow load for roof is not calculated properly.");
            Assert.AreEqual(1.167, Math.Round(roofAbuttingToTallerConstruction35Degrees.SnowLoadNearTheEdge, 3),
                            "Snow load for roof is not calculated properly.");
        }
Exemplo n.º 2
0
        public void ExceptionalRoofAbuttingToTallerConstructionTest_CalculateDriftLength_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var exceptionalRoofAbuttingToTallerConstruction =
                new ExceptionalRoofAbuttingToTallerConstruction(building, 20, 10, 3, 15);

            exceptionalRoofAbuttingToTallerConstruction.CalculateDriftLength();
            Assert.AreEqual(10, Math.Round(exceptionalRoofAbuttingToTallerConstruction.DriftLength, 3),
                            "Drift length for roof is not calculated properly.");
        }
Exemplo n.º 3
0
        public void ExceptionalRoofAbuttingToTallerConstructionTest_CalculateSnowLoad_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            building.SnowLoadImplementation.ExcepctionalSituation  = true;
            building.SnowLoadImplementation.CurrentDesignSituation = DesignSituation.B2;

            var exceptionalRoofAbuttingToTallerConstruction =
                new ExceptionalRoofAbuttingToTallerConstruction(building, 20, 10, 3, 15);

            exceptionalRoofAbuttingToTallerConstruction.CalculateSnowLoad();

            Assert.AreEqual(3.6, Math.Round(exceptionalRoofAbuttingToTallerConstruction.SnowLoadNearTheTop, 3),
                            "Snow load for roof is not calculated properly.");
            Assert.AreEqual(3.6, Math.Round(exceptionalRoofAbuttingToTallerConstruction.SnowLoadNearTheEdge, 3),
                            "Snow load for roof is not calculated properly.");
        }
Exemplo n.º 4
0
        public void ExceptionalRoofAbuttingToTallerConstructionTest_Constructor_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var exceptionalRoofAbuttingToTallerConstruction =
                new ExceptionalRoofAbuttingToTallerConstruction(building, 20, 10, 3, 15);

            Assert.IsNotNull(exceptionalRoofAbuttingToTallerConstruction,
                             "ExceptionalRoofAbuttingToTallerConstruction should be created.");
            Assert.AreEqual(20, exceptionalRoofAbuttingToTallerConstruction.UpperBuildingWidth,
                            "Width should be set at construction time.");
            Assert.AreEqual(10, exceptionalRoofAbuttingToTallerConstruction.LowerBuildingWidth,
                            "Width should be set at construction time.");
            Assert.AreEqual(3, exceptionalRoofAbuttingToTallerConstruction.HeightDifference,
                            "Height should be set at construction time.");
            Assert.AreEqual(15, exceptionalRoofAbuttingToTallerConstruction.Angle,
                            "Angle should be set at construction time.");
        }
Exemplo n.º 5
0
        public IResult Calculate()
        {
            BuildingSite buildingSite = GetBuildingSite();
            SnowLoad     snowLoad     = GetSnowLoad(buildingSite);
            Building     building     = GetBuilding(snowLoad);
            ExceptionalRoofAbuttingToTallerConstruction exceptionalRoofAbuttingToTallerConstruction
                = GetExceptionalRoofAbuttingToTallerConstruction(building);

            if (!ExposureCoefficient.HasValue)
            {
                buildingSite.CalculateExposureCoefficient();
            }
            snowLoad.CalculateSnowLoad();
            building.CalculateThermalCoefficient();
            exceptionalRoofAbuttingToTallerConstruction.CalculateDriftLength();
            exceptionalRoofAbuttingToTallerConstruction.CalculateSnowLoad();

            var result = new Result();

            result.Properties.Add("C_e_", buildingSite.ExposureCoefficient);
            result.Properties.Add("s_k_", snowLoad.DefaultCharacteristicSnowLoad);
            result.Properties.Add("V", snowLoad.VariationCoefficient);
            result.Properties.Add("C_esl_", snowLoad.ExceptionalSnowLoadCoefficient);
            result.Properties.Add("s_n_", snowLoad.SnowLoadForSpecificReturnPeriod);
            result.Properties.Add("s_Ad_", snowLoad.DesignExceptionalSnowLoadForSpecificReturnPeriod);
            result.Properties.Add("t_i_", building.InternalTemperature);
            result.Properties.Add("∆_t_", building.TempreatureDifference);
            result.Properties.Add("U", building.OverallHeatTransferCoefficient);
            result.Properties.Add("C_t_", building.ThermalCoefficient);
            result.Properties.Add("l_s_", exceptionalRoofAbuttingToTallerConstruction.DriftLength);
            result.Properties.Add("μ_3_", exceptionalRoofAbuttingToTallerConstruction.ShapeCoefficient3);
            result.Properties.Add("μ_1_", exceptionalRoofAbuttingToTallerConstruction.ShapeCoefficient1);
            result.Properties.Add("μ_2_", exceptionalRoofAbuttingToTallerConstruction.ShapeCoefficient2);
            result.Properties.Add("s_1_", exceptionalRoofAbuttingToTallerConstruction.SnowLoadNearTheTop);
            result.Properties.Add("s_2_", exceptionalRoofAbuttingToTallerConstruction.SnowLoadNearTheEdge);

            return(result);
        }
 public ExceptionalSnowLoadRoofAbuttingToTallerConstruction()
 {
     BuildingData = new BuildingData();
     ExceptionalRoofAbuttingToTallerConstruction = new ExceptionalRoofAbuttingToTallerConstruction(BuildingData.Building, 0, 0, 0, 0);
 }