Class FieldProductionScheduler

java.lang.Object
neqsim.process.util.fielddevelopment.FieldProductionScheduler
All Implemented Interfaces:
Serializable

public class FieldProductionScheduler extends Object implements Serializable
Orchestrates field-level production scheduling and forecasting.

The FieldProductionScheduler integrates multiple reservoirs, wells, and surface facilities to create production schedules that respect:

  • Reservoir deliverability (pressure depletion, GOR evolution)
  • Well capacity (IPR, VLP constraints)
  • Facility bottlenecks (separation, compression, export)
  • Contractual obligations (plateau targets, minimum delivery)
  • Intervention schedules (workovers, shutdowns)

Architecture Overview

┌─────────────────────────────────────────────────────────────────────────────┐
│                      FieldProductionScheduler                                │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│   ┌──────────────┐   ┌──────────────┐   ┌──────────────┐                   │
│   │ Reservoir 1  │   │ Reservoir 2  │   │ Reservoir N  │  (SimpleReservoir) │
│   └──────┬───────┘   └──────┬───────┘   └──────┬───────┘                   │
│          │                  │                  │                            │
│          ▼                  ▼                  ▼                            │
│   ┌──────────────────────────────────────────────────────┐                 │
│   │                   Well Manager                        │                 │
│   │   ┌────┐ ┌────┐ ┌────┐ ┌────┐ ┌────┐ ┌────┐        │  (WellScheduler)  │
│   │   │ W1 │ │ W2 │ │ W3 │ │ W4 │ │ I1 │ │ I2 │        │                   │
│   │   └────┘ └────┘ └────┘ └────┘ └────┘ └────┘        │                   │
│   └──────────────────────────┬───────────────────────────┘                 │
│                              │                                              │
│                              ▼                                              │
│   ┌──────────────────────────────────────────────────────┐                 │
│   │              Surface Facility (ProcessSystem)         │                 │
│   │   Separator → Compressor → Dehydration → Export      │  (FacilityCapacity)
│   └──────────────────────────┬───────────────────────────┘                 │
│                              │                                              │
│                              ▼                                              │
│   ┌──────────────────────────────────────────────────────┐                 │
│   │                 Production Schedule                   │                 │
│   │   Time → Rates → Volumes → Pressures → Economics     │                 │
│   └──────────────────────────────────────────────────────┘                 │
│                                                                              │
└─────────────────────────────────────────────────────────────────────────────┘

Example Usage - Basic Field Scheduling

// Create reservoirs and facility
SimpleReservoir gasField = new SimpleReservoir("Gas Field");
gasField.setReservoirFluid(gasFluid, 5.0e9, 1.0, 1.0e7);
gasField.addGasProducer("GP-1");
gasField.addGasProducer("GP-2");

ProcessSystem facility = createFacilityModel();

// Create scheduler
FieldProductionScheduler scheduler = new FieldProductionScheduler("Offshore Field");
scheduler.addReservoir(gasField);
scheduler.setFacility(facility);

// Set production targets
scheduler.setPlateauRate(10.0, "MSm3/day");
scheduler.setPlateauDuration(5.0, "years");
scheduler.setMinimumRate(1.0, "MSm3/day");

// Run forecast
ProductionSchedule schedule = scheduler.generateSchedule(LocalDate.of(2025, 1, 1), 20.0, // years
    30.0 // days per step
);

// Review results
System.out.println(schedule.toMarkdownTable());
System.out.println("Cumulative gas: " + schedule.getCumulativeGas("GSm3") + " GSm3");
System.out.println("Field life: " + schedule.getFieldLife("years") + " years");

Example Usage - With Economics

// Add economic parameters
scheduler.setGasPrice(8.0, "USD/MMBtu");
scheduler.setOilPrice(70.0, "USD/bbl");
scheduler.setDiscountRate(0.10);  // 10% per year
scheduler.setOperatingCost(5.0e6, "USD/year");

ProductionSchedule schedule = scheduler.generateSchedule(...);

