Add Surface Tension
Description
This PR adds the surface tension model of Schmidmayer et. al 2017 to MFC.
Fixes #276
Type of change
- [x] New feature (non-breaking change which adds functionality)
Scope
- [x] This PR comprises a set of related changes with a common goal
How Has This Been Tested?
- [x] This is the 2D equilibration of pressure inside a water droplet in air. It's discretized onto a 50x50 Grid with reflective boundary conditions at
x[y]_begand ghost cell extrapolation forx[y]_end. The case file is available inexamples/2D_equilibration/. This simulation was run on M2 Apple Silicone.
https://github.com/MFlowCode/MFC/assets/48168887/12fed2fe-ae11-4b81-bc4f-51104150a1b7
- [x] This is the 2D relaxation of a square to a circle in 2D. It's discretized onto a 129x128 grid with reflective boundary conditions at
x[y]_begand ghost cell extrapolation forx[y]_end. The case file is available inexamples/2D_recoverCircle. This simulation was run on 2 V100 GPUs.
https://github.com/MFlowCode/MFC/assets/48168887/4ab34fa0-12ae-40f2-a507-b56517e15984
- [x] This is the 3D equilibration of pressure inside a water droplet in air. It's discretized on a 100x100x100 grid with reflecting boundary conditions at
x[y,z]_begand ghost cell extrapolation atx[yz]_end. This simulation was ran using 4 V100 GPUs on Pace Phoenix.
https://github.com/MFlowCode/MFC/assets/48168887/e1b8280d-3630-49da-af75-7eeb893b678c
- [ ] This is the 3D relaxation of a cube to a sphere. It's discretized on a 128x128x128 grid with reflecting boundary conditions at
x[y,z]_begand ghost cell extrapolation atx[yz]_end. This simulation was ran using 8 MI250 GPUs on OLCF Frontier.
Checklist
- [x] I have added comments for the new code
- [x] I added Doxygen docstrings to the new code
- [x] I have made corresponding changes to the documentation (
docs/) - [x] I have added regression tests to the test suite so that people can verify in the future that the feature is behaving as expected
- [x] I have added example cases in
examples/that demonstrate my new feature performing as expected - [x] I ran
./mfc.sh formatbefore committing my code - [x] New and existing tests pass locally with my changes, including with GPU capability enabled and disabled
- [x] This PR does not introduce any repeated code (it follows the DRY principle)
- [x] I cannot think of a way to condense this code and reduce any introduced additional line count
If your code changes any code source files (anything in src/)
To make sure the code is performing as expected on GPU devices, I have:
- [x] Checked that the code compiles using NVHPC compilers
- [x] Checked that the code compiles using Cray compilers
- [x] Ran the code on either V100, A100, or H100 GPUs and ensured the new feature performed as expected (the GPU results match the CPU results)
- [x] Ran the code on MI200+ GPUs and ensure the new feature performed as expected (the GPU results match the CPU results)
- [x] Enclosed the new feature via
nvtxranges so that they can be identified in profiles - [x] Ran a Nsight Systems profile using
./mfc.sh run XXXX --gpu -t simulation --nsys, and have attached the output file (.nsys-rep) and plain text results to this PR nsysRaw.txt - [ ] Ran an Omniperf profile using './mfc.sh run XXX --gpu -t simulation --omniperf', and have attached the output file and play text results to this PR.
- [x] Ran my code using various numbers of different GPUs (1, 2, and 8, for example) in parallel and made sure that the results scale similarly to what happens if you run without the new code/feature
@wilfonba check s_rectangle subroutine in m_patches.fpp, it only defines smooth_patch_id when ib is not true (lines 893-894), and you added a further check at line 928 where that variable is no longer defined, which is causing a bug in the 3D IBM case
I forgot I'd added that stuff. Thanks for taking a look @anandrdbz!
PRs are on hold until #419 is fixed
add more example cases in examples/!
PRs are on hold until #419 is fixed
I'm aware of this. I figured starting the review process wouldn't hurt anything so that I can fix any revisions while that issue is being resolved.
per This PR comprises a set of related changes with a common goal please move the template updates to a separate PR
@wilfonba sync w/ master
should be able to debug these Test Suite / Github (macos, mpi, debug, false) (pull_request) from your own mac
Note: ./mfc.sh count_diff is called from master so the Check Line Counts workflow is expected to fail despite the fixes I pushed to this PR.
Let me fix the macOS no debug runners. Not sure why those would have failed, but I haven't ran the test suite with no debug recently
Let me fix the macOS no debug runners. Not sure why those would have failed, but I haven't ran the test suite with no debug recently
Related to new issue #443
Can merge this PR without that runner working