CO2-Brine Model PVT Parameter Files Replaced by XML Attributes #4022
dkachuma
started this conversation in
Capability/Feature Development
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
CO2-Brine Model PVT Parameter Files Replaced by XML Attributes
Description of the Breaking Change
This is a discussion about #3777
This update removes the requirement for external text parameter files (
phasePVTParaFilesandflashModelParaFile) for CO2-Brine fluid modelsCO2BrinePhillipsFluid,CO2BrineEzrokhiFluid,CO2BrinePhillipsThermalFluid, andCO2BrineEzrokhiThermalFluid. All parameters, including table ranges, discretization intervals, salinity, and model coefficients, are now specified directly within the XML input file. There is no need to specify external files (usuallypvtgas.txt,pvtliquid.txt,co2flash.txt). This is a breaking change. Existing input files that reference those parameter files will no longer work and must be updated.Key Changes
phasePVTParaFilesandflashModelParaFileare removed. They are replaced by attributes likepressureCoordinates,pressureInterval,temperatureCoordinates, andtemperatureInterval.DuanSun(default),SpycherPruess, andTables.1. Pressure and Temperature Table Points
Previously, the pressure and temperature discretization for each of the three model files was specified independently. Now a single common set of points is defined directly on the fluid XML element and applies to all internal tables (CO2 density, CO2 viscosity, brine density, brine viscosity, CO2 solubility).
The new attributes are:
pressureCoordinatespressureIntervalis positive, only the first and last values are used as bounds; intermediate values are ignored.pressureIntervaltemperatureCoordinatestemperatureIntervalTwo modes of grid specification are supported:
*Coordinatesand a positive*Interval. Points are generated asx_i = min + i * intervalup tomax.*Intervalto 0 (or omit it) and list all desired points explicitly in*Coordinates. This is useful for non-uniform grids such as logarithmic spacing.Example: Uniform grid (from
thermalLeakyWell)Old
pvtgas.txt:Old
pvtliquid.txt:Old
co2flash.txt:New XML:
Example: Explicit (non-uniform) grid points
Note: when
pressureIntervalis omitted (or zero), the full list of values inpressureCoordinatesis used directly as the grid points.2. Salinity
Previously, salinity was embedded as the trailing value on lines in
pvtliquid.txtandco2flash.txt:Old
pvtliquid.txt:Old
co2flash.txt:Now it is specified with the
salinityattribute (in moles of NaCl per kg of brine). The default is 0, sosalinity="0"may be omitted:Only a single salinity value can be specified and it will apply to all the functions CO2 solubility, brine density and brine viscosity.
3. Solubility Model Selection
A new
solubilityModelattribute allows explicit selection of the CO2 solubility model. The available options areDuanSun(default),SpycherPruess, andTables.3.1 Duan and Sun (default)
This is the default and does not need to be set explicitly. CO2 solubility in brine is computed; water vaporization into the gas phase is zero.
Old
co2flash.txt:New XML (equivalent
solubilityModelomitted asDuanSunis the default):3.2 Spycher and Pruess
This model accounts for both CO2 solubility in brine and water vaporization into the gas phase. Previously it was selected via a trailing keyword in the flash file:
Old
co2flash_thermal_Spycher.txt:New XML:
3.3 Tables (user-supplied solubility tables)
When
solubilityModel="Tables"is set, solubility data is read from externally generated lookup tables provided asTableFunctionXML elements. The table names are referenced via thesolubilityTableNamesattribute.Each table must be a
TableFunctionwithinputVarNames="{ pressure, temperature }", with coordinates provided viacoordinateFilesand values viavoxelFile.New XML:
Where
pres.txtandtemp.txtcontain the pressure and temperature coordinate values respectively, andco2Solubility.txtandh20Vapourisation.txtcontain the corresponding solubility values on the 2D grid (in row-major order).Note: When using
solubilityModel="Tables", thepressureCoordinates/temperatureCoordinatesattributes still control the grid for the CO2 and brine property tables (density, viscosity). The solubility coordinate grid is defined by the coordinate files inside theTableFunctionelements.4. Phillips Brine Density and Viscosity Model
The
CO2BrinePhillipsFluid(and its thermal variantCO2BrinePhillipsThermalFluid) use the Phillips et al. (1981) correlation for brine density and viscosity. No additional coefficients need to be specified beyond salinity and the common pressure/temperature grid.Old
pvtliquid.txt:New XML (using
CO2BrinePhillipsFluid):5. Ezrokhi Brine Density and Viscosity Model
The
CO2BrineEzrokhiFluid(andCO2BrineEzrokhiThermalFluid) use the Ezrokhi correlation (Zaytsev and Aseyev, 1993) to correct pure water density and viscosity for salinity and dissolved CO2. This requires three empirical coefficients for each.ezrokhiDensityCoefficients{a0, a1, a2}for the density correctionA(T) = a0 + a1*T + a2*T^2ezrokhiViscosityCoefficients{b0, b1, b2}for the viscosity correctionB(T) = b0 + b1*T + b2*T^2(defaults to{0, 0, 0})Old
pvtliquid_ez.txt:New XML:
6. Common Pressure and Temperature Grid: Migration Guidance
This is the most impactful change for results.
Previously, the three parameter files (
pvtgas.txt,pvtliquid.txt,co2flash.txt) each independently defined their own pressure and temperature ranges and step sizes. Now a single common grid is used for all properties (CO2 density, CO2 viscosity, brine density, brine viscosity, CO2 solubility).Case 1: All files had the same ranges
When all three old files used identical pressure and temperature ranges and step sizes, migration is straightforward, read the values directly from any of the three files and use them in the new attributes.
Example from
thermalLeakyWell(all files matched):Old
pvtgas.txt:Old
pvtliquid.txt:Old
co2flash.txt:All three used pressure
[6.6e6, 4e7]step1e6and temperature[302.0, 312.0]step5: use them directly:Case 2: Files had different ranges
When the old files used different ranges, you must choose a combined grid that covers all of them. The strategy is to take the widest range across all three files to ensure that no pressure or temperature value encountered during the simulation falls outside the table bounds. At the same time, avoid an unnecessarily fine step size, as a finer grid increases memory usage and initialization time.
A real example of this is the
gravitySegregationcase. The old files were:Old
pvtgas.txt:Old
pvtliquid.txt:Old
co2flash.txt:The pressure minimum differs:
pvtgas.txtandpvtliquid.txtstarted at1e6Pa, whileco2flash.txtstarted at5e5Pa. The temperature range and step were identical across all three. To cover all cases the widest pressure range must be used, taking5e5as the lower bound:Note: Because the grid is now shared, results may differ slightly from previous runs even when the ranges were the same, if any of the old files used different step sizes for different properties. This is expected and is a consequence of the unified discretization approach.
Important: GEOS uses constant extrapolation when pressure or temperature exceed the table bounds, without issuing a warning. Always choose bounds that fully cover the expected pressure and temperature range of your simulation, including in wells.
Beta Was this translation helpful? Give feedback.
All reactions