-
Notifications
You must be signed in to change notification settings - Fork 121
Add moving imersed boundaries #1006
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 moving imersed boundaries #1006
Conversation
…ndaries with moving imersed boundary variables
…r what is applied each loop. Wrote a seaparate function and working on passing everything in
…ib patch definitions. This is a precommit before I start separating the two files
…ry patches from the m_ib_patches.fpp file
…ve compiling issues
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
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.
High-level Suggestion
Refactor the code to eliminate duplication in geometry calculation logic between m_icpp_patches.fpp and m_ib_patches.fpp. This can be achieved by creating shared geometry subroutines that handle the common calculations. [High-level, importance: 8]
Solution Walkthrough:
Before:
! In m_icpp_patches.fpp
subroutine s_icpp_sphere(patch_id, patch_id_fp, q_prim_vf)
...
do k = 0, p; do j = 0, n; do i = 0, m
is_inside = ((x_cc(i) - x_centroid)**2 + ... <= radius**2)
if (is_inside and alter_patch(...)) then
call s_assign_patch_primitive_variables(...)
endif
end do; end do; end do
end subroutine
! In m_ib_patches.fpp
subroutine s_ib_sphere(patch_id, ib_markers_sf)
...
do k = 0, p; do j = 0, n; do i = 0, m
is_inside = ((x_cc(i) - x_centroid)**2 + ... <= radius**2)
if (is_inside) then
ib_markers_sf(i, j, k) = patch_id
endif
end do; end do; end do
end subroutine
After:
! In a new shared module e.g., m_patch_geometry.fpp
subroutine s_apply_sphere_geometry(patch_id, patch_type, patch_id_fp, q_prim_vf)
! patch_type is 'icpp' or 'ib'
...
if (patch_type == 'icpp') then
x_centroid = patch_icpp(patch_id)%x_centroid
...
else if (patch_type == 'ib') then
x_centroid = patch_ib(patch_id)%x_centroid
...
endif
do k = 0, p; do j = 0, n; do i = 0, m
is_inside = ((x_cc(i) - x_centroid)**2 + ... <= radius**2)
if (is_inside) then
if (patch_type == 'icpp' and alter_patch(...)) then
call s_assign_patch_primitive_variables(...)
else if (patch_type == 'ib') then
patch_id_fp(i, j, k) = patch_id
endif
endif
end do; end do; end do
end subroutine
| if (((x_cc(i) - x_centroid)**2 & | ||
| + (y_cc(j) - y_centroid)**2 <= radius**2 & | ||
| .and. & | ||
| patch_icpp(patch_id)%alter_patch(patch_id_fp(i, j, 0))) & | ||
| .or. & | ||
| patch_id_fp(i, j, 0) == smooth_patch_id) & | ||
| then | ||
|
|
||
| patch_id_fp(i, j, 0) = patch_id | ||
| else | ||
| if (((x_cc(i) - x_centroid)**2 & | ||
| + (y_cc(j) - y_centroid)**2 <= radius**2 & | ||
| .and. & | ||
| patch_icpp(patch_id)%alter_patch(patch_id_fp(i, j, 0))) & | ||
| .or. & | ||
| (.not. present(ib_flag) .and. patch_id_fp(i, j, 0) == smooth_patch_id)) & | ||
| then | ||
|
|
||
| call s_assign_patch_primitive_variables(patch_id, i, j, 0, & | ||
| eta, q_prim_vf, patch_id_fp) | ||
|
|
||
| @:analytical() | ||
| if (patch_icpp(patch_id)%hcid /= dflt_int) then | ||
| @:Hardcoded2D() | ||
| end if | ||
|
|
||
| end if | ||
| end if | ||
| end do | ||
| end do | ||
| @:HardcodedDellacation() | ||
|
|
||
| end subroutine s_circle | ||
|
|
||
| !! @param patch_id is the patch identifier | ||
| !! @param patch_id_fp Array to track patch ids | ||
| !! @param q_prim_vf Array of primitive variables | ||
| !! @param ib True if this patch is an immersed boundary | ||
| subroutine s_airfoil(patch_id, patch_id_fp, q_prim_vf, ib_flag) | ||
|
|
||
| integer, intent(in) :: patch_id | ||
| integer, dimension(0:m, 0:n, 0:p), intent(inout) :: patch_id_fp | ||
| type(scalar_field), dimension(1:sys_size), intent(inout) :: q_prim_vf | ||
| logical, optional, intent(in) :: ib_flag | ||
|
|
||
| real(wp) :: x0, y0, f, x_act, y_act, ca_in, pa, ma, ta, theta | ||
| real(wp) :: xa, yt, xu, yu, xl, yl, xc, yc, dycdxc, sin_c, cos_c | ||
| integer :: i, j, k | ||
| integer :: Np1, Np2 | ||
|
|
||
| if (.not. present(ib_flag)) return | ||
| x0 = patch_ib(patch_id)%x_centroid | ||
| y0 = patch_ib(patch_id)%y_centroid | ||
| ca_in = patch_ib(patch_id)%c | ||
| pa = patch_ib(patch_id)%p | ||
| ma = patch_ib(patch_id)%m | ||
| ta = patch_ib(patch_id)%t | ||
| theta = pi*patch_ib(patch_id)%theta/180._wp | ||
|
|
||
| Np1 = int((pa*ca_in/dx)*20) | ||
| Np2 = int(((ca_in - pa*ca_in)/dx)*20) | ||
| Np = Np1 + Np2 + 1 | ||
|
|
||
| allocate (airfoil_grid_u(1:Np)) | ||
| allocate (airfoil_grid_l(1:Np)) | ||
|
|
||
| airfoil_grid_u(1)%x = x0 | ||
| airfoil_grid_u(1)%y = y0 | ||
|
|
||
| airfoil_grid_l(1)%x = x0 | ||
| airfoil_grid_l(1)%y = y0 | ||
|
|
||
| eta = 1._wp | ||
|
|
||
| do i = 1, Np1 + Np2 - 1 | ||
| if (i <= Np1) then | ||
| xc = x0 + i*(pa*ca_in/Np1) | ||
| xa = (xc - x0)/ca_in | ||
| yc = (ma/pa**2)*(2*pa*xa - xa**2) | ||
| dycdxc = (2*ma/pa**2)*(pa - xa) | ||
| else | ||
| xc = x0 + pa*ca_in + (i - Np1)*((ca_in - pa*ca_in)/Np2) | ||
| xa = (xc - x0)/ca_in | ||
| yc = (ma/(1 - pa)**2)*(1 - 2*pa + 2*pa*xa - xa**2) | ||
| dycdxc = (2*ma/(1 - pa)**2)*(pa - xa) | ||
| end if | ||
|
|
||
| yt = (5._wp*ta)*(0.2969_wp*xa**0.5_wp - 0.126_wp*xa - 0.3516_wp*xa**2._wp + 0.2843_wp*xa**3 - 0.1015_wp*xa**4) | ||
| sin_c = dycdxc/(1 + dycdxc**2)**0.5_wp | ||
| cos_c = 1/(1 + dycdxc**2)**0.5_wp | ||
|
|
||
| xu = xa - yt*sin_c | ||
| yu = yc + yt*cos_c | ||
|
|
||
| xl = xa + yt*sin_c | ||
| yl = yc - yt*cos_c | ||
|
|
||
| xu = xu*ca_in + x0 | ||
| yu = yu*ca_in + y0 | ||
|
|
||
| xl = xl*ca_in + x0 | ||
| yl = yl*ca_in + y0 | ||
|
|
||
| airfoil_grid_u(i + 1)%x = xu | ||
| airfoil_grid_u(i + 1)%y = yu | ||
|
|
||
| airfoil_grid_l(i + 1)%x = xl | ||
| airfoil_grid_l(i + 1)%y = yl | ||
|
|
||
| end do | ||
|
|
||
| airfoil_grid_u(Np)%x = x0 + ca_in | ||
| airfoil_grid_u(Np)%y = y0 | ||
|
|
||
| airfoil_grid_l(Np)%x = x0 + ca_in | ||
| airfoil_grid_l(Np)%y = y0 | ||
|
|
||
| do j = 0, n | ||
| do i = 0, m | ||
|
|
||
| if (.not. f_is_default(patch_ib(patch_id)%theta)) then | ||
| x_act = (x_cc(i) - x0)*cos(theta) - (y_cc(j) - y0)*sin(theta) + x0 | ||
| y_act = (x_cc(i) - x0)*sin(theta) + (y_cc(j) - y0)*cos(theta) + y0 | ||
| else | ||
| x_act = x_cc(i) | ||
| y_act = y_cc(j) | ||
| end if | ||
| call s_assign_patch_primitive_variables(patch_id, i, j, 0, & | ||
| eta, q_prim_vf, patch_id_fp) |
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.
Suggestion: Initialize the eta variable to 1._wp before its conditional assignment to prevent the use of an uninitialized variable. [possible issue, importance: 8]
| if (((x_cc(i) - x_centroid)**2 & | |
| + (y_cc(j) - y_centroid)**2 <= radius**2 & | |
| .and. & | |
| patch_icpp(patch_id)%alter_patch(patch_id_fp(i, j, 0))) & | |
| .or. & | |
| patch_id_fp(i, j, 0) == smooth_patch_id) & | |
| then | |
| patch_id_fp(i, j, 0) = patch_id | |
| else | |
| if (((x_cc(i) - x_centroid)**2 & | |
| + (y_cc(j) - y_centroid)**2 <= radius**2 & | |
| .and. & | |
| patch_icpp(patch_id)%alter_patch(patch_id_fp(i, j, 0))) & | |
| .or. & | |
| (.not. present(ib_flag) .and. patch_id_fp(i, j, 0) == smooth_patch_id)) & | |
| then | |
| call s_assign_patch_primitive_variables(patch_id, i, j, 0, & | |
| eta, q_prim_vf, patch_id_fp) | |
| @:analytical() | |
| if (patch_icpp(patch_id)%hcid /= dflt_int) then | |
| @:Hardcoded2D() | |
| end if | |
| end if | |
| end if | |
| end do | |
| end do | |
| @:HardcodedDellacation() | |
| end subroutine s_circle | |
| !! @param patch_id is the patch identifier | |
| !! @param patch_id_fp Array to track patch ids | |
| !! @param q_prim_vf Array of primitive variables | |
| !! @param ib True if this patch is an immersed boundary | |
| subroutine s_airfoil(patch_id, patch_id_fp, q_prim_vf, ib_flag) | |
| integer, intent(in) :: patch_id | |
| integer, dimension(0:m, 0:n, 0:p), intent(inout) :: patch_id_fp | |
| type(scalar_field), dimension(1:sys_size), intent(inout) :: q_prim_vf | |
| logical, optional, intent(in) :: ib_flag | |
| real(wp) :: x0, y0, f, x_act, y_act, ca_in, pa, ma, ta, theta | |
| real(wp) :: xa, yt, xu, yu, xl, yl, xc, yc, dycdxc, sin_c, cos_c | |
| integer :: i, j, k | |
| integer :: Np1, Np2 | |
| if (.not. present(ib_flag)) return | |
| x0 = patch_ib(patch_id)%x_centroid | |
| y0 = patch_ib(patch_id)%y_centroid | |
| ca_in = patch_ib(patch_id)%c | |
| pa = patch_ib(patch_id)%p | |
| ma = patch_ib(patch_id)%m | |
| ta = patch_ib(patch_id)%t | |
| theta = pi*patch_ib(patch_id)%theta/180._wp | |
| Np1 = int((pa*ca_in/dx)*20) | |
| Np2 = int(((ca_in - pa*ca_in)/dx)*20) | |
| Np = Np1 + Np2 + 1 | |
| allocate (airfoil_grid_u(1:Np)) | |
| allocate (airfoil_grid_l(1:Np)) | |
| airfoil_grid_u(1)%x = x0 | |
| airfoil_grid_u(1)%y = y0 | |
| airfoil_grid_l(1)%x = x0 | |
| airfoil_grid_l(1)%y = y0 | |
| eta = 1._wp | |
| do i = 1, Np1 + Np2 - 1 | |
| if (i <= Np1) then | |
| xc = x0 + i*(pa*ca_in/Np1) | |
| xa = (xc - x0)/ca_in | |
| yc = (ma/pa**2)*(2*pa*xa - xa**2) | |
| dycdxc = (2*ma/pa**2)*(pa - xa) | |
| else | |
| xc = x0 + pa*ca_in + (i - Np1)*((ca_in - pa*ca_in)/Np2) | |
| xa = (xc - x0)/ca_in | |
| yc = (ma/(1 - pa)**2)*(1 - 2*pa + 2*pa*xa - xa**2) | |
| dycdxc = (2*ma/(1 - pa)**2)*(pa - xa) | |
| end if | |
| yt = (5._wp*ta)*(0.2969_wp*xa**0.5_wp - 0.126_wp*xa - 0.3516_wp*xa**2._wp + 0.2843_wp*xa**3 - 0.1015_wp*xa**4) | |
| sin_c = dycdxc/(1 + dycdxc**2)**0.5_wp | |
| cos_c = 1/(1 + dycdxc**2)**0.5_wp | |
| xu = xa - yt*sin_c | |
| yu = yc + yt*cos_c | |
| xl = xa + yt*sin_c | |
| yl = yc - yt*cos_c | |
| xu = xu*ca_in + x0 | |
| yu = yu*ca_in + y0 | |
| xl = xl*ca_in + x0 | |
| yl = yl*ca_in + y0 | |
| airfoil_grid_u(i + 1)%x = xu | |
| airfoil_grid_u(i + 1)%y = yu | |
| airfoil_grid_l(i + 1)%x = xl | |
| airfoil_grid_l(i + 1)%y = yl | |
| end do | |
| airfoil_grid_u(Np)%x = x0 + ca_in | |
| airfoil_grid_u(Np)%y = y0 | |
| airfoil_grid_l(Np)%x = x0 + ca_in | |
| airfoil_grid_l(Np)%y = y0 | |
| do j = 0, n | |
| do i = 0, m | |
| if (.not. f_is_default(patch_ib(patch_id)%theta)) then | |
| x_act = (x_cc(i) - x0)*cos(theta) - (y_cc(j) - y0)*sin(theta) + x0 | |
| y_act = (x_cc(i) - x0)*sin(theta) + (y_cc(j) - y0)*cos(theta) + y0 | |
| else | |
| x_act = x_cc(i) | |
| y_act = y_cc(j) | |
| end if | |
| call s_assign_patch_primitive_variables(patch_id, i, j, 0, & | |
| eta, q_prim_vf, patch_id_fp) | |
| eta = 1._wp | |
| if (patch_icpp(patch_id)%smoothen) then | |
| eta = tanh(smooth_coeff/min(dx, dy)* & | |
| (sqrt((x_cc(i) - x_centroid)**2 & | |
| + (y_cc(j) - y_centroid)**2) & | |
| - radius))*(-0.5_wp) + 0.5_wp | |
| end if | |
| if (((x_cc(i) - x_centroid)**2 & | |
| + (y_cc(j) - y_centroid)**2 <= radius**2 & | |
| .and. & | |
| patch_icpp(patch_id)%alter_patch(patch_id_fp(i, j, 0))) & | |
| .or. & | |
| patch_id_fp(i, j, 0) == smooth_patch_id) & | |
| then | |
| call s_assign_patch_primitive_variables(patch_id, i, j, 0, & | |
| eta, q_prim_vf, patch_id_fp) |
src/pre_process/m_icpp_patches.fpp
Outdated
| if (patch_icpp(patch_id)%smoothen) then | ||
| if (eta > patch_icpp(patch_id)%model_threshold) then | ||
| eta = 1._wp | ||
| end if | ||
| else | ||
| if (patch_icpp(patch_id)%smoothen) then | ||
| if (eta > patch_icpp(patch_id)%model_threshold) then | ||
| eta = 1._wp | ||
| end if | ||
| if (eta > patch_icpp(patch_id)%model_threshold) then | ||
| eta = 1._wp | ||
| else | ||
| if (eta > patch_icpp(patch_id)%model_threshold) then | ||
| eta = 1._wp | ||
| else | ||
| eta = 0._wp | ||
| end if | ||
| eta = 0._wp | ||
| end if | ||
| call s_assign_patch_primitive_variables(patch_id, i, j, k, & | ||
| eta, q_prim_vf, patch_id_fp) | ||
|
|
||
| ! Note: Should probably use *eta* to compute primitive variables | ||
| ! if defining them analytically. | ||
| @:analytical() | ||
| end if | ||
| call s_assign_patch_primitive_variables(patch_id, i, j, k, & | ||
| eta, q_prim_vf, patch_id_fp) |
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.
✅ Suggestion: Correct the logic for eta calculation in s_icpp_model. When not smoothing, eta should be either 0._wp or 1._wp; otherwise, it should retain its fractional value. [possible issue, importance: 7]
| if (patch_icpp(patch_id)%smoothen) then | |
| if (eta > patch_icpp(patch_id)%model_threshold) then | |
| eta = 1._wp | |
| end if | |
| else | |
| if (patch_icpp(patch_id)%smoothen) then | |
| if (eta > patch_icpp(patch_id)%model_threshold) then | |
| eta = 1._wp | |
| end if | |
| if (eta > patch_icpp(patch_id)%model_threshold) then | |
| eta = 1._wp | |
| else | |
| if (eta > patch_icpp(patch_id)%model_threshold) then | |
| eta = 1._wp | |
| else | |
| eta = 0._wp | |
| end if | |
| eta = 0._wp | |
| end if | |
| call s_assign_patch_primitive_variables(patch_id, i, j, k, & | |
| eta, q_prim_vf, patch_id_fp) | |
| ! Note: Should probably use *eta* to compute primitive variables | |
| ! if defining them analytically. | |
| @:analytical() | |
| end if | |
| call s_assign_patch_primitive_variables(patch_id, i, j, k, & | |
| eta, q_prim_vf, patch_id_fp) | |
| if (.not. patch_icpp(patch_id)%smoothen) then | |
| if (eta > patch_icpp(patch_id)%model_threshold) then | |
| eta = 1._wp | |
| else | |
| eta = 0._wp | |
| end if | |
| end if | |
| call s_assign_patch_primitive_variables(patch_id, i, j, k, & | |
| eta, q_prim_vf, patch_id_fp) |
src/common/m_ib_patches.fpp
Outdated
| do while (airfoil_grid_u(k)%x < x_act) | ||
| k = k + 1 | ||
| end do |
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.
✅ Suggestion: Add a bounds check to the do while loop that iterates with k to prevent a potential out-of-bounds memory access. [possible issue, importance: 8]
| do while (airfoil_grid_u(k)%x < x_act) | |
| k = k + 1 | |
| end do | |
| do while (k < Np .and. airfoil_grid_u(k)%x < x_act) | |
| k = k + 1 | |
| end do |
| if (proc_rank == 0 .and. mod(cell_num, ncells/100) == 0) then | ||
| write (*, "(A, I3, A)", advance="no") & | ||
| char(13)//" * Generating grid: ", & | ||
| nint(100*real(cell_num)/ncells), "%" | ||
| end if |
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.
Suggestion: Add a check to ensure ncells is at least 100 before calculating the modulus to prevent a potential division-by-zero error. [possible issue, importance: 7]
| if (proc_rank == 0 .and. mod(cell_num, ncells/100) == 0) then | |
| write (*, "(A, I3, A)", advance="no") & | |
| char(13)//" * Generating grid: ", & | |
| nint(100*real(cell_num)/ncells), "%" | |
| end if | |
| if (proc_rank == 0 .and. ncells >= 100 .and. mod(cell_num, ncells/100) == 0) then | |
| write (*, "(A, I3, A)", advance="no") & | |
| char(13)//" * Generating grid: ", & | |
| nint(100*real(cell_num)/ncells), "%" | |
| end if |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1006 +/- ##
==========================================
- Coverage 41.94% 41.75% -0.19%
==========================================
Files 69 70 +1
Lines 19904 20126 +222
Branches 2496 2504 +8
==========================================
+ Hits 8348 8403 +55
- Misses 10007 10180 +173
+ Partials 1549 1543 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
benchmark
|
This last commit that I made only changed comments and the spell checker to make sure that all of the spelling passes. No changes were made to src. Since the spell check passes, we are safe to merge, I believe. |
|
i don't think any test has gone through frontier ci yet? |
|
After you'd extended the time, all tests passed but spelling. |
|
Found that test run here: https://github.com/MFlowCode/MFC/actions/runs/18237509358 |
User description
Description
This PR adds a 1st-order moving immersed boundary method, which will need to be iterated upon. This implimented will require some additional work via adding rotations, higher-order time stepping, and performance optimizations. But it puts in the framework for moving immersed boundaries that can be built upon. I would like to move forward with merging, and then going back to optimize the code, since the current functionality completely captures the scope of a new feature. The code still performs optimally when the new feature is disabled.
This PR also refactors the patch frame work to separate the notions of ICPP and IB patches, which allows IB patches to be moved into a common directory.
Type of change
Please delete options that are not relevant.
Scope
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?
Please describe the tests that you ran to verify your changes.
Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration
Test Configuration:
I tested this locally on GNU compilers with and without MPI enabled. I also tested on Wingtip with NVHPC compilers with and without MPI and on GPUs.
Checklist
docs/)examples/that demonstrate my new feature performing as expected.They run to completion and demonstrate "interesting physics"
./mfc.sh formatbefore committing my codeIf 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:
nvtxranges so that they can be identified in profiles./mfc.sh run XXXX --gpu -t simulation --nsys, and have attached the output file (.nsys-rep) and plain text results to this PR./mfc.sh run XXXX --gpu -t simulation --rsys --hip-trace, and have attached the output file and plain text results to this PR.PR Type
Enhancement
Description
• Implements a first-order moving immersed boundary method with framework for future optimizations
• Refactors patch system to separate ICPP and IB patch functionality into distinct modules
• Adds new
m_ib_patchesmodule with geometric shape functions for circles, rectangles, spheres, cuboids, cylinders, airfoils, and STL models• Introduces moving boundary support with position propagation using Euler's method and velocity handling
• Adds MPI support for broadcasting moving immersed boundary parameters
• Updates toolchain to support cross-target compatibility and new moving boundary parameters
• Includes CMake configuration updates to exclude specific modules from post-process target
Diagram Walkthrough
File Walkthrough
12 files
m_icpp_patches.fpp
Refactor patches module to separate ICPP and IB functionalitysrc/pre_process/m_icpp_patches.fpp
• Renamed module from
m_patchestom_icpp_patchesand refactored toseparate ICPP and IB patch functionality
• Removed IB patch processing
logic and parameters from all geometry subroutines
• Added
s_icpp_prefix to all patch geometry subroutines for clarity
• Removed
optional
ib_flagparameters and IB-specific conditional logicthroughout
m_ibm.fpp
Add moving immersed boundary method implementationsrc/simulation/m_ibm.fpp
• Added moving immersed boundary support with
s_propagate_mibands_update_mibsubroutines• Implemented Euler's method for boundary
position updates and velocity handling
• Added
moving_immersed_boundary_flagto track if any boundaries are moving•
Enhanced ghost point velocity assignment to handle moving boundaries
m_mpi_common.fpp
Add integer reduction and fix MPI compilation structuresrc/common/m_mpi_common.fpp
• Added
s_mpi_allreduce_integer_sumsubroutine for integer reductionoperations
• Fixed conditional compilation structure for MPI
initialization
• Consolidated QBMM variable handling across
pre-process and simulation targets
m_initial_condition.fpp
Update initial condition to use separated patch modulessrc/pre_process/m_initial_condition.fpp
• Updated to use separate
m_ib_patchesandm_icpp_patchesmodules•
Modified patch application logic to call
s_apply_ib_patchesands_apply_icpp_patchesseparatelym_mpi_proxy.fpp
Add MPI support for moving immersed boundary parameterssrc/simulation/m_mpi_proxy.fpp
• Added MPI broadcast support for new moving IB parameters
moving_ibmand
velm_global_parameters.fpp
Initialize moving immersed boundary parameterssrc/pre_process/m_global_parameters.fpp
• Added initialization of moving immersed boundary parameters
moving_ibmandvelwith default valuesm_derived_types.fpp
Add moving immersed boundary fields to patch parameterssrc/common/m_derived_types.fpp
• Added
moving_ibminteger flag andvelvelocity array toib_patch_parameterstypem_checker.fpp
Add placeholder for moving IBM validationsrc/pre_process/m_checker.fpp
• Added placeholder
s_check_moving_IBMsubroutine for futurevalidation
m_start_up.fpp
Integrate moving immersed boundary updates in startupsrc/simulation/m_start_up.fpp
• Added conditional call to
s_update_mibwhen moving immersedboundaries are present
m_start_up.fpp
Update startup module imports for separated patchessrc/pre_process/m_start_up.fpp
• Updated module imports to use separated
m_ib_patchesandm_icpp_patchescase.py
Enhance case FPP generation for cross-target compatibilitytoolchain/mfc/case.py
• Modified FPP generation to include pre-processing includes in
simulation target
• Added support for
@:analyticalfunction accessacross targets
case_dicts.py
Add moving immersed boundary parameters to case dictionariestoolchain/mfc/run/case_dicts.py
• Added
moving_ibmparameter andvelvelocity components to IB patchparameter dictionaries
2 files
case.fpp
Minor formatting change in case includesrc/common/include/case.fpp
• Added empty line in analytical macro definition
run.py
Minor formatting adjustmenttoolchain/mfc/run/run.py
• Minor formatting change with extra whitespace
2 files
CMakeLists.txt
Update CMake configuration for separated modulesCMakeLists.txt
• Added exclusion of
m_compute_levelset.fppandm_ib_patches.fppfrompost_process target
• Added
stdc++library linking for SILO supportsettings.json
Disable fortls language server in VSCode settings.vscode/settings.json
• Disabled fortls language server by setting
fortran.fortls.disabledto true
1 files
m_ib_patches.fpp
New immersed boundary patches module with geometric shapessrc/common/m_ib_patches.fpp
• Creates a new module
m_ib_patchesdedicated to immersed boundary(IB) patch handling
• Implements geometric shape functions for IB
patches including circles, rectangles, spheres, cuboids, cylinders,
airfoils, and STL models
• Adds coordinate conversion utilities for
cylindrical to cartesian and spherical coordinates
• Provides levelset
computation capabilities for various geometric shapes used in immersed
boundary methods
6 files