Class CMGEOSExporter
java.lang.Object
neqsim.blackoil.io.CMGEOSExporter
CMG (Computer Modelling Group) reservoir simulator EOS/PVT exporter.
Exports NeqSim compositional fluids or Black-Oil PVT tables to CMG-compatible format for use in IMEX, GEM, and STARS simulators.
Supported CMG Keywords
- PVTG - Gas PVT table
- PVTO - Oil PVT table
- PVTW - Water PVT properties
- DENSITY - Stock tank densities
- BWI/CW/VW - Water properties
Usage Example
SystemInterface fluid = new SystemSrkEos(373.15, 200.0);
fluid.addComponent("methane", 0.7);
fluid.addComponent("n-heptane", 0.3);
fluid.setMixingRule("classic");
CMGEOSExporter.toFile(fluid, Path.of("PVT.DAT"), CMGEOSExporter.Simulator.IMEX);
- Version:
- 1.0
- Author:
- esol
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classConfiguration for CMG export.static enumCMG Simulator target.private static classSimple Writer implementation that writes to a StringBuilder.static enumUnit system for CMG export. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static double[]generateDefaultPressureGrid(double referencePressure) generateTablePressures(double bubblePoint, CMGEOSExporter.ExportConfig config) static voidtoFile(BlackOilPVTTable pvt, double rhoOilSc, double rhoGasSc, double rhoWaterSc, Path outputPath) Export a Black-Oil PVT table to a CMG file.static voidtoFile(BlackOilPVTTable pvt, double rhoOilSc, double rhoGasSc, double rhoWaterSc, Path outputPath, CMGEOSExporter.ExportConfig config) Export a Black-Oil PVT table to a CMG file.static voidtoFile(SystemInterface fluid, Path outputPath) Export a compositional fluid to a CMG file using default settings.static voidtoFile(SystemInterface fluid, Path outputPath, CMGEOSExporter.ExportConfig config) Export a compositional fluid to a CMG file.static voidtoFile(SystemInterface fluid, Path outputPath, CMGEOSExporter.Simulator simulator) Export a compositional fluid to a CMG file for a specific simulator.static StringtoString(BlackOilPVTTable pvt, double rhoOilSc, double rhoGasSc, double rhoWaterSc) Export a Black-Oil PVT table to a CMG format string.static StringtoString(BlackOilPVTTable pvt, double rhoOilSc, double rhoGasSc, double rhoWaterSc, CMGEOSExporter.ExportConfig config) Export a Black-Oil PVT table to a CMG format string.static StringtoString(SystemInterface fluid) Export a compositional fluid to a CMG format string.static StringtoString(SystemInterface fluid, CMGEOSExporter.ExportConfig config) Export a compositional fluid to a CMG format string.private static voidtoWriter(SystemInterface fluid, Writer writer, CMGEOSExporter.ExportConfig config) private static voidwriteGEMFormat(BufferedWriter bw, BlackOilPVTTable pvt, double rhoOilSc, double rhoGasSc, double rhoWaterSc, List<Double> pressurePoints, double bubblePoint, double pFactor, double rhoFactor, double rsFactor, double viscFactor, String pUnit, String rhoUnit, String rsUnit, String viscUnit) private static voidwriteIMEXFormat(BufferedWriter bw, BlackOilPVTTable pvt, double rhoOilSc, double rhoGasSc, double rhoWaterSc, List<Double> pressurePoints, double bubblePoint, double pFactor, double rhoFactor, double rsFactor, double viscFactor, String pUnit, String rhoUnit, String rsUnit, String viscUnit) private static voidwritePVTTable(BlackOilPVTTable pvt, double rhoOilSc, double rhoGasSc, double rhoWaterSc, Writer writer, CMGEOSExporter.ExportConfig config) private static voidwriteSTARSFormat(BufferedWriter bw, BlackOilPVTTable pvt, double rhoOilSc, double rhoGasSc, double rhoWaterSc, List<Double> pressurePoints, double bubblePoint, double pFactor, double rhoFactor, double rsFactor, double viscFactor, String pUnit, String rhoUnit, String rsUnit, String viscUnit)
-
Constructor Details
-
CMGEOSExporter
private CMGEOSExporter()
-
-
Method Details
-
toFile
Export a compositional fluid to a CMG file using default settings.- Parameters:
fluid- NeqSim compositional fluidoutputPath- output file path- Throws:
IOException- if writing fails
-
toFile
public static void toFile(SystemInterface fluid, Path outputPath, CMGEOSExporter.Simulator simulator) throws IOException Export a compositional fluid to a CMG file for a specific simulator.- Parameters:
fluid- NeqSim compositional fluidoutputPath- output file pathsimulator- target CMG simulator- Throws:
IOException- if writing fails
-
toFile
public static void toFile(SystemInterface fluid, Path outputPath, CMGEOSExporter.ExportConfig config) throws IOException Export a compositional fluid to a CMG file.- Parameters:
fluid- NeqSim compositional fluidoutputPath- output file pathconfig- export configuration- Throws:
IOException- if writing fails
-
toString
Export a compositional fluid to a CMG format string.- Parameters:
fluid- NeqSim compositional fluid- Returns:
- CMG format content
-
toString
Export a compositional fluid to a CMG format string.- Parameters:
fluid- NeqSim compositional fluidconfig- export configuration- Returns:
- CMG format 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 a CMG file.- Parameters:
pvt- Black-Oil PVT tablerhoOilSc- 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, CMGEOSExporter.ExportConfig config) throws IOException Export a Black-Oil PVT table to a CMG file.- Parameters:
pvt- Black-Oil PVT tablerhoOilSc- 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 pathconfig- 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 a CMG format string.- Parameters:
pvt- Black-Oil PVT tablerhoOilSc- oil density at standard conditions (kg/m³)rhoGasSc- gas density at standard conditions (kg/m³)rhoWaterSc- water density at standard conditions (kg/m³)- Returns:
- CMG format content
-
toString
public static String toString(BlackOilPVTTable pvt, double rhoOilSc, double rhoGasSc, double rhoWaterSc, CMGEOSExporter.ExportConfig config) Export a Black-Oil PVT table to a CMG format string.- Parameters:
pvt- Black-Oil PVT tablerhoOilSc- 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:
- CMG format content
-
toWriter
private static void toWriter(SystemInterface fluid, Writer writer, CMGEOSExporter.ExportConfig config) throws IOException - Throws:
IOException
-
writePVTTable
private static void writePVTTable(BlackOilPVTTable pvt, double rhoOilSc, double rhoGasSc, double rhoWaterSc, Writer writer, CMGEOSExporter.ExportConfig config) throws IOException - Throws:
IOException
-
writeIMEXFormat
private static void writeIMEXFormat(BufferedWriter bw, BlackOilPVTTable pvt, double rhoOilSc, double rhoGasSc, double rhoWaterSc, List<Double> pressurePoints, double bubblePoint, double pFactor, double rhoFactor, double rsFactor, double viscFactor, String pUnit, String rhoUnit, String rsUnit, String viscUnit) throws IOException - Throws:
IOException
-
writeGEMFormat
private static void writeGEMFormat(BufferedWriter bw, BlackOilPVTTable pvt, double rhoOilSc, double rhoGasSc, double rhoWaterSc, List<Double> pressurePoints, double bubblePoint, double pFactor, double rhoFactor, double rsFactor, double viscFactor, String pUnit, String rhoUnit, String rsUnit, String viscUnit) throws IOException - Throws:
IOException
-
writeSTARSFormat
private static void writeSTARSFormat(BufferedWriter bw, BlackOilPVTTable pvt, double rhoOilSc, double rhoGasSc, double rhoWaterSc, List<Double> pressurePoints, double bubblePoint, double pFactor, double rhoFactor, double rsFactor, double viscFactor, String pUnit, String rhoUnit, String rsUnit, String viscUnit) throws IOException - Throws:
IOException
-
generateTablePressures
private static List<Double> generateTablePressures(double bubblePoint, CMGEOSExporter.ExportConfig config) -
generateDefaultPressureGrid
private static double[] generateDefaultPressureGrid(double referencePressure)
-