Well measurements now can be stored in database

also added some more sample data
This commit is contained in:
Patrick McDonagh
2017-02-06 18:06:35 -06:00
parent 73d376038c
commit 02b28ca1e6
22 changed files with 446 additions and 108 deletions

166
.idea/workspace.xml generated
View File

@@ -2,29 +2,18 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="28cc251f-c94f-44ee-a66d-77aaab6e3483" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/uiDesigner.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/java/com/henrypump/poc/GUI.java" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/java/com/henrypump/poc/Measurement.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/target/classes/com/henrypump/poc/AnalogIn.class" afterPath="$PROJECT_DIR$/target/classes/com/henrypump/poc/AnalogIn.class" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/target/classes/com/henrypump/poc/Card.class" afterPath="$PROJECT_DIR$/target/classes/com/henrypump/poc/Card.class" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/target/classes/com/henrypump/poc/Database.class" afterPath="$PROJECT_DIR$/target/classes/com/henrypump/poc/Database.class" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/target/classes/com/henrypump/poc/DigitalIn.class" afterPath="$PROJECT_DIR$/target/classes/com/henrypump/poc/DigitalIn.class" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/target/classes/com/henrypump/poc/DigitalOut.class" afterPath="$PROJECT_DIR$/target/classes/com/henrypump/poc/DigitalOut.class" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/target/classes/com/henrypump/poc/POC.class" afterPath="$PROJECT_DIR$/target/classes/com/henrypump/poc/POC.class" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/target/classes/com/henrypump/poc/Well.class" afterPath="$PROJECT_DIR$/target/classes/com/henrypump/poc/Well.class" />
<change type="DELETED" beforePath="$PROJECT_DIR$/target/classes/com/henrypump/poc/AnalogIn.class" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/target/classes/com/henrypump/poc/DigitalIn.class" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/target/classes/com/henrypump/poc/DigitalOut.class" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/target/classes/com/henrypump/poc/POC.class" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/target/classes/com/henrypump/poc/Well.class" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/target/original-poc-java-1.0-SNAPSHOT.jar" afterPath="$PROJECT_DIR$/target/original-poc-java-1.0-SNAPSHOT.jar" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/target/poc-java-1.0-SNAPSHOT.jar" afterPath="$PROJECT_DIR$/target/poc-java-1.0-SNAPSHOT.jar" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/com/henrypump/poc/AnalogIn.java" afterPath="$PROJECT_DIR$/src/main/java/com/henrypump/poc/AnalogIn.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/com/henrypump/poc/Card.java" afterPath="$PROJECT_DIR$/src/main/java/com/henrypump/poc/Card.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/com/henrypump/poc/Database.java" afterPath="$PROJECT_DIR$/src/main/java/com/henrypump/poc/Database.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/com/henrypump/poc/DigitalIn.java" afterPath="$PROJECT_DIR$/src/main/java/com/henrypump/poc/DigitalIn.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/com/henrypump/poc/DigitalOut.java" afterPath="$PROJECT_DIR$/src/main/java/com/henrypump/poc/DigitalOut.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/com/henrypump/poc/POC.java" afterPath="$PROJECT_DIR$/src/main/java/com/henrypump/poc/POC.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/com/henrypump/poc/Measurement.java" afterPath="$PROJECT_DIR$/src/main/java/com/henrypump/poc/Measurement.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/com/henrypump/poc/Well.java" afterPath="$PROJECT_DIR$/src/main/java/com/henrypump/poc/Well.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/target/maven-archiver/pom.properties" afterPath="$PROJECT_DIR$/target/maven-archiver/pom.properties" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst" afterPath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst" afterPath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/target/surefire-reports/TEST-com.henrypump.poc.AppTest.xml" afterPath="$PROJECT_DIR$/target/surefire-reports/TEST-com.henrypump.poc.AppTest.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/target/surefire-reports/com.henrypump.poc.AppTest.txt" afterPath="$PROJECT_DIR$/target/surefire-reports/com.henrypump.poc.AppTest.txt" />
</list>
@@ -45,8 +34,8 @@
<file leaf-file-name="Card.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/Card.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1170">
<caret line="100" column="5" lean-forward="true" selection-start-line="100" selection-start-column="5" selection-end-line="100" selection-end-column="5" />
<state relative-caret-position="180">
<caret line="63" column="26" lean-forward="true" selection-start-line="63" selection-start-column="26" selection-end-line="63" selection-end-column="52" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#3937#3938#0" expanded="true" />
@@ -83,8 +72,18 @@
<file leaf-file-name="Well.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/Well.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="7021">
<caret line="946" column="46" lean-forward="false" selection-start-line="946" selection-start-column="46" selection-end-line="946" selection-end-column="46" />
<state relative-caret-position="727">
<caret line="159" column="0" lean-forward="true" selection-start-line="159" selection-start-column="0" selection-end-line="159" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Database.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/Database.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="740">
<caret line="108" column="34" lean-forward="true" selection-start-line="108" selection-start-column="34" selection-end-line="108" selection-end-column="34" />
<folding />
</state>
</provider>
@@ -93,8 +92,25 @@
<file leaf-file-name="Measurement.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/Measurement.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="675">
<caret line="55" column="6" lean-forward="true" selection-start-line="55" selection-start-column="6" selection-end-line="55" selection-end-column="6" />
<state relative-caret-position="650">
<caret line="120" column="20" lean-forward="true" selection-start-line="120" selection-start-column="20" selection-end-line="120" selection-end-column="20" />
<folding>
<element signature="e#1863#1864#0" expanded="true" />
<element signature="e#1893#1894#0" expanded="true" />
<element signature="e#1928#1929#0" expanded="true" />
<element signature="e#1959#1960#0" expanded="true" />
<element signature="e#1994#1995#0" expanded="true" />
<element signature="e#2025#2026#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="viceroyWell.json" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/viceroyWell.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="12" column="20" lean-forward="false" selection-start-line="12" selection-start-column="20" selection-end-line="12" selection-end-column="20" />
<folding />
</state>
</provider>
@@ -143,11 +159,12 @@
<option value="$PROJECT_DIR$/src/main/java/com/henrypump/poc/DigitalOut.java" />
<option value="$PROJECT_DIR$/src/main/java/com/henrypump/poc/AnalogIn.java" />
<option value="$PROJECT_DIR$/src/main/java/com/henrypump/poc/GUI.java" />
<option value="$PROJECT_DIR$/src/main/java/com/henrypump/poc/Database.java" />
<option value="$PROJECT_DIR$/src/main/java/com/henrypump/poc/DailyTotal.java" />
<option value="$PROJECT_DIR$/src/main/java/com/henrypump/poc/Card.java" />
<option value="$PROJECT_DIR$/src/main/java/com/henrypump/poc/POC.java" />
<option value="$PROJECT_DIR$/viceroyWell.json" />
<option value="$PROJECT_DIR$/src/main/java/com/henrypump/poc/Well.java" />
<option value="$PROJECT_DIR$/src/main/java/com/henrypump/poc/Database.java" />
<option value="$PROJECT_DIR$/src/main/java/com/henrypump/poc/Measurement.java" />
</list>
</option>
@@ -160,9 +177,9 @@
</option>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="230" />
<option name="x" value="10" />
<option name="y" value="23" />
<option name="width" value="1450" />
<option name="width" value="1670" />
<option name="height" value="959" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
@@ -262,9 +279,9 @@
</pattern>
</extension>
<option name="MAIN_CLASS_NAME" value="com.henrypump.poc.POC" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="viceroyWell.json card_72599_surface.csv" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
@@ -503,7 +520,7 @@
<servers />
</component>
<component name="ToolWindowManager">
<frame x="230" y="23" width="1450" height="959" extended-state="0" />
<frame x="10" y="23" width="1670" height="959" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
@@ -521,7 +538,7 @@
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32206896" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.27825552" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
@@ -599,13 +616,13 @@
<state relative-caret-position="810">
<caret line="72" column="28" lean-forward="false" selection-start-line="72" selection-start-column="28" selection-end-line="72" selection-end-column="28" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1554#1562#0" expanded="true" />
<element signature="e#1606#1614#0" expanded="true" />
<element signature="e#1658#1666#0" expanded="true" />
<element signature="e#1710#1718#0" expanded="true" />
<element signature="e#2522#2523#0" expanded="true" />
<element signature="e#2557#2558#0" expanded="true" />
<element signature="imports" expanded="false" />
<element signature="e#1642#1650#0" expanded="false" />
<element signature="e#1694#1702#0" expanded="false" />
<element signature="e#1746#1754#0" expanded="false" />
<element signature="e#1798#1806#0" expanded="false" />
<element signature="e#2610#2611#0" expanded="false" />
<element signature="e#2645#2646#0" expanded="false" />
</folding>
</state>
</provider>
@@ -615,7 +632,7 @@
<state relative-caret-position="195">
<caret line="19" column="4" lean-forward="false" selection-start-line="19" selection-start-column="4" selection-end-line="28" selection-end-column="5" />
<folding>
<element signature="imports" expanded="true" />
<element signature="imports" expanded="false" />
</folding>
</state>
</provider>
@@ -783,7 +800,7 @@
<state relative-caret-position="525">
<caret line="39" column="5" lean-forward="false" selection-start-line="39" selection-start-column="5" selection-end-line="39" selection-end-column="5" />
<folding>
<element signature="imports" expanded="true" />
<element signature="imports" expanded="false" />
</folding>
</state>
</provider>
@@ -793,7 +810,7 @@
<state relative-caret-position="180">
<caret line="17" column="22" lean-forward="false" selection-start-line="17" selection-start-column="22" selection-end-line="17" selection-end-column="22" />
<folding>
<element signature="imports" expanded="true" />
<element signature="imports" expanded="false" />
</folding>
</state>
</provider>
@@ -836,22 +853,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/Database.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="403">
<caret line="56" column="1" lean-forward="true" selection-start-line="56" selection-start-column="1" selection-end-line="56" selection-end-column="1" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1554#1562#0" expanded="true" />
<element signature="e#1606#1614#0" expanded="true" />
<element signature="e#1658#1666#0" expanded="true" />
<element signature="e#1710#1718#0" expanded="true" />
<element signature="e#2522#2523#0" expanded="true" />
<element signature="e#2557#2558#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/DailyTotal.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
@@ -860,10 +861,20 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/POC.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="478">
<caret line="94" column="51" lean-forward="true" selection-start-line="94" selection-start-column="51" selection-end-line="94" selection-end-column="51" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/Card.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1170">
<caret line="100" column="5" lean-forward="true" selection-start-line="100" selection-start-column="5" selection-end-line="100" selection-end-column="5" />
<state relative-caret-position="180">
<caret line="63" column="26" lean-forward="true" selection-start-line="63" selection-start-column="26" selection-end-line="63" selection-end-column="52" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#3937#3938#0" expanded="true" />
@@ -896,29 +907,42 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/POC.java">
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/Well.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="478">
<caret line="94" column="51" lean-forward="true" selection-start-line="94" selection-start-column="51" selection-end-line="94" selection-end-column="51" />
<folding>
<element signature="imports" expanded="true" />
</folding>
<state relative-caret-position="727">
<caret line="159" column="0" lean-forward="true" selection-start-line="159" selection-start-column="0" selection-end-line="159" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/Well.java">
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/Database.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="7021">
<caret line="946" column="46" lean-forward="false" selection-start-line="946" selection-start-column="46" selection-end-line="946" selection-end-column="46" />
<state relative-caret-position="740">
<caret line="108" column="34" lean-forward="true" selection-start-line="108" selection-start-column="34" selection-end-line="108" selection-end-column="34" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/viceroyWell.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="12" column="20" lean-forward="false" selection-start-line="12" selection-start-column="20" selection-end-line="12" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/Measurement.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="675">
<caret line="55" column="6" lean-forward="true" selection-start-line="55" selection-start-column="6" selection-end-line="55" selection-end-column="6" />
<folding />
<state relative-caret-position="650">
<caret line="120" column="20" lean-forward="true" selection-start-line="120" selection-start-column="20" selection-end-line="120" selection-end-column="20" />
<folding>
<element signature="e#1863#1864#0" expanded="true" />
<element signature="e#1893#1894#0" expanded="true" />
<element signature="e#1928#1929#0" expanded="true" />
<element signature="e#1959#1960#0" expanded="true" />
<element signature="e#1994#1995#0" expanded="true" />
<element signature="e#2025#2026#0" expanded="true" />
</folding>
</state>
</provider>
</entry>

