POC class is working and threadable

This commit is contained in:
Patrick McDonagh
2017-02-01 18:42:55 -06:00
parent a7073aae9c
commit 3093ddcdd9
18 changed files with 709 additions and 120 deletions

View File

@@ -18,14 +18,15 @@ import java.io.IOException;
* Created by patrickjmcd on 1/31/17.
*/
public class Well {
private String wellName;
private double[][] topPosArray = new double[10][100];
private double[][] topLoadArray = new double[10][100];
// CONSTANTS
private static double YM_STEEL = 30.5;
private static double YM_FIBERGLASS = 7.2;
private static final int BAD_STATUS = 0;
private static final int GOOD_STATUS = 0;
public static final int BAD_STATUS = 0;
public static final int GOOD_STATUS = 1;
// USER INPUTS
private double dt;
@@ -85,6 +86,10 @@ public class Well {
private int[] count = new int[11];
private double sPositionPrevious;
Well(String wellName){
this.wellName = wellName;
}
public double getDt() {
return dt;
}
@@ -196,6 +201,22 @@ public class Well {
return "unknown";
}
public double getFrictionEstimate() {
return frictionEstimate;
}
public double getRodDepthTotal() {
return rodDepthTotal;
}
public double getPumpArea() {
return pumpArea;
}
public double getTubingCrossSectionalArea() {
return tubingCrossSectionalArea;
}
public double getStructuralRating() {
return structuralRating;
}
@@ -298,7 +319,6 @@ public class Well {
if (newDiameter != null) setRodDiameter(currentTaperNum, (Double) newDiameter);
Object newMaterial = taperObj.get("material");
System.out.println("found material " + (String) newMaterial);
if (newMaterial != null) setRodYM(currentTaperNum, (String) newMaterial);
Object newDampingFactor = taperObj.get("dampingFactor");
@@ -312,16 +332,19 @@ public class Well {
} catch (ParseException e) {
e.printStackTrace();
}
updateTapers();
}
public void printTapers(){
System.out.println("!!!!!! " + wellName + " !!!!!!");
System.out.println("=== INPUT PARAMETERS ===");
System.out.println("DeltaT: " + getDt());
System.out.println("Fluid Gradient: " + getFluidGradient());
System.out.println("Pump Diameter: " + getPumpDiameter());
System.out.println("Stuffing Box Friction: " + getSbfriction());
System.out.println("Structural Rating: " + getStructuralRating());
System.out.println("Friction Estimate: " + getFrictionEstimate());
System.out.println("Tubing Anchor Depth: " + getTubingAnchorDepth());
System.out.println("Tubing Head Pressure: " + getTubingHeadPressure());
System.out.println("Tubing ID: " + getTubingID());
@@ -583,7 +606,7 @@ public class Well {
};
public static void main( String[] args ){
Well thisWell = new Well();
Well thisWell = new Well("Barney");
thisWell.parseJSONFile(args[0]);
// thisWell.parseJSONFile("/Users/patrickjmcd/Henry_Pump/poc-java/wellSetup.json");
thisWell.printTapers();