| | |
| | | |
| | | //const double _coef = 1e8 * 2.54 * 2.54 * 4 * 6 * 2 * 11 * 77 * 0.2 / 0.6; |
| | | |
| | | private static (double, double) GetFarInterplolateResult(string modelId, double porosity, double sw, double speed, double depth, double yieldCounting) |
| | | private static (double, double) GetFarInterplolateResult(string modelId, double porosity, double sw, double speed, double depth, double yieldCounting, int countStart, int countEnd) |
| | | { |
| | | var countLen = countEnd - countStart + 1; |
| | | var cWinLength = _cWinEndIndex - _cWinStartIndex + 1; |
| | | var oWinLength = _oWinEndIndex - _oWinStartIndex + 1; |
| | | var oilLine = RepositoryInstance.Instance.COFarResultRepository?.GetCOFarResult(modelId, (int)porosity, 0); |
| | |
| | | var oilLineValArr = oilLine.CInelasticSpec.Split(',').Select(v => Convert.ToDouble(v)).ToArray(); |
| | | var waterLineValArr = waterLine.CInelasticSpec.Split(',').Select(v => Convert.ToDouble(v)).ToArray(); |
| | | |
| | | var oilLineCR = oilLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / oilLineValArr.Skip(17).Take(237).Sum(); |
| | | var oilLineOR = oilLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / oilLineValArr.Skip(17).Take(237).Sum(); |
| | | var oilLineCR = oilLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / oilLineValArr.Skip(countStart).Take(countLen).Sum(); |
| | | var oilLineOR = oilLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / oilLineValArr.Skip(countStart).Take(countLen).Sum(); |
| | | |
| | | var oilLineC = 36d / 160d * oilLineCR * yieldCounting / speed * depth * 0.0762d; |
| | | var oilLineO = 36d / 160d * oilLineOR * yieldCounting / speed * depth * 0.0762d; |
| | | |
| | | var waterLineCR = waterLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / waterLineValArr.Skip(17).Take(237).Sum(); |
| | | var waterLineOR = waterLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / waterLineValArr.Skip(17).Take(237).Sum(); |
| | | var waterLineCR = waterLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / waterLineValArr.Skip(countStart).Take(countLen).Sum(); |
| | | var waterLineOR = waterLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / waterLineValArr.Skip(countStart).Take(countLen).Sum(); |
| | | var waterLineC = 36d / 160d * waterLineCR * yieldCounting / speed * depth * 0.0762d; |
| | | var waterLineO = 36d / 160d * waterLineOR * yieldCounting / speed * depth * 0.0762d; |
| | | |
| | |
| | | return (cRes, oRes); |
| | | } |
| | | |
| | | private static (double, double) GetNearInterplolateResult(string modelId, double porosity, double sw, double speed, double depth, double yieldCounting) |
| | | private static (double, double) GetNearInterplolateResult(string modelId, double porosity, double sw, double speed, double depth, double yieldCounting, int countStart, int countEnd) |
| | | { |
| | | var countLen = countEnd - countStart + 1; |
| | | var cWinLength = _cWinEndIndex - _cWinStartIndex + 1; |
| | | var oWinLength = _oWinEndIndex - _oWinStartIndex + 1; |
| | | var oilLine = RepositoryInstance.Instance.CONearResultRepository?.GetCONearResult(modelId, (int)porosity, 0); |
| | |
| | | var oilLineValArr = oilLine.CInelasticSpec.Split(',').Select(v => Convert.ToDouble(v)).ToArray(); |
| | | var waterLineValArr = waterLine.CInelasticSpec.Split(',').Select(v => Convert.ToDouble(v)).ToArray(); |
| | | |
| | | var oilLineCR = oilLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / oilLineValArr.Skip(17).Take(237).Sum(); |
| | | var oilLineOR = oilLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / oilLineValArr.Skip(17).Take(237).Sum(); |
| | | var oilLineCR = oilLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / oilLineValArr.Skip(countStart).Take(countLen).Sum(); |
| | | var oilLineOR = oilLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / oilLineValArr.Skip(countStart).Take(countLen).Sum(); |
| | | var oilLineC = (36d / 160d) * oilLineCR * yieldCounting / speed * depth * 0.0762d; |
| | | var oilLineO = (36d / 160d) * oilLineOR * yieldCounting / speed * depth * 0.0762d; |
| | | |
| | | var waterLineCR = waterLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / waterLineValArr.Skip(17).Take(237).Sum(); |
| | | var waterLineOR = waterLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / waterLineValArr.Skip(17).Take(237).Sum(); |
| | | var waterLineCR = waterLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / waterLineValArr.Skip(countStart).Take(countLen).Sum(); |
| | | var waterLineOR = waterLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / waterLineValArr.Skip(countStart).Take(countLen).Sum(); |
| | | var waterLineC = (36d / 160d) * waterLineCR * yieldCounting / speed * depth * 0.0762d; |
| | | var waterLineO = (36d / 160d) * waterLineOR * yieldCounting / speed * depth * 0.0762d; |
| | | |
| | |
| | | /// <param name="depth">深度</param> |
| | | /// <returns>碳和氧值</returns> |
| | | /// <exception cref="InvalidDataException">孔隙度超过范围</exception> |
| | | public static (double, double) GetFarMergeCOResult(string modelId, double porosity, double sw, double speed, double depth, double yieldCounting) |
| | | public static (double, double) GetFarMergeCOResult(string modelId, double porosity, double sw, double speed, double depth, double yieldCounting, int countStart, int countEnd) |
| | | { |
| | | if (porosity > 40) |
| | | throw new InvalidDataException("Porosity value out of range!"); |
| | |
| | | (double, double) result = (0, 0); |
| | | if (porosity % 5 == 0) |
| | | { |
| | | result = GetFarInterplolateResult(modelId, porosity, sw, speed, depth, yieldCounting); |
| | | result = GetFarInterplolateResult(modelId, porosity, sw, speed, depth, yieldCounting, countStart, countEnd); |
| | | } |
| | | else |
| | | { |
| | | var ceilingPorosity = Math.Ceiling(porosity / 5) * 5; |
| | | var ceilingResult = GetFarInterplolateResult(modelId, ceilingPorosity, sw, speed, depth, yieldCounting); |
| | | var ceilingResult = GetFarInterplolateResult(modelId, ceilingPorosity, sw, speed, depth, yieldCounting, countStart, countEnd); |
| | | |
| | | var floorPorosity = Math.Floor(porosity / 5) * 5; |
| | | var floorResult = GetFarInterplolateResult(modelId, floorPorosity, sw, speed, depth, yieldCounting); |
| | | var floorResult = GetFarInterplolateResult(modelId, floorPorosity, sw, speed, depth, yieldCounting, countStart, countEnd); |
| | | |
| | | result.Item1 = Utility.Interpolate(porosity, floorPorosity, floorResult.Item1, ceilingPorosity, ceilingResult.Item1); |
| | | result.Item2 = Utility.Interpolate(porosity, floorPorosity, floorResult.Item2, ceilingPorosity, ceilingResult.Item2); |
| | |
| | | /// <param name="depth">深度</param> |
| | | /// <returns>碳或氧值</returns> |
| | | /// <exception cref="InvalidDataException">孔隙度超过范围</exception> |
| | | public static (double, double) GetNearMergeCOResult(string modelId, double porosity, double sw, double speed, double depth, double yieldCounting) |
| | | public static (double, double) GetNearMergeCOResult(string modelId, double porosity, double sw, double speed, double depth, double yieldCounting, int countStart, int countEnd) |
| | | { |
| | | if (porosity > 40) |
| | | throw new InvalidDataException("Porosity value out of range!"); |
| | |
| | | (double, double) result = (0, 0); |
| | | if (porosity % 5 == 0) |
| | | { |
| | | result = GetNearInterplolateResult(modelId, porosity, sw, speed, depth, yieldCounting); |
| | | result = GetNearInterplolateResult(modelId, porosity, sw, speed, depth, yieldCounting, countStart, countEnd); |
| | | } |
| | | else |
| | | { |
| | | var ceilingPorosity = Math.Ceiling(porosity / 5) * 5; |
| | | var ceilingResult = GetNearInterplolateResult(modelId, ceilingPorosity, sw, speed, depth, yieldCounting); |
| | | var ceilingResult = GetNearInterplolateResult(modelId, ceilingPorosity, sw, speed, depth, yieldCounting, countStart, countEnd); |
| | | |
| | | var floorPorosity = Math.Floor(porosity / 5) * 5; |
| | | var floorResult = GetNearInterplolateResult(modelId, floorPorosity, sw, speed, depth, yieldCounting); |
| | | var floorResult = GetNearInterplolateResult(modelId, floorPorosity, sw, speed, depth, yieldCounting, countStart, countEnd); |
| | | |
| | | result.Item1 = Utility.Interpolate(porosity, floorPorosity, floorResult.Item1, ceilingPorosity, ceilingResult.Item1); |
| | | result.Item2 = Utility.Interpolate(porosity, floorPorosity, floorResult.Item2, ceilingPorosity, ceilingResult.Item2); |
| | |
| | | return result; |
| | | } |
| | | |
| | | public static (double, double) GetFarCROR(string modelId, double porosity, double sw) |
| | | public static (double, double) GetFarCROR(string modelId, double porosity, double sw, int countStart, int countEnd) |
| | | { |
| | | int countLen = countEnd - countStart + 1; |
| | | var cWinLength = _cWinEndIndex - _cWinStartIndex + 1; |
| | | var oWinLength = _oWinEndIndex - _oWinStartIndex + 1; |
| | | var oilLine = RepositoryInstance.Instance.COFarResultRepository?.GetCOFarResult(modelId, (int)porosity, 0); |
| | |
| | | var oilLineValArr = oilLine.CInelasticSpec.Split(',').Select(v => Convert.ToDouble(v)).ToArray(); |
| | | var waterLineValArr = waterLine.CInelasticSpec.Split(',').Select(v => Convert.ToDouble(v)).ToArray(); |
| | | |
| | | var oilLineCR = oilLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / oilLineValArr.Skip(17).Take(237).Sum(); |
| | | var oilLineOR = oilLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / oilLineValArr.Skip(17).Take(237).Sum(); |
| | | var oilLineCR = oilLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / oilLineValArr.Skip(countStart).Take(countLen).Sum(); |
| | | var oilLineOR = oilLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / oilLineValArr.Skip(countStart).Take(countLen).Sum(); |
| | | |
| | | var waterLineCR = waterLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / waterLineValArr.Skip(17).Take(237).Sum(); |
| | | var waterLineOR = waterLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / waterLineValArr.Skip(17).Take(237).Sum(); |
| | | var waterLineCR = waterLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / waterLineValArr.Skip(countStart).Take(countLen).Sum(); |
| | | var waterLineOR = waterLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / waterLineValArr.Skip(countStart).Take(countLen).Sum(); |
| | | |
| | | double cRes = 0, oRes = 0; |
| | | if (sw == 0) |
| | |
| | | return (cRes, oRes); |
| | | } |
| | | |
| | | public static (double, double) GetNearCROR(string modelId, double porosity, double sw) |
| | | public static (double, double) GetNearCROR(string modelId, double porosity, double sw, int countStart, int countEnd) |
| | | { |
| | | int countLen = countEnd - countStart + 1; |
| | | var cWinLength = _cWinEndIndex - _cWinStartIndex + 1; |
| | | var oWinLength = _oWinEndIndex - _oWinStartIndex + 1; |
| | | var oilLine = RepositoryInstance.Instance.CONearResultRepository?.GetCONearResult(modelId, (int)porosity, 0); |
| | |
| | | var oilLineValArr = oilLine.CInelasticSpec.Split(',').Select(v => Convert.ToDouble(v)).ToArray(); |
| | | var waterLineValArr = waterLine.CInelasticSpec.Split(',').Select(v => Convert.ToDouble(v)).ToArray(); |
| | | |
| | | var oilLineCR = oilLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / oilLineValArr.Skip(17).Take(237).Sum(); |
| | | var oilLineOR = oilLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / oilLineValArr.Skip(17).Take(237).Sum(); |
| | | var oilLineCR = oilLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / oilLineValArr.Skip(countStart).Take(countLen).Sum(); |
| | | var oilLineOR = oilLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / oilLineValArr.Skip(countStart).Take(countLen).Sum(); |
| | | |
| | | var waterLineCR = waterLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / waterLineValArr.Skip(17).Take(237).Sum(); |
| | | var waterLineOR = waterLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / waterLineValArr.Skip(17).Take(237).Sum(); |
| | | var waterLineCR = waterLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / waterLineValArr.Skip(countStart).Take(countLen).Sum(); |
| | | var waterLineOR = waterLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / waterLineValArr.Skip(countStart).Take(countLen).Sum(); |
| | | |
| | | double crRes = 0, orRes = 0; |
| | | if (sw == 0) |
| | |
| | | return (crRes, orRes); |
| | | } |
| | | |
| | | public static (double, double) GetFarCOORResult(string modelId, double porosity, double sw) |
| | | public static (double, double) GetFarCOORResult(string modelId, double porosity, double sw, int countStart, int countEnd) |
| | | { |
| | | if (porosity > 40) |
| | | throw new InvalidDataException("Porosity value out of range!"); |
| | |
| | | (double, double) result = (0, 0); |
| | | if (porosity % 5 == 0) |
| | | { |
| | | result = GetFarCROR(modelId, porosity, sw); |
| | | result = GetFarCROR(modelId, porosity, sw, countStart, countEnd); |
| | | } |
| | | else |
| | | { |
| | | var ceilingPorosity = Math.Ceiling(porosity / 5) * 5; |
| | | var ceilingResult = GetFarCROR(modelId, ceilingPorosity, sw); |
| | | var ceilingResult = GetFarCROR(modelId, ceilingPorosity, sw, countStart, countEnd); |
| | | |
| | | var floorPorosity = Math.Floor(porosity / 5) * 5; |
| | | var floorResult = GetFarCROR(modelId, floorPorosity, sw); |
| | | var floorResult = GetFarCROR(modelId, floorPorosity, sw, countStart, countEnd); |
| | | |
| | | result.Item1 = Utility.Interpolate(porosity, floorPorosity, floorResult.Item1, ceilingPorosity, ceilingResult.Item1); |
| | | result.Item2 = Utility.Interpolate(porosity, floorPorosity, floorResult.Item2, ceilingPorosity, ceilingResult.Item2); |
| | |
| | | return result; |
| | | } |
| | | |
| | | public static (double, double) GetNearCOORResult(string modelId, double porosity, double sw) |
| | | public static (double, double) GetNearCOORResult(string modelId, double porosity, double sw, int countStart, int countEnd) |
| | | { |
| | | if (porosity > 40) |
| | | throw new InvalidDataException("Porosity value out of range!"); |
| | |
| | | (double, double) result = (0, 0); |
| | | if (porosity % 5 == 0) |
| | | { |
| | | result = GetNearCROR(modelId, porosity, sw); |
| | | result = GetNearCROR(modelId, porosity, sw, countStart, countEnd); |
| | | } |
| | | else |
| | | { |
| | | var ceilingPorosity = Math.Ceiling(porosity / 5) * 5; |
| | | var ceilingResult = GetNearCROR(modelId, ceilingPorosity, sw); |
| | | var ceilingResult = GetNearCROR(modelId, ceilingPorosity, sw, countStart, countEnd); |
| | | |
| | | var floorPorosity = Math.Floor(porosity / 5) * 5; |
| | | var floorResult = GetNearCROR(modelId, floorPorosity, sw); |
| | | var floorResult = GetNearCROR(modelId, floorPorosity, sw, countStart, countEnd); |
| | | |
| | | result.Item1 = Utility.Interpolate(porosity, floorPorosity, floorResult.Item1, ceilingPorosity, ceilingResult.Item1); |
| | | result.Item2 = Utility.Interpolate(porosity, floorPorosity, floorResult.Item2, ceilingPorosity, ceilingResult.Item2); |
| | |
| | | private static (double slope, double intercept) _lineCoef; |
| | | private static (double a, double b, double c) _parabolaCoef; |
| | | |
| | | public static ErrorRatioResult GetErrorRatioResult(string modelID, double porosity, double sw, double depth, bool lockSpeed, double speed, double yieldCounting, double targetErrorRatio, out double testSpeed, out ProcessingDataModel processingData, int pass = 0, double nearCofe = 0.65, double farCofe = 0.35) |
| | | public static ErrorRatioResult GetErrorRatioResult(string modelID, double porosity, double sw, double depth, bool lockSpeed, double speed, double yieldCounting, double targetErrorRatio, string type, out double testSpeed, out ProcessingDataModel processingData, int pass = 0, double nearCofe = 0.65, double farCofe = 0.35) |
| | | { |
| | | int countStart = 9; |
| | | int countEnd = 179; |
| | | if (type == "SMRT") |
| | | { |
| | | countStart = 24; |
| | | } |
| | | processingData = new ProcessingDataModel { Depth = depth, NearPDEVCoef = nearCofe, FarPDEVCoef = farCofe, NearTO = yieldCounting }; |
| | | var result = new ErrorRatioResult |
| | | { |
| | |
| | | processingData.FarSpecData = COMergeCalcService.GetFarSpectrum(modelID, porosity, sw); |
| | | processingData.NearSpecData = COMergeCalcService.GetNearSpectrum(modelID, porosity, sw); |
| | | |
| | | var nearCROR = COMergeCalcService.GetNearCOORResult(modelID, porosity, sw); |
| | | var farCROR = COMergeCalcService.GetFarCOORResult(modelID, porosity, sw); |
| | | var nearCROR = COMergeCalcService.GetNearCOORResult(modelID, porosity, sw, countStart, countEnd); |
| | | var farCROR = COMergeCalcService.GetFarCOORResult(modelID, porosity, sw, countStart, countEnd); |
| | | processingData.NearCR = nearCROR.Item1; |
| | | processingData.NearOR = nearCROR.Item2; |
| | | processingData.FarCR = farCROR.Item1; |
| | |
| | | |
| | | } |
| | | |
| | | private static ErrorRatio GetFirstErrorRatio(string modelID, double porosity, double sw, double speed, double depth, double yieldCounting, double nearCofe, double farCofe, out double oilPoint, out double waterPoint) |
| | | //废弃 |
| | | private static ErrorRatio GetFirstErrorRatio(string modelID, double porosity, double sw, double speed, double depth, double yieldCounting, double nearCofe, double farCofe,int countStart,int countEnd, out double oilPoint, out double waterPoint) |
| | | { |
| | | if (porosity > 40) |
| | | throw new InvalidDataException("Porosity value out of range!"); |
| | |
| | | { |
| | | var mDelta = GetMDelta(porosity, out oilPoint, out waterPoint); |
| | | |
| | | var mergePDEVOld = PDEVCalcService.GetMergePDEV(modelID, porosity, sw, speed, depth, yieldCounting, nearCofe, farCofe); |
| | | var mergePDEVOld = PDEVCalcService.GetMergePDEV(modelID, porosity, sw, speed, depth, yieldCounting, nearCofe, farCofe,countStart,countEnd); |
| | | |
| | | //var nearCROR = COMergeCalcService.GetNearCOORResult(modelID, porosity, sw); |
| | | //var farCROR = COMergeCalcService.GetFarCOORResult(modelID, porosity, sw); |
| | |
| | | public class PDEVCalcService |
| | | { |
| | | //废弃 |
| | | public static double GetMergePDEV(string modelId, double porosity, double sw, double speed, double depth, double yieldCounting, double nearCofe, double farCofe) |
| | | public static double GetMergePDEV(string modelId, double porosity, double sw, double speed, double depth, double yieldCounting, double nearCofe, double farCofe, int countStart, int countEnd) |
| | | { |
| | | var farResult = COMergeCalcService.GetFarMergeCOResult(modelId, porosity, sw, speed, depth, yieldCounting); |
| | | var farResult = COMergeCalcService.GetFarMergeCOResult(modelId, porosity, sw, speed, depth, yieldCounting, countStart, countEnd); |
| | | var farPDEV = CalcPDEV(farResult.Item1, farResult.Item2); |
| | | |
| | | var nearResult = COMergeCalcService.GetNearMergeCOResult(modelId, porosity, sw, speed, depth, yieldCounting); |
| | | var nearResult = COMergeCalcService.GetNearMergeCOResult(modelId, porosity, sw, speed, depth, yieldCounting, countStart, countEnd); |
| | | var nearPDEV = CalcPDEV(nearResult.Item1, nearResult.Item2); |
| | | |
| | | return Math.Sqrt(Math.Pow(nearPDEV * nearCofe, 2) + Math.Pow(farPDEV * farCofe, 2)); |
| | |
| | | <Authors>Casing Research Insitute</Authors> |
| | | <Product>JobPlanner</Product> |
| | | <Copyright>COSL</Copyright> |
| | | <Version>1.3.1</Version> |
| | | <Version>1.4.0</Version> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | |
| | | nudDepth = new NumericUpDown(); |
| | | nudTargetLoggingInterval = new NumericUpDown(); |
| | | label54 = new Label(); |
| | | txtToolType = new TextBox(); |
| | | label53 = new Label(); |
| | | label52 = new Label(); |
| | | pbLoadDB = new ProgressBar(); |
| | | cmbToolType = new ComboBox(); |
| | | ((System.ComponentModel.ISupportInitialize)nudSoPrecisionRequired).BeginInit(); |
| | | pnlLockPass.SuspendLayout(); |
| | | ((System.ComponentModel.ISupportInitialize)nudPass).BeginInit(); |
| | |
| | | // |
| | | // tpPlan |
| | | // |
| | | tpPlan.Controls.Add(cmbToolType); |
| | | tpPlan.Controls.Add(label7); |
| | | tpPlan.Controls.Add(cmbTargetLoggingIntervalUnit); |
| | | tpPlan.Controls.Add(label5); |
| | |
| | | tpPlan.Controls.Add(nudTargetLoggingInterval); |
| | | tpPlan.Controls.Add(nudSoPrecisionRequired); |
| | | tpPlan.Controls.Add(label54); |
| | | tpPlan.Controls.Add(txtToolType); |
| | | tpPlan.Controls.Add(label53); |
| | | tpPlan.Controls.Add(label52); |
| | | tpPlan.Controls.Add(label21); |
| | |
| | | label54.TabIndex = 12; |
| | | label54.Text = "Alpha-processing window"; |
| | | // |
| | | // txtToolType |
| | | // |
| | | txtToolType.Location = new Point(185, 15); |
| | | txtToolType.Name = "txtToolType"; |
| | | txtToolType.ReadOnly = true; |
| | | txtToolType.Size = new Size(88, 23); |
| | | txtToolType.TabIndex = 24; |
| | | // |
| | | // label53 |
| | | // |
| | | label53.AutoSize = true; |
| | |
| | | pbLoadDB.Size = new Size(75, 23); |
| | | pbLoadDB.TabIndex = 8; |
| | | pbLoadDB.Visible = false; |
| | | // |
| | | // cmbToolType |
| | | // |
| | | cmbToolType.DropDownStyle = ComboBoxStyle.DropDownList; |
| | | cmbToolType.FormattingEnabled = true; |
| | | cmbToolType.Items.AddRange(new object[] { "RET", "SMRT" }); |
| | | cmbToolType.Location = new Point(183, 12); |
| | | cmbToolType.Name = "cmbToolType"; |
| | | cmbToolType.Size = new Size(104, 25); |
| | | cmbToolType.TabIndex = 32; |
| | | // |
| | | // FrmMain |
| | | // |
| | |
| | | private NumericUpDown nudGasDensity; |
| | | private Label label51; |
| | | private Label label50; |
| | | private TextBox txtToolType; |
| | | private Label label52; |
| | | private NumericUpDown nudDepth; |
| | | private Label label53; |
| | |
| | | private RichTextBox txtAnalysisResult; |
| | | private Label label7; |
| | | private NumericUpDown nudYieldCounting; |
| | | private ComboBox cmbToolType; |
| | | } |
| | | } |
| | |
| | | private void FrmMain_Load(object sender, EventArgs e) |
| | | { |
| | | cmbSpeedUnit.SelectedIndex = 0; |
| | | cmbToolType.SelectedIndex = 0; |
| | | cmbTargetLoggingIntervalUnit.SelectedIndex = 0; |
| | | } |
| | | private void InitInputControl() |
| | |
| | | pbLoadDB.Show(); |
| | | pbLoadDB.Value = 0; |
| | | txtDataPath.Text = fileDlg.FileName; |
| | | txtToolType.Text = fileDlg.SafeFileName.Substring(0, fileDlg.SafeFileName.IndexOf("Mcnp")); |
| | | //txtToolType.Text = fileDlg.SafeFileName.Substring(0, fileDlg.SafeFileName.IndexOf("Mcnp")); |
| | | _connectionString = $"Data Source={fileDlg.FileName};"; |
| | | RepositoryInstance.Instance.ReLoad(_connectionString); |
| | | |
| | |
| | | } |
| | | var calcSpeed = cmbSpeedUnit.Text == "ft/hr" ? UnitConvert.FtHr2MS(speed) : UnitConvert.MHR2MS(speed); |
| | | |
| | | var result = ErrorRatioCalc.GetErrorRatioResult(_model.ModelID, porosity, sw, depth, true, calcSpeed, yieldCounting, targetErrorRatio / 100, out _, out processingData); |
| | | var result = ErrorRatioCalc.GetErrorRatioResult(_model.ModelID, porosity, sw, depth, true, calcSpeed, yieldCounting, targetErrorRatio / 100, cmbToolType.Text, out _, out processingData); |
| | | |
| | | Plot(result); |
| | | |
| | |
| | | return; |
| | | } |
| | | double speed; |
| | | var result = ErrorRatioCalc.GetErrorRatioResult(_model.ModelID, porosity, sw, depth, false, 0, yieldCounting, targetErrorRatio / 100, out speed, out processingData, pass); |
| | | var result = ErrorRatioCalc.GetErrorRatioResult(_model.ModelID, porosity, sw, depth, false, 0, yieldCounting, targetErrorRatio / 100,cmbToolType.Text, out speed, out processingData, pass); |
| | | Plot(result); |
| | | |
| | | double totalTime = Math.Round((targetLoggingInterval / speed / 60 / 60), 2); |