Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructureType.cs =================================================================== diff -u --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructureType.cs (revision 0) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructureType.cs (revision 6a35b370e2b97f2ce1ba0092c59905913a49dde0) @@ -0,0 +1,44 @@ +// Copyright (C) Stichting Deltares 2016. 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. + +namespace Ringtoets.ClosingStructures.Data +{ + /// + /// Defines the types of the various . + /// + public enum ClosingStructureType + { + /// + /// A vertical wall. + /// + VerticalWall = 1, + + /// + /// A low sill structure. + /// + LowSill = 2, + + /// + /// A flooded culvert structure. + /// + FloodedCulvert = 3 + } +} Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresInput.cs =================================================================== diff -u -r51f60243a241f8c02b09ace2f9488af3a93fd6b4 -r6a35b370e2b97f2ce1ba0092c59905913a49dde0 --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresInput.cs (.../ClosingStructuresInput.cs) (revision 51f60243a241f8c02b09ace2f9488af3a93fd6b4) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresInput.cs (.../ClosingStructuresInput.cs) (revision 6a35b370e2b97f2ce1ba0092c59905913a49dde0) @@ -24,34 +24,45 @@ using Core.Common.Base.Data; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.Probabilistics; +using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources; namespace Ringtoets.ClosingStructures.Data { public class ClosingStructuresInput : Observable, ICalculationInput { - private RoundedDouble orientationOfTheNormalOfTheStructure; - private RoundedDouble factorStormDurationOpenStructure; - + private readonly NormalDistribution modelFactorSuperCriticalFlow; private readonly NormalDistribution thresholdLowWeirHeight; private readonly NormalDistribution drainCoefficient; private readonly LogNormalDistribution areaFlowApertures; - private double failureProbablityOpenStructure; - private double failureProbabilityReparation; private readonly NormalDistribution levelCrestOfStructureNotClosing; private readonly NormalDistribution waterLevelInside; private readonly LogNormalDistribution storageStructureArea; private readonly LogNormalDistribution allowableIncreaseOfLevelForStorage; private readonly LogNormalDistribution flowWidthAtBottomProtection; - private double failureProbabilityOfStructureGivenErosion; private readonly NormalDistribution widthOfFlowApertures; private readonly LogNormalDistribution stormDuration; + private readonly LogNormalDistribution criticalOverToppingDischarge; + private RoundedDouble orientationOfTheNormalOfTheStructure; + private RoundedDouble factorStormDurationOpenStructure; + private double failureProbablityOpenStructure; + private double failureProbabilityReparation; + private double failureProbabilityOfStructureGivenErosion; private double probabilityOpenStructureBeforeFlooding; + private RoundedDouble wavedirectionDeviation; public ClosingStructuresInput() { orientationOfTheNormalOfTheStructure = new RoundedDouble(2); factorStormDurationOpenStructure = new RoundedDouble(2); + wavedirectionDeviation = new RoundedDouble(2); + probabilityOpenStructureBeforeFlooding = 1.0; + modelFactorSuperCriticalFlow = new NormalDistribution(2) + { + Mean = (RoundedDouble) 1.1, + StandardDeviation = (RoundedDouble) 0.03 + }; + thresholdLowWeirHeight = new NormalDistribution(2) { Mean = (RoundedDouble) double.NaN, @@ -106,15 +117,28 @@ }; widthOfFlowApertures.SetStandardDeviationFromVariationCoefficient(0.05); + criticalOverToppingDischarge = new LogNormalDistribution(2) + { + Mean = (RoundedDouble) double.NaN + }; + criticalOverToppingDischarge.SetStandardDeviationFromVariationCoefficient(0.15); + stormDuration = new LogNormalDistribution(2) { Mean = (RoundedDouble) 7.5 }; stormDuration.SetStandardDeviationFromVariationCoefficient(0.25); - - probabilityOpenStructureBeforeFlooding = 1.0; } + #region Structure type + + /// + /// Gets or sets the type of closing structure. + /// + public ClosingStructureType ClosingStructureType { get; set; } + + #endregion + #region Deterministic inputs /// @@ -167,8 +191,7 @@ { if (value < 0 || value > 1) { - // TODO: refactor this in HeightStructures input to Common Forms Resources - throw new ArgumentException("De waarde voor de faalkans moet in het bereik tussen [0, 1] liggen."); + throw new ArgumentException(RingtoetsCommonDataResources.FailureProbability_Value_needs_to_be_between_0_and_1); } failureProbablityOpenStructure = value; } @@ -189,8 +212,7 @@ { if (value < 0 || value > 1) { - // TODO: refactor this in HeightStructures input to Common Forms Resources - throw new ArgumentException("De waarde voor de faalkans moet in het bereik tussen [0, 1] liggen."); + throw new ArgumentException(RingtoetsCommonDataResources.FailureProbability_Value_needs_to_be_between_0_and_1); } failureProbabilityReparation = value; } @@ -211,14 +233,28 @@ { if (value < 0 || value > 1) { - // TODO: refactor this in HeightStructures input to Common Forms Resources - throw new ArgumentException("De waarde voor de faalkans moet in het bereik tussen [0, 1] liggen."); + throw new ArgumentException(RingtoetsCommonDataResources.FailureProbability_Value_needs_to_be_between_0_and_1); } failureProbabilityOfStructureGivenErosion = value; } } /// + /// Gets and sets the deviation of the wave direction. + /// + public RoundedDouble WavedirectionDeviation + { + get + { + return wavedirectionDeviation; + } + set + { + wavedirectionDeviation = value.ToPrecision(wavedirectionDeviation.NumberOfDecimalPlaces); + } + } + + /// /// Gets or sets the failure probability of an open structure before flooding. /// /// Thrown when the value of the probability @@ -233,8 +269,7 @@ { if (value < 0 || value > 1) { - // TODO: refactor this in HeightStructures input to Common Forms Resources - throw new ArgumentException("De waarde voor de faalkans moet in het bereik tussen [0, 1] liggen."); + throw new ArgumentException(RingtoetsCommonDataResources.FailureProbability_Value_needs_to_be_between_0_and_1); } probabilityOpenStructureBeforeFlooding = value; } @@ -260,6 +295,21 @@ } /// + /// Gets the model factor super critical flow normal distribution and sets the mean. + /// + public NormalDistribution ModelFactorSuperCriticalFlow + { + get + { + return modelFactorSuperCriticalFlow; + } + set + { + modelFactorSuperCriticalFlow.Mean = value.Mean; + } + } + + /// /// Gets the threshold low weir height normal distribution and sets the threshold low weir height mean. /// public NormalDistribution ThresholdLowWeirHeight @@ -387,6 +437,22 @@ } /// + /// Gets or sets the critical overtopping discharge. + /// + public LogNormalDistribution CriticalOverToppingDischarge + { + get + { + return criticalOverToppingDischarge; + } + set + { + criticalOverToppingDischarge.Mean = value.Mean; + criticalOverToppingDischarge.StandardDeviation = value.StandardDeviation; + } + } + + /// /// Gets the storm duration log normal distribution and sets the storm duration mean. /// public LogNormalDistribution StormDuration Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/Ringtoets.ClosingStructures.Data.csproj =================================================================== diff -u -r51f60243a241f8c02b09ace2f9488af3a93fd6b4 -r6a35b370e2b97f2ce1ba0092c59905913a49dde0 --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/Ringtoets.ClosingStructures.Data.csproj (.../Ringtoets.ClosingStructures.Data.csproj) (revision 51f60243a241f8c02b09ace2f9488af3a93fd6b4) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/Ringtoets.ClosingStructures.Data.csproj (.../Ringtoets.ClosingStructures.Data.csproj) (revision 6a35b370e2b97f2ce1ba0092c59905913a49dde0) @@ -43,6 +43,7 @@ + Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresInputTest.cs =================================================================== diff -u -r51f60243a241f8c02b09ace2f9488af3a93fd6b4 -r6a35b370e2b97f2ce1ba0092c59905913a49dde0 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresInputTest.cs (.../ClosingStructuresInputTest.cs) (revision 51f60243a241f8c02b09ace2f9488af3a93fd6b4) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresInputTest.cs (.../ClosingStructuresInputTest.cs) (revision 6a35b370e2b97f2ce1ba0092c59905913a49dde0) @@ -43,6 +43,9 @@ Assert.IsInstanceOf(input); Assert.IsInstanceOf(input); + AssertEqualValues(1.1, input.ModelFactorSuperCriticalFlow.Mean); + AssertEqualValues(0.03, input.ModelFactorSuperCriticalFlow.StandardDeviation); + AssertEqualValues(0.1, input.ThresholdLowWeirHeight.StandardDeviation); AssertEqualValues(1, input.DrainCoefficient.Mean); @@ -55,12 +58,29 @@ AssertEqualValues(0.1, input.AllowableIncreaseOfLevelForStorage.StandardDeviation); AssertEqualValues(0.1, input.StorageStructureArea.StandardDeviation); AssertEqualValues(0.05, input.FlowWidthAtBottomProtection.StandardDeviation); + AssertEqualValues(7.5, input.StormDuration.Mean); AssertEqualValues(0.25, input.StormDuration.GetVariationCoefficient()); Assert.AreEqual(1, input.ProbabilityOpenStructureBeforeFlooding); } [Test] + [TestCase(ClosingStructureType.VerticalWall)] + [TestCase(ClosingStructureType.LowSill)] + [TestCase(ClosingStructureType.FloodedCulvert)] + public void Properties_Type_ExpectedValues(ClosingStructureType type) + { + // Setup + var input = new ClosingStructuresInput(); + + // Call + input.ClosingStructureType = type; + + // Assert + Assert.AreEqual(type, input.ClosingStructureType); + } + + [Test] public void Properties_OrientationOfTheNormalStructure_ExpectedValues() { // Setup @@ -95,12 +115,29 @@ } [Test] + public void Properties_ModelFactorSuperCriticalFlow_ExpectedValues() + { + // Setup + var input = new ClosingStructuresInput(); + NormalDistribution modelFactorSuperCriticalFlow = GenerateNormalDistribution(); + + RoundedDouble initialStd = input.ModelFactorSuperCriticalFlow.StandardDeviation; + + //Call + input.ModelFactorSuperCriticalFlow = modelFactorSuperCriticalFlow; + + //Assert + Assert.AreEqual(modelFactorSuperCriticalFlow.Mean, input.ModelFactorSuperCriticalFlow.Mean); + AssertEqualValues(initialStd, input.ModelFactorSuperCriticalFlow.StandardDeviation); + } + + [Test] public void Properties_ThresholdLowWeirHeight_ExpectedValues() { // Setup var input = new ClosingStructuresInput(); NormalDistribution thresholdLowWeirHeight = GenerateNormalDistribution(); - + RoundedDouble initialStd = input.ThresholdLowWeirHeight.StandardDeviation; //Call @@ -197,7 +234,7 @@ { // Setup var input = new ClosingStructuresInput(); - + // Call input.FailureProbablityReparation = probability; @@ -327,7 +364,6 @@ Assert.AreEqual(probability, input.FailureProbabilityOfStructureGivenErosion); } - [Test] public void Properties_WidthOfFlowApertures_ExpectedValues() { @@ -343,7 +379,39 @@ Assert.AreEqual(widthOfFlowApertures.StandardDeviation, input.WidthOfFlowApertures.StandardDeviation); } - [Test] + [Test] + public void Properties_CriticalOvertoppingDischarge_ExpectedValues() + { + // Setup + var input = new ClosingStructuresInput(); + LogNormalDistribution criticalOverToppingDischarge = GenerateLogNormalDistribution(); + + //Call + input.CriticalOverToppingDischarge = criticalOverToppingDischarge; + + //Assert + Assert.AreEqual(criticalOverToppingDischarge.Mean, input.CriticalOverToppingDischarge.Mean); + AssertEqualValues(criticalOverToppingDischarge.StandardDeviation, input.CriticalOverToppingDischarge.StandardDeviation); + } + + [Test] + public void Properties_StormDuration_ExpectedValues() + { + // Setup + var input = new ClosingStructuresInput(); + LogNormalDistribution stormDuration = GenerateLogNormalDistribution(); + + RoundedDouble initialStd = input.StormDuration.StandardDeviation; + + //Call + input.StormDuration = stormDuration; + + //Assert + Assert.AreEqual(stormDuration.Mean, input.StormDuration.Mean); + AssertEqualValues(initialStd, input.StormDuration.StandardDeviation); + } + + [Test] [TestCase(-1.1)] [TestCase(2)] public void Properties_ProbabilityOpenStructureBeforeFlooding_ThrowArgumentException(double probability) @@ -359,40 +427,38 @@ } [Test] - [TestCase(0)] - [TestCase(0.5)] - [TestCase(1.0)] - public void Properties_ProbabilityOpenStructureBeforeFlooding_ExpectedValues(double probability) + public void Properties_WaveDirectionDeviation_ExpectedValues() { // Setup var input = new ClosingStructuresInput(); + var random = new Random(22); - // Call - input.ProbabilityOpenStructureBeforeFlooding = probability; + var wavedirectionDeviation = new RoundedDouble(5, random.NextDouble()); + // Call + input.WavedirectionDeviation = wavedirectionDeviation; + // Assert - Assert.AreEqual(probability, input.ProbabilityOpenStructureBeforeFlooding); + Assert.AreEqual(2, input.WavedirectionDeviation.NumberOfDecimalPlaces); + AssertEqualValues(wavedirectionDeviation, input.WavedirectionDeviation); } - [Test] - public void Properties_StormDuration_ExpectedValues() + [TestCase(0)] + [TestCase(0.5)] + [TestCase(1.0)] + public void Properties_ProbabilityOpenStructureBeforeFlooding_ExpectedValues(double probability) { // Setup var input = new ClosingStructuresInput(); - LogNormalDistribution stormDuration = GenerateLogNormalDistribution(); - RoundedDouble initialStd = input.StormDuration.StandardDeviation; + // Call + input.ProbabilityOpenStructureBeforeFlooding = probability; - //Call - input.StormDuration = stormDuration; - - //Assert - Assert.AreEqual(stormDuration.Mean, input.StormDuration.Mean); - AssertEqualValues(initialStd, input.StormDuration.StandardDeviation); + // Assert + Assert.AreEqual(probability, input.ProbabilityOpenStructureBeforeFlooding); } - private void AssertEqualValues(double expectedValue, RoundedDouble actualValue) { Assert.AreEqual(expectedValue, actualValue, actualValue.GetAccuracy()); @@ -403,8 +469,8 @@ var random = new Random(22); return new LogNormalDistribution(2) { - Mean = (RoundedDouble)(0.01 + random.NextDouble()), - StandardDeviation = (RoundedDouble)random.NextDouble() + Mean = (RoundedDouble) (0.01 + random.NextDouble()), + StandardDeviation = (RoundedDouble) random.NextDouble() }; } @@ -413,9 +479,9 @@ var random = new Random(22); return new NormalDistribution(2) { - Mean = (RoundedDouble)(0.01 + random.NextDouble()), - StandardDeviation = (RoundedDouble)random.NextDouble() + Mean = (RoundedDouble) (0.01 + random.NextDouble()), + StandardDeviation = (RoundedDouble) random.NextDouble() }; } } -} +} \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs =================================================================== diff -u -r9b0f19dce46cb8c54cd27dadb2d79888035a1aff -r6a35b370e2b97f2ce1ba0092c59905913a49dde0 --- Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 9b0f19dce46cb8c54cd27dadb2d79888035a1aff) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 6a35b370e2b97f2ce1ba0092c59905913a49dde0) @@ -265,6 +265,15 @@ } /// + /// Looks up a localized string similar to De waarde voor de faalkans moet in het bereik tussen [0, 1] liggen.. + /// + public static string FailureProbability_Value_needs_to_be_between_0_and_1 { + get { + return ResourceManager.GetString("FailureProbability_Value_needs_to_be_between_0_and_1", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Een punt in de geometrie voor het voorlandprofiel heeft geen waarde.. /// public static string ForeshoreProfile_SetGeometry_A_point_in_the_collection_is_null { Index: Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx =================================================================== diff -u -r9b0f19dce46cb8c54cd27dadb2d79888035a1aff -r6a35b370e2b97f2ce1ba0092c59905913a49dde0 --- Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx (.../Resources.resx) (revision 9b0f19dce46cb8c54cd27dadb2d79888035a1aff) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx (.../Resources.resx) (revision 6a35b370e2b97f2ce1ba0092c59905913a49dde0) @@ -216,4 +216,7 @@ De waarde voor 'N' moet in interval [1, 20] liggen. + + De waarde voor de faalkans moet in het bereik tussen [0, 1] liggen. + \ No newline at end of file Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresInput.cs =================================================================== diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r6a35b370e2b97f2ce1ba0092c59905913a49dde0 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresInput.cs (.../HeightStructuresInput.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresInput.cs (.../HeightStructuresInput.cs) (revision 6a35b370e2b97f2ce1ba0092c59905913a49dde0) @@ -26,6 +26,7 @@ using Ringtoets.Common.Data.Probabilistics; using Ringtoets.HeightStructures.Data.Properties; using Ringtoets.HydraRing.Data; +using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources; namespace Ringtoets.HeightStructures.Data { @@ -273,7 +274,7 @@ { if (value < 0 || value > 1) { - throw new ArgumentException(Resources.FailureProbabilityOfStructureGivenErosion_Value_needs_to_be_between_0_and_1); + throw new ArgumentException(RingtoetsCommonDataResources.FailureProbability_Value_needs_to_be_between_0_and_1); } failureProbabilityOfStructureGivenErosion = value; } Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/Properties/Resources.Designer.cs =================================================================== diff -u -r15a5390b22bbd15e777f7df088c61e2b05803723 -r6a35b370e2b97f2ce1ba0092c59905913a49dde0 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 15a5390b22bbd15e777f7df088c61e2b05803723) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 6a35b370e2b97f2ce1ba0092c59905913a49dde0) @@ -82,15 +82,6 @@ } /// - /// Looks up a localized string similar to De waarde voor de faalkans moet in het bereik [0, 1] liggen.. - /// - public static string FailureProbabilityOfStructureGivenErosion_Value_needs_to_be_between_0_and_1 { - get { - return ResourceManager.GetString("FailureProbabilityOfStructureGivenErosion_Value_needs_to_be_between_0_and_1", resourceCulture); - } - } - - /// /// Looks up a localized string similar to Nieuwe berekening. /// public static string HeightStructuresCalculation_DefaultName { Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/Properties/Resources.resx =================================================================== diff -u -r15a5390b22bbd15e777f7df088c61e2b05803723 -r6a35b370e2b97f2ce1ba0092c59905913a49dde0 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/Properties/Resources.resx (.../Resources.resx) (revision 15a5390b22bbd15e777f7df088c61e2b05803723) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/Properties/Resources.resx (.../Resources.resx) (revision 6a35b370e2b97f2ce1ba0092c59905913a49dde0) @@ -126,7 +126,4 @@ Nieuwe berekening - - De waarde voor de faalkans moet in het bereik [0, 1] liggen. - \ No newline at end of file Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresInputTest.cs =================================================================== diff -u -rccce1ae96e85aa2603c218de61de03fb14cfae11 -r6a35b370e2b97f2ce1ba0092c59905913a49dde0 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresInputTest.cs (.../HeightStructuresInputTest.cs) (revision ccce1ae96e85aa2603c218de61de03fb14cfae11) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresInputTest.cs (.../HeightStructuresInputTest.cs) (revision 6a35b370e2b97f2ce1ba0092c59905913a49dde0) @@ -281,8 +281,7 @@ TestDelegate call = () => input.FailureProbabilityOfStructureGivenErosion = (RoundedDouble) failureProbabilityOfStructureGivenErosion; // Assert - var expectedMessage = Resources.FailureProbabilityOfStructureGivenErosion_Value_needs_to_be_between_0_and_1; - TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, expectedMessage); + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, "De waarde voor de faalkans moet in het bereik tussen [0, 1] liggen."); } [Test] Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresClosureVerticalWallCalculationInput.cs =================================================================== diff -u -r4180a5bc32186dc6747a286ae5e490034f6f111a -r6a35b370e2b97f2ce1ba0092c59905913a49dde0 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresClosureVerticalWallCalculationInput.cs (.../StructuresClosureVerticalWallCalculationInput.cs) (revision 4180a5bc32186dc6747a286ae5e490034f6f111a) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresClosureVerticalWallCalculationInput.cs (.../StructuresClosureVerticalWallCalculationInput.cs) (revision 6a35b370e2b97f2ce1ba0092c59905913a49dde0) @@ -38,6 +38,7 @@ private readonly double levelCrestOfStructuresNotClosingStandardDeviation; private readonly double widthFlowAperturesMean; private readonly double widthFlowAperturesVariation; + private readonly double wavedirectionDeviation; /// /// Creates a new instance of . @@ -74,6 +75,7 @@ /// The standard deviation of the level crest of structures not closing to use during the calculation. /// The mean of the width of flow apertures to use during the calculation. /// The variation of the width of flow apertures to use during the calculation. + /// The deviation of the wave direction to use during the calculation. public StructuresClosureVerticalWallCalculationInput(long hydraulicBoundaryLocationId, HydraRingSection hydraRingSection, IEnumerable forelandPoints, double hydraRingGravitationalAcceleration, double hydraRingFactorStormDurationOpenStructure, @@ -90,7 +92,7 @@ double hydraRingStructureNormalOrientation, double hydraRingModelFactorSuperCriticalFlowMean, double hydraRingModelFactorSuperCriticalFlowStandardDeviation, double hydraRingLevelCrestOfStructuresNotClosingMean, double hydraRingLevelCrestOfStructuresNotClosingStandardDeviation, double hydraRingWidthFlowAperturesMean, - double hydraRingWidthFlowAperturesVariation) + double hydraRingWidthFlowAperturesVariation, double hydraRingWavedirectionDeviation) : base(hydraulicBoundaryLocationId, hydraRingSection, forelandPoints, hydraRingGravitationalAcceleration, hydraRingFactorStormDurationOpenStructure, hydraRingFailureProbabilityOpenStructure, hydraRingFailureProbabilityReparation, @@ -112,6 +114,7 @@ levelCrestOfStructuresNotClosingStandardDeviation = hydraRingLevelCrestOfStructuresNotClosingStandardDeviation; widthFlowAperturesMean = hydraRingWidthFlowAperturesMean; widthFlowAperturesVariation = hydraRingWidthFlowAperturesVariation; + wavedirectionDeviation = hydraRingWavedirectionDeviation; } public override IEnumerable Variables @@ -163,6 +166,10 @@ yield return new HydraRingVariable(106, HydraRingDistributionType.Normal, double.NaN, HydraRingDeviationType.Variation, widthFlowAperturesMean, widthFlowAperturesVariation, double.NaN); + + // Deviation of the wave direction + yield return new HydraRingVariable(107, HydraRingDistributionType.Deterministic, wavedirectionDeviation, + HydraRingDeviationType.Standard, double.NaN, double.NaN, double.NaN); } } } \ No newline at end of file Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresClosureVerticalWallCalculationInputTest.cs =================================================================== diff -u -rccce1ae96e85aa2603c218de61de03fb14cfae11 -r6a35b370e2b97f2ce1ba0092c59905913a49dde0 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresClosureVerticalWallCalculationInputTest.cs (.../StructuresClosureVerticalWallCalculationInputTest.cs) (revision ccce1ae96e85aa2603c218de61de03fb14cfae11) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresClosureVerticalWallCalculationInputTest.cs (.../StructuresClosureVerticalWallCalculationInputTest.cs) (revision 6a35b370e2b97f2ce1ba0092c59905913a49dde0) @@ -68,6 +68,7 @@ const double levelCrestOfStructuresNotClosingStandardDeviation = 0.05; const double widthOfFlowAperturesMean = 5.4; const double widthOfFlowAperturesVariation = 0.05; + const double wavedirectionDeviation = 0.03; // Call var input = new StructuresClosureVerticalWallCalculationInput(hydraulicBoundaryLocationId, hydraRingSection, forelandPoints, @@ -85,7 +86,7 @@ structureNormalOrientation, modelFactorOvertoppingSuperCriticalFlowMean, modelFactorOvertoppingSuperCriticalFlowStandardDeviation, levelCrestOfStructuresNotClosingMean, levelCrestOfStructuresNotClosingStandardDeviation, widthOfFlowAperturesMean, - widthOfFlowAperturesVariation); + widthOfFlowAperturesVariation, wavedirectionDeviation); // Assert Assert.IsInstanceOf(input); @@ -110,7 +111,7 @@ Enumerable.Empty(), 1.1, 222, 333, 5.5, 6.6, 7.7, 8.8, 11, 22, 33, 44, 55, 66, 77, 88, 99, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24); + 22, 23, 24, 25); // Call int? actualSubmechanismModelId = input.GetSubMechanismModelId(subMechanismModelId); @@ -138,6 +139,7 @@ yield return new HydraRingVariable(104, HydraRingDistributionType.LogNormal, double.NaN, HydraRingDeviationType.Variation, 6.6, 0.15, double.NaN); yield return new HydraRingVariable(105, HydraRingDistributionType.Normal, double.NaN, HydraRingDeviationType.Standard, 7.7, 0.0, double.NaN); yield return new HydraRingVariable(106, HydraRingDistributionType.Normal, double.NaN, HydraRingDeviationType.Variation, 5.4, 0.05, double.NaN); + yield return new HydraRingVariable(107, HydraRingDistributionType.Deterministic, 0.03, HydraRingDeviationType.Standard, double.NaN, double.NaN, double.NaN); yield return new HydraRingVariable(108, HydraRingDistributionType.LogNormal, double.NaN, HydraRingDeviationType.Variation, 7.5, 0.25, double.NaN); yield return new HydraRingVariable(129, HydraRingDistributionType.Deterministic, 0.04, HydraRingDeviationType.Standard, double.NaN, double.NaN, double.NaN); }