From a8c3a9d90ba64fabd62d4ed6de9226819d4fcc75 Mon Sep 17 00:00:00 2001 From: Patrick McDonagh Date: Fri, 10 Feb 2017 14:58:16 -0600 Subject: [PATCH] Accurately computes friction in well and checks for stored values on updateTaper --- .idea/workspace.xml | 416 +++++++++--------- .../java/com/henrypump/poc/FluidShot.java | 2 +- src/main/java/com/henrypump/poc/Well.java | 4 + 3 files changed, 218 insertions(+), 204 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 46bc685..29ef050 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,39 +2,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - @@ -116,40 +86,43 @@ - - + + - - + + - - - + - - + + - + + - - + + - - + + - - + + + + + + @@ -158,11 +131,9 @@ - - - - - + + + @@ -170,11 +141,9 @@ - - - - - + + + @@ -182,11 +151,29 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -194,37 +181,13 @@ - - + + - - - - - - - - - - - - - - - - - - - - - - - - @@ -239,6 +202,8 @@ sPositionPrevious ΩΩ private Measurement + getFri + frictionEstimate @@ -247,7 +212,7 @@ @@ -658,7 +625,6 @@ - @@ -995,7 +961,7 @@ - + @@ -1012,7 +978,7 @@ - + @@ -1043,14 +1009,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + @@ -1060,7 +1075,7 @@ - + @@ -1070,7 +1085,7 @@ - + @@ -1080,7 +1095,7 @@ - + @@ -1090,7 +1105,7 @@ - + @@ -1108,9 +1123,9 @@ - - - + + + @@ -1120,7 +1135,7 @@ - + @@ -1130,7 +1145,7 @@ - + @@ -1140,7 +1155,8 @@ - + + @@ -1158,9 +1174,9 @@ - - - + + + @@ -1170,9 +1186,9 @@ - - - + + + @@ -1251,14 +1267,6 @@ - - - - - - - - @@ -1279,10 +1287,6 @@ - - - - @@ -1295,13 +1299,7 @@ - - - - - - - + @@ -1320,39 +1318,17 @@ - - + - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -1361,66 +1337,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + - - - - - + + + - - - - - - - - - - - - + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/com/henrypump/poc/FluidShot.java b/src/main/java/com/henrypump/poc/FluidShot.java index 5bb81b5..adc520d 100644 --- a/src/main/java/com/henrypump/poc/FluidShot.java +++ b/src/main/java/com/henrypump/poc/FluidShot.java @@ -23,7 +23,7 @@ public class FluidShot { FluidShot(double fluidLevel, double fluidGradient, double downholeLoadSpan, double totalDepth, double pumpArea){ this.fluidLevel = fluidLevel; - pumpIntakePressure = fluidLevel / fluidGradient; + pumpIntakePressure = fluidLevel * fluidGradient; frictionEstimate = downholeLoadSpan - (fluidGradient * totalDepth - pumpIntakePressure) * pumpArea; diff --git a/src/main/java/com/henrypump/poc/Well.java b/src/main/java/com/henrypump/poc/Well.java index 582ffcf..e1afa76 100644 --- a/src/main/java/com/henrypump/poc/Well.java +++ b/src/main/java/com/henrypump/poc/Well.java @@ -742,6 +742,10 @@ public class Well { theoreticalMaxFluidLoad = fluidGradient* rodDepthTotal* pumpArea; frictionEstimate = 0.10 * rodDepthTotal; + double dbFrictionEstimate = db.getLatestFrictionEstimate(); + if (dbFrictionEstimate != -1){ + frictionEstimate = dbFrictionEstimate; + } } private double position(int p)