using System; using System.Collections.Generic; // ======================================================================================================================= // Class name: // // Description: Consists of all theslice data to use the drived properties make a call // to addCalculatedProperties befor a calculation is made // // Copyright (c) 1997-2008 Deltares // // Date ID Modification // 2008-03-31 Best Created // ======================================================================================================================= namespace Deltares.Stability.Calculation.Inner { public class Tslice : IComparable { // properties private double FAanpasPore = 0; private double FArclength = 0; private double FBottomAngle = 0; private double FCohBottom = 0; private double FCu = 0; private double FCuArea = 0; private double FCuAreaMom = 0; private double FDilatancy = 0; private double FEffectiveStress = 0; private double FEndResistanceMoment = 0; private double FExternalLoad = 0; private double FHPoreOnSurface = 0; private double FHorizontalQuakeforce = 0; private double FHydrostaticPore = 0; private int FInLayer = 0; private TInterfaceCalls FInterfaceCalls = null; private double FInterpolationFactorCu = 1; private bool FIsActive = true; private bool FIsInActiveArea = false; private bool FIsSelected = false; private double FK0 = 0; private int[] FLayersAbove; private double FLeftForce = double.NaN; private double FLeftForceAngle = double.NaN; private double FLeftForceZ = 0; private List FLineLoad = new List(); private double FLoadStress = 0; private double FNormalStress = 0; private int FNumber = 0; private double FPhiBottom = 0; private double FPnLinePore = 0; private double FPnLinePoreDeltaProb = 0; private double FPoreOnSurface = 0; private double FPreLoadStress = 0; private double FPseudoFactor = 0; private double FResultantAngle = double.NaN; private double FResultantForce = 0; private double FResultantMoment = 0; private double FResultantNorm = 0; private double FRightForce = double.NaN; private double FRightForceAngle = double.NaN; private double FRightforceZ = 0; private double FShearStress = 0; private double FSigmaAlfa = 0; private double FSigmaSoilQuake = 0; private double FSigmaWaterQuake = 0; private int FSoilGroupNumber = 0; private int FSoilNumber = -1; private int FSpanTabel = 0; private TMatStrengthTypeSet FStrengthType; private double FTmpSafety = 0; private double FTopAngle = 0; private double FTotUniformLoadStress = 0; private double FTotalPore = 0; private double FTotalStress = 0; private List FUniformLoad = new List(); private double FVPoreOnSurface = 0; private TVertical FVertical = null; private double FWaterLoadStress = 0; private double FWeight = 0; private double FWidth = 0; private double FXMid = 0; private double FXMidRotated = 0; private double FXRight = 0; private double FZBottomMid = 0; private double FZFrea = 0; private double FZTopMid = 0; private double FZwaartepunt = 0; private double FxLeft = 0; private double FzBottomLeft = 0; private double FzBottomRight = 0; private double FzTopLeft = 0; private double FzTopRight = 0; public Tslice() : base() {} public Tslice(Tslice aSlice) : base() { CopySliceData(aSlice); CreateGeometryItems(); } public int Number { get { return FNumber; } set { FNumber = value; } } public double xRight { get { return FXRight; } set { FXRight = value; } } public double xLeft { get { return FxLeft; } set { FxLeft = value; } } public double ZBottomRight { get { return FzBottomRight; } set { FzBottomRight = value; } } public double ZBottomLeft { get { return FzBottomLeft; } set { FzBottomLeft = value; } } public double ZTopRight { get { return FzTopRight; } set { FzTopRight = value; } } public double ZTopLeft { get { return FzTopLeft; } set { FzTopLeft = value; } } // number is old mstab public double XMid { get { return FXMid; } set { FXMid = value; } } // 1 public double ZBottomMid { get { return FZBottomMid; } set { FZBottomMid = value; } } // 2 public double ZTopMid { get { return FZTopMid; } set { FZTopMid = value; } } // 3 public double Width { get { return FWidth; } set { FWidth = value; } } // 4 public double BottomAngle { get { return FBottomAngle; } set { FBottomAngle = value; } } // 5 public double TopAngle { get { return FTopAngle; } set { FTopAngle = value; } } // 6 public double ArcLength { get { return FArclength; } set { FArclength = value; } } // 7 public double CohBottom { get { return FCohBottom; } set { FCohBottom = value; } } // 8 public double PhiBottom { get { return FPhiBottom; } set { FPhiBottom = value; } } // 9 public double Dilatancy { get { return FDilatancy; } set { FDilatancy = value; } } // 9 public double PoreOnSurface { get { return FPoreOnSurface; } set { FPoreOnSurface = value; } } // 10 public double ZFrea { get { return FZFrea; } set { FZFrea = value; } } // 10 public double HPoreOnSurface { get { return FHPoreOnSurface; } set { FHPoreOnSurface = value; } } // 11 public double VPoreOnSurface { get { return FVPoreOnSurface; } set { FVPoreOnSurface = value; } } // 12 public double Weight { get { return FWeight; } set { FWeight = value; } } // 13 public double ExternalLoad { get { return FExternalLoad; } set { FExternalLoad = value; } } public double TotalStress { get { return FTotalStress; } set { FTotalStress = value; } } // 14 public double EffectiveStress { get { return FEffectiveStress; } set { FEffectiveStress = value; } } // 15 public double HydrostaticPore { get { return FHydrostaticPore; } set { FHydrostaticPore = value; } } // 16 public double ExcessPore { get { return GetExcessPore(); } } // 17 public double AanpasPore { get { return FAanpasPore; } set { FAanpasPore = value; } } // 18 public double PnLinePore { get { return FPnLinePore; } set { FPnLinePore = value; } } // 18 public double PnLinePoreDeltaProb { get { return FPnLinePoreDeltaProb; } set { FPnLinePoreDeltaProb = value; } } public double SigmaWaterQuake { get { return FSigmaWaterQuake; } set { FSigmaWaterQuake = value; } } public double SigmaSoilQuake { get { return FSigmaSoilQuake; } set { FSigmaSoilQuake = value; } } public double HorizontalQuakeforce { get { return FHorizontalQuakeforce; } set { FHorizontalQuakeforce = value; } } public double WaterLoadStress { get { return FWaterLoadStress; } set { FWaterLoadStress = value; } } public double TotAanpasPore { get { return GetTotAanpasPore(); } } public double TotUniformLoadStress { get { return FTotUniformLoadStress; } set { FTotUniformLoadStress = value; } } public double TotalPore { get { return FTotalPore; } set { FTotalPore = value; } } // 18 public double ShearStress { get { return FShearStress; } set { FShearStress = value; } } // 19 public double NormalStress { get { return FNormalStress; } set { FNormalStress = value; } } public double Cu { get { return FCu; } set { FCu = value; } } // 20 public double K0 { get { return FK0; } set { FK0 = value; } } // 21 public double PreLoadStress { get { return FPreLoadStress; } set { FPreLoadStress = value; } } // 22 public double LoadStress { get { return FLoadStress; } set { FLoadStress = value; } } // 23 public double SigmaAlfa { get { return FSigmaAlfa; } set { FSigmaAlfa = value; } } // 24 public double Zwaartepunt { get { return FZwaartepunt; } set { FZwaartepunt = value; } } // 26 public double PseudoFactor { get { return FPseudoFactor; } set { FPseudoFactor = value; } } // 28 public int InLayer { get { return FInLayer; } set { FInLayer = value; } } public int SpanTabel { get { return FSpanTabel; } set { FSpanTabel = value; } } public int SoilNumber { get { return FSoilNumber; } set { FSoilNumber = value; } } public int[] LayersAbove { get { return FLayersAbove; } set { FLayersAbove = value; } } public TMatStrengthTypeSet StrengthType { get { return FStrengthType; } set { FStrengthType = value; } } public double InterpolationFactorCu { get { return FInterpolationFactorCu; } set { FInterpolationFactorCu = value; } } public int SoilGroupNumber { get { return FSoilGroupNumber; } set { FSoilGroupNumber = value; } } public double EndResistanceMoment { get { return FEndResistanceMoment; } set { FEndResistanceMoment = value; } } // interlamel data ten behoeve van spencer public double LeftForce { get { return FLeftForce; } set { FLeftForce = value; } } public double RightForce { get { return FRightForce; } set { FRightForce = value; } } public double LeftForceZ { get { return FLeftForceZ; } set { FLeftForceZ = value; } } public double RightforceZ { get { return FRightforceZ; } set { FRightforceZ = value; } } public double LeftForceAngle { get { return FLeftForceAngle; } set { FLeftForceAngle = value; } } public double RightForceAngle { get { return FRightForceAngle; } set { FRightForceAngle = value; } } public double ResultantNorm { get { return FResultantNorm; } set { FResultantNorm = value; } } public double ResultantForce { get { return FResultantForce; } set { FResultantForce = value; } } public double ResultantMoment { get { return FResultantMoment; } set { FResultantMoment = value; } } public double ResultantAngle { get { return FResultantAngle; } set { FResultantAngle = value; } } public double TmpSafety { get { return FTmpSafety; } set { FTmpSafety = value; } } public bool IsSelected { get { return FIsSelected; } set { FIsSelected = value; } } public bool IsInActiveArea { get { return FIsInActiveArea; } set { FIsInActiveArea = value; } } // Data ten behoeve van rotated zone plots public bool IsActive { get { return FIsActive; } set { FIsActive = value; } } public double XMidRotated { get { return FXMidRotated; } set { FXMidRotated = value; } } public double UPLift { get { return GetUpLift(); } } public TVertical Vertical { get { return FVertical; } set { FVertical = value; } } // data for side effect public double CuArea { get { return FCuArea; } set { FCuArea = value; } } public double CuAreaMom { get { return FCuAreaMom; } set { FCuAreaMom = value; } } public TInterfaceCalls InterfaceCalls { get { return FInterfaceCalls; } set { FInterfaceCalls = value; } } public List UniformLoad { get { return FUniformLoad; } } public List LineLoad { get { return FLineLoad; } } // Private Declarations // internal data // ======================================================================================================================= // Date ID Modification // 2000-04-17 Best Created // ======================================================================================================================= public void CopySliceData(Tslice aSlice) { if (aSlice != null) { FNumber = aSlice.Number; FXRight = aSlice.xRight; FxLeft = aSlice.xLeft; FzBottomRight = aSlice.ZBottomRight; FzBottomLeft = aSlice.ZBottomLeft; FzTopRight = aSlice.ZTopRight; FzTopLeft = aSlice.ZTopLeft; FPhiBottom = aSlice.PhiBottom; FDilatancy = aSlice.Dilatancy; FCohBottom = aSlice.CohBottom; FPoreOnSurface = aSlice.PoreOnSurface; FHPoreOnSurface = aSlice.HPoreOnSurface; FVPoreOnSurface = aSlice.VPoreOnSurface; FWeight = aSlice.Weight; FExternalLoad = aSlice.ExternalLoad; FTotalStress = aSlice.TotalStress; FEffectiveStress = aSlice.EffectiveStress; FPreLoadStress = aSlice.PreLoadStress; FZFrea = aSlice.ZFrea; FHydrostaticPore = aSlice.HydrostaticPore; FTotalPore = aSlice.TotalPore; FPnLinePoreDeltaProb = aSlice.PnLinePoreDeltaProb; FAanpasPore = aSlice.AanpasPore; FPnLinePore = aSlice.PnLinePore; FSigmaWaterQuake = aSlice.SigmaWaterQuake; FSigmaSoilQuake = aSlice.SigmaSoilQuake; FHorizontalQuakeforce = aSlice.HorizontalQuakeforce; HydrostaticPore = aSlice.HydrostaticPore; FWaterLoadStress = aSlice.WaterLoadStress; FShearStress = aSlice.ShearStress; FNormalStress = aSlice.NormalStress; FCu = aSlice.Cu; FK0 = aSlice.K0; FLoadStress = aSlice.LoadStress; FSigmaAlfa = aSlice.SigmaAlfa; FZwaartepunt = aSlice.Zwaartepunt; FPseudoFactor = aSlice.PseudoFactor; FInLayer = aSlice.InLayer; FSpanTabel = aSlice.SpanTabel; FSoilNumber = aSlice.SoilNumber; FLayersAbove = aSlice.LayersAbove; FLeftForce = aSlice.LeftForce; FRightForce = aSlice.RightForce; FLeftForceZ = aSlice.LeftForceZ; FRightforceZ = aSlice.RightforceZ; FLeftForceAngle = aSlice.LeftForceAngle; FRightForceAngle = aSlice.RightForceAngle; FTmpSafety = aSlice.TmpSafety; FIsInActiveArea = aSlice.IsInActiveArea; FIsActive = aSlice.IsActive; FXMidRotated = aSlice.XMidRotated; FStrengthType = aSlice.StrengthType; FInterpolationFactorCu = aSlice.InterpolationFactorCu; FSoilGroupNumber = aSlice.SoilGroupNumber; FEndResistanceMoment = aSlice.EndResistanceMoment; } else { InitSliceData(); } } // ======================================================================================================================= // Date ID Modification // 1997-06-20 Best Created // ======================================================================================================================= //Constructor CreateAndCopy( aSlice) // (* // {======================================================================================================================= // Date ID Modification // 2008-11-27 Best Created // =======================================================================================================================} // procedure Tslice.CalculateUniformLoadStresses; // var // j: integer; // LNloads: integer; // LUnifLoadstress: Double; // LDocLoads: array of double; // LAanpas: Double; // begin // LNLoads := length(FUniformLoad); // { spanningen tgv uniform loads } // FTotUniformLoadStress := 0; // FWaterLoadStress := 0; // FInterfaceCalls.FetchDegreeOfconsolidationLoads(LDocLoads); // for j := 1 to LNLoads do // with FUniformLoad[j-1] do // begin // LUnifLoadstress := GetStressAtPosition(XMid, ZBottomMid); // // { bepaal de wateroverspanning tgv tmp loads } // if (LoadType = Temporary) then // begin // if (ZBottomMid < ZFrea) { or (MyGlobals.CapillairLoad)} then // begin // LAanpas := LDocLoads[FNumber - 1]; // FWaterLoadStress := FWaterloadStress + (1 - LAanpas) * LUnifLoadstress; // end; // end; // FTotUniformLoadStress := FTotUniformLoadStress + LUnifLoadStress; // end; // // { de external load hoeft vanwege de spannings spreiding niet gelijk te zijn // aan load stress } // ExternalLoad := TotUniformLoadStress * width; // // { spanningen tgv point-loads } // PointStress := 0.0; // for j := 1 to MyGlobals.NLineLoads do // with MyGlobals.LineLoads[j] do // PointStress := PointStress + GetStressAtLamel(XMid, YBottomMid, Width); // // end; // *) // ======================================================================================================================= // Date ID Modification // 2008-11-27 Best Created // ======================================================================================================================= public void CreateGeometryItems() { FXMid = GetXMid(); FZBottomMid = GetZBotMid(); FZTopMid = GetZTopMid(); FWidth = GetWidth(); FBottomAngle = GetBottomAngle(); FTopAngle = GetTopAngle(); FArclength = GetArcLength(); } // (* // {======================================================================================================================= // Date ID Modification // 2008-11-27 Best Created // =======================================================================================================================} // procedure Tslice.DetermineStresses; // begin // FAanpasPore := FInterfaceCalls.DeterminePorePressureDegreeOfConsolidationLayers(FXMid, FZBottomMid); // FPnLinePore := FInterfaceCalls.DeterminePorePressurePiezometricLevels(FXMid, FZBottomMid); // CalculateUniformLoadStresses; // FExcessPore := GetExcessPore; // FTotAanpasPore := GetTotAanpasPore; // end; // *) // ======================================================================================================================= // Description Properties below were filled with set option // To speed things up calculate them once before // a calculation; // // Date ID Modification // 2008-03-31 Best Created // ======================================================================================================================= public void addCalculatedProperties() { CreateGeometryItems(); // DetermineStresses; // FUplift := GetUplift; } // methods for spencer // ======================================================================================================================= // Date ID Modification // 1999-04-16 Best Created // ======================================================================================================================= public double GetRightForce() { double result; double FictiveWeigth; double Noemer; double Teller; double WaterForce; FictiveWeigth = FWeight + FExternalLoad + FSigmaSoilQuake*Width; WaterForce = FPoreOnSurface*Width; Noemer = Math.Cos(-BottomAngle - FRightForceAngle) + Math.Tan(FPhiBottom*slice.rad)*Math.Sin(-BottomAngle - FRightForceAngle)/FTmpSafety; Teller = WaterForce*Math.Sin(-BottomAngle + TopAngle) + FictiveWeigth*Math.Sin(-BottomAngle) + FHorizontalQuakeforce*Math.Cos(-BottomAngle) - FCohBottom*ArcLength/FTmpSafety - Math.Tan(FPhiBottom*slice.rad)/FTmpSafety*(WaterForce*Math.Cos(-BottomAngle + TopAngle) + FictiveWeigth*Math.Cos(-BottomAngle) - FHorizontalQuakeforce*Math.Sin(-BottomAngle) - TotalPore*ArcLength) + FLeftForce*(Math.Cos(-BottomAngle - FLeftForceAngle) + Math.Tan(FPhiBottom*slice.rad)*Math.Sin(-BottomAngle - FLeftForceAngle)/FTmpSafety); result = Teller/Noemer; return result; } // ======================================================================================================================= // Description: Berekend de positie van de interlamel kracht aan de rechter kant // op basis van momenten evenwicht. // // Pre-condition : De vaste lamel gegevens moeten bekend zijn, // en er moet een waarde (of aanname) voor de linker interlamelkracht // en de hoek die de interlamel kracht maakt zijn. // // Date ID Modification // 1999-04-16 Best Created // ======================================================================================================================= public double GetRightForceZ() { double result; double WaterForce; WaterForce = FPoreOnSurface*Width; // momenten evenwicht result = FRightForce*Math.Cos(FRightForceAngle); if ((result != 0)) { result = ZBottomMid + (FLeftForce*Math.Cos(FLeftForceAngle)*(FLeftForceZ - ZBottomMid) - FLeftForce*Math.Sin(FLeftForceAngle)*0.5*Width - FRightForce*Math.Sin(FRightForceAngle) *0.5*Width - FHorizontalQuakeforce*(FZwaartepunt - ZBottomMid) - WaterForce*Math.Sin(-TopAngle)*(ZTopMid - ZBottomMid))/result; } // point of application must be on slice side // result := System.Math.Max(Result, ZBottomMid); return result; } // ======================================================================================================================= // Date ID Modification // 2008-03-31 Best Created // ======================================================================================================================= public double GetSoilMoment(double aCentre) { double result; result = (XMid - aCentre)*(FWeight - FPoreOnSurface*Width); return result; } public void DetermineResultantMoment() { //{ Moment of external loadings around the base midpoint } FResultantMoment = FHorizontalQuakeforce*(FZwaartepunt - FZBottomMid) + HPoreOnSurface*(FZTopMid - FZBottomMid); } /// /// DetermineResultantNorm per slice /// public void DetermineResultantNorm() //================================== { double LFictiveWeigth; double LWaterForce; double LPhiBottom; //{ See equation (3) } LFictiveWeigth = FWeight + FExternalLoad + FSigmaSoilQuake*FWidth; LWaterForce = FPoreOnSurface*FWidth/Math.Cos(-FTopAngle); LPhiBottom = Math.Atan(Math.Tan(FPhiBottom*Constants.CDegreeToRad)/FTmpSafety); //{ Note, that Spencer's theory considers the crest at the right hand side, while the MStab code applies it left. // Consequently, Right corresponds to index n-1, Left to index n. Moment and resultant force get opposite sign. } FResultantNorm = LWaterForce*Math.Sin(-FBottomAngle + FTopAngle - LPhiBottom) + LFictiveWeigth*Math.Sin(-BottomAngle - LPhiBottom) + FHorizontalQuakeforce*Math.Cos(-BottomAngle - LPhiBottom) - FCohBottom*ArcLength/FTmpSafety*Math.Cos(LPhiBottom) + FTotalPore*ArcLength*Math.Sin(LPhiBottom); } public void DetermineResultantForce() //======================================= { double LPhiBottom; //{ See equation (3) } LPhiBottom = Math.Atan(Math.Tan(FPhiBottom*Constants.CDegreeToRad)/FTmpSafety); FResultantForce = FResultantNorm/Math.Cos(-BottomAngle - LPhiBottom - FResultantAngle); } public void DetermineInterSliceForces() //======================================= { // See equation (10) } // Nte, that Spencer's theory considers the crest at the right hand side, while the MStab code applies it left. // Consequently, Right corresponds to index n-1, Left to index n. Moment and resultant force get opposite sign. } FRightForce = FLeftForce + FResultantForce; FRightforceZ = (FResultantMoment + FLeftForce*Math.Cos(FResultantAngle)*(FLeftForceZ - FZBottomMid) - (FLeftForce + FRightForce)*Math.Sin(FResultantAngle)*FWidth/2.0)/FRightForce/ Math.Cos(FResultantAngle) + FZBottomMid; FRightForceAngle = FResultantAngle; } public int CompareTo(object obj) //======================================= { return xLeft.CompareTo(((Tslice) obj).xLeft); } private void InitSliceData() { FXRight = 0.0; FxLeft = 0.0; FzBottomRight = 0.0; FzBottomLeft = 0.0; FzTopRight = 0.0; FzTopLeft = 0.0; FPhiBottom = 0.0; Dilatancy = 0.0; FCohBottom = 0.0; FPoreOnSurface = 0.0; FHPoreOnSurface = 0.0; FVPoreOnSurface = 0.0; FWeight = 0.0; FPnLinePore = 0.0; FAanpasPore = 0.0; FSigmaWaterQuake = 0.0; FSigmaSoilQuake = 0.0; FHorizontalQuakeforce = 0.0; FWaterLoadStress = 0.0; FExternalLoad = 0.0; FTotalStress = 0.0; FEffectiveStress = 0.0; FPreLoadStress = 0.0; FHydrostaticPore = 0.0; FTotalPore = 0.0; FPnLinePoreDeltaProb = 0; ShearStress = 0.0; NormalStress = 0.0; Cu = 0.0; K0 = 0.0; LoadStress = 0.0; SigmaAlfa = 0.0; PseudoFactor = 0.0; InLayer = 0; SpanTabel = 0; SoilNumber = -1; LeftForce = double.NaN; RightForce = double.NaN; LeftForceZ = 0; RightforceZ = 0; LeftForceAngle = 0; RightForceAngle = 0; TmpSafety = 0; FIsSelected = false; FIsActive = true; FXMidRotated = 0; FInterpolationFactorCu = 1; FSoilGroupNumber = 0; FEndResistanceMoment = 0; } private double GetXMid() { double result; result = (FxLeft + FXRight)/2.0; return result; } // ======================================================================================================================= // Date ID Modification // 1997-06-20 Best Created // ======================================================================================================================= private double GetZBotMid() { double result; result = (FzBottomLeft + FzBottomRight)/2.0; return result; } // ======================================================================================================================= // Date ID Modification // 1997-06-20 Best Created // ======================================================================================================================= private double GetZTopMid() { double result; result = (FzTopLeft + FzTopRight)/2.0; return result; } // ======================================================================================================================= // Date ID Modification // 1997-06-20 Best Created // ======================================================================================================================= private double GetWidth() { double result; result = Math.Abs(FXRight - FxLeft); return result; } // ======================================================================================================================= // Date ID Modification // 1997-06-20 Best Created // ======================================================================================================================= private double GetBottomAngle() { double result; try { result = Math.Atan2((FzBottomRight - FzBottomLeft), (FXRight - FxLeft)); } catch { result = Math.PI/2.0; } return result; } // ======================================================================================================================= // Date ID Modification // 1997-06-20 Best Created // ======================================================================================================================= private double GetTopAngle() { double result; try { result = Math.Atan2((FzTopRight - FzTopLeft), (FXRight - FxLeft)); } catch { result = Math.PI/2; } return result; } // ======================================================================================================================= // Date ID Modification // 1997-06-20 Best Created // ======================================================================================================================= private double GetArcLength() { double result; result = Math.Sqrt(Math.Pow(FzBottomRight - FzBottomLeft, 2) + Math.Pow(FXRight - FxLeft, 2)); return result; } // ======================================================================================================================= // Date ID Modification // 1997-06-20 Best Created // ======================================================================================================================= private double GetExcessPore() { double result; result = FTotalPore - FHydrostaticPore; return result; } // procedure CalculateUniformLoadStresses; // ======================================================================================================================= // Date ID Modification // 1997-06-20 Best Created // ======================================================================================================================= private double GetUpLift() { double result; if ((FTotalPore > 0)) { result = FTotalStress/FTotalPore; } else { result = 100; } return result; } // ======================================================================================================================= // Date ID Modification // 1997-06-20 Best Created // ======================================================================================================================= private double GetTotAanpasPore() { double result; result = FWaterLoadStress + FAanpasPore; return result; } } // end Tslice } namespace Deltares.Stability.Calculation.Inner { public class slice { // Next const is accuracy amongst parameters public const double diff = 0.001; public const double rad = Math.PI/180; } // end slice }