Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Refactor log & CSV statistics #3406

Open
wants to merge 343 commits into
base: develop
Choose a base branch
from

Conversation

arng40
Copy link
Contributor

@arng40 arng40 commented Oct 21, 2024

This PR aims to improve log statitistics by using tables.
Additionally, the table log output now includes enhanced features for greater flexibility:

  • Possibility to add sub-columns,
  • Support for merging cells in data,
  • Possibility to add separators.

Allowing this kind of output:

             ----------------------------------------------------------------------------
             |  Cras egestas  |  CoordX  |  C   |    CoordZ     |   Prev    |   Next    |
             |                |          |      |               |  element  |  element  |
             ----------------------------------------------------------------------------
             |      ProductA  |    1234  |  40  |  ProductName  |     5678  |       60  |
             ----------------------------------------------------------------------------
             |            P1  |    2002  |                3003  |     4004  |           |
             |            P2  |    2003  |                      |           |           |
             |            P3  |    2004  |                      |           |           |
             |          3.14  |   2.718  |               1.618  |    0.577  |           |
             ----------------------------------------------------------------------------
             |                                                                   Item2  |
             ----------------------------------------------------------------------------
             |          1500  |    2500  |                                              |
             ----------------------------------------------------------------------------
             |          1.23  |    4.56  |                7.89  |     0.12  |       40  |
             ----------------------------------------------------------------------------
             |         Alpha  |    1001  |   8  |         Beta  |     2002  |           |
             |                |          |      |        water  |      1.0  |           |
             ----------------------------------------------------------------------------

Statitistics output improves, for SinglePhaseStatistics for instance:

SinglePhaseFlowStatistics, Channel (time 5000 s): Pressure (min, average, max): -3780035.4055568296, 150575.0804809972, 6003777.073592767 Pa
SinglePhaseFlowStatistics, Channel (time 5000 s): Delta pressure (min, max): -3780035.4055568296, 6003777.073592767 Pa
SinglePhaseFlowStatistics, Channel (time 5000 s): Temperature (min, average, max): 0, 0, 0 K
SinglePhaseFlowStatistics, Channel (time 5000 s): Total dynamic pore volume: 50.007528754192336 rm^3
SinglePhaseFlowStatistics, Channel (time 5000 s): Total fluid mass: 50011.30583965373 kg
-----------------------------------------------------------------------------------------------------------------
|                                   compflowStatistics, leakyWell (time 1 s):                                   |
-----------------------------------------------------------------------------------------------------------------
|              statistics               |         min          |       average        |           max           |
-----------------------------------------------------------------------------------------------------------------
|                         Pressure[Pa]  |   6852287.971327121  |   7668119.995536645  |      8491215.639425274  |
|                  Delta pressure [Pa]  |                   0  |                   /  |                      0  |
|                      Temperature [K]  |  302.39500000000004  |  304.74998595102636  |     307.12749999999994  |
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
|                           statistics  |               phase  |                                         value  |
-----------------------------------------------------------------------------------------------------------------
|     Total dynamic pore volume [rm^3]  |                 all  |                             1.695591360000082  |
-----------------------------------------------------------------------------------------------------------------
|    Phase dynamic pore volume: [rm^3]  |                 gas  |                                             0  |
|                                       |               water  |                                       1.69559  |
-----------------------------------------------------------------------------------------------------------------
|                      Phase mass [kg]  |                 gas  |                                             0  |
|                                       |               water  |                                       1795.74  |
-----------------------------------------------------------------------------------------------------------------
|   Trapped phase mass (metric 1) [kg]  |                 gas  |                                             0  |
|                                       |               water  |                                       359.149  |
-----------------------------------------------------------------------------------------------------------------
|             nonTrappedPhaseMass [kg]  |                 gas  |                                             0  |
|                                       |               water  |                                        1436.6  |
-----------------------------------------------------------------------------------------------------------------
|  Immobile phase mass (metric 2) [kg]  |                 gas  |                                             0  |
|                                       |               water  |                                             0  |
-----------------------------------------------------------------------------------------------------------------
|    Mobile phase mass (metric 2) [kg]  |                 gas  |                                             0  |
|                                       |               water  |                                       1795.74  |
-----------------------------------------------------------------------------------------------------------------
|                  Component mass [kg]  |            gas, co2  |                                             0  |
|                                       |          gas, water  |                                             0  |
|                                       |          water, co2  |                         0.0017957448773396687  |
|                                       |        water, water  |                            1795.7430815947907  |
-----------------------------------------------------------------------------------------------------------------

@arng40 arng40 added ci: run CUDA builds Allows to triggers (costly) CUDA jobs and removed DO NOT MERGE ! labels Jan 10, 2025
@arng40 arng40 added the ci: run integrated tests Allows to run the integrated tests in GEOS CI label Jan 10, 2025
@arng40 arng40 requested a review from paveltomin January 10, 2025 10:53
Copy link
Contributor

@paveltomin paveltomin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a few minor things to clean up

@paveltomin paveltomin added ci: run code coverage enables running of the code coverage CI jobs flag: no rebaseline Does not require rebaseline labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci: run code coverage enables running of the code coverage CI jobs ci: run CUDA builds Allows to triggers (costly) CUDA jobs ci: run integrated tests Allows to run the integrated tests in GEOS CI flag: no rebaseline Does not require rebaseline type: cleanup / refactor Non-functional change (NFC) type: feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use data tables for log, and CSV / HDF5 to output statistics [EPIC] Outputs in GEOS
6 participants