// 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 low sill based structures closure calculation via Hydra-Ring.
///
public class StructuresClosureLowSillCalculationInput : StructuresClosureCalculationInput
{
private readonly double modelFactorSuperCriticalFlowMean;
private readonly double modelFactorSuperCriticalFlowStandardDeviation;
private readonly double modelFactorSubCriticalFlowMean;
private readonly double modelFactorSubCriticalFlowVariation;
private readonly double thresholdHeightOpenWeirMean;
private readonly double thresholdHeightOpenWeirStandardDeviation;
private readonly double insideWaterLevelMean;
private readonly double insideWaterLevelStandardDeviation;
private readonly double widthFlowAperturesMean;
private readonly double widthFlowAperturesVariation;
///
/// 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 model factor super critical flow to use during the calculation.
/// The standard deviation of the model factor super critical flow to use during the calculation.
/// The mean of the model factor sub citrical flow to use during the calculation.
/// The variation of the model factor sub citrical flow to use during the calculation.
/// The mean of the threshold height open weir to use during the calculation.
/// The standard deviation of the threshold height open weir 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.
/// 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.
public StructuresClosureLowSillCalculationInput(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 hydraRingModelFactorSuperCriticalFlowMean, double hydraRingModelFactorSuperCriticalFlowStandardDeviation,
double hydraRingModelFactorSubCriticalFlowMean, double hydraRingModelFactorSubCriticalFlowVariation,
double hydraRingThresholdHeightOpenWeirMean, double hydraRingThresholdHeightOpenWeirStandardDeviation,
double hydraRingInsideWaterLevelMean, double hydraRingInsideWaterLevelStandardDeviation,
double hydraRingWidthFlowAperturesMean, double hydraRingWidthFlowAperturesVariation)
: base(hydraulicBoundaryLocationId, hydraRingSection, forelandPoints,
hydraRingGravitationalAcceleration, hydraRingFactorStormDurationOpenStructure,
hydraRingFailureProbabilityOpenStructure, hydraRingFailureProbabilityReparation,
hydraRingIdenticalAperture, hydraRingAllowableIncreaseOfLevelForStorageMean,
hydraRingAllowableIncreaseOfLevelForStorageStandardDeviation, hydraRingModelFactorForStorageVolumeMean,
hydraRingModelFactorForStorageVolumeStandardDeviation, hydraRingStorageStructureAreaMean,
hydraRingStorageStructureAreaVariation, hydraRingModelFactorForIncomingFlowVolume,
hydraRingFlowWidthAtBottomProtectionMean, hydraRingFlowWidthAtBottomProtectionStandardDeviation,
hydraRingCriticalOvertoppingDischargeMean, hydraRingCriticalOvertoppingDischargeVariation,
hydraRingFailureProbabilityOfStructureGivenErosion, hydraRingStormDurationMean,
hydraRingStormDurationVariation, hydraRingProbabilityOpenStructureBeforeFlooding)
{
modelFactorSuperCriticalFlowMean = hydraRingModelFactorSuperCriticalFlowMean;
modelFactorSuperCriticalFlowStandardDeviation = hydraRingModelFactorSuperCriticalFlowStandardDeviation;
modelFactorSubCriticalFlowMean = hydraRingModelFactorSubCriticalFlowMean;
modelFactorSubCriticalFlowVariation = hydraRingModelFactorSubCriticalFlowVariation;
thresholdHeightOpenWeirMean = hydraRingThresholdHeightOpenWeirMean;
thresholdHeightOpenWeirStandardDeviation = hydraRingThresholdHeightOpenWeirStandardDeviation;
insideWaterLevelMean = hydraRingInsideWaterLevelMean;
insideWaterLevelStandardDeviation = hydraRingInsideWaterLevelStandardDeviation;
widthFlowAperturesMean = hydraRingWidthFlowAperturesMean;
widthFlowAperturesVariation = hydraRingWidthFlowAperturesVariation;
}
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 106;
case 425:
return 111;
default:
return null;
}
}
private IEnumerable GetVariables()
{
// Model factor super critical flow
yield return new HydraRingVariable(62, HydraRingDistributionType.Normal, double.NaN,
HydraRingDeviationType.Standard, modelFactorSuperCriticalFlowMean,
modelFactorSuperCriticalFlowStandardDeviation, double.NaN);
// Model factor sub critical flow
yield return new HydraRingVariable(64, HydraRingDistributionType.Normal, double.NaN,
HydraRingDeviationType.Variation, modelFactorSubCriticalFlowMean,
modelFactorSubCriticalFlowVariation, double.NaN);
// Threshold height open weir
yield return new HydraRingVariable(65, HydraRingDistributionType.Normal, double.NaN,
HydraRingDeviationType.Standard, thresholdHeightOpenWeirMean,
thresholdHeightOpenWeirStandardDeviation, double.NaN);
// Inside water level
yield return new HydraRingVariable(93, HydraRingDistributionType.Normal, double.NaN,
HydraRingDeviationType.Standard, insideWaterLevelMean,
insideWaterLevelStandardDeviation, double.NaN);
// Width flow apertures
yield return new HydraRingVariable(106, HydraRingDistributionType.Normal, double.NaN,
HydraRingDeviationType.Variation, widthFlowAperturesMean,
widthFlowAperturesVariation, double.NaN);
}
}
}