public SieveParameter GetSieveParameters() { var param = new SieveParameter(); //param.FineGrains if (IsValid()) { param.FineGrainSize = FinesSize; param.FineGrainAmount = _estimator.Estimate(FinesSize); var data = GetPointsAmountDependant(); _estimator.EstimatorData = data; param.D10 = _estimator.Estimate(0.1); param.D30 = _estimator.Estimate(0.3); param.D50 = _estimator.Estimate(0.5); param.D60 = _estimator.Estimate(0.6); if (Soil.SieveParameter != null) { Soil.SieveParameter.D10 = param.D10; Soil.SieveParameter.D30 = param.D30; Soil.SieveParameter.D50 = param.D50; Soil.SieveParameter.D60 = param.D60; Soil.SieveParameter.FineGrainAmount = param.FineGrainAmount; Soil.SieveParameter.FineGrainSize = param.FineGrainSize; } } return(param); }
public void GetUniformityTest() { double d10 = 0.1; double d60 = 1; var SieveParameters = new SieveParameter() { D10 = d10, D60 = d60 }; var SieveCoef = new SieveCoefficients(); SieveCoef.SieveParameters = SieveParameters; var expected = d60 / d10; Console.WriteLine(); double res = SieveCoef.GetUniformity(); Assert.AreEqual(expected, res); }