GEOS-DEV / GEOS

GEOS Simulation Framework
GNU Lesser General Public License v2.1
203 stars 80 forks source link

Log refactor - Output PVT #3149

Open arng40 opened 1 month ago

arng40 commented 1 month ago

This PR follows the https://github.com/GEOS-DEV/GEOS/pull/2984 that aim to standardize logs. Currently PVT tables are only accessible through .csv files. In this PR, logs will indicate which csv files are generated along with their associated path

CSV Generated to inputFiles/compositionalMultiphaseWell/test.xml/fluid1_phaseModel1_PhillipsBrineDensity_table.csv :

---------------------------------------------------------------------------------------
|                    fluid1_phaseModel1_PhillipsBrineDensity_table                    |
---------------------------------------------------------------------------------------
|  The fluid1_phaseModel1_PhillipsBrineDensity_table PVT table exceeding 500 rows.    |
|  To visualize the tables, go to the generated csv                                   |
---------------------------------------------------------------------------------------

In addition to csv files, PVT Tables with dimensions n <= 2 can be written in log by meetings 2 conditions :

CSV Generated to inputFiles/compositionalMultiphaseWell/test.xml/fluid1_phaseModel1_PhillipsBrineViscosity_table.csv

---------------------------------------------------------
|    fluid1_phaseModel1_PhillipsBrineViscosity_table    |
---------------------------------------------------------
|    temperature [C]     |       viscosity [Pa*s]       |
---------------------------------------------------------
|          0.01          |          0.0017914           |
|           10           |           0.001306           |
|           20           |          0.0010016           |
|           25           |           0.00089            |
|           30           |          0.0007972           |
---------------------------------------------------------

An example of 2D table :

----------------------------------------------------------------------------------------------------------
|                             fluid1_phaseModel2_SpanWagnerCO2Density_table                              |
----------------------------------------------------------------------------------------------------------
|           density [kg/m3]  |  temperature [C] = 12  |  temperature [C] = 62  |  temperature [C] = 112  |
----------------------------------------------------------------------------------------------------------
|    pressure [Pa] = 100000  |     1.867036801109489  |    1.5846667997020552  |      1.377165506424985  |
|   pressure [Pa] = 1100000  |    21.873072823677948  |     18.05377355524998  |     15.472646535860257  |
|   pressure [Pa] = 2100000  |     45.02058216836334  |     35.79619626115461  |     30.190059516194083  |
|   pressure [Pa] = 3100000  |      73.0547505549322  |     55.06117914599007  |     45.580574187479066  |
                        [...]
|  pressure [Pa] = 67100000  |     1107.292557196501  |     983.4638012355585  |      863.9649406367214  |
|  pressure [Pa] = 68100000  |    1109.1855359680847  |     986.2233300634709  |       867.698289923355  |
|  pressure [Pa] = 69100000  |    1111.0569954467694  |     988.9398867966821  |      871.3611145780119  |
|  pressure [Pa] = 70100000  |    1112.9074848288449  |      991.614907000032  |      874.9561390383249  |
|  pressure [Pa] = 71100000  |    1114.7375318533834  |     994.2497540203499  |      878.4859333715468  |
|  pressure [Pa] = 72100000  |    1116.5476438596384  |     996.8457238250027  |      881.9529245875995  |
|  pressure [Pa] = 73100000  |    1118.3383088824808  |     999.4040493886989  |      885.3594069497734  |
|  pressure [Pa] = 74100000  |    1120.1099966304896  |    1001.9259047775354  |      888.7075513940321  |
----------------------------------------------------------------------------------------------------------
codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 97.81421% with 4 lines in your changes missing coverage. Please review.

Project coverage is 55.81%. Comparing base (94a0e86) to head (5e8d0af).

Files Patch % Lines
src/coreComponents/functions/TableFunction.cpp 97.14% 2 Missing :warning:
src/coreComponents/fileIO/Table/TableData.cpp 92.85% 1 Missing :warning:
src/coreComponents/fileIO/Table/TableFormatter.cpp 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #3149 +/- ## =========================================== + Coverage 55.75% 55.81% +0.06% =========================================== Files 1041 1041 Lines 88534 88628 +94 =========================================== + Hits 49358 49471 +113 + Misses 39176 39157 -19 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

arng40 commented 2 weeks ago

@dkachuma I've updated the PR description, you can have a look of a 2D table representation

rrsettgast commented 4 days ago

@arng40 This PR is not approved. I am moving it off of the queue.