// 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 Core.Common.Base.Data; using Core.Common.Base.Geometry; namespace Ringtoets.MacroStabilityInwards.Data { /// /// A slice of a macro stability inwards sliding curve. /// public class MacroStabilityInwardsSlice : ICloneable { /// /// Creates a new instance of . /// /// The top left point of the slice. /// The top right point of the slice. /// The bottom left point of the slice. /// The bottom right point of the slice. /// The object containing the values for the properties /// of the new . /// Thrown when any parameter is null. public MacroStabilityInwardsSlice(Point2D topLeftPoint, Point2D topRightPoint, Point2D bottomLeftPoint, Point2D bottomRightPoint, ConstructionProperties properties) { if (topLeftPoint == null) { throw new ArgumentNullException(nameof(topLeftPoint)); } if (topRightPoint == null) { throw new ArgumentNullException(nameof(topRightPoint)); } if (bottomLeftPoint == null) { throw new ArgumentNullException(nameof(bottomLeftPoint)); } if (bottomRightPoint == null) { throw new ArgumentNullException(nameof(bottomRightPoint)); } if (properties == null) { throw new ArgumentNullException(nameof(properties)); } TopLeftPoint = topLeftPoint; TopRightPoint = topRightPoint; BottomLeftPoint = bottomLeftPoint; BottomRightPoint = bottomRightPoint; XCenter = new RoundedDouble(2, (topLeftPoint.X + topRightPoint.X) / 2.0); ZCenterBottom = new RoundedDouble(2, new Segment2D(bottomLeftPoint, bottomRightPoint).Interpolate(XCenter)); Width = new RoundedDouble(2, topRightPoint.X - topLeftPoint.X); ArcLength = new RoundedDouble(2, bottomLeftPoint.GetEuclideanDistanceTo(bottomRightPoint)); BottomAngle = new RoundedDouble(2, Math2D.GetAngleBetween(bottomLeftPoint, bottomRightPoint)); TopAngle = new RoundedDouble(2, Math2D.GetAngleBetween(topLeftPoint, topRightPoint)); Cohesion = new RoundedDouble(3, properties.Cohesion); FrictionAngle = new RoundedDouble(3, properties.FrictionAngle); CriticalPressure = new RoundedDouble(3, properties.CriticalPressure); OverConsolidationRatio = new RoundedDouble(3, properties.OverConsolidationRatio); Pop = new RoundedDouble(3, properties.Pop); DegreeOfConsolidationPorePressureSoil = new RoundedDouble(3, properties.DegreeOfConsolidationPorePressureSoil); DegreeOfConsolidationPorePressureLoad = new RoundedDouble(3, properties.DegreeOfConsolidationPorePressureLoad); Dilatancy = new RoundedDouble(3, properties.Dilatancy); ExternalLoad = new RoundedDouble(3, properties.ExternalLoad); HydrostaticPorePressure = new RoundedDouble(3, properties.HydrostaticPorePressure); LeftForce = new RoundedDouble(3, properties.LeftForce); LeftForceAngle = new RoundedDouble(3, properties.LeftForceAngle); LeftForceY = new RoundedDouble(3, properties.LeftForceY); RightForce = new RoundedDouble(3, properties.RightForce); RightForceAngle = new RoundedDouble(3, properties.RightForceAngle); RightForceY = new RoundedDouble(3, properties.RightForceY); LoadStress = new RoundedDouble(3, properties.LoadStress); NormalStress = new RoundedDouble(3, properties.NormalStress); PorePressure = new RoundedDouble(3, properties.PorePressure); HorizontalPorePressure = new RoundedDouble(3, properties.HorizontalPorePressure); VerticalPorePressure = new RoundedDouble(3, properties.VerticalPorePressure); PiezometricPorePressure = new RoundedDouble(3, properties.PiezometricPorePressure); EffectiveStress = new RoundedDouble(3, properties.EffectiveStress); EffectiveStressDaily = new RoundedDouble(3, properties.EffectiveStressDaily); ExcessPorePressure = new RoundedDouble(3, properties.ExcessPorePressure); ShearStress = new RoundedDouble(3, properties.ShearStress); SoilStress = new RoundedDouble(3, properties.SoilStress); TotalPorePressure = new RoundedDouble(3, properties.TotalPorePressure); TotalStress = new RoundedDouble(3, properties.TotalStress); Weight = new RoundedDouble(3, properties.Weight); } /// /// Gets the top left point. /// public Point2D TopLeftPoint { get; private set; } /// /// Gets the top right point. /// public Point2D TopRightPoint { get; private set; } /// /// Gets the bottom left point. /// public Point2D BottomLeftPoint { get; private set; } /// /// Gets the bottom right point. /// public Point2D BottomRightPoint { get; private set; } /// /// Gets the X center point of the slice. /// [m] /// public RoundedDouble XCenter { get; } /// /// Gets the Z center bottom point of the slice. /// [m+NAP] /// public RoundedDouble ZCenterBottom { get; } /// /// Gets the width of the slice. /// [m] /// public RoundedDouble Width { get; } /// /// Gets the arc length of the slice. /// [m] /// public RoundedDouble ArcLength { get; } /// /// Gets the top angle of the slice. /// [°] /// public RoundedDouble TopAngle { get; } /// /// Gets the bottom angle of the slice. /// [°] /// public RoundedDouble BottomAngle { get; } /// /// Gets the cohesion. /// [kN/m²] /// public RoundedDouble Cohesion { get; } /// /// Gets the friction angle. /// [°] /// public RoundedDouble FrictionAngle { get; } /// /// Gets the critical pressure. /// [kN/m²] /// public RoundedDouble CriticalPressure { get; } /// /// Gets the OCR. /// [-] /// public RoundedDouble OverConsolidationRatio { get; } /// /// Gets the POP. /// [kN/m²] /// public RoundedDouble Pop { get; } /// /// Gets the pore pressure from degree of consolidation soil. /// [kN/m²] /// public RoundedDouble DegreeOfConsolidationPorePressureSoil { get; } /// /// Gets the pore pressure from degree of consolidation load. /// [kN/m²] /// public RoundedDouble DegreeOfConsolidationPorePressureLoad { get; } /// /// Gets the dilatancy of the slice. /// public RoundedDouble Dilatancy { get; } /// /// Gets the external load. /// [kN/m²] /// public RoundedDouble ExternalLoad { get; } /// /// Gets the hydrostatic pore pressure. /// [kN/m²] /// public RoundedDouble HydrostaticPorePressure { get; } /// /// Gets the left force. /// [kN/m²] /// public RoundedDouble LeftForce { get; } /// /// Gets the left force angle. /// [°] /// public RoundedDouble LeftForceAngle { get; } /// /// Gets the left force y. /// [kN/m²] /// public RoundedDouble LeftForceY { get; } /// /// Gets the right force. /// [kN/m²] /// public RoundedDouble RightForce { get; } /// /// Gets the right force angle. /// [°] /// public RoundedDouble RightForceAngle { get; } /// /// Gets the right force y. /// [kN/m²] /// public RoundedDouble RightForceY { get; } /// /// Gets the load stress. /// [kN/m²] /// public RoundedDouble LoadStress { get; } /// /// Gets the normal stress. /// [kN/m²] /// public RoundedDouble NormalStress { get; } /// /// Gets the pore pressure. /// [kN/m²] /// public RoundedDouble PorePressure { get; } /// /// Gets the horizontal pore pressure. /// [kN/m²] /// public RoundedDouble HorizontalPorePressure { get; } /// /// Gets the vertical pore pressure. /// [kN/m²] /// public RoundedDouble VerticalPorePressure { get; } /// /// Gets the piezometric pore pressure. /// [kN/m²] /// public RoundedDouble PiezometricPorePressure { get; } /// /// Gets the effective stress. /// [kN/m²] /// public RoundedDouble EffectiveStress { get; } /// /// Gets the daily effective stress. /// [kN/m²] /// public RoundedDouble EffectiveStressDaily { get; } /// /// Gets the excess pore pressure. /// [kN/m²] /// public RoundedDouble ExcessPorePressure { get; } /// /// Gets the shear stress. /// [kN/m²] /// public RoundedDouble ShearStress { get; } /// /// Gets the soil stress. /// [kN/m²] /// public RoundedDouble SoilStress { get; } /// /// Gets the total pore pressure. /// [kN/m²] /// public RoundedDouble TotalPorePressure { get; } /// /// Gets the total stress. /// [kN/m²] /// public RoundedDouble TotalStress { get; } /// /// Gets the weight. /// [kN/m] /// public RoundedDouble Weight { get; } public object Clone() { var clone = (MacroStabilityInwardsSlice) MemberwiseClone(); clone.TopLeftPoint = (Point2D) TopLeftPoint.Clone(); clone.TopRightPoint = (Point2D) TopRightPoint.Clone(); clone.BottomLeftPoint = (Point2D) BottomLeftPoint.Clone(); clone.BottomRightPoint = (Point2D) BottomRightPoint.Clone(); return clone; } public class ConstructionProperties { /// /// Creates a new instance of . /// public ConstructionProperties() { Cohesion = double.NaN; FrictionAngle = double.NaN; CriticalPressure = double.NaN; OverConsolidationRatio = double.NaN; Pop = double.NaN; DegreeOfConsolidationPorePressureSoil = double.NaN; DegreeOfConsolidationPorePressureLoad = double.NaN; Dilatancy = double.NaN; ExternalLoad = double.NaN; HydrostaticPorePressure = double.NaN; LeftForce = double.NaN; LeftForceAngle = double.NaN; LeftForceY = double.NaN; RightForce = double.NaN; RightForceAngle = double.NaN; RightForceY = double.NaN; LoadStress = double.NaN; NormalStress = double.NaN; PorePressure = double.NaN; HorizontalPorePressure = double.NaN; VerticalPorePressure = double.NaN; PiezometricPorePressure = double.NaN; EffectiveStress = double.NaN; EffectiveStressDaily = double.NaN; ExcessPorePressure = double.NaN; ShearStress = double.NaN; SoilStress = double.NaN; TotalPorePressure = double.NaN; TotalStress = double.NaN; Weight = double.NaN; } /// /// Gets or sets the cohesion. /// [kN/m²] /// public double Cohesion { internal get; set; } /// /// Gets or sets the friction angle. /// [°] /// public double FrictionAngle { internal get; set; } /// /// Gets or sets the critical pressure. /// [kN/m²] /// public double CriticalPressure { internal get; set; } /// /// Gets or sets the OCR. /// [-] /// public double OverConsolidationRatio { internal get; set; } /// /// Gets or sets the POP. /// [kN/m²] /// public double Pop { internal get; set; } /// /// Gets or sets the pore pressure from degree of consolidation soil. /// [kN/m²] /// public double DegreeOfConsolidationPorePressureSoil { internal get; set; } /// /// Gets or sets the pore pressure from degree of consolidation load. /// [kN/m²] /// public double DegreeOfConsolidationPorePressureLoad { internal get; set; } /// /// Gets or sets the dilatancy of the slice. /// public double Dilatancy { internal get; set; } /// /// Gets or sets the external load. /// [kN/m²] /// public double ExternalLoad { internal get; set; } /// /// Gets or sets the hydraostatic pore pressure. /// [kN/m²] /// public double HydrostaticPorePressure { internal get; set; } /// /// Gets or sets the left force. /// [kN/m²] /// public double LeftForce { internal get; set; } /// /// Gets or sets the left force angle. /// [°] /// public double LeftForceAngle { internal get; set; } /// /// Gets or sets the left force y. /// [kN/m²] /// public double LeftForceY { internal get; set; } /// /// Gets or sets the right force. /// [kN/m²] /// public double RightForce { internal get; set; } /// /// Gets or sets the right force angle. /// [°] /// public double RightForceAngle { internal get; set; } /// /// Gets or sets the right force y. /// [kN/m²] /// public double RightForceY { internal get; set; } /// /// Gets or sets the load stress. /// [kN/m²] /// public double LoadStress { internal get; set; } /// /// Gets or sets the normal stress. /// [kN/m²] /// public double NormalStress { internal get; set; } /// /// Gets or sets the pore pressure. /// [kN/m²] /// public double PorePressure { internal get; set; } /// /// Gets or sets the horizontal pore pressure. /// [kN/m²] /// public double HorizontalPorePressure { internal get; set; } /// /// Gets or sets the vertical pore pressure. /// [kN/m²] /// public double VerticalPorePressure { internal get; set; } /// /// Gets or sets the piezometric pore pressure. /// [kN/m²] /// public double PiezometricPorePressure { internal get; set; } /// /// Gets or sets the effective stress. /// [kN/m²] /// public double EffectiveStress { internal get; set; } /// /// Gets or sets the daily effective stress. /// [kN/m²] /// public double EffectiveStressDaily { internal get; set; } /// /// Gets or sets the excess pore pressure. /// [kN/m²] /// public double ExcessPorePressure { internal get; set; } /// /// Gets or sets the shear stress. /// [kN/m²] /// public double ShearStress { internal get; set; } /// /// Gets or sets the soil stress. /// [kN/m²] /// public double SoilStress { internal get; set; } /// /// Gets or sets the total pore pressure. /// [kN/m²] /// public double TotalPorePressure { internal get; set; } /// /// Gets or sets the total stress. /// [kN/m²] /// public double TotalStress { internal get; set; } /// /// Gets or sets the weight. /// [kN/m] /// public double Weight { internal get; set; } } } }