Example #1
0
        public IResult Calculate()
        {
            BuildingSite    buildingSite    = GetBuildingSite();
            SnowLoad        snowLoad        = GetSnowLoad(buildingSite);
            Building        building        = GetBuilding(snowLoad);
            SnowOverhanging snowOverhanging = GetSnowOverhanging(building);

            if (!ExposureCoefficient.HasValue)
            {
                buildingSite.CalculateExposureCoefficient();
            }
            snowLoad.CalculateSnowLoad();
            building.CalculateThermalCoefficient();
            snowOverhanging.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("k", snowOverhanging.IrregularShapeCoefficient);
            result.Properties.Add("s_e_", snowOverhanging.SnowLoad);

            return(result);
        }
        public void SnowOverhangingTest_CalculateSnowLoad_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var snowOverhanging = new SnowOverhanging(building, 0.2, 0.72);

            snowOverhanging.CalculateSnowLoad();
            Assert.AreEqual(0.104, Math.Round(snowOverhanging.SnowLoad, 3),
                            "Snow load is not calculated properly.");
        }
        public void SnowOverhangingTest_Constructor_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var snowOverhanging = new SnowOverhanging(building, 0.2, 0.72);

            Assert.IsNotNull(snowOverhanging, "SnowOverhanging should be created.");
            Assert.AreEqual(0.2, snowOverhanging.SnowLayerDepth,
                            "Snow layer should be set at construction time.");
            Assert.AreEqual(0.72, snowOverhanging.SnowLoadOnRoofValue,
                            "Snow load should be set at construction time.");
        }
Example #4
0
        public void ExampleTest2_CalculateSnowOverhanging_Success()
        {
            var buildingSite = new BuildingSite(Zones.ThirdZone, Topographies.Normal, 360);

            buildingSite.CalculateExposureCoefficient();
            var snowLoad = new SnowLoad(buildingSite, snowDensity: 3);

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

            building.CalculateThermalCoefficient();

            var monopitchRoof = new MonopitchRoof(building, 5);

            monopitchRoof.CalculateSnowLoad();

            var snowOverhanging = new SnowOverhanging(building, monopitchRoof.SnowLoadOnRoofValue);

            snowOverhanging.CalculateSnowLoad();

            Assert.AreEqual(0.648, Math.Round(snowOverhanging.SnowLoad, 3),
                            "Snow overhanging is not calculated properly.");
        }
 public SnowLoadSnowOverhanging()
 {
     BuildingData    = new BuildingData();
     SnowOverhanging = new SnowOverhanging(BuildingData.Building, 0, 0);
 }