Stores well test and gets latest kFactor
This commit is contained in:
78
src/main/java/com/henrypump/poc/WellTest.java
Normal file
78
src/main/java/com/henrypump/poc/WellTest.java
Normal 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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user