93
card_72553_surface.csv Normal file
View File

@@ -0,0 +1,93 @@
59.63,8931.32
58.61,8961.83
56.97,9005.15
55.54,9054.01
54,9036.51
52.16,8997.6
50.41,8943.79
48.92,8883.01
47.12,8847.43
44.93,8855.57
42.33,8884.24
40.1,8922.82
37.55,8979.9
35.41,8993.98
33.2,8965.07
30.77,8940.1
28.78,8858.56
26.49,8747.87
23.8,8631.45
21.31,8507.47
18.37,8347.07
15.84,8045.48
13.34,7587.85
11.65,7209.09
9.58,6940.47
7.92,6768.48
6.8,6571.79
5.44,6328.91
4.63,6211.27
3.71,6271.58
2.84,6358.21
2.13,6440.61
2.16,6641.52
2.08,6792.9
2.52,6848.87
2.77,6874.81
3.23,6884.44
3.8,6940.09
4.28,7079.42
5.25,7216.62
6.06,7363.91
7.07,7479.73
8.2,7678.34
9.65,7875.29
11.46,8155.62
12.57,8381.63
14.23,8566.37
15.64,8782.56
17.17,9049.55
18.72,9330.57
20.27,9589.98
21.61,9828.33
23.12,9972.63
24.8,9998.86
26.45,9901.37
28.02,9820.17
29.16,9726.98
30.77,9527.96
32.57,9504.61
34.59,9592.22
36.45,9693.48
38.28,9798.35
39.95,9861.31
41.56,9870.49
43.77,9825.13
45.12,9717.1
46.95,9601.26
48.91,9504.41
50.68,9441.93
52.1,9488.93
53.06,9571.91
54.78,9613.14
55.98,9628.48
57.32,9634.16
58.53,9600.68
59.5,9508.89
60.58,9434.98
61.08,9402.21
61.96,9385.84
63.05,9358.72
63.06,9380.73
63.47,9405.76
63.66,9408.4
63.75,9395.02
63.74,9384.16
63.67,9315.63
63.45,9221.35
63.15,9139.15
62.65,9066.4
62.06,8989.17
61.48,8917.91
61.33,8929.18
59.63,8931.32
1 59.63 8931.32
2 58.61 8961.83
3 56.97 9005.15
4 55.54 9054.01
5 54 9036.51
6 52.16 8997.6
7 50.41 8943.79
8 48.92 8883.01
9 47.12 8847.43
10 44.93 8855.57
11 42.33 8884.24
12 40.1 8922.82
13 37.55 8979.9
14 35.41 8993.98
15 33.2 8965.07
16 30.77 8940.1
17 28.78 8858.56
18 26.49 8747.87
19 23.8 8631.45
20 21.31 8507.47
21 18.37 8347.07
22 15.84 8045.48
23 13.34 7587.85
24 11.65 7209.09
25 9.58 6940.47
26 7.92 6768.48
27 6.8 6571.79
28 5.44 6328.91
29 4.63 6211.27
30 3.71 6271.58
31 2.84 6358.21
32 2.13 6440.61
33 2.16 6641.52
34 2.08 6792.9
35 2.52 6848.87
36 2.77 6874.81
37 3.23 6884.44
38 3.8 6940.09
39 4.28 7079.42
40 5.25 7216.62
41 6.06 7363.91
42 7.07 7479.73
43 8.2 7678.34
44 9.65 7875.29
45 11.46 8155.62
46 12.57 8381.63
47 14.23 8566.37
48 15.64 8782.56
49 17.17 9049.55
50 18.72 9330.57
51 20.27 9589.98
52 21.61 9828.33
53 23.12 9972.63
54 24.8 9998.86
55 26.45 9901.37
56 28.02 9820.17
57 29.16 9726.98
58 30.77 9527.96
59 32.57 9504.61
60 34.59 9592.22
61 36.45 9693.48
62 38.28 9798.35
63 39.95 9861.31
64 41.56 9870.49
65 43.77 9825.13
66 45.12 9717.1
67 46.95 9601.26
68 48.91 9504.41
69 50.68 9441.93
70 52.1 9488.93
71 53.06 9571.91
72 54.78 9613.14
73 55.98 9628.48
74 57.32 9634.16
75 58.53 9600.68
76 59.5 9508.89
77 60.58 9434.98
78 61.08 9402.21
79 61.96 9385.84
80 63.05 9358.72
81 63.06 9380.73
82 63.47 9405.76
83 63.66 9408.4
84 63.75 9395.02
85 63.74 9384.16
86 63.67 9315.63
87 63.45 9221.35
88 63.15 9139.15
89 62.65 9066.4
90 62.06 8989.17
91 61.48 8917.91
92 61.33 8929.18
93 59.63 8931.32

