Skip to content

Conversation

@francoishamon
Copy link
Contributor

This PR refactors the unit tests: testCompMultiphaseFlow and testCompMultiphaseFlowHybrid by removing some duplicate code and moving unified functions to testCompFlowUtils.hpp.

The goal is to be able to add a thermal unit test in #1225 without adding much code. I am doing the present refactoring in a separate PR to avoid clutter in #1225.

Ready for review.


void testPhaseVolumeFractionNumericalDerivatives( CompositionalMultiphaseFVM & solver,
DomainPartition & domain,
bool const isThermal,
Copy link
Contributor

Choose a reason for hiding this comment

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

So the isThermal is currently never true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I confirm that the isThermal is currently never true (until PR #1225 is merged). I am trying to take small steps towards thermal to avoid doing everything in the same PR. So currently,

  • There is already a flag isThermal in the solver, currently always false.
  • There is already some extrinsic data available in the solver for temperature, currently only modified at initialization.
  • The present PR adds the unit tests functions to check derivatives wrt temperature, but they are currently unused.

PR #1225 will put everything together, allow the flag isThermal to be true, allow the temperature field to change with time, and will add a unit test using the functions added in the present PR.

@francoishamon francoishamon added ci: run CUDA builds Allows to triggers (costly) CUDA jobs and removed flag: ready for review labels Mar 10, 2022
@francoishamon francoishamon merged commit a7bca05 into develop Mar 17, 2022
@francoishamon francoishamon deleted the refactor/hamon/compflowUnitTests branch March 17, 2022 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci: run CUDA builds Allows to triggers (costly) CUDA jobs type: cleanup / refactor Non-functional change (NFC)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants