From a7c5935cc49c078d8238b8e8d43cdfd2d7ba1b82 Mon Sep 17 00:00:00 2001 From: Olga Nemt Date: Thu, 14 Mar 2024 14:45:47 +0500 Subject: [PATCH] =?UTF-8?q?=D0=90=D0=B2=D1=82=D0=BE=D0=BE=D0=BF=D1=80?= =?UTF-8?q?=D0=B5=D0=B4=D0=B5=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BE=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B0=D1=86=D0=B8=D0=B8=20"=D0=9F=D1=80=D0=BE?= =?UTF-8?q?=D0=BC=D1=8B=D0=B2=D0=BA=D0=B0"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DetectOperations/DetectableTelemetry.cs | 28 ++++ .../Detectors/DetectorFlashing.cs | 126 ++++++++++-------- .../Specifications/Промывка.md | 33 +++-- 3 files changed, 114 insertions(+), 73 deletions(-) diff --git a/AsbCloudInfrastructure/Services/DetectOperations/DetectableTelemetry.cs b/AsbCloudInfrastructure/Services/DetectOperations/DetectableTelemetry.cs index aeb18fe2..372cda3c 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/DetectableTelemetry.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/DetectableTelemetry.cs @@ -7,11 +7,39 @@ public class DetectableTelemetry public DateTimeOffset DateTime { get; set; } public int Mode { get; set; } public int? IdUser { get; set; } + + /// + /// Глубина забоя + /// public float WellDepth { get; set; } + + /// + /// Давление + /// public float Pressure { get; set; } + + /// + /// Вес на крюке + /// public float HookWeight { get; set; } + + /// + /// Положение талевого блока + /// public float BlockPosition { get; set; } + + /// + /// Глубина долота + /// public float BitDepth { get; set; } + + /// + /// Обороты ротора + /// public float RotorSpeed { get; set; } + + /// + /// Осевая нагрузка + /// public float AxialLoad { get; set; } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorFlashing.cs b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorFlashing.cs index ac93fd45..2e73e65a 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorFlashing.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorFlashing.cs @@ -1,59 +1,67 @@ -// using AsbCloudDb.Model; -// -// namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors -// { -// -// /// -// /// Промывка -// /// -// internal class DetectorFlashing : DetectorAbstract -// { -// public DetectorFlashing() -// : base(WellOperationCategory.IdFlashing) -// { } -// -// protected override double CalcValue(DetectableTelemetry[] telemetry, int begin, int end) -// => CalcDeltaMinutes(telemetry, begin, end); -// -// protected override bool DetectBegin(DetectableTelemetry[] telemetry, int position, DetectedOperation? previousOperation) -// { -// if (!((previousOperation?.IdCategory == WellOperationCategory.IdRotor) || -// (previousOperation?.IdCategory == WellOperationCategory.IdSlide))) -// return false; -// -// var point0 = telemetry[position]; -// var delta = point0.WellDepth - point0.BitDepth; -// if (delta > 0.05d) -// return false; -// -// if (point0.Pressure < 15) -// return false; -// -// if (point0.BlockPosition < 3) -// return false; -// -// if (ContainsDeviationApprox(telemetry, t => t.WellDepth, position, 150, 0.0001)) -// return false; -// -// return true; -// } -// -// protected override int DetectEnd(DetectableTelemetry[] telemetry, int position, DetectedOperation? previousOperation) -// { -// var point0 = telemetry[position]; -// var delta = point0.WellDepth - point0.BitDepth; -// if ((delta > 0.03d ) -// && (point0.Pressure > 15) -// && ContainsDeviationApprox(telemetry, t=>t.BlockPosition, position, 60, 0.03)) -// return IdReasonOfEnd_Custom1; -// -// return IdReasonOfEnd_NotDetected; -// } -// -// protected override bool IsValid(DetectableTelemetry[] telemetry, int begin, int end) -// => IsValidByWellDepthDoesNotChange(telemetry, begin, end); -// } -// -// -// } -// +using AsbCloudApp.Data.DetectedOperation; +using AsbCloudDb.Model; +using System; +using System.Collections.Generic; + +namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors +{ + + /// + /// Промывка + /// + internal class DetectorFlashing : DetectorAbstract + { + + protected override double CalcValue(DetectableTelemetry[] telemetry, int begin, int end) + => CalcDeltaMinutes(telemetry, begin, end); + + protected override bool DetectBegin(DetectableTelemetry[] telemetry, int position, DetectedOperationDto? previousOperation) + { + + var currentPoint = telemetry[position]; + if (currentPoint.Pressure <= 20) + return false; + + var delta = currentPoint.WellDepth - currentPoint.BitDepth; + if (delta < 0.03d) + return false; + + if (currentPoint.RotorSpeed >= 10) + return false; + + var nextIndexPoint = telemetry.Length <= position ? position : position + 1; + var nextPoint = telemetry[nextIndexPoint]; + if (Math.Abs(currentPoint.WellDepth - nextPoint.WellDepth) > 0) + return false; + + if (currentPoint.WellDepth <= 150) + return false; + + return true; + + } + + protected override int DetectEnd(DetectableTelemetry[] telemetry, int position, DetectedOperationDto? previousOperation) + { + var currentPoint = telemetry[position]; + + if (currentPoint.Pressure < 20) + return IdReasonOfEnd_PressureIsLo; + if ((currentPoint.WellDepth - currentPoint.BitDepth) < 0.03d) + return 0; + if (currentPoint.RotorSpeed >= 10) + return IdReasonOfEnd_RotorSpeedIsHi; + if (currentPoint.BitDepth < 150) + return 0; + return IdReasonOfEnd_NotDetected; + } + + protected override (int IdCategory, IDictionary ExtraData) GetSpecificInformation(DetectableTelemetry[] telemetry, + int begin, + int end) + { + return (WellOperationCategory.IdFlashing, new Dictionary()); + } + } +} + diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Промывка.md b/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Промывка.md index 9a57a784..c4ca9bac 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Промывка.md +++ b/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Промывка.md @@ -2,26 +2,31 @@ ## Описание -Промывка – операция, во время которой после добуривания очередной трубы происходит снижение осевой нагрузки и дифференциального давления, талевый блок остается условно неподвижным. +Промывка – операция, во время которой давление условно постоянное, а вращение колонны отсутствует, талевый блок при этом может быть как в движении, так и статичным. -Проработка перед наращиванием определяется как время между: -- окончанием операции бурения (ротор/ слайд/ ручное бурение) -- началом операции проработки/ шаблонировки перед наращивании +Промывка определяется как время между: +- окончанием операции бурения или выходом на режим буровых насосов +- началом операции проработки/шаблонировки перед наращиванием или остановкой буровых насосов ## Метод определения Признак начала операции = - ( предыдущая операция == бурение в роторе или слайде) - ( расстояние от долота до забоя < 0,05м ) И - ( давление > 15 атм ) И - ( положение блока > 3м ) И - ( глубина забоя изменяется менее чем на 0,0001м в течении 150 сек) - + ( давление > 20 атм ) И + ( расстояние от долота до забоя >= 0.03 м) И + ( обороты ротора < 10 об/мин) И + ( глубина забоя не изменяется) И + ( глубина долота > 150 м) И + ( положение блока не меняется) ИЛИ + ( положение блока уменьшается) ИЛИ + ( положение блока увеличивается --> дальше смотрим: если после остановки блока обороты ротора < 10 об/мин); + Признак окончания операции = - ( расстояние от долота до забоя > 0.03м ) И - ( давление > 15 атм ) И - ( высота блока изменяется больше чем на 0.03м в течении 60 сек с начала операции); + ( давление < 20 атм ) ИЛИ + ( расстояние от долота до забоя < 0.03 м ) ИЛИ + ( обороты ротора >= 10 об/мин) ИЛИ + ( глубина долота < 150 м) ИЛИ + (положение блока увеличивается --> дальше смотрим: если после остановки блока обороты ротора >= 10 об/мин); ## Ключевой параметр -Продолжительность операции. +Продолжительность операции. \ No newline at end of file