// 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;
namespace Ringtoets.HydraRing.Calculation.Data.Input.Overtopping
{
///
/// Container of all data necessary for performing an overtopping calculation via Hydra-Ring.
///
public class OvertoppingCalculationInput : ExceedanceProbabilityCalculationInput
{
private readonly HydraRingSection section;
private readonly IEnumerable profilePoints;
private readonly IEnumerable forelandPoints;
private readonly IEnumerable breakWaters;
private readonly double dikeHeight;
private readonly double criticalOvertoppingMean;
private readonly double criticalOvertoppingStandardDeviation;
///
/// Creates a new instance of the class.
///
/// The id of the hydraulic station to use during the calculation.
/// The section to use during the calculation.
/// The dike height to use during the calculation.
/// The mean of the critical overtopping to use during the calculation.
/// The standard deviation of the critical overtopping to use during the calculation.
/// The profile points to use during the calculation.
/// The foreland points to use during the calculation.
/// The break water to use during the calculation.
public OvertoppingCalculationInput(int hydraulicBoundaryLocationId, HydraRingSection hydraRingSection,
double hydraRingDikeHeight, double hydraRingCriticalOvertoppingMean,
double hydraRingCriticalOvertoppingStandardDeviation,
IEnumerable hydraRingProfilePoints,
IEnumerable hydraRingForelandPoints,
IEnumerable hydraRingBreakWaters)
: base(hydraulicBoundaryLocationId)
{
section = hydraRingSection;
dikeHeight = hydraRingDikeHeight;
criticalOvertoppingMean = hydraRingCriticalOvertoppingMean;
criticalOvertoppingStandardDeviation = hydraRingCriticalOvertoppingStandardDeviation;
profilePoints = hydraRingProfilePoints;
forelandPoints = hydraRingForelandPoints;
breakWaters = hydraRingBreakWaters;
}
public override HydraRingFailureMechanismType FailureMechanismType
{
get
{
return HydraRingFailureMechanismType.DikesOvertopping;
}
}
public override int VariableId
{
get
{
return 1;
}
}
public override HydraRingSection Section
{
get
{
return section;
}
}
public override IEnumerable ProfilePoints
{
get
{
return profilePoints;
}
}
public override IEnumerable ForelandsPoints
{
get
{
return forelandPoints;
}
}
public override IEnumerable BreakWaters
{
get
{
return breakWaters;
}
}
public override IEnumerable Variables
{
get
{
yield return new OvertoppingVariableDikeHeight(dikeHeight);
yield return new OvertoppingVariableModelFactorCriticalOvertopping();
yield return new OvertoppingVariableFactorFb();
yield return new OvertoppingVariableFactorFn();
yield return new OvertoppingVariableModelFactorOvertopping();
yield return new OvertoppingVariableCriticalOvertopping(criticalOvertoppingMean, criticalOvertoppingStandardDeviation);
yield return new OvertoppingVariableModelFactorFrunup();
yield return new OvertoppingVariableExponentModelFactorShallow();
}
}
public override int? GetSubMechanismModelId(int subMechanismId)
{
switch (subMechanismId)
{
case 102:
return 94;
case 103:
return 95;
default:
return null;
}
}
#region Overtopping Variables
private class OvertoppingVariableDikeHeight : HydraRingVariable
{
public OvertoppingVariableDikeHeight(double dikeHeight) : base(1, HydraRingDistributionType.Deterministic, dikeHeight, HydraRingDeviationType.Standard, double.NaN, double.NaN, double.NaN) {}
}
private class OvertoppingVariableModelFactorCriticalOvertopping : HydraRingVariable
{
public OvertoppingVariableModelFactorCriticalOvertopping() : base(8, HydraRingDistributionType.Deterministic, 1.0, HydraRingDeviationType.Standard, double.NaN, double.NaN, double.NaN) {}
}
private class OvertoppingVariableFactorFb : HydraRingVariable
{
public OvertoppingVariableFactorFb() : base(10, HydraRingDistributionType.Normal, double.NaN, HydraRingDeviationType.Standard, 4.75, 0.5, double.NaN) {}
}
private class OvertoppingVariableFactorFn : HydraRingVariable
{
public OvertoppingVariableFactorFn() : base(11, HydraRingDistributionType.Normal, double.NaN, HydraRingDeviationType.Standard, 2.60, 0.35, double.NaN) {}
}
private class OvertoppingVariableModelFactorOvertopping : HydraRingVariable
{
public OvertoppingVariableModelFactorOvertopping() : base(12, HydraRingDistributionType.Deterministic, 1.0, HydraRingDeviationType.Standard, double.NaN, double.NaN, double.NaN) {}
}
private class OvertoppingVariableModelFactorFrunup : HydraRingVariable
{
public OvertoppingVariableModelFactorFrunup() : base(120, HydraRingDistributionType.Normal, double.NaN, HydraRingDeviationType.Variation, 1, 0.07, double.NaN) {}
}
private class OvertoppingVariableExponentModelFactorShallow : HydraRingVariable
{
public OvertoppingVariableExponentModelFactorShallow() : base(123, HydraRingDistributionType.Normal, double.NaN, HydraRingDeviationType.Standard, 0.92, 0.24, double.NaN) {}
}
#endregion
}
}