Class PipeDesign

java.lang.Object
neqsim.process.mechanicaldesign.pipeline.PipeDesign

public class PipeDesign extends Object

PipeDesign class.

Author:
ESOL
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    A simple holder for arrays describing a pipe schedule: nps, inner diameters, outer diameters, thicknesses.
    static class 
    Holds the arrays for a particular wire schedule.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final double[]
    Constant BWG_inch
    static final double[]
    Constant BWG_integers
    static final double[]
    Constant BWG_SI
    private static final double
     
    private static final double
     
    private static final double
     
    static final double[]
    Constant NPS10
    static final double[]
    Constant NPS100
    static final double[]
    Constant NPS120
    static final double[]
    Constant NPS140
    static final double[]
    Constant NPS160
    static final double[]
    Constant NPS20
    static final double[]
    Constant NPS30
    static final double[]
    Constant NPS40
    static final double[]
    Constant NPS5
    static final double[]
    Constant NPS60
    static final double[]
    Constant NPS80
    static final double[]
    Constant NPSS5
    static final double[]
    Constant NPSSTD
    static final double[]
    Constant NPSXS
    static final double[]
    Constant NPSXXS
    static final double[]
    Constant S100i
    static final double[]
    Constant S100o
    static final double[]
    Constant S100t
    static final double[]
    Constant S10i
    static final double[]
    Constant S10o
    static final double[]
    Constant S10t
    static final double[]
    Constant S120i
    static final double[]
    Constant S120o
    static final double[]
    Constant S120t
    static final double[]
    Constant S140i
    static final double[]
    Constant S140o
    static final double[]
    Constant S140t
    static final double[]
    Constant S160i
    static final double[]
    Constant S160o
    static final double[]
    Constant S160t
    static final double[]
    Constant S20i
    static final double[]
    Constant S20o
    static final double[]
    Constant S20t
    static final double[]
    Constant S30i
    static final double[]
    Constant S30o
    static final double[]
    Constant S30t
    static final double[]
    Constant S40i
    static final double[]
    Constant S40o
    static final double[]
    Constant S40t
    static final double[]
    Constant S5i
    static final double[]
    Constant S5o
    static final double[]
    Constant S5t
    static final double[]
    Constant S60i
    static final double[]
    Constant S60o
    static final double[]
    Constant S60t
    static final double[]
    Constant S80i
    static final double[]
    Constant S80o
    static final double[]
    Constant S80t
    Constant scheduleLookup
    static final double[]
    Constant SS5DN
    static final double[]
    Constant SS5i
    static final double[]
    Constant SS5o
    static final double[]
    Constant SS5t
    static final double[]
    Constant SSWG_inch
    static final double[]
    Constant SSWG_integers
    static final double[]
    Constant SSWG_SI
    static final double[]
    Constant STDi
    static final double[]
    Constant STDo
    static final double[]
    Constant STDt
    Constant wireSchedules
    static final double[]
    Constant XSi
    static final double[]
    Constant XSo
    static final double[]
    Constant XSt
    static final double[]
    Constant XXSi
    static final double[]
    Constant XXSo
    static final double[]
    Constant XXSt
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private static double[]
    DiLookup(double DiMm, double[] NPSes, double[] Dis, double[] Dos, double[] ts)
     
    private static double[]
    DoLookup(double DoMm, double[] NPSes, double[] Dis, double[] Dos, double[] ts)
     
    static double
    erosionalVelocity(double rho, double C)
    Calculate the erosional velocity according to the API RP 14E equation:
    static double
    gaugeFromThickness(double t, boolean SI, String schedule)
    Looks up the gauge of a given wire thickness for a chosen schedule.
    static void
    main(String[] args)
    main.
    static double[]
    nearestPipe(Double Do, Double Di, Double NPS, String schedule)
    Searches for and finds the nearest standard pipe size to a given specification.
    private static double[]
    NPSLookup(double wantedNPS, double[] NPSes, double[] Dis, double[] Dos, double[] ts)
     
    static double
    thicknessFromGauge(double gauge, boolean SI, String schedule)
    Looks up the thickness of a given wire gauge in a chosen schedule.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • INCH_TO_M

      private static final double INCH_TO_M
      See Also:
    • FOOT_TO_M

      private static final double FOOT_TO_M
      See Also:
    • LB_FT3_TO_KG_M3

      private static final double LB_FT3_TO_KG_M3
      See Also:
    • NPS5

      public static final double[] NPS5
      Constant NPS5
    • S5i

      public static final double[] S5i
      Constant S5i
    • S5o

      public static final double[] S5o
      Constant S5o
    • S5t

      public static final double[] S5t
      Constant S5t
    • NPS10

      public static final double[] NPS10
      Constant NPS10
    • S10i

      public static final double[] S10i
      Constant S10i
    • S10o

      public static final double[] S10o
      Constant S10o
    • S10t

      public static final double[] S10t
      Constant S10t
    • NPS20

      public static final double[] NPS20
      Constant NPS20
    • S20i

      public static final double[] S20i
      Constant S20i
    • S20o

      public static final double[] S20o
      Constant S20o
    • S20t

      public static final double[] S20t
      Constant S20t
    • NPS30

      public static final double[] NPS30
      Constant NPS30
    • S30i

      public static final double[] S30i
      Constant S30i
    • S30o

      public static final double[] S30o
      Constant S30o
    • S30t

      public static final double[] S30t
      Constant S30t
    • NPS40

      public static final double[] NPS40
      Constant NPS40
    • S40i

      public static final double[] S40i
      Constant S40i
    • S40o

      public static final double[] S40o
      Constant S40o
    • S40t

      public static final double[] S40t
      Constant S40t
    • NPS60

      public static final double[] NPS60
      Constant NPS60
    • S60i

      public static final double[] S60i
      Constant S60i
    • S60o

      public static final double[] S60o
      Constant S60o
    • S60t

      public static final double[] S60t
      Constant S60t
    • NPS80

      public static final double[] NPS80
      Constant NPS80
    • S80i

      public static final double[] S80i
      Constant S80i
    • S80o

      public static final double[] S80o
      Constant S80o
    • S80t

      public static final double[] S80t
      Constant S80t
    • NPS100

      public static final double[] NPS100
      Constant NPS100
    • S100i

      public static final double[] S100i
      Constant S100i
    • S100o

      public static final double[] S100o
      Constant S100o
    • S100t

      public static final double[] S100t
      Constant S100t
    • NPS120

      public static final double[] NPS120
      Constant NPS120
    • S120i

      public static final double[] S120i
      Constant S120i
    • S120o

      public static final double[] S120o
      Constant S120o
    • S120t

      public static final double[] S120t
      Constant S120t
    • NPS140

      public static final double[] NPS140
      Constant NPS140
    • S140i

      public static final double[] S140i
      Constant S140i
    • S140o

      public static final double[] S140o
      Constant S140o
    • S140t

      public static final double[] S140t
      Constant S140t
    • NPS160

      public static final double[] NPS160
      Constant NPS160
    • S160i

      public static final double[] S160i
      Constant S160i
    • S160o

      public static final double[] S160o
      Constant S160o
    • S160t

      public static final double[] S160t
      Constant S160t
    • NPSSTD

      public static final double[] NPSSTD
      Constant NPSSTD
    • STDi

      public static final double[] STDi
      Constant STDi
    • STDo

      public static final double[] STDo
      Constant STDo
    • STDt

      public static final double[] STDt
      Constant STDt
    • NPSXS

      public static final double[] NPSXS
      Constant NPSXS
    • XSi

      public static final double[] XSi
      Constant XSi
    • XSo

      public static final double[] XSo
      Constant XSo
    • XSt

      public static final double[] XSt
      Constant XSt
    • NPSXXS

      public static final double[] NPSXXS
      Constant NPSXXS
    • XXSi

      public static final double[] XXSi
      Constant XXSi
    • XXSo

      public static final double[] XXSo
      Constant XXSo
    • XXSt

      public static final double[] XXSt
      Constant XXSt
    • NPSS5

      public static final double[] NPSS5
      Constant NPSS5
    • SS5DN

      public static final double[] SS5DN
      Constant SS5DN
    • SS5i

      public static final double[] SS5i
      Constant SS5i
    • SS5o

      public static final double[] SS5o
      Constant SS5o
    • SS5t

      public static final double[] SS5t
      Constant SS5t
    • scheduleLookup

      public static final Map<String, PipeDesign.ScheduleData> scheduleLookup
      Constant scheduleLookup
    • SSWG_integers

      public static final double[] SSWG_integers
      Constant SSWG_integers
    • SSWG_inch

      public static final double[] SSWG_inch
      Constant SSWG_inch
    • SSWG_SI

      public static final double[] SSWG_SI
      Constant SSWG_SI
    • BWG_integers

      public static final double[] BWG_integers
      Constant BWG_integers
    • BWG_inch

      public static final double[] BWG_inch
      Constant BWG_inch
    • BWG_SI

      public static final double[] BWG_SI
      Constant BWG_SI
    • wireSchedules

      public static final Map<String, PipeDesign.WireScheduleData> wireSchedules
      Constant wireSchedules
  • Constructor Details

    • PipeDesign

      public PipeDesign()
  • Method Details

    • DiLookup

      private static double[] DiLookup(double DiMm, double[] NPSes, double[] Dis, double[] Dos, double[] ts)
    • DoLookup

      private static double[] DoLookup(double DoMm, double[] NPSes, double[] Dis, double[] Dos, double[] ts)
    • NPSLookup

      private static double[] NPSLookup(double wantedNPS, double[] NPSes, double[] Dis, double[] Dos, double[] ts)
    • nearestPipe

      public static double[] nearestPipe(Double Do, Double Di, Double NPS, String schedule)
      Searches for and finds the nearest standard pipe size to a given specification. Acceptable inputs: - Outer diameter Do - Inner diameter Di - NPS - optionally specify the schedule (default "40") Returns an array {foundNPS, foundDi (m), foundDo (m), foundT (m)}. If none is found (i.e. the diameter is bigger than the largest in the table), throws exception.
      Parameters:
      Do - a Double object
      Di - a Double object
      NPS - a Double object
      schedule - a String object
      Returns:
      an array of
      invalid reference
      double
      objects
    • gaugeFromThickness

      public static double gaugeFromThickness(double t, boolean SI, String schedule)
      Looks up the gauge of a given wire thickness for a chosen schedule.

      If SI is true, input thickness t is in meters; otherwise, in inches. This returns the gauge number that best matches. If t is out of range, it will throw an IllegalArgumentException.

      Parameters:
      t - thickness in meters if SI=true, else in inches
      SI - true if t is in meters
      schedule - name of the wire gauge schedule, e.g. "BWG"
      Returns:
      the gauge as a double
    • thicknessFromGauge

      public static double thicknessFromGauge(double gauge, boolean SI, String schedule)
      Looks up the thickness of a given wire gauge in a chosen schedule.

      If SI is true, returns thickness in meters; otherwise in inches.

      Parameters:
      gauge - the gauge number
      SI - if true, thickness is returned in meters; else inches
      schedule - wire gauge schedule name, e.g. "BWG"
      Returns:
      thickness in meters or inches
    • erosionalVelocity

      public static double erosionalVelocity(double rho, double C)
      Calculate the erosional velocity according to the API RP 14E equation:

      V_e = C / sqrt(rho)

      where C is in sqrt(lb/(ft*s^2)) and rho is in kg/m^3.

      Parameters:
      rho - fluid bulk density in kg/m^3
      C - erosional velocity factor in sqrt(lb/(ft*s^2))
      Returns:
      erosional velocity in m/s
    • main

      public static void main(String[] args)

      main.

      Parameters:
      args - an array of String objects