POC class is working and threadable
This commit is contained in:
13
.idea/libraries/Maven__de_vandermeer_asciilist_0_0_3.xml
generated
Normal file
13
.idea/libraries/Maven__de_vandermeer_asciilist_0_0_3.xml
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: de.vandermeer:asciilist:0.0.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/de/vandermeer/asciilist/0.0.3/asciilist-0.0.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/de/vandermeer/asciilist/0.0.3/asciilist-0.0.3-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/de/vandermeer/asciilist/0.0.3/asciilist-0.0.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
13
.idea/libraries/Maven__de_vandermeer_asciitable_0_2_5.xml
generated
Normal file
13
.idea/libraries/Maven__de_vandermeer_asciitable_0_2_5.xml
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: de.vandermeer:asciitable:0.2.5">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/de/vandermeer/asciitable/0.2.5/asciitable-0.2.5.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/de/vandermeer/asciitable/0.2.5/asciitable-0.2.5-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/de/vandermeer/asciitable/0.2.5/asciitable-0.2.5-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
13
.idea/libraries/Maven__org_apache_commons_commons_lang3_3_4.xml
generated
Normal file
13
.idea/libraries/Maven__org_apache_commons_commons_lang3_3_4.xml
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: org.apache.commons:commons-lang3:3.4">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
332
.idea/workspace.xml
generated
332
.idea/workspace.xml
generated
@@ -1,7 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="28cc251f-c94f-44ee-a66d-77aaab6e3483" name="Default" comment="" />
|
||||
<list default="true" id="28cc251f-c94f-44ee-a66d-77aaab6e3483" name="Default" comment="">
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/vcs.xml" />
|
||||
<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/POC.class" afterPath="$PROJECT_DIR$/target/classes/com/henrypump/poc/POC.class" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/target/classes/com/henrypump/poc/Simulation.class" afterPath="$PROJECT_DIR$/target/classes/com/henrypump/poc/Simulation.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="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$/poc-java.iml" afterPath="$PROJECT_DIR$/poc-java.iml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/pom.xml" afterPath="$PROJECT_DIR$/pom.xml" />
|
||||
<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/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/Simulation.java" afterPath="$PROJECT_DIR$/src/main/java/com/henrypump/poc/Simulation.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/surefire-reports/com.henrypump.poc.AppTest.txt" afterPath="$PROJECT_DIR$/target/surefire-reports/com.henrypump.poc.AppTest.txt" />
|
||||
</list>
|
||||
<ignored path="$PROJECT_DIR$/target/" />
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="TRACKING_ENABLED" value="true" />
|
||||
@@ -16,79 +33,84 @@
|
||||
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
|
||||
<component name="FileEditorManager">
|
||||
<leaf>
|
||||
<file leaf-file-name="DigitalIn.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/DigitalIn.java">
|
||||
<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="751">
|
||||
<caret line="92" column="5" lean-forward="true" selection-start-line="38" selection-start-column="4" selection-end-line="92" selection-end-column="5" />
|
||||
<state relative-caret-position="-1182">
|
||||
<caret line="208" column="36" lean-forward="true" selection-start-line="208" selection-start-column="36" selection-end-line="208" selection-end-column="36" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#2914#2915#0" expanded="true" />
|
||||
<element signature="e#2949#2950#0" expanded="true" />
|
||||
<element signature="e#2995#2996#0" expanded="true" />
|
||||
<element signature="e#3037#3038#0" expanded="true" />
|
||||
<element signature="e#3087#3088#0" expanded="true" />
|
||||
<element signature="e#3133#3134#0" expanded="true" />
|
||||
<element signature="e#3185#3186#0" expanded="true" />
|
||||
<element signature="e#3233#3234#0" expanded="true" />
|
||||
<element signature="e#3293#3294#0" expanded="true" />
|
||||
<element signature="e#3349#3350#0" expanded="true" />
|
||||
<element signature="e#3392#3393#0" expanded="true" />
|
||||
<element signature="e#3431#3432#0" expanded="true" />
|
||||
<element signature="e#3467#3468#0" expanded="true" />
|
||||
<element signature="e#3499#3500#0" expanded="true" />
|
||||
<element signature="e#3542#3543#0" expanded="true" />
|
||||
<element signature="e#3581#3582#0" expanded="true" />
|
||||
<element signature="e#3625#3626#0" expanded="true" />
|
||||
<element signature="e#3665#3666#0" expanded="true" />
|
||||
<element signature="e#3706#3707#0" expanded="true" />
|
||||
<element signature="e#3743#3744#0" expanded="true" />
|
||||
<element signature="e#3783#3784#0" expanded="true" />
|
||||
<element signature="e#3819#3820#0" expanded="true" />
|
||||
<element signature="e#3861#3862#0" expanded="true" />
|
||||
<element signature="e#3899#3900#0" expanded="true" />
|
||||
<element signature="e#3943#3944#0" expanded="true" />
|
||||
<element signature="e#3983#3984#0" expanded="true" />
|
||||
<element signature="e#4020#4021#0" expanded="true" />
|
||||
<element signature="e#4056#4057#0" expanded="true" />
|
||||
<element signature="e#4111#4112#0" expanded="true" />
|
||||
<element signature="e#4161#4162#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="AnalogIn.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/AnalogIn.java">
|
||||
<file leaf-file-name="LPStatus.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/LPStatus.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="571">
|
||||
<caret line="63" column="58" lean-forward="false" selection-start-line="63" selection-start-column="58" selection-end-line="63" selection-end-column="58" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#1368#1369#0" expanded="true" />
|
||||
<element signature="e#1405#1406#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="POC.java" pinned="false" current-in-tab="false">
|
||||
<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="90">
|
||||
<caret line="6" column="0" lean-forward="false" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
|
||||
<state relative-caret-position="75">
|
||||
<caret line="5" column="13" lean-forward="false" selection-start-line="5" selection-start-column="13" selection-end-line="5" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="Simulation.java" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/Simulation.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="780">
|
||||
<caret line="52" column="0" lean-forward="true" selection-start-line="52" selection-start-column="0" selection-end-line="52" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#1403#1404#0" expanded="true" />
|
||||
<element signature="e#1439#1440#0" expanded="true" />
|
||||
<element signature="e#1480#1481#0" expanded="true" />
|
||||
<element signature="e#1512#1513#0" expanded="true" />
|
||||
<element signature="e#1549#1550#0" expanded="true" />
|
||||
<element signature="e#1586#1587#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="DigitalOut.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/DigitalOut.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="691">
|
||||
<caret line="76" column="30" lean-forward="true" selection-start-line="76" selection-start-column="30" selection-end-line="76" selection-end-column="30" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#1109#1110#0" expanded="true" />
|
||||
<element signature="e#1148#1149#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<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="241">
|
||||
<caret line="560" column="33" lean-forward="false" selection-start-line="560" selection-start-column="33" selection-end-line="560" selection-end-column="33" />
|
||||
<state relative-caret-position="783">
|
||||
<caret line="364" column="0" lean-forward="true" selection-start-line="364" selection-start-column="0" selection-end-line="364" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="e#2942#2943#0" expanded="true" />
|
||||
<element signature="e#2982#2983#0" expanded="true" />
|
||||
<element signature="e#5781#5782#0" expanded="true" />
|
||||
<element signature="e#5820#5821#0" expanded="true" />
|
||||
<element signature="e#5860#5861#0" expanded="true" />
|
||||
<element signature="e#5896#5897#0" expanded="true" />
|
||||
<element signature="e#5931#5932#0" expanded="true" />
|
||||
<element signature="e#5962#5963#0" expanded="true" />
|
||||
<element signature="e#6013#6014#0" expanded="true" />
|
||||
<element signature="e#6060#6061#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="POC.java" pinned="false" current-in-tab="true">
|
||||
<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="633">
|
||||
<caret line="72" column="26" lean-forward="false" selection-start-line="72" selection-start-column="26" selection-end-line="72" selection-end-column="26" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@@ -103,6 +125,9 @@
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="GradleLocalSettings">
|
||||
<option name="externalProjectsViewState">
|
||||
<projects_view />
|
||||
@@ -111,13 +136,14 @@
|
||||
<component name="IdeDocumentHistory">
|
||||
<option name="CHANGED_PATHS">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/src/main/java/com/henrypump/poc/Well.java" />
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/com/henrypump/poc/DigitalOut.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/com/henrypump/poc/DigitalIn.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/com/henrypump/poc/AnalogIn.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/com/henrypump/poc/POC.java" />
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/com/henrypump/poc/Simulation.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/com/henrypump/poc/Card.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/com/henrypump/poc/Well.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/com/henrypump/poc/POC.java" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
@@ -129,11 +155,11 @@
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectFrameBounds">
|
||||
<option name="x" value="38" />
|
||||
<option name="y" value="23" />
|
||||
<option name="width" value="1870" />
|
||||
<option name="height" value="962" />
|
||||
<option name="width" value="1680" />
|
||||
<option name="height" value="964" />
|
||||
</component>
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
||||
<component name="ProjectView">
|
||||
<navigator currentView="ProjectPane" proportions="" version="1">
|
||||
<flattenPackages />
|
||||
@@ -441,7 +467,7 @@
|
||||
<servers />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="38" y="23" width="1870" height="962" extended-state="0" />
|
||||
<frame x="0" y="23" width="1680" height="964" 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="-1" side_tool="false" content_ui="tabs" />
|
||||
@@ -450,15 +476,15 @@
|
||||
<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="-1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Image Layers" 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="-1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Capture Analysis" 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="-1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Event Log" 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="-1" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.11396648" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Maven Projects" 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="-1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Run" 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="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32960895" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Properties" 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="-1" side_tool="false" content_ui="tabs" />
|
||||
<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="-1" 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="-1" 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="-1" 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.24973261" 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.27797619" 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="-1" side_tool="false" content_ui="tabs" />
|
||||
@@ -481,14 +507,6 @@
|
||||
<watches-manager />
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<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="75">
|
||||
<caret line="5" column="13" lean-forward="false" selection-start-line="5" selection-start-column="13" selection-end-line="5" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/test/java/com/henrypump/poc/AppTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="105">
|
||||
@@ -505,19 +523,25 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/pom.xml">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/DigitalIn.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="450">
|
||||
<caret line="30" column="45" lean-forward="false" selection-start-line="30" selection-start-column="45" selection-end-line="30" selection-end-column="45" />
|
||||
<folding />
|
||||
<state relative-caret-position="751">
|
||||
<caret line="92" column="5" lean-forward="true" selection-start-line="38" selection-start-column="4" selection-end-line="92" selection-end-column="5" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="false" />
|
||||
</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/AnalogIn.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="241">
|
||||
<caret line="560" column="33" lean-forward="false" selection-start-line="560" selection-start-column="33" selection-end-line="560" selection-end-column="33" />
|
||||
<folding />
|
||||
<state relative-caret-position="571">
|
||||
<caret line="63" column="58" lean-forward="false" selection-start-line="63" selection-start-column="58" selection-end-line="63" selection-end-column="58" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="false" />
|
||||
<element signature="e#1368#1369#0" expanded="false" />
|
||||
<element signature="e#1405#1406#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@@ -533,51 +557,141 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/DigitalIn.java">
|
||||
<entry file="file://$PROJECT_DIR$/dependency-reduced-pom.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="751">
|
||||
<caret line="92" column="5" lean-forward="true" selection-start-line="38" selection-start-column="4" selection-end-line="92" selection-end-column="5" />
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/LPPair.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="240">
|
||||
<caret line="20" column="6" lean-forward="false" selection-start-line="20" selection-start-column="6" selection-end-line="20" selection-end-column="6" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/src.zip!/java/lang/Double.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="288">
|
||||
<caret line="97" column="40" lean-forward="false" selection-start-line="97" selection-start-column="31" selection-end-line="97" selection-end-column="40" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/pom.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="438">
|
||||
<caret line="38" column="17" lean-forward="false" selection-start-line="38" selection-start-column="17" selection-end-line="38" selection-end-column="17" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/LPStatus.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="75">
|
||||
<caret line="5" column="13" lean-forward="false" selection-start-line="5" selection-start-column="13" selection-end-line="5" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="jar://$MAVEN_REPOSITORY$/de/vandermeer/asciitable/0.2.5/asciitable-0.2.5.jar!/de/vandermeer/asciitable/v2/V2_AsciiTable.class">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="375">
|
||||
<caret line="64" column="50" lean-forward="false" selection-start-line="64" selection-start-column="41" selection-end-line="64" selection-end-column="50" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/src.zip!/java/time/Instant.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="289">
|
||||
<caret line="271" column="26" lean-forward="false" selection-start-line="271" selection-start-column="26" selection-end-line="271" selection-end-column="26" />
|
||||
<folding>
|
||||
<element signature="e#11865#11866#0" expanded="false" />
|
||||
<element signature="e#11915#11916#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/Simulation.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="588">
|
||||
<caret line="61" column="5" lean-forward="false" selection-start-line="61" selection-start-column="5" selection-end-line="61" selection-end-column="5" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/AnalogIn.java">
|
||||
<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="571">
|
||||
<caret line="63" column="58" lean-forward="false" selection-start-line="63" selection-start-column="58" selection-end-line="63" selection-end-column="58" />
|
||||
<state relative-caret-position="-1182">
|
||||
<caret line="208" column="36" lean-forward="true" selection-start-line="208" selection-start-column="36" selection-end-line="208" selection-end-column="36" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#1368#1369#0" expanded="true" />
|
||||
<element signature="e#1405#1406#0" expanded="true" />
|
||||
<element signature="e#2914#2915#0" expanded="true" />
|
||||
<element signature="e#2949#2950#0" expanded="true" />
|
||||
<element signature="e#2995#2996#0" expanded="true" />
|
||||
<element signature="e#3037#3038#0" expanded="true" />
|
||||
<element signature="e#3087#3088#0" expanded="true" />
|
||||
<element signature="e#3133#3134#0" expanded="true" />
|
||||
<element signature="e#3185#3186#0" expanded="true" />
|
||||
<element signature="e#3233#3234#0" expanded="true" />
|
||||
<element signature="e#3293#3294#0" expanded="true" />
|
||||
<element signature="e#3349#3350#0" expanded="true" />
|
||||
<element signature="e#3392#3393#0" expanded="true" />
|
||||
<element signature="e#3431#3432#0" expanded="true" />
|
||||
<element signature="e#3467#3468#0" expanded="true" />
|
||||
<element signature="e#3499#3500#0" expanded="true" />
|
||||
<element signature="e#3542#3543#0" expanded="true" />
|
||||
<element signature="e#3581#3582#0" expanded="true" />
|
||||
<element signature="e#3625#3626#0" expanded="true" />
|
||||
<element signature="e#3665#3666#0" expanded="true" />
|
||||
<element signature="e#3706#3707#0" expanded="true" />
|
||||
<element signature="e#3743#3744#0" expanded="true" />
|
||||
<element signature="e#3783#3784#0" expanded="true" />
|
||||
<element signature="e#3819#3820#0" expanded="true" />
|
||||
<element signature="e#3861#3862#0" expanded="true" />
|
||||
<element signature="e#3899#3900#0" expanded="true" />
|
||||
<element signature="e#3943#3944#0" expanded="true" />
|
||||
<element signature="e#3983#3984#0" expanded="true" />
|
||||
<element signature="e#4020#4021#0" expanded="true" />
|
||||
<element signature="e#4056#4057#0" expanded="true" />
|
||||
<element signature="e#4111#4112#0" expanded="true" />
|
||||
<element signature="e#4161#4162#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<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="783">
|
||||
<caret line="364" column="0" lean-forward="true" selection-start-line="364" selection-start-column="0" selection-end-line="364" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="e#2942#2943#0" expanded="true" />
|
||||
<element signature="e#2982#2983#0" expanded="true" />
|
||||
<element signature="e#5781#5782#0" expanded="true" />
|
||||
<element signature="e#5820#5821#0" expanded="true" />
|
||||
<element signature="e#5860#5861#0" expanded="true" />
|
||||
<element signature="e#5896#5897#0" expanded="true" />
|
||||
<element signature="e#5931#5932#0" expanded="true" />
|
||||
<element signature="e#5962#5963#0" expanded="true" />
|
||||
<element signature="e#6013#6014#0" expanded="true" />
|
||||
<element signature="e#6060#6061#0" expanded="true" />
|
||||
</folding>
|
||||
</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="90">
|
||||
<caret line="6" column="0" lean-forward="false" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
|
||||
<state relative-caret-position="633">
|
||||
<caret line="72" column="26" lean-forward="false" selection-start-line="72" selection-start-column="26" selection-end-line="72" selection-end-column="26" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/henrypump/poc/Simulation.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="780">
|
||||
<caret line="52" column="0" lean-forward="true" selection-start-line="52" selection-start-column="0" selection-end-line="52" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#1403#1404#0" expanded="true" />
|
||||
<element signature="e#1439#1440#0" expanded="true" />
|
||||
<element signature="e#1480#1481#0" expanded="true" />
|
||||
<element signature="e#1512#1513#0" expanded="true" />
|
||||
<element signature="e#1549#1550#0" expanded="true" />
|
||||
<element signature="e#1586#1587#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</component>
|
||||
</project>
|
||||
@@ -16,5 +16,8 @@
|
||||
<orderEntry type="library" name="Maven: org.mongodb:mongodb-driver:3.4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mongodb:bson:3.4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mongodb:mongodb-driver-core:3.4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.vandermeer:asciitable:0.2.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.vandermeer:asciilist:0.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.4" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
6
pom.xml
6
pom.xml
@@ -31,6 +31,12 @@
|
||||
<artifactId>mongodb-driver</artifactId>
|
||||
<version>3.4.2</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/de.vandermeer/asciitable -->
|
||||
<dependency>
|
||||
<groupId>de.vandermeer</groupId>
|
||||
<artifactId>asciitable</artifactId>
|
||||
<version>0.2.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
package com.henrypump.poc;
|
||||
|
||||
import de.vandermeer.asciitable.v2.RenderedTable;
|
||||
import de.vandermeer.asciitable.v2.V2_AsciiTable;
|
||||
import de.vandermeer.asciitable.v2.render.V2_AsciiTableRenderer;
|
||||
import de.vandermeer.asciitable.v2.render.WidthAbsoluteEven;
|
||||
import de.vandermeer.asciitable.v2.themes.V2_E_TableThemes;
|
||||
import static java.lang.Math.abs;
|
||||
import static java.lang.Math.pow;
|
||||
import static java.lang.Math.sqrt;
|
||||
|
||||
/**
|
||||
* Created by patrickjmcd on 1/31/17.
|
||||
*/
|
||||
@@ -10,10 +19,48 @@ public class Card {
|
||||
private double[] downholePosition = new double[maxPoints];
|
||||
private double[] surfaceLoad = new double[maxPoints];
|
||||
private double[] downholeLoad = new double[maxPoints];
|
||||
private int numPointsUsed;
|
||||
|
||||
//Card
|
||||
private int strokeNumber;
|
||||
private LPPair surfacePositionMax;
|
||||
private LPPair surfacePositionMin;
|
||||
private LPPair surfaceLoadMax;
|
||||
private LPPair surfaceLoadMin;
|
||||
private LPPair downholePositionMax;
|
||||
private LPPair downholePositionMin;
|
||||
private LPPair downholeLoadMax;
|
||||
private LPPair downholeLoadMin;
|
||||
|
||||
private LPPair topCorner;
|
||||
private LPPair bottomCorner;
|
||||
|
||||
private double surfaceStrokeLength;
|
||||
private double downholeNetStrokeLength;
|
||||
private double downholeGrossStrokeLength;
|
||||
private double downholeAdjustedGrossStrokeLength;
|
||||
private double downholeLoadSpan;
|
||||
private double fluidLoad;
|
||||
private double pumpIntakePressure;
|
||||
private double fluidLevel;
|
||||
private double fillageEstimated;
|
||||
private double fillageCalculated;
|
||||
private double tubingMovement;
|
||||
private double strokeSpeed;
|
||||
|
||||
private double plungerTravel;
|
||||
private double dailyProduction;
|
||||
private double structuralLoading;
|
||||
|
||||
private double polishedRodHorsepower;
|
||||
private double pumpHorsepower;
|
||||
|
||||
private long strokeStartTime;
|
||||
|
||||
Card(int strokeNumber){
|
||||
this.strokeNumber = strokeNumber;
|
||||
strokeStartTime = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public void setSurfacePosition(int i, double position){
|
||||
this.surfacePosition[i] = position;
|
||||
@@ -50,4 +97,281 @@ public class Card {
|
||||
public LPPair getSurfacePositionMax() {
|
||||
return this.surfacePositionMax;
|
||||
}
|
||||
|
||||
public int getStrokeNumber() {
|
||||
return strokeNumber;
|
||||
}
|
||||
|
||||
public double getSurfaceStrokeLength() {
|
||||
return surfaceStrokeLength;
|
||||
}
|
||||
|
||||
public double getDownholeNetStrokeLength() {
|
||||
return downholeNetStrokeLength;
|
||||
}
|
||||
|
||||
public double getDownholeGrossStrokeLength() {
|
||||
return downholeGrossStrokeLength;
|
||||
}
|
||||
|
||||
public double getDownholeAdjustedGrossStrokeLength() {
|
||||
return downholeAdjustedGrossStrokeLength;
|
||||
}
|
||||
|
||||
public double getDownholeLoadSpan() {
|
||||
return downholeLoadSpan;
|
||||
}
|
||||
|
||||
public double getFluidLoad() {
|
||||
return fluidLoad;
|
||||
}
|
||||
|
||||
public double getFillageEstimated() {
|
||||
return fillageEstimated;
|
||||
}
|
||||
|
||||
public double getFillageCalculated() {
|
||||
return fillageCalculated;
|
||||
}
|
||||
|
||||
public double getTubingMovement() {
|
||||
return tubingMovement;
|
||||
}
|
||||
|
||||
public double getPlungerTravel() {
|
||||
return plungerTravel;
|
||||
}
|
||||
|
||||
public double getDailyProduction() {
|
||||
return dailyProduction;
|
||||
}
|
||||
|
||||
public double getStructuralLoading() {
|
||||
return structuralLoading;
|
||||
}
|
||||
|
||||
public int getNumPointsUsed() {
|
||||
return numPointsUsed;
|
||||
}
|
||||
|
||||
public void setNumPointsUsed(int numPointsUsed) {
|
||||
this.numPointsUsed = numPointsUsed;
|
||||
}
|
||||
|
||||
private void calculateSPM(){
|
||||
long now = System.currentTimeMillis();
|
||||
long strokeMillis = now - strokeStartTime;
|
||||
strokeSpeed = 60000.0 / (double)(now - strokeStartTime);
|
||||
}
|
||||
|
||||
private static double lineResolve(double x1, double x2, double y1, double y2, double xTest)
|
||||
{
|
||||
double line_m = (y2 - y1) / (x2 - x1);
|
||||
double line_b = y1 - line_m * x1;
|
||||
double yTest = line_m * xTest + line_b;
|
||||
return yTest;
|
||||
}
|
||||
|
||||
private static LPPair positionMax(double[] positionArr, double[] loadArr, int arrSize) {
|
||||
double maxPos = positionArr[0];
|
||||
double loadAtMaxP = Double.MIN_VALUE;
|
||||
|
||||
for(int i = 0; i < arrSize; i++) {
|
||||
maxPos = Math.max(maxPos, positionArr[i]);
|
||||
if (maxPos == positionArr[i]) loadAtMaxP = loadArr[i];
|
||||
}
|
||||
return new LPPair(maxPos, loadAtMaxP);
|
||||
}
|
||||
|
||||
private static LPPair positionMin(double[] positionArr, double[] loadArr, int arrSize) {
|
||||
double minPos = positionArr[0];
|
||||
double loadAtMinP = Double.MAX_VALUE;
|
||||
|
||||
for(int i = 0; i < arrSize; i++) {
|
||||
minPos = Math.min(minPos, positionArr[i]);
|
||||
if (minPos == positionArr[i]) loadAtMinP = loadArr[i];
|
||||
}
|
||||
return new LPPair(minPos, loadAtMinP);
|
||||
}
|
||||
|
||||
private static LPPair loadMax(double[] positionArr, double[] loadArr, int arrSize) {
|
||||
double maxLoad = loadArr[0];
|
||||
double posAtMaxL = Double.MIN_VALUE;
|
||||
|
||||
for(int i = 0; i < arrSize; i++) {
|
||||
maxLoad = Math.max(maxLoad, loadArr[i]);
|
||||
if (maxLoad == positionArr[i]) posAtMaxL = positionArr[i];
|
||||
}
|
||||
return new LPPair(posAtMaxL, maxLoad);
|
||||
}
|
||||
|
||||
private static LPPair loadMin(double[] positionArr, double[] loadArr, int arrSize) {
|
||||
double minLoad = loadArr[0];
|
||||
double posAtMinL = Double.MAX_VALUE;
|
||||
|
||||
for(int i = 0; i < arrSize; i++) {
|
||||
minLoad = Math.min(minLoad, loadArr[i]);
|
||||
if (minLoad == positionArr[i]) posAtMinL = positionArr[i];
|
||||
}
|
||||
return new LPPair(posAtMinL, minLoad);
|
||||
}
|
||||
|
||||
private double distanceToLine(double pos, double load)
|
||||
{
|
||||
double x1 = downholePositionMin.getPosition();
|
||||
double x2 = downholePositionMax.getPosition();
|
||||
double y1 = downholeLoadMin.getLoad();
|
||||
double y2 = downholeLoadMax.getLoad();
|
||||
|
||||
return abs((y2-y1)*pos - (x2-x1)*load + x2*y1 - y2*x1) / sqrt(pow(y2-y1, 2) + pow(x2-x1,2));
|
||||
};
|
||||
|
||||
void calcStrokeData(int numSlices, double fluidGradient, double rodDepth, double anchorDepth, double tubingCSA,
|
||||
double pumpArea, double frictionEstimate, double structuralRating)
|
||||
{
|
||||
calculateSPM();
|
||||
surfacePositionMax = positionMax(surfacePosition, surfaceLoad, numPointsUsed);
|
||||
surfaceLoadMax = loadMax(surfacePosition, surfaceLoad, numPointsUsed);
|
||||
surfacePositionMin = positionMin(surfacePosition, surfaceLoad, numPointsUsed);
|
||||
surfaceLoadMin = loadMin(surfacePosition, surfaceLoad, numPointsUsed);
|
||||
|
||||
downholePositionMax = positionMax(downholePosition, downholeLoad, numPointsUsed);
|
||||
downholeLoadMax = loadMax(downholePosition, downholeLoad, numPointsUsed);
|
||||
downholePositionMin = positionMin(downholePosition, downholeLoad, numPointsUsed);
|
||||
downholeLoadMin = loadMin(downholePosition, downholeLoad, numPointsUsed);
|
||||
|
||||
surfaceStrokeLength = surfacePositionMax.getPosition() - surfacePositionMin.getPosition();
|
||||
downholeGrossStrokeLength = downholePositionMax.getPosition() - downholePositionMin.getPosition();
|
||||
downholeLoadSpan = downholeLoadMax.getLoad() - downholeLoadMin.getLoad();
|
||||
|
||||
double dxSurf = (surfacePositionMax.getPosition() - surfacePositionMin.getPosition()) / (float) numSlices;
|
||||
double dxDown = (downholePositionMax.getPosition() - downholePositionMin.getPosition()) / (float) numSlices;
|
||||
|
||||
pumpHorsepower = 0.0;
|
||||
polishedRodHorsepower = 0.0;
|
||||
double dhDistanceTop = 0.0;
|
||||
double dhDistanceBottom = 0.0;
|
||||
|
||||
for (int i = 1; i < numSlices+1; i++)
|
||||
{
|
||||
double suPosTarget = surfacePositionMin.getPosition() + ((double) i * dxSurf);
|
||||
double dhPosTarget = downholePositionMin.getPosition() + ((double) i * dxDown);
|
||||
double suLoadAtTargetTop = 0.0;
|
||||
double suLoadAtTargetBottom = 0.0;
|
||||
double dhLoadAtTargetTop = 0.0;
|
||||
double dhLoadAtTargetBottom = 0.0;
|
||||
|
||||
for(int j = 0; j < numPointsUsed - 1; j++)
|
||||
{
|
||||
if (downholePosition[j] <= dhPosTarget && downholePosition[j+1] > dhPosTarget){
|
||||
dhLoadAtTargetTop = lineResolve(downholePosition[j], downholePosition[j+1], downholeLoad[j], downholeLoad[j+1], dhPosTarget);
|
||||
}
|
||||
|
||||
if (downholePosition[j] > dhPosTarget && downholePosition[j+1] >= dhPosTarget){
|
||||
dhLoadAtTargetBottom = lineResolve(downholePosition[j], downholePosition[j+1], downholeLoad[j], downholeLoad[j+1], dhPosTarget);
|
||||
}
|
||||
|
||||
if (surfacePosition[j] <= suPosTarget && surfacePosition[j+1] > suPosTarget){
|
||||
suLoadAtTargetTop = lineResolve(surfacePosition[j], surfacePosition[j+1], surfaceLoad[j], surfaceLoad[j+1], suPosTarget);
|
||||
}
|
||||
|
||||
if (surfacePosition[j] > suPosTarget && surfacePosition[j+1] >= suPosTarget){
|
||||
suLoadAtTargetBottom = lineResolve(surfacePosition[j], surfacePosition[j+1], surfaceLoad[j], surfaceLoad[j+1], suPosTarget);
|
||||
}
|
||||
}
|
||||
|
||||
polishedRodHorsepower += (dxSurf / 12.0) * (suLoadAtTargetTop - suLoadAtTargetBottom) * (strokeSpeed / 33000.0);
|
||||
pumpHorsepower += (dxDown / 12.0) * (dhLoadAtTargetTop - dhLoadAtTargetBottom) * (strokeSpeed / 33000.0);
|
||||
|
||||
double tDistance = distanceToLine(dhPosTarget, dhLoadAtTargetTop);
|
||||
double bDistance = distanceToLine(dhPosTarget, dhLoadAtTargetBottom);
|
||||
|
||||
if (tDistance > dhDistanceTop)
|
||||
{
|
||||
dhDistanceTop = tDistance;
|
||||
topCorner = new LPPair(dhPosTarget, dhLoadAtTargetTop);
|
||||
}
|
||||
|
||||
if (bDistance > dhDistanceBottom)
|
||||
{
|
||||
dhDistanceBottom = bDistance;
|
||||
bottomCorner = new LPPair(dhPosTarget, dhLoadAtTargetBottom);
|
||||
}
|
||||
}
|
||||
|
||||
downholeAdjustedGrossStrokeLength = downholePositionMax.getPosition() - topCorner.getPosition();
|
||||
downholeNetStrokeLength = bottomCorner.getPosition() - downholePositionMin.getPosition();
|
||||
fillageCalculated = (downholeNetStrokeLength / downholeAdjustedGrossStrokeLength) * 100.0;
|
||||
fillageEstimated =(downholeNetStrokeLength / downholeGrossStrokeLength) * 100.0;
|
||||
|
||||
if (fillageEstimated > 100)
|
||||
fillageEstimated = 100.0;
|
||||
|
||||
if (fillageCalculated > 100)
|
||||
fillageCalculated = 100.0;
|
||||
|
||||
fluidLoad = (downholeLoadMax.getLoad() - downholeLoadMin.getLoad()) - frictionEstimate;
|
||||
pumpIntakePressure = fluidGradient * rodDepth - (fluidLoad / pumpArea);
|
||||
//printf("PIP = %f * %f - (%f / %f) = %f\n", fluidGradient, rodDepth, fluidLoad, pumpArea, pumpIntakePressure);
|
||||
fluidLevel = pumpIntakePressure / fluidGradient;
|
||||
tubingMovement = 12 * (rodDepth - anchorDepth) * fluidLoad / (30500000 * tubingCSA);
|
||||
structuralLoading = (surfaceLoadMax.getLoad() / (structuralRating * 100)) * 100;
|
||||
};
|
||||
|
||||
public void printCard(String printType, boolean printDataTableToo){
|
||||
if(printType.toLowerCase().equals("table")) {
|
||||
V2_AsciiTable pointsTable = new V2_AsciiTable();
|
||||
pointsTable.addRule();
|
||||
pointsTable.addRow("Surface Position", "Surface Load", "Downhole Position", "Downhole Load");
|
||||
pointsTable.addRule();
|
||||
for (int i = 0; i < numPointsUsed; i++) {
|
||||
pointsTable.addRow(surfacePosition[i], surfaceLoad[i], downholePosition[i], downholeLoad[i]);
|
||||
}
|
||||
pointsTable.addRule();
|
||||
V2_AsciiTableRenderer rend = new V2_AsciiTableRenderer();
|
||||
rend.setTheme(V2_E_TableThemes.UTF_LIGHT.get());
|
||||
rend.setWidth(new WidthAbsoluteEven(100));
|
||||
RenderedTable rt = rend.render(pointsTable);
|
||||
System.out.println(rt);
|
||||
System.out.println();
|
||||
} else if (printType.toLowerCase().equals("csv")){
|
||||
System.out.println("surf_pos,surf_load,down_pos,down_load");
|
||||
for (int i = 0; i < numPointsUsed; i++) {
|
||||
System.out.printf("%f,%f,%f,%f\n", surfacePosition[i], surfaceLoad[i], downholePosition[i], downholeLoad[i]);
|
||||
}
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
if(printDataTableToo){
|
||||
V2_AsciiTable dataTable = new V2_AsciiTable();
|
||||
dataTable.addRule();
|
||||
dataTable.addRow("Card " + strokeNumber, "Value");
|
||||
dataTable.addStrongRule();
|
||||
dataTable.addRow("Fill % (Est.)", fillageEstimated);
|
||||
dataTable.addRow("Fill % (Calc.)", fillageCalculated);
|
||||
dataTable.addRule();
|
||||
dataTable.addRow("Surf. Stroke Length", surfaceStrokeLength);
|
||||
dataTable.addRow("Down. Gross Stroke", downholeGrossStrokeLength);
|
||||
dataTable.addRow("Down. Net Stroke", downholeNetStrokeLength);
|
||||
dataTable.addRow("Tubing Movement", tubingMovement);
|
||||
dataTable.addRule();
|
||||
dataTable.addRow("Polished Rod HP", polishedRodHorsepower);
|
||||
dataTable.addRow("Pump HP", pumpHorsepower);
|
||||
dataTable.addRule();
|
||||
dataTable.addRow("Stroke Speed", strokeSpeed);
|
||||
dataTable.addRule();
|
||||
dataTable.addRow("Fluid Load", fluidLoad);
|
||||
dataTable.addRow("Pump Intake Pressure", pumpIntakePressure);
|
||||
dataTable.addRow("Fluid Level", fluidLevel);
|
||||
dataTable.addRule();
|
||||
dataTable.addRow("Structural Loading", structuralLoading);
|
||||
dataTable.addRule();
|
||||
V2_AsciiTableRenderer rend = new V2_AsciiTableRenderer();
|
||||
rend.setTheme(V2_E_TableThemes.UTF_LIGHT.get());
|
||||
rend.setWidth(new WidthAbsoluteEven(50));
|
||||
RenderedTable rt = rend.render(dataTable);
|
||||
System.out.println(rt);
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,78 @@ package com.henrypump.poc;
|
||||
/**
|
||||
* Created by patrickjmcd on 2/1/17.
|
||||
*/
|
||||
public class POC {
|
||||
public class POC implements Runnable{
|
||||
private Well thisWell;
|
||||
private Simulation sim;
|
||||
private int simLoops;
|
||||
private double tubingMovement;
|
||||
private double pumpIntakePressure;
|
||||
private double fluidLoad;
|
||||
private double fluidLevel;
|
||||
private Thread t;
|
||||
|
||||
|
||||
|
||||
POC(String wellName, String wellSetupJsonFile, String simFileName, int simLoops){
|
||||
thisWell = new Well(wellName);
|
||||
thisWell.parseJSONFile(wellSetupJsonFile);
|
||||
thisWell.printTapers();
|
||||
sim = new Simulation(simFileName);
|
||||
this.simLoops = simLoops;
|
||||
}
|
||||
|
||||
public void run(){
|
||||
|
||||
int loopCounter = 0, loopLimit = simLoops;
|
||||
long sleepMilliseconds = (long) (thisWell.getDt() * 1000);
|
||||
|
||||
LPStatus downholePoint;
|
||||
while (loopCounter < loopLimit) {
|
||||
Card thisCard = new Card(loopCounter);
|
||||
for (int i = 0; i <= sim.getLastFilledIndex(); i++) {
|
||||
thisCard.setSurfacePosition(i, sim.getPositionAtIndex(i));
|
||||
thisCard.setSurfaceLoad(i, sim.getLoadAtIndex(i));
|
||||
downholePoint = thisWell.calc(sim.getPositionAtIndex(i), sim.getLoadAtIndex(i));
|
||||
if (downholePoint.getStatus() == Well.GOOD_STATUS) {
|
||||
thisCard.setDownholePosition(i, downholePoint.getPosition());
|
||||
thisCard.setDownholeLoad(i, downholePoint.getLoad());
|
||||
}
|
||||
try {
|
||||
Thread.sleep(sleepMilliseconds);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
thisCard.setNumPointsUsed(sim.getLastFilledIndex());
|
||||
thisCard.calcStrokeData(150, thisWell.getFluidGradient(),
|
||||
thisWell.getRodDepthTotal(), thisWell.getTubingAnchorDepth(),
|
||||
thisWell.getTubingCrossSectionalArea(), thisWell.getPumpArea(),
|
||||
thisWell.getFrictionEstimate(), thisWell.getStructuralRating());
|
||||
thisCard.printCard("none", true);
|
||||
loopCounter++;
|
||||
}
|
||||
}
|
||||
|
||||
public void start () {
|
||||
System.out.println("Starting POC");
|
||||
if (t == null) {
|
||||
t = new Thread (this, "POC-Thread");
|
||||
t.start ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
POC thisPOC = new POC("Barney", args[0], args[1], 3);
|
||||
thisPOC.start();
|
||||
|
||||
try {
|
||||
Thread.sleep(15000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
POC otherPOC = new POC("NotBarney", args[0], args[1], 4);
|
||||
otherPOC.start();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ import java.io.IOException;
|
||||
*/
|
||||
public class Simulation {
|
||||
|
||||
private double[] position = new double[1000];
|
||||
private double[] load = new double[1000];
|
||||
private double[] position = new double[1500];
|
||||
private double[] load = new double[1500];
|
||||
private int lastFilledIndex = 0;
|
||||
|
||||
private void parseCSV(String filename){
|
||||
@@ -47,14 +47,16 @@ public class Simulation {
|
||||
}
|
||||
}
|
||||
|
||||
public double positionAtIndex(int ind){
|
||||
public double getPositionAtIndex(int ind){
|
||||
return position[ind];
|
||||
}
|
||||
|
||||
public double loadAtIndex(int ind){
|
||||
public double getLoadAtIndex(int ind){
|
||||
return load[ind];
|
||||
}
|
||||
|
||||
public int getLastFilledIndex() {return lastFilledIndex; }
|
||||
|
||||
Simulation(String simFilePath){
|
||||
parseCSV(simFilePath);
|
||||
}
|
||||
@@ -62,7 +64,7 @@ public class Simulation {
|
||||
public static void main(String[] args){
|
||||
Simulation sim = new Simulation(args[0]);
|
||||
for(int i = 0; i <= sim.lastFilledIndex; i++){
|
||||
System.out.println("Position: " + sim.positionAtIndex(i) + ", Load: "+ sim.loadAtIndex(i));
|
||||
System.out.println("Position: " + sim.getPositionAtIndex(i) + ", Load: "+ sim.getLoadAtIndex(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
#Generated by Maven
|
||||
#Wed Feb 01 14:16:23 CST 2017
|
||||
#Wed Feb 01 18:42:01 CST 2017
|
||||
version=1.0-SNAPSHOT
|
||||
groupId=com.henrypump.poc
|
||||
artifactId=poc-java
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user