Class ProductionAllocator
java.lang.Object
neqsim.process.fielddevelopment.evaluation.ProductionAllocator
- All Implemented Interfaces:
Serializable
Production allocation and metering calculations.
Handles production allocation when multiple wells or sources are commingled, accounting for measurement uncertainty. Key tool for fiscal metering, production reporting, and revenue allocation.
Metering Technologies Supported
- Ultrasonic - ±0.5% (fiscal gas)
- Coriolis - ±0.1% (fiscal liquid)
- Differential Pressure - ±1.0% (process)
- Multiphase - ±2-5% (wellhead)
- Venturi/Orifice - ±1.5% (gas)
Example Usage
ProductionAllocator allocator = new ProductionAllocator();
allocator.addSource("Well-A", wellAStream, MeteringType.MULTIPHASE);
allocator.addSource("Well-B", wellBStream, MeteringType.MULTIPHASE);
allocator.setExportMeter("Export", exportStream, MeteringType.ULTRASONIC);
Map<String, Double> allocation = allocator.allocateByOil();
- Version:
- 1.0
- Author:
- ESOL
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumMetering technology types with typical uncertainties.private static classProduction source with metering information. -
Field Summary
FieldsModifier and TypeFieldDescriptionExport meter reference.private static final longprivate final List<ProductionAllocator.ProductionSource> Production sources (wells, manifolds). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddSource(String name, StreamInterface stream) Adds a production source with multiphase meter (default).addSource(String name, StreamInterface stream, ProductionAllocator.MeteringType meterType) Adds a production source for allocation.Allocates production by energy content (hydrocarbon heating value).Allocates production by gas contribution.Allocates production by total mass.Allocates production by oil contribution.Generates an allocation report.getAllocatedGasVolumes(double exportGasSm3d) Gets allocated gas volume for each source.getAllocatedOilVolumes(double exportOilSm3d) Gets allocated oil volume for each source.double[]getAllocatedWithUncertainty(String sourceName, double exportVolume) Gets allocated volume with uncertainty bounds.private doublegetEnergyRate(StreamInterface stream) Gets energy rate (heating value * flow).private doublegetGasFlowRate(StreamInterface stream) Gets gas flow rate from a stream.doubleCalculates mass balance imbalance.private doublegetOilFlowRate(StreamInterface stream) Gets oil flow rate from a stream.doubleCalculates overall allocation uncertainty.doublegetSourceUncertainty(String sourceName) Gets uncertainty for a specific source's allocation.booleanisBalanceAcceptable(double toleranceFraction) Checks if imbalance exceeds acceptable tolerance.setExportMeter(String name, StreamInterface stream, ProductionAllocator.MeteringType meterType) Sets the export/sales meter reference.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
sources
Production sources (wells, manifolds). -
exportMeter
Export meter reference.
-
-
Constructor Details
-
ProductionAllocator
public ProductionAllocator()
-
-
Method Details
-
addSource
public ProductionAllocator addSource(String name, StreamInterface stream, ProductionAllocator.MeteringType meterType) Adds a production source for allocation.- Parameters:
name- source identifier (e.g., well name)stream- production streammeterType- metering technology- Returns:
- this for chaining
-
addSource
Adds a production source with multiphase meter (default).- Parameters:
name- source namestream- production stream- Returns:
- this for chaining
-
setExportMeter
public ProductionAllocator setExportMeter(String name, StreamInterface stream, ProductionAllocator.MeteringType meterType) Sets the export/sales meter reference.- Parameters:
name- meter namestream- export streammeterType- metering technology- Returns:
- this for chaining
-
allocateByOil
-
allocateByGas
-
allocateByMass
-
allocateByEnergy
-
getAllocatedOilVolumes
-
getAllocatedGasVolumes
-
getOverallUncertainty
public double getOverallUncertainty()Calculates overall allocation uncertainty.Uses root-sum-square method to combine uncertainties from individual meters.
- Returns:
- overall uncertainty as fraction
-
getSourceUncertainty
Gets uncertainty for a specific source's allocation.- Parameters:
sourceName- source name- Returns:
- uncertainty as fraction
-
getAllocatedWithUncertainty
Gets allocated volume with uncertainty bounds.- Parameters:
sourceName- source nameexportVolume- total export volume- Returns:
- array [allocated, low, high]
-
getMassImbalance
public double getMassImbalance()Calculates mass balance imbalance.- Returns:
- imbalance as fraction of export
-
isBalanceAcceptable
public boolean isBalanceAcceptable(double toleranceFraction) Checks if imbalance exceeds acceptable tolerance.- Parameters:
toleranceFraction- acceptable tolerance (e.g., 0.02 for 2%)- Returns:
- true if imbalance is acceptable
-
generateReport
-
getOilFlowRate
Gets oil flow rate from a stream. -
getGasFlowRate
Gets gas flow rate from a stream. -
getEnergyRate
Gets energy rate (heating value * flow).
-