コード例 #1
0
 private decimal GetCoeficientK(NicelideTitanumCoefficientWeighting coeficientValues, NicelideTitanumSample sample, NicelideTitanumQualityBaseValue baseValues)
 {
     return((decimal)Round(Sqrt(
                               (double)(coeficientValues.SampleThickness * Round(sample.SampleThickness / baseValues.SampleThickness, 2) * Round(sample.SampleThickness / baseValues.SampleThickness, 2)
                                        + coeficientValues.HammerThickness * Round(sample.HammerThickness / baseValues.HammerThickness, 2) * Round(sample.HammerThickness / baseValues.HammerThickness, 2)
                                        + coeficientValues.HammerSpeed * Round((decimal)sample.HammerSpeed / baseValues.HammerSpeed, 2) * Round((decimal)sample.HammerSpeed / baseValues.HammerSpeed, 2)
                                        + coeficientValues.SpallSpeed * Round((decimal)sample.SpallSpeed / baseValues.SpallSpeed, 2) * Round((decimal)sample.SpallSpeed / baseValues.SpallSpeed, 2)
                                        + coeficientValues.SpallStrength * Round(sample.SpallStrength / baseValues.SpallStrength, 2) * Round(sample.SpallStrength / baseValues.SpallStrength, 2)
                                        )), 2));
 }
コード例 #2
0
        private IList <AlloySampleQualityRateModel> SetAlloySamplePropertyList(NicelideTitanumQualityBaseValue baseValues, NicelideTitanumSample sample,
                                                                               NicelideTitanumCoefficientWeighting coeficientValues)
        {
            var propertyList = new List <AlloySampleQualityRateModel>();
            var model        = new AlloySampleQualityRateModel
            {
                SampleProperty       = "Товщина зразку H, мм",
                BaseValue            = baseValues.SampleThickness,
                SampleValue          = sample.SampleThickness,
                RelativeValue        = Math.Round((decimal)sample.SampleThickness / baseValues.SampleThickness, 2),
                CoefficientWeighting = coeficientValues.SampleThickness,
                Angle = Round(360 * coeficientValues.SampleThickness, 0)
            };

            propertyList.Add(model);

            model = new AlloySampleQualityRateModel
            {
                SampleProperty       = "Товщина ударника h, мм",
                BaseValue            = baseValues.HammerThickness,
                SampleValue          = sample.HammerThickness,
                RelativeValue        = Math.Round((decimal)sample.HammerThickness / baseValues.HammerThickness, 2),
                CoefficientWeighting = coeficientValues.HammerThickness,
                Angle = Round(360 * coeficientValues.HammerThickness, 0)
            };
            propertyList.Add(model);

            model = new AlloySampleQualityRateModel
            {
                SampleProperty       = "Швидкість ударника V, м/c",
                BaseValue            = baseValues.HammerSpeed,
                SampleValue          = sample.HammerSpeed,
                RelativeValue        = Math.Round((decimal)sample.HammerSpeed / baseValues.HammerSpeed, 2),
                CoefficientWeighting = coeficientValues.HammerSpeed,
                Angle = Round(360 * coeficientValues.HammerSpeed, 0)
            };
            propertyList.Add(model);

            model = new AlloySampleQualityRateModel
            {
                SampleProperty       = "Швидкість відколу W, м/с",
                BaseValue            = baseValues.SpallSpeed,
                SampleValue          = sample.SpallSpeed,
                RelativeValue        = Math.Round((decimal)sample.SpallSpeed / baseValues.SpallSpeed, 2),
                CoefficientWeighting = coeficientValues.SpallSpeed,
                Angle = Round(360 * coeficientValues.SpallSpeed, 0)
            };
            propertyList.Add(model);

            model = new AlloySampleQualityRateModel
            {
                SampleProperty       = "Міцність відколу σ, ГПа",
                BaseValue            = baseValues.SpallStrength,
                SampleValue          = sample.SpallStrength,
                RelativeValue        = Math.Round((decimal)sample.SpallStrength / baseValues.SpallStrength, 2),
                CoefficientWeighting = coeficientValues.SpallStrength,
                Angle = Round(360 * coeficientValues.SpallStrength, 0)
            };
            propertyList.Add(model);
            return(propertyList);
        }