// 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.UpliftVan.Input { /// /// A 2D soil layer that has been adapted to perform a calculation. /// public class UpliftVanSoilLayer { /// /// Creates a new instance of . /// /// The outer ring of the geometry of the soil layer. /// The holes of the geometry of the soil layer. /// The object containing the values for /// the properties of the new . /// Thrown when /// is null. public UpliftVanSoilLayer(Point2D[] outerRing, IEnumerable holes, ConstructionProperties properties) { if (outerRing == null) { throw new ArgumentNullException(nameof(outerRing)); } if (holes == null) { throw new ArgumentNullException(nameof(holes)); } if (properties == null) { throw new ArgumentNullException(nameof(properties)); } OuterRing = outerRing; Holes = holes; 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; } /// /// Gets the outer ring of the geometry. /// public Point2D[] OuterRing { get; } /// /// Gets the holes of the geometry. /// public IEnumerable Holes { 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 UpliftVanShearStrengthModel 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 UpliftVanDilatancyType DilatancyType { get; } public class ConstructionProperties { /// /// Creates a new instance of . /// public ConstructionProperties() { ShearStrengthModel = UpliftVanShearStrengthModel.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 = UpliftVanDilatancyType.Zero; } /// /// 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 UpliftVanShearStrengthModel 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 UpliftVanDilatancyType DilatancyType { internal get; set; } } } }