示例#1
0
        public void CreateSellmeijerCalculator_Always_ReturnsSellmeijerCalculator()
        {
            // Setup
            IPipingSubCalculatorFactory factory = PipingSubCalculatorFactory.Instance;

            // Call
            ISellmeijerCalculator calculator = factory.CreateSellmeijerCalculator();

            // Assert
            Assert.IsInstanceOf <SellmeijerCalculator>(calculator);
        }
示例#2
0
        /// <summary>
        /// Performs the actual sub calculations and returns a <see cref="PipingCalculatorResult"/>, which
        /// contains the results of all sub calculations.
        /// </summary>
        /// <returns>A <see cref="PipingCalculatorResult"/> containing the results of the sub calculations.</returns>
        /// <exception cref="PipingCalculatorException">Thrown when any of the invocations of the sub calculations from the kernel throws an Exception.</exception>
        public PipingCalculatorResult Calculate()
        {
            IUpliftCalculator     upliftResult     = CalculateUplift();
            IHeaveCalculator      heaveResult      = CalculateHeave();
            ISellmeijerCalculator sellmeijerResult = CalculateSellmeijer();

            return(new PipingCalculatorResult(new PipingCalculatorResult.ConstructionProperties
            {
                UpliftFactorOfSafety = upliftResult.FoSu,
                HeaveFactorOfSafety = heaveResult.FoSh,
                SellmeijerFactorOfSafety = sellmeijerResult.FoSp,
                UpliftEffectiveStress = upliftResult.EffectiveStress,
                HeaveGradient = heaveResult.Gradient,
                SellmeijerCreepCoefficient = sellmeijerResult.CreepCoefficient,
                SellmeijerCriticalFall = sellmeijerResult.CriticalFall,
                SellmeijerReducedFall = sellmeijerResult.ReducedFall
            }));
        }
示例#3
0
        private ISellmeijerCalculator CalculateSellmeijer()
        {
            ISellmeijerCalculator sellmeijerCalculator = CreateSellmeijerCalculator();

            try
            {
                sellmeijerCalculator.Calculate();
            }
            catch (PipingException <Sellmeijer2011Calculator> e)
            {
                throw new PipingCalculatorException(e.Message, e);
            }
            catch (PipingException <SellmeijerBaseCalculator> e)
            {
                throw new PipingCalculatorException(e.Message, e);
            }

            return(sellmeijerCalculator);
        }
示例#4
0
        private ISellmeijerCalculator CreateSellmeijerCalculator()
        {
            ISellmeijerCalculator calculator = factory.CreateSellmeijerCalculator();

            calculator.SetModelFactorPiping(input.SellmeijerModelFactor);
            calculator.SetHRiver(input.AssessmentLevel);
            calculator.SetHExit(input.PhreaticLevelExit);
            calculator.SetRc(input.SellmeijerReductionFactor);
            calculator.SetDTotal(input.ThicknessCoverageLayer);
            calculator.SetSeepageLength(input.SeepageLength);
            calculator.SetGammaSubParticles(input.SandParticlesVolumicWeight);
            calculator.SetWhitesDragCoefficient(input.WhitesDragCoefficient);
            calculator.SetD70(input.Diameter70);
            calculator.SetVolumetricWeightOfWater(input.WaterVolumetricWeight);
            calculator.SetDarcyPermeability(input.DarcyPermeability);
            calculator.SetKinematicViscosityWater(input.WaterKinematicViscosity);
            calculator.SetGravity(input.Gravity);
            calculator.SetDAquifer(input.ThicknessAquiferLayer);
            calculator.SetD70Mean(input.MeanDiameter70);
            calculator.SetBeddingAngle(input.BeddingAngle);
            calculator.SetBottomLevelAquitardAboveExitPointZ(GetBottomAquitardLayerAboveExitPointZ());

            return(calculator);
        }