-
Notifications
You must be signed in to change notification settings - Fork 119
Add rotating mibms #1014
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
Merged
sbryngelson
merged 49 commits into
MFlowCode:master
from
danieljvickers:add-rotating-mibms
Oct 17, 2025
Merged
Add rotating mibms #1014
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
d953d5b
Pushing from local
danieljvickers 9f6af97
Succesfully added RK time stepping
danieljvickers 8d3941d
Finalizing time-step module
danieljvickers 734b649
Addded handlers for new case file parameters
danieljvickers e1c3b3f
added hooks for a rotation matrix
danieljvickers effd324
Added the rotation matrix calculation, which will be needed for ident…
danieljvickers ac0013d
Finished adding velocity update, but now I need to fix compiler errors
danieljvickers 50799ab
Added some inverse rotation calculations to the square case
danieljvickers c04cfae
Ready to test with a rotated square
danieljvickers e80952b
Ran test case and everything appears to be working
danieljvickers 6ddc795
Spelling and formatting run
danieljvickers ce5f071
Fixed single-precision building
danieljvickers 007949d
Updated patch_IB rotation values
danieljvickers ddfcd0f
Updated 2D airfoil
danieljvickers 0cabfff
Finished adding support for existing IB geometries. They will all now…
danieljvickers 372ddf0
Fixed compiler issue with airfoil changes. All tests pass locally
danieljvickers 603b42f
Updated rectangle levelset
danieljvickers ab29c8a
Swapped out Id values
danieljvickers 71437fd
Modified the cuboid levelset to use local coords
danieljvickers fcccef7
Final levelset calculation updated
danieljvickers d13de48
Fixed compiling errors'
danieljvickers 91e0f50
Temporary fix for issue involving cuboid normal vector selection. Com…
danieljvickers 42e1177
Fixed airfoil shape, but it is not rotating yet
danieljvickers 367bea6
I am dumb. Do not look at this commit. It has nothing for you.
danieljvickers 24b25ec
Need to generate new golden files for the locations of the airfoil ar…
danieljvickers c6c55b7
Updated the golden files for this test case after realizing that ther…
danieljvickers c7c8d8a
Formatting and spelling
danieljvickers 6b1ee94
Changes to the case file to support new rotational system
danieljvickers 3208814
Resolved memory not being reset for rectangles and cuboids. Also fixe…
danieljvickers 9dc62dd
Fixing macOS runners failing due to contera version difference
danieljvickers 6febe45
Ran formatting
danieljvickers 78fd281
Fixed issue with pre-processing not applying correct initial rotation…
danieljvickers 7cf947e
Formatting
danieljvickers 63c87c5
Adding OpenMP/OpenACC tags for vecturs used in paralel loop for GPU s…
danieljvickers 1af3670
found an error in 3d Airfoil case that is unrelated to the frontier C…
danieljvickers 5a60a7f
Merge branch 'master' into add-rotating-mibms
danieljvickers 272ca02
Build with one task for testing
wilfonba 8fc4902
.github
danieljvickers 64fa336
Found my error. Thanks Ben for being a rubber ducky :)
danieljvickers 29db19a
Integrated with new time stepper code
danieljvickers c29ec88
Resolved error. Ready to merge
danieljvickers 604e1db
Merge branch 'add-rotating-mibms' of github.com:danieljvickers/MFC in…
danieljvickers cbfb2da
Formatting
danieljvickers 7560a02
Added a tumbling rectangle case
danieljvickers 8906927
Fixed GPU errors on NVHPC
danieljvickers d4a1280
Generated golden files for totating sphere
danieljvickers 876f16a
Updated case file to be longer
danieljvickers f1b6fb7
Formatting
danieljvickers 21d0594
Spelling
danieljvickers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
import json | ||
import math | ||
|
||
Mu = 1.84e-05 | ||
gam_a = 1.4 | ||
|
||
# Configuring case dictionary | ||
print( | ||
json.dumps( | ||
{ | ||
# Logistics | ||
"run_time_info": "T", | ||
# Computational Domain Parameters | ||
# For these computations, the cylinder is placed at the (0,0,0) | ||
# domain origin. | ||
# axial direction | ||
"x_domain%beg": 0.0e00, | ||
"x_domain%end": 6.0e-03, | ||
# r direction | ||
"y_domain%beg": 0.0e00, | ||
"y_domain%end": 6.0e-03, | ||
"cyl_coord": "F", | ||
"m": 200, | ||
"n": 200, | ||
"p": 0, | ||
"dt": 6.0e-6, | ||
"t_step_start": 0, | ||
"t_step_stop": 2500, # 10000, | ||
"t_step_save": 250, | ||
# Simulation Algorithm Parameters | ||
# Only one patches are necessary, the air tube | ||
"num_patches": 1, | ||
# Use the 5 equation model | ||
"model_eqns": 2, | ||
"alt_soundspeed": "F", | ||
# One fluids: air | ||
"num_fluids": 1, | ||
# time step | ||
"mpp_lim": "F", | ||
# Correct errors when computing speed of sound | ||
"mixture_err": "T", | ||
# Use TVD RK3 for time marching | ||
"time_stepper": 3, | ||
# Use WENO5 | ||
"weno_order": 5, | ||
"weno_eps": 1.0e-16, | ||
"weno_Re_flux": "T", | ||
"weno_avg": "T", | ||
"avg_state": 2, | ||
"mapped_weno": "T", | ||
"null_weights": "F", | ||
"mp_weno": "T", | ||
"riemann_solver": 2, | ||
"wave_speeds": 1, | ||
# We use ghost-cell | ||
"bc_x%beg": -3, | ||
"bc_x%end": -3, | ||
"bc_y%beg": -3, | ||
"bc_y%end": -3, | ||
# Set IB to True and add 1 patch | ||
"ib": "T", | ||
"num_ibs": 1, | ||
"viscous": "T", | ||
# Formatted Database Files Structure Parameters | ||
"format": 1, | ||
"precision": 2, | ||
"prim_vars_wrt": "T", | ||
"E_wrt": "T", | ||
"parallel_io": "T", | ||
# Patch: Constant Tube filled with air | ||
# Specify the cylindrical air tube grid geometry | ||
"patch_icpp(1)%geometry": 3, | ||
"patch_icpp(1)%x_centroid": 3.0e-03, | ||
# Uniform medium density, centroid is at the center of the domain | ||
"patch_icpp(1)%y_centroid": 3.0e-03, | ||
"patch_icpp(1)%length_x": 6.0e-03, | ||
"patch_icpp(1)%length_y": 6.0e-03, | ||
# Specify the patch primitive variables | ||
"patch_icpp(1)%vel(1)": 0.00e00, | ||
"patch_icpp(1)%vel(2)": 0.0e00, | ||
"patch_icpp(1)%pres": 1.0e00, | ||
"patch_icpp(1)%alpha_rho(1)": 1.0e00, | ||
"patch_icpp(1)%alpha(1)": 10.0e00, | ||
# Patch: Cylinder Immersed Boundary | ||
"patch_ib(1)%geometry": 3, | ||
"patch_ib(1)%x_centroid": 4.5e-03, | ||
"patch_ib(1)%y_centroid": 3.0e-03, | ||
"patch_ib(1)%length_x": 0.6e-03, | ||
"patch_ib(1)%length_y": 0.6e-03, | ||
"patch_ib(1)%slip": "F", | ||
"patch_ib(1)%moving_ibm": 1, | ||
"patch_ib(1)%vel(1)": -0.05, | ||
"patch_ib(1)%angles(1)": 0.0, # x-axis rotation in radians | ||
"patch_ib(1)%angles(2)": 0.0, # y-axis rotation | ||
"patch_ib(1)%angles(3)": 0.78539816339, # z-axis rotation | ||
"patch_ib(1)%angular_vel(1)": 0.0, # x-axis rotational velocity in radians per second | ||
"patch_ib(1)%angular_vel(2)": 0.0, # y-axis rotation | ||
"patch_ib(1)%angular_vel(3)": 100.0, # z-axis rotation | ||
# Fluids Physical Parameters | ||
"fluid_pp(1)%gamma": 1.0e00 / (gam_a - 1.0e00), # 2.50(Not 1.40) | ||
"fluid_pp(1)%pi_inf": 0, | ||
"fluid_pp(1)%Re(1)": 2500000, | ||
} | ||
) | ||
) |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
import json | ||
import math | ||
|
||
Mu = 1.84e-05 | ||
gam_a = 1.4 | ||
|
||
# Configuring case dictionary | ||
print( | ||
json.dumps( | ||
{ | ||
# Logistics | ||
"run_time_info": "T", | ||
# Computational Domain Parameters | ||
# For these computations, the sphere is placed (3,3,3)*e-3 | ||
# domain origin. | ||
"x_domain%beg": 0.0e00, | ||
"x_domain%end": 6.0e-03, | ||
"y_domain%beg": 0.0e00, | ||
"y_domain%end": 6.0e-03, | ||
"z_domain%beg": 0.0e00, | ||
"z_domain%end": 6.0e-03, | ||
"cyl_coord": "F", | ||
"m": 49, | ||
"n": 49, | ||
"p": 49, | ||
"dt": 6.0e-6, | ||
"t_step_start": 0, | ||
"t_step_stop": 250, | ||
"t_step_save": 25, | ||
# Simulation Algorithm Parameters | ||
# Only one patches are necessary, the air tube | ||
"num_patches": 1, | ||
# Use the 5 equation model | ||
"model_eqns": 2, | ||
"alt_soundspeed": "F", | ||
# One fluids: air | ||
"num_fluids": 1, | ||
# time step | ||
"mpp_lim": "F", | ||
# Correct errors when computing speed of sound | ||
"mixture_err": "T", | ||
# Use TVD RK3 for time marching | ||
"time_stepper": 3, | ||
# Use WENO5 | ||
"weno_order": 5, | ||
"weno_eps": 1.0e-16, | ||
"weno_Re_flux": "T", | ||
"weno_avg": "T", | ||
"avg_state": 2, | ||
"mapped_weno": "T", | ||
"null_weights": "F", | ||
"mp_weno": "T", | ||
"riemann_solver": 2, | ||
"wave_speeds": 1, | ||
# We use ghost-cell | ||
"bc_x%beg": -3, | ||
"bc_x%end": -3, | ||
"bc_y%beg": -3, | ||
"bc_y%end": -3, | ||
"bc_z%beg": -3, | ||
"bc_z%end": -3, | ||
# Set IB to True and add 1 patch | ||
"ib": "T", | ||
"num_ibs": 1, | ||
"viscous": "T", | ||
# Formatted Database Files Structure Parameters | ||
"format": 1, | ||
"precision": 2, | ||
"prim_vars_wrt": "T", | ||
"E_wrt": "T", | ||
"parallel_io": "T", | ||
# Patch: Constant Tube filled with air | ||
# Specify the cylindrical air tube grid geometry | ||
"patch_icpp(1)%geometry": 9, | ||
# Uniform medium density, centroid is at the center of the domain | ||
"patch_icpp(1)%x_centroid": 3.0e-03, | ||
"patch_icpp(1)%y_centroid": 3.0e-03, | ||
"patch_icpp(1)%z_centroid": 3.0e-03, | ||
"patch_icpp(1)%length_x": 6.0e-03, | ||
"patch_icpp(1)%length_y": 6.0e-03, | ||
"patch_icpp(1)%length_z": 6.0e-03, | ||
# Specify the patch primitive variables | ||
"patch_icpp(1)%vel(1)": 0.00e00, | ||
"patch_icpp(1)%vel(2)": 0.0e00, | ||
"patch_icpp(1)%vel(3)": 0.0e00, | ||
"patch_icpp(1)%pres": 1.0e00, | ||
"patch_icpp(1)%alpha_rho(1)": 1.0e00, | ||
"patch_icpp(1)%alpha(1)": 10.0e00, | ||
# Patch: Cylinder Immersed Boundary | ||
"patch_ib(1)%geometry": 8, | ||
"patch_ib(1)%x_centroid": 3.0e-03, | ||
"patch_ib(1)%y_centroid": 3.0e-03, | ||
"patch_ib(1)%z_centroid": 3.0e-03, | ||
"patch_ib(1)%radius": 1e-03, | ||
"patch_ib(1)%slip": "F", | ||
"patch_ib(1)%moving_ibm": 1, | ||
"patch_ib(1)%vel(1)": 0.0, | ||
"patch_ib(1)%angles(1)": 0.0, # x-axis rotation in radians | ||
"patch_ib(1)%angles(2)": 0.0, # y-axis rotation | ||
"patch_ib(1)%angles(3)": 0.0, # z-axis rotation | ||
"patch_ib(1)%angular_vel(1)": 0.0, # x-axis rotational velocity in radians per second | ||
"patch_ib(1)%angular_vel(2)": 0.0, # y-axis rotation | ||
"patch_ib(1)%angular_vel(3)": 100.0, # z-axis rotation | ||
# Fluids Physical Parameters | ||
"fluid_pp(1)%gamma": 1.0e00 / (gam_a - 1.0e00), # 2.50(Not 1.40) | ||
"fluid_pp(1)%pi_inf": 0, | ||
"fluid_pp(1)%Re(1)": 2500000, | ||
} | ||
) | ||
) |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.