Files
Oxy-Downhole-Analysis/Well/Functional-Specification.md
2016-06-28 15:29:39 -05:00

4.6 KiB

Henry Pump Downhole Algorithm

WellStruct class

Public Variables

Well Parameters

Name Type Description Notes
dt double seconds between data points -
tubingHeadPressure double Tubing Head Pressure of well (in PSI) -
fluidGradient double Fluid Gradient of well (in lb/ft) -
sbfriction double Stuffing Box Friction (in lbs) -

Rod Input Parameters

Name Type Description Notes
numTapers int Number of tapers in the rod string -
c double[10] Individual damping factors for each rod 1
rodLength double[10] Rod length of each taper (in feet) 1
rodDiameter double[10] Rod diameter of each taper (in inches) 1
rodYM double[10] Youngs Modulus for each rod taper 1
numTapers int Number of tapers in the rod string 1

Rod Calculated Parameters

Name Type Description Notes
rodDepth double[10] Depth of each taper 1
rodDepthTotal double Total depth of the rod string -
rodWeightAir double[10] Weight of each taper in air 1
rodWeightAirTotal double Total weight of the rod string in air -
rodWeightFluid double[10] Weight of each taper in fluid 1
rodWeightFluidTotal double Total weight of the rod string in fluid -

Notes

  1. First element of this array should be 0. Data begins at position 1.

Young's Modulus Values

Material Young's Modulus
Steel 30.5
Fiberglass 7.2

Function Definitions

void setID( int id)

This function sets the wellID variable to the specified id. (This function may be deleted in the next revision of the class)

void UpdateTapers()

This function computes all calculated well parameters from the input parameters of the well.

Tuple<int, double, double> calc (double sPosition, double sLoad)

This function takes surface load and position data and returns a status and the associated downhole position and load data. Status codes will be detailed in another section.

void writeSetup(string filename)

This function writes all well parameters in comma separated values to the specified filename.

void clearTopArrays()

This function clears the intermediate arrays used to process load and position values. This function should be called between sets of non-continuous data.

void taperCompute(double i_dt, double i_tubingHeadPressure, double i_fluidGradient, double i_sbfriction, int i_numTapers, double[] i_c, double[] i_rodLength, double[] i_rodDiameter, double[] i_rodYM)

This function takes the input parameters for the well and computes the calculated values for the rod string. This function calls UpdateTapers().

void readSetup(string filename)

This function reads a comma separated value formatted document into the buffer tags. These buffer tags can then be computed using the taperCompute(…) function.

Status Codes

The following is a table of possible values returned for Item1 of the Tuple returned from the calc() function. Additional codes will be added in the next release of the class library.

value Meaning
0 There was a problem with the function. No values returned.
5 The function has computed data successfully, but not enough data has been computer to determine the position and load at the bottom of the well
7 The function has computed data successfully and returned valid measurements for load and position