Class AdiabaticTwoPhasePipe

All Implemented Interfaces:
Serializable, Runnable, CapacityConstrainedEquipment, PipeLineInterface, ProcessEquipmentInterface, TwoPortInterface, ProcessElementInterface, 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
    • 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.

      Specified by:
      setPipeSpecification in interface PipeLineInterface
      Overrides:
      setPipeSpecification in class Pipeline
      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
    • setOutletTemperature

      public void setOutletTemperature(double temperature)

      Set outlet temperature.

      Specified by:
      setOutletTemperature in interface PipeLineInterface
      Specified by:
      setOutletTemperature in interface TwoPortInterface
      Overrides:
      setOutletTemperature in class Pipeline
      Parameters:
      temperature - outlet temperature in Kelvin
    • setOutletPressure

      public void setOutletPressure(double pressure)

      Set outlet pressure.

      Specified by:
      setOutletPressure in interface PipeLineInterface
      Specified by:
      setOutletPressure in interface TwoPortInterface
      Overrides:
      setOutletPressure in class Pipeline
      Parameters:
      pressure - outlet pressure in bara
    • 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()
      Get the underlying flow system (for advanced models).
      Specified by:
      getPipe in interface PipeLineInterface
      Overrides:
      getPipe in class Pipeline
      Returns:
      flow system interface or null if not applicable
    • setInitialFlowPattern

      public void setInitialFlowPattern(String flowPattern)
      Set initial flow pattern for simulation initialization.
      Specified by:
      setInitialFlowPattern in interface PipeLineInterface
      Overrides:
      setInitialFlowPattern in class Pipeline
      Parameters:
      flowPattern - initial flow pattern (e.g., "stratified", "slug")
    • getLength

      public double getLength()

      Getter for the field length.

      Specified by:
      getLength in interface PipeLineInterface
      Overrides:
      getLength in class Pipeline
      Returns:
      the length
    • setLength

      public void setLength(double length)

      Setter for the field length.

      Specified by:
      setLength in interface PipeLineInterface
      Overrides:
      setLength in class Pipeline
      Parameters:
      length - the length to set
    • getDiameter

      public double getDiameter()

      getDiameter.

      Specified by:
      getDiameter in interface PipeLineInterface
      Overrides:
      getDiameter in class Pipeline
      Returns:
      the diameter
    • setDiameter

      public void setDiameter(double diameter)

      setDiameter.

      Specified by:
      setDiameter in interface PipeLineInterface
      Overrides:
      setDiameter in class Pipeline
      Parameters:
      diameter - the diameter to set
    • getPipeWallRoughness

      public double getPipeWallRoughness()

      Getter for the field pipeWallRoughness.

      Specified by:
      getPipeWallRoughness in interface PipeLineInterface
      Overrides:
      getPipeWallRoughness in class Pipeline
      Returns:
      the pipeWallRoughness
    • setPipeWallRoughness

      public void setPipeWallRoughness(double pipeWallRoughness)

      Setter for the field pipeWallRoughness.

      Specified by:
      setPipeWallRoughness in interface PipeLineInterface
      Overrides:
      setPipeWallRoughness in class Pipeline
      Parameters:
      pipeWallRoughness - the pipeWallRoughness 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