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 330 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 king 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 and others added 30 commits March 28, 2024 09:20
- make this work
- check which methods can be private
- move every table class to fileIO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO NOT MERGE ! 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
5 participants