Class WellFlowlineNetwork
java.lang.Object
neqsim.util.NamedBaseClass
neqsim.process.SimulationBaseClass
neqsim.process.equipment.ProcessEquipmentBaseClass
neqsim.process.equipment.network.WellFlowlineNetwork
- All Implemented Interfaces:
Serializable, Runnable, ProcessEquipmentInterface, SimulationInterface, NamedInterface
Network wrapper that links
WellFlow inflow models with PipeBeggsAndBrills
hydraulics and gathers the outlets into configurable manifolds.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA branch represents one well + flowline path to a manifold.static classRepresents a manifold that mixes incoming branches (and optional upstream pipeline) before optionally sending flow further downstream through a connecting pipeline. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PipeBeggsAndBrillsprivate booleanprivate doubleprivate Doubleprivate final List<WellFlowlineNetwork.ManifoldNode> private intprivate booleanprivate static final longprivate Doubleprivate StringFields 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 TypeMethodDescriptionaddBranch(String branchName, WellFlow well, PipeBeggsAndBrills pipeline) Add a branch to the network using preconfigured well and pipeline units.addBranch(String branchName, WellFlow well, PipeBeggsAndBrills pipeline, WellFlowlineNetwork.ManifoldNode manifold) Add a branch to a specific manifold in the network.addBranch(String branchName, WellFlow well, PipeBeggsAndBrills pipeline, ThrottlingValve choke, WellFlowlineNetwork.ManifoldNode manifold) Add a branch with an optional production choke to a specific manifold.addBranch(String branchName, StreamInterface reservoirStream) Convenience helper that creates a branch from a reservoir stream by instantiating aWellFlowandPipeBeggsAndBrillspair and attaching it to the terminal manifold.addBranch(String branchName, StreamInterface reservoirStream, WellFlowlineNetwork.ManifoldNode manifold) Convenience helper that creates a branch from a reservoir stream for a specific manifold.addManifold(String name, PipeBeggsAndBrills connectionPipeline) Add an additional manifold downstream of the current endpoint, connecting it with the supplied pipeline.voidconnectManifolds(WellFlowlineNetwork.ManifoldNode upstream, WellFlowlineNetwork.ManifoldNode downstream, PipeBeggsAndBrills connectionPipeline) Connect an upstream manifold to a downstream manifold using the provided pipeline.createManifold(String name) Create an unconnected manifold node that can later be linked to other manifolds via pipelines.private voidForce a single pressure at each manifold outlet and optionally push that backpressure to wells that solve for flow from outlet pressure.Get the arrival mixer that gathers all branch outlets (useful for reporting or re-routing).Stream representing combined arrival conditions at the platform inlet.Get an immutable view of network branches for optimization or tuning.Get the configured manifolds in upstream-to-downstream order.private List<WellFlowlineNetwork.ManifoldNode> Determine a topologically sorted list of manifolds that feed the tail manifold.private WellFlowlineNetwork.ManifoldNodeReport the most recent pressure enforced at the terminal manifold while solving toward a target endpoint pressure.private voidIteratively adjust terminal manifold pressure so that the endpoint (arrival or facility outlet) pressure matches the configured target.voidIn this method all thermodynamic and unit operations will be calculated in a steady state calculation.private voidrunManifold(WellFlowlineNetwork.ManifoldNode manifold, UUID id, boolean overridePressure, Double forcedPressure) private voidrunManifolds(UUID id, boolean forceEndpointPressure, Double endpointPressure) Run through all manifolds and branches in upstream-to-downstream order.voidrunTransient(double dt, UUID id) runTransientprivate doublerunWithEndpointPressure(double manifoldPressure, UUID id) Execute branch runs and facility pipeline while enforcing a specified terminal manifold pressure.voidsetFacilityPipeline(PipeBeggsAndBrills pipeline) Attach a common pipeline from the arrival manifold to the receiving facility.voidsetForceFlowFromPressureSolve(boolean enable) Automatically switch wells to solve for flow from outlet pressure when running with a specified target endpoint pressure.voidsetIterationTolerance(double tolerance) Configure convergence tolerance when iterating manifold pressure to reach the target endpoint pressure.voidsetMaxIterations(int maxIterations) Configure maximum number of iterations when matching target endpoint pressure.voidSetter for the fieldname.voidsetPropagateArrivalPressureToWells(boolean propagate) Control whether the arrival pressure should be pushed back to wells that are configured to compute flow from outlet pressure (production-index, Vogel, or Fetkovich modes withsolveFlowFromOutletPressure(true)).voidsetTargetEndpointPressure(double pressure, String unit) Specify the desired pressure at the network endpoint (arrival manifold if no facility pipeline, otherwise the facility pipeline outlet).toJson()Serializes the Process Equipment along with its state to a JSON string.Methods inherited from class ProcessEquipmentBaseClass
copy, displayResult, equals, getConditionAnalysisMessage, getController, getEnergyStream, getEntropyProduction, getExergyChange, getMassBalance, getMassBalance, getMechanicalDesign, getMinimumFlow, getPressure, getPressure, getProperty, getReport_json, getResultTable, getSpecification, getTemperature, getTemperature, getThermoSystem, hashCode, initMechanicalDesign, isActive, isActive, isSetEnergyStream, reportResults, run_step, runConditionAnalysis, setController, setEnergyStream, setEnergyStream, setFlowValveController, setMinimumFlow, setPressure, setRegulatorOutSignal, setSpecification, setTemperature, solved, toJsonMethods 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 NamedInterface
getName, getTagName, setTagNameMethods inherited from interface ProcessEquipmentInterface
getCapacityDuty, getCapacityMax, getExergyChange, getFluid, getRestCapacity, needRecalculation, validateSetupMethods inherited from interface SimulationInterface
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, run, run_step, runTransient, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTime
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
manifolds
-
facilityPipeline
-
propagateArrivalPressureToWells
private boolean propagateArrivalPressureToWells -
forceFlowFromPressureSolve
private boolean forceFlowFromPressureSolve -
targetEndpointPressure
-
targetEndpointPressureUnit
-
iterationTolerance
private double iterationTolerance -
maxIterations
private int maxIterations -
lastTerminalManifoldPressure
-
-
Constructor Details
-
WellFlowlineNetwork
Create a new network wrapper.- Parameters:
name- network name
-
-
Method Details
-
createManifold
Create an unconnected manifold node that can later be linked to other manifolds via pipelines.- Parameters:
name- manifold name- Returns:
- the created
WellFlowlineNetwork.ManifoldNode
-
addBranch
public WellFlowlineNetwork.Branch addBranch(String branchName, WellFlow well, PipeBeggsAndBrills pipeline) Add a branch to the network using preconfigured well and pipeline units. The pipeline inlet is forced to the well outlet and its outlet is attached to the terminal manifold by default.- Parameters:
branchName- branch identifierwell- configuredWellFlowpipeline- configuredPipeBeggsAndBrills- Returns:
- the added
WellFlowlineNetwork.Branch
-
addBranch
public WellFlowlineNetwork.Branch addBranch(String branchName, WellFlow well, PipeBeggsAndBrills pipeline, WellFlowlineNetwork.ManifoldNode manifold) Add a branch to a specific manifold in the network.- Parameters:
branchName- branch identifierwell- configuredWellFlowpipeline- configuredPipeBeggsAndBrillsmanifold- manifold that should receive the branch outlet- Returns:
- the added
WellFlowlineNetwork.Branch
-
addBranch
public WellFlowlineNetwork.Branch addBranch(String branchName, WellFlow well, PipeBeggsAndBrills pipeline, ThrottlingValve choke, WellFlowlineNetwork.ManifoldNode manifold) Add a branch with an optional production choke to a specific manifold.- Parameters:
branchName- branch identifierwell- configuredWellFlowpipeline- configuredPipeBeggsAndBrillschoke- optionalThrottlingValveplaced between the well outlet and pipeline inletmanifold- manifold that should receive the branch outlet- Returns:
- the added
WellFlowlineNetwork.Branch
-
addBranch
Convenience helper that creates a branch from a reservoir stream by instantiating aWellFlowandPipeBeggsAndBrillspair and attaching it to the terminal manifold.- Parameters:
branchName- branch identifierreservoirStream- stream representing reservoir inflow- Returns:
- the created
WellFlowlineNetwork.Branch
-
addBranch
public WellFlowlineNetwork.Branch addBranch(String branchName, StreamInterface reservoirStream, WellFlowlineNetwork.ManifoldNode manifold) Convenience helper that creates a branch from a reservoir stream for a specific manifold.- Parameters:
branchName- branch identifierreservoirStream- stream representing reservoir inflowmanifold- manifold that should receive the branch outlet- Returns:
- the created
WellFlowlineNetwork.Branch
-
getBranches
Get an immutable view of network branches for optimization or tuning.- Returns:
- list of branches
-
getManifolds
Get the configured manifolds in upstream-to-downstream order.- Returns:
- manifolds
-
getArrivalMixer
Get the arrival mixer that gathers all branch outlets (useful for reporting or re-routing).- Returns:
- arrival mixer
-
setFacilityPipeline
Attach a common pipeline from the arrival manifold to the receiving facility. The pipeline inlet is automatically wired to the terminal manifold outlet.- Parameters:
pipeline- configuredPipeBeggsAndBrillsrepresenting the shared pipeline
-
addManifold
public WellFlowlineNetwork.ManifoldNode addManifold(String name, PipeBeggsAndBrills connectionPipeline) Add an additional manifold downstream of the current endpoint, connecting it with the supplied pipeline. The pipeline inlet is automatically wired to the current terminal manifold outlet.- Parameters:
name- manifold nameconnectionPipeline- pipeline from the current endpoint manifold to the new manifold- Returns:
- the created
WellFlowlineNetwork.ManifoldNode
-
connectManifolds
public void connectManifolds(WellFlowlineNetwork.ManifoldNode upstream, WellFlowlineNetwork.ManifoldNode downstream, PipeBeggsAndBrills connectionPipeline) Connect an upstream manifold to a downstream manifold using the provided pipeline.- Parameters:
upstream- upstream manifolddownstream- downstream manifold that should receive the pipeline outletconnectionPipeline- pipeline from upstream to downstream
-
setPropagateArrivalPressureToWells
public void setPropagateArrivalPressureToWells(boolean propagate) Control whether the arrival pressure should be pushed back to wells that are configured to compute flow from outlet pressure (production-index, Vogel, or Fetkovich modes withsolveFlowFromOutletPressure(true)).- Parameters:
propagate- true to push arrival pressure back to wells
-
setForceFlowFromPressureSolve
public void setForceFlowFromPressureSolve(boolean enable) Automatically switch wells to solve for flow from outlet pressure when running with a specified target endpoint pressure.- Parameters:
enable- true to force wells to solve for flow from pressure
-
setTargetEndpointPressure
Specify the desired pressure at the network endpoint (arrival manifold if no facility pipeline, otherwise the facility pipeline outlet). The network will iterate manifold pressure to match this target while solving individual well rates from backpressure.- Parameters:
pressure- target endpoint pressureunit- pressure unit
-
setIterationTolerance
public void setIterationTolerance(double tolerance) Configure convergence tolerance when iterating manifold pressure to reach the target endpoint pressure.- Parameters:
tolerance- absolute pressure tolerance in bara
-
setMaxIterations
public void setMaxIterations(int maxIterations) Configure maximum number of iterations when matching target endpoint pressure.- Parameters:
maxIterations- iteration cap
-
getArrivalStream
Stream representing combined arrival conditions at the platform inlet.- Returns:
- arrival stream
-
getTerminalManifoldPressure
-
run
Description copied from interface:SimulationInterfaceIn this method all thermodynamic and unit operations will be calculated in a steady state calculation.
- Parameters:
id- UUID
-
runTransient
Description copied from interface:SimulationInterfacerunTransient
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.- Parameters:
dt- Delta time [s]id- Calculation identifier
-
setName
Description copied from class:NamedBaseClassSetter for the field
name.- Specified by:
setNamein interfaceNamedInterface- Overrides:
setNamein classNamedBaseClass- Parameters:
name- aStringobject
-
toJson
Description copied from class:ProcessEquipmentBaseClassSerializes the Process Equipment along with its state to a JSON string.
- Specified by:
toJsonin interfaceProcessEquipmentInterface- Overrides:
toJsonin classProcessEquipmentBaseClass- Returns:
- json string.
-
enforceManifoldPressures
Force a single pressure at each manifold outlet and optionally push that backpressure to wells that solve for flow from outlet pressure.- Parameters:
id- calculation identifier
-
iterateForEndpointPressure
Iteratively adjust terminal manifold pressure so that the endpoint (arrival or facility outlet) pressure matches the configured target.- Parameters:
id- calculation identifier
-
runWithEndpointPressure
Execute branch runs and facility pipeline while enforcing a specified terminal manifold pressure.- Parameters:
manifoldPressure- pressure in bara at the terminal manifoldid- calculation identifier- Returns:
- pressure achieved at the endpoint (arrival if no facility pipeline, otherwise facility pipeline outlet)
-
runManifolds
Run through all manifolds and branches in upstream-to-downstream order.- Parameters:
id- calculation identifierforceEndpointPressure- whether to force endpoint pressureendpointPressure- the endpoint pressure to force
-
runManifold
private void runManifold(WellFlowlineNetwork.ManifoldNode manifold, UUID id, boolean overridePressure, Double forcedPressure) -
getReachableManifoldsInFlowOrder
Determine a topologically sorted list of manifolds that feed the tail manifold. Manifolds that are not connected to the terminal chain are ignored to avoid null arrival streams interfering with calculations.- Returns:
- list of manifolds in flow order
-
getTailManifold
-