Class AdiabaticTwoPhasePipe
- All Implemented Interfaces:
Serializable, Runnable, CapacityConstrainedEquipment, PipeLineInterface, ProcessEquipmentInterface, TwoPortInterface, SimulationInterface, NamedInterface
AdiabaticTwoPhasePipe class.
- Version:
- $Id: $Id
- Author:
- Even Solbraa
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) double(package private) double(package private) Stringprivate doubleElevation at pipe inlet in meters.(package private) double(package private) double(package private) double(package private) Stringprivate doubleElevation at pipe outlet in meters.(package private) String(package private) doubleprotected doubleprivate doubleprivate static final longSerialization version UID.(package private) boolean(package private) booleanprotected double(package private) doubleFields inherited from class Pipeline
adiabatic, ambientTemperature, angle, burialDepth, buried, coatingConductivity, coatingThickness, corrosionAllowance, designCode, designPressure, designTemperature, diameter, elevation, equilibriumHeatTransfer, equilibriumMassTransfer, fileName, fittings, flowRegime, frictionFactor, heatTransferCoefficient, innerHeatTransferCoefficient, insulationConductivity, insulationThickness, insulationType, legHeights, legPositions, liquidHoldup, liquidHoldupProfile, locationClass, logger, materialGrade, mechanicalDesignCalculator, numberOfIncrements, numberOfLegs, numberOfNodesInLeg, outerHeatTransferCoefficient, outerHeatTransferCoeffs, outerTemperature, pipe, pipeDiameters, pipelineMechanicalDesign, pipeMaterial, pipeSchedule, pipeWallConductivity, pressureDrop, pressureProfile, reynoldsNumber, roughness, soilConductivity, surfaceTemperature, system, temperatureProfile, times, useFittings, wallHeatTransferCoeffs, wallThicknessFields 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
ConstructorsConstructorDescriptionAdiabaticTwoPhasePipe(String name) Constructor for AdiabaticTwoPhasePipe.AdiabaticTwoPhasePipe(String name, StreamInterface inStream) Constructor for AdiabaticTwoPhasePipe. -
Method Summary
Modifier and TypeMethodDescriptiondoublecalcFlow(double pressureOut) calcFlow.doublecalcPressureOut.doublecalcWallFrictionFactor(double reynoldsNumber) calcWallFrictionFactor.voiddisplayResult.doublegetDiameter.doubleGetter for the fieldinletElevation.doubleGetter for the fieldlength.doubleGetter for the fieldoutletElevation.getPipe()Get the underlying flow system (for advanced models).doubleGetter for the fieldpipeWallRoughness.doubleGetter for the fieldpressureOutLimit.doublegetSuperficialVelocity.getThermoSystem.voidIn this method all thermodynamic and unit operations will be calculated in a steady state calculation.voidsetDiameter(double diameter) setDiameter.voidsetFlowLimit(double flowLimit, String unit) Setter for the fieldflowLimit.voidsetInitialFlowPattern(String flowPattern) Set initial flow pattern for simulation initialization.voidsetInletElevation(double inletElevation) Setter for the fieldinletElevation.voidsetLength(double length) Setter for the fieldlength.voidsetOutletElevation(double outletElevation) Setter for the fieldoutletElevation.voidsetOutletPressure(double pressure) Set outlet pressure.voidsetOutletTemperature(double temperature) Set outlet temperature.voidsetPipeSpecification(double nominalDiameter, String pipeSec) Setter for the fieldpipeSpecification.voidsetPipeWallRoughness(double pipeWallRoughness) Setter for the fieldpipeWallRoughness.voidsetPressureOutLimit(double pressureOutLimit) Setter for the fieldpressureOutLimit.Methods inherited from class Pipeline
addCapacityConstraint, addFitting, addFittingFromDatabase, addFittings, addStandardFitting, addStandardFittings, calculateHoopStress, calculateMAOP, calculateMinimumWallThickness, calculateOverallHeatTransferCoefficient, calculateTestPressure, calculateVonMisesStress, clearCapacityConstraints, clearFittings, generateMechanicalDesignReport, getAmbientTemperature, getAngle, getBottleneckConstraint, getBurialDepth, getCapacityConstraints, getCapacityDuty, getCapacityMax, getCoatingConductivity, getCoatingThickness, getCorrosionAllowance, getDesignCode, getDesignPressure, getDesignTemperature, getEffectiveLength, getElevation, getEntropyProduction, getEquivalentLength, getFittings, getFlowRegime, getFrictionFactor, getHeatTransferCoefficient, getInnerHeatTransferCoefficient, getInsulationConductivity, getInsulationThickness, getInsulationType, getLiquidHoldup, getLiquidHoldupProfile, getLocationClass, getMAOP, getMaterialGrade, getMaxUtilization, getMechanicalDesign, getMechanicalDesignCalculator, getNumberOfFittings, getNumberOfIncrements, getNumberOfLegs, getOuterHeatTransferCoefficient, getOutletPressure, getOutletTemperature, getPipeMaterial, getPipeSchedule, getPipeWallConductivity, getPressureDrop, getPressureProfile, getReynoldsNumber, getSoilConductivity, getSuperficialVelocity, getSuperficialVelocity, getTemperatureProfile, getTimes, getTotalFittingsLdRatio, getVelocity, getWallThickness, initializeCapacityConstraints, initMechanicalDesign, isAdiabatic, isBuried, isCapacityExceeded, isHardLimitExceeded, isMechanicalDesignSafe, isUseFittings, printFittingsSummary, removeCapacityConstraint, runTransient, setAdiabatic, setAmbientTemperature, setAmbientTemperatures, setAngle, setBurialDepth, setBuried, setCoatingConductivity, setCoatingThickness, setConstantSurfaceTemperature, setCorrosionAllowance, setDesignCode, setDesignPressure, setDesignPressure, setDesignTemperature, setElevation, setEquilibriumHeatTransfer, setEquilibriumMassTransfer, setHeatTransferCoefficient, setHeightProfile, setInnerHeatTransferCoefficient, setInsulationConductivity, setInsulationThickness, setInsulationType, setLegPositions, setLocationClass, setMaterialGrade, setNumberOfIncrements, setNumberOfLegs, setNumberOfNodesInLeg, setOuterHeatTransferCoefficient, setOuterHeatTransferCoefficients, setOuterTemperatures, setOutputFileName, setPipeDiameters, setPipeMaterial, setPipeOuterHeatTransferCoefficients, setPipeSchedule, setPipeWallConductivity, setPipeWallHeatTransferCoefficients, setPipeWallRoughness, setSoilConductivity, setTimeSeries, setUseFittings, setWallHeatTransferCoefficients, setWallThickness, toJson, toJsonMethods 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, getEffectiveCapacityFactor, getEnergyStream, getExergyChange, getFailureMode, getMassBalance, getMinimumFlow, getPressure, getPressure, getProperty, getReport_json, getResultTable, getSpecification, getTemperature, getTemperature, hashCode, isActive, isActive, isCapacityAnalysisEnabled, isFailed, isSetEnergyStream, reportResults, restoreFromFailure, run_step, runConditionAnalysis, setCapacityAnalysisEnabled, setController, setEnergyStream, setEnergyStream, setFailureMode, setFlowValveController, setMinimumFlow, setPressure, setRegulatorOutSignal, setSpecification, setTemperature, simulateDegradedOperation, simulateTrip, 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 CapacityConstrainedEquipment
disableAllConstraints, enableAllConstraints, getAvailableMargin, getAvailableMarginPercent, getMaxUtilizationPercent, getUtilizationSummary, isCapacityAnalysisEnabled, isNearCapacityLimit, setCapacityAnalysisEnabledMethods inherited from interface NamedInterface
getName, getTagName, setName, setTagNameMethods inherited from interface PipeLineInterface
setOutPressure, setOutTemperatureMethods inherited from interface ProcessEquipmentInterface
getExergyChange, getFluid, getOperatingEnvelopeViolation, getRestCapacity, getSimulationValidationErrors, isSimulationValid, isWithinOperatingEnvelope, 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, setOutPressure, setOutTemperature
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization 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 inletElevationElevation at pipe inlet in meters. -
outletElevation
private double outletElevationElevation at pipe outlet in meters. -
dH
double dH -
flowPattern
String flowPattern -
pipeSpecification
String pipeSpecification
-
-
Constructor Details
-
AdiabaticTwoPhasePipe
Constructor for AdiabaticTwoPhasePipe.- Parameters:
name- name of pipe
-
AdiabaticTwoPhasePipe
Constructor for AdiabaticTwoPhasePipe.- Parameters:
name- name of pipeinStream- input stream
-
-
Method Details
-
setPipeSpecification
Setter for the field
pipeSpecification.- Specified by:
setPipeSpecificationin interfacePipeLineInterface- Overrides:
setPipeSpecificationin classPipeline- Parameters:
nominalDiameter- a doublepipeSec- aStringobject
-
getThermoSystem
getThermoSystem.
- Specified by:
getThermoSystemin interfaceProcessEquipmentInterface- Overrides:
getThermoSystemin classProcessEquipmentBaseClass- Returns:
- a
SystemInterfaceobject
-
setOutletTemperature
public void setOutletTemperature(double temperature) Set outlet temperature.
- Specified by:
setOutletTemperaturein interfacePipeLineInterface- Specified by:
setOutletTemperaturein interfaceTwoPortInterface- Overrides:
setOutletTemperaturein classPipeline- Parameters:
temperature- outlet temperature in Kelvin
-
setOutletPressure
public void setOutletPressure(double pressure) Set outlet pressure.
- Specified by:
setOutletPressurein interfacePipeLineInterface- Specified by:
setOutletPressurein interfaceTwoPortInterface- Overrides:
setOutletPressurein classPipeline- 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
In this method all thermodynamic and unit operations will be calculated in a steady state calculation.
- Specified by:
runin interfaceSimulationInterface- Overrides:
runin classPipeline- Parameters:
id- UUID
-
displayResult
public void displayResult()displayResult.
- Specified by:
displayResultin interfaceProcessEquipmentInterface- Overrides:
displayResultin classPipeline
-
getSuperficialVelocity
public double getSuperficialVelocity()getSuperficialVelocity.
- Returns:
- a double
-
getPipe
Get the underlying flow system (for advanced models).- Specified by:
getPipein interfacePipeLineInterface- Overrides:
getPipein classPipeline- Returns:
- flow system interface or null if not applicable
-
setInitialFlowPattern
Set initial flow pattern for simulation initialization.- Specified by:
setInitialFlowPatternin interfacePipeLineInterface- Overrides:
setInitialFlowPatternin classPipeline- Parameters:
flowPattern- initial flow pattern (e.g., "stratified", "slug")
-
getLength
public double getLength()Getter for the field
length.- Specified by:
getLengthin interfacePipeLineInterface- Overrides:
getLengthin classPipeline- Returns:
- the length
-
setLength
public void setLength(double length) Setter for the field
length.- Specified by:
setLengthin interfacePipeLineInterface- Overrides:
setLengthin classPipeline- Parameters:
length- the length to set
-
getDiameter
public double getDiameter()getDiameter.
- Specified by:
getDiameterin interfacePipeLineInterface- Overrides:
getDiameterin classPipeline- Returns:
- the diameter
-
setDiameter
public void setDiameter(double diameter) setDiameter.
- Specified by:
setDiameterin interfacePipeLineInterface- Overrides:
setDiameterin classPipeline- Parameters:
diameter- the diameter to set
-
getPipeWallRoughness
public double getPipeWallRoughness()Getter for the field
pipeWallRoughness.- Specified by:
getPipeWallRoughnessin interfacePipeLineInterface- Overrides:
getPipeWallRoughnessin classPipeline- Returns:
- the pipeWallRoughness
-
setPipeWallRoughness
public void setPipeWallRoughness(double pipeWallRoughness) Setter for the field
pipeWallRoughness.- Specified by:
setPipeWallRoughnessin interfacePipeLineInterface- Overrides:
setPipeWallRoughnessin classPipeline- Parameters:
pipeWallRoughness- the pipeWallRoughness to set
-
getInletElevation
public double getInletElevation()Getter for the field
inletElevation.- Specified by:
getInletElevationin interfacePipeLineInterface- Overrides:
getInletElevationin classPipeline- Returns:
- the inletElevation
-
setInletElevation
public void setInletElevation(double inletElevation) Setter for the field
inletElevation.- Specified by:
setInletElevationin interfacePipeLineInterface- Overrides:
setInletElevationin classPipeline- Parameters:
inletElevation- the inletElevation to set
-
getOutletElevation
public double getOutletElevation()Getter for the field
outletElevation.- Specified by:
getOutletElevationin interfacePipeLineInterface- Overrides:
getOutletElevationin classPipeline- Returns:
- the outletElevation
-
setOutletElevation
public void setOutletElevation(double outletElevation) Setter for the field
outletElevation.- Specified by:
setOutletElevationin interfacePipeLineInterface- Overrides:
setOutletElevationin classPipeline- 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
-