// 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 Ringtoets.Piping.Data;
using Ringtoets.Piping.Data.Probabilistics;
namespace Ringtoets.Piping.KernelWrapper
{
///
/// Factory for creating design variables based on probabilistic distributions.
///
public static class PipingSemiProbabilisticDesignValueFactory
{
#region General parameters
///
/// Creates the design variable for .
///
public static DesignVariable GetSaturatedVolumicWeightOfCoverageLayer(PipingInput parameters)
{
return CreateDesignVariable(parameters.SaturatedVolumicWeightOfCoverageLayer, 0.05);
}
///
/// Creates the design variable for .
///
public static DesignVariable GetThicknessCoverageLayer(PipingInput parameters)
{
return CreateDesignVariable(parameters.ThicknessCoverageLayer, 0.05);
}
///
/// Creates the design variable for .
///
public static DesignVariable GetPhreaticLevelExit(PipingInput parameters)
{
return CreateDesignVariable(parameters.PhreaticLevelExit, 0.05);
}
///
/// Creates the design variable for .
///
public static DesignVariable GetDampingFactorExit(PipingInput parameters)
{
return CreateDesignVariable(parameters.DampingFactorExit, 0.95);
}
#endregion
#region Piping parameters
///
/// Creates the design variable for .
///
public static DesignVariable GetSeepageLength(PipingInput parameters)
{
return CreateDesignVariable(parameters.SeepageLength, 0.05);
}
///
/// Creates the design variable for .
///
public static DesignVariable GetDiameter70(PipingInput parameters)
{
return CreateDesignVariable(parameters.Diameter70, 0.05);
}
///
/// Creates the design variable for .
///
public static DesignVariable GetDarcyPermeability(PipingInput parameters)
{
return CreateDesignVariable(parameters.DarcyPermeability, 0.95);
}
///
/// Creates the design variable for .
///
public static DesignVariable GetThicknessAquiferLayer(PipingInput parameters)
{
return CreateDesignVariable(parameters.ThicknessAquiferLayer, 0.95);
}
#endregion
private static DesignVariable CreateDesignVariable(NormalDistribution distribution, double percentile)
{
return new NormalDistributionDesignVariable(distribution)
{
Percentile = percentile
};
}
private static DesignVariable CreateDesignVariable(LognormalDistribution distribution, double percentile)
{
return new LognormalDistributionDesignVariable(distribution)
{
Percentile = percentile
};
}
}
}