Exemplo n.º 1
0
        public IResult Calculate()
        {
            BuildingSite buildingSite = GetBuildingSite();
            SnowLoad     snowLoad     = GetSnowLoad(buildingSite);
            Building     building     = GetBuilding(snowLoad);
            ExceptionalSnowBehindParapet exceptionalSnowBehindParapet
                = GetExceptionalSnowBehindParapet(building);

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

            return(result);
        }
Exemplo n.º 2
0
        public void ExceptionalSnowBehindParapetTest_CalculateDriftLength_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var exceptionalSnowBehindParapet =
                new ExceptionalSnowBehindParapet(building, 20, 1);

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

            var exceptionalSnowBehindParapet =
                new ExceptionalSnowBehindParapet(building, 20, 1);

            Assert.IsNotNull(exceptionalSnowBehindParapet,
                             "ExceptionalSnowBehindParapet should be created.");
            Assert.AreEqual(20, exceptionalSnowBehindParapet.Width,
                            "Width should be set at construction time.");
            Assert.AreEqual(1, exceptionalSnowBehindParapet.HeightDifference,
                            "Height should be set at construction time.");
        }
Exemplo n.º 4
0
        public void ExceptionalSnowBehindParapetTest_CalculateSnowLoad_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

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

            var exceptionalSnowBehindParapet =
                new ExceptionalSnowBehindParapet(building, 20, 1);

            exceptionalSnowBehindParapet.CalculateSnowLoad();

            Assert.AreEqual(2, Math.Round(exceptionalSnowBehindParapet.SnowLoad, 3),
                            "Snow load for roof is not calculated properly.");
        }
 public ExceptionalSnowLoadSnowBehindParapet()
 {
     BuildingData = new BuildingData();
     ExceptionalSnowBehindParapet = new ExceptionalSnowBehindParapet(BuildingData.Building, 0, 0);
 }