System.out.println("Gross revenue: $" + schedule.getGrossRevenue() / 1e9 + "B");
System.out.println("NPV: $" + schedule.getNPV() / 1e6 + "M");
Version:
1.0
Author:
ESOL
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serialization version UID.
      See Also:
    • DAYS_PER_YEAR

      private static final double DAYS_PER_YEAR
      Days per year for calculations.
      See Also:
    • name

      private final String name
      Scheduler name.
    • reservoirs

      List of reservoirs in the field.
    • facility

      private ProcessSystem facility
      Surface facility process system.
    • wellScheduler

      private WellScheduler wellScheduler
      Well scheduler for intervention tracking.
    • facilityCapacity

      private transient FacilityCapacity facilityCapacity
      Facility capacity analyzer.
    • plateauRate

      private double plateauRate
    • plateauRateUnit

      private String plateauRateUnit
    • plateauDuration

      private double plateauDuration
    • minimumRate

      private double minimumRate
    • minimumRateUnit

      private String minimumRateUnit
    • gasPrice

      private double gasPrice
    • gasPriceUnit

      private String gasPriceUnit
    • oilPrice

      private double oilPrice
    • oilPriceUnit

      private String oilPriceUnit
    • discountRate

      private double discountRate
    • operatingCostPerYear

      private double operatingCostPerYear
    • respectFacilityConstraints

      private boolean respectFacilityConstraints
    • trackReservoirDepletion

      private boolean trackReservoirDepletion
    • lowPressureLimit

      private double lowPressureLimit
  • Constructor Details

    • FieldProductionScheduler

      public FieldProductionScheduler(String name)
      Creates a field production scheduler.
      Parameters:
      name - field name
  • Method Details

    • addReservoir

      public FieldProductionScheduler addReservoir(SimpleReservoir reservoir)
      Adds a reservoir to the field.
      Parameters:
      reservoir - SimpleReservoir instance
      Returns:
      this scheduler for chaining
    • addReservoir

      public FieldProductionScheduler addReservoir(SimpleReservoir reservoir, String fluidType)
      Adds a reservoir to the field with specified fluid type.
      Parameters:
      reservoir - SimpleReservoir instance
      fluidType - "gas", "oil", or "condensate"
      Returns:
      this scheduler for chaining
    • setFacility

      public FieldProductionScheduler setFacility(ProcessSystem facility)
      Sets the surface facility process system.
      Parameters:
      facility - ProcessSystem representing the facility
      Returns:
      this scheduler for chaining
    • setWellScheduler

      public FieldProductionScheduler setWellScheduler(WellScheduler scheduler)
      Sets the well scheduler for intervention tracking.
      Parameters:
      scheduler - WellScheduler instance
      Returns:
      this scheduler for chaining
    • setPlateauRate

      public FieldProductionScheduler setPlateauRate(double rate, String unit)
      Sets the plateau production rate target.
      Parameters:
      rate - plateau rate
      unit - rate unit (e.g., "MSm3/day", "kg/hr")
      Returns:
      this scheduler for chaining
    • setPlateauDuration

      public FieldProductionScheduler setPlateauDuration(double duration, String unit)
      Sets the plateau duration.
      Parameters:
      duration - duration value
      unit - "years", "months", or "days"
      Returns:
      this scheduler for chaining
    • setMinimumRate

      public FieldProductionScheduler setMinimumRate(double rate, String unit)
      Sets the minimum economic rate (production stops below this).
      Parameters:
      rate - minimum rate
      unit - rate unit
      Returns:
      this scheduler for chaining
    • setGasPrice

      public FieldProductionScheduler setGasPrice(double price, String unit)
      Sets the gas price for economic calculations.
      Parameters:
      price - gas price
      unit - price unit (e.g., "USD/MMBtu", "USD/Sm3")
      Returns:
      this scheduler for chaining
    • setOilPrice

      public FieldProductionScheduler setOilPrice(double price, String unit)
      Sets the oil price for economic calculations.
      Parameters:
      price - oil price
      unit - price unit (e.g., "USD/bbl", "USD/Sm3")
      Returns:
      this scheduler for chaining
    • setDiscountRate

      public FieldProductionScheduler setDiscountRate(double rate)
      Sets the discount rate for NPV calculations.
      Parameters:
      rate - annual discount rate (e.g., 0.10 for 10%)
      Returns:
      this scheduler for chaining
    • setOperatingCost

      public FieldProductionScheduler setOperatingCost(double cost, String unit)
      Sets the annual operating cost.
      Parameters:
      cost - annual operating cost
      unit - currency unit (for documentation)
      Returns:
      this scheduler for chaining
    • setRespectFacilityConstraints

      public FieldProductionScheduler setRespectFacilityConstraints(boolean respect)
      Sets whether to respect facility constraints during scheduling.
      Parameters:
      respect - true to respect constraints
      Returns:
      this scheduler for chaining
    • setTrackReservoirDepletion

      public FieldProductionScheduler setTrackReservoirDepletion(boolean track)
      Sets whether to track reservoir depletion dynamically.
      Parameters:
      track - true to run reservoir transient simulation
      Returns:
      this scheduler for chaining
    • setLowPressureLimit

      public FieldProductionScheduler setLowPressureLimit(double pressure)
      Sets the low pressure limit for reservoir abandonment.
      Parameters:
      pressure - minimum reservoir pressure (bara)
      Returns:
      this scheduler for chaining
    • generateSchedule

      public FieldProductionScheduler.ProductionSchedule generateSchedule(LocalDate startDate, double durationYears, double timeStepDays)
      Generates a production schedule for the field.
      Parameters:
      startDate - schedule start date
      durationYears - forecast duration in years
      timeStepDays - time step in days
      Returns:
      production schedule
    • convertRate

      private double convertRate(double value, String fromUnit, String toUnit)
      Converts rate between units.
      Parameters:
      value - rate value
      fromUnit - source unit
      toUnit - target unit
      Returns:
      converted rate
    • calculateRevenue

      private double calculateRevenue(double gasRate, double oilRate, double days)
      Calculates revenue for a period.
      Parameters:
      gasRate - gas rate (Sm3/day)
      oilRate - oil rate (Sm3/day)
      days - period duration in days
      Returns:
      revenue in currency units
    • getName

      public String getName()
      Gets the field name.
      Returns:
      field name
    • getReservoirs

      Gets the list of reservoirs.
      Returns:
      unmodifiable list of reservoir records
    • getFacility

      public ProcessSystem getFacility()
      Gets the facility process system.
      Returns:
      facility or null if not set
    • getWellScheduler

      public WellScheduler getWellScheduler()
      Gets the well scheduler.
      Returns:
      well scheduler or null if not set