using System; // =========================================================================================== // Class name: // // Description: // // Copyright (c) 2008 Deltares // // Date ID Modification // 2008-04-03 Best Created // =========================================================================================== namespace Deltares.Stability.Calculation.Inner { public class TUniformLoad { private double FDistributionAngle = 0; private TLoadTypeSet FLoadType; private double FMagnitude = 0; private TPoints[] FSurfaceLine; private string FUniformLoadName = String.Empty; private double FXend = 0; private double FXstart = 0; public TUniformLoad() : base() { // TODO: Add any constructor code here } public string UniformLoadName { get { return FUniformLoadName; } set { FUniformLoadName = value; } } public double Magnitude { get { return FMagnitude; } set { FMagnitude = value; } } public double Xstart { get { return FXstart; } set { FXstart = value; } } public double Xend { get { return FXend; } set { FXend = value; } } public double DistributionAngle { get { return FDistributionAngle; } set { FDistributionAngle = value; } } public TLoadTypeSet LoadType { get { return FLoadType; } set { FLoadType = value; } } public TPoints[] SurfaceLine { get { return FSurfaceLine; } set { FSurfaceLine = value; } } // Private Declarations // =========================================================================================== // Date ID Modification // 2008-04-03 Best Created // =========================================================================================== public double GetStressAtPosition(double AX, double AY) { double result; const double CPir = Math.PI/180.0; double Ly1; double Ly2; double Ldx1; double Ldx2; double LLoadAfstand; // bepaal de y coordinaten van de belasting op het maaiveld Ly1 = MStabDatafunctions.ZTopAtSurface(FXstart, FSurfaceLine); Ly2 = MStabDatafunctions.ZTopAtSurface(FXend, FSurfaceLine); // bepaal de breedte van het spreidings oppervlak op de gewenste diepte Ldx1 = (Ly1 - AY)*Math.Tan(FDistributionAngle*CPir); Ldx2 = (Ly2 - AY)*Math.Tan(FDistributionAngle*CPir); if ((AX >= (FXstart - Ldx1)) && (AX <= (FXend + Ldx2))) { // indien de x in het spreidings gebied ligt dan meenemen LLoadAfstand = FXend - FXstart; if ((LLoadAfstand + Ldx1 + Ldx2) != 0.0) { result = FMagnitude*LLoadAfstand/(LLoadAfstand + Ldx1 + Ldx2); } else { result = 0.0; } } else { result = 0; } return result; } // =========================================================================================== // Date ID Modification // 2008-04-03 Best Created // =========================================================================================== public double GetMomentRoundX(double AX, double AXCircleEntry, double AXCircleExit) { double result; double LTotalLoad; double LXcl; double Lxcr; double LLoadL; double LloadR; double Lstart; double Leind; // Circelpunt links en rechts opsporen if ((AXCircleEntry < AXCircleExit)) { LXcl = AXCircleEntry; Lxcr = AXCircleExit; } else { Lxcr = AXCircleEntry; LXcl = AXCircleExit; } // Load punten links en rechts opsporen if ((FXstart < FXend)) { LLoadL = FXstart; LloadR = FXend; } else { LloadR = FXstart; LLoadL = FXend; } if ((Lxcr < LLoadL) || (LXcl > LloadR)) { result = 0; } else { Lstart = Math.Max(LXcl, LLoadL); Leind = Math.Min(Lxcr, LloadR); LTotalLoad = (Leind - Lstart)*-FMagnitude; result = LTotalLoad*((Lstart + Leind)/2.0 - AX); } return result; } } // end TUniformLoad }