// 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;
using Core.Common.Base.Data;
using Ringtoets.Common.Data.Probabilistics;
namespace Ringtoets.ClosingStructures.Data
{
///
/// Class that holds all the static closing structures calculation input parameters.
///
public class GeneralClosingStructuresInput
{
private RoundedDouble c;
///
/// Initializes a new instance of the class.
///
public GeneralClosingStructuresInput()
{
c = new RoundedDouble(2, 0.5);
N2A = 1;
GravitationalAcceleration = new RoundedDouble(2, 9.81);
ModelFactorOvertoppingFlow = new LogNormalDistribution(3)
{
Mean = (RoundedDouble) 0.09,
StandardDeviation = (RoundedDouble) 0.06
};
ModelFactorStorageVolume = new LogNormalDistribution(2)
{
Mean = (RoundedDouble) 1,
StandardDeviation = (RoundedDouble) 0.2
};
ModelFactorSubCriticalFlow = new NormalDistribution(1)
{
Mean = (RoundedDouble) 1,
};
ModelFactorSubCriticalFlow.SetStandardDeviationFromVariationCoefficient(0.1);
ModelFactorInflowVolume = new RoundedDouble(2, 1);
}
#region Constants
///
/// Gets the gravitational acceleration.
///
public RoundedDouble GravitationalAcceleration { get; private set; }
#endregion
#region Length effect parameters
///
/// Gets or sets the 'C' parameter used to factor in the 'length effect'.
///
public RoundedDouble C
{
get
{
return c;
}
set
{
c = value.ToPrecision(c.NumberOfDecimalPlaces);
}
}
///
/// Gets or sets the 'N2A' parameter used to factor in the 'length effect'.
///
public int N2A { get; set; }
///
/// Gets the 'N' parameter used to factor in the 'length effect'.
///
public RoundedDouble N
{
get
{
return new RoundedDouble(2, Math.Max(1, c*N2A));
}
}
#endregion
#region Model factors
///
/// Gets the model factor overtopping flow.
///
public LogNormalDistribution ModelFactorOvertoppingFlow { get; private set; }
///
/// Gets the model factor for storage volume.
///
public LogNormalDistribution ModelFactorStorageVolume { get; private set; }
///
/// Gets the model factor for sub critical flow.
///
public NormalDistribution ModelFactorSubCriticalFlow { get; private set; }
///
/// Get the model factor for incoming flow volume.
///
public RoundedDouble ModelFactorInflowVolume { get; private set; }
#endregion
}
}