Class WellRoutingEstimationExample
java.lang.Object
neqsim.process.calibration.WellRoutingEstimationExample
Complete example demonstrating multi-well heat transfer coefficient estimation using the
EnKFParameterEstimator with dynamic routing for improved observability.
Problem Description
A production network consists of 8 subsea wells connected via pipelines to 2 manifolds (HP and LP). Each pipeline has an unknown heat transfer coefficient that affects the temperature drop along the pipe. The goal is to estimate all 8 heat transfer coefficients using only 2 temperature measurements (one at each manifold outlet).
Observability Challenge
With 8 unknowns and only 2 measurements, the system is severely underdetermined in any single configuration. However, by dynamically changing which wells route to which manifold, we accumulate different measurement equations over time, eventually making all parameters observable.
Solution Approach
The example demonstrates:
- Building a production network with ProcessSystem
- Configuring EnKFParameterEstimator with tunable parameters and measurements
- Pre-deployment validation using EstimationTestHarness
- Dynamic routing schedule to maximize observability
- Live estimation loop with result analysis
- Version:
- 1.0
- Author:
- NeqSim Development Team
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int[]private static final intprivate Mixerprivate Mixerprivate static final doubleprivate static final doubleprivate Randomprivate static final intprivate PipeBeggsAndBrills[]private ProcessSystemprivate static final doubleprivate static final doubleprivate Splitter[]private static final double[]private static final double[][]private static final doubleprivate Stream[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidBuilds the complete production network.Creates and configures the EnKF estimator.private StringcreateSeparator(int length) Creates a separator string.Creates and configures the test harness.private SystemInterfacecreateWellFluid(double temperature, double pressure) Creates a typical well fluid.Gets simulated measurements with noise.int[][]Gets the routing schedule designed for maximum observability.static voidMain entry point.private voidprintEstimates(double[] estimates, double[] uncertainties, String prefix) Prints current estimates.private voidprintFinalSummary(EnKFParameterEstimator estimator) Prints final summary comparing estimates to true values.voidrunLiveEstimation(EnKFParameterEstimator estimator) Runs the live estimation loop.booleanrunValidation(EnKFParameterEstimator estimator, EstimationTestHarness harness) Runs pre-deployment validation tests.voidsetRouting(int[] routing) Sets the well routing configuration.
-
Field Details
-
NUM_WELLS
private static final int NUM_WELLS- See Also:
-
SEA_TEMPERATURE
private static final double SEA_TEMPERATURE- See Also:
-
WELL_TEMPERATURE
private static final double WELL_TEMPERATURE- See Also:
-
MEASUREMENT_NOISE_STD
private static final double MEASUREMENT_NOISE_STD- See Also:
-
ENSEMBLE_SIZE
private static final int ENSEMBLE_SIZE- See Also:
-
PROCESS_NOISE
private static final double PROCESS_NOISE- See Also:
-
MAX_CHANGE_PER_UPDATE
private static final double MAX_CHANGE_PER_UPDATE- See Also:
-
TRUE_HEAT_TRANSFER_COEFFS
private static final double[] TRUE_HEAT_TRANSFER_COEFFS -
WELL_CONFIGS
private static final double[][] WELL_CONFIGS -
process
-
wellStreams
-
pipes
-
splitters
-
hpManifold
-
lpManifold
-
currentRouting
private int[] currentRouting -
noiseRng
-
-
Constructor Details
-
WellRoutingEstimationExample
public WellRoutingEstimationExample()
-
-
Method Details
-
createWellFluid
Creates a typical well fluid.- Parameters:
temperature- wellhead temperature in °Cpressure- wellhead pressure in bar-a- Returns:
- configured fluid system
-
buildNetwork
public void buildNetwork()Builds the complete production network.Network topology:
Well1 ─── Pipe1 ─── Splitter1 ──┬── HP Manifold ─── HP Outlet Well2 ─── Pipe2 ─── Splitter2 ──┤ Well3 ─── Pipe3 ─── Splitter3 ──┤ Well4 ─── Pipe4 ─── Splitter4 ──┤ Well5 ─── Pipe5 ─── Splitter5 ──┤ Well6 ─── Pipe6 ─── Splitter6 ──┤ Well7 ─── Pipe7 ─── Splitter7 ──┤ Well8 ─── Pipe8 ─── Splitter8 ──┴── LP Manifold ─── LP Outlet
-
setRouting
public void setRouting(int[] routing) Sets the well routing configuration.- Parameters:
routing- array of routing decisions (0 = HP, 1 = LP) for each well
-
getMeasurementsWithNoise
-
createEstimator
Creates and configures the EnKF estimator.- Returns:
- configured estimator
-
createTestHarness
Creates and configures the test harness.- Returns:
- configured test harness
-
getRoutingSchedule
public int[][] getRoutingSchedule()Gets the routing schedule designed for maximum observability.The schedule includes:
- Block patterns: groups of wells at each manifold
- Alternating patterns: interleaved routing
- Single-well isolation: most informative for individual estimates
- Returns:
- array of routing configurations
-
runValidation
Runs pre-deployment validation tests.- Parameters:
estimator- the estimator to validateharness- the test harness- Returns:
- true if validation passes
-
runLiveEstimation
Runs the live estimation loop.- Parameters:
estimator- the estimator to use
-
printEstimates
Prints current estimates.- Parameters:
estimates- the current parameter estimatesuncertainties- the uncertainties for each parameterprefix- the prefix to print before estimates
-
printFinalSummary
Prints final summary comparing estimates to true values.- Parameters:
estimator- the EnKF parameter estimator with results
-
createSeparator
Creates a separator string.- Parameters:
length- the length of the separator- Returns:
- a string of dashes of the specified length
-
main
Main entry point.- Parameters:
args- command line arguments (not used)
-