Class ThreePhaseSeparator
- All Implemented Interfaces:
Serializable, Runnable, AutoSizeable, CapacityConstrainedEquipment, ProcessEquipmentInterface, SeparatorInterface, StateVectorProvider, SimulationInterface, NamedInterface
ThreePhaseSeparator class.
- Version:
- $Id: $Id
- Author:
- Even Solbraa
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Separator
Separator.Builder -
Field Summary
FieldsModifier and TypeFieldDescription(package private) double(package private) String(package private) double(package private) String(package private) double(package private) String(package private) double(package private) Stringprivate doubleGas outlet valve flow fraction (0.0 = fully closed, 1.0 = fully open).private doubleprivate doubleprivate double(package private) static org.apache.logging.log4j.LoggerLogger object for class.(package private) double(package private) String(package private) double(package private) Stringprivate doubleOil level height in meters (bottom of separator to top of oil phase).private doubleOil outlet valve flow fraction (0.0 = fully closed, 1.0 = fully open).private static final longSerialization version UID.(package private) String(package private) booleanprivate doubleWater level height in meters (bottom of separator to water-oil interface).private doubleWater outlet valve flow fraction (0.0 = fully closed, 1.0 = fully open).(package private) StreamInterfaceFields inherited from class Separator
DEFAULT_DROPLET_CUTSIZE_LIMIT, DEFAULT_INLET_MOMENTUM_LIMIT, DEFAULT_K_VALUE_LIMIT, DEFAULT_LIQUID_DENSITY_FOR_SIZING, DEFAULT_MIN_OIL_RETENTION_TIME, DEFAULT_MIN_WATER_RETENTION_TIME, gasOutStream, gasSystem, gasVolume, inletStreamMixer, isInitTransient, liquidLevel, liquidOutStream, liquidSystem, liquidVolume, numberOfInputStreams, separatorMechanicalDesign, separatorSection, thermoSystem, thermoSystem2, thermoSystemCloned, waterSystemFields inherited from class ProcessEquipmentBaseClass
conditionAnalysisMessage, energyStream, hasController, isSolved, properties, reportFields inherited from class SimulationBaseClass
calcIdentifier, calculateSteadyState, timeFields inherited from class NamedBaseClass
name -
Constructor Summary
ConstructorsConstructorDescriptionThreePhaseSeparator(String name) Constructor for ThreePhaseSeparator.ThreePhaseSeparator(String name, StreamInterface inletStream) Constructor for ThreePhaseSeparator. -
Method Summary
Modifier and TypeMethodDescriptiondoubleCalculate the oil-water interface settling time.doubleCalculate oil retention time between NIL and NLL.doubleCalculate water retention time below NIL.voiddisplayResult.doublegetEntropyProduction(String unit) getEntropyProduction.doublegetExergyChange(String unit, double surroundingTemperature) Get exergy change production of the process equipment.doubleGet the gas outlet valve flow fraction.doublegetMassBalance(String unit) getMassBalance.doubleGet the oil level (height from bottom of separator to top of oil phase).doubleGet the oil outlet valve flow fraction.getOilOutStream.doubleGet the oil phase thickness (oil level minus water level).Get a summary of all performance parameters with limit checks.doubleGet the water level (height from bottom of separator to water-oil interface).doubleGet the water outlet valve flow fraction.Getter for the fieldwaterOutStream.voidInitializes three-phase separator for transient calculations.booleanCheck if all separator performance parameters are within limits.voidIn this method all thermodynamic and unit operations will be calculated in a steady state calculation.voidrunTransient(double dt, UUID id) runTransientvoidsetEntrainment(double val, String specType, String specifiedStream, String phaseFrom, String phaseTo) setEntrainment.voidsetGasOutletFlowFraction(double fraction) Set the gas outlet valve flow fraction (simulates valve position).voidsetInletStream(StreamInterface inletStream) setInletStream.voidsetOilLevel(double level) Set the oil level (height from bottom of separator to top of oil phase).voidsetOilOutletFlowFraction(double fraction) Set the oil outlet valve flow fraction (simulates valve position).voidsetTempPres(double temp, double pres) setTempPres.voidsetWaterLevel(double level) Set the water level (height from bottom of separator to water-oil interface).voidsetWaterOutletFlowFraction(double fraction) Set the water outlet valve flow fraction (simulates valve position).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.private voidUpdates the parent class liquidLevel based on water and oil levels.private voidUpdates water and oil levels from phase volumes in the thermodynamic system.Methods inherited from class Separator
addCapacityConstraint, addSeparatorSection, addStream, autoSize, autoSize, autoSize, builder, calcDropletCutSize, calcDropletCutSizeAtHLL, calcGasAreaAboveLevel, calcGasVelocityAboveLevel, calcInletMomentumFlux, calcInletMomentumFlux, calcKValue, calcKValueAtHLL, calcLiquidVolume, calcSegmentArea, clearCapacityConstraints, disableConstraint, disableConstraints, enableConstraints, enforceHeadspace, equals, evaluateFireExposure, evaluateFireExposure, getBottleneckConstraint, getCapacityConstraints, getCapacityDuty, getCapacityMax, getCapacityUtilization, getConstraintSummary, getDeRatedGasLoadFactor, getDeRatedGasLoadFactor, getDesignGasLoadFactor, getDesignLiquidLevelFraction, getEfficiency, getEnabledConstraintNames, getExergyChange, getFeedStream, getGas, getGasCarryunderFraction, getGasLoadFactor, getGasLoadFactor, getGasOutStream, getGasSuperficialVelocity, getHeatDuty, getHeatDuty, getHeatInput, getHeatInput, getInnerSurfaceArea, getInternalDiameter, getLiquid, getLiquidCarryoverFraction, getLiquidLevel, getLiquidOutStream, getMaxAllowableGasFlowRate, getMaxAllowableGasVelocity, getMaxUtilization, getMechanicalDesign, getOperatingEnvelopeViolation, getOrientation, getPressure, getPressureDrop, getResultTable, getSeparatorLength, getSeparatorSection, getSeparatorSection, getSeparatorSections, getSimulationValidationErrors, getSizingReport, getSizingReportJson, getStateVector, getThermoSystem, getUnwettedArea, getWettedArea, hashCode, initDesignFromFlow, initializeCapacityConstraints, initMechanicalDesign, isAutoSized, isCapacityExceeded, isConstraintEnabled, isDropletCutSizeWithinLimit, isDropletCutSizeWithinLimit, isEnforceCapacityLimits, isHardLimitExceeded, isInletMomentumWithinLimit, isInletMomentumWithinLimit, isKValueWithinLimit, isKValueWithinLimit, isOilRetentionTimeAboveMinimum, isOilRetentionTimeAboveMinimum, isOverloaded, isSetHeatInput, isSimulationValid, isSinglePhase, isWaterRetentionTimeAboveMinimum, isWaterRetentionTimeAboveMinimum, isWithinOperatingEnvelope, levelFromVolume, liquidArea, removeCapacityConstraint, setDesignGasLoadFactor, setDesignLiquidLevelFraction, setDropletCutSizeLimit, setDuty, setDuty, setEfficiency, setEnforceCapacityLimits, setGasCarryunderFraction, setHeatDuty, setHeatDuty, setHeatInput, setHeatInput, setInletMomentumLimit, setInternalDiameter, setKValueLimit, setLiquidCarryoverFraction, setLiquidLevel, setMinOilRetentionTime, setMinWaterRetentionTime, setOrientation, setPressureDrop, setSeparatorLength, sizeFromFlow, useAllConstraints, useAPIConstraints, useConstraints, useEquinorConstraints, useGasCapacityConstraints, useGasScrubberConstraints, useLiquidCapacityConstraints, validateSetupMethods inherited from class ProcessEquipmentBaseClass
copy, getConditionAnalysisMessage, getController, getEffectiveCapacityFactor, getEnergyStream, getFailureMode, getMassBalance, getMinimumFlow, getPressure, getProperty, getReport_json, getSpecification, getTemperature, getTemperature, 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 ProcessEquipmentInterface
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 StateVectorProvider
getStateDimension, getStateNames
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
logger
static org.apache.logging.log4j.Logger loggerLogger object for class. -
waterOutStream
StreamInterface waterOutStream -
specifiedStream
String specifiedStream -
gasInAqueous
double gasInAqueous -
gasInAqueousSpec
String gasInAqueousSpec -
gasInOil
double gasInOil -
gasInOilSpec
String gasInOilSpec -
oilInGas
double oilInGas -
oilInGasSpec
String oilInGasSpec -
oilInAqueous
double oilInAqueous -
oilInAqueousSpec
String oilInAqueousSpec -
aqueousInGas
double aqueousInGas -
aqueousInGasSpec
String aqueousInGasSpec -
aqueousInOil
double aqueousInOil -
aqueousInOilSpec
String aqueousInOilSpec -
useTempMultiPhaseCheck
boolean useTempMultiPhaseCheck -
lastEnthalpy
private double lastEnthalpy -
lastFlowRate
private double lastFlowRate -
lastPressure
private double lastPressure -
waterLevel
private double waterLevelWater level height in meters (bottom of separator to water-oil interface). -
oilLevel
private double oilLevelOil level height in meters (bottom of separator to top of oil phase). -
gasOutletFlowFraction
private double gasOutletFlowFractionGas outlet valve flow fraction (0.0 = fully closed, 1.0 = fully open). -
oilOutletFlowFraction
private double oilOutletFlowFractionOil outlet valve flow fraction (0.0 = fully closed, 1.0 = fully open). -
waterOutletFlowFraction
private double waterOutletFlowFractionWater outlet valve flow fraction (0.0 = fully closed, 1.0 = fully open).
-
-
Constructor Details
-
ThreePhaseSeparator
Constructor for ThreePhaseSeparator.- Parameters:
name- name of separator
-
ThreePhaseSeparator
Constructor for ThreePhaseSeparator.
- Parameters:
name- aStringobjectinletStream- aStreamInterfaceobject
-
-
Method Details
-
setEntrainment
-
setInletStream
setInletStream.
- Overrides:
setInletStreamin classSeparator- Parameters:
inletStream- aStreamInterfaceobject
-
getWaterOutStream
Getter for the field
waterOutStream.- Returns:
- a
StreamInterfaceobject
-
getOilOutStream
-
setWaterLevel
public void setWaterLevel(double level) Set the water level (height from bottom of separator to water-oil interface).- Parameters:
level- water level in meters
-
getWaterLevel
public double getWaterLevel()Get the water level (height from bottom of separator to water-oil interface).- Returns:
- water level in meters
-
setOilLevel
public void setOilLevel(double level) Set the oil level (height from bottom of separator to top of oil phase).- Parameters:
level- oil level in meters
-
getOilLevel
public double getOilLevel()Get the oil level (height from bottom of separator to top of oil phase).- Returns:
- oil level in meters
-
getOilThickness
public double getOilThickness()Get the oil phase thickness (oil level minus water level).- Returns:
- oil thickness in meters
-
setGasOutletFlowFraction
public void setGasOutletFlowFraction(double fraction) Set the gas outlet valve flow fraction (simulates valve position).- Parameters:
fraction- flow fraction (0.0 = fully closed, 1.0 = fully open)
-
getGasOutletFlowFraction
public double getGasOutletFlowFraction()Get the gas outlet valve flow fraction.- Returns:
- flow fraction (0.0 = fully closed, 1.0 = fully open)
-
setOilOutletFlowFraction
public void setOilOutletFlowFraction(double fraction) Set the oil outlet valve flow fraction (simulates valve position).- Parameters:
fraction- flow fraction (0.0 = fully closed, 1.0 = fully open)
-
getOilOutletFlowFraction
public double getOilOutletFlowFraction()Get the oil outlet valve flow fraction.- Returns:
- flow fraction (0.0 = fully closed, 1.0 = fully open)
-
setWaterOutletFlowFraction
public void setWaterOutletFlowFraction(double fraction) Set the water outlet valve flow fraction (simulates valve position).- Parameters:
fraction- flow fraction (0.0 = fully closed, 1.0 = fully open)
-
getWaterOutletFlowFraction
public double getWaterOutletFlowFraction()Get the water outlet valve flow fraction.- Returns:
- flow fraction (0.0 = fully closed, 1.0 = fully open)
-
updateLiquidLevelFromWaterAndOil
private void updateLiquidLevelFromWaterAndOil()Updates the parent class liquidLevel based on water and oil levels. -
updateWaterAndOilLevelsFromPhases
private void updateWaterAndOilLevelsFromPhases()Updates water and oil levels from phase volumes in the thermodynamic system. -
run
In this method all thermodynamic and unit operations will be calculated in a steady state calculation.
- Specified by:
runin interfaceSimulationInterface- Overrides:
runin classSeparator- Parameters:
id- UUID
-
initializeTransientCalculation
public void initializeTransientCalculation()Initializes three-phase separator for transient calculations.- Overrides:
initializeTransientCalculationin classSeparator
-
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- Overrides:
runTransientin classSeparator- Parameters:
dt- Delta time [s]id- Calculation identifier
-
setTempPres
public void setTempPres(double temp, double pres) setTempPres.
- Overrides:
setTempPresin classSeparator- Parameters:
temp- a doublepres- a double
-
displayResult
public void displayResult()displayResult.
- Specified by:
displayResultin interfaceProcessEquipmentInterface- Overrides:
displayResultin classSeparator
-
getEntropyProduction
getEntropyProduction.
- Specified by:
getEntropyProductionin interfaceProcessEquipmentInterface- Overrides:
getEntropyProductionin classSeparator- Parameters:
unit- aStringobject- Returns:
- a double
-
getMassBalance
getMassBalance.
- Specified by:
getMassBalancein interfaceProcessEquipmentInterface- Overrides:
getMassBalancein classSeparator- Parameters:
unit- aStringobject- Returns:
- a double
-
getExergyChange
Get exergy change production of the process equipment.- Specified by:
getExergyChangein interfaceProcessEquipmentInterface- Overrides:
getExergyChangein classSeparator- Parameters:
unit- Supported units are J and kJsurroundingTemperature- The surrounding temperature in Kelvin- Returns:
- change in exergy in specified unit
-
toJson
Serializes the Process Equipment along with its state to a JSON string.
- Specified by:
toJsonin interfaceProcessEquipmentInterface- Overrides:
toJsonin classSeparator- Returns:
- json string.
-
toJson
Serializes the Process Equipment with configurable level of detail.- Specified by:
toJsonin interfaceProcessEquipmentInterface- Overrides:
toJsonin classSeparator- Parameters:
cfg- report configuration- Returns:
- json string
-
calcOilRetentionTime
public double calcOilRetentionTime()Calculate oil retention time between NIL and NLL. Per API 12J and TR3500 SR-83381: Should be 3-5 minutes for light oils.For three-phase separator, oil retention time is calculated for the oil layer between the water-oil interface (NIL) and the oil surface (NLL).
- Overrides:
calcOilRetentionTimein classSeparator- Returns:
- oil retention time in minutes
-
calcWaterRetentionTime
public double calcWaterRetentionTime()Calculate water retention time below NIL. Per API 12J and TR3500 SR-83381: Should be 3-5 minutes for light oils.For three-phase separator, water retention time is calculated for the water layer below the water-oil interface (NIL).
- Overrides:
calcWaterRetentionTimein classSeparator- Returns:
- water retention time in minutes
-
calcInterfaceSettlingTime
public double calcInterfaceSettlingTime()Calculate the oil-water interface settling time. This is the time for oil droplets to rise through the water layer and water droplets to settle through the oil layer.- Returns:
- interface settling time in minutes
-
isWithinAllLimits
public boolean isWithinAllLimits()Check if all separator performance parameters are within limits. Uses default limits from Equinor TR3500 and API 12J.For three-phase separator, also checks interface settling time.
- Overrides:
isWithinAllLimitsin classSeparator- Returns:
- true if all parameters are within limits
-
getPerformanceSummary
Get a summary of all performance parameters with limit checks.For three-phase separator, includes interface settling information.
- Overrides:
getPerformanceSummaryin classSeparator- Returns:
- performance summary as formatted string
-