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) { var farResult = COMergeCalcService.GetFarMergeCOResult(modelId, porosity, sw, speed, depth); var farPDEV = CalcPDEV(farResult.Item1, farResult.Item2); var nearResult = COMergeCalcService.GetNearMergeCOResult(modelId, porosity, sw, speed, depth); var nearPDEV = CalcPDEV(nearResult.Item1, nearResult.Item2); return nearPDEV * 0.65 + farPDEV * 0.35; } private static double CalcPDEV(double c, double o) => Math.Sqrt(Math.Pow(c / o, 2) * (1 / c + 1 / o)); } }