Class ReservoirCouplingExporter

java.lang.Object
neqsim.process.fielddevelopment.reservoir.ReservoirCouplingExporter
All Implemented Interfaces:
Serializable

public class ReservoirCouplingExporter extends Object implements Serializable
Exports time-series data for reservoir simulator coupling (E300/ECLIPSE).

Generates VFP tables, separator efficiency curves, and schedule keywords for coupling NeqSim process models with reservoir simulators. Supports both Eclipse 100 and E300 (compositional) formats.

Export Capabilities

  • VFP Tables: Vertical flow performance for wells (VFPPROD/VFPINJ)
  • Separator Efficiency: Oil/gas/water split ratios vs conditions
  • Compression Curves: Power vs rate and suction pressure
  • Network Deliverability: Platform capacity constraints
  • Schedule Keywords: Time-varying constraints

Example Usage

// Create exporter
ReservoirCouplingExporter exporter = new ReservoirCouplingExporter(processSystem);

// Configure VFP table generation
exporter.setWellheadPressureRange(20.0, 100.0, 9); // 20-100 bara, 9 points
exporter.setGasRateRange(0.1e6, 10.0e6, 10); // 0.1-10 MSm3/d
exporter.setWaterCutRange(0.0, 0.95, 6); // 0-95% water cut

// Generate VFP tables
exporter.generateVfpProd("WELL-1", wellStream, 1);

// Export to file
exporter.exportToFile("vfp_tables.inc");

