lx
2025-08-08 09c1d78e98e01881f5abec85b75b52149b9b35f8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace ErrorAnalysis.Service
{
    public class PDEVCalcService
    {
        public static double GetMergePDEV(string modelId, double porosity, double sw, double speed, double depth, double yieldCounting, double nearCofe, double farCofe)
        {
            var farResult = COMergeCalcService.GetFarMergeCOResult(modelId, porosity, sw, speed, depth, yieldCounting);
            var farPDEV = CalcPDEV(farResult.Item1, farResult.Item2);
 
            var nearResult = COMergeCalcService.GetNearMergeCOResult(modelId, porosity, sw, speed, depth, yieldCounting);
            var nearPDEV = CalcPDEV(nearResult.Item1, nearResult.Item2);
 
            return Math.Sqrt(Math.Pow(nearPDEV * nearCofe, 2) + Math.Pow(farPDEV * farCofe, 2));
        }
 
        private static double CalcPDEV(double c, double o) => c / o * Math.Sqrt((1 / c + 1 / o));
    }
}