public IResult Calculate()
        {
            BuildingSite             buildingSite             = GetBuildingSite();
            SnowLoad                 snowLoad                 = GetSnowLoad(buildingSite);
            Building                 building                 = GetBuilding(snowLoad);
            ExceptionalMultiSpanRoof exceptionalMultiSpanRoof = GetExceptionalMultiSpanRoof(building);

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

            return(result);
        }
Beispiel #2
0
        public void ExceptionalMultiSpanRoofTest_CalculateSnowLoad_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

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

            var exceptionalMultiSpanRoof = new ExceptionalMultiSpanRoof(building, 10, 5, 2);

            exceptionalMultiSpanRoof.CalculateSnowLoad();
            Assert.AreEqual(2.7, Math.Round(exceptionalMultiSpanRoof.SnowLoad, 3),
                            "Snow load between roofs is not calculated properly.");
        }
Beispiel #3
0
        public void ExceptionalMultiSpanRoofTest_Constructor_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var exceptionalMultiSpanRoof = new ExceptionalMultiSpanRoof(building, 10, 5, 2);

            Assert.IsNotNull(exceptionalMultiSpanRoof, "MultiSpan should be created.");
            Assert.AreEqual(10, exceptionalMultiSpanRoof.LeftDriftLength,
                            "Drift length should be set at construction time.");
            Assert.AreEqual(5, exceptionalMultiSpanRoof.RightDriftLength,
                            "Drift length should be set at construction time.");
            Assert.AreEqual(2, exceptionalMultiSpanRoof.HeightInTheLowestPart,
                            "Height should be set at construction time.");
        }
 public ExceptionalSnowLoadMultispanRoof()
 {
     BuildingData             = new BuildingData();
     ExceptionalMultispanRoof = new ExceptionalMultiSpanRoof(BuildingData.Building, 0, 0, 0);
 }