Class Pipeline
- All Implemented Interfaces:
Serializable, Runnable, PipeLineInterface, ProcessEquipmentInterface, TwoPortInterface, SimulationInterface, NamedInterface
- Direct Known Subclasses:
AdiabaticPipe, AdiabaticTwoPhasePipe, OnePhasePipeLine, PipeBeggsAndBrills, SimpleTPoutPipeline, TubingPerformance, TwoFluidPipe, TwoPhasePipeLine, WaterHammerPipe
Pipeline class.
- Version:
- $Id: $Id
- Author:
- Even Solbraa
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean(package private) booleanprotected String(package private) String(package private) double[](package private) double[](package private) static org.apache.logging.log4j.LoggerLogger object for class.(package private) int(package private) int(package private) double[](package private) double[]protected FlowSystemInterface(package private) double[](package private) PipelineMechanicalDesign(package private) double[]private static final longSerialization version UID.protected SystemInterface(package private) double[](package private) double[]Fields inherited from class TwoPortEquipment
inStream, outStreamFields inherited from class ProcessEquipmentBaseClass
conditionAnalysisMessage, energyStream, hasController, isSolved, properties, reportFields inherited from class SimulationBaseClass
calcIdentifier, calculateSteadyState, timeFields inherited from class NamedBaseClass
name -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for Pipeline.Pipeline(String name, StreamInterface inStream) Constructor for Pipeline. -
Method Summary
Modifier and TypeMethodDescriptionvoiddisplayResult.doublegetCapacityDuty.doublegetCapacityMax.doublegetEntropyProduction(String unit) getEntropyProduction.Get amechanicalDesignfor the equipment.doublegetOutletPressure(String unit) getOutletPressure.getPipe()getPipe.doublegetSuperficialVelocity(int phaseNum, int node) getSuperficialVelocity.double[]getTimes()Getter for property times.voidInitialize ainitMechanicalDesignfor the equipment.voidIn this method all thermodynamic and unit operations will be calculated in a steady state calculation.voidrunTransient(double dt, UUID id) runTransientvoidsetEquilibriumHeatTransfer(boolean test) Setter for the fieldequilibriumHeatTransfer.voidsetEquilibriumMassTransfer(boolean test) Setter for the fieldequilibriumMassTransfer.voidsetHeightProfile(double[] heights) setHeightProfile.voidsetInitialFlowPattern(String flowPattern) setInitialFlowPattern.voidsetLegPositions(double[] positions) setLegPositions.voidsetNumberOfLegs(int number) setNumberOfLegs.voidsetNumberOfNodesInLeg(int number) setNumberOfNodesInLeg.voidsetOuterTemperatures(double[] outerTemp) setOuterTemperatures.voidsetOutputFileName(String name) setOutputFileName.voidsetPipeDiameters(double[] diameter) setPipeDiameters.voidsetPipeOuterHeatTransferCoefficients(double[] heatCoefs) setPipeOuterHeatTransferCoefficients.voidsetPipeWallHeatTransferCoefficients(double[] heatCoefs) setPipeWallHeatTransferCoefficients.voidsetPipeWallRoughness(double[] rough) setPipeWallRoughness.voidsetTimeSeries(double[] times, SystemInterface[] systems, int timestepininterval) Setter for property times.toJson()Serializes the Process Equipment along with its state to a JSON string.toJson(ReportConfig cfg) Serializes the Process Equipment with configurable level of detail.Methods inherited from class TwoPortEquipment
getInletPressure, getInletStream, getInletTemperature, getMassBalance, getOutletPressure, getOutletStream, getOutletTemperature, setInletPressure, setInletStream, setInletTemperature, setOutletPressure, setOutletStream, setOutletTemperature, validateSetupMethods inherited from class ProcessEquipmentBaseClass
copy, equals, getConditionAnalysisMessage, getController, getEnergyStream, getExergyChange, getMassBalance, getMinimumFlow, getPressure, getPressure, getProperty, getReport_json, getResultTable, getSpecification, getTemperature, getTemperature, getThermoSystem, hashCode, isActive, isActive, isSetEnergyStream, reportResults, run_step, runConditionAnalysis, setController, setEnergyStream, setEnergyStream, setFlowValveController, setMinimumFlow, setPressure, setRegulatorOutSignal, setSpecification, setTemperature, solvedMethods inherited from class SimulationBaseClass
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTimeMethods inherited from class NamedBaseClass
getName, getTagName, setName, setTagNameMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface NamedInterface
getName, getTagName, setName, setTagNameMethods inherited from interface ProcessEquipmentInterface
getExergyChange, getFluid, getRestCapacity, needRecalculationMethods inherited from interface SimulationInterface
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, run, run_step, run_step, runTransient, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTime, solvedMethods inherited from interface TwoPortInterface
getInletPressure, getInletStream, getInletTemperature, getInStream, getOutletPressure, getOutletStream, getOutletTemperature, getOutStream, setInletPressure, setInletStream, setInletTemperature, setOutletPressure, setOutletStream, setOutletTemperature
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
logger
static org.apache.logging.log4j.Logger loggerLogger object for class. -
fileName
-
pipe
-
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
-
Pipeline
-
Pipeline
Constructor for Pipeline.
- Parameters:
name- aStringobjectinStream- aStreamInterfaceobject
-
-
Method Details
-
initMechanicalDesign
public void initMechanicalDesign()Initialize a
initMechanicalDesignfor the equipment.- Specified by:
initMechanicalDesignin interfaceProcessEquipmentInterface- Overrides:
initMechanicalDesignin classProcessEquipmentBaseClass
-
getMechanicalDesign
Get a
mechanicalDesignfor the equipment.- Specified by:
getMechanicalDesignin interfaceProcessEquipmentInterface- Overrides:
getMechanicalDesignin classProcessEquipmentBaseClass- Returns:
- a
MechanicalDesignobject
-
setOutputFileName
setOutputFileName.
- Specified by:
setOutputFileNamein interfacePipeLineInterface- Parameters:
name- aStringobject
-
setNumberOfLegs
public void setNumberOfLegs(int number) setNumberOfLegs.
- Specified by:
setNumberOfLegsin interfacePipeLineInterface- Parameters:
number- a int
-
getCapacityDuty
public double getCapacityDuty()getCapacityDuty.
- Specified by:
getCapacityDutyin interfaceProcessEquipmentInterface- Returns:
- a double
-
getCapacityMax
public double getCapacityMax()getCapacityMax.
- Specified by:
getCapacityMaxin interfaceProcessEquipmentInterface- Returns:
- a double
-
setNumberOfNodesInLeg
public void setNumberOfNodesInLeg(int number) setNumberOfNodesInLeg.
- Specified by:
setNumberOfNodesInLegin interfacePipeLineInterface- Parameters:
number- a int
-
setHeightProfile
public void setHeightProfile(double[] heights) setHeightProfile.
- Specified by:
setHeightProfilein interfacePipeLineInterface- Parameters:
heights- an array of type double
-
setLegPositions
public void setLegPositions(double[] positions) setLegPositions.
- Specified by:
setLegPositionsin interfacePipeLineInterface- Parameters:
positions- an array of type double
-
setPipeDiameters
public void setPipeDiameters(double[] diameter) setPipeDiameters.
- Specified by:
setPipeDiametersin interfacePipeLineInterface- 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:
setPipeWallRoughnessin interfacePipeLineInterface- Parameters:
rough- an array of type double
-
setOuterTemperatures
public void setOuterTemperatures(double[] outerTemp) setOuterTemperatures.
- Specified by:
setOuterTemperaturesin interfacePipeLineInterface- 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
In this method all thermodynamic and unit operations will be calculated in a steady state calculation.
- Specified by:
runin interfaceSimulationInterface- Parameters:
id- UUID
-
runTransient
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:
runTransientin interfaceSimulationInterface- Parameters:
dt- Delta time [s]id- Calculation identifier
-
displayResult
public void displayResult()displayResult.
- Specified by:
displayResultin interfaceProcessEquipmentInterface- Overrides:
displayResultin classProcessEquipmentBaseClass
-
getPipe
getPipe.
- Specified by:
getPipein interfacePipeLineInterface- Returns:
- a
FlowSystemInterfaceobject
-
setInitialFlowPattern
setInitialFlowPattern.
- Specified by:
setInitialFlowPatternin interfacePipeLineInterface- Parameters:
flowPattern- aStringobject
-
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 intnode- a int- Returns:
- a double
-
setTimeSeries
Setter for property times.- Parameters:
times- New value of property times.systems- an array ofSystemInterfaceobjectstimestepininterval- a int
-
getEntropyProduction
getEntropyProduction.
- Specified by:
getEntropyProductionin interfaceProcessEquipmentInterface- Overrides:
getEntropyProductionin classProcessEquipmentBaseClass- Parameters:
unit- aStringobject- Returns:
- a double
-
getOutletPressure
-
toJson
Serializes the Process Equipment along with its state to a JSON string.
- Specified by:
toJsonin interfaceProcessEquipmentInterface- Overrides:
toJsonin classTwoPortEquipment- Returns:
- json string.
-
toJson
Serializes the Process Equipment with configurable level of detail.- Specified by:
toJsonin interfaceProcessEquipmentInterface- Overrides:
toJsonin classTwoPortEquipment- Parameters:
cfg- report configuration- Returns:
- json string
-