vtk Readers
This package defines vtk readers that allows to load Geos output files.
geos_posp.readers.GeosLogReaderAquifers module
- class geos_posp.readers.GeosLogReaderAquifers.GeosLogReaderAquifers(filepath, propertiesUnit)[source]
Bases:
object
Reader for Aquifer.
- Parameters:
filepath (str) – path to geos log file.
propertiesUnit (dict[str, Unit]) – unit preferences
- createDataframe()[source]
Create and fill and return dataframeAquifers.
- Returns:
dataframe with values from Geos log.
- Return type:
pd.DataFrame
- readAll(filepath)[source]
Initialize all the attributes of the class by reading a Geos log file.
- Parameters:
filepath (str) – Geos log filepath.
- readAquiferNames(file)[source]
Initialize the m_aquiferNames attribute by reading log file.
- Parameters:
file (TextIOBase) – Geos Log file
- Returns:
The last line with time info read. The id of the last line read that contained the tag “_pressureInfluence_table”., which will be the line containing the first positive timestep at 0s.
- Return type:
tuple(str, int)
- readPropertiesValues(file, line, id_line, total_lines)[source]
Read aquifer property values from geos log file.
Initialize the m_aquifersPropertiesValues and m_timesteps attributes by reading the Geos log. If a timestep contains the tag m_computeStatisticsName, the current timestep is added to m_timesteps and we recover the property values in m_regionsPropertiesValues.
- Parameters:
file (TextIOBase) – Geos Log file
line (str) – last line read in the file.
id_line (int) – The id of the last line read in readPhaseNames.
total_lines (int) – The number of lines in the file.
geos_posp.readers.GeosLogReaderConvergence module
- class geos_posp.readers.GeosLogReaderConvergence.GeosLogReaderConvergence(filepath, propertiesUnit)[source]
Bases:
object
Reader for Convergence information.
- Parameters:
filepath (str) – path to geos log file.
propertiesUnit (dict[str, Unit]) – unit preferences
- createDataframe()[source]
Create and fill and return dataframeSolversIterations.
- Returns:
dataframe with values from Geos log.
- Return type:
pd.DataFrame
- readAll(filepath)[source]
Initialize all the attributes of the class by reading a Geos log file.
- Parameters:
filepath (str) – Geos log filepath.
- readIterationsValues(file, total_lines)[source]
Read iteration values from Geos log file.
Initialize the m_aquifersPropertiesValues and m_timesteps attributes by reading the Geos log. If a timestep contains the tag m_computeStatisticsName, the current timestep is added to m_timesteps and we recover the property values in m_regionsPropertiesValues.
- Parameters:
file (TextIOBase) – Geos Log file
total_lines (int) – The number of lines in the file.
geos_posp.readers.GeosLogReaderFlow module
- class geos_posp.readers.GeosLogReaderFlow.GeosLogReaderFlow(filepath, propertiesUnit, phaseNames=None)[source]
Bases:
object
A reader that reads .txt and .out files containing Geos logs.
To do that, we use specific tags in the current version of this code. Supposed tags are:
- for region names: “Adding Object CellElementRegion” Supposed
line:”Adding Object CellElementRegion named Reservoir from ObjectManager::Catalog”.
- for phase names: “phaseModel” Supposed line: “ TableFunction:
fluid_phaseModel1_PhillipsBrineDensity_table”.
for timesteps: “Time:” Supposed line: “Time: 0s, dt:100s, Cycle: 0”.
- for CFL properties: “CFL”. Supposed line: “compflowStatistics: Max
phase CFL number: 0.00696878”
Another important tag in the log will be the name of the flow statistics model used to output 2D data in the Geos Log. This one will be found automatically. The flow statistics model that can output flow data are:
“SinglePhaseStatistics”.
“CompositionalMultiphaseStatistics”.
- Parameters:
filepath (str) – path to Geos log file
propertiesUnit (dict[str, Unit]) – unit preferences
phaseNames (list[str], optional) –
Name of the phases.
Defaults to [].
- createDataframe()[source]
Create and fill and return dataframeFlow.
- Returns:
dataframe with values from Geos log.
- Return type:
pd.DataFrame
- readAll(filepath)[source]
Initialize all the attributes of the class by reading a Geos log file.
- Parameters:
filepath (str) – Geos log filepath.
- readComputeStatisticsName(file, id_line, total_lines)[source]
Read flow statistics from the Geos log file.
- Parameters:
file (TextIOBase) – Geos Log file
id_line (int) – The id of the last line read in readPhaseNames.
total_lines (int) – total number of lines in the file.
- Returns:
Tuple containingt the id of the last line read and the line.
- Return type:
tuple[int, str]
- readPropertiesValues(file, id_line, total_lines, lineTagStats)[source]
Read property values from Geos log file.
Initialize the m_regionsPropertiesValues and m_timesteps attributes by reading the Geos log. If a timestep contains the tag m_computeStatisticsName, the current timestep is added to m_timesteps and we recover the property values in m_regionsPropertiesValues.
- Parameters:
file (TextIOBase) – Geos Log file
id_line (int) – The id of the last line read in readPhaseNames.
total_lines (int) – The number of lines in the file.
lineTagStats (str) – The first line containing the tag of the flow statistics model.
geos_posp.readers.GeosLogReaderWells module
- class geos_posp.readers.GeosLogReaderWells.GeosLogReaderWells(filepath, propertiesUnit, phaseNames=None, numberWellsForMean=1)[source]
Bases:
object
Read for Wells from Geos log file.
To do that, we use specific tags in the current version of this code. Supposed tags are :
- for well names“Adding object WellElementRegion”
and “_ConstantBHP_table” Supposed lines: “Adding Object WellElementRegion named wellRegion1 from ObjectManager::Catalog”. “ TableFunction: wellControls1_ConstantBHP_table”.
- for phase names: “phaseModel”
Supposed line: “ TableFunction: fluid_phaseModel1_PhillipsBrineDensity_table”.
- for timesteps: “Time:”
Supposed line : “Time: 0s, dt:100s, Cycle: 0” When it comes to well properties, special tags are used : “ BHP “ ; “ total rate” ; “ total surface volumetric rate” ; “phase surface volumetric rate” ; “well is shut” ; “density of phase” ; “total fluid density”.
- Parameters:
filepath (str) – path of Geos log file
propertiesUnit (dict[str, Unit]) – unit preferences
phaseNames (list[str] | None, optional) –
Name of the phases.
Defaults to None.
numberWellsForMean (int, optional) – Number of wells. Defaults to 1.
- createDataframe()[source]
Create and fill and return dataframeWells.
- Returns:
dataframe with log values.
- Return type:
pd.DataFrame
- readAll(filepath)[source]
Initialize all the attributes of the class by reading a Geos log file.
- Parameters:
filepath (str) – Geos log filepath.
singlephase (bool) – True if its a singlephase simulation, False if multiphase.
- readPropertiesValues(file, id_line, total_lines)[source]
Read property values from Geos log file.
Initialize the m_regionsPropertiesValues and m_timesteps attributes by reading the Geos log. If a timestep contains the tag m_computeStatisticsName, the current timestep is added to m_timesteps and we recover the property values in m_regionsPropertiesValues.
- Parameters:
file (TextIOBase) – Geos Log file
id_line (int) – The id of the last line read in readPhaseNames.
total_lines (int) – The number of lines in the file.