-
Notifications
You must be signed in to change notification settings - Fork 128
Viscous stress and ellipse ib #1102
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
danieljvickers
wants to merge
35
commits into
MFlowCode:master
Choose a base branch
from
danieljvickers:viscous-stress-and-ellipse-ib
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
35 commits
Select commit
Hold shift + click to select a range
89a0ac5
Added ellipse marker patch
danieljvickers ef446f5
Added ellipse IB patch
danieljvickers 2f9b1be
Added an ellipse immersed boundary patch
danieljvickers 693354f
added viscous stress tensor calculation
danieljvickers 31c9d1a
Finally added the compute from the viscous stress
danieljvickers 402bfe2
Added body forces
danieljvickers 82ce8be
compiles
danieljvickers eaa9e36
Getting errors with viscosity turned on. Going to take a break for th…
danieljvickers 66aa089
new viscous example
danieljvickers a6c85bb
Looks like it is approximately working
danieljvickers 9894147
Case file modifications
danieljvickers b949d6c
Found a couple errors
danieljvickers 02d45bd
Updated case file
danieljvickers 61e3308
Fixed the IB errors
danieljvickers aa5c0e4
Fixed torque not actually applying a rotation and randomly causing nans
danieljvickers 1a5a903
Changes to the falling sediment that make it more in-line with the or…
danieljvickers 4c2b02d
Minor clean ups
danieljvickers 19808ac
Found a factor of 4 error in the mass calculations
danieljvickers 9f3cb40
corrected calculations for patches
danieljvickers 9ffed4e
removed falling sediment, as it is a bad comparison, but replaced it …
danieljvickers 091a750
Added note on reference that it is from
danieljvickers 18b7dcc
Succesfully ran on phoenix on GPU
feedba2
Generated golden files
danieljvickers f7c2577
spelling and formatting
danieljvickers e909026
examples need to be commited for formatting as well
danieljvickers 5b3b328
fixed normalization error in numeric moment of inertia calculation
danieljvickers e5cd354
The normal axis in 2D is always z-hat
danieljvickers 7da350d
Cleared an old TODO for pre-process checking the ellipse patch
danieljvickers 3c41c90
Error in ellipse ib patch check
danieljvickers 137376d
Ran formatting again
danieljvickers e262ef9
Took recomendation for undefined behavior of same vector for in/out
danieljvickers 8e6ba64
Fixed build error
danieljvickers 6264518
Fixed integer comparison with real
danieljvickers ae1c63c
Small changed
danieljvickers 26d8207
Merge branch 'master' into viscous-stress-and-ellipse-ib
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
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,97 @@ | ||
| import json | ||
| import math | ||
|
|
||
| Mu = 1.84e-05 | ||
danieljvickers marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| gam_a = 1.4 | ||
|
|
||
| # Configuring case dictionary | ||
| print( | ||
danieljvickers marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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": 250, | ||
| "n": 250, | ||
| "p": 0, | ||
| "dt": 0.5e-5, | ||
| "t_step_start": 0, | ||
| "t_step_stop": 1000, # 3000 | ||
| "t_step_save": 10, # 10 | ||
| # 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.05e00, | ||
| "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)": 1.0e00, | ||
| # Patch: Cylinder Immersed Boundary | ||
| "patch_ib(1)%geometry": 6, | ||
| "patch_ib(1)%x_centroid": 1.5e-03, | ||
| "patch_ib(1)%y_centroid": 3.0e-03, | ||
| "patch_ib(1)%length_x": 0.4e-03, | ||
| "patch_ib(1)%length_y": 0.2e-03, | ||
| "patch_ib(1)%slip": "F", | ||
| # 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,138 @@ | ||
| import json | ||
| import math | ||
danieljvickers marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # This case is a recreation of the case from "Moving overlapping grids with adaptive mesh refinement for high-speed reactive and non-reactive flow" | ||
| # by William D. Henshaw and Donald W. Schwendeman | ||
|
|
||
| # fluid parameters | ||
| gam_a = 1.4 | ||
|
|
||
| # domain size and speed | ||
| mach_number = 1.5 | ||
| pre_shock_pressure = 1 | ||
| pre_shock_density = 1.4 | ||
| pre_shock_speed = 0.0 | ||
| post_shock_pressure = 2.4583 | ||
| post_shock_density = 2.6069 | ||
| post_shock_speed = 0.6944 | ||
|
|
||
| domain_size = 4.0 | ||
| wave_front = -1.5 | ||
|
|
||
| total_time = 1.5 | ||
| num_time_steps = 2000 | ||
| dt = float(total_time / num_time_steps) | ||
| num_saves = 100 | ||
| steps_to_save = int(num_time_steps / num_saves) | ||
|
|
||
| # 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": -domain_size * 0.5, | ||
| "x_domain%end": domain_size * 0.5, | ||
| # r direction | ||
| "y_domain%beg": -domain_size * 0.5, | ||
| "y_domain%end": domain_size * 0.5, | ||
| "cyl_coord": "F", | ||
| "m": 1000, | ||
| "n": 1000, | ||
| "p": 0, | ||
| "dt": dt, | ||
| "t_step_start": 0, | ||
| "t_step_stop": num_time_steps, # 10000, | ||
| "t_step_save": steps_to_save, | ||
| # Simulation Algorithm Parameters | ||
| # Only one patches are necessary, the air tube | ||
| "num_patches": 2, | ||
| # 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": -17, | ||
| "bc_x%end": -8, | ||
| "bc_y%beg": -15, | ||
| "bc_y%end": -15, | ||
| # 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(2)%geometry": 3, | ||
| # patch locations | ||
| "patch_icpp(1)%x_centroid": 0.5 * wave_front + 0.25 * domain_size, | ||
| "patch_icpp(1)%y_centroid": 0.0, | ||
| "patch_icpp(1)%length_x": 0.5 * domain_size - wave_front, | ||
| "patch_icpp(1)%length_y": domain_size, | ||
| "patch_icpp(2)%x_centroid": 0.5 * wave_front - 0.25 * domain_size, | ||
| "patch_icpp(2)%y_centroid": 0.0, | ||
| "patch_icpp(2)%length_x": 0.5 * domain_size + wave_front, | ||
| "patch_icpp(2)%length_y": domain_size, | ||
| # Specify the patch primitive variables | ||
| "patch_icpp(1)%vel(1)": pre_shock_speed, | ||
| "patch_icpp(1)%vel(2)": 0.0, | ||
| "patch_icpp(1)%pres": pre_shock_pressure, | ||
| "patch_icpp(1)%alpha_rho(1)": pre_shock_density, | ||
| "patch_icpp(1)%alpha(1)": 1.0e00, | ||
| "patch_icpp(2)%vel(1)": post_shock_speed, | ||
| "patch_icpp(2)%vel(2)": 0.0, | ||
| "patch_icpp(2)%pres": post_shock_pressure, | ||
| "patch_icpp(2)%alpha_rho(1)": post_shock_density, | ||
| "patch_icpp(2)%alpha(1)": 1.0e00, | ||
| # Patch: Cylinder Immersed Boundary | ||
| "patch_ib(1)%geometry": 2, | ||
| "patch_ib(1)%x_centroid": -0.5, | ||
| "patch_ib(1)%y_centroid": 0.0, | ||
| "patch_ib(1)%radius": 0.5, | ||
| "patch_ib(1)%slip": "T", | ||
| "patch_ib(1)%moving_ibm": 2, | ||
| "patch_ib(1)%vel(1)": 0, | ||
| "patch_ib(1)%vel(2)": 0, | ||
| "patch_ib(1)%vel(3)": 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)": 0.0, # z-axis rotation | ||
| "patch_ib(1)%mass": 0.5, # 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
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.
Uh oh!
There was an error while loading. Please reload this page.