WellTest class no longer depends on Well class

This will allow it to be run from another thread if necessary
This commit is contained in:
Patrick McDonagh
2017-02-07 19:09:32 -06:00
parent 2a13a25f06
commit 1771df0730
3 changed files with 76 additions and 85 deletions

View File

@@ -14,7 +14,7 @@ public class WellTest {
private double kFactor, oilRatio, waterRatio, gasMCFRatio;
public WellTest(Date testStart, double testHours, double totalFluidBBL, double testOilBBL, double testWaterBBL, double testGasMCF, Well well) {
public WellTest(Date testStart, double testHours, double totalFluidBBL, double testOilBBL, double testWaterBBL, double testGasMCF, double prevDailyTotal) {
this.testStart = testStart;
this.testHours = testHours;
this.totalFluidBBL = totalFluidBBL;
@@ -27,9 +27,9 @@ public class WellTest {
this.gasMCFRatio = this.testGasMCF / this.totalFluidBBL;
this.kFactor = 1.0;
double lastProductionMeasured = well.db.getPreviousDailyTotal(this.testStart);
if(lastProductionMeasured != -1.0){;
this.kFactor = this.totalFluidBBL / lastProductionMeasured;
if(prevDailyTotal != -1.0){;
this.kFactor = this.totalFluidBBL / prevDailyTotal;
} else {
System.out.println("No production data in db");
}