MFC
MFC copied to clipboard
IB-DB Treatment
Description
This PR adds the treatment for cases where immersed boundaries touch the domain boundaries.
Type of change
Please delete options that are not relevant.
- [x] Bug fix (non-breaking change which fixes an issue)
Scope
- [x] This PR comprises a set of related changes with a common goal
If you cannot check the above box, please split your PR into multiple PRs that each have a common goal.
How Has This Been Tested?
Using 2D rectangle and circle Still pending tests of 3D cases.
Test Configuration:
'time_stepper' : 3,
# Use WENO5
'weno_order' : 5,
'weno_eps' : 1.E-16,
'weno_Re_flux' : 'F',
'weno_avg' : 'F',
'avg_state' : 2,
# Use the mapped WENO weights to maintain monotinicity
'mapped_weno' : 'F',
'null_weights' : 'F',
'mp_weno' : 'F',
# Use the HLLC Riemann solver
'riemann_solver' : 2,
'wave_speeds' : 1,
# We use reflective boundary conditions at octant edges and
# non-reflective boundary conditions at the domain edges
'bc_x%beg' : -6,
'bc_x%end' : -6,
'bc_y%beg' : -15,
'bc_y%end' : -15,
'ib' : 'T',
'num_ibs' : 1,
'patch_icpp(1)%geometry' : 3,
'patch_icpp(1)%x_centroid' : x1/2,
'patch_icpp(1)%y_centroid' : x2/2,
'patch_icpp(1)%length_x' : x1,
'patch_icpp(1)%length_y' : x2,
#Specify the patch primitive variables 9
'patch_icpp(1)%vel(1)' : 0.0E+00,
'patch_icpp(1)%vel(2)' : 0.0E+00,
'patch_icpp(1)%pres' : 1.0E+05,
'patch_icpp(1)%alpha_rho(1)' : (1.0 - 1e-12)*rho1,
'patch_icpp(1)%alpha(1)' : 1.0 - 1e-12,
'patch_icpp(1)%alpha_rho(2)' : 1.0e-12*rho2,
'patch_icpp(1)%alpha(2)' : 1.0e-12,
'patch_icpp(2)%geometry' : 3,
'patch_icpp(2)%alter_patch(1)' : 'T',
'patch_icpp(2)%x_centroid' : x1/8,
'patch_icpp(2)%y_centroid' : x2/2,
'patch_icpp(2)%length_x' : x1/4,
'patch_icpp(2)%length_y' : x2,
#Specify the patch primitive variables 9
'patch_icpp(2)%vel(1)' : 80.0E+00,
'patch_icpp(2)%vel(2)' : 0.0E+00,
'patch_icpp(2)%pres' : 1.0E+05,
'patch_icpp(2)%alpha_rho(1)' : (1.0 - 1e-12)*rho1,
'patch_icpp(2)%alpha(1)' : 1.0 - 1e-12,
'patch_icpp(2)%alpha_rho(2)' : 1.0e-12*rho2,
'patch_icpp(2)%alpha(2)' : 1.0e-12,
'patch_ib(1)%geometry' : 3,
'patch_ib(1)%x_centroid' : x1/2,
'patch_ib(1)%y_centroid' : 5*x2/6,
'patch_ib(1)%length_x' : x1/4,
'patch_ib(1)%length_y' : x2/2,
'patch_ib(1)%slip' : 'F',
- What computers and compilers did you use to test this:
Checklist
- [x] I have added comments for the new code
- [ ] I have made corresponding changes to the documentation (
docs/) - [ ] I have added regression tests to the test suite so that people can verify in the future that the feature is behaving as expected
- [ ] I have added example cases in
examples/that demonstrate my new feature performing as expected. They run to completion and demonstrate "interesting physics" - [x] I ran
./mfc.sh formatbefore committing my code - [ ] New and existing tests pass locally with my changes, including with GPU capability enabled (both NVIDIA hardware with NVHPC compilers and AMD hardware with CRAY compilers) and disabled
- [ ] This PR does not introduce any repeated code (it follows the DRY principle)
- [ ] 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/simulation)
To make sure the code is performing as expected on GPU devices, I have:
- [ ] Checked that the code compiles using NVHPC compilers
- [ ] Checked that the code compiles using CRAY compilers
- [ ] 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)
- [ ] Ran the code on MI200+ GPUs and ensure the new features performed as expected (the GPU results match the CPU results)
- [ ] Enclosed the new feature via
nvtxranges so that they can be identified in profiles - [ ] 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 - [ ] Ran an Omniperf profile using
./mfc.sh run XXXX --gpu -t simulation --omniperf, and have attached the output file and plain text results to this PR. - [ ] 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