Class AdiabaticTwoPhasePipe

All Implemented Interfaces:
Serializable, Runnable, PipeLineInterface, ProcessEquipmentInterface, TwoPortInterface, SimulationInterface, NamedInterface

public class AdiabaticTwoPhasePipe extends Pipeline

AdiabaticTwoPhasePipe class.

Version:
$Id: $Id
Author:
Even Solbraa
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serialization version UID.
      See Also:
    • inletPressure

      double inletPressure
    • setTemperature

      boolean setTemperature
    • setPressureOut

      boolean setPressureOut
    • temperatureOut

      protected double temperatureOut
    • pressureOut

      protected double pressureOut
    • pressureOutLimit

      private double pressureOutLimit
    • length

      double length
    • flowLimit

      double flowLimit
    • maxflowunit

      String maxflowunit
    • insideDiameter

      double insideDiameter
    • velocity

      double velocity
    • pipeWallRoughness

      double pipeWallRoughness
    • inletElevation

      private double inletElevation
      Elevation at pipe inlet in meters.
    • outletElevation

      private double outletElevation
      Elevation at pipe outlet in meters.
    • dH

      double dH
    • flowPattern

      String flowPattern
    • pipeSpecification

      String pipeSpecification
  • Constructor Details

    • AdiabaticTwoPhasePipe

      public AdiabaticTwoPhasePipe(String name)
      Constructor for AdiabaticTwoPhasePipe.
      Parameters:
      name - name of pipe
    • AdiabaticTwoPhasePipe

      public AdiabaticTwoPhasePipe(String name, StreamInterface inStream)
      Constructor for AdiabaticTwoPhasePipe.
      Parameters:
      name - name of pipe
      inStream - input stream
  • Method Details

    • setPipeSpecification

      public void setPipeSpecification(double nominalDiameter, String pipeSec)

      Setter for the field pipeSpecification.

      Parameters:
      nominalDiameter - a double
      pipeSec - a String object
    • getThermoSystem

      public SystemInterface getThermoSystem()

      getThermoSystem.

      Specified by:
      getThermoSystem in interface ProcessEquipmentInterface
      Overrides:
      getThermoSystem in class ProcessEquipmentBaseClass
      Returns:
      a SystemInterface object
    • setOutTemperature

      public void setOutTemperature(double temperature)

      setOutTemperature.

      Parameters:
      temperature - a double
    • setOutPressure

      public void setOutPressure(double pressure)

      setOutPressure.

      Parameters:
      pressure - a double
    • calcWallFrictionFactor

      public double calcWallFrictionFactor(double reynoldsNumber)

      calcWallFrictionFactor.

      Parameters:
      reynoldsNumber - a double
      Returns:
      a double
    • calcPressureOut

      public double calcPressureOut()

      calcPressureOut.

      Returns:
      a double
    • calcFlow

      public double calcFlow(double pressureOut)

      calcFlow.

      Calculates the flow rate required to achieve the specified outlet pressure using bisection iteration. This method iteratively adjusts the flow rate until the calculated outlet pressure matches the target outlet pressure.

      Parameters:
      pressureOut - target outlet pressure in bara
      Returns:
      the calculated flow rate in the current system units
    • run

      public void run(UUID id)

      In this method all thermodynamic and unit operations will be calculated in a steady state calculation.

      Specified by:
      run in interface SimulationInterface
      Overrides:
      run in class Pipeline
      Parameters:
      id - UUID
    • displayResult

      public void displayResult()

      displayResult.

      Specified by:
      displayResult in interface ProcessEquipmentInterface
      Overrides:
      displayResult in class Pipeline
    • getSuperficialVelocity

      public double getSuperficialVelocity()

      getSuperficialVelocity.

      Returns:
      a double
    • getPipe

      public FlowSystemInterface getPipe()

      getPipe.

      Specified by:
      getPipe in interface PipeLineInterface
      Overrides:
      getPipe in class Pipeline
      Returns:
      a FlowSystemInterface object
    • setInitialFlowPattern

      public void setInitialFlowPattern(String flowPattern)

      setInitialFlowPattern.

      Specified by:
      setInitialFlowPattern in interface PipeLineInterface
      Overrides:
      setInitialFlowPattern in class Pipeline
      Parameters:
      flowPattern - a String object
    • getLength

      public double getLength()

      Getter for the field length.

      Returns:
      the length
    • setLength

      public void setLength(double length)

      Setter for the field length.

      Parameters:
      length - the length to set
    • getDiameter

      public double getDiameter()

      getDiameter.

      Returns:
      the diameter
    • setDiameter

      public void setDiameter(double diameter)

      setDiameter.

      Parameters:
      diameter - the diameter to set
    • getPipeWallRoughness

      public double getPipeWallRoughness()

      Getter for the field pipeWallRoughness.

      Returns:
      the pipeWallRoughness
    • setPipeWallRoughness

      public void setPipeWallRoughness(double pipeWallRoughness)

      Setter for the field pipeWallRoughness.

      Parameters:
      pipeWallRoughness - the pipeWallRoughness to set
    • getInletElevation

      public double getInletElevation()

      Getter for the field inletElevation.

      Returns:
      the inletElevation
    • setInletElevation

      public void setInletElevation(double inletElevation)

      Setter for the field inletElevation.

      Parameters:
      inletElevation - the inletElevation to set
    • getOutletElevation

      public double getOutletElevation()

      Getter for the field outletElevation.

      Returns:
      the outletElevation
    • setOutletElevation

      public void setOutletElevation(double outletElevation)

      Setter for the field outletElevation.

      Parameters:
      outletElevation - the outletElevation to set
    • getPressureOutLimit

      public double getPressureOutLimit()

      Getter for the field pressureOutLimit.

      Returns:
      a double
    • setPressureOutLimit

      public void setPressureOutLimit(double pressureOutLimit)

      Setter for the field pressureOutLimit.

      Parameters:
      pressureOutLimit - a double
    • setFlowLimit

      public void setFlowLimit(double flowLimit, String unit)

      Setter for the field flowLimit.

      Parameters:
      flowLimit - a double
      unit - a String object