// 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. using System.Collections.Generic; using System.Linq; namespace Ringtoets.HydraRing.Calculation.Data.Input.Structures { /// /// Container of all data necessary for performing a vertical wall based structures closure calculation via Hydra-Ring. /// public class StructuresClosureVerticalWallCalculationInput : StructuresClosureCalculationInput { private readonly double modelFactorOvertoppingFlowMean; private readonly double modelFactorOvertoppingFlowStandardDeviation; private readonly double structureNormalOrientation; private readonly double modelFactorSuperCriticalFlowMean; private readonly double modelFactorSuperCriticalFlowStandardDeviation; private readonly double levelCrestStructureNotClosingMean; private readonly double levelCrestStructureNotClosingStandardDeviation; private readonly double widthFlowAperturesMean; private readonly double widthFlowAperturesVariation; private readonly double deviationWaveDirection; /// /// Creates a new instance of . /// /// The id of the hydraulic station. /// The section. /// The foreland points. /// The break water. /// The gravitational acceleration. /// The factor of the storm duration for an open structure. /// The failure probability for an open structure. /// The reparation failure probability. /// The number of identical apertures. /// The mean of the allowed level of increase for storage. /// The standard deviation of the allowed level of increase for storage. /// The mean of the model factor storage volume. /// The standard deviation of the model factor storage volume. /// The mean of the storage structure area. /// The variation of the storage structure area. /// The model factor inflow volume. /// The mean of the flow width at bottom protection. /// The standard deviation of the flow width at bottom protection. /// The mean of the critical overtopping discharge. /// The variation of the critical overtopping discharge. /// The failure probability structure with erosion. /// The mean of the storm duration. /// The variation of the storm duration. /// The probability of an open structure before flooding. /// The mean of the model factor overtopping flow. /// The standard deviation of the model factor overtopping flow. /// The orientation of the normal of the structure. /// The mean of the model factor super critical flow. /// The standard deviation of the model factor super critical flow. /// The mean of the level crest of the structure when not closing. /// The standard deviation of the level crest of the structure when not closing. /// The mean of the width flow apertures. /// The variation of the width flow apertures. /// The deviation of the wave direction. public StructuresClosureVerticalWallCalculationInput(long hydraulicBoundaryLocationId, HydraRingSection section, IEnumerable forelandPoints, HydraRingBreakWater breakWater, double gravitationalAcceleration, double factorStormDurationOpenStructure, double failureProbabilityOpenStructure, double failureProbabilityReparation, int identicalApertures, double allowedLevelIncreaseStorageMean, double allowedLevelIncreaseStorageStandardDeviation, double modelFactorStorageVolumeMean, double modelFactorStorageVolumeStandardDeviation, double storageStructureAreaMean, double storageStructureAreaVariation, double modelFactorInflowVolume, double flowWidthAtBottomProtectionMean, double flowWidthAtBottomProtectionStandardDeviation, double criticalOvertoppingDischargeMean, double criticalOvertoppingDischargeVariation, double failureProbabilityStructureWithErosion, double stormDurationMean, double stormDurationVariation, double probabilityOpenStructureBeforeFlooding, double modelFactorOvertoppingFlowMean, double modelFactorOvertoppingFlowStandardDeviation, double structureNormalOrientation, double modelFactorSuperCriticalFlowMean, double modelFactorSuperCriticalFlowStandardDeviation, double levelCrestStructureNotClosingMean, double levelCrestStructureNotClosingStandardDeviation, double widthFlowAperturesMean, double widthFlowAperturesVariation, double deviationWaveDirection) : base(hydraulicBoundaryLocationId, section, forelandPoints, breakWater, gravitationalAcceleration, factorStormDurationOpenStructure, failureProbabilityOpenStructure, failureProbabilityReparation, identicalApertures, allowedLevelIncreaseStorageMean, allowedLevelIncreaseStorageStandardDeviation, modelFactorStorageVolumeMean, modelFactorStorageVolumeStandardDeviation, storageStructureAreaMean, storageStructureAreaVariation, modelFactorInflowVolume, flowWidthAtBottomProtectionMean, flowWidthAtBottomProtectionStandardDeviation, criticalOvertoppingDischargeMean, criticalOvertoppingDischargeVariation, failureProbabilityStructureWithErosion, stormDurationMean, stormDurationVariation, probabilityOpenStructureBeforeFlooding) { this.modelFactorOvertoppingFlowMean = modelFactorOvertoppingFlowMean; this.modelFactorOvertoppingFlowStandardDeviation = modelFactorOvertoppingFlowStandardDeviation; this.structureNormalOrientation = structureNormalOrientation; this.modelFactorSuperCriticalFlowMean = modelFactorSuperCriticalFlowMean; this.modelFactorSuperCriticalFlowStandardDeviation = modelFactorSuperCriticalFlowStandardDeviation; this.levelCrestStructureNotClosingMean = levelCrestStructureNotClosingMean; this.levelCrestStructureNotClosingStandardDeviation = levelCrestStructureNotClosingStandardDeviation; this.widthFlowAperturesMean = widthFlowAperturesMean; this.widthFlowAperturesVariation = widthFlowAperturesVariation; this.deviationWaveDirection = deviationWaveDirection; } public override IEnumerable Variables { get { var variables = base.Variables.ToList(); variables.AddRange(GetVariables()); return variables.OrderBy(v => v.VariableId); } } public override int? GetSubMechanismModelId(int subMechanismId) { switch (subMechanismId) { case 424: return 105; case 425: return 109; default: return null; } } private IEnumerable GetVariables() { yield return new HydraRingVariable(59, HydraRingDistributionType.LogNormal, double.NaN, HydraRingDeviationType.Standard, modelFactorOvertoppingFlowMean, modelFactorOvertoppingFlowStandardDeviation, double.NaN); yield return new HydraRingVariable(61, HydraRingDistributionType.Deterministic, structureNormalOrientation, HydraRingDeviationType.Standard, double.NaN, double.NaN, double.NaN); yield return new HydraRingVariable(62, HydraRingDistributionType.Normal, double.NaN, HydraRingDeviationType.Standard, modelFactorSuperCriticalFlowMean, modelFactorSuperCriticalFlowStandardDeviation, double.NaN); yield return new HydraRingVariable(72, HydraRingDistributionType.Normal, double.NaN, HydraRingDeviationType.Standard, levelCrestStructureNotClosingMean, levelCrestStructureNotClosingStandardDeviation, double.NaN); yield return new HydraRingVariable(106, HydraRingDistributionType.Normal, double.NaN, HydraRingDeviationType.Variation, widthFlowAperturesMean, widthFlowAperturesVariation, double.NaN); yield return new HydraRingVariable(107, HydraRingDistributionType.Deterministic, deviationWaveDirection, HydraRingDeviationType.Standard, double.NaN, double.NaN, double.NaN); } } }