// Or get as string for E300 INCLUDE
String vfpKeywords = exporter.getEclipseKeywords();
Version:
1.0
Author:
ESOL
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • logger

      private static final org.apache.logging.log4j.Logger logger
      Logger instance.
    • processSystem

      private ProcessSystem processSystem
      Process system for calculations.
    • format

      Export format.
    • vfpTables

      Generated VFP tables.
    • scheduleEntries

      Schedule entries.
    • keywordsBuffer

      private StringBuilder keywordsBuffer
      Generated keywords buffer.
    • pressureRange

      private double[] pressureRange
    • rateRange

      private double[] rateRange
    • wctRange

      private double[] wctRange
    • gorRange

      private double[] gorRange
    • datumDepth

      private double datumDepth
      Datum depth for VFP tables (m).
  • Constructor Details

    • ReservoirCouplingExporter

      public ReservoirCouplingExporter(ProcessSystem processSystem)
      Creates a new exporter for the given process system.
      Parameters:
      processSystem - the process system
    • ReservoirCouplingExporter

      public ReservoirCouplingExporter()
      Creates a new standalone exporter.
  • Method Details

    • setFormat

      public void setFormat(ReservoirCouplingExporter.ExportFormat format)
      Set export format.
      Parameters:
      format - the format
    • setPressureRange

      public void setPressureRange(double minBar, double maxBar, int points)
      Set wellhead/tubing pressure range for VFP generation.
      Parameters:
      minBar - minimum pressure (bara)
      maxBar - maximum pressure (bara)
      points - number of points
    • setRateRange

      public void setRateRange(double minRate, double maxRate, int points)
      Set flow rate range for VFP generation.
      Parameters:
      minRate - minimum rate (Sm3/d for liquid, MSm3/d for gas)
      maxRate - maximum rate
      points - number of points
    • setWctRange

      public void setWctRange(double minWct, double maxWct, int points)
      Set water cut range for VFP generation.
      Parameters:
      minWct - minimum water cut (0-1)
      maxWct - maximum water cut (0-1)
      points - number of points
    • setGorRange

      public void setGorRange(double minGor, double maxGor, int points)
      Set GOR range for VFP generation.
      Parameters:
      minGor - minimum GOR (Sm3/Sm3)
      maxGor - maximum GOR (Sm3/Sm3)
      points - number of points
    • setDatumDepth

      public void setDatumDepth(double depth)
      Set datum depth for VFP tables.
      Parameters:
      depth - datum depth in meters
    • generateVfpProd

      public ReservoirCouplingExporter.VfpTable generateVfpProd(String wellName, SystemInterface baseFluid, int tableNumber)
      Generate VFPPROD table for a producing well.

      Creates a multi-dimensional VFP table mapping (rate, THP, WCT, GOR) to BHP using the process model for pressure drop calculations.

      Parameters:
      wellName - well name
      baseFluid - base fluid composition
      tableNumber - VFP table number (1-9999)
      Returns:
      the generated VFP table
    • generateVfpInj

      public ReservoirCouplingExporter.VfpTable generateVfpInj(String wellName, SystemInterface injectionFluid, int tableNumber)
      Generate VFPINJ table for an injection well.
      Parameters:
      wellName - well name
      injectionFluid - injection fluid (water or gas)
      tableNumber - VFP table number
      Returns:
      the generated VFP table
    • calculateBhp

      private double calculateBhp(SystemInterface fluid, double rate, double thp, double wct, double gor)
      Calculate BHP from THP using process model.
    • calculateInjectionBhp

      private double calculateInjectionBhp(SystemInterface fluid, double rate, double thp)
      Calculate injection BHP.
    • addGroupConstraint

      public void addGroupConstraint(Date date, String groupName, double oilRate, double gasRate, double waterRate)
      Add a platform rate constraint.
      Parameters:
      date - effective date
      groupName - group/platform name
      oilRate - oil rate limit (Sm3/d)
      gasRate - gas rate limit (Sm3/d)
      waterRate - water injection rate limit (Sm3/d)
    • addWellControl

      public void addWellControl(Date date, String wellName, String controlMode, double targetValue)
      Add well control mode change.
      Parameters:
      date - effective date
      wellName - well name
      controlMode - control mode (ORAT, GRAT, LRAT, RESV, BHP)
      targetValue - target value
    • addVfpReference

      public void addVfpReference(Date date, String wellName, int vfpTableNumber)
      Add VFP table reference for a well.
      Parameters:
      date - effective date
      wellName - well name
      vfpTableNumber - VFP table number
    • appendVfpProdKeyword

      private void appendVfpProdKeyword(ReservoirCouplingExporter.VfpTable vfp)
      Append VFPPROD keyword to buffer.
    • appendVfpInjKeyword

      private void appendVfpInjKeyword(ReservoirCouplingExporter.VfpTable vfp)
      Append VFPINJ keyword to buffer.
    • exportSeparatorEfficiency

      public String exportSeparatorEfficiency(String separatorName, double[] pressurePoints, double[] temperaturePoints)
      Export separator efficiency curves for E300 coupling.
      Parameters:
      separatorName - separator equipment name
      pressurePoints - pressure points to evaluate (bara)
      temperaturePoints - temperature points to evaluate (K)
      Returns:
      CSV data string
    • getEclipseKeywords

      public String getEclipseKeywords()
      Get all generated Eclipse keywords.
      Returns:
      keywords string
    • exportToFile

      public void exportToFile(String filePath) throws IOException
      Export to file.
      Parameters:
      filePath - output file path
      Throws:
      IOException - if write fails
    • exportProductionForecastCsv

      public String exportProductionForecastCsv(int[] years, double[] oilRates, double[] gasRates, double[] waterRates)
      Export production forecast to CSV for import to other tools.
      Parameters:
      years - forecast years
      oilRates - oil rates by year (Sm3/d)
      gasRates - gas rates by year (Sm3/d)
      waterRates - water rates by year (Sm3/d)
      Returns:
      CSV string
    • linspace

      private double[] linspace(double start, double end, int points)
      Generate linearly spaced array.
    • clear

      public void clear()
      Clear all generated content.
    • getVfpTables

      public List<ReservoirCouplingExporter.VfpTable> getVfpTables()
      Get generated VFP tables.
      Returns:
      list of VFP tables