// 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 flooded culvert based structures closure calculation via Hydra-Ring. /// public class StructuresClosureFloodedCulvertCalculationInput : StructuresClosureCalculationInput { private readonly double drainCoefficientMean; private readonly double drainCoefficientStandardDeviation; private readonly double areaFlowAperturesMean; private readonly double areaFlowAperturesStandardDeviation; private readonly double insideWaterLevelMean; private readonly double insideWaterLevelStandardDeviation; /// /// Creates a new instance of . /// /// The id of the hydraulic station to use during the calculation. /// The section to use during the calculation. /// The foreland points to use during the calculation. /// The gravitational acceleration to use during the calculation. /// The factor of the storm duration for an open structure to use during the calculation. /// The failure probability for an open structure to use during the calculation. /// The reparation failure probabilty to use during the calculation. /// The identical aperture to use during the calculation. /// The mean of the allowable increase of the level for the storage to use during the calculation. /// The standard deviation of the allowable increase of the level for the storage to use during the calculation. /// The mean of the model factor for the storage volume to use during the calculation. /// The standard deviation of the model factor for the storage volume to use during the calculation. /// The mean of the storage structure area to use during the calculation. /// The variation of the storage structure area to use during the calculation. /// The model factor for incoming flow volume to use during the calculation. /// The mean of the flow width at bottom protection to use during the calculation. /// The standard deviation of the flow width at bottom protection to use during the calculation. /// The mean of the critical overtopping discharge to use during the calculation. /// The variation of the critical overtopping discharge to use during the calculation. /// The failure probability of structure given erosion to use during the calculation. /// The mean of the storm duration to use during the calculation. /// The variation of the storm duration to use during the calculation. /// The propability of an open structure before flooding to use during the calculation. /// The mean of the drain coefficient to use during the calculation. /// The standard deviation of the drain coefficient to use during the calculation. /// The mean of the area of flow apertures to use during the calculation. /// The standard diviation of the area of flow apertures to use during the calculation. /// The mean of the inside water level to use during the calculation. /// The standard deviation of the inside water level to use during the calculation. public StructuresClosureFloodedCulvertCalculationInput(long hydraulicBoundaryLocationId, HydraRingSection hydraRingSection, IEnumerable forelandPoints, double hydraRingGravitationalAcceleration, double hydraRingFactorStormDurationOpenStructure, double hydraRingFailureProbabilityOpenStructure, double hydraRingFailureProbabilityReparation, double hydraRingIdenticalAperture, double hydraRingAllowableIncreaseOfLevelForStorageMean, double hydraRingAllowableIncreaseOfLevelForStorageStandardDeviation, double hydraRingModelFactorForStorageVolumeMean, double hydraRingModelFactorForStorageVolumeStandardDeviation, double hydraRingStorageStructureAreaMean, double hydraRingStorageStructureAreaVariation, double hydraRingModelFactorForIncomingFlowVolume, double hydraRingFlowWidthAtBottomProtectionMean, double hydraRingFlowWidthAtBottomProtectionStandardDeviation, double hydraRingCriticalOvertoppingDischargeMean, double hydraRingCriticalOvertoppingDischargeVariation, double hydraRingFailureProbabilityOfStructureGivenErosion, double hydraRingStormDurationMean, double hydraRingStormDurationVariation, double hydraRingProbabilityOpenStructureBeforeFlooding, double hydraRingDrainCoefficientMean, double hydraRingDrainCoefficientStandardDeviation, double hydraRingAreaFlowAperturesMean, double hydraRingAreaFlowAperturesStandardDeviation, double hydraRingInsideWaterLevelMean, double hydraRingInsideWaterLevelStandardDeviation) : base(hydraulicBoundaryLocationId, hydraRingSection, forelandPoints, hydraRingGravitationalAcceleration, hydraRingFactorStormDurationOpenStructure, hydraRingFailureProbabilityOpenStructure, hydraRingFailureProbabilityReparation, hydraRingIdenticalAperture, hydraRingAllowableIncreaseOfLevelForStorageMean, hydraRingAllowableIncreaseOfLevelForStorageStandardDeviation, hydraRingModelFactorForStorageVolumeMean, hydraRingModelFactorForStorageVolumeStandardDeviation, hydraRingStorageStructureAreaMean, hydraRingStorageStructureAreaVariation, hydraRingModelFactorForIncomingFlowVolume, hydraRingFlowWidthAtBottomProtectionMean, hydraRingFlowWidthAtBottomProtectionStandardDeviation, hydraRingCriticalOvertoppingDischargeMean, hydraRingCriticalOvertoppingDischargeVariation, hydraRingFailureProbabilityOfStructureGivenErosion, hydraRingStormDurationMean, hydraRingStormDurationVariation, hydraRingProbabilityOpenStructureBeforeFlooding) { drainCoefficientMean = hydraRingDrainCoefficientMean; drainCoefficientStandardDeviation = hydraRingDrainCoefficientStandardDeviation; areaFlowAperturesMean = hydraRingAreaFlowAperturesMean; areaFlowAperturesStandardDeviation = hydraRingAreaFlowAperturesStandardDeviation; insideWaterLevelMean = hydraRingInsideWaterLevelMean; insideWaterLevelStandardDeviation = hydraRingInsideWaterLevelStandardDeviation; } 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 107; case 425: return 113; default: return null; } } private IEnumerable GetVariables() { // Drain coefficient yield return new HydraRingVariable(66, HydraRingDistributionType.Normal, double.NaN, HydraRingDeviationType.Standard, drainCoefficientMean, drainCoefficientStandardDeviation, double.NaN); // Area flow apertures yield return new HydraRingVariable(67, HydraRingDistributionType.LogNormal, double.NaN, HydraRingDeviationType.Standard, areaFlowAperturesMean, areaFlowAperturesStandardDeviation, double.NaN); // Inside water level yield return new HydraRingVariable(93, HydraRingDistributionType.Normal, double.NaN, HydraRingDeviationType.Standard, insideWaterLevelMean, insideWaterLevelStandardDeviation, double.NaN); } } }