Пример #1
0
        public void CylindricalRoofTest_CalculateDriftLength_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var cylindricalRoof = new CylindricalRoof(building, 20, 10);

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

            var cylindricalRoof = new CylindricalRoof(building, 20, 10);

            Assert.IsNotNull(cylindricalRoof, "CylindricalRoof should be created.");
            Assert.AreEqual(20, cylindricalRoof.Width, "Width should be set at construction time.");
            Assert.AreEqual(10, cylindricalRoof.Height, "Height should be set at construction time.");
        }
Пример #3
0
        public void CylindricalRoofTest_CalculateSnowLoad_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var cylindricalRoof = new CylindricalRoof(building, 20, 10);

            cylindricalRoof.CalculateSnowLoad();
            Assert.AreEqual(0.72, Math.Round(cylindricalRoof.RoofCasesSnowLoad[1], 3),
                            "Snow load for roof is not calculated properly.");
            Assert.AreEqual(0.9, Math.Round(cylindricalRoof.RoofCasesSnowLoad[2], 3),
                            "Snow load for roof is not calculated properly.");
            Assert.AreEqual(1.8, Math.Round(cylindricalRoof.RoofCasesSnowLoad[3], 3),
                            "Snow load for roof is not calculated properly.");
        }
        public IResult Calculate()
        {
            BuildingSite    buildingSite    = GetBuildingSite();
            SnowLoad        snowLoad        = GetSnowLoad(buildingSite);
            Building        building        = GetBuilding(snowLoad);
            CylindricalRoof cylindricalRoof = GetCylindricalRoof(building);

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

            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_", cylindricalRoof.DriftLength);
            result.Properties.Add("μ_3_", cylindricalRoof.ShapeCoefficient);
            result.Properties.Add("s_I_", cylindricalRoof.RoofCasesSnowLoad[1]);
            result.Properties.Add("s_l,II_", cylindricalRoof.RoofCasesSnowLoad[2]);
            result.Properties.Add("s_r,II_", cylindricalRoof.RoofCasesSnowLoad[3]);

            return(result);
        }
Пример #5
0
 public SnowLoadCylindricalRoof()
 {
     BuildingData    = new BuildingData();
     CylindricalRoof = new CylindricalRoof(BuildingData.Building, 0, 0);
 }