-
Notifications
You must be signed in to change notification settings - Fork 109
Add hard coded patched for tests #942
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
Draft
danieljvickers
wants to merge
33
commits into
MFlowCode:master
Choose a base branch
from
danieljvickers:add-hard-coded-patched-for-tests
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.
Draft
Changes from 30 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
bace49c
Added comments after digging through the toolchain to find the correc…
danieljvickers 5c86cf7
Successfully added a single patch to the preprocessor. Decided to den…
danieljvickers 36b147c
Actually fixed error. Need some better documentation to make it clear…
danieljvickers 17d0442
Some small changes to the documentation to clarify issues I saw when …
danieljvickers 2690009
All 1D example cases now work
danieljvickers f76e8cf
Added another case
danieljvickers 0544597
Added the 2D_isentropic case:
danieljvickers 523f103
Added the 2D_zero_circ_vortex case
danieljvickers 54a21c1
Added two more cases
danieljvickers 74accd8
Fixed errors with the shousher cases
danieljvickers 48143e9
More resolved test cases
danieljvickers 97a0ad8
Almost all patches work except for patches that require a 2D ciruclar…
danieljvickers 409ce90
First patch has the rework so that different HC geometries do not nee…
danieljvickers 425ca0e
Changes all of the shoucher cases to use the new geometry system
danieljvickers d897574
Updated all 1D cases
danieljvickers 28e7312
Everything is compiling
danieljvickers 26c112c
Added deprication statements. We should remove patch geometries 7, 13…
danieljvickers 380721d
Everything works except for the 2D_Zero_Circ_vortex case. Removed ref…
danieljvickers a3273b7
Forgot to add a separate case for the 2D cases. Everything works now
danieljvickers 9a80857
Merge branch 'MFlowCode:master' into add-hard-coded-patched-for-tests
danieljvickers 45d40e8
Merged in upstream and formatted
danieljvickers 1e76121
Did not intend to push this yaml file
danieljvickers 62056ce
Removed double precision intrinsics in HCID 280
danieljvickers 9b09313
Fixed spelling errors
danieljvickers 8cb0a2c
Removed all of the old analytical patches and updated the PROHIBIT st…
danieljvickers dc49cda
spelling
danieljvickers 942d19e
Removed segmentation error magic numbers:
danieljvickers 7a516aa
Added the analytical examples for reference, but also updated the too…
danieljvickers 44a4ee7
Ran the format code and linted to confirm it looks fine
danieljvickers f1526f8
Fixed one test case that was uninitialized
danieljvickers a998df9
Update src/pre_process/m_patches.fpp
danieljvickers df82956
Update src/pre_process/m_patches.fpp
danieljvickers 03622a1
Merge branch 'master' into add-hard-coded-patched-for-tests
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,74 @@ | ||
#!/usr/bin/env python3 | ||
import math | ||
import json | ||
|
||
# Numerical setup | ||
Nx = 1000 | ||
dx = 1.0 / (1.0 * (Nx + 1)) | ||
|
||
Tend, Nt = 1.8, 20000 | ||
mydt = Tend / (1.0 * Nt) | ||
|
||
# Configuring case dictionary | ||
print( | ||
json.dumps( | ||
{ | ||
# Logistics | ||
"run_time_info": "T", | ||
# Computational Domain Parameters | ||
"x_domain%beg": -5.0, | ||
"x_domain%end": 5.0, | ||
"m": Nx, | ||
"n": 0, | ||
"p": 0, | ||
"dt": mydt, | ||
"t_step_start": 0, | ||
"t_step_stop": int(Nt), | ||
"t_step_save": int(math.ceil(Nt / 10.0)), | ||
# Simulation Algorithm Parameters | ||
"num_patches": 2, | ||
"model_eqns": 2, | ||
"alt_soundspeed": "F", | ||
"num_fluids": 1, | ||
"mpp_lim": "F", | ||
"mixture_err": "F", | ||
"time_stepper": 3, | ||
"weno_order": 5, | ||
"weno_eps": 1.0e-16, | ||
"mapped_weno": "T", | ||
"null_weights": "F", | ||
"mp_weno": "F", | ||
"riemann_solver": 2, | ||
"wave_speeds": 1, | ||
"avg_state": 2, | ||
"bc_x%beg": -3, | ||
"bc_x%end": -3, | ||
# Formatted Database Files Structure Parameters | ||
"format": 1, | ||
"precision": 2, | ||
"prim_vars_wrt": "T", | ||
"parallel_io": "F", | ||
# Background to cover whole domain with basic line patch | ||
# Patch 1 Left (-5 < x < -4) | ||
"patch_icpp(1)%geometry": 1, | ||
"patch_icpp(1)%x_centroid": -4.5, | ||
"patch_icpp(1)%length_x": 1.0, | ||
"patch_icpp(1)%vel(1)": 2.629369, | ||
"patch_icpp(1)%pres": 10.3333, | ||
"patch_icpp(1)%alpha_rho(1)": 3.957143, | ||
"patch_icpp(1)%alpha(1)": 1.0, | ||
# One anlytic patch to take care of -4 < x < 5 | ||
# Patch 2 Analytic | ||
"patch_icpp(2)%geometry": 1, | ||
"patch_icpp(2)%x_centroid": 0.5, | ||
"patch_icpp(2)%length_x": 9.0, | ||
"patch_icpp(2)%vel(1)": 0.0, | ||
"patch_icpp(2)%pres": 1.0, | ||
"patch_icpp(2)%alpha_rho(1)": "1 + 0.2*sin(5*x)", | ||
"patch_icpp(2)%alpha(1)": 1.0, | ||
# Fluids Physical Parameters | ||
"fluid_pp(1)%gamma": 1.0e00 / (1.4 - 1.0e00), | ||
"fluid_pp(1)%pi_inf": 0.0, | ||
} | ||
) | ||
) |
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
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
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
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,72 @@ | ||
#!/usr/bin/env python3 | ||
import math | ||
import json | ||
|
||
# Numerical setup | ||
Nx = 999 | ||
dx = 1.0 / (1.0 * (Nx + 1)) | ||
|
||
Tend, Nt = 5, 20000 | ||
mydt = Tend / (1.0 * Nt) | ||
|
||
# Configuring case dictionary | ||
print( | ||
json.dumps( | ||
{ | ||
# Logistics | ||
"run_time_info": "T", | ||
# Computational Domain Parameters | ||
"x_domain%beg": -5.0, | ||
"x_domain%end": 5.0, | ||
"m": Nx, | ||
"n": 0, | ||
"p": 0, | ||
"dt": mydt, | ||
"t_step_start": 0, | ||
"t_step_stop": int(Nt), | ||
"t_step_save": int(math.ceil(Nt / 10.0)), | ||
# Simulation Algorithm Parameters | ||
"num_patches": 2, | ||
"model_eqns": 2, | ||
"alt_soundspeed": "F", | ||
"num_fluids": 1, | ||
"mpp_lim": "F", | ||
"mixture_err": "F", | ||
"time_stepper": 3, | ||
"weno_order": 5, | ||
"weno_eps": 1.0e-16, | ||
"mapped_weno": "T", | ||
"null_weights": "F", | ||
"mp_weno": "F", | ||
"riemann_solver": 2, | ||
"wave_speeds": 1, | ||
"avg_state": 2, | ||
"bc_x%beg": -3, | ||
"bc_x%end": -3, | ||
# Formatted Database Files Structure Parameters | ||
"format": 1, | ||
"precision": 2, | ||
"prim_vars_wrt": "T", | ||
"parallel_io": "F", | ||
# Patch 1 L (-5 < x < -4.5) | ||
"patch_icpp(1)%geometry": 1, | ||
"patch_icpp(1)%x_centroid": -4.75, | ||
"patch_icpp(1)%length_x": 0.5, | ||
"patch_icpp(1)%vel(1)": 0.523326, | ||
"patch_icpp(1)%pres": 1.805, | ||
"patch_icpp(1)%alpha_rho(1)": 1.515695, | ||
"patch_icpp(1)%alpha(1)": 1.0, | ||
# Patch 2 R (-4.5 < x < 5) | ||
"patch_icpp(2)%geometry": 1, | ||
"patch_icpp(2)%x_centroid": 0.25, | ||
"patch_icpp(2)%length_x": 9.5, | ||
"patch_icpp(2)%vel(1)": 0.0, | ||
"patch_icpp(2)%pres": 1.0, | ||
"patch_icpp(2)%alpha_rho(1)": "1 + 0.1*sin(20*x*pi)", | ||
"patch_icpp(2)%alpha(1)": 1.0, | ||
# Fluids Physical Parameters | ||
"fluid_pp(1)%gamma": 1.0e00 / (1.4 - 1.0e00), | ||
"fluid_pp(1)%pi_inf": 0.0, | ||
} | ||
) | ||
) |
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
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,102 @@ | ||
import math | ||
import json | ||
|
||
# Numerical setup | ||
Nx = 99 | ||
Ny = 99 | ||
dx = 8.0 / (1.0 * (Nx + 1)) | ||
|
||
alf_st = 0.4 | ||
|
||
p_inf = 101325 | ||
rho_inf = 1 | ||
gam = 1.4 | ||
|
||
c = math.sqrt(gam * (p_inf) / rho_inf) | ||
cfl = 0.3 | ||
mydt = cfl * dx / c | ||
Tfinal = 80 * 1 / c | ||
Nt = int(Tfinal / mydt) | ||
|
||
# Configuring case dictionary | ||
print( | ||
json.dumps( | ||
{ | ||
# Logistics | ||
"run_time_info": "T", | ||
# Computational Domain Parameters | ||
"x_domain%beg": -4, | ||
"x_domain%end": 4, | ||
"y_domain%beg": -4, | ||
"y_domain%end": 4, | ||
"m": Nx, | ||
"n": Ny, | ||
"p": 0, | ||
"dt": mydt, | ||
"t_step_start": 0, | ||
"t_step_stop": Nt, | ||
"t_step_save": int(Nt / 100), | ||
# Simulation Algorithm Parameters | ||
"num_patches": 2, | ||
"model_eqns": 2, | ||
"alt_soundspeed": "F", | ||
"num_fluids": 1, | ||
"mpp_lim": "F", | ||
"mixture_err": "F", | ||
"time_stepper": 3, | ||
"weno_order": 5, | ||
"weno_eps": 1.0e-16, | ||
"mapped_weno": "T", | ||
"null_weights": "F", | ||
"mp_weno": "F", | ||
"riemann_solver": 2, | ||
"wave_speeds": 1, | ||
"avg_state": 2, | ||
"bc_x%beg": -8, | ||
"bc_x%end": -8, | ||
"bc_y%beg": -8, | ||
"bc_y%end": -8, | ||
# Formatted Database Files Structure Parameters | ||
"format": 1, | ||
"precision": 2, | ||
"prim_vars_wrt": "T", | ||
"parallel_io": "T", | ||
"omega_wrt(3)": "T", | ||
"fd_order": 2, | ||
# Patch 1 | ||
"patch_icpp(1)%geometry": 3, | ||
"patch_icpp(1)%x_centroid": 0, | ||
"patch_icpp(1)%y_centroid": 0, | ||
"patch_icpp(1)%length_x": 8.0, | ||
"patch_icpp(1)%length_y": 8.0, | ||
"patch_icpp(1)%vel(1)": 0, | ||
"patch_icpp(1)%vel(2)": 0, | ||
"patch_icpp(1)%pres": p_inf, | ||
"patch_icpp(1)%alpha_rho(1)": rho_inf, | ||
"patch_icpp(1)%alpha(1)": 1.0, | ||
# Patch 2 | ||
"patch_icpp(2)%geometry": 2, | ||
"patch_icpp(2)%x_centroid": 0, | ||
"patch_icpp(2)%y_centroid": 0, | ||
"patch_icpp(2)%radius": 1.0, | ||
"patch_icpp(2)%vel(1)": 0, | ||
"patch_icpp(2)%vel(2)": 0, | ||
"patch_icpp(2)%pres": f"{p_inf}*(1 - 0.5*({gam} - 1)*({alf_st})**2*exp(0.5*(1 - sqrt(x**2 + y**2))))**({gam} / ({gam} - 1))", | ||
"patch_icpp(2)%alpha_rho(1)": f"{rho_inf}*(1 - 0.5*({gam} - 1)*({alf_st})**2*exp(0.5*(1 - sqrt(x**2 + y**2))))**(1 / ({gam} - 1))", | ||
"patch_icpp(2)%alpha(1)": 1.0, | ||
"patch_icpp(2)%alter_patch(1)": "T", | ||
# CBC Inflow / Outflow | ||
"bc_x%grcbc_in": "F", | ||
"bc_x%grcbc_out": "T", | ||
"bc_x%grcbc_vel_out": "F", | ||
"bc_x%pres_out": p_inf, | ||
"bc_y%grcbc_in": "F", | ||
"bc_y%grcbc_out": "T", | ||
"bc_y%grcbc_vel_out": "F", | ||
"bc_y%pres_out": p_inf, | ||
# Fluids Physical Parameters | ||
"fluid_pp(1)%gamma": 1.0e00 / (gam - 1.0e00), | ||
"fluid_pp(1)%pi_inf": 0.0, | ||
} | ||
) | ||
) |
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.