Class Pipeline

All Implemented Interfaces:
Serializable, Runnable, PipeLineInterface, ProcessEquipmentInterface, TwoPortInterface, SimulationInterface, NamedInterface
Direct Known Subclasses:
AdiabaticPipe, AdiabaticTwoPhasePipe, OnePhasePipeLine, PipeBeggsAndBrills, SimpleTPoutPipeline, TubingPerformance, TwoFluidPipe, TwoPhasePipeLine, WaterHammerPipe

public class Pipeline extends TwoPortEquipment implements PipeLineInterface

Pipeline class.

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

    • serialVersionUID

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

      static org.apache.logging.log4j.Logger logger
      Logger object for class.
    • fileName

      protected String fileName
    • pipe

      protected FlowSystemInterface pipe
    • system

      protected SystemInterface system
    • flowPattern

      String flowPattern
    • times

      double[] times
    • equilibriumHeatTransfer

      boolean equilibriumHeatTransfer
    • equilibriumMassTransfer

      boolean equilibriumMassTransfer
    • numberOfLegs

      int numberOfLegs
    • numberOfNodesInLeg

      int numberOfNodesInLeg
    • legHeights

      double[] legHeights
    • legPositions

      double[] legPositions
    • pipeDiameters

      double[] pipeDiameters
    • outerTemperature

      double[] outerTemperature
    • pipeWallRoughness

      double[] pipeWallRoughness
    • outerHeatTransferCoeffs

      double[] outerHeatTransferCoeffs
    • wallHeatTransferCoeffs

      double[] wallHeatTransferCoeffs
    • pipelineMechanicalDesign

      PipelineMechanicalDesign pipelineMechanicalDesign
  • Constructor Details

  • Method Details

    • initMechanicalDesign

      public void initMechanicalDesign()

      Initialize a initMechanicalDesign for the equipment.

      Specified by:
      initMechanicalDesign in interface ProcessEquipmentInterface
      Overrides:
      initMechanicalDesign in class ProcessEquipmentBaseClass
    • getMechanicalDesign

      public PipelineMechanicalDesign getMechanicalDesign()

      Get a mechanicalDesign for the equipment.

      Specified by:
      getMechanicalDesign in interface ProcessEquipmentInterface
      Overrides:
      getMechanicalDesign in class ProcessEquipmentBaseClass
      Returns:
      a MechanicalDesign object
    • setOutputFileName

      public void setOutputFileName(String name)

      setOutputFileName.

      Specified by:
      setOutputFileName in interface PipeLineInterface
      Parameters:
      name - a String object
    • setNumberOfLegs

      public void setNumberOfLegs(int number)

      setNumberOfLegs.

      Specified by:
      setNumberOfLegs in interface PipeLineInterface
      Parameters:
      number - a int
    • getCapacityDuty

      public double getCapacityDuty()

      getCapacityDuty.

      Specified by:
      getCapacityDuty in interface ProcessEquipmentInterface
      Returns:
      a double
    • getCapacityMax

      public double getCapacityMax()

      getCapacityMax.

      Specified by:
      getCapacityMax in interface ProcessEquipmentInterface
      Returns:
      a double
    • setNumberOfNodesInLeg

      public void setNumberOfNodesInLeg(int number)

      setNumberOfNodesInLeg.

      Specified by:
      setNumberOfNodesInLeg in interface PipeLineInterface
      Parameters:
      number - a int
    • setHeightProfile

      public void setHeightProfile(double[] heights)

      setHeightProfile.

      Specified by:
      setHeightProfile in interface PipeLineInterface
      Parameters:
      heights - an array of type double
    • setLegPositions

      public void setLegPositions(double[] positions)

      setLegPositions.

      Specified by:
      setLegPositions in interface PipeLineInterface
      Parameters:
      positions - an array of type double
    • setPipeDiameters

      public void setPipeDiameters(double[] diameter)

      setPipeDiameters.

      Specified by:
      setPipeDiameters in interface PipeLineInterface
      Parameters:
      diameter - an array of type double
    • setPipeOuterHeatTransferCoefficients

      public void setPipeOuterHeatTransferCoefficients(double[] heatCoefs)

      setPipeOuterHeatTransferCoefficients.

      Parameters:
      heatCoefs - an array of type double
    • setPipeWallHeatTransferCoefficients

      public void setPipeWallHeatTransferCoefficients(double[] heatCoefs)

      setPipeWallHeatTransferCoefficients.

      Parameters:
      heatCoefs - an array of type double
    • setPipeWallRoughness

      public void setPipeWallRoughness(double[] rough)

      setPipeWallRoughness.

      Specified by:
      setPipeWallRoughness in interface PipeLineInterface
      Parameters:
      rough - an array of type double
    • setOuterTemperatures

      public void setOuterTemperatures(double[] outerTemp)

      setOuterTemperatures.

      Specified by:
      setOuterTemperatures in interface PipeLineInterface
      Parameters:
      outerTemp - an array of type double
    • setEquilibriumMassTransfer

      public void setEquilibriumMassTransfer(boolean test)

      Setter for the field equilibriumMassTransfer.

      Parameters:
      test - a boolean
    • setEquilibriumHeatTransfer

      public void setEquilibriumHeatTransfer(boolean test)

      Setter for the field equilibriumHeatTransfer.

      Parameters:
      test - a boolean
    • 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
      Parameters:
      id - UUID
    • runTransient

      public void runTransient(double dt, UUID id)

      runTransient

      This method calculates thermodynamic and unit operations using difference equations if available and calculateSteadyState is true. Use setCalculateSteadyState to set the parameter. Sets calc identifier UUID.
      Specified by:
      runTransient in interface SimulationInterface
      Parameters:
      dt - Delta time [s]
      id - Calculation identifier
    • displayResult

      public void displayResult()

      displayResult.

      Specified by:
      displayResult in interface ProcessEquipmentInterface
      Overrides:
      displayResult in class ProcessEquipmentBaseClass
    • getPipe

      public FlowSystemInterface getPipe()

      getPipe.

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

      public void setInitialFlowPattern(String flowPattern)

      setInitialFlowPattern.

      Specified by:
      setInitialFlowPattern in interface PipeLineInterface
      Parameters:
      flowPattern - a String object
    • getTimes

      public double[] getTimes()
      Getter for property times.
      Returns:
      Value of property times.
    • getSuperficialVelocity

      public double getSuperficialVelocity(int phaseNum, int node)

      getSuperficialVelocity.

      Parameters:
      phaseNum - a int
      node - a int
      Returns:
      a double
    • setTimeSeries

      public void setTimeSeries(double[] times, SystemInterface[] systems, int timestepininterval)
      Setter for property times.
      Parameters:
      times - New value of property times.
      systems - an array of SystemInterface objects
      timestepininterval - a int
    • getEntropyProduction

      public double getEntropyProduction(String unit)

      getEntropyProduction.

      Specified by:
      getEntropyProduction in interface ProcessEquipmentInterface
      Overrides:
      getEntropyProduction in class ProcessEquipmentBaseClass
      Parameters:
      unit - a String object
      Returns:
      a double
    • getOutletPressure

      public double getOutletPressure(String unit)

      getOutletPressure.

      Parameters:
      unit - a String object
      Returns:
      a double
    • toJson

      public String toJson()

      Serializes the Process Equipment along with its state to a JSON string.

      Specified by:
      toJson in interface ProcessEquipmentInterface
      Overrides:
      toJson in class TwoPortEquipment
      Returns:
      json string.
    • toJson

      public String toJson(ReportConfig cfg)
      Serializes the Process Equipment with configurable level of detail.
      Specified by:
      toJson in interface ProcessEquipmentInterface
      Overrides:
      toJson in class TwoPortEquipment
      Parameters:
      cfg - report configuration
      Returns:
      json string