// 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 System; using System.Collections.Generic; using Core.Common.Base.Geometry; namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input { /// /// A 2D soil layer that has been adapted to perform a calculation. /// public class SoilLayer { /// /// Creates a new instance of . /// /// The outer ring of the soil layer. /// The nested layers of the soil layer. /// The object containing the values for /// the soil data properties of the new . /// Thrown when any input parameter is null. public SoilLayer(Point2D[] outerRing, ConstructionProperties properties, IEnumerable nestedLayers) { if (outerRing == null) { throw new ArgumentNullException(nameof(outerRing)); } if (properties == null) { throw new ArgumentNullException(nameof(properties)); } if (nestedLayers == null) { throw new ArgumentNullException(nameof(nestedLayers)); } OuterRing = outerRing; IsAquifer = properties.IsAquifer; UsePop = properties.UsePop; ShearStrengthModel = properties.ShearStrengthModel; MaterialName = properties.MaterialName; AbovePhreaticLevel = properties.AbovePhreaticLevel; BelowPhreaticLevel = properties.BelowPhreaticLevel; Cohesion = properties.Cohesion; FrictionAngle = properties.FrictionAngle; StrengthIncreaseExponent = properties.StrengthIncreaseExponent; ShearStrengthRatio = properties.ShearStrengthRatio; Pop = properties.Pop; DilatancyType = properties.DilatancyType; WaterPressureInterpolationModel = properties.WaterPressureInterpolationModel; NestedLayers = nestedLayers; } /// /// Gets the outer ring of the soil layer. /// public Point2D[] OuterRing { get; } /// /// Gets the nested layers of the soil layer. /// public IEnumerable NestedLayers { get; } /// /// Gets a value indicating whether the layer is an aquifer. /// public bool IsAquifer { get; } /// /// Gets a value indicating whether to use POP for the layer. /// public bool UsePop { get; } /// /// Gets the shear strength model to use for the layer. /// public ShearStrengthModel ShearStrengthModel { get; } /// /// Gets the name of the material that was assigned to the layer. /// public string MaterialName { get; } /// /// Gets the volumic weight of the layer above the phreatic level. /// public double AbovePhreaticLevel { get; } /// /// Gets the volumic weight of the layer below the phreatic level. /// public double BelowPhreaticLevel { get; } /// /// Gets the cohesion. /// public double Cohesion { get; } /// /// Gets the friction angle. /// public double FrictionAngle { get; } /// /// Gets the strength increase exponent. /// public double StrengthIncreaseExponent { get; } /// /// Gets the shear strength ratio. /// public double ShearStrengthRatio { get; } /// /// Gets the POP. /// public double Pop { get; } /// /// Gets the dilatancy type. /// public DilatancyType DilatancyType { get; } /// /// Gets the water pressure interpolation model. /// public WaterPressureInterpolationModel WaterPressureInterpolationModel { get; } /// /// The construction properties of the soil layer. /// public class ConstructionProperties { /// /// Creates a new instance of . /// public ConstructionProperties() { ShearStrengthModel = ShearStrengthModel.CPhi; MaterialName = string.Empty; AbovePhreaticLevel = double.NaN; BelowPhreaticLevel = double.NaN; Cohesion = double.NaN; FrictionAngle = double.NaN; StrengthIncreaseExponent = double.NaN; ShearStrengthRatio = double.NaN; Pop = double.NaN; DilatancyType = DilatancyType.Zero; WaterPressureInterpolationModel = WaterPressureInterpolationModel.Automatic; } /// /// Gets or sets a value indicating whether the layer is an aquifer. /// public bool IsAquifer { internal get; set; } /// /// Gets or sets a value indicating whether to use POP for the layer. /// public bool UsePop { internal get; set; } /// /// Gets or sets the shear strength model to use for the layer. /// public ShearStrengthModel ShearStrengthModel { internal get; set; } /// /// Gets or sets the name of the material that was assigned to the layer. /// public string MaterialName { internal get; set; } /// /// Gets or sets the volumic weight of the layer above the phreatic level. /// public double AbovePhreaticLevel { internal get; set; } /// /// Gets or sets the volumic weight of the layer below the phreatic level. /// public double BelowPhreaticLevel { internal get; set; } /// /// Gets or sets the cohesion. /// public double Cohesion { internal get; set; } /// /// Gets or sets the friction angle. /// public double FrictionAngle { internal get; set; } /// /// Gets or sets the strength increase exponent. /// public double StrengthIncreaseExponent { internal get; set; } /// /// Gets or sets the shear strength ratio. /// public double ShearStrengthRatio { internal get; set; } /// /// Gets or sets the POP. /// public double Pop { internal get; set; } /// /// Gets or sets the dilatancy type. /// public DilatancyType DilatancyType { internal get; set; } /// /// Gets or sets the water pressure interpolation model. /// public WaterPressureInterpolationModel WaterPressureInterpolationModel { internal get; set; } } } }