Class EclipseEOSExporter

java.lang.Object
neqsim.blackoil.io.EclipseEOSExporter

public final class EclipseEOSExporter extends Object
Eclipse reservoir simulator EOS/PVT keyword exporter.

Exports NeqSim compositional fluids or Black-Oil PVT tables to Eclipse-compatible include files containing PVTO, PVTG, PVTW, and DENSITY keywords.

Supported Eclipse Keywords

  • PVTO - Live oil PVT table (Rs, P, Bo, viscosity)
  • PVTG - Wet gas PVT table (Rv, P, Bg, viscosity)
  • PVTW - Water PVT properties
  • DENSITY - Stock tank densities
  • PVCO - Alternative compressed oil format

Usage Example


SystemInterface fluid = new SystemSrkEos(373.15, 200.0);
fluid.addComponent("methane", 0.7);
fluid.addComponent("n-heptane", 0.3);
fluid.setMixingRule("classic");

EclipseEOSExporter.toFile(fluid, Path.of("PVT.INC"));

Version:
1.0
Author:
esol
See Also:
  • Constructor Details

    • EclipseEOSExporter

      private EclipseEOSExporter()
  • Method Details

    • toFile

      public static void toFile(SystemInterface fluid, Path outputPath) throws IOException
      Export a compositional fluid to an Eclipse include file using default settings.
      Parameters:
      fluid - NeqSim compositional fluid
      outputPath - output file path
      Throws:
      IOException - if writing fails
    • toFile

      public static void toFile(SystemInterface fluid, Path outputPath, EclipseEOSExporter.ExportConfig config) throws IOException
      Export a compositional fluid to an Eclipse include file.
      Parameters:
      fluid - NeqSim compositional fluid
      outputPath - output file path
      config - export configuration
      Throws:
      IOException - if writing fails
    • toString

      public static String toString(SystemInterface fluid)
      Export a compositional fluid to an Eclipse format string.
      Parameters:
      fluid - NeqSim compositional fluid
      Returns:
      Eclipse include file content
    • toString

      public static String toString(SystemInterface fluid, EclipseEOSExporter.ExportConfig config)
      Export a compositional fluid to an Eclipse format string.
      Parameters:
      fluid - NeqSim compositional fluid
      config - export configuration
      Returns:
      Eclipse include file content
    • toFile

      public static void toFile(BlackOilPVTTable pvt, double rhoOilSc, double rhoGasSc, double rhoWaterSc, Path outputPath) throws IOException
      Export a Black-Oil PVT table to an Eclipse include file.
      Parameters:
      pvt - Black-Oil PVT table
      rhoOilSc - oil density at standard conditions (kg/m³)
      rhoGasSc - gas density at standard conditions (kg/m³)
      rhoWaterSc - water density at standard conditions (kg/m³)
      outputPath - output file path
      Throws:
      IOException - if writing fails
    • toFile

      public static void toFile(BlackOilPVTTable pvt, double rhoOilSc, double rhoGasSc, double rhoWaterSc, Path outputPath, EclipseEOSExporter.ExportConfig config) throws IOException
      Export a Black-Oil PVT table to an Eclipse include file.
      Parameters:
      pvt - Black-Oil PVT table
      rhoOilSc - oil density at standard conditions (kg/m³)
      rhoGasSc - gas density at standard conditions (kg/m³)
      rhoWaterSc - water density at standard conditions (kg/m³)
      outputPath - output file path
      config - export configuration
      Throws:
      IOException - if writing fails
    • toString

      public static String toString(BlackOilPVTTable pvt, double rhoOilSc, double rhoGasSc, double rhoWaterSc)
      Export a Black-Oil PVT table to an Eclipse format string.
      Parameters:
      pvt - Black-Oil PVT table
      rhoOilSc - oil density at standard conditions (kg/m³)
      rhoGasSc - gas density at standard conditions (kg/m³)
      rhoWaterSc - water density at standard conditions (kg/m³)
      Returns:
      Eclipse include file content
    • toString

      public static String toString(BlackOilPVTTable pvt, double rhoOilSc, double rhoGasSc, double rhoWaterSc, EclipseEOSExporter.ExportConfig config)
      Export a Black-Oil PVT table to an Eclipse format string.
      Parameters:
      pvt - Black-Oil PVT table
      rhoOilSc - oil density at standard conditions (kg/m³)
      rhoGasSc - gas density at standard conditions (kg/m³)
      rhoWaterSc - water density at standard conditions (kg/m³)
      config - export configuration
      Returns:
      Eclipse include file content
    • toWriter

      private static void toWriter(SystemInterface fluid, Writer writer, EclipseEOSExporter.ExportConfig config) throws IOException
      Throws:
      IOException
    • writePVTTable

      private static void writePVTTable(BlackOilPVTTable pvt, double rhoOilSc, double rhoGasSc, double rhoWaterSc, Writer writer, EclipseEOSExporter.ExportConfig config) throws IOException
      Throws:
      IOException
    • generateTablePressures

      private static List<Double> generateTablePressures(double bubblePoint, EclipseEOSExporter.ExportConfig config)
    • generateDefaultPressureGrid

      private static double[] generateDefaultPressureGrid(double referencePressure)