Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructuresInput.cs =================================================================== diff -u -r7a7964c2eb9844cb44c4c02a807bae60e67c4bfe -ra828baefd6d87005fe1c60fed60979c9b17e45f7 --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructuresInput.cs (.../StabilityPointStructuresInput.cs) (revision 7a7964c2eb9844cb44c4c02a807bae60e67c4bfe) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructuresInput.cs (.../StabilityPointStructuresInput.cs) (revision a828baefd6d87005fe1c60fed60979c9b17e45f7) @@ -19,6 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; using System.Linq; using Core.Common.Base; using Core.Common.Base.Data; @@ -27,6 +28,7 @@ using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Data.Probabilistics; using Ringtoets.HydraRing.Data; +using RingtoetsDataCommonProperties = Ringtoets.Common.Data.Properties.Resources; namespace Ringtoets.StabilityPointStructures.Data { @@ -35,12 +37,20 @@ /// public class StabilityPointStructuresInput : Observable, ICalculationInput { - private ForeshoreProfile foreshoreProfile; - private RoundedDouble structureNormalOrientation; - private RoundedDouble volumicWeightWater; private readonly NormalDistribution insideWaterLevelFailureConstruction; private readonly NormalDistribution insideWaterLevel; private readonly LogNormalDistribution stormDuration; + private readonly NormalDistribution modelFactorSuperCriticalFlow; + private readonly NormalDistribution drainCoefficient; + private readonly NormalDistribution levelCrestStructure; + private readonly NormalDistribution thresholdHeightOpenWeir; + private readonly LogNormalDistribution areaFlowApertures; + private readonly LogNormalDistribution constructiveStrengthLinearModel; + private readonly LogNormalDistribution constructiveStrengthQuadraticModel; + private ForeshoreProfile foreshoreProfile; + private RoundedDouble structureNormalOrientation; + private RoundedDouble volumicWeightWater; + private RoundedDouble factorStormDurationOpenStructure; /// /// Creates a new instance of . @@ -49,6 +59,7 @@ { volumicWeightWater = new RoundedDouble(2, 9.81); structureNormalOrientation = new RoundedDouble(2); + factorStormDurationOpenStructure = new RoundedDouble(2, double.NaN); insideWaterLevelFailureConstruction = new NormalDistribution(2) { @@ -68,6 +79,48 @@ }; stormDuration.SetStandardDeviationFromVariationCoefficient(0.25); + modelFactorSuperCriticalFlow = new NormalDistribution(2) + { + Mean = (RoundedDouble) 1.1, + StandardDeviation = (RoundedDouble) 0.03 + }; + + drainCoefficient = new NormalDistribution(2) + { + Mean = (RoundedDouble) 1.0, + StandardDeviation = (RoundedDouble) 0.2 + }; + + levelCrestStructure = new NormalDistribution(2) + { + Mean = (RoundedDouble) double.NaN, + StandardDeviation = (RoundedDouble) 0.05 + }; + + thresholdHeightOpenWeir = new NormalDistribution(2) + { + Mean = (RoundedDouble) double.NaN, + StandardDeviation = (RoundedDouble) 0.1 + }; + + areaFlowApertures = new LogNormalDistribution(2) + { + Mean = (RoundedDouble) double.NaN, + StandardDeviation = (RoundedDouble) 0.01 + }; + + constructiveStrengthLinearModel = new LogNormalDistribution(2) + { + Mean = (RoundedDouble) double.NaN + }; + constructiveStrengthLinearModel.SetStandardDeviationFromVariationCoefficient(0.1); + + constructiveStrengthQuadraticModel = new LogNormalDistribution(2) + { + Mean = (RoundedDouble) double.NaN + }; + constructiveStrengthQuadraticModel.SetStandardDeviationFromVariationCoefficient(0.1); + UpdateForeshoreProperties(); } @@ -225,19 +278,62 @@ #region Model Inputs + /// + /// Gets or sets the model factor for super critical flow. + /// + /// Only sets the mean. + public NormalDistribution ModelFactorSuperCriticalFlow + { + get + { + return modelFactorSuperCriticalFlow; + } + set + { + modelFactorSuperCriticalFlow.Mean = value.Mean; + } + } + + /// + /// Gets or sets the factor for the storm duration open structure. + /// + public RoundedDouble FactorStormDurationOpenStructure + { + get + { + return factorStormDurationOpenStructure; + } + set + { + factorStormDurationOpenStructure = value.ToPrecision(factorStormDurationOpenStructure.NumberOfDecimalPlaces); + } + } + + /// + /// Gets or sets the drain coefficient. + /// + /// Only sets the mean. + public NormalDistribution DrainCoefficient + { + get + { + return drainCoefficient; + } + set + { + drainCoefficient.Mean = value.Mean; + } + } + #endregion #region Schematization - #region Orientation - /// /// Gets or sets the orientation of the normal of the structure. + /// [degrees] /// - /// - /// When the value is smaller than 0, it will be set to 0. - /// When the value is larger than 360, it will be set to 360. - /// + /// Thrown when the value of the orientation is not between [0, 360] degrees. public RoundedDouble StructureNormalOrientation { get @@ -246,32 +342,106 @@ } set { - RoundedDouble newOrientationValue = value.ToPrecision(structureNormalOrientation.NumberOfDecimalPlaces); - newOrientationValue = ValidateStructureNormalOrientationInRange(newOrientationValue); + if (double.IsNaN(value)) + { + structureNormalOrientation = new RoundedDouble(2, double.NaN); + return; + } - structureNormalOrientation = newOrientationValue; + RoundedDouble newOrientation = value.ToPrecision(structureNormalOrientation.NumberOfDecimalPlaces); + if (newOrientation < 0 || newOrientation > 360) + { + throw new ArgumentOutOfRangeException("value", RingtoetsDataCommonProperties.Orientation_Value_needs_to_be_between_0_and_360); + } + structureNormalOrientation = newOrientation; } } - private RoundedDouble ValidateStructureNormalOrientationInRange(RoundedDouble newOrientationValue) + /// + /// Gets or sets the level crest of the structure. + /// [m+NAP] + /// + public NormalDistribution LevelCrestStructure { - const double upperBoundaryRange = 360; - const double lowerBoundaryRange = 0.0; + get + { + return levelCrestStructure; + } + set + { + levelCrestStructure.Mean = value.Mean; + levelCrestStructure.StandardDeviation = value.StandardDeviation; + } + } - if (newOrientationValue > upperBoundaryRange) + /// + /// Gets or sets the threshold height of the open weir. + /// [m+MAP] + /// + public NormalDistribution ThresholdHeightOpenWeir + { + get { - newOrientationValue = new RoundedDouble(2, upperBoundaryRange); + return thresholdHeightOpenWeir; } - else if (newOrientationValue < lowerBoundaryRange) + set { - newOrientationValue = new RoundedDouble(2, lowerBoundaryRange); + thresholdHeightOpenWeir.Mean = value.Mean; + thresholdHeightOpenWeir.StandardDeviation = value.StandardDeviation; } + } - return newOrientationValue; + /// + /// Gets or sets the area flow apertures + /// [m^2] + /// + public LogNormalDistribution AreaFlowApertures + { + get + { + return areaFlowApertures; + } + set + { + areaFlowApertures.Mean = value.Mean; + areaFlowApertures.StandardDeviation = value.StandardDeviation; + } } - #endregion + /// + /// Gets or sets the constructive strength of the linear load model. + /// [kN/m^2] + /// + public LogNormalDistribution ConstructiveStrengthLinearLoadModel + { + get + { + return constructiveStrengthLinearModel; + } + set + { + constructiveStrengthLinearModel.Mean = value.Mean; + constructiveStrengthLinearModel.StandardDeviation = value.StandardDeviation; + } + } + /// + /// Gets or sets the constructive strength of the quadratic load model. + /// [kN/m] + /// + public LogNormalDistribution ConstructiveStrengthQuadraticLoadModel + { + get + { + return constructiveStrengthQuadraticModel; + } + set + { + constructiveStrengthQuadraticModel.Mean = value.Mean; + constructiveStrengthQuadraticModel.StandardDeviation = value.StandardDeviation; + } + } + #endregion } } \ No newline at end of file