moose icon indicating copy to clipboard operation
moose copied to clipboard

Add connection to the Saline interface to MSTDB-TP

Open rks171 opened this issue 2 years ago • 43 comments

This adds a new fluid property class extension that wraps the Saline code, which is an interface to the MSTDB-TP salt fluid property databse. Saline is added as an optional submodule.

closes #22724

Reason

Design

Impact

rks171 avatar Nov 16 '22 19:11 rks171

I'll be on leave for the next two weeks, but @logan or @GiudGiud should be able to help you. I would prefer it if we used the same submodule approach (layout and make files) as we do in the thermochimica PR.

dschwen avatar Nov 16 '22 23:11 dschwen

What else needs to be done to close this out?

rks171 avatar Dec 09 '22 14:12 rks171

@dschwen was looking at multi-level includes (including Saline in FP, and running another module that builds with FP)

GiudGiud avatar Dec 09 '22 15:12 GiudGiud

Let's squash these commits together a bit, especially the "update some file" commits.

Where are we on the documentation failure with thermochimica? Do we still need all recipes to check it out? If so, is that going to be ok for saline too?

GiudGiud avatar Jan 13 '23 16:01 GiudGiud

Job Documentation on 74fe3d9 wanted to post the following:

View the site here

This comment will be updated on new commits.

moosebuild avatar Jan 13 '23 18:01 moosebuild

The build is also failing because we are passing some strict flags from MOOSE (-Werror-unused etc) on Saline

GiudGiud avatar Jan 13 '23 18:01 GiudGiud

Where are we on the documentation failure with thermochimica? Do we still need all recipes to check it out? If so, is that going to be ok for saline too?

That is fixed.

dschwen avatar Jan 13 '23 20:01 dschwen

The build is also failing because we are passing some strict flags from MOOSE (-Werror-unused etc) on Saline

What a wonderful opportunity to fix the Saline code base :-D

dschwen avatar Jan 13 '23 20:01 dschwen

The build is also failing because we are passing some strict flags from MOOSE (-Werror-unused etc) on Saline

What a wonderful opportunity to fix the Saline code base :-D

It's not about fixing anything here, we can't be imposing compilation flags to others. The MOOSE ecosystem is meant to be more inclusive than that.

EDIT: misclicked the close

GiudGiud avatar Jan 13 '23 22:01 GiudGiud

A few options here:

  • Saline gets modified to remove the warning
  • #pragma GCC diagnostic ignored "-Woverloaded-virtual" get added to Saline
  • we pass additional flags to undo the MOOSE ones

GiudGiud avatar Jan 23 '23 00:01 GiudGiud

My preference would be to not request changes from the Saline team if that is a possible avenue.

rks171 avatar Jan 24 '23 13:01 rks171

My preference would be to not request changes from the Saline team if that is a possible avenue.

That was not the intention of my comment. I might make that pr to saline myself.

dschwen avatar Jan 24 '23 14:01 dschwen

My preference would be to not request changes from the Saline team if that is a possible avenue.

That was not the intention of my comment. I might make that pr to saline myself.

Many of the Saline's compiler warnings have been addressed. There is an unused parameter which is reserved for pressure. This parameter may become required at a later date. If compiler options equivalent to GCC's combination of -Werror -Wall -Wextra then the equivalent of -Wno-unused-parameter will be required to compile Saline directly.

HendersonSC avatar Apr 03 '23 20:04 HendersonSC

That's great news I just rebased and updated the submodule, see where we stand

GiudGiud avatar Apr 03 '23 20:04 GiudGiud

We are still hitting the errors.

I just squashed unnecessary commits and tried adding another flag to build Saline. This may not be quite what we want, I ll have to check how far this flag propagates

GiudGiud avatar Apr 03 '23 20:04 GiudGiud

Just comment out the name is the unused parameter.

dschwen avatar Apr 03 '23 21:04 dschwen

something like : function(other arguments..... , Real /*pressure*/) will do here

It will remove the unused variable warning, while keeping the argument / same function signature

GiudGiud avatar Apr 03 '23 22:04 GiudGiud

ok we cant do what I did here, it propagates to the whole repo

Daniel's fix wouldnt be too bad to do on the Saline side

GiudGiud avatar Apr 04 '23 00:04 GiudGiud

Job Coverage on 74fe3d9 wanted to post the following:

Framework coverage

Coverage did not change

Modules coverage

Fluid properties

19aa8b #22725 74fe3d
Total Total +/- New
Rate 85.23% 85.47% +0.24% 92.86%
Hits 7190 7258 +68 52
Misses 1246 1234 -12 4

Diff coverage report

Full coverage report

Full coverage reports

Reports

This comment will be updated on new commits.

moosebuild avatar Apr 04 '23 05:04 moosebuild

Yes that will suppress the warning, but I am not sure that Saline intends to suppress the warning at this time. Either way I believe that is a different philosophical discussion and the problem at hand is MOOSE's use of the perfectly valid form of Saline which is already published.

Make provides for target specific variables, so the following may work: saline : ADDITIONAL_CPPFLAGS += -DSALINE_ENABLED -Wno-unused-parameter.

I am not really proficient in Make and am definitely not versed in MOOSE's flavoring of Make. So the above may need some massaging.

HendersonSC avatar Apr 04 '23 19:04 HendersonSC

I agree let's figure this make command out to enable the flag very locally to Saline

In the meantime a few things to consider:

  • line coverage is very low. The way we get near 100% coverage in fluid properties is with a unit test. It makes it very easy to call each routine and check their output. See anything in fluid_properties/unit/src
  • the current set of functions implemented likely only suffices for SAM, NSFV will want more AD routines, subchannel will want more some p_rho variable set routines, THM will want some (v,e) routines. While we dont need to do this now, I m raising awareness so we can have a plan

GiudGiud avatar Apr 04 '23 20:04 GiudGiud

There is no saline target though in the Makefile. I think all the code is compiled under the same target. @permcody any idea how to move forward here

GiudGiud avatar Apr 04 '23 21:04 GiudGiud

Just added a unit test and rebased due to a conflict with the submodule list (wasp just got added)

It seems there are two comments from Daniel left. If my PR gets accepted on the Saline side that will take care of the compile warnings

GiudGiud avatar Apr 10 '23 21:04 GiudGiud

Test suite is failing because documentation is missing. I ll catch the formatting things in another commit but someone more qualified should write the actual SalineFluidProperties documentation (in doc/content/source/fluidproperties)

GiudGiud avatar Jul 10 '23 01:07 GiudGiud

Testing already includes Saline and is now green (failure is Griffin, unrelated) @dschwen if you could please review, I have too many commits here

GiudGiud avatar Sep 01 '23 03:09 GiudGiud

Is there anything additional I need to do to get this MR pushed in?

rks171 avatar Sep 12 '23 19:09 rks171

Needs a reviewer, then there may be additional comments to address. @idaholab/moose-ccb

GiudGiud avatar Sep 12 '23 19:09 GiudGiud

@rks171 thank you for addressing the comments. I think this is just about ready to go as far as I'm concerned. Appreciate the contribution! Would you be able to squash your most recent commits which address my review, into one or a couple commits? It's sometimes more useful for looking at history to have a few commits with meaningful messages

lindsayad avatar Sep 13 '23 22:09 lindsayad

I'll look at our checkouts in CIVET for this this evening.

loganharbour avatar Sep 13 '23 22:09 loganharbour

I ll do the squash

GiudGiud avatar Sep 14 '23 17:09 GiudGiud