-
Notifications
You must be signed in to change notification settings - Fork 128
Immersed boundaries integration with IGR #1095
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
Open
Cowsreal
wants to merge
27
commits into
MFlowCode:master
Choose a base branch
from
Cowsreal:igribm
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
af75f84
Integrate IBM with IGR
1340497
Add comments
b07045b
Minor fixes
489bc7c
Change from using jac_sf to jac
d914ba3
add igr forward facing step example
wilfonba 3e92773
update IGR forward facing step example
wilfonba 4be08cc
Minor fixes
27ea826
Added to skipped cases and README
845c9b5
Minor fixes and formatting
a8c9629
Fix inline issue on Frontier
01e6492
Fix inlining issue on frontier
e28a2c9
Remove q_cons_vf optional variable guard
a914653
Restore elasticity branch
a29bac8
Format
b31dd3a
Minor fixes and add guard for IGR + MIBM
5a6a5a8
Minor changes
bcce655
Merge branch 'master' into igribm
sbryngelson 31fce2a
Minor changes regards to chemistry. Add guard inside case_validator f…
Cowsreal 6c756a0
merge
wilfonba e111b08
Formatting
c89cb66
Merge branch 'master' into igribm
Cowsreal 6cf419c
Merge branch 'master' into igribm
Cowsreal b68f694
Add 3D IGR bowshock case
755b013
Merge branch 'igribm' of github.com:Cowsreal/MFCMarkZhang into igribm
2a40bbf
Merge branch 'master' into igribm
Cowsreal 849a030
Fix README format
0009ca6
Merge branch 'igribm' of github.com:Cowsreal/MFCMarkZhang into igribm
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
Some comments aren't visible on the classic Files Changed page.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Forward Facing Step With IGR (2D) | ||
|
|
||
| Reference: See Section IV, b. | ||
| > Woodward, P. *(1984). The numerical simulation of two-dimensional fluid flow with strong shocks. Journal of Computational Physics, 54(1), 115–173. https://doi.org/10.1016/0021-9991(84)90140-2* | ||
|
|
||
| ## Evolved State | ||
| <img src="figure.png" height="MAX_HEIGHT"/> |
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,97 @@ | ||
| import json | ||
| import math | ||
|
|
||
| h = 0.2 | ||
|
|
||
| # Radius as a percentage of height (h) | ||
| rc = 0.2 | ||
|
|
||
| gam_a = 1.4 | ||
| p0 = 1 | ||
| rho0 = 1.4 | ||
| c0 = math.sqrt(gam_a * p0 / rho0) | ||
| v0 = 3 * c0 | ||
| mu = rho0 * v0 * h / 2e5 | ||
|
|
||
| # Configuring case dictionary | ||
| print( | ||
| json.dumps( | ||
| { | ||
| # Logistics | ||
| "run_time_info": "T", | ||
| "x_domain%beg": 0, | ||
| "x_domain%end": 15 * h, | ||
| "y_domain%beg": 0, | ||
| "y_domain%end": 5 * h, | ||
| "cyl_coord": "F", | ||
| "m": 1499, | ||
| "n": 499, | ||
| "p": 0, | ||
| "cfl_adap_dt": "T", | ||
| "cfl_target": 0.6, | ||
| "n_start": 0, | ||
| "t_save": 0.04, | ||
| "t_stop": 4, | ||
| # Simulation Algorithm Parameters | ||
| "num_patches": 1, | ||
| "model_eqns": 2, | ||
| "alt_soundspeed": "F", | ||
| "num_fluids": 1, | ||
| "mpp_lim": "F", | ||
| "mixture_err": "F", | ||
| "time_stepper": 3, | ||
| "igr": "T", | ||
| "igr_pres_lim": "T", | ||
| "igr_order": 3, | ||
| "igr_iter_solver": 1, | ||
| "num_igr_iters": 5, | ||
| "num_igr_warm_start_iters": 50, | ||
| "bc_x%beg": -3, | ||
| "bc_x%end": -3, | ||
| "bc_y%beg": -2, | ||
| "bc_y%end": -2, | ||
| "ib": "T", | ||
| "num_ibs": 3, | ||
| # Formatted Database Files Structure Parameters | ||
| "format": 1, | ||
| "precision": 2, | ||
| "prim_vars_wrt": "T", | ||
| "parallel_io": "T", | ||
| # Patch 1 Background | ||
| "patch_icpp(1)%geometry": 3, | ||
| "patch_icpp(1)%x_centroid": 7.5 * h, | ||
| "patch_icpp(1)%y_centroid": 2.5 * h, | ||
| "patch_icpp(1)%length_x": 15 * h, | ||
| "patch_icpp(1)%length_y": 5 * h, | ||
| "patch_icpp(1)%vel(1)": v0, | ||
| "patch_icpp(1)%vel(2)": 0.0, | ||
| "patch_icpp(1)%pres": p0, | ||
| "patch_icpp(1)%alpha_rho(1)": rho0, | ||
| "patch_icpp(1)%alpha(1)": 1.0, | ||
| # Patch: Slip rectangle with rounded corner | ||
| "patch_ib(1)%geometry": 3, | ||
| "patch_ib(1)%x_centroid": (9 + rc / 2) * h, | ||
| "patch_ib(1)%y_centroid": 0.5 * h, | ||
| "patch_ib(1)%length_x": (12 - rc) * h, | ||
| "patch_ib(1)%length_y": h, | ||
| "patch_ib(1)%slip": "T", | ||
| "patch_ib(2)%geometry": 3, | ||
| "patch_ib(2)%x_centroid": (3 + rc / 2) * h, | ||
| "patch_ib(2)%y_centroid": (0.5 - rc / 2) * h, | ||
| "patch_ib(2)%length_x": rc * h, | ||
| "patch_ib(2)%length_y": (1 - rc) * h, | ||
| "patch_ib(2)%slip": "T", | ||
| "patch_ib(3)%geometry": 2, | ||
| "patch_ib(3)%x_centroid": (3 + rc) * h, | ||
| "patch_ib(3)%y_centroid": (1 - rc) * h, | ||
| "patch_ib(3)%radius": rc * h, | ||
| "patch_ib(3)%slip": "T", | ||
| # Fluids Physical Parameters | ||
| "fluid_pp(1)%gamma": 1.0 / (gam_a - 1.0), | ||
| "fluid_pp(1)%pi_inf": 0.0, | ||
| "viscous": "T", | ||
| "fluid_pp(1)%Re(1)": 1 / mu, | ||
| }, | ||
| indent=4, | ||
| ) | ||
| ) | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,7 @@ | ||
| # Mach 2 Flow Over Sphere (bowshock) With IGR (3D) | ||
|
|
||
| Reference: See Section 5.4 | ||
| > Uddin, H. *(2014). A Cartesian-based embedded geometry technique with adaptive high-order finite differences for compressible flow around complex geometries. Journal of Computational Physics, 262, 379–407. https://doi.org/10.1016/j.jcp.2014.01.004* | ||
|
|
||
| ## Figure | ||
| <img src="figure.png" height="MAX_HEIGHT"/> |
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,101 @@ | ||
| import json | ||
| import math | ||
|
|
||
| gam = 1.4 | ||
|
|
||
| D = 0.1 | ||
| N = 400 | ||
|
|
||
| tf = 0.01 | ||
| saveFreq = tf / 200 | ||
|
|
||
| # Configuring case dictionary | ||
| print( | ||
| json.dumps( | ||
| { | ||
| # Logistics | ||
| "run_time_info": "T", | ||
| # Computational Domain Parameters | ||
| # x direction | ||
| "x_domain%beg": -5.0 * D, | ||
| "x_domain%end": 5.0 * D, | ||
| # y direction | ||
| "y_domain%beg": -2.5 * D, | ||
| "y_domain%end": 2.5 * D, | ||
| # z direction | ||
| "z_domain%beg": -2.5 * D, | ||
| "z_domain%end": 2.5 * D, | ||
| "cyl_coord": "F", | ||
| "m": 2 * N, | ||
| "n": N, | ||
| "p": N, | ||
| "cfl_adap_dt": "T", | ||
| "cfl_target": 0.4, | ||
| "n_start": 0, | ||
| "t_save": saveFreq, | ||
| "t_stop": tf, | ||
| # Simulation Algorithm Parameters | ||
| "num_patches": 1, | ||
| # Use the 5 equation model | ||
| "model_eqns": 2, | ||
| "alt_soundspeed": "F", | ||
| "num_fluids": 1, | ||
| "mpp_lim": "F", | ||
| "mixture_err": "T", | ||
| "time_stepper": 3, | ||
| # Use IGR5 | ||
| "igr": "T", | ||
| "igr_pres_lim": "T", | ||
| "igr_order": 5, | ||
| "alf_factor": 10, | ||
| "igr_iter_solver": 2, | ||
| "num_igr_iters": 15, | ||
| "num_igr_warm_start_iters": 50, | ||
| # We use ghost-cell extrapolation | ||
| "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 | ||
| "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", | ||
| # Main Patch: 10D:5D:5D rectangular prism centered at the (0, 0, 0) | ||
| # HCID 390 smooths the x-velocity profile in a small region around | ||
| # the sphere using a tanh profile. | ||
| "patch_icpp(1)%geometry": 9, | ||
| "patch_icpp(1)%hcid": 390, | ||
| "patch_icpp(1)%x_centroid": 0.0, | ||
| "patch_icpp(1)%y_centroid": 0.0, | ||
| "patch_icpp(1)%z_centroid": 0.0, | ||
| "patch_icpp(1)%length_x": 10 * D, | ||
| "patch_icpp(1)%length_y": 5 * D, | ||
| "patch_icpp(1)%length_z": 5 * D, | ||
| "patch_icpp(1)%vel(1)": 527.2e00, | ||
| "patch_icpp(1)%vel(2)": 0.0e00, | ||
| "patch_icpp(1)%vel(3)": 0.0e00, | ||
| "patch_icpp(1)%pres": 10918.2549, | ||
| "patch_icpp(1)%alpha_rho(1)": 0.2199, | ||
| "patch_icpp(1)%alpha(1)": 1.0e00, | ||
| # Patch: Sphere Immersed Boundary | ||
| "patch_ib(1)%geometry": 8, | ||
| "patch_ib(1)%x_centroid": -3.0 * D, | ||
| "patch_ib(1)%y_centroid": 0.0, | ||
| "patch_ib(1)%z_centroid": 0.0, | ||
| "patch_ib(1)%radius": D / 2, | ||
| "patch_ib(1)%slip": "T", | ||
| # Fluids Physical Parameters | ||
| "fluid_pp(1)%gamma": 1.0e00 / (gam - 1.0e00), | ||
Cowsreal marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "fluid_pp(1)%pi_inf": 0, | ||
| "fluid_pp(1)%Re(1)": 650000, | ||
| } | ||
| ) | ||
| ) | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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.
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: Incorrect Reynolds-number assignment:
fluid_pp(1)%Re(1)is set to1 / mu, but givenmu = rho0 * v0 * h / 2e5the correct Reynolds number should berho0 * v0 * h / mu(which yields 2e5 as intended), not1 / mu. Assign the physically-correct expression soReis dimensionless and consistent. [logic error]Severity Level: Critical 🚨
Steps of Reproduction ✅
Prompt for AI Agent 🤖