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

feat: Log refactor - Output PVT #3149

Merged
merged 195 commits into from
Oct 1, 2024
Merged

feat: Log refactor - Output PVT #3149

merged 195 commits into from
Oct 1, 2024

Conversation

arng40
Copy link
Contributor

@arng40 arng40 commented May 29, 2024

This PR follows the #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 :

  • have sufficient logLevel
  • Rows in the table < 500 lines

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  |
----------------------------------------------------------------------------------------------------------

arng40 added 30 commits February 9, 2024 16:11
…feature/dudes/table-layout"

This reverts commit 8f74cfa.
@arng40
Copy link
Contributor Author

arng40 commented Aug 30, 2024

Hi @rrsettgast , @paveltomin, I only have this error in the integrated tests :

Rank 0 is comparing /tmp/tmp.LquJVkCo6y/GEOS_integratedTests_working/compositionalMultiphaseFlow/co2_hybrid_1d_02/0to10_restart_000000010/rank_0000000.hdf5 with /tmp/tmp.LquJVkCo6y/GEOS_integratedTests_baselines/compositionalMultiphaseFlow/co2_hybrid_1d_02/0to10_restart_000000010/rank_0000000.hdf5 
********************************************************************************
Error: /Problem/domain/Constitutive/fluid
	Group has a child 'writeCSV' in the file to compare but not the baseline file.
********************************************************************************

It seems normal to me because I added the writeCSV attribute in CO2BrineFluid file.
I think we can safely rebaseline.

@arng40 arng40 added flag: requires rebaseline Requires rebaseline branch in integratedTests and removed DO NOT MERGE ! labels Aug 30, 2024
Copy link
Contributor

@MelReyCG MelReyCG left a comment

Choose a reason for hiding this comment

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

@arng40 I suggest you to go for the "option 2" I proposed.

@arng40
Copy link
Contributor Author

arng40 commented Sep 4, 2024

@arng40 I suggest you to go for the "option 2" I proposed.

It's good

@MelReyCG
Copy link
Contributor

MelReyCG commented Sep 4, 2024

A few more adjustments may need to be done.

@arng40
Copy link
Contributor Author

arng40 commented Sep 9, 2024

Hello @rrsettgast , All the comments has been addressed, I think we can safely rebase the PR and merge it

Copy link
Member

@rrsettgast rrsettgast left a comment

Choose a reason for hiding this comment

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

I only have a question about the removal of the catalog.

@@ -67,7 +68,8 @@ string TableCSVFormatter::dataToString( TableData const & tableData ) const
return oss.str();
}

string TableCSVFormatter::toString( TableData const & tableData ) const
template<>
string TableCSVFormatter::toString< TableData >( TableData const & tableData ) const
Copy link
Member

Choose a reason for hiding this comment

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

what is the benefit of the template specialization here vs overload?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Formatting with a TableFunction is very different from formatting with a normal data source and is heavily coupled to TableFunctions, I did that to avoid to add dependancies to TableFunction

@rrsettgast rrsettgast added the ci: run code coverage enables running of the code coverage CI jobs label Sep 30, 2024
@rrsettgast
Copy link
Member

@arng40 @MelReyCG There are some documentation errors. This can be a little hard to navigate, and as we have just started enforcing this, there is no documentation on the process of finding errors from the readthedocs logs.

@paveltomin paveltomin merged commit 0db85be into develop Oct 1, 2024
25 checks passed
@paveltomin paveltomin deleted the feature/dudes/pvt-output branch October 1, 2024 16:35
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: requires rebaseline Requires rebaseline branch in integratedTests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add PVT data tables in the log (density, saturation...),
7 participants