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

Upgrade OpenFOAM version #36

Merged
merged 14 commits into from
Jan 21, 2025

Conversation

hsaunders1904
Copy link
Contributor

Summary

Makes updates for compatibility with OpenFOAM-12. The old BuoyantFoamProblem class is gone and is replaced the FoamProblem class, which wraps OpenFOAM's more generic fluidSolver. This, in theory, allows us to use any of OpenFOAM's fluid solvers, and means we do not need to write problem classes for each solver type.

Also updates the OpenFOAM build script and docker image. As the docker image has been updated, we'll need to re-build and deploy it before this PR can be merged.

Related Issue

Resolves #29
Resolves #27

Checklist

  • Tests have been written for the new/changed behaviour.
  • Documentation/examples have been added/updated for the new changes.

OpenFOAM's buoyantFoam solver was removed between versions 10 and 12. It
was replaced with a generic 'fluidSolver'. This commit removes the old
buoyantFoam code and introduces a new class: FoamSolver.

FoamSolver wraps an OpenFOAM 'solver' object and handles running the
timesteps and transferring mesh values (however I have not implemented
this yet!).
This was temporarily removed whilst the FoamProblem class was adapted to
use a FoamSolver instance rather than a solver impl object.
We now no longer have a BuoyantFoamProblem, so replace with
FoamProblem.
This is a pretty nasty implementation, but it's a step towards getting
the tests passing. Once the tests are passing, I'll refactor this.
Moose expects a lowercase '.h', but I'd accidentally followed the
OpenFOAM convention of using an uppercase '.H'.
These were placeholders for when we were to start writing interfaces for
other OpenFOAM solvers. With OpenFOAM-12, there is now a generic
'FluidSolver' that we can write an interface to. We no longer need this
icoFoam solver interface.
Do away with the split serial/par directories and put both tests in a
single directory and 'test' file. This greatly reduces duplication.
New values were compared to OpenFOAM mesh manually in ParaView. This
follows the upgrade to OpenFOAM-12, where temperatures came out slightly
differently (no more than a 10e-2 relative error).
These are tests of FoamProblem and that it successfully transfers
temperatures from OpenFOAM to a MOOSE mesh.
Using the 'latest' tag means that we must update the "production"
version of the docker image _before_ we run a CI job using that image.
This can create a bit of a deadlock where, if we update the image in
some PR, we must update the 'latest' tag on the Docker image then run
the tests on the PR. If the PR fails, we must fix that PR before we can
do anything else.

Using the specific tags resolves this problem. Once we have merged the
PR, we can then (manually, for now) update the image tag to 'latest'.
@hsaunders1904 hsaunders1904 force-pushed the hsaunders1904/29_upgrade_openfoam_version branch from 2501e7c to 6bab833 Compare January 21, 2025 11:01
@hsaunders1904 hsaunders1904 merged commit bb64c27 into main Jan 21, 2025
1 check passed
@hsaunders1904 hsaunders1904 deleted the hsaunders1904/29_upgrade_openfoam_version branch January 21, 2025 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade OpenFOAM version Support use of solvers other than buoyantFoam
1 participant