Class ProductionProfile
- All Implemented Interfaces:
Serializable
This class provides comprehensive production forecasting capabilities including:
- Standard decline curve models (exponential, hyperbolic, harmonic)
- Plateau rate handling with automatic transition to decline
- Integration with facility bottleneck analysis
- Cumulative production tracking
- Economic limit enforcement
Decline Curve Theory
The class implements Arps decline curve equations:
- Exponential (b=0):
q(t) = q_i * exp(-D*t) - Hyperbolic (0<b<1):
q(t) = q_i / (1 + b*D*t)^(1/b) - Harmonic (b=1):
q(t) = q_i / (1 + D*t)
q_i= initial production rateD= nominal decline rate (typically per year)b= hyperbolic exponentt= time
Facility Constraint Integration
When a ProcessSystem is provided, the production forecast respects facility constraints
by using ProductionOptimizer to determine the maximum sustainable rate at each time step.
This enables realistic forecasts where:
- Plateau rate is limited by the tightest facility bottleneck
- Bottleneck equipment shifts as production declines
- Facility utilization is tracked throughout field life
Example Usage
// Basic decline curve calculation
DeclineParameters params = new DeclineParameters(10000.0, // initial rate: 10,000 Sm3/day
0.15, // decline rate: 15% per year
DeclineType.EXPONENTIAL, "Sm3/day");
double rateAfter2Years = ProductionProfile.calculateRate(params, 2.0);
// Full forecast with facility constraints
ProductionProfile profile = new ProductionProfile(facilityProcess);
ProductionForecast forecast = profile.forecast(feedStream, params, 8000.0, // plateau rate
3.0, // plateau duration (years)
500.0, // economic limit
20.0, // forecast horizon (years)
30.0); // time step (days)
System.out.println("Total recovery: " + forecast.getTotalRecovery());
System.out.println(forecast.toMarkdownTable());
- Version:
- 1.0
- Author:
- ESOL
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classContainer for decline curve parameters.static enumDecline curve model types based on Arps equations.static final classComplete production forecast with plateau and decline phases.static final classProduction forecast result at a single time point. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final doubleDays per year for time conversion.private final ProcessSystemProcess system representing the surface facility.private ProductionOptimizerProduction optimizer for bottleneck analysis.private static final longSerialization version UID. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a ProductionProfile without facility constraints.ProductionProfile(ProcessSystem facility) Creates a ProductionProfile with facility constraint analysis. -
Method Summary
Modifier and TypeMethodDescriptionstatic doublecalculateCumulativeProduction(ProductionProfile.DeclineParameters params, double time) Calculates cumulative production over a time period using analytical integration.static doublecalculateRate(ProductionProfile.DeclineParameters params, double time) Calculates production rate at a given time using decline curve equations.fitDecline(List<Double> times, List<Double> rates, ProductionProfile.DeclineType type, String rateUnit) Fits decline parameters from historical production data.private double[]fitExponentialDecline(List<Double> times, List<Double> rates) Fits exponential decline using linear regression on ln(q) vs t.private double[]fitHarmonicDecline(List<Double> times, List<Double> rates) Fits harmonic decline using linear regression on 1/q vs t.private double[]fitHyperbolicDecline(List<Double> times, List<Double> rates) Fits hyperbolic decline using grid search over b values.private double[]fitHyperbolicForB(List<Double> times, List<Double> rates, double b) Fits hyperbolic decline for a fixed b value.forecast(StreamInterface feedStream, ProductionProfile.DeclineParameters decline, double plateauRate, double plateauDurationYears, double economicLimit, double forecastYears, double timeStepDays) Generates a production forecast with plateau and decline phases.Gets the facility process system.private StringGets the name of the current facility bottleneck.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
DAYS_PER_YEAR
private static final double DAYS_PER_YEARDays per year for time conversion.- See Also:
-
facility
Process system representing the surface facility. -
optimizer
Production optimizer for bottleneck analysis.
-
-
Constructor Details
-
ProductionProfile
public ProductionProfile()Creates a ProductionProfile without facility constraints.Use this constructor for simple decline curve calculations that don't need to consider facility bottlenecks.
-
ProductionProfile
Creates a ProductionProfile with facility constraint analysis.When a ProcessSystem is provided, the forecast will use
ProductionOptimizerto determine the maximum sustainable rate considering all equipment capacities.- Parameters:
facility- process system representing the surface facility
-
-
Method Details
-
forecast
public ProductionProfile.ProductionForecast forecast(StreamInterface feedStream, ProductionProfile.DeclineParameters decline, double plateauRate, double plateauDurationYears, double economicLimit, double forecastYears, double timeStepDays) Generates a production forecast with plateau and decline phases.The forecast proceeds as follows:
- During plateau phase, production is maintained at the minimum of:
- Requested plateau rate
- Maximum facility rate (if facility is provided)
- Reservoir deliverability from decline curve
- Decline phase begins when reservoir deliverability falls below plateau
- Forecast continues until economic limit or end of horizon
- Parameters:
feedStream- stream to adjust for facility analysis (can be null if no facility)decline- decline curve parametersplateauRate- desired plateau production rateplateauDurationYears- maximum duration of plateau phaseeconomicLimit- minimum economic production rateforecastYears- total forecast horizon in yearstimeStepDays- time step for forecast points in days- Returns:
- complete production forecast
- During plateau phase, production is maintained at the minimum of:
-
calculateRate
Calculates production rate at a given time using decline curve equations.This is a static utility method that can be used without instantiating the class. Time should be in the same units as the decline rate.
- Parameters:
params- decline curve parameterstime- time from start of decline- Returns:
- production rate at specified time
-
calculateCumulativeProduction
public static double calculateCumulativeProduction(ProductionProfile.DeclineParameters params, double time) Calculates cumulative production over a time period using analytical integration.Uses closed-form solutions for each decline type:
- Exponential:
Np = (qi/D) * (1 - exp(-D*t)) - Hyperbolic:
Np = (qi/(D*(1-b))) * (1 - (1+b*D*t)^(1-1/b)) - Harmonic:
Np = (qi/D) * ln(1 + D*t)
- Parameters:
params- decline curve parameterstime- time from start of decline- Returns:
- cumulative production up to specified time
- Exponential:
-
fitDecline
public ProductionProfile.DeclineParameters fitDecline(List<Double> times, List<Double> rates, ProductionProfile.DeclineType type, String rateUnit) Fits decline parameters from historical production data.Uses least-squares regression to determine the best-fit decline parameters for the specified decline type. For exponential decline, this uses linear regression on ln(q) vs t. For hyperbolic, it uses iterative optimization.
- Parameters:
times- list of time pointsrates- list of corresponding production ratestype- desired decline curve typerateUnit- rate unit string- Returns:
- fitted decline parameters
- Throws:
IllegalArgumentException- if data is insufficient or invalid
-
fitExponentialDecline
-
fitHyperbolicDecline
-
fitHyperbolicForB
-
fitHarmonicDecline
-
getFacilityBottleneckName
Gets the name of the current facility bottleneck. -
getFacility
Gets the facility process system.- Returns:
- facility process system, or null if not configured
-