91
card_72599_surface.csv Normal file
View File

@@ -0,0 +1,91 @@
2.27,6647.01
2.47,6781.62
2.57,6877.5
3.29,6927.34
4.13,7012.26
5.24,7136.89
6.38,7301.06
7.62,7453.24
8.85,7511.86
10.52,7801.23
12.09,8135.34
13.71,8472.58
15.38,8775.46
17.08,9040.17
18.7,9281.46
20.62,9554.6
21.79,9837.75
23.33,10026.14
24.88,10065.05
26.59,10027.72
28.45,10010.12
30.47,9817.81
32.15,9569.99
34.22,9504.56
36.15,9563.69
37.68,9665.51
39.27,9787.29
41.26,9898.32
43.19,9925.73
45.45,9851.39
47.18,9737.22
48.91,9617.55
50.65,9492.06
51.76,9449.17
53.91,9492.22
55.09,9531.77
56.62,9556.49
57.61,9605.07
58.73,9623.09
59.53,9578.76
61.03,9546.23
61.56,9479.4
62.23,9413.47
62.62,9360.98
63.22,9369.86
63.6,9393.46
63.66,9374.46
63.81,9353.2
63.94,9333.27
64.05,9253.82
63.36,9171.68
62.79,9092.98
62.3,9003.93
61.11,8917.62
60.59,8885.99
59.54,8884.73
58.04,8884.89
59.63,8891.33
57.03,8770.51
55.46,8385.32
53.82,7939.27
51.89,7697.84
49.97,7532.28
47.8,7306.41
46.86,7094.1
43.25,6486.33
42.18,6032.48
40.39,5741.57
38.34,5567.73
36.19,5658.75
34.07,5947.52
31.87,6190.38
29.77,6339.08
27.34,6452.03
25.24,6425.81
23.17,6199.45
20.99,6006.58
19.01,5923.79
17.26,5871.74
14.69,5897.66
13.47,6031.26
11.43,6267.97
9.58,6412.46
7.77,6529.07
6.48,6604.53
5.27,6518.29
4.24,6417.91
3.22,6372.81
3.03,6350.93
2.52,6362.76
2.5,6481.35
1 2.27 6647.01
2 2.47 6781.62
3 2.57 6877.5
4 3.29 6927.34
5 4.13 7012.26
6 5.24 7136.89
7 6.38 7301.06
8 7.62 7453.24
9 8.85 7511.86
10 10.52 7801.23
11 12.09 8135.34
12 13.71 8472.58
13 15.38 8775.46
14 17.08 9040.17
15 18.7 9281.46
16 20.62 9554.6
17 21.79 9837.75
18 23.33 10026.14
19 24.88 10065.05
20 26.59 10027.72
21 28.45 10010.12
22 30.47 9817.81
23 32.15 9569.99
24 34.22 9504.56
25 36.15 9563.69
26 37.68 9665.51
27 39.27 9787.29
28 41.26 9898.32
29 43.19 9925.73
30 45.45 9851.39
31 47.18 9737.22
32 48.91 9617.55
33 50.65 9492.06
34 51.76 9449.17
35 53.91 9492.22
36 55.09 9531.77
37 56.62 9556.49
38 57.61 9605.07
39 58.73 9623.09
40 59.53 9578.76
41 61.03 9546.23
42 61.56 9479.4
43 62.23 9413.47
44 62.62 9360.98
45 63.22 9369.86
46 63.6 9393.46
47 63.66 9374.46
48 63.81 9353.2
49 63.94 9333.27
50 64.05 9253.82
51 63.36 9171.68
52 62.79 9092.98
53 62.3 9003.93
54 61.11 8917.62
55 60.59 8885.99
56 59.54 8884.73
57 58.04 8884.89
58 59.63 8891.33
59 57.03 8770.51
60 55.46 8385.32
61 53.82 7939.27
62 51.89 7697.84
63 49.97 7532.28
64 47.8 7306.41
65 46.86 7094.1
66 43.25 6486.33
67 42.18 6032.48
68 40.39 5741.57
69 38.34 5567.73
70 36.19 5658.75
71 34.07 5947.52
72 31.87 6190.38
73 29.77 6339.08
74 27.34 6452.03
75 25.24 6425.81
76 23.17 6199.45
77 20.99 6006.58
78 19.01 5923.79
79 17.26 5871.74
80 14.69 5897.66
81 13.47 6031.26
82 11.43 6267.97
83 9.58 6412.46
84 7.77 6529.07
85 6.48 6604.53
86 5.27 6518.29
87 4.24 6417.91
88 3.22 6372.81
89 3.03 6350.93
90 2.52 6362.76
91 2.5 6481.35

View File

@@ -11,6 +11,9 @@ import com.mongodb.client.MongoCollection;
import com.mongodb.client.model.Sorts;
import org.bson.Document;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import com.mongodb.client.MongoCursor;
@@ -21,6 +24,7 @@ import com.mongodb.client.result.DeleteResult;
import static com.mongodb.client.model.Updates.*;
import com.mongodb.client.result.UpdateResult;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class Database {
private String pocDatabase = "poc";
@@ -76,4 +80,35 @@ public class Database {
public void close(){
mongoClient.close();
}
public long newMeasurement(Measurement inpMeasurement){
String df = new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss").format(new Date());
MongoCollection<Document> collection = database.getCollection("wellData");
Document doc = new Document("tagname", inpMeasurement.getTagName())
.append("currentValue", inpMeasurement.getCurrentValue())
.append("maxDailyValue", inpMeasurement.getDailyMax())
.append("minDailyValue", inpMeasurement.getDailyMin())
.append("dailyAverage", inpMeasurement.getAverage())
.append("dailyTotal", inpMeasurement.getTotal())
.append("timestamp", df);
collection.insertOne(doc);
return collection.count();
}
public long newDailyTotal(Measurement inpMeasurement){
String df = new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss").format(new Date());
MongoCollection<Document> collection = database.getCollection("gaugeOffData");
Document doc = new Document("tagname", inpMeasurement.getTagName())
.append("currentValue", inpMeasurement.getCurrentValue())
.append("maxDailyValue", inpMeasurement.getDailyMax())
.append("minDailyValue", inpMeasurement.getDailyMin())
.append("dailyAverage", inpMeasurement.getAverage())
.append("dailyTotal", inpMeasurement.getTotal())
.append("timestamp", df);
collection.insertOne(doc);
return collection.count();
}
}

View File

@@ -1,25 +1,54 @@
package com.henrypump.poc;
import static java.lang.Math.abs;
/**
* Created by patrickjmcd on 2/3/17.
*/
public class Measurement {
private String tagName;
private double currentValue;
private double lastValue;
private double average;
private double total;
private double max;
private double min;
private double dailyMax;
private double dailyMin;
private double[] totalHistory = new double[30];
private double[] averageHistory = new double[30];
private long numMeasurements;
private boolean storeInDatabase;
private double lastSentValue;
private double sendDelta;
private Database db;
private long lastSentTimestamp;
private long sendTimeDelta;
Measurement(){
Measurement(String tagName, boolean storeInDatabase, Database db, double sendDelta, long sendTimeDelta){
this.tagName = tagName;
average = 0;
total = 0;
numMeasurements = 0;
max = Double.MIN_VALUE;
min = Double.MAX_VALUE;
dailyMax = Double.MIN_VALUE;
dailyMin = Double.MAX_VALUE;
// Database code
this.storeInDatabase = storeInDatabase;
this.db = db;
this.sendDelta = sendDelta;
this.lastSentValue = 0.0;
this.sendTimeDelta = sendTimeDelta;
}
Measurement(String tagName, boolean storeInDatabase){
this.tagName = tagName;
average = 0;
total = 0;
numMeasurements = 0;
dailyMax = Double.MIN_VALUE;
dailyMin = Double.MAX_VALUE;
// Database code
this.storeInDatabase = storeInDatabase;
}
public double getCurrentValue() {
@@ -42,8 +71,21 @@ public class Measurement {
return numMeasurements;
}
public String getTagName() {
return tagName;
}
public double getDailyMax() {
return dailyMax;
}
public double getDailyMin() {
return dailyMin;
}
public void update(double value)
{
long currentTimestamp = System.currentTimeMillis();
lastValue = currentValue;
currentValue = value;
@@ -51,11 +93,22 @@ public class Measurement {
average = average * (((float)numMeasurements - 1)/(float)numMeasurements) + (currentValue / (float)numMeasurements);
total = total + value;
max = Math.max(max, currentValue);
min = Math.min(min, currentValue);
};
dailyMax = Math.max(dailyMax, currentValue);
dailyMin = Math.min(dailyMin, currentValue);
if(storeInDatabase){
if(abs(currentValue - lastSentValue) > sendDelta ||
currentTimestamp - lastSentTimestamp > (sendTimeDelta * 1000)){
db.newMeasurement(this);
lastSentValue = currentValue;
}
}
}
public void endOfDay(){
if (storeInDatabase){
db.newDailyTotal(this);
}
for(int i = 28; i >= 0; i--){
totalHistory[i] = totalHistory[i+1];
averageHistory[i] = averageHistory[i+1];
@@ -66,8 +119,8 @@ public class Measurement {
total = 0;
average = 0;
max = Double.MIN_VALUE;
min = Double.MAX_VALUE;
dailyMax = Double.MIN_VALUE;
dailyMin = Double.MAX_VALUE;
}

View File

@@ -27,7 +27,7 @@ public class Well {
protected Simulation sim;
protected Database db;
// IO
/* IO */
AnalogIn inclinometer;
AnalogIn loadCell;
DigitalOut runCommand;
@@ -36,7 +36,7 @@ public class Well {
private double currentDownholePosition;
private double currentDownholeLoad;
// CARDS
/* CARDS */
private Card currentCard;
private Card[] cardStorage = new Card[100];
@@ -46,7 +46,7 @@ public class Well {
public static final int BAD_STATUS = 0;
public static final int GOOD_STATUS = 1;
// USER INPUTS
/* USER INPUTS */
private double dt;
private double tubingHeadPressure;
private double fluidGradient;
@@ -139,24 +139,24 @@ public class Well {
private double fluidGasRatio; // MCF of gas per 1 BBL fluid
// Measurements
private Measurement strokeSpeed = new Measurement();
private Measurement downholeGrossStroke = new Measurement();
private Measurement downholeNetStroke = new Measurement();
private Measurement fluidLevel = new Measurement();
private Measurement fluidLoad = new Measurement();
private Measurement inflowRate = new Measurement();
private Measurement peakPolishedRodLoad = new Measurement();
private Measurement minPolishedRodLoad = new Measurement();
private Measurement percentRun = new Measurement();
private Measurement polishedRodHP = new Measurement();
private Measurement pumpHP = new Measurement();
private Measurement fluidProduced = new Measurement();
private Measurement oilProduced = new Measurement();
private Measurement waterProduced = new Measurement();
private Measurement gasProduced = new Measurement();
private Measurement pumpIntakePressure = new Measurement();
private Measurement surfaceStrokeLength = new Measurement();
private Measurement tubingMovement = new Measurement();
private Measurement strokeSpeed = new Measurement("Stroke Speed", true, db, 0.5, 600);
private Measurement downholeGrossStroke = new Measurement("Downhole Gross Stroke", true, db, 0.5, 600);
private Measurement downholeNetStroke = new Measurement("Downhole Net Stroke", true, db, 0.5, 600);
private Measurement fluidLevel = new Measurement("Fluid Level", true, db, 10, 600);
private Measurement fluidLoad = new Measurement("Fluid Load", true, db, 20, 600);
private Measurement inflowRate = new Measurement("Inflow Rate", true, db, 0.5, 600);
private Measurement peakPolishedRodLoad = new Measurement("Peak PRL", true, db, 50, 600);
private Measurement minPolishedRodLoad = new Measurement("Min PRL", true, db, 50, 600);
private Measurement percentRun = new Measurement("Percent Run", true, db, 1.0, 600);
private Measurement polishedRodHP = new Measurement("Polished Rod HP", true, db, 0.25, 600);
private Measurement pumpHP = new Measurement("Pump HP", true, db, 0.25, 600);
private Measurement fluidProduced = new Measurement("Fluid Produced", true, db, 1.0, 600);
private Measurement oilProduced = new Measurement("Oil Produced", true, db, 1.0, 600);
private Measurement waterProduced = new Measurement("Water Produced", true, db, 1.0, 600);
private Measurement gasProduced = new Measurement("Gas Produced", true, db, 1.0, 600);
private Measurement pumpIntakePressure = new Measurement("Pump Intake Pressure", true, db, 5.0, 600);
private Measurement surfaceStrokeLength = new Measurement("Surface Stroke", true, db, 0.5, 1800);
private Measurement tubingMovement = new Measurement("Tubing Movement", true, db, 0.5, 600);
Well(String wellName, int inclinometerChannel, int loadCellChannel, int runCommandChannel){
this.wellName = wellName;
@@ -529,6 +529,13 @@ public class Well {
inputTable.addRule();
inputTable.addRow("Number of Tapers", getNumTapers());
inputTable.addRule();
inputTable.addRow("Buoyant Force Total", buoyantForceTotal);
inputTable.addRow("Weight Data Total", weightDataTotal);
inputTable.addRow("Annular Force Data Total", annularForceDataTotal);
inputTable.addRow("Rod Depth Total", rodDepthTotal);
inputTable.addRow("Rod Weight Air Total", rodWeightAirTotal);
inputTable.addRow("Rod Weight Fluid Total", rodWeightFluidTotal);
inputTable.addRule();
V2_AsciiTableRenderer rend = new V2_AsciiTableRenderer();
rend.setTheme(V2_E_TableThemes.UTF_LIGHT.get());
rend.setWidth(new WidthAbsoluteEven(50));
@@ -547,6 +554,23 @@ public class Well {
taperTable.addRow("Rod Material", getRodMaterial(i));
taperTable.addRow("Rod Young's Modulus", getRodYM(i));
taperTable.addRule();
taperTable.addRow("a", a[i]);
taperTable.addRow("Area", area[i]);
taperTable.addRow("Pressure", pressure[i]);
taperTable.addRow("Buoyant Force", buoyantForce[i]);
taperTable.addRow("Stretch", stretch[i]);
taperTable.addRow("WeightData", weightData[i]);
taperTable.addRow("Annular Force Data", annularForceData[i]);
taperTable.addRow("force", force[i]);
taperTable.addRow("Alpha", alpha[i]);
taperTable.addRow("xOverA", xOverA[i]);
taperTable.addRow("Factor", factor[i]);
taperTable.addRow("Lag Index", lagIndex[i]);
taperTable.addRow("Length Required", lengthRequired[i]);
taperTable.addRow("Center Point", centerPoint[i]);
taperTable.addRow("Rod Depth", rodDepth[i]);
taperTable.addRow("Rod Weight in Air", rodWeightAir[i]);
taperTable.addRow("Rod Weight in Fluid", rodWeightFluid[i]);
rend.setTheme(V2_E_TableThemes.UTF_LIGHT.get());
rend.setWidth(new WidthAbsoluteEven(50));
rt = rend.render(taperTable);
@@ -554,7 +578,6 @@ public class Well {
System.out.println();
}
};
public void updateTapers(){
@@ -851,7 +874,7 @@ public class Well {
cardStorage[j + 1] = cardStorage[j];
}
cardStorage[0] = currentCard;
currentCard.printCard("none", true);
currentCard.printCard("csv", true);
strokesSinceStart++;
strokesToday++;
strokesLifetime++;

View File

@@ -1,5 +1,5 @@
#Generated by Maven
#Fri Feb 03 16:32:08 CST 2017
#Mon Feb 06 13:36:59 CST 2017
version=1.0-SNAPSHOT
groupId=com.henrypump.poc
artifactId=poc-java

Binary file not shown.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite tests="1" failures="0" name="com.henrypump.poc.AppTest" time="0.001" errors="0" skipped="0">
<testsuite tests="1" failures="0" name="com.henrypump.poc.AppTest" time="0.002" errors="0" skipped="0">
<properties>
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
<property name="sun.boot.library.path" value="/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib"/>
@@ -62,5 +62,5 @@
<property name="ftp.nonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
<property name="sun.cpu.isalist" value=""/>
</properties>
<testcase classname="com.henrypump.poc.AppTest" name="testApp" time="0.001"/>
<testcase classname="com.henrypump.poc.AppTest" name="testApp" time="0.002"/>
</testsuite>

View File

@@ -1,4 +1,4 @@
-------------------------------------------------------------------------------
Test set: com.henrypump.poc.AppTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec

19
viceroyWell.json Normal file
View File

@@ -0,0 +1,19 @@
{
"deltaT": 0.1,
"pumpDiameter": 1.5,
"fluidGradient": 0.45,
"tubingID": 1.995,
"tubingOD": 2.375,
"tubingAnchorDepth": 0.0,
"structuralRating": 320000.0,
"stuffingBoxFriction": 100.0,
"tubingHeadPressure": 40.0,
"tapers": [
{
"length": 4180.0,
"diameter": 0.75,
"material": "steel",
"dampingFactor": 0.8
}
]
}