// 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 Ringtoets.Common.Data.Probabilistics;
namespace Ringtoets.MacroStabilityInwards.Primitives
{
///
/// Factory for creating design variables based on probabilistic distributions for macro stability.
///
public static class MacroStabilityInwardsSemiProbabilisticDesignVariableFactory
{
///
/// Creates the design variable for the volumic weight of the layer above the phreatic level.
///
public static VariationCoefficientDesignVariable GetAbovePhreaticLevel(MacroStabilityInwardsSoilLayerData data)
{
return new VariationCoefficientLogNormalDistributionDesignVariable(data.AbovePhreaticLevel)
{
Percentile = 0.5
};
}
///
/// Creates the design variable for the volumic weight of the layer below the phreatic level.
///
public static VariationCoefficientDesignVariable GetBelowPhreaticLevel(MacroStabilityInwardsSoilLayerData data)
{
return new VariationCoefficientLogNormalDistributionDesignVariable(data.BelowPhreaticLevel)
{
Percentile = 0.5
};
}
///
/// Creates the design variable for the cohesion.
///
public static VariationCoefficientDesignVariable GetCohesion(MacroStabilityInwardsSoilLayerData data)
{
return new VariationCoefficientLogNormalDistributionDesignVariable(data.Cohesion)
{
Percentile = 0.05
};
}
///
/// Creates the design variable for the friction angle.
///
public static VariationCoefficientDesignVariable GetFrictionAngle(MacroStabilityInwardsSoilLayerData data)
{
return new VariationCoefficientLogNormalDistributionDesignVariable(data.FrictionAngle)
{
Percentile = 0.05
};
}
///
/// Creates the design variable for the shear strength ratio.
///
public static VariationCoefficientDesignVariable GetShearStrengthRatio(MacroStabilityInwardsSoilLayerData data)
{
return new VariationCoefficientLogNormalDistributionDesignVariable(data.ShearStrengthRatio)
{
Percentile = 0.05
};
}
///
/// Creates the design variable for the strength increase component.
///
public static VariationCoefficientDesignVariable GetStrengthIncreaseExponent(MacroStabilityInwardsSoilLayerData data)
{
return new VariationCoefficientLogNormalDistributionDesignVariable(data.StrengthIncreaseExponent)
{
Percentile = 0.05
};
}
///
/// Creates the design variable for the POP.
///
public static VariationCoefficientDesignVariable GetPop(MacroStabilityInwardsSoilLayerData data)
{
return new VariationCoefficientLogNormalDistributionDesignVariable(data.Pop)
{
Percentile = 0.05
};
}
///
/// Creates the design variable for a preconsolidation stress definition.
///
public static VariationCoefficientDesignVariable GetPreconsolidationStress(IMacroStabilityInwardsPreconsolidationStress preconsolidationStressUnderSurfaceLine)
{
return new VariationCoefficientLogNormalDistributionDesignVariable(preconsolidationStressUnderSurfaceLine.Stress)
{
Percentile = 0.05
};
}
}
}