using System; // ======================================================================================================================= // Class name: // // Description: // // Copyright (c) 2008-2010 Deltares // // Date ID Modification // 2008-04-01 Best Created // ======================================================================================================================= namespace Deltares.Stability.Calculation.Inner { public class TStabSoilData { private TStressTable FBondStressTable = null; private string FBondStressTableName = String.Empty; private int FBondStressTableNr = 0; private TCalculationOptions FCalculationOptions; private double FCohesion = 0; private double FCorrelationCPhi = 0; private double FCuActiveBottom = 0; private double FCuActiveTop = 0; private double FCuBottom = 0; private double FCuGradient = 0; private double FCuPassiveBottom = 0; private double FCuPassiveTop = 0; private double FCuTop = 0; private double FDesignPartialCohesion = 0; private double FDesignPartialCu = 0; private double FDesignPartialPOP = 0; private double FDesignPartialPhi = 0; private double FDesignPartialRRatio = 0; private double FDesignPartialRatioCuPc = 0; private double FDesignPartialStressTable = 0; private double FDesignStdCohesion = 0; private double FDesignStdCu = 0; private double FDesignStdPOP = 0; private double FDesignStdPhi = 0; private double FDesignStdRRatio = 0; private double FDesignStdRatioCuPc = 0; private double FDesignStdStressTable = 0; private double FDilatancy = 0; private TDistributionTypeSet FDistCohesion; private TDistributionTypeSet FDistCu; private TDistributionTypeSet FDistCuGradient; private TDistributionTypeSet FDistCuTop; private TDistributionTypeSet FDistPOP; private TDistributionTypeSet FDistPhi; private TDistributionTypeSet FDistPn; private TDistributionTypeSet FDistRRatio; private TDistributionTypeSet FDistRatioCuPc; private TDistributionTypeSet FDistRatioCuPcActive; private TDistributionTypeSet FDistRatioCuPcPassive; private TDistributionTypeSet FDistStressTable; private double FExcessPorePressure = 0; private double FFormReferencePn = 0; private double FGamDry = 0; private double FGamWet = 0; private double FHorFluctScaleCoh = 0; private double FHorFluctScalePhi = 0; private bool FIsUniformCu = false; private bool FIsUniformRatioCuPc = false; private TMatStrengthTypeSet FMaterialStrength; private TModelData FModelData; private string FName = String.Empty; private double FNumberOfTestsCoh = 0; private double FNumberOfTestsPhi = 0; private double FPOP = 0; private double FPhi = 0; private double FPorePressureFactor = 0; private TProbInputValuesSet FProbInputValues; private double FRRatio = 0; private double FRatioCuPc = 0; private double FRatioCuPcActive = 0; private double FRatioCuPcPassive = 0; private double FRestSlope = 0; private double FRheologicalCoefficient = 0; private int FSoilGroup = 0; private TSoilTypeSet FSoilType = TSoilTypeSet.stClay; private double FStdCohesion = 0; private double FStdCu = 0; private double FStdCuGradient = 0; private double FStdCuTop = 0; private double FStdPOP = 0; private double FStdPhi = 0; private double FStdPn = 0; private double FStdRRatio = 0; private double FStdRatioCuPc = 0; private double FStdRatioCuPcActive = 0; private double FStdRatioCuPcPassive = 0; private TStressTable FStressTable = null; private string FStressTableName = String.Empty; private int FStressTableNr = 0; private double FStresstableFactor = 0; private bool FUseProbDefaults = false; private double FUseSoilType = 0; private double FVarianceRatioCoh = 0; private double FVarianceRatioPhi = 0; private double FVertFluctScaleCoh = 0; private double FVertFluctScalePhi = 0; public TStabSoilData() : base() {} // ======================================================================================================================= // Date ID Modification // 2008-04-01 Best Created // ======================================================================================================================= //Constructor CreateAndCopy( AStabSoilData) public TStabSoilData(TStabSoilData AStabSoilData) : this() { Copy(AStabSoilData); } public string Name { get { return FName; } set { FName = value; } } public TStressTable StressTable { get { return FStressTable; } set { FStressTable = value; } } public TStressTable BondStressTable { get { return FBondStressTable; } set { FBondStressTable = value; } } public TMatStrengthTypeSet MaterialStrength { get { return FMaterialStrength; } set { FMaterialStrength = value; } } public double ExcessPorePressure { get { return FExcessPorePressure; } set { FExcessPorePressure = value; } } public double PorePressureFactor { get { return FPorePressureFactor; } set { FPorePressureFactor = value; } } public double GamDry { get { return FGamDry; } set { FGamDry = value; } } public double GamWet { get { return FGamWet; } set { FGamWet = value; } } public double RestSlope { get { return FRestSlope; } set { FRestSlope = value; } } public double Cohesion { get { return FCohesion; } set { FCohesion = value; } } public double Phi { get { return FPhi; } set { FPhi = value; } } public double Dilatancy { get { return FDilatancy; } set { FDilatancy = value; } } public double RatioCuPc { get { return FRatioCuPc; } set { FRatioCuPc = value; } } public double CuTop { get { return FCuTop; } set { FCuTop = value; } } public double CuBottom { get { return FCuBottom; } set { FCuBottom = value; } } public double CuGradient { get { return FCuGradient; } set { FCuGradient = value; } } public string StressTableName { get { return FStressTableName; } set { FStressTableName = value; } } public int StressTableNr { get { return FStressTableNr; } set { FStressTableNr = value; } } public string BondStressTableName { get { return FBondStressTableName; } set { FBondStressTableName = value; } } public int BondStressTableNr { get { return FBondStressTableNr; } set { FBondStressTableNr = value; } } public TProbInputValuesSet ProbInputValues { get { return FProbInputValues; } set { FProbInputValues = value; } } public bool UseProbDefaults { get { return FUseProbDefaults; } set { FUseProbDefaults = value; } } // Standard deviation public double StdCohesion { get { return FStdCohesion; } set { FStdCohesion = value; } } public double StdPhi { get { return FStdPhi; } set { FStdPhi = value; } } public double StdRatioCuPc { get { return FStdRatioCuPc; } set { FStdRatioCuPc = value; } } public double StdRatioCuPcPassive { get { return FStdRatioCuPcPassive; } set { FStdRatioCuPcPassive = value; } } public double StdRatioCuPcActive { get { return FStdRatioCuPcActive; } set { FStdRatioCuPcActive = value; } } public double StdCu { get { return FStdCu; } set { FStdCu = value; } } public double StdCuTop { get { return FStdCuTop; } set { FStdCuTop = value; } } public double StdCuGradient { get { return FStdCuGradient; } set { FStdCuGradient = value; } } public double StdPn { get { return FStdPn; } set { FStdPn = value; } } public double StdPOP { get { return FStdPOP; } set { FStdPOP = value; } } public double StdRRatio { get { return FStdRRatio; } set { FStdRRatio = value; } } // Distribution public TDistributionTypeSet DistCohesion { get { return FDistCohesion; } set { FDistCohesion = value; } } public TDistributionTypeSet DistPhi { get { return FDistPhi; } set { FDistPhi = value; } } public TDistributionTypeSet DistStressTable { get { return FDistStressTable; } set { FDistStressTable = value; } } public TDistributionTypeSet DistRatioCuPc { get { return FDistRatioCuPc; } set { FDistRatioCuPc = value; } } public TDistributionTypeSet DistRatioCuPcPassive { get { return FDistRatioCuPcPassive; } set { FDistRatioCuPcPassive = value; } } public TDistributionTypeSet DistRatioCuPcActive { get { return FDistRatioCuPcActive; } set { FDistRatioCuPcActive = value; } } public TDistributionTypeSet DistCu { get { return FDistCu; } set { FDistCu = value; } } public TDistributionTypeSet DistCuTop { get { return FDistCuTop; } set { FDistCuTop = value; } } public TDistributionTypeSet DistCuGradient { get { return FDistCuGradient; } set { FDistCuGradient = value; } } public TDistributionTypeSet DistPn { get { return FDistPn; } set { FDistPn = value; } } public TDistributionTypeSet DistPOP { get { return FDistPOP; } set { FDistPOP = value; } } public TDistributionTypeSet DistRRatio { get { return FDistRRatio; } set { FDistRRatio = value; } } // porepressure has a default of 0 this is put in formreference public double FormReferencePn { get { return FFormReferencePn; } set { FFormReferencePn = value; } } public double CorrelationCPhi { get { return FCorrelationCPhi; } set { FCorrelationCPhi = value; } } public double POP { get { return FPOP; } set { FPOP = value; } } public double RatioCuPcPassive { get { return FRatioCuPcPassive; } set { FRatioCuPcPassive = value; } } public double RatioCuPcActive { get { return FRatioCuPcActive; } set { FRatioCuPcActive = value; } } public double CuPassiveTop { get { return FCuPassiveTop; } set { FCuPassiveTop = value; } } public double CuPassiveBottom { get { return FCuPassiveBottom; } set { FCuPassiveBottom = value; } } public double CuActiveTop { get { return FCuActiveTop; } set { FCuActiveTop = value; } } public double CuActiveBottom { get { return FCuActiveBottom; } set { FCuActiveBottom = value; } } public bool IsUniformRatioCuPc { get { return FIsUniformRatioCuPc; } set { FIsUniformRatioCuPc = value; } } public bool IsUniformCu { get { return FIsUniformCu; } set { FIsUniformCu = value; } } public double DesignPartialCohesion { get { return FDesignPartialCohesion; } set { FDesignPartialCohesion = value; } } public double DesignStdCohesion { get { return FDesignStdCohesion; } set { FDesignStdCohesion = value; } } public double DesignPartialPhi { get { return FDesignPartialPhi; } set { FDesignPartialPhi = value; } } public double DesignStdPhi { get { return FDesignStdPhi; } set { FDesignStdPhi = value; } } public double DesignPartialStressTable { get { return FDesignPartialStressTable; } set { FDesignPartialStressTable = value; } } public double DesignStdStressTable { get { return FDesignStdStressTable; } set { FDesignStdStressTable = value; } } public double DesignPartialRatioCuPc { get { return FDesignPartialRatioCuPc; } set { FDesignPartialRatioCuPc = value; } } public double DesignStdRatioCuPc { get { return FDesignStdRatioCuPc; } set { FDesignStdRatioCuPc = value; } } public double DesignPartialCu { get { return FDesignPartialCu; } set { FDesignPartialCu = value; } } public double DesignStdCu { get { return FDesignStdCu; } set { FDesignStdCu = value; } } public double DesignPartialPOP { get { return FDesignPartialPOP; } set { FDesignPartialPOP = value; } } public double DesignStdPOP { get { return FDesignStdPOP; } set { FDesignStdPOP = value; } } public double DesignPartialRRatio { get { return FDesignPartialRRatio; } set { FDesignPartialRRatio = value; } } public double DesignStdRRatio { get { return FDesignStdRRatio; } set { FDesignStdRRatio = value; } } public int SoilGroup { get { return FSoilGroup; } set { FSoilGroup = value; } } public double HorFluctScaleCoh { get { return FHorFluctScaleCoh; } set { FHorFluctScaleCoh = value; } } public double VertFluctScaleCoh { get { return FVertFluctScaleCoh; } set { FVertFluctScaleCoh = value; } } public double NumberOfTestsCoh { get { return FNumberOfTestsCoh; } set { FNumberOfTestsCoh = value; } } public double VarianceRatioCoh { get { return FVarianceRatioCoh; } set { FVarianceRatioCoh = value; } } public double HorFluctScalePhi { get { return FHorFluctScalePhi; } set { FHorFluctScalePhi = value; } } public double VertFluctScalePhi { get { return FVertFluctScalePhi; } set { FVertFluctScalePhi = value; } } public double NumberOfTestsPhi { get { return FNumberOfTestsPhi; } set { FNumberOfTestsPhi = value; } } public double VarianceRatioPhi { get { return FVarianceRatioPhi; } set { FVarianceRatioPhi = value; } } public double UseSoilType { get { return FUseSoilType; } set { FUseSoilType = value; } } public TSoilTypeSet SoilType { get { return FSoilType; } set { FSoilType = value; } } public double RRatio { get { return FRRatio; } set { FRRatio = value; } } public double RheologicalCoefficient { get { return FRheologicalCoefficient; } set { FRheologicalCoefficient = value; } } // Factor used with probabilistic calculation public double StresstableFactor { get { return FStresstableFactor; } set { FStresstableFactor = value; } } // No soil data but Input data from interface public TModelData ModelData { get { return FModelData; } set { FModelData = value; } } public TCalculationOptions CalculationOptions { get { return FCalculationOptions; } set { FCalculationOptions = value; } } // Private Declarations // ======================================================================================================================= // Date ID Modification // 2008-04-01 Best Created // ======================================================================================================================= public void Copy(TStabSoilData AStabSoilData) { if ((AStabSoilData != null)) { FName = AStabSoilData.Name; FStressTable = AStabSoilData.FStressTable; FBondStressTable = AStabSoilData.FBondStressTable; FMaterialStrength = AStabSoilData.MaterialStrength; FExcessPorePressure = AStabSoilData.ExcessPorePressure; FPorePressureFactor = AStabSoilData.PorePressureFactor; FGamDry = AStabSoilData.GamDry; FGamWet = AStabSoilData.GamWet; FRestSlope = AStabSoilData.RestSlope; FCohesion = AStabSoilData.Cohesion; FPhi = AStabSoilData.Phi; FDilatancy = AStabSoilData.Dilatancy; FRatioCuPc = AStabSoilData.RatioCuPc; FCuTop = AStabSoilData.CuTop; FCuBottom = AStabSoilData.CuBottom; FCuGradient = AStabSoilData.CuGradient; FStressTableName = AStabSoilData.StressTableName; FStressTableNr = AStabSoilData.StressTableNr; FBondStressTableName = AStabSoilData.BondStressTableName; FBondStressTableNr = AStabSoilData.BondStressTableNr; FProbInputValues = AStabSoilData.ProbInputValues; FUseProbDefaults = AStabSoilData.UseProbDefaults; FStdCohesion = AStabSoilData.StdCohesion; FStdPhi = AStabSoilData.StdPhi; FStdRatioCuPc = AStabSoilData.StdRatioCuPc; FStdRatioCuPcPassive = AStabSoilData.StdRatioCuPcPassive; FStdRatioCuPcActive = AStabSoilData.StdRatioCuPcActive; FStdCu = AStabSoilData.StdCu; FStdCuTop = AStabSoilData.StdCuTop; FStdCuGradient = AStabSoilData.StdCuGradient; FStdPn = AStabSoilData.StdPn; FStdPOP = AStabSoilData.StdPOP; FStdRRatio = AStabSoilData.StdRRatio; FDistCohesion = AStabSoilData.DistCohesion; FDistPhi = AStabSoilData.DistPhi; FDistStressTable = AStabSoilData.DistStressTable; FDistRatioCuPc = AStabSoilData.DistRatioCuPc; FDistRatioCuPcPassive = AStabSoilData.DistRatioCuPcPassive; FDistRatioCuPcActive = AStabSoilData.DistRatioCuPcActive; FDistCu = AStabSoilData.DistCu; FDistCuTop = AStabSoilData.DistCuTop; FDistCuGradient = AStabSoilData.DistCuGradient; FDistPn = AStabSoilData.DistPn; FDistPOP = AStabSoilData.DistPOP; FDistRRatio = AStabSoilData.DistRRatio; FFormReferencePn = AStabSoilData.FormReferencePn; FCorrelationCPhi = AStabSoilData.CorrelationCPhi; FPOP = AStabSoilData.POP; FRatioCuPcPassive = AStabSoilData.RatioCuPcPassive; FRatioCuPcActive = AStabSoilData.RatioCuPcActive; FCuPassiveTop = AStabSoilData.CuPassiveTop; FCuPassiveBottom = AStabSoilData.CuPassiveBottom; FCuActiveTop = AStabSoilData.CuActiveTop; FCuActiveBottom = AStabSoilData.CuActiveBottom; FIsUniformRatioCuPc = AStabSoilData.IsUniformRatioCuPc; FIsUniformCu = AStabSoilData.IsUniformCu; FDesignPartialCohesion = AStabSoilData.DesignPartialCohesion; FDesignStdCohesion = AStabSoilData.DesignStdCohesion; FDesignPartialPhi = AStabSoilData.DesignPartialPhi; FDesignStdPhi = AStabSoilData.DesignStdPhi; FDesignPartialStressTable = AStabSoilData.DesignPartialStressTable; FDesignStdStressTable = AStabSoilData.DesignStdStressTable; FDesignPartialRatioCuPc = AStabSoilData.DesignPartialRatioCuPc; FDesignStdRatioCuPc = AStabSoilData.DesignStdRatioCuPc; FDesignPartialCu = AStabSoilData.DesignPartialCu; FDesignStdCu = AStabSoilData.DesignStdCu; FDesignPartialPOP = AStabSoilData.DesignPartialPOP; FDesignStdPOP = AStabSoilData.DesignStdPOP; FDesignPartialRRatio = AStabSoilData.DesignPartialRRatio; FDesignStdRRatio = AStabSoilData.DesignStdRRatio; FSoilGroup = AStabSoilData.SoilGroup; FHorFluctScaleCoh = AStabSoilData.HorFluctScaleCoh; FVertFluctScaleCoh = AStabSoilData.VertFluctScaleCoh; FNumberOfTestsCoh = AStabSoilData.NumberOfTestsCoh; FVarianceRatioCoh = AStabSoilData.VarianceRatioCoh; FHorFluctScalePhi = AStabSoilData.HorFluctScalePhi; FVertFluctScalePhi = AStabSoilData.VertFluctScalePhi; FNumberOfTestsPhi = AStabSoilData.NumberOfTestsPhi; FVarianceRatioPhi = AStabSoilData.VarianceRatioPhi; FUseSoilType = AStabSoilData.UseSoilType; FSoilType = AStabSoilData.SoilType; FRRatio = AStabSoilData.RRatio; FRheologicalCoefficient = AStabSoilData.RheologicalCoefficient; FStresstableFactor = AStabSoilData.StresstableFactor; FModelData = AStabSoilData.ModelData; FCalculationOptions = AStabSoilData.CalculationOptions; } } // ======================================================================================================================= // Date ID Modification // 2010-05-26 Created // ======================================================================================================================= public void GetCohAndPhiFromTable(double AEffectiveStress, double APseudoFac, ref double ACoh, ref double APhi, ref int APoint) { TProbInputValuesSet LInputType; bool LUseProbDefaults; if ((FProbInputValues == TProbInputValuesSet.pivNone)) { LInputType = FModelData.DefaultInputValues; } else { LInputType = FProbInputValues; } LUseProbDefaults = FUseProbDefaults; if ((!(FModelData.IsProbabilistic))) { FStressTable.GetCohPhi(AEffectiveStress, APseudoFac, ref ACoh, ref APhi, ref APoint); } else { // ... calculation where all columns are given ... if (!LUseProbDefaults) { switch (FCalculationOptions.ProbabilisticCalculationType) { case TProbCalculationType.pctDeterministicDesign: FStressTable.GetCohPhiDesign(AEffectiveStress, ref ACoh, ref APhi, FStresstableFactor/Constants.CNormValue, ref APoint); break; case TProbCalculationType.pctDeterministicMean: FStressTable.GetCohPhiAvg(AEffectiveStress, ref ACoh, ref APhi, FStresstableFactor/Constants.CNormValue, ref APoint); break; case TProbCalculationType.pctProbabilistic: FStressTable.GetCohPhiAvg(AEffectiveStress, ref ACoh, ref APhi, FStresstableFactor/Constants.CNormValue, ref APoint); break; } } // ... calculation when only one columns is given ... if (LUseProbDefaults) { // ... now get the values from the tables ... switch (LInputType) { case TProbInputValuesSet.pivMean: FStressTable.GetCohPhiAvg(AEffectiveStress, ref ACoh, ref APhi, FStresstableFactor/Constants.CNormValue, ref APoint); break; case TProbInputValuesSet.pivDesign: FStressTable.GetCohPhiDesign(AEffectiveStress, ref ACoh, ref APhi, FStresstableFactor/Constants.CNormValue, ref APoint); break; } } } } } // end TStabSoilData }