Stores well test and gets latest kFactor

This commit is contained in:
Patrick McDonagh
2017-02-07 19:02:10 -06:00
parent 1699b82067
commit 2a13a25f06
16 changed files with 1125 additions and 355 deletions

View File

@@ -0,0 +1,78 @@
package com.henrypump.poc;
import org.bson.Document;
import java.util.Date;
/**
* Created by patrickjmcd on 2/7/17.
*/
public class WellTest {
private double testHours;
private Date testStart;
private double totalFluidBBL, testOilBBL, testWaterBBL, testGasMCF;
private double kFactor, oilRatio, waterRatio, gasMCFRatio;
public WellTest(Date testStart, double testHours, double totalFluidBBL, double testOilBBL, double testWaterBBL, double testGasMCF, Well well) {
this.testStart = testStart;
this.testHours = testHours;
this.totalFluidBBL = totalFluidBBL;
this.testOilBBL = testOilBBL;
this.testWaterBBL = testWaterBBL;
this.testGasMCF = testGasMCF;
this.oilRatio = this.testOilBBL / this.totalFluidBBL;
this.waterRatio = this.testWaterBBL / this.totalFluidBBL;
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;
} else {
System.out.println("No production data in db");
}
}
public double getTestHours() {
return testHours;
}
public Date getTestStart() {
return testStart;
}
public double getTotalFluidBBL() {
return totalFluidBBL;
}
public double getTestOilBBL() {
return testOilBBL;
}
public double getTestWaterBBL() {
return testWaterBBL;
}
public double getTestGasMCF() {
return testGasMCF;
}
public double getkFactor() {
return kFactor;
}
public double getOilRatio() {
return oilRatio;
}
public double getWaterRatio() {
return waterRatio;
}
public double getGasMCFRatio() {
return gasMCFRatio;
}
}