Class Manifold
- All Implemented Interfaces:
Serializable, Runnable, AutoSizeable, CapacityConstrainedEquipment, ProcessEquipmentInterface, SimulationInterface, NamedInterface
Manifold class.
A manifold is a process unit that can take in any number of streams and distribute them into a number of output streams. In NeqSim it is created as a combination of a mixer and a splitter.The manifold supports mechanical design calculations including:
- Header and branch inner/outer diameters
- Wall thickness calculations per ASME B31.3 or DNV-ST-F101
- Velocity calculations (header, branch, erosional)
- Flow-induced vibration analysis (LOF and FRMS methods)
The manifold implements CapacityConstrainedEquipment with constraints for:
- Header velocity - SOFT limit based on erosional velocity
- Branch velocity - SOFT limit based on erosional velocity
- Header LOF (Likelihood of Failure) - SOFT limit for FIV
- Header FRMS - SOFT limit for flow-induced vibration
- Version:
- $Id: $Id
- Author:
- Even Solbraa
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanFlag indicating if manifold has been auto-sized.private doubleBranch inner diameter in meters.private doubleBranch wall thickness in meters.private final Map<String, CapacityConstraint> Storage for capacity constraints.private doubleHeader inner diameter in meters.private doubleHeader wall thickness in meters.protected Mixerprotected Splitter(package private) static org.apache.logging.log4j.LoggerLogger object for class.private doubleMaximum branch velocity design limit in m/s.private doubleMaximum FRMS design limit.private doubleMaximum header velocity design limit in m/s.private doubleMaximum LOF design limit (1.0 = high risk threshold).private ManifoldMechanicalDesignMechanical design for the manifold.private static final longSerialization version UID.(package private) double[]private static final double[]Standard pipe inner diameters in meters (Schedule 40 approximate).private static final double[]Standard pipe wall thicknesses in meters (Schedule 40 approximate).private StringSupport arrangement for FIV calculation.private static final doubleTarget branch velocity for sizing (m/s) - slightly higher than header.private static final doubleTarget header velocity for sizing (m/s) - typical gas manifold design velocity.Fields inherited from class ProcessEquipmentBaseClass
conditionAnalysisMessage, energyStream, hasController, isSolved, properties, reportFields inherited from class SimulationBaseClass
calcIdentifier, calculateSteadyState, timeFields inherited from class NamedBaseClass
name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCapacityConstraint(CapacityConstraint constraint) Adds a new capacity constraint to this equipment.voidaddStream(StreamInterface newStream) addStream.voidautoSize()Automatically size using default safety factor (1.2 = 20% margin).voidautoSize(double safetyFactor) Automatically size the equipment based on connected stream conditions.voidAutomatically size using company-specific design standards.doubleCalculate Flow-induced vibration RMS (FRMS) for branch pipes.doublecalculateBranchFRMS(double frmsConstant) Calculate Flow-induced vibration RMS (FRMS) for branch pipes with specified constant.doubleCalculate LOF for branch pipes.doubleCalculate Flow-induced vibration RMS (FRMS) for header pipe.doublecalculateHeaderFRMS(double frmsConstant) Calculate Flow-induced vibration RMS (FRMS) for header pipe with specified constant.doubleCalculate Likelihood of Failure (LOF) for header pipe based on flow-induced vibration.voidClears all capacity constraints from this equipment.Gets the constraint with the highest utilization (the bottleneck).doubleGet branch inner diameter.doubleGet branch outer diameter (ID + 2 * wall thickness).doubleCalculate branch velocity based on current flow and geometry.doubleGet branch wall thickness.Gets all capacity constraints defined for this equipment.doubleCalculate erosional velocity with default C-factor of 100.doublegetErosionalVelocity(double cFactor) Calculate erosional velocity per API RP 14E.Get comprehensive FIV analysis results as a map.Get FIV analysis as JSON string.doubleGet header inner diameter.doubleGet header outer diameter (ID + 2 * wall thickness).doubleCalculate header velocity based on current flow and geometry.doubleGet header wall thickness.doublegetMassBalance(String unit) getMassBalance.doubleGets the maximum utilization across all constraints.Get amechanicalDesignfor the equipment.getMixedStream.intGet the number of output streams from the manifold.Get a detailed sizing report after auto-sizing.Get sizing report as JSON for programmatic access.getSplitStream(int i) getSplitStream.Get support arrangement for FIV calculations.private doublegetWallThicknessForID(double pipeID) Get standard wall thickness for a given pipe ID.protected voidInitialize capacity constraints based on design limits and FIV analysis.voidInitialize ainitMechanicalDesignfor the equipment.booleanCheck if equipment has been auto-sized.booleanChecks if any capacity constraint is violated (exceeds 100% utilization).booleanChecks if any HARD constraint limit is exceeded.booleanremoveCapacityConstraint(String constraintName) Removes a capacity constraint by name.voidIn this method all thermodynamic and unit operations will be calculated in a steady state calculation.private doubleselectStandardPipeID(double requiredID) Select the next larger standard pipe ID for the required diameter.voidsetBranchInnerDiameter(double diameter) Set branch inner diameter.voidsetBranchInnerDiameter(double diameter, String unit) Set branch inner diameter with unit.voidsetBranchWallThickness(double thickness) Set branch wall thickness.voidsetBranchWallThickness(double thickness, String unit) Set branch wall thickness with unit.voidsetHeaderInnerDiameter(double diameter) Set header inner diameter.voidsetHeaderInnerDiameter(double diameter, String unit) Set header inner diameter with unit.voidsetHeaderWallThickness(double thickness) Set header wall thickness.voidsetHeaderWallThickness(double thickness, String unit) Set header wall thickness with unit.voidsetMaxBranchVelocityDesign(double velocity) Set maximum branch velocity design limit.voidsetMaxFRMSDesign(double frms) Set maximum FRMS design limit.voidsetMaxHeaderVelocityDesign(double velocity) Set maximum header velocity design limit.voidsetMaxLOFDesign(double lof) Set maximum LOF design limit.voidSetter for the fieldname.voidsetSplitFactors(double[] splitFact) setSplitFactors.voidsetSupportArrangement(String arrangement) Set support arrangement for FIV calculations.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 ProcessEquipmentBaseClass
copy, displayResult, equals, getConditionAnalysisMessage, getController, getEffectiveCapacityFactor, getEnergyStream, getEntropyProduction, getExergyChange, getFailureMode, getMassBalance, getMinimumFlow, getPressure, getPressure, getProperty, getReport_json, getResultTable, getSpecification, getTemperature, getTemperature, getThermoSystem, 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, 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, setTagNameMethods inherited from interface ProcessEquipmentInterface
getCapacityDuty, getCapacityMax, getExergyChange, getFluid, getOperatingEnvelopeViolation, getRestCapacity, getSimulationValidationErrors, isSimulationValid, isWithinOperatingEnvelope, needRecalculation, validateSetupMethods inherited from interface SimulationInterface
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, run, run_step, runTransient, runTransient, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTime
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
logger
static org.apache.logging.log4j.Logger loggerLogger object for class. -
mechanicalDesign
Mechanical design for the manifold. -
localmixer
-
localsplitter
-
splitFactors
double[] splitFactors -
headerInnerDiameter
private double headerInnerDiameterHeader inner diameter in meters. -
headerWallThickness
private double headerWallThicknessHeader wall thickness in meters. -
branchInnerDiameter
private double branchInnerDiameterBranch inner diameter in meters. -
branchWallThickness
private double branchWallThicknessBranch wall thickness in meters. -
supportArrangement
Support arrangement for FIV calculation. -
autoSized
private boolean autoSizedFlag indicating if manifold has been auto-sized. -
TARGET_HEADER_VELOCITY
private static final double TARGET_HEADER_VELOCITYTarget header velocity for sizing (m/s) - typical gas manifold design velocity.- See Also:
-
TARGET_BRANCH_VELOCITY
private static final double TARGET_BRANCH_VELOCITYTarget branch velocity for sizing (m/s) - slightly higher than header.- See Also:
-
STANDARD_PIPE_IDS
private static final double[] STANDARD_PIPE_IDSStandard pipe inner diameters in meters (Schedule 40 approximate). -
STANDARD_PIPE_WALLS
private static final double[] STANDARD_PIPE_WALLSStandard pipe wall thicknesses in meters (Schedule 40 approximate). -
capacityConstraints
Storage for capacity constraints. -
maxHeaderVelocityDesign
private double maxHeaderVelocityDesignMaximum header velocity design limit in m/s. -
maxBranchVelocityDesign
private double maxBranchVelocityDesignMaximum branch velocity design limit in m/s. -
maxLOFDesign
private double maxLOFDesignMaximum LOF design limit (1.0 = high risk threshold). -
maxFRMSDesign
private double maxFRMSDesignMaximum FRMS design limit.
-
-
Constructor Details
-
Manifold
Constructor for Manifold with name as input.
- Parameters:
name- name of manifold
-
-
Method Details
-
addStream
addStream.
- Parameters:
newStream- aStreamInterfaceobject
-
setSplitFactors
public void setSplitFactors(double[] splitFact) setSplitFactors.
- Parameters:
splitFact- an array of type double
-
getSplitStream
getSplitStream.
- Parameters:
i- a int- Returns:
- a
StreamInterfaceobject
-
getMixedStream
-
run
In this method all thermodynamic and unit operations will be calculated in a steady state calculation.
- Specified by:
runin interfaceSimulationInterface- Parameters:
id- UUID
-
setName
Setter for the field
name.- Specified by:
setNamein interfaceNamedInterface- Overrides:
setNamein classNamedBaseClass- Parameters:
name- aStringobject
-
getNumberOfOutputStreams
public int getNumberOfOutputStreams()Get the number of output streams from the manifold.- Returns:
- number of split streams
-
getHeaderInnerDiameter
public double getHeaderInnerDiameter()Get header inner diameter.- Returns:
- inner diameter in meters
-
setHeaderInnerDiameter
public void setHeaderInnerDiameter(double diameter) Set header inner diameter.- Parameters:
diameter- inner diameter in meters
-
setHeaderInnerDiameter
Set header inner diameter with unit.- Parameters:
diameter- inner diameter valueunit- unit (m, mm, inch)
-
getHeaderOuterDiameter
public double getHeaderOuterDiameter()Get header outer diameter (ID + 2 * wall thickness).- Returns:
- outer diameter in meters
-
getHeaderWallThickness
public double getHeaderWallThickness()Get header wall thickness.- Returns:
- wall thickness in meters
-
setHeaderWallThickness
public void setHeaderWallThickness(double thickness) Set header wall thickness.- Parameters:
thickness- wall thickness in meters
-
setHeaderWallThickness
Set header wall thickness with unit.- Parameters:
thickness- wall thickness valueunit- unit (m, mm, inch)
-
getBranchInnerDiameter
public double getBranchInnerDiameter()Get branch inner diameter.- Returns:
- inner diameter in meters
-
setBranchInnerDiameter
public void setBranchInnerDiameter(double diameter) Set branch inner diameter.- Parameters:
diameter- inner diameter in meters
-
setBranchInnerDiameter
Set branch inner diameter with unit.- Parameters:
diameter- inner diameter valueunit- unit (m, mm, inch)
-
getBranchOuterDiameter
public double getBranchOuterDiameter()Get branch outer diameter (ID + 2 * wall thickness).- Returns:
- outer diameter in meters
-
getBranchWallThickness
public double getBranchWallThickness()Get branch wall thickness.- Returns:
- wall thickness in meters
-
setBranchWallThickness
public void setBranchWallThickness(double thickness) Set branch wall thickness.- Parameters:
thickness- wall thickness in meters
-
setBranchWallThickness
Set branch wall thickness with unit.- Parameters:
thickness- wall thickness valueunit- unit (m, mm, inch)
-
getHeaderVelocity
public double getHeaderVelocity()Calculate header velocity based on current flow and geometry.- Returns:
- header velocity in m/s
-
getBranchVelocity
public double getBranchVelocity()Calculate branch velocity based on current flow and geometry.- Returns:
- average branch velocity in m/s
-
getErosionalVelocity
public double getErosionalVelocity(double cFactor) Calculate erosional velocity per API RP 14E.- Parameters:
cFactor- erosional C-factor (typically 100-150)- Returns:
- erosional velocity in m/s
-
getErosionalVelocity
public double getErosionalVelocity()Calculate erosional velocity with default C-factor of 100.- Returns:
- erosional velocity in m/s
-
getSupportArrangement
Get support arrangement for FIV calculations.- Returns:
- support arrangement (Stiff, Medium stiff, Medium, Flexible)
-
setSupportArrangement
Set support arrangement for FIV calculations.- Parameters:
arrangement- support arrangement (Stiff, Medium stiff, Medium, Flexible)
-
calculateHeaderLOF
public double calculateHeaderLOF()Calculate Likelihood of Failure (LOF) for header pipe based on flow-induced vibration.LOF interpretation:
- < 0.5: Low risk - acceptable
- 0.5 - 1.0: Medium risk - monitoring recommended
- > 1.0: High risk - design review required
- Returns:
- LOF value (dimensionless)
-
calculateHeaderFRMS
public double calculateHeaderFRMS()Calculate Flow-induced vibration RMS (FRMS) for header pipe.FRMS provides an alternative measure of vibration intensity based on mixture properties.
- Returns:
- FRMS value
-
calculateHeaderFRMS
public double calculateHeaderFRMS(double frmsConstant) Calculate Flow-induced vibration RMS (FRMS) for header pipe with specified constant.- Parameters:
frmsConstant- FRMS constant (typically 6.7)- Returns:
- FRMS value
-
calculateBranchLOF
public double calculateBranchLOF()Calculate LOF for branch pipes.- Returns:
- branch LOF value
-
calculateBranchFRMS
public double calculateBranchFRMS()Calculate Flow-induced vibration RMS (FRMS) for branch pipes.FRMS provides an alternative measure of vibration intensity based on mixture properties.
- Returns:
- FRMS value
-
calculateBranchFRMS
public double calculateBranchFRMS(double frmsConstant) Calculate Flow-induced vibration RMS (FRMS) for branch pipes with specified constant.- Parameters:
frmsConstant- FRMS constant (typically 6.7)- Returns:
- FRMS value
-
getFIVAnalysis
-
getFIVAnalysisJson
Get FIV analysis as JSON string.- Returns:
- JSON string with FIV analysis
-
getMassBalance
getMassBalance.
- Specified by:
getMassBalancein interfaceProcessEquipmentInterface- Overrides:
getMassBalancein classProcessEquipmentBaseClass- Parameters:
unit- aStringobject- Returns:
- a double
-
toJson
Serializes the Process Equipment along with its state to a JSON string.
- Specified by:
toJsonin interfaceProcessEquipmentInterface- Overrides:
toJsonin classProcessEquipmentBaseClass- Returns:
- json string.
-
toJson
Serializes the Process Equipment with configurable level of detail.- Specified by:
toJsonin interfaceProcessEquipmentInterface- Overrides:
toJsonin classProcessEquipmentBaseClass- Parameters:
cfg- report configuration- Returns:
- json string
-
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
-
autoSize
public void autoSize(double safetyFactor) Automatically size the equipment based on connected stream conditions.This method calculates dimensions and design parameters using the inlet stream properties and applies the specified safety factor. The equipment must have a valid inlet stream connected before calling this method.
- Specified by:
autoSizein interfaceAutoSizeable- Parameters:
safetyFactor- multiplier for design capacity, typically 1.1-1.3 (10-30% over design)
-
selectStandardPipeID
private double selectStandardPipeID(double requiredID) Select the next larger standard pipe ID for the required diameter.- Parameters:
requiredID- required inner diameter in meters- Returns:
- selected standard pipe ID in meters
-
getWallThicknessForID
private double getWallThicknessForID(double pipeID) Get standard wall thickness for a given pipe ID.- Parameters:
pipeID- pipe inner diameter in meters- Returns:
- wall thickness in meters
-
autoSize
public void autoSize()Automatically size using default safety factor (1.2 = 20% margin).- Specified by:
autoSizein interfaceAutoSizeable
-
autoSize
Automatically size using company-specific design standards.This method applies design rules from the specified company's technical requirements (TR) documents. The standards are loaded from the NeqSim design database.
- Specified by:
autoSizein interfaceAutoSizeable- Parameters:
companyStandard- company name (e.g., "Equinor", "Shell", "TotalEnergies")trDocument- TR document reference (e.g., "TR2000", "DEP-31.38.01.11")
-
isAutoSized
public boolean isAutoSized()Check if equipment has been auto-sized.- Specified by:
isAutoSizedin interfaceAutoSizeable- Returns:
- true if autoSize() has been called successfully
-
getSizingReport
Get a detailed sizing report after auto-sizing.The report includes:
- Design basis (flow rates, pressures, temperatures)
- Calculated dimensions
- Design parameters (K-factor, Cv, velocity, etc.)
- Safety margins
- Specified by:
getSizingReportin interfaceAutoSizeable- Returns:
- formatted sizing report string
-
getSizingReportJson
Get sizing report as JSON for programmatic access.- Specified by:
getSizingReportJsonin interfaceAutoSizeable- Returns:
- JSON string with sizing data
-
initializeCapacityConstraints
protected void initializeCapacityConstraints()Initialize capacity constraints based on design limits and FIV analysis.NOTE: All constraints are disabled by default for backwards compatibility. Enable specific constraints when manifold capacity analysis is needed (e.g., after sizing).
-
getCapacityConstraints
Gets all capacity constraints defined for this equipment.The map keys are constraint names (e.g., "speed", "gasLoadFactor") and values are the corresponding CapacityConstraint objects containing design values, current values, and utilization calculations.
- Specified by:
getCapacityConstraintsin interfaceCapacityConstrainedEquipment- Returns:
- unmodifiable map of constraint name to CapacityConstraint
-
getBottleneckConstraint
Gets the constraint with the highest utilization (the bottleneck).This method identifies which constraint is closest to or exceeding its design limit. Use this to determine what is limiting equipment capacity.
- Specified by:
getBottleneckConstraintin interfaceCapacityConstrainedEquipment- Returns:
- the bottleneck constraint, or null if no constraints are defined
-
isCapacityExceeded
public boolean isCapacityExceeded()Checks if any capacity constraint is violated (exceeds 100% utilization).A violated constraint means the equipment is operating beyond its design capacity. For HARD constraints, this may indicate equipment trip or failure. For SOFT constraints, this indicates reduced efficiency or accelerated wear.
- Specified by:
isCapacityExceededin interfaceCapacityConstrainedEquipment- Returns:
- true if any constraint utilization exceeds 1.0 (100%)
-
isHardLimitExceeded
public boolean isHardLimitExceeded()Checks if any HARD constraint limit is exceeded.HARD limits represent absolute equipment limits (e.g., maximum speed) that cannot be exceeded without equipment trip or damage. This is more severe than general capacity exceedance.
- Specified by:
isHardLimitExceededin interfaceCapacityConstrainedEquipment- Returns:
- true if any HARD constraint's max value is exceeded
-
getMaxUtilization
public double getMaxUtilization()Gets the maximum utilization across all constraints.This gives a single number representing how close the equipment is to its limiting constraint. Values above 1.0 indicate the equipment is over capacity.
- Specified by:
getMaxUtilizationin interfaceCapacityConstrainedEquipment- Returns:
- maximum utilization as fraction (1.0 = 100% of design capacity)
-
addCapacityConstraint
Adds a new capacity constraint to this equipment.This allows dynamic addition of constraints at runtime. Constraints can be added during equipment configuration or based on operating conditions.
- Specified by:
addCapacityConstraintin interfaceCapacityConstrainedEquipment- Parameters:
constraint- the constraint to add
-
removeCapacityConstraint
Removes a capacity constraint by name.- Specified by:
removeCapacityConstraintin interfaceCapacityConstrainedEquipment- Parameters:
constraintName- the name of the constraint to remove- Returns:
- true if the constraint was found and removed
-
clearCapacityConstraints
public void clearCapacityConstraints()Clears all capacity constraints from this equipment.- Specified by:
clearCapacityConstraintsin interfaceCapacityConstrainedEquipment
-
setMaxHeaderVelocityDesign
public void setMaxHeaderVelocityDesign(double velocity) Set maximum header velocity design limit.- Parameters:
velocity- maximum velocity in m/s
-
setMaxBranchVelocityDesign
public void setMaxBranchVelocityDesign(double velocity) Set maximum branch velocity design limit.- Parameters:
velocity- maximum velocity in m/s
-
setMaxLOFDesign
public void setMaxLOFDesign(double lof) Set maximum LOF design limit.- Parameters:
lof- maximum LOF value
-
setMaxFRMSDesign
public void setMaxFRMSDesign(double frms) Set maximum FRMS design limit.- Parameters:
frms- maximum FRMS value
-