-
Notifications
You must be signed in to change notification settings - Fork 1
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
hsaunders1904
merged 14 commits into
main
from
hsaunders1904/29_upgrade_openfoam_version
Jan 21, 2025
Merged
Upgrade OpenFOAM version #36
hsaunders1904
merged 14 commits into
main
from
hsaunders1904/29_upgrade_openfoam_version
Jan 21, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'.
2501e7c
to
6bab833
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Makes updates for compatibility with OpenFOAM-12. The old
BuoyantFoamProblem
class is gone and is replaced theFoamProblem
class, which wraps OpenFOAM's more genericfluidSolver
. 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