コード例 #1
0
        /// <summary>
        /// Creates a new instance of <see cref="PipingFailureMechanism"/>.
        /// </summary>
        public PipingFailureMechanism()
            : base(PipingDataResources.PipingFailureMechanism_DisplayName, PipingDataResources.PipingFailureMechanism_DisplayCode)
        {
            PipingProbabilityAssessmentInput = new PipingProbabilityAssessmentInput();
            GeneralInput         = new GeneralPipingInput();
            SurfaceLines         = new PipingSurfaceLineCollection();
            StochasticSoilModels = new PipingStochasticSoilModelCollection();
            CalculationsGroup    = new CalculationGroup
            {
                Name = RiskeerCommonDataResources.FailureMechanism_Calculations_DisplayName
            };

            ScenarioConfigurationType = PipingScenarioConfigurationType.SemiProbabilistic;
            scenarioConfigurationsPerFailureMechanismSection = new ObservableList <PipingScenarioConfigurationPerFailureMechanismSection>();
            CalculationsInputComments = new Comment();
        }
コード例 #2
0
        /// <summary>
        /// Gets the effective thickness of the coverage layers at the exit point.
        /// [m]
        /// </summary>
        /// <param name="input">The input to calculate the derived piping input for.</param>
        /// <param name="generalInput">The general input that is required for the calculation.</param>
        /// <exception cref="ArgumentNullException">Thrown when any input parameter is <c>null</c>.</exception>
        /// <returns>Returns the corresponding derived input value.</returns>
        public static LogNormalDistribution GetEffectiveThicknessCoverageLayer(PipingInput input, GeneralPipingInput generalInput)
        {
            if (input == null)
            {
                throw new ArgumentNullException(nameof(input));
            }

            if (generalInput == null)
            {
                throw new ArgumentNullException(nameof(generalInput));
            }

            var thicknessCoverageLayer = new LogNormalDistribution(2)
            {
                Mean = RoundedDouble.NaN,
                StandardDeviation = (RoundedDouble)0.5
            };

            UpdateEffectiveThicknessCoverageLayerMean(input, generalInput, thicknessCoverageLayer);

            return(thicknessCoverageLayer);
        }
コード例 #3
0
        private static void UpdateEffectiveThicknessCoverageLayerMean(PipingInput input, GeneralPipingInput generalInput,
                                                                      LogNormalDistribution effectiveThicknessCoverageLayerDistribution)
        {
            if (input.SurfaceLine != null && input.StochasticSoilProfile?.SoilProfile != null && !double.IsNaN(input.ExitPointL))
            {
                var weightedMean = new RoundedDouble(GetNumberOfDecimals(effectiveThicknessCoverageLayerDistribution),
                                                     InputParameterCalculationService.CalculateEffectiveThicknessCoverageLayer(
                                                         generalInput.WaterVolumetricWeight,
                                                         PipingDesignVariableFactory.GetPhreaticLevelExit(input).GetDesignValue(),
                                                         input.ExitPointL,
                                                         input.SurfaceLine,
                                                         input.StochasticSoilProfile.SoilProfile));

                if (weightedMean > 0)
                {
                    effectiveThicknessCoverageLayerDistribution.Mean = weightedMean;
                }
            }
        }