/// <summary> /// 根据试验指标计算抗剪强度函数 /// </summary> public static void CalcuByRst(List <StatisticRST> _rstStatisticList) { // 没有统计数据时退出 if (_rstStatisticList == null) { return; } // 提取数据库中的试验指标 StatisticRST.RSTType[] typeList = new StatisticRST.RSTType[] { StatisticRST.RSTType.frictionAngle, StatisticRST.RSTType.cohesion, }; List <double> averageList = new List <double>(); for (int i = 0; i < _rstStatisticList.Count; i++) { if (_rstStatisticList[i].Layer == LayerNumber) { for (int j = 0; j < typeList.Length; j++) { if (_rstStatisticList[i].Type == typeList[j]) { averageList.Add(_rstStatisticList[i].Average); } } } } // 初始化试验指标结构体 ClearRstStatisticResult(); // 直接赋值抗剪强度 if (averageList.Count > 0) { StatisticResult.FrictionByRst = averageList[0] == Constants.NullNumber ? "/" : averageList[0].ToString("0.0"); } else { StatisticResult.FrictionByRst = "/"; } if (averageList.Count > 1) { StatisticResult.CohesionByRst = averageList[1] == Constants.NullNumber ? "/" : averageList[1].ToString("0.0"); } else { StatisticResult.CohesionByRst = "/"; } }
/// <summary> /// 根据试验指标计算承载力函数 /// </summary> public static void CalcuByRst(List <StatisticRST> _rstStatisticList, string _soilType) { // 没有统计数据时退出 if (_rstStatisticList == null) { return; } // 提取数据库中的试验指标 StatisticRST.RSTType[] typeList = new StatisticRST.RSTType[] { StatisticRST.RSTType.waterLevel, StatisticRST.RSTType.density, StatisticRST.RSTType.specificGravity, StatisticRST.RSTType.voidRatio, StatisticRST.RSTType.saturation, StatisticRST.RSTType.liquidLimit, StatisticRST.RSTType.plasticLimit, StatisticRST.RSTType.plasticIndex, StatisticRST.RSTType.liquidityIndex, StatisticRST.RSTType.compressibility, StatisticRST.RSTType.modulus, StatisticRST.RSTType.frictionAngle, StatisticRST.RSTType.cohesion, StatisticRST.RSTType.permeability }; List <double> countList = new List <double>(); List <double> maxList = new List <double>(); List <double> minList = new List <double>(); List <double> averageList = new List <double>(); List <double> standardDeviationList = new List <double>(); List <double> variableCoefficientList = new List <double>(); List <double> correctionCoefficientList = new List <double>(); List <double> standardValue = new List <double>(); for (int i = 0; i < _rstStatisticList.Count; i++) { if (_rstStatisticList[i].Layer == LayerNumber) { for (int j = 0; j < typeList.Length; j++) { if (_rstStatisticList[i].Type == typeList[j]) { countList.Add(_rstStatisticList[i].Count); maxList.Add(_rstStatisticList[i].Max); minList.Add(_rstStatisticList[i].Min); averageList.Add(_rstStatisticList[i].Average); standardDeviationList.Add(_rstStatisticList[i].StandardDeviation); variableCoefficientList.Add(_rstStatisticList[i].VariableCoefficient); correctionCoefficientList.Add(_rstStatisticList[i].CorrectionCoefficient); standardValue.Add(_rstStatisticList[i].StandardValue); } } } } // 初始化试验指标结构体 ClearRstStatisticResult(); // 直接赋值模量 StatisticResult.ModulusByRst = averageList[10] == Constants.NullNumber ? "/" : averageList[10].ToString("0.0"); // 定义统计指标 double paraRow = Constants.NullNumber; double paraCol = Constants.NullNumber; // 按规范和土质类型提取并计算填充指标 if (CurrentStandard == "Hubei") { if (_soilType == "一般黏性土") { paraRow = averageList[3]; paraCol = averageList[8]; if (paraRow != Constants.NullNumber && paraCol != Constants.NullNumber) { RstParameter = "孔隙比=" + paraRow.ToString("0.00") + "\n液性指数=" + paraCol.ToString("0.00"); } else { RstParameter = "/"; } StatisticResult.BearingByRst = CalcuBearingByRst(CurrentStandard, _soilType, paraRow, paraCol) == Constants.NullNumber ? "/" : CalcuBearingByRst(CurrentStandard, _soilType, paraRow, paraCol).ToString("0"); } else if (_soilType == "新近沉积黏性土") { paraRow = averageList[3]; paraCol = averageList[8]; if (paraRow != Constants.NullNumber && paraCol != Constants.NullNumber) { RstParameter = "孔隙比=" + paraRow.ToString("0.00") + "\n液性指数=" + paraCol.ToString("0.00"); } else { RstParameter = "/"; } StatisticResult.BearingByRst = CalcuBearingByRst(CurrentStandard, _soilType, paraRow, paraCol) == Constants.NullNumber ? "/" : CalcuBearingByRst(CurrentStandard, _soilType, paraRow, paraCol).ToString("0"); } else if (_soilType == "老黏性土") { paraRow = averageList[0] / averageList[5]; if (paraRow != Constants.NullNumber) { RstParameter = "含水比=" + paraRow.ToString("0.00"); } else { RstParameter = "/"; } StatisticResult.BearingByRst = CalcuBearingByRst(CurrentStandard, _soilType, paraRow) == Constants.NullNumber ? "/" : CalcuBearingByRst(CurrentStandard, _soilType, paraRow).ToString("0"); } else if (_soilType == "淤泥、淤泥质土") { paraRow = averageList[0]; if (paraRow != Constants.NullNumber) { RstParameter = "含水量=" + paraRow.ToString("0.0"); } else { RstParameter = "/"; } StatisticResult.BearingByRst = CalcuBearingByRst(CurrentStandard, _soilType, paraRow) == Constants.NullNumber ? "/" : CalcuBearingByRst(CurrentStandard, _soilType, paraRow).ToString("0"); } else if (_soilType == "粉土") { paraRow = averageList[3]; paraCol = averageList[0]; if (paraRow != Constants.NullNumber && paraCol != Constants.NullNumber) { RstParameter = "孔隙比=" + paraRow.ToString("0.0") + "\n含水量=" + paraCol.ToString("0.00"); } else { RstParameter = "/"; } StatisticResult.BearingByRst = CalcuBearingByRst(CurrentStandard, _soilType, paraRow, paraCol) == Constants.NullNumber ? "/" : CalcuBearingByRst(CurrentStandard, _soilType, paraRow, paraCol).ToString("0"); } else { RstParameter = "/"; StatisticResult.BearingByRst = "/"; } } }