// 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 System; using Core.Common.Base.Data; using Ringtoets.Common.Data; using Ringtoets.Common.Data.Probabilistics; using BaseConstructionProperties = Ringtoets.Common.Data.StructureBase.ConstructionProperties; namespace Ringtoets.HeightStructures.Data { /// /// Definition of a height structure for the . /// public class HeightStructure : StructureBase { /// /// Initializes a new instance of the class. /// /// The construction properties. /// Thrown when /// or is null, empty or consists of whitespace. /// Thrown when is null. public HeightStructure(ConstructionProperties constructionProperties) : base(constructionProperties) { LevelCrestStructure = new NormalDistribution(2) { Mean = constructionProperties.LevelCrestStructure.Mean, StandardDeviation = constructionProperties.LevelCrestStructure.StandardDeviation }; FlowWidthAtBottomProtection = new LogNormalDistribution(2) { Mean = constructionProperties.FlowWidthAtBottomProtection.Mean, StandardDeviation = constructionProperties.FlowWidthAtBottomProtection.StandardDeviation }; CriticalOvertoppingDischarge = new VariationCoefficientLogNormalDistribution(2) { Mean = constructionProperties.CriticalOvertoppingDischarge.Mean, CoefficientOfVariation = constructionProperties.CriticalOvertoppingDischarge.CoefficientOfVariation }; WidthFlowApertures = new NormalDistribution(2) { Mean = constructionProperties.WidthFlowApertures.Mean, StandardDeviation = constructionProperties.WidthFlowApertures.StandardDeviation }; FailureProbabilityStructureWithErosion = constructionProperties.FailureProbabilityStructureWithErosion; StorageStructureArea = new VariationCoefficientLogNormalDistribution(2) { Mean = constructionProperties.StorageStructureArea.Mean, CoefficientOfVariation = constructionProperties.StorageStructureArea.CoefficientOfVariation }; AllowedLevelIncreaseStorage = new LogNormalDistribution(2) { Mean = constructionProperties.AllowedLevelIncreaseStorage.Mean, StandardDeviation = constructionProperties.AllowedLevelIncreaseStorage.StandardDeviation }; } /// /// Gets the crest level of the height structure. /// [m+NAP] /// public NormalDistribution LevelCrestStructure { get; } /// /// Gets the flow width of the height structure at the bottom protection. /// [m] /// public LogNormalDistribution FlowWidthAtBottomProtection { get; } /// /// Gets the critical overtopping discharge per meter of the height structure. /// [m^3/s/m] /// public VariationCoefficientLogNormalDistribution CriticalOvertoppingDischarge { get; } /// /// Gets the flow apertures width of the height structure. /// [m] /// public NormalDistribution WidthFlowApertures { get; } /// /// Gets the failure probability of the height structure, given erosion. /// [1/year] /// public double FailureProbabilityStructureWithErosion { get; private set; } /// /// Gets the storage area of the height structure. /// [m^2] /// public VariationCoefficientLogNormalDistribution StorageStructureArea { get; } /// /// Gets the allowed increase of level for storage of the height structure. /// [m] /// public LogNormalDistribution AllowedLevelIncreaseStorage { get; } /// /// Copies the property values of the to the /// . /// /// The to get the property /// values from. /// Thrown when /// is null. public void CopyProperties(HeightStructure fromStructure) { base.CopyProperties(fromStructure); AllowedLevelIncreaseStorage.Mean = fromStructure.AllowedLevelIncreaseStorage.Mean; AllowedLevelIncreaseStorage.StandardDeviation = fromStructure.AllowedLevelIncreaseStorage.StandardDeviation; AllowedLevelIncreaseStorage.Shift = fromStructure.AllowedLevelIncreaseStorage.Shift; CriticalOvertoppingDischarge.Mean = fromStructure.CriticalOvertoppingDischarge.Mean; CriticalOvertoppingDischarge.CoefficientOfVariation = fromStructure.CriticalOvertoppingDischarge.CoefficientOfVariation; FailureProbabilityStructureWithErosion = fromStructure.FailureProbabilityStructureWithErosion; FlowWidthAtBottomProtection.Mean = fromStructure.FlowWidthAtBottomProtection.Mean; FlowWidthAtBottomProtection.StandardDeviation = fromStructure.FlowWidthAtBottomProtection.StandardDeviation; FlowWidthAtBottomProtection.Shift = fromStructure.FlowWidthAtBottomProtection.Shift; LevelCrestStructure.Mean = fromStructure.LevelCrestStructure.Mean; LevelCrestStructure.StandardDeviation = fromStructure.LevelCrestStructure.StandardDeviation; StorageStructureArea.Mean = fromStructure.StorageStructureArea.Mean; StorageStructureArea.CoefficientOfVariation = fromStructure.StorageStructureArea.CoefficientOfVariation; WidthFlowApertures.Mean = fromStructure.WidthFlowApertures.Mean; WidthFlowApertures.StandardDeviation = fromStructure.WidthFlowApertures.StandardDeviation; } /// /// Class holding the various construction parameters for . /// public new class ConstructionProperties : BaseConstructionProperties { /// /// Initializes a new instance of the class. /// public ConstructionProperties() { LevelCrestStructure = new NormalDistribution(2) { Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.05 }; FlowWidthAtBottomProtection = new LogNormalDistribution(2) { Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.05 }; CriticalOvertoppingDischarge = new VariationCoefficientLogNormalDistribution(2) { Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.15 }; WidthFlowApertures = new NormalDistribution(2) { Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.2 }; StorageStructureArea = new VariationCoefficientLogNormalDistribution(2) { Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.1 }; AllowedLevelIncreaseStorage = new LogNormalDistribution(2) { Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.1 }; FailureProbabilityStructureWithErosion = 1.0; } /// /// Gets the crest level of the height structure. /// [m+NAP] /// public NormalDistribution LevelCrestStructure { get; } /// /// Gets the flow width of the height structure at the bottom protection. /// [m] /// public LogNormalDistribution FlowWidthAtBottomProtection { get; } /// /// Gets the critical overtopping discharge per meter of the height structure. /// [m^3/s/m] /// public VariationCoefficientLogNormalDistribution CriticalOvertoppingDischarge { get; } /// /// Gets the flow apertures width of the height structure. /// [m] /// public NormalDistribution WidthFlowApertures { get; } /// /// Gets or sets the failure probability of the height structure, given erosion. /// [1/year] /// public double FailureProbabilityStructureWithErosion { get; set; } /// /// Gets the storage area of the height structure. /// [m^2] /// public VariationCoefficientLogNormalDistribution StorageStructureArea { get; } /// /// Gets the allowed increase of level for storage of the height structure. /// [m] /// public LogNormalDistribution AllowedLevelIncreaseStorage { get; } } } }