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:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user