using System.ComponentModel;
using Deltares.Probabilistic;
using Deltares.Standard;
using Deltares.Standard.Attributes;
using Deltares.Standard.EventPublisher;
using Deltares.Standard.Units;
namespace Deltares.Stability
{
///
/// Defines some generic settings for stability
///
public class StabilitySettings
{
private bool createZones = true;
private double dikeSectionSensitiveLengthFraction = 0.75;
private double lengthEffectIntensity = 300;
private double maxAllowedAngleBetweenSlices = 90.0;
private double maximumSlideWidth = 1;
private double minimalCircleLength = 0;
private double minimalPlaneDepth = 2;
// defaults to be determined as stated in document 1209431-008 by R.B.Jongejan & W.J Klerk, par 17
private Stochast modelUncertaintyParameterStochast = new Stochast("ModelUncertaintyParameter")
{
Mean = 0.98,
Deviation = 0.02,
DeviationType = StochastDeviationType.Relative,
DistributionType = DistributionType.Normal
};
private double preconsolidationStressFactor = 1.05;
private double requiredForcePointsInSlices = 0.9;
public StabilitySettings()
{
modelUncertaintyParameterStochast.Owner = this;
}
///
/// Measure for the intensity of the length effect within the part of the dike section that that is considered sensitive to a failure mechanism.
///
[Category("SemiProbabilisticProperties")]
[Unit(UnitType.Length)]
[PropertyOrder(1,7)]
public double LengthEffectIntensity
{
get
{
return lengthEffectIntensity;
}
set
{
this.SetAndNotify2(out lengthEffectIntensity, value, x => x.LengthEffectIntensity);
}
}
///
/// Fraction of the length of the dike section that is considered sensitive to a failure mechanism.
///
[Category("SemiProbabilisticProperties")]
[Unit(UnitType.Fractions)]
[PropertyOrder(1, 8)]
public double DikeSectionSensitiveLengthFraction
{
get
{
return dikeSectionSensitiveLengthFraction;
}
set
{
this.SetAndNotify2(out dikeSectionSensitiveLengthFraction, value, x => x.DikeSectionSensitiveLengthFraction);
}
}
///
/// Gets or sets a value indicating whether [create zones].
///
[Category("Settings")]
[PropertyOrder(1, 2)]
public bool CreateZones
{
get
{
return createZones;
}
set
{
this.SetAndNotify2(out createZones, value, ss => ss.CreateZones);
}
}
//used in RunSpencer as locationInfo.StabilityModel.MaximumSliceWidth
[Format("F2")]
[Unit(UnitType.Length)]
[Translation("MaximumSliceWidth")]
[Category("Settings")]
[PropertyOrder(1, 1)]
public double MaximumSlideWidth
{
get
{
return maximumSlideWidth;
}
set
{
this.SetAndNotify2(out maximumSlideWidth, value, ss => ss.MaximumSlideWidth);
}
}
//used in RunSpencer as locationInfo.StabilityModel.MinimalCircleLength
[Format("F2")]
[Unit(UnitType.Length)]
[Translation("SlipPlaneMinLength")]
[Category("Settings")]
[PropertyOrder(1, 3)]
public double MinimalCircleLength
{
get
{
return minimalCircleLength;
}
set
{
this.SetAndNotify2(out minimalCircleLength, value, ss => ss.MinimalCircleLength);
}
}
//used in RunSpencer as locationInfo.StabilityModel.SlipPlaneMinDepth
[Format("F2")]
[Unit(UnitType.Length)]
[Category("Settings")]
[PropertyOrder(1, 4)]
public double MinimalPlaneDepth
{
get
{
return minimalPlaneDepth;
}
set
{
this.SetAndNotify2(out minimalPlaneDepth, value, ss => ss.MinimalPlaneDepth);
}
}
///
/// Used in RunSpencer as locationInfo.StabilityModel.MinReqPercForcePointsInSlices
/// The value for minumum required percentage of force-points in slices (used for Spencer acceptance criteria)
///
[Format("F3")]
[Unit(UnitType.Fractions)]
[XmlOldName("MinReqPercForcePointsInSlices")]
[Category("Settings")]
[Browsable(false)]
public double RequiredForcePointsInSlices
{
get
{
return requiredForcePointsInSlices;
}
set
{
this.SetAndNotify2(out requiredForcePointsInSlices, value, ss => ss.RequiredForcePointsInSlices);
}
}
///
/// Used in RunSpencer as locationInfo.StabilityModel.MinReqPercForcePointsInSlices
///The value for maximum angle (in degrees) between slices (used for Spencer acceptance criteria).
///
[Format("F3")]
[Unit(UnitType.Angle)]
[Category("Settings")]
[Browsable(false)]
public double MaxAllowedAngleBetweenSlices
{
get
{
return maxAllowedAngleBetweenSlices;
}
set
{
this.SetAndNotify2(out maxAllowedAngleBetweenSlices, value, ss => ss.MaxAllowedAngleBetweenSlices);
}
}
///
/// Gets or sets the model uncertainty parameter stochast.
/// Should be a uncertainty parameter per model (Bishop/UpliftVan/Spencer), but
/// there UpliftVan/Spencer has the same values at the moment we still can use one parameter
///
///
/// The model uncertainty parameter stochast.
///
[ReadOnly(true)]
[Translation("ModelUncertaintyParameter")]
[Category("Settings")]
[PropertyOrder(1, 5)]
public Stochast ModelUncertaintyParameterStochast
{
get
{
return modelUncertaintyParameterStochast;
}
set
{
this.SetAndNotify2(out modelUncertaintyParameterStochast, value, ss => ss.ModelUncertaintyParameter);
}
}
///
/// Gets or sets the model uncertainty parameter.
/// Should be a uncertainty parameter per model (Bishop/UpliftVan/Spencer), but
/// there UpliftVan/Spencer has the same values at the moment we still can use one parameter
///
///
/// The model uncertainty parameter.
///
[Unit(UnitType.None)]
[Format("F3")]
[Category("Settings")]
[Browsable(false)]
public virtual double ModelUncertaintyParameter
{
get
{
return TransformerManager.GetTransformedValue(this, s => s.ModelUncertaintyParameter, ModelUncertaintyParameterStochast.Mean);
}
}
[Unit(UnitType.None)]
[Format("F3")]
[Category("Settings")]
[PropertyOrder(1, 6)]
public double PreconsolidationStressFactor
{
get
{
return preconsolidationStressFactor;
}
set
{
this.SetAndNotify2(out preconsolidationStressFactor, value, ss => ss.PreconsolidationStressFactor);
}
}
}
}