public IResult Calculate()
        {
            BuildingSite buildingSite = GetBuildingSite();
            SnowLoad     snowLoad     = GetSnowLoad(buildingSite);
            Building     building     = GetBuilding(snowLoad);
            ExceptionalSnowBehindParapetAtEaves exceptionalSnowBehindParapetAtEaves
                = GetExceptionalSnowBehindParapetAtEaves(building);

            if (!ExposureCoefficient.HasValue)
            {
                buildingSite.CalculateExposureCoefficient();
            }
            snowLoad.CalculateSnowLoad();
            building.CalculateThermalCoefficient();
            exceptionalSnowBehindParapetAtEaves.CalculateDriftLength();
            exceptionalSnowBehindParapetAtEaves.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_", exceptionalSnowBehindParapetAtEaves.DriftLength);
            result.Properties.Add("μ_1_", exceptionalSnowBehindParapetAtEaves.ShapeCoefficient);
            result.Properties.Add("s", exceptionalSnowBehindParapetAtEaves.SnowLoad);

            return(result);
        }
Пример #2
0
        public void ExceptionalSnowBehindParapetAtEavesTest_CalculateDriftLength_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var exceptionalSnowBehindParapetAtEaves =
                new ExceptionalSnowBehindParapetAtEaves(building, 5, 20, 1);

            exceptionalSnowBehindParapetAtEaves.CalculateDriftLength();
            Assert.AreEqual(5, Math.Round(exceptionalSnowBehindParapetAtEaves.DriftLength, 3),
                            "Drift length for roof is not calculated properly.");
        }
Пример #3
0
        public void ExceptionalSnowBehindParapetAtEavesTest_CalculateSnowLoad_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

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

            var exceptionalSnowBehindParapetAtEaves =
                new ExceptionalSnowBehindParapetAtEaves(building, 5, 20, 1);

            exceptionalSnowBehindParapetAtEaves.CalculateSnowLoad();

            Assert.AreEqual(2, Math.Round(exceptionalSnowBehindParapetAtEaves.SnowLoad, 3),
                            "Snow load for roof is not calculated properly.");
        }
Пример #4
0
        public void ExceptionalSnowBehindParapetAtEavesTest_Constructor_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var exceptionalSnowBehindParapetAtEaves =
                new ExceptionalSnowBehindParapetAtEaves(building, 5, 20, 1);

            Assert.IsNotNull(exceptionalSnowBehindParapetAtEaves,
                             "ExceptionalSnowBehindParapetAtEaves should be created.");
            Assert.AreEqual(5, exceptionalSnowBehindParapetAtEaves.RidgeDistance,
                            "Width should be set at construction time.");
            Assert.AreEqual(20, exceptionalSnowBehindParapetAtEaves.BuildingWidth,
                            "Width should be set at construction time.");
            Assert.AreEqual(1, exceptionalSnowBehindParapetAtEaves.HeightDifference,
                            "Height should be set at construction time.");
        }
Пример #5
0
        public void ExampleTest2_CalculateExceptionalSnowLoad_Success()
        {
            var buildingSite = new BuildingSite(ZoneEnum.ThirdZone, TopographyEnum.Normal, 360);

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

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

            building.CalculateThermalCoefficient();

            var exceptionalSnowBehindParapetAtEaves = new ExceptionalSnowBehindParapetAtEaves(building, 6, 12, 1);

            exceptionalSnowBehindParapetAtEaves.CalculateDriftLength();
            exceptionalSnowBehindParapetAtEaves.CalculateSnowLoad();

            Assert.AreEqual(5, Math.Round(exceptionalSnowBehindParapetAtEaves.DriftLength, 3),
                            "Drift length is not calculated properly.");
            Assert.AreEqual(2, Math.Round(exceptionalSnowBehindParapetAtEaves.SnowLoad, 3),
                            "Snow load for roof is not calculated properly.");
        }
Пример #6
0
 public ExceptionalSnowLoadSnowBehindParapetAtEaves()
 {
     BuildingData = new BuildingData();
     ExceptionalSnowBehindParapetAtEaves = new ExceptionalSnowBehindParapetAtEaves(BuildingData.Building, 0, 0, 0);
 }