// Copyright (C) Stichting Deltares 2017. 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;
using Ringtoets.HydraRing.Calculation.Data.Variables;
namespace Ringtoets.HydraRing.Calculation.Data.Input.Structures
{
///
/// Container of all data necessary for performing a linear low sill based structures stability point calculation via Hydra-Ring.
///
public class StructuresStabilityPointLowSillLinearCalculationInput : StructuresStabilityPointCalculationInput
{
private readonly double constructiveStrengthLinearLoadModelMean;
private readonly double constructiveStrengthLinearLoadModelVariation;
private readonly double stabilityLinearLoadModelMean;
private readonly double stabilityLinearLoadModelVariation;
private readonly double widthFlowAperturesMean;
private readonly double widthFlowAperturesStandardDeviation;
///
/// Creates a new instance of .
///
/// The id of the hydraulic boundary location.
/// The normal of the section.
/// The foreland points.
/// The break water.
/// The volumic weight of water.
/// The gravitational acceleration.
/// The mean of the crest level of the structure.
/// The standard deviation of the crest level of the structure.
/// The orientation of the normal of the structure.
/// The factor of the storm duration for an open structure.
/// The mean of the threshold height open weir.
/// The standard deviation of the threshold height open weir.
/// The mean of the inside water level at failure of construction.
/// The standard deviation of the inside water level at failure of construction.
/// The failure probability repair closure.
/// The mean of the failure collision energy.
/// The variation of the failure collision energy.
/// The mean of the model factor collision load.
/// The variation of the model factor collision load.
/// The mean of the ship mass.
/// The variation of the ship mass.
/// The mean of the ship velocity.
/// The variation of the ship velocity.
/// The levelling count.
/// The probability of collision of the secondary structure.
/// The mean of the flow velocity structure closable.
/// The variation of the flow velocity structure closable.
/// The mean of the inside water level.
/// The standard deviation of the inside water level.
/// 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 mean of the bank width.
/// The standard deviation of the bank width.
/// The evaluation level.
/// The mean of the model factor load effect.
/// The standard deviation of the model factor load effect.
/// The N of the wave ratio max h.
/// The standard deviation of the wave ratio max h.
/// The vertical distance.
/// The modification factor waves slowly-varying pressure component.
/// The modification factor dynamic or impulsive pressure component.
/// The mean of the constructive strength linear load model.
/// The variation of the constructive strength linear load model.
/// The mean of the stability linear load model.
/// The variation of the stability linear load model.
/// The mean of the width flow apertures.
/// The standard deviation of the width flow apertures.
public StructuresStabilityPointLowSillLinearCalculationInput(long hydraulicBoundaryLocationId,
double sectionNormal,
IEnumerable forelandPoints,
HydraRingBreakWater breakWater,
double volumicWeightWater,
double gravitationalAcceleration,
double levelCrestStructureMean, double levelCrestStructureStandardDeviation,
double structureNormalOrientation,
double factorStormDurationOpenStructure,
double thresholdHeightOpenWeirMean, double thresholdHeightOpenWeirStandardDeviation,
double insideWaterLevelFailureConstructionMean, double insideWaterLevelFailureConstructionStandardDeviation,
double failureProbabilityRepairClosure,
double failureCollisionEnergyMean, double failureCollisionEnergyVariation,
double modelFactorCollisionLoadMean, double modelFactorCollisionLoadVariation,
double shipMassMean, double shipMassVariation,
double shipVelocityMean, double shipVelocityVariation,
int levellingCount,
double probabilityCollisionSecondaryStructure,
double flowVelocityStructureClosableMean, double flowVelocityStructureClosableVariation,
double insideWaterLevelMean, double insideWaterLevelStandardDeviation,
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 bankWidthMean, double bankWidthStandardDeviation,
double evaluationLevel,
double modelFactorLoadEffectMean, double modelFactorLoadEffectStandardDeviation,
double waveRatioMaxHN, double waveRatioMaxHStandardDeviation,
double verticalDistance,
double modificationFactorWavesSlowlyVaryingPressureComponent,
double modificationFactorDynamicOrImpulsivePressureComponent,
double constructiveStrengthLinearLoadModelMean, double constructiveStrengthLinearLoadModelVariation,
double stabilityLinearLoadModelMean, double stabilityLinearLoadModelVariation,
double widthFlowAperturesMean, double widthFlowAperturesStandardDeviation)
: base(hydraulicBoundaryLocationId,
sectionNormal,
forelandPoints, breakWater,
volumicWeightWater,
gravitationalAcceleration,
levelCrestStructureMean, levelCrestStructureStandardDeviation,
structureNormalOrientation,
factorStormDurationOpenStructure,
thresholdHeightOpenWeirMean, thresholdHeightOpenWeirStandardDeviation,
insideWaterLevelFailureConstructionMean, insideWaterLevelFailureConstructionStandardDeviation,
failureProbabilityRepairClosure,
failureCollisionEnergyMean, failureCollisionEnergyVariation,
modelFactorCollisionLoadMean, modelFactorCollisionLoadVariation,
shipMassMean, shipMassVariation,
shipVelocityMean, shipVelocityVariation,
levellingCount,
probabilityCollisionSecondaryStructure,
flowVelocityStructureClosableMean, flowVelocityStructureClosableVariation,
insideWaterLevelMean, insideWaterLevelStandardDeviation,
allowedLevelIncreaseStorageMean, allowedLevelIncreaseStorageStandardDeviation,
modelFactorStorageVolumeMean, modelFactorStorageVolumeStandardDeviation,
storageStructureAreaMean, storageStructureAreaVariation,
modelFactorInflowVolume,
flowWidthAtBottomProtectionMean, flowWidthAtBottomProtectionStandardDeviation,
criticalOvertoppingDischargeMean, criticalOvertoppingDischargeVariation,
failureProbabilityStructureWithErosion,
stormDurationMean, stormDurationVariation,
bankWidthMean, bankWidthStandardDeviation,
evaluationLevel,
modelFactorLoadEffectMean, modelFactorLoadEffectStandardDeviation,
waveRatioMaxHN, waveRatioMaxHStandardDeviation,
verticalDistance,
modificationFactorWavesSlowlyVaryingPressureComponent,
modificationFactorDynamicOrImpulsivePressureComponent)
{
this.constructiveStrengthLinearLoadModelMean = constructiveStrengthLinearLoadModelMean;
this.constructiveStrengthLinearLoadModelVariation = constructiveStrengthLinearLoadModelVariation;
this.stabilityLinearLoadModelMean = stabilityLinearLoadModelMean;
this.stabilityLinearLoadModelVariation = stabilityLinearLoadModelVariation;
this.widthFlowAperturesMean = widthFlowAperturesMean;
this.widthFlowAperturesStandardDeviation = widthFlowAperturesStandardDeviation;
}
public override IEnumerable Variables
{
get
{
List 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;
case 430:
return 114;
case 435:
return 116;
default:
return null;
}
}
private IEnumerable GetVariables()
{
yield return new LogNormalHydraRingVariable(80, HydraRingDeviationType.Variation, constructiveStrengthLinearLoadModelMean, constructiveStrengthLinearLoadModelVariation);
yield return new LogNormalHydraRingVariable(83, HydraRingDeviationType.Variation, stabilityLinearLoadModelMean, stabilityLinearLoadModelVariation);
yield return new NormalHydraRingVariable(106, HydraRingDeviationType.Standard, widthFlowAperturesMean, widthFlowAperturesStandardDeviation);
}
}
}