// Copyright (C) Stichting Deltares 2017. All rights reserved. // // This file is part of Ringtoets. // // Ringtoets is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // All names, logos, and references to "Deltares" are registered trademarks of // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. using Ringtoets.Common.Data.Probabilistics; namespace Ringtoets.Piping.Data { /// /// Factory for creating design variables based on probabilistic distributions for piping. /// public static class PipingSemiProbabilisticDesignVariableFactory { #region General parameters /// /// Creates the design variable for . /// public static DesignVariable GetSaturatedVolumicWeightOfCoverageLayer(PipingInput parameters) { if (double.IsNaN(parameters.ThicknessCoverageLayer.Mean)) { return new DeterministicDesignVariable(parameters.SaturatedVolumicWeightOfCoverageLayer); } return new LogNormalDistributionDesignVariable(parameters.SaturatedVolumicWeightOfCoverageLayer) { Percentile = 0.05 }; } /// /// Creates the design variable for . /// public static DesignVariable GetThicknessCoverageLayer(PipingInput parameters) { if (double.IsNaN(parameters.ThicknessCoverageLayer.Mean)) { return new DeterministicDesignVariable(parameters.ThicknessCoverageLayer); } return new LogNormalDistributionDesignVariable(parameters.ThicknessCoverageLayer) { Percentile = 0.05 }; } /// /// Creates the design variable for . /// public static DesignVariable GetEffectiveThicknessCoverageLayer(PipingInput parameters) { if (double.IsNaN(parameters.ThicknessCoverageLayer.Mean)) { return new DeterministicDesignVariable(parameters.EffectiveThicknessCoverageLayer); } return new LogNormalDistributionDesignVariable(parameters.EffectiveThicknessCoverageLayer) { Percentile = 0.05 }; } /// /// Creates the design variable for . /// public static DesignVariable GetPhreaticLevelExit(PipingInput parameters) { return new NormalDistributionDesignVariable(parameters.PhreaticLevelExit) { Percentile = 0.05 }; } /// /// Creates the design variable for . /// public static DesignVariable GetDampingFactorExit(PipingInput parameters) { return new LogNormalDistributionDesignVariable(parameters.DampingFactorExit) { Percentile = 0.95 }; } #endregion #region Piping parameters /// /// Creates the design variable for . /// public static VariationCoefficientDesignVariable GetSeepageLength(PipingInput parameters) { return new VariationCoefficientLogNormalDistributionDesignVariable(parameters.SeepageLength) { Percentile = 0.05 }; } /// /// Creates the design variable for . /// public static VariationCoefficientDesignVariable GetDiameter70(PipingInput parameters) { return new VariationCoefficientLogNormalDistributionDesignVariable(parameters.Diameter70) { Percentile = 0.05 }; } /// /// Creates the design variable for . /// public static VariationCoefficientDesignVariable GetDarcyPermeability(PipingInput parameters) { return new VariationCoefficientLogNormalDistributionDesignVariable(parameters.DarcyPermeability) { Percentile = 0.95 }; } /// /// Creates the design variable for . /// public static DesignVariable GetThicknessAquiferLayer(PipingInput parameters) { return new LogNormalDistributionDesignVariable(parameters.ThicknessAquiferLayer) { Percentile = 0.95 }; } #endregion } }