Class AdiabaticPipe

All Implemented Interfaces:
Serializable, Runnable, PipeLineInterface, ProcessEquipmentInterface, TwoPortInterface, SimulationInterface, NamedInterface
Direct Known Subclasses:
IncompressiblePipeFlow

public class AdiabaticPipe extends Pipeline

AdiabaticPipe 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
    • length

      double length
    • insideDiameter

      double insideDiameter
    • velocity

      double velocity
    • pipeWallRoughness

      double pipeWallRoughness
    • inletElevation

      private double inletElevation
    • outletElevation

      private double outletElevation
    • dH

      double dH
    • flowPattern

      String flowPattern
    • pipeSpecification

      String pipeSpecification
  • Constructor Details

    • AdiabaticPipe

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

      public AdiabaticPipe(String name, StreamInterface inStream)
      Constructor for AdiabaticPipe.
      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
    • 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()

      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 (pressureOut).

      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
    • 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
    • main

      public static void main(String[] name)

      main.

      Parameters:
      name - an array of String objects