using System; // =========================================================================================== // Class name: // // Description: // // Copyright (c) 1999-2008 Deltares // // Date ID Modification // 2008-04-07 Best Created // =========================================================================================== namespace Deltares.Stability.Calculation.Inner { public class TLineLoad { private double FDirectionAngle = 0; private double FDistributionAngle = 0; private string FLineLoadName = String.Empty; private double FMagnitude = 0; private double FX = 0; private double FZ = 0; public TLineLoad() : base() { // TODO: Add any constructor code here InitLineLoad(); } public string LineLoadName { get { return FLineLoadName; } set { FLineLoadName = value; } } public double Magnitude { get { return FMagnitude; } set { FMagnitude = value; } } public double X { get { return FX; } set { FX = value; } } public double Z { get { return FZ; } set { FZ = value; } } public double DirectionAngle { get { return FDirectionAngle; } set { FDirectionAngle = value; } } public double DistributionAngle { get { return FDistributionAngle; } set { FDistributionAngle = value; } } // Private Declarations // =========================================================================================== // Description: Determines the stress due to a lineload. // Indien de gepreide belasting van een puntlast // (gedeeltelijk) met een lamel samenvalt, dan wordt // die spaning bij de lamel opgeteld ( uitgesmeerd // over de hele lamel ; // // gespreide belasting // |---------------------| // geval // 1 |__________| |______________| // 2 |____________| // 3 |____________________________________| // 4 |_____________| // 5 |________________| // // Date ID Modification // 1999-03-05 Best Created // 2001-02-13 Tuk Replaced PointDistance2D with GetDistance2D. // =========================================================================================== public double GetStressAtLamel(double AX, double AZ, double AWidth) { double result; const double Pir = Math.PI/180; double xl; double xr; // ook indien een last op een gedeelte van de lamel komt double dz; double dx; // moet er rekening mee worden gehouden double dx1; double dx2; double LoadRight; double LoadLeft; double Stress; result = 0; xl = AX - AWidth/2; xr = AX + AWidth/2; dz = FZ - AZ; dx = dz*Math.Tan(FDistributionAngle*Pir); // de hoek met de vertikaal is positief! dus gezamelijke hoek als onderstaand dx1 = dz*Math.Tan((FDistributionAngle - FDirectionAngle)*Pir) + dx; dx2 = dz*Math.Tan((FDistributionAngle + FDirectionAngle)*Pir) - dx; LoadLeft = FX - dx - dx2; LoadRight = FX - dx + dx1; if (AZ >= FZ) { result = 0; } else { if ((FDistributionAngle == 0)) { // indien de lijnlast onder door de lamel gaat // wordt deze last verdeeld over de hele lamel if ((xl <= LoadLeft) && (xr >= LoadRight)) { result = Magnitude*Math.Sin((90.0 - FDirectionAngle)*Pir)/AWidth; } else { result = 0; } } else { Stress = FMagnitude*Math.Sin((90.0 - FDirectionAngle)*Pir)/(2.0*MStabDatafunctions.Distance2D(AX, AZ, FX, FZ)*Math.Tan(FDistributionAngle*Pir)); if (((LoadLeft >= xr) || (LoadRight <= xl))) { // geval 1 result = 0; } else { if ((xl <= LoadLeft)) { if ((xr < LoadRight)) { // geval 2 // lamel gedeeltelijk in spreidings gebied result = Stress*(xr - LoadLeft)/AWidth; } else { if ((xr >= LoadRight)) { // geval 3 // spreidings gebied geheel binnen lamel result = Magnitude*Math.Sin((90.0 - FDirectionAngle)*Pir)/AWidth; } } } else { if ((xl > LoadLeft)) { // gehele lamel binnen spreidings gebied if ((xr <= LoadRight)) { // geval 4 result = Stress; } else { // geval 5 result = Stress*(LoadRight - xl)/AWidth; } } } } } } return result; } public double GetMoment(double Xmid, double Zmid, double Radius, double xLeftSurface, double XRightSurface) { double result; const double CPir = Math.PI/180; double Ldx; double Ldz; double LSom; LSom = 0; Ldx = FX - Xmid; Ldz = Zmid - FZ; if ((FX > xLeftSurface) && (FX < XRightSurface) && (Math.Sqrt(Ldx*Ldx + Ldz*Ldz) < Radius)) { LSom = -Magnitude*Ldx*Math.Cos(FDirectionAngle*CPir); LSom = LSom - Magnitude*Ldz*Math.Sin(FDirectionAngle*CPir); } result = LSom; return result; } private void InitLineLoad() { FLineLoadName = "NoName"; FMagnitude = 0.0; FX = 0.0; FZ = 0.0; FDirectionAngle = 0.0; FDistributionAngle = 0.0; } } // end TLineLoad }