Class SeparatorMechanicalDesign
java.lang.Object
neqsim.process.mechanicaldesign.MechanicalDesign
neqsim.process.mechanicaldesign.separator.SeparatorMechanicalDesign
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AbsorberMechanicalDesign, GasScrubberMechanicalDesign
SeparatorMechanicalDesign class.
- Version:
- $Id: $Id
- Author:
- esol
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInner class to hold validation results. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleDemister pad pressure drop in mbar.private doubleDemister pad thickness in mm.private StringDemister type: "wire_mesh", "vane_pack", "cyclone".private doubleWire mesh demister void fraction (typically 0.97-0.99).private doubleDemister pad wire diameter in mm.private doubleDesign pressure margin factor (e.g., 1.10 for 10% margin).private doubleDesign temperature margin above max operating in Celsius.private doubleDesign droplet diameter for gas-liquid separation in micrometers.private doubleDesign droplet diameter for liquid-liquid separation in micrometers.private doubleEffective length for gas separation/demisting [m].private doubleEffective length for liquid separation/retention [m].(package private) doubleGas area fraction (1 - liquid level fraction).private doubleFoam allowance factor for liquid level (1.0 = no foam, 1.5 = 50% foam).(package private) doubleGas load factor (K-factor) for Souders-Brown equation [m/s].private doubleGas outlet nozzle internal diameter [m].private doubleHigh-High Liquid Level (HHLL) as fraction of ID.private doubleHigh Interface Level (HIL) - oil/water interface.private doubleHigh Liquid Level (HLL) as fraction of ID.private doubleInlet device K-factor reduction (1.0 = no reduction).private doubleInlet nozzle internal diameter [m].private doubleDistance from inlet to gas demister [m].private doubleDistance from inlet to perforated plate [m].private doubleLow Interface Level (LIL) - oil/water interface.private doubleLow Liquid Level (LLL) as fraction of ID.private doubleLow-Low Liquid Level (LLLL) as fraction of ID.private doubleMaximum gas velocity limit in m/s.private doubleMaximum liquid outlet velocity in m/s.private doubleMinimum design temperature in Celsius (material limit).private doubleMinimum oil retention time in minutes.private doubleMinimum water retention time in minutes.private doubleNormal Interface Level (NIL) - oil/water interface.private doubleNormal Liquid Level (NLL) as fraction of ID.private doubleOil outlet nozzle internal diameter [m].private doubleDistance from perforated plate to weir plate [m].(package private) doubleLiquid retention time in seconds.private static final longSerialization version UID.(package private) doubleVolume safety factor for design flow calculations.private doubleWater outlet nozzle internal diameter [m].private doubleWeir height as fraction of ID.Fields inherited from class MechanicalDesign
costEstimate, designStandard, innerDiameter, maxDesignCv, maxDesignDuty, maxDesignGassVolumeFlow, maxDesignOilVolumeFlow, maxDesignPower, maxDesignPressureDrop, maxDesignVelocity, maxDesignVolumeFlow, maxDesignWaterVolumeFlow, minDesignDuty, minDesignGassVolumeFLow, minDesignOilFLow, minDesignPower, minDesignVolumeFLow, minDesignWaterVolumeFLow, moduleHeight, moduleLength, moduleWidth, outerDiameter, tantanLength, wallThickness, weightElectroInstrument, weightNozzle, weightPiping, weightStructualSteel, weightVessel, weigthInternals, weigthVesselShell -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for SeparatorMechanicalDesign. -
Method Summary
Modifier and TypeMethodDescriptionvoidcalcDesign.doubleCalculate gas outlet nozzle diameter.doubleCalculate inlet nozzle diameter based on inlet momentum.doubleCalculate liquid retention time based on effective length and NLL.doublecalcLiquidVolumeAtLevel(double levelHeight) Calculate liquid volume at a given level height for horizontal cylindrical vessel.doubleCalculate oil outlet nozzle diameter.doubleCalculate surge time based on surge volume and liquid flow rate.doubleCalculate surge volume between NLL and HLL.voidCalculate all level fractions based on the actual internal diameter.doubleCalculates the design pressure from maximum operating pressure.doubleCalculates the design temperature from maximum operating temperature.voidCalculate effective lengths from internal positions.doublecalculateFoamAdjustedVolume(double baseLiquidVolume) Calculates the adjusted liquid volume accounting for foam.doubleCalculates the minimum design temperature considering material limits.doublecalculateSoudersBrownVelocity(double gasDensity, double liquidDensity) Calculates the maximum allowable gas velocity using Souders-Brown equation.doublecalculateStokesVelocity(double dropletDiameterUm, double continuousDensity, double dispersedDensity, double continuousViscosity) Calculates the terminal settling velocity for a droplet using Stokes' law.voiddisplayResults.doubleGets the demister pressure drop.doubleGets the demister pad thickness.Gets the demister type.doubleGets the demister void fraction.doubleGets the demister wire diameter.doubleGets the design pressure margin factor.Get a complete design summary as a formatted string.doubleGets the design temperature margin in Celsius.doubleGets the design droplet diameter for gas-liquid separation.doubleGets the design droplet diameter for liquid-liquid separation.doubleCalculate effective length for gas separation.doubleCalculate effective length for liquid separation.doublegetFg()Get liquid level fraction (Fg).doubleGets the foam allowance factor.doubleGet gas load factor (K-factor).doubleGet gas outlet nozzle internal diameter.doublegetHHLL()Calculate the High-High Liquid Level (HHLL) in meters.doubleGet HHLL (High-High Liquid Level) fraction.doublegetHIL()Calculate the High Interface Level (HIL) in meters.doubleGet HIL (High Interface Level) fraction.doublegetHLL()Calculate the High Liquid Level (HLL) in meters.doubleGet HLL (High Liquid Level) fraction.doubleGets the inlet device K-factor reduction.doubleGet inlet nozzle internal diameter.doubleGet distance from inlet to gas demister.doubleGet distance from inlet to perforated plate.doublegetLIL()Calculate the Low Interface Level (LIL) in meters.doubleGet LIL (Low Interface Level) fraction.doublegetLLL()Calculate the Low Liquid Level (LLL) in meters.doubleGet LLL (Low Liquid Level) fraction.doublegetLLLL()Calculate the Low-Low Liquid Level (LLLL) in meters.doubleGet LLLL (Low-Low Liquid Level) fraction.doubleGets the maximum gas velocity limit.doubleGets the maximum liquid outlet velocity.doubleGets the minimum design temperature in Celsius.doubleGets the minimum oil retention time.doubleGets the minimum water retention time.doublegetNIL()Calculate the Normal Interface Level (NIL) in meters.doubleGet NIL (Normal Interface Level) fraction.doublegetNLL()Calculate the Normal Liquid Level (NLL) in meters.doubleGet NLL (Normal Liquid Level) fraction.doubleGet oil outlet nozzle internal diameter.doubleGet distance from perforated plate to weir.Get the mechanical design response object.doubleGet retention time in seconds.doubleGet volume safety factor.doubleGet water outlet nozzle internal diameter.doubleGet weir fraction.doubleCalculate the weir height in meters.voidLoads process design parameters from the TechnicalRequirements_Process database.voidPerforms the sizing calculations without reading design specifications.voidreadDesignSpecifications.voidsetAllLiquidLevelsFromHeights(double hhll, double hll, double nll, double lll, double llll) Configure all liquid levels from heights in meters.voidsetDemisterPressureDrop(double pressureDrop) Sets the demister pressure drop.voidsetDemisterThickness(double thickness) Sets the demister pad thickness.voidsetDemisterType(String type) Sets the demister type.voidsetDemisterVoidFraction(double voidFraction) Sets the demister void fraction.voidsetDemisterWireDiameter(double diameter) Sets the demister wire diameter.voidsetDesign.voidsetDesignPressureMargin(double margin) Sets the design pressure margin factor.voidsetDesignTemperatureMarginC(double marginC) Sets the design temperature margin in Celsius.voidsetDropletDiameterGasLiquid(double diameterUm) Sets the design droplet diameter for gas-liquid separation.voidsetDropletDiameterLiquidLiquid(double diameterUm) Sets the design droplet diameter for liquid-liquid separation.voidsetEffectiveLengthGas(double length) Set effective length for gas separation.voidsetEffectiveLengthLiquid(double length) Set effective length for liquid separation.voidsetFg(double fg) Set liquid level fraction (Fg = 1 - liquid level).voidsetFoamAllowanceFactor(double factor) Sets the foam allowance factor.voidsetFromDesignSpec(double id, double length, double lEffLiquid, double lEffGas, double inletNozzleId, double hhll, double hll, double nll, double lll, double weir, double hil, double nil, double lil) Set all design parameters from a Python-style dictionary-like specification.voidsetFromExistingDesign(double id, double tanTanLength, double wallThick) Configure all separator dimensions from an existing pre-designed separator.voidsetFromExistingDesign(double id, double tanTanLength, double wallThick, double lEffLiquid, double lEffGas, double inletNozzle, double gasNozzle, double oilNozzle, double waterNozzle) Configure all separator dimensions and levels from an existing design.voidsetGasLoadFactor(double gasLoadFactor) Set gas load factor (K-factor).voidsetGasOutletNozzleID(double id) Set gas outlet nozzle ID.voidsetHHLLFraction(double fraction) Set HHLL fraction of internal diameter.voidsetHILFraction(double fraction) Set HIL fraction of internal diameter.voidsetHLLFraction(double fraction) Set HLL fraction of internal diameter.voidsetInletDeviceKFactor(double factor) Sets the inlet device K-factor reduction.voidsetInletNozzleID(double id) Set inlet nozzle ID.voidsetInletToGasDemister(double distance) Set distance from inlet to gas demister.voidsetInletToPerforatedPlate(double distance) Set distance from inlet to perforated plate.voidsetInterfaceLevelsFromHeights(double hil, double nil, double lil, double weir) Configure interface levels for three-phase separator based on heights.voidsetLILFraction(double fraction) Set LIL fraction of internal diameter.voidsetLiquidLevelsFromHeights(double hhll, double hll, double nll, double lll) Configure liquid levels based on provided values (heights in meters).voidsetLLLFraction(double fraction) Set LLL fraction of internal diameter.voidsetLLLLFraction(double fraction) Set LLLL fraction of internal diameter.voidsetMaxGasVelocityLimit(double velocity) Sets the maximum gas velocity limit.voidsetMaxLiquidVelocity(double velocity) Sets the maximum liquid outlet velocity.voidsetMinDesignTemperatureC(double tempC) Sets the minimum design temperature in Celsius.voidsetMinOilRetentionTime(double minutes) Sets the minimum oil retention time.voidsetMinWaterRetentionTime(double minutes) Sets the minimum water retention time.voidsetNILFraction(double fraction) Set NIL fraction of internal diameter.voidsetNLLFraction(double fraction) Set NLL fraction of internal diameter.voidsetOilOutletNozzleID(double id) Set oil outlet nozzle ID.voidsetPerforatedPlateToWeir(double distance) Set distance from perforated plate to weir.voidsetRetentionTime(double retentionTime) Set retention time in seconds.voidsetVolumeSafetyFactor(double volumeSafetyFactor) Set volume safety factor for design flow calculations.voidsetWaterOutletNozzleID(double id) Set water outlet nozzle ID.voidsetWeirFraction(double fraction) Set weir height fraction of internal diameter.toJson()Export mechanical design data to JSON format.booleanValidate that the design parameters are within acceptable ranges.Performs comprehensive validation of separator design against process requirements.booleanvalidateDropletDiameter(double actualDropletDiameterUm, boolean isGasLiquid) Validates that the droplet diameter is appropriate for separation.booleanvalidateGasVelocity(double actualVelocity) Validates that the actual gas velocity is within acceptable limits.booleanvalidateLiquidVelocity(double actualVelocity) Validates that the actual liquid outlet velocity is within acceptable limits.booleanvalidateRetentionTime(double actualRetentionMinutes, boolean isOil) Validates that the actual retention time meets minimum requirements.Methods inherited from class MechanicalDesign
addDesignDataSource, calculateCostEstimate, costEstimateToJson, equals, generateBillOfMaterials, getApplicableStandards, getBareModuleCost, getCompanySpecificDesignStandards, getConstrutionMaterial, getCorrosionAllowance, getCostEstimate, getDefaultLiquidDensity, getDefaultLiquidViscosity, getDesignCorrosionAllowance, getDesignDataSources, getDesignJointEfficiency, getDesignLimitData, getDesignMaxPressureLimit, getDesignMaxTemperatureLimit, getDesignMinPressureLimit, getDesignMinTemperatureLimit, getDesignStandard, getDuty, getGrassRootsCost, getHeatTransferArea, getInnerDiameter, getInstallationManHours, getJointEfficiency, getLastMarginResult, getMaterialDesignStandard, getMaterialPipeDesignStandard, getMaxAllowableStress, getMaxDesignCv, getMaxDesignGassVolumeFlow, getMaxDesignOilVolumeFlow, getMaxDesignPressure, getMaxDesignPressureDrop, getMaxDesignVelocity, getMaxDesignVolumeFlow, getMaxDesignWaterVolumeFlow, getMaxOperationPressure, getMaxOperationTemperature, getMinDesignGassVolumeFLow, getMinDesignOilFLow, getMinDesignPressure, getMinDesignVolumeFLow, getMinDesignWaterVolumeFLow, getMinOperationPressure, getMinOperationTemperature, getModuleHeight, getModuleLength, getModuleWidth, getOuterDiameter, getPower, getPressureMarginFactor, getProcessEquipment, getPurchasedEquipmentCost, getRecommendedStandards, getTantanLength, getTensileStrength, getTotalModuleCost, getVolumeTotal, getWallThickness, getWeightElectroInstrument, getWeightNozzle, getWeightPiping, getWeightStructualSteel, getWeightTotal, getWeightVessel, getWeigthInternals, getWeigthVesselShell, hasDesignStandard, hashCode, initMechanicalDesign, isHasSetCompanySpecificDesignStandards, setCompanySpecificDesignStandards, setConstrutionMaterial, setCorrosionAllowance, setCostEstimateCepci, setCostEstimateLocationFactor, setCostEstimateMaterial, setDefaultLiquidDensity, setDefaultLiquidViscosity, setDesignDataSource, setDesignDataSources, setDesignStandard, setDesignStandard, setDesignStandard, setDesignStandard, setDesignStandards, setHasSetCompanySpecificDesignStandards, setInnerDiameter, setJointEfficiency, setMaterialDesignStandard, setMaterialPipeDesignStandard, setMaxDesignCv, setMaxDesignDuty, setMaxDesignGassVolumeFlow, setMaxDesignOilVolumeFlow, setMaxDesignPower, setMaxDesignPressureDrop, setMaxDesignVelocity, setMaxDesignVolumeFlow, setMaxDesignWaterVolumeFlow, setMaxOperationPressure, setMaxOperationTemperature, setMinDesignDuty, setMinDesignGassVolumeFLow, setMinDesignOilFLow, setMinDesignPower, setMinDesignVolumeFLow, setMinDesignWaterVolumeFLow, setMinOperationPressure, setMinOperationTemperature, setModuleHeight, setModuleLength, setModuleWidth, setOuterDiameter, setPressureMarginFactor, setProcessEquipment, setTantanLength, setTensileStrength, setWallThickness, setWeightElectroInstrument, setWeightNozzle, setWeightPiping, setWeightStructualSteel, setWeightTotal, setWeightVessel, setWeigthInternals, setWeigthVesselShell, toCompactJson, validateOperatingEnvelope, validateOperatingEnvelope
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
gasLoadFactor
double gasLoadFactorGas load factor (K-factor) for Souders-Brown equation [m/s]. Default 0.107 for mesh demister. -
volumeSafetyFactor
double volumeSafetyFactorVolume safety factor for design flow calculations. Default 1.0 (no margin). -
Fg
double FgGas area fraction (1 - liquid level fraction). Default 0.5 for 50% liquid level. -
retentionTime
double retentionTimeLiquid retention time in seconds. Default 120s (2 minutes). -
designPressureMargin
private double designPressureMarginDesign pressure margin factor (e.g., 1.10 for 10% margin). -
designTemperatureMarginC
private double designTemperatureMarginCDesign temperature margin above max operating in Celsius. -
minDesignTemperatureC
private double minDesignTemperatureCMinimum design temperature in Celsius (material limit). -
foamAllowanceFactor
private double foamAllowanceFactorFoam allowance factor for liquid level (1.0 = no foam, 1.5 = 50% foam). -
dropletDiameterGasLiquid
private double dropletDiameterGasLiquidDesign droplet diameter for gas-liquid separation in micrometers. -
dropletDiameterLiquidLiquid
private double dropletDiameterLiquidLiquidDesign droplet diameter for liquid-liquid separation in micrometers. -
maxGasVelocity
private double maxGasVelocityMaximum gas velocity limit in m/s. -
maxLiquidVelocity
private double maxLiquidVelocityMaximum liquid outlet velocity in m/s. -
minOilRetentionTime
private double minOilRetentionTimeMinimum oil retention time in minutes. -
minWaterRetentionTime
private double minWaterRetentionTimeMinimum water retention time in minutes. -
demisterPressureDrop
private double demisterPressureDropDemister pad pressure drop in mbar. -
demisterVoidFraction
private double demisterVoidFractionWire mesh demister void fraction (typically 0.97-0.99). -
demisterThickness
private double demisterThicknessDemister pad thickness in mm. -
demisterWireDiameter
private double demisterWireDiameterDemister pad wire diameter in mm. -
inletDeviceKFactor
private double inletDeviceKFactorInlet device K-factor reduction (1.0 = no reduction). -
demisterType
Demister type: "wire_mesh", "vane_pack", "cyclone". -
hhllFraction
private double hhllFractionHigh-High Liquid Level (HHLL) as fraction of ID. Typically ~0.80-0.85. -
hllFraction
private double hllFractionHigh Liquid Level (HLL) as fraction of ID. Typically ~0.70-0.75. -
nllFraction
private double nllFractionNormal Liquid Level (NLL) as fraction of ID. Typically ~0.50-0.60. -
lllFraction
private double lllFractionLow Liquid Level (LLL) as fraction of ID. Typically ~0.30-0.40. -
llllFraction
private double llllFractionLow-Low Liquid Level (LLLL) as fraction of ID. Typically ~0.15-0.20. -
hilFraction
private double hilFractionHigh Interface Level (HIL) - oil/water interface. -
nilFraction
private double nilFractionNormal Interface Level (NIL) - oil/water interface. -
lilFraction
private double lilFractionLow Interface Level (LIL) - oil/water interface. -
weirFraction
private double weirFractionWeir height as fraction of ID. -
effectiveLengthLiquid
private double effectiveLengthLiquidEffective length for liquid separation/retention [m]. -
effectiveLengthGas
private double effectiveLengthGasEffective length for gas separation/demisting [m]. -
inletToPerforatedPlate
private double inletToPerforatedPlateDistance from inlet to perforated plate [m]. -
perforatedPlateToWeir
private double perforatedPlateToWeirDistance from perforated plate to weir plate [m]. -
inletToGasDemister
private double inletToGasDemisterDistance from inlet to gas demister [m]. -
inletNozzleID
private double inletNozzleIDInlet nozzle internal diameter [m]. -
gasOutletNozzleID
private double gasOutletNozzleIDGas outlet nozzle internal diameter [m]. -
oilOutletNozzleID
private double oilOutletNozzleIDOil outlet nozzle internal diameter [m]. -
waterOutletNozzleID
private double waterOutletNozzleIDWater outlet nozzle internal diameter [m].
-
-
Constructor Details
-
SeparatorMechanicalDesign
Constructor for SeparatorMechanicalDesign.
- Parameters:
equipment- aProcessEquipmentInterfaceobject
-
-
Method Details
-
readDesignSpecifications
public void readDesignSpecifications()readDesignSpecifications.
- Overrides:
readDesignSpecificationsin classMechanicalDesign
-
displayResults
-
calcDesign
-
performSizingCalculations
public void performSizingCalculations()Performs the sizing calculations without reading design specifications. This method is called by autoSize() after design specs have been read and any user overrides have been applied. -
setDesign
-
getResponse
Get the mechanical design response object.This method returns a
MechanicalDesignResponseobject that can be further customized or combined with other data before serialization.Returns a separator-specific response with additional fields for vessel sizing, internals, and process design data.
- Overrides:
getResponsein classMechanicalDesign- Returns:
- MechanicalDesignResponse object
-
toJson
Export mechanical design data to JSON format.This method creates a
MechanicalDesignResponseobject and serializes it to JSON using Gson. The JSON includes equipment identification, weight breakdown, design conditions, dimensions, and materials information.Usage example:
MechanicalDesign mecDesign = separator.getMechanicalDesign(); mecDesign.calcDesign(); String json = mecDesign.toJson();Returns JSON with separator-specific fields.
- Overrides:
toJsonin classMechanicalDesign- Returns:
- JSON string representation of the mechanical design
-
getGasLoadFactor
public double getGasLoadFactor()Get gas load factor (K-factor).- Returns:
- gas load factor
-
setGasLoadFactor
public void setGasLoadFactor(double gasLoadFactor) Set gas load factor (K-factor).- Parameters:
gasLoadFactor- gas load factor [m/s], typically 0.07-0.15 for horizontal separators
-
getVolumeSafetyFactor
public double getVolumeSafetyFactor()Get volume safety factor.- Returns:
- volume safety factor
-
setVolumeSafetyFactor
public void setVolumeSafetyFactor(double volumeSafetyFactor) Set volume safety factor for design flow calculations.- Parameters:
volumeSafetyFactor- safety factor (typically 1.1-1.3)
-
getFg
public double getFg()Get liquid level fraction (Fg).- Returns:
- liquid level fraction
-
setFg
public void setFg(double fg) Set liquid level fraction (Fg = 1 - liquid level).- Parameters:
fg- gas area fraction
-
getRetentionTime
public double getRetentionTime()Get retention time in seconds.- Returns:
- retention time
-
setRetentionTime
public void setRetentionTime(double retentionTime) Set retention time in seconds.- Parameters:
retentionTime- liquid retention time in seconds (typically 60-300s)
-
getHHLL
public double getHHLL()Calculate the High-High Liquid Level (HHLL) in meters. HHLL is the maximum safe operating level before emergency shutdown.- Returns:
- HHLL height in meters
-
getHLL
public double getHLL()Calculate the High Liquid Level (HLL) in meters. HLL triggers high level alarm.- Returns:
- HLL height in meters
-
getNLL
public double getNLL()Calculate the Normal Liquid Level (NLL) in meters. NLL is the target operating level during normal operation.- Returns:
- NLL height in meters
-
getLLL
public double getLLL()Calculate the Low Liquid Level (LLL) in meters. LLL triggers low level alarm.- Returns:
- LLL height in meters
-
getLLLL
public double getLLLL()Calculate the Low-Low Liquid Level (LLLL) in meters. LLLL triggers emergency shutdown to prevent pump dry-running.- Returns:
- LLLL height in meters
-
getWeirHeight
public double getWeirHeight()Calculate the weir height in meters. The weir separates oil and water compartments in three-phase separators.- Returns:
- weir height in meters
-
getHIL
public double getHIL()Calculate the High Interface Level (HIL) in meters. HIL is the high oil/water interface level alarm point.- Returns:
- HIL height in meters
-
getNIL
public double getNIL()Calculate the Normal Interface Level (NIL) in meters. NIL is the target oil/water interface level.- Returns:
- NIL height in meters
-
getLIL
public double getLIL()Calculate the Low Interface Level (LIL) in meters. LIL is the low oil/water interface level alarm point.- Returns:
- LIL height in meters
-
getEffectiveLengthLiquid
public double getEffectiveLengthLiquid()Calculate effective length for liquid separation. This is typically: TanTan length - inlet device length - weir plate distance.- Returns:
- effective liquid separation length in meters
-
getEffectiveLengthGas
public double getEffectiveLengthGas()Calculate effective length for gas separation. This is typically: TanTan length - inlet device length - demister position.- Returns:
- effective gas separation length in meters
-
calcLiquidRetentionTime
public double calcLiquidRetentionTime()Calculate liquid retention time based on effective length and NLL.- Returns:
- liquid retention time in seconds
-
calcLiquidVolumeAtLevel
public double calcLiquidVolumeAtLevel(double levelHeight) Calculate liquid volume at a given level height for horizontal cylindrical vessel.- Parameters:
levelHeight- liquid level height in meters- Returns:
- liquid volume in m³
-
calcSurgeVolume
public double calcSurgeVolume()Calculate surge volume between NLL and HLL. This volume provides time buffer for control system response.- Returns:
- surge volume in m³
-
calcSurgeTime
public double calcSurgeTime()Calculate surge time based on surge volume and liquid flow rate.- Returns:
- surge time in seconds
-
calcInletNozzleID
public double calcInletNozzleID()Calculate inlet nozzle diameter based on inlet momentum. Uses API 12J recommendations for maximum momentum.- Returns:
- inlet nozzle ID in meters
-
calcGasOutletNozzleID
public double calcGasOutletNozzleID()Calculate gas outlet nozzle diameter. Based on gas velocity limit (typically 15-20 m/s).- Returns:
- gas outlet nozzle ID in meters
-
calcOilOutletNozzleID
public double calcOilOutletNozzleID()Calculate oil outlet nozzle diameter. Based on liquid velocity limit (typically 1-2 m/s).- Returns:
- oil outlet nozzle ID in meters
-
setHHLLFraction
public void setHHLLFraction(double fraction) Set HHLL fraction of internal diameter.- Parameters:
fraction- HHLL as fraction of ID (0-1)
-
setHLLFraction
public void setHLLFraction(double fraction) Set HLL fraction of internal diameter.- Parameters:
fraction- HLL as fraction of ID (0-1)
-
setNLLFraction
public void setNLLFraction(double fraction) Set NLL fraction of internal diameter.- Parameters:
fraction- NLL as fraction of ID (0-1)
-
setLLLFraction
public void setLLLFraction(double fraction) Set LLL fraction of internal diameter.- Parameters:
fraction- LLL as fraction of ID (0-1)
-
setLLLLFraction
public void setLLLLFraction(double fraction) Set LLLL fraction of internal diameter.- Parameters:
fraction- LLLL as fraction of ID (0-1)
-
setWeirFraction
public void setWeirFraction(double fraction) Set weir height fraction of internal diameter.- Parameters:
fraction- weir height as fraction of ID (0-1)
-
setHILFraction
public void setHILFraction(double fraction) Set HIL fraction of internal diameter.- Parameters:
fraction- HIL as fraction of ID (0-1)
-
setNILFraction
public void setNILFraction(double fraction) Set NIL fraction of internal diameter.- Parameters:
fraction- NIL as fraction of ID (0-1)
-
setLILFraction
public void setLILFraction(double fraction) Set LIL fraction of internal diameter.- Parameters:
fraction- LIL as fraction of ID (0-1)
-
setEffectiveLengthLiquid
public void setEffectiveLengthLiquid(double length) Set effective length for liquid separation.- Parameters:
length- effective length in meters
-
setEffectiveLengthGas
public void setEffectiveLengthGas(double length) Set effective length for gas separation.- Parameters:
length- effective length in meters
-
setInletNozzleID
public void setInletNozzleID(double id) Set inlet nozzle ID.- Parameters:
id- inlet nozzle internal diameter in meters
-
setGasOutletNozzleID
public void setGasOutletNozzleID(double id) Set gas outlet nozzle ID.- Parameters:
id- gas outlet nozzle internal diameter in meters
-
setOilOutletNozzleID
public void setOilOutletNozzleID(double id) Set oil outlet nozzle ID.- Parameters:
id- oil outlet nozzle internal diameter in meters
-
setWaterOutletNozzleID
public void setWaterOutletNozzleID(double id) Set water outlet nozzle ID.- Parameters:
id- water outlet nozzle internal diameter in meters
-
getHHLLFraction
public double getHHLLFraction()Get HHLL (High-High Liquid Level) fraction.- Returns:
- HHLL fraction
-
getHLLFraction
public double getHLLFraction()Get HLL (High Liquid Level) fraction.- Returns:
- HLL fraction
-
getNLLFraction
public double getNLLFraction()Get NLL (Normal Liquid Level) fraction.- Returns:
- NLL fraction
-
getLLLFraction
public double getLLLFraction()Get LLL (Low Liquid Level) fraction.- Returns:
- LLL fraction
-
getLLLLFraction
public double getLLLLFraction()Get LLLL (Low-Low Liquid Level) fraction.- Returns:
- LLLL fraction
-
getWeirFraction
public double getWeirFraction()Get weir fraction.- Returns:
- weir fraction
-
getHILFraction
public double getHILFraction()Get HIL (High Interface Level) fraction.- Returns:
- HIL fraction
-
getNILFraction
public double getNILFraction()Get NIL (Normal Interface Level) fraction.- Returns:
- NIL fraction
-
getLILFraction
public double getLILFraction()Get LIL (Low Interface Level) fraction.- Returns:
- LIL fraction
-
getInletNozzleID
public double getInletNozzleID()Get inlet nozzle internal diameter.- Returns:
- inlet nozzle ID in meters
-
getGasOutletNozzleID
public double getGasOutletNozzleID()Get gas outlet nozzle internal diameter.- Returns:
- gas outlet nozzle ID in meters
-
getOilOutletNozzleID
public double getOilOutletNozzleID()Get oil outlet nozzle internal diameter.- Returns:
- oil outlet nozzle ID in meters
-
getWaterOutletNozzleID
public double getWaterOutletNozzleID()Get water outlet nozzle internal diameter.- Returns:
- water outlet nozzle ID in meters
-
setLiquidLevelsFromHeights
public void setLiquidLevelsFromHeights(double hhll, double hll, double nll, double lll) Configure liquid levels based on provided values (heights in meters). Automatically calculates fractions based on internal diameter.- Parameters:
hhll- High-High Liquid Level in metershll- High Liquid Level in metersnll- Normal Liquid Level in meterslll- Low Liquid Level in meters
-
setInterfaceLevelsFromHeights
public void setInterfaceLevelsFromHeights(double hil, double nil, double lil, double weir) Configure interface levels for three-phase separator based on heights.- Parameters:
hil- High Interface Level in metersnil- Normal Interface Level in meterslil- Low Interface Level in metersweir- Weir height in meters
-
calculateDefaultLevelFractions
public void calculateDefaultLevelFractions()Calculate all level fractions based on the actual internal diameter. Uses typical design ratios from API 12J and NORSOK. -
setFromExistingDesign
public void setFromExistingDesign(double id, double tanTanLength, double wallThick) Configure all separator dimensions from an existing pre-designed separator. This allows importing a complete design from external sources (e.g., vendor data).- Parameters:
id- Inner diameter in meterstanTanLength- Tan-tan length in meterswallThick- Wall thickness in meters
-
setFromExistingDesign
public void setFromExistingDesign(double id, double tanTanLength, double wallThick, double lEffLiquid, double lEffGas, double inletNozzle, double gasNozzle, double oilNozzle, double waterNozzle) Configure all separator dimensions and levels from an existing design. This is the comprehensive method for importing a complete pre-designed separator.- Parameters:
id- Inner diameter in meterstanTanLength- Tan-tan length in meterswallThick- Wall thickness in meterslEffLiquid- Effective length for liquid separation in meterslEffGas- Effective length for gas separation in metersinletNozzle- Inlet nozzle ID in metersgasNozzle- Gas outlet nozzle ID in metersoilNozzle- Oil outlet nozzle ID in meterswaterNozzle- Water outlet nozzle ID in meters (0 for two-phase)
-
setAllLiquidLevelsFromHeights
public void setAllLiquidLevelsFromHeights(double hhll, double hll, double nll, double lll, double llll) Configure all liquid levels from heights in meters. Automatically calculates fractions based on internal diameter.- Parameters:
hhll- High-High Liquid Level in metershll- High Liquid Level in metersnll- Normal Liquid Level in meterslll- Low Liquid Level in metersllll- Low-Low Liquid Level in meters
-
setFromDesignSpec
public void setFromDesignSpec(double id, double length, double lEffLiquid, double lEffGas, double inletNozzleId, double hhll, double hll, double nll, double lll, double weir, double hil, double nil, double lil) Set all design parameters from a Python-style dictionary-like specification. This method mirrors the Python dict format: {'ID': 3.154, 'L': 13.1, ...}.- Parameters:
id- Inner diameter in meterslength- Tan-tan length in meterslEffLiquid- Effective length for liquid separation in meterslEffGas- Effective length for gas separation in metersinletNozzleId- Inlet nozzle ID in metershhll- HHLL height in metershll- HLL height in metersnll- NLL height in meterslll- LLL height in metersweir- Weir height in metershil- HIL height in metersnil- NIL height in meterslil- LIL height in meters
-
setInletToPerforatedPlate
public void setInletToPerforatedPlate(double distance) Set distance from inlet to perforated plate.- Parameters:
distance- distance in meters
-
getInletToPerforatedPlate
public double getInletToPerforatedPlate()Get distance from inlet to perforated plate.- Returns:
- distance in meters
-
setPerforatedPlateToWeir
public void setPerforatedPlateToWeir(double distance) Set distance from perforated plate to weir.- Parameters:
distance- distance in meters
-
getPerforatedPlateToWeir
public double getPerforatedPlateToWeir()Get distance from perforated plate to weir.- Returns:
- distance in meters
-
setInletToGasDemister
public void setInletToGasDemister(double distance) Set distance from inlet to gas demister.- Parameters:
distance- distance in meters
-
getInletToGasDemister
public double getInletToGasDemister()Get distance from inlet to gas demister.- Returns:
- distance in meters
-
calculateEffectiveLengthsFromInternals
public void calculateEffectiveLengthsFromInternals()Calculate effective lengths from internal positions. Call this after setting inlet-to-perforated-plate and perforated-plate-to-weir distances. -
validateDesign
public boolean validateDesign()Validate that the design parameters are within acceptable ranges.- Returns:
- true if design is valid
-
getDesignSummary
Get a complete design summary as a formatted string.- Returns:
- design summary
-
getDesignPressureMargin
public double getDesignPressureMargin()Gets the design pressure margin factor.- Returns:
- design pressure margin (e.g., 1.10 for 10% margin)
-
setDesignPressureMargin
public void setDesignPressureMargin(double margin) Sets the design pressure margin factor.- Parameters:
margin- margin factor (e.g., 1.10 for 10%)
-
getDesignTemperatureMarginC
public double getDesignTemperatureMarginC()Gets the design temperature margin in Celsius.- Returns:
- temperature margin in Celsius
-
setDesignTemperatureMarginC
public void setDesignTemperatureMarginC(double marginC) Sets the design temperature margin in Celsius.- Parameters:
marginC- temperature margin in Celsius
-
getMinDesignTemperatureC
public double getMinDesignTemperatureC()Gets the minimum design temperature in Celsius.- Returns:
- minimum design temperature in Celsius
-
setMinDesignTemperatureC
public void setMinDesignTemperatureC(double tempC) Sets the minimum design temperature in Celsius.- Parameters:
tempC- minimum design temperature in Celsius
-
getFoamAllowanceFactor
public double getFoamAllowanceFactor()Gets the foam allowance factor.- Returns:
- foam allowance factor (1.0 = no foam)
-
setFoamAllowanceFactor
public void setFoamAllowanceFactor(double factor) Sets the foam allowance factor.- Parameters:
factor- foam allowance factor (typically 1.0-1.5)
-
getDropletDiameterGasLiquid
public double getDropletDiameterGasLiquid()Gets the design droplet diameter for gas-liquid separation.- Returns:
- droplet diameter in micrometers
-
setDropletDiameterGasLiquid
public void setDropletDiameterGasLiquid(double diameterUm) Sets the design droplet diameter for gas-liquid separation.- Parameters:
diameterUm- droplet diameter in micrometers
-
getDropletDiameterLiquidLiquid
public double getDropletDiameterLiquidLiquid()Gets the design droplet diameter for liquid-liquid separation.- Returns:
- droplet diameter in micrometers
-
setDropletDiameterLiquidLiquid
public void setDropletDiameterLiquidLiquid(double diameterUm) Sets the design droplet diameter for liquid-liquid separation.- Parameters:
diameterUm- droplet diameter in micrometers
-
getMaxGasVelocityLimit
public double getMaxGasVelocityLimit()Gets the maximum gas velocity limit.- Returns:
- maximum gas velocity in m/s
-
setMaxGasVelocityLimit
public void setMaxGasVelocityLimit(double velocity) Sets the maximum gas velocity limit.- Parameters:
velocity- maximum velocity in m/s
-
getMaxLiquidVelocity
public double getMaxLiquidVelocity()Gets the maximum liquid outlet velocity.- Returns:
- maximum liquid velocity in m/s
-
setMaxLiquidVelocity
public void setMaxLiquidVelocity(double velocity) Sets the maximum liquid outlet velocity.- Parameters:
velocity- maximum velocity in m/s
-
getMinOilRetentionTime
public double getMinOilRetentionTime()Gets the minimum oil retention time.- Returns:
- retention time in minutes
-
setMinOilRetentionTime
public void setMinOilRetentionTime(double minutes) Sets the minimum oil retention time.- Parameters:
minutes- retention time in minutes
-
getMinWaterRetentionTime
public double getMinWaterRetentionTime()Gets the minimum water retention time.- Returns:
- retention time in minutes
-
setMinWaterRetentionTime
public void setMinWaterRetentionTime(double minutes) Sets the minimum water retention time.- Parameters:
minutes- retention time in minutes
-
getDemisterPressureDrop
public double getDemisterPressureDrop()Gets the demister pressure drop.- Returns:
- pressure drop in mbar
-
setDemisterPressureDrop
public void setDemisterPressureDrop(double pressureDrop) Sets the demister pressure drop.- Parameters:
pressureDrop- pressure drop in mbar
-
getDemisterVoidFraction
public double getDemisterVoidFraction()Gets the demister void fraction.- Returns:
- void fraction (0.0-1.0)
-
setDemisterVoidFraction
public void setDemisterVoidFraction(double voidFraction) Sets the demister void fraction.- Parameters:
voidFraction- void fraction (typically 0.97-0.99)
-
getDemisterThickness
public double getDemisterThickness()Gets the demister pad thickness.- Returns:
- thickness in mm
-
setDemisterThickness
public void setDemisterThickness(double thickness) Sets the demister pad thickness.- Parameters:
thickness- thickness in mm
-
getDemisterWireDiameter
public double getDemisterWireDiameter()Gets the demister wire diameter.- Returns:
- wire diameter in mm
-
setDemisterWireDiameter
public void setDemisterWireDiameter(double diameter) Sets the demister wire diameter.- Parameters:
diameter- wire diameter in mm
-
getInletDeviceKFactor
public double getInletDeviceKFactor()Gets the inlet device K-factor reduction.- Returns:
- K-factor reduction (1.0 = no reduction)
-
setInletDeviceKFactor
public void setInletDeviceKFactor(double factor) Sets the inlet device K-factor reduction.- Parameters:
factor- K-factor reduction (typically 0.8-1.0)
-
getDemisterType
Gets the demister type.- Returns:
- demister type ("wire_mesh", "vane_pack", or "cyclone")
-
setDemisterType
Sets the demister type.- Parameters:
type- demister type ("wire_mesh", "vane_pack", or "cyclone")
-
calculateDesignPressure
public double calculateDesignPressure()Calculates the design pressure from maximum operating pressure.- Returns:
- design pressure in barg
-
calculateDesignTemperature
public double calculateDesignTemperature()Calculates the design temperature from maximum operating temperature.- Returns:
- design temperature in Celsius
-
calculateMinDesignTemperature
public double calculateMinDesignTemperature()Calculates the minimum design temperature considering material limits.- Returns:
- minimum design temperature in Celsius
-
calculateStokesVelocity
public double calculateStokesVelocity(double dropletDiameterUm, double continuousDensity, double dispersedDensity, double continuousViscosity) Calculates the terminal settling velocity for a droplet using Stokes' law.- Parameters:
dropletDiameterUm- droplet diameter in micrometerscontinuousDensity- density of continuous phase in kg/m³dispersedDensity- density of dispersed phase in kg/m³continuousViscosity- viscosity of continuous phase in Pa·s- Returns:
- terminal velocity in m/s
-
calculateSoudersBrownVelocity
public double calculateSoudersBrownVelocity(double gasDensity, double liquidDensity) Calculates the maximum allowable gas velocity using Souders-Brown equation.- Parameters:
gasDensity- gas density in kg/m³liquidDensity- liquid density in kg/m³- Returns:
- maximum gas velocity in m/s
-
calculateFoamAdjustedVolume
public double calculateFoamAdjustedVolume(double baseLiquidVolume) Calculates the adjusted liquid volume accounting for foam.- Parameters:
baseLiquidVolume- base liquid volume in m³- Returns:
- adjusted volume with foam allowance in m³
-
loadProcessDesignParameters
public void loadProcessDesignParameters()Loads process design parameters from the TechnicalRequirements_Process database. -
validateGasVelocity
public boolean validateGasVelocity(double actualVelocity) Validates that the actual gas velocity is within acceptable limits.- Parameters:
actualVelocity- actual gas velocity in m/s- Returns:
- true if velocity is acceptable, false if too high
-
validateLiquidVelocity
public boolean validateLiquidVelocity(double actualVelocity) Validates that the actual liquid outlet velocity is within acceptable limits.- Parameters:
actualVelocity- actual liquid velocity in m/s- Returns:
- true if velocity is acceptable, false if too high
-
validateRetentionTime
public boolean validateRetentionTime(double actualRetentionMinutes, boolean isOil) Validates that the actual retention time meets minimum requirements.- Parameters:
actualRetentionMinutes- actual retention time in minutesisOil- true for oil retention, false for water retention- Returns:
- true if retention time is sufficient
-
validateDropletDiameter
public boolean validateDropletDiameter(double actualDropletDiameterUm, boolean isGasLiquid) Validates that the droplet diameter is appropriate for separation.- Parameters:
actualDropletDiameterUm- actual droplet diameter in micrometersisGasLiquid- true for gas-liquid separation, false for liquid-liquid- Returns:
- true if droplet diameter is at or above design diameter
-
validateDesignComprehensive
Performs comprehensive validation of separator design against process requirements.- Returns:
- ValidationResult with status and any issues found
-