-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Add phase variable and flux coupling for interFOAM in the FF module #308
Conversation
Thanks for the PR, @thesamriel! Nice to finally have it here! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes make sense to me, I would just like to try it before merging, which needs a testcase.
Thanks a lot for pushing this, it's still perfectly on time for the release! And thanks a lot for considering volume coupling here.
I added the test case to the tutorials. See at the bottom of the updated description of the PR here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not all that much to add from my side. Changes look good and give a couple of more reasons to finally introduce generic readers and writers.
The only thing I don't like is the name of the variables, but from what I understand from the code these are already set by OpenFOAM. Still, it could be helpful to add some code documentation on what these variables are and where to use them. Alpha is a volume fraction for multi-phase flows?
I'm also not too convinced about the names, these are just the terms used by OpnFOAM. |
Please also start a PR, so that I can add comments there (and merge it). It currently seems to only be a branch. |
This is the first adapter that supports multiphase flows in flow coupling, and these names are clear in the OpenFOAM community. I think we can keep them like this for now, and deprecate them in the future, if a need pops up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the README, added a changelog entry, and merged back from develop.
I can run the accompanying test case in < 3 min and get the expected results.
I think this is now ready to merge! 🚀
TODO list:
I updated the documentation in
docs/
I added a changelog entry in
changelog-entries/
(create directory if missing)Added coupling variables for
Alpha
andAlphaGradient
, which can be used for coupling ofinterFoam
.Added coupling variable
Phi
, which couples the face flux on the surface fieldphi
.Coupling of
Alpha
:Coupling of interFoam solvers does not work perfectly. Below screenshots show a very basic test scenario of a laminar flow through a 2-D pipe with the top half being air and the bottom half being incoming water. Gravity is set to 0 to avoid the creation of vortices. The top image always shows the monolithic simulation, the bottom one the coupled simulation.
Coupling of the phase variable
Alpha
works with Dirichlet-Neumann coupling, however there are some flow artefacts when the air-water-interface crosses the coupling interface. However, I suspect the problem to be not in the coupling perse, but rather in the interFoam outlet boundary conditions. This is because, the fluid also behaves strange at the outlet of the monolithic version.Coupling of
Phi
:Coupling was tested by adding it to normal FF-coupling. I also used it for better stability in the breaking dam scenario presented at Coupled Conference.
I don't have/know a proper scenario, where coupling of
Phi
can be demonstrated. Nonetheless, the functionality is there and might be useful to some users.Test case:
The interfoam pipe test case from above can be found on the interfoam-pipe branch of the tutorials repository.
It also includes the option to additionally couple phi, which will change the results marginally.
Note how the water is held back or reflected at the outlet as well. Figuring out the correct outlet boundary condition might help improve the coupling as well. Found a discussion on this here, but not a proper solution.