-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Spencer Bryngelson <[email protected]> Co-authored-by: Ben Wilfong <[email protected]> Co-authored-by: Henry LE BERRE <[email protected]>
- Loading branch information
1 parent
36d989f
commit ddb3edd
Showing
9 changed files
with
644 additions
and
53 deletions.
There are no files selected for viewing
This file contains 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 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 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 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,144 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# Benchmark hypoelasticity_T_riemann_solver_1 | ||
# Additional Benchmarked Features | ||
# - hypoelasticity : T | ||
# - riemann_solver : 1 | ||
|
||
import json, math, argparse | ||
|
||
parser = argparse.ArgumentParser( | ||
prog="Benchmarkin Case 3", | ||
description="This MFC case was created for the purposes of benchmarking MFC.", | ||
formatter_class=argparse.ArgumentDefaultsHelpFormatter) | ||
|
||
parser.add_argument("dict", type=str, metavar="DICT", help=argparse.SUPPRESS) | ||
parser.add_argument("gbpp", type=int, metavar="MEM", default=16, help="Adjusts the problem size per rank to fit into [MEM] GB of GPU memory per GPU.") | ||
|
||
ARGS = vars(parser.parse_args()) | ||
DICT = json.loads(ARGS["dict"]) | ||
|
||
size = 1 if DICT["gpu"] else 0 | ||
|
||
ppg = 8000000 / 16.0 | ||
procs = DICT["nodes"] * DICT["tasks_per_node"] | ||
ncells = math.floor(ppg * procs * ARGS["gbpp"]) | ||
s = math.floor((ncells / 2.0) ** (1/3)) | ||
Nx, Ny, Nz = 2*s, s, s | ||
|
||
Mu = 1.84E-05 | ||
gam_a = 1.4 | ||
|
||
D = 0.1 | ||
|
||
# Configuring case dictionary | ||
print(json.dumps({ | ||
# Logistics ================================================================ | ||
'run_time_info' : 'T', | ||
# ========================================================================== | ||
|
||
# Computational Domain Parameters ========================================== | ||
# x direction | ||
'x_domain%beg' : -5*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' : Nx, | ||
'n' : Ny, | ||
'p' : Nz, | ||
'dt' : 1.0E-7, | ||
't_step_start' : 0, | ||
't_step_stop' : int(20*(45*size + 5)), | ||
't_step_save' : int(4*(45*size + 5)), | ||
# ========================================================================== | ||
|
||
# Simulation Algorithm Parameters ========================================== | ||
# Only one patches are necessary, the air tube | ||
'num_patches' : 1, | ||
# Use the 5 equation model | ||
'model_eqns' : 2, | ||
# 6 equations model does not need the K \div(u) term | ||
'alt_soundspeed' : 'F', | ||
# One fluids: air | ||
'num_fluids' : 1, | ||
# Advect both volume fractions | ||
'adv_alphan' : 'T', | ||
# No need to ensure the volume fractions sum to unity at the end of each | ||
# time step | ||
'mpp_lim' : 'F', | ||
# Correct errors when computing speed of sound | ||
'mixture_err' : 'T', | ||
# Use TVD RK3 for time marching | ||
'time_stepper' : 3, | ||
# Reconstruct the primitive variables to minimize spurious | ||
# Use WENO5 | ||
'weno_order' : 5, | ||
'weno_eps' : 1.E-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 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 and add 1 patch | ||
'ib' : 'T', | ||
'num_ibs' : 1, | ||
# ========================================================================== | ||
|
||
# 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, | ||
'patch_icpp(1)%x_centroid' : 0.0, | ||
# Uniform medium density, centroid is at the center of the domain | ||
'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, | ||
# Specify the patch primitive variables | ||
'patch_icpp(1)%vel(1)' : 527.2E+00, | ||
'patch_icpp(1)%vel(2)' : 0.0E+00, | ||
'patch_icpp(1)%vel(3)' : 0.0E+00, | ||
'patch_icpp(1)%pres' : 10918.2549, | ||
'patch_icpp(1)%alpha_rho(1)' : 0.2199, | ||
'patch_icpp(1)%alpha(1)' : 1.E+00, | ||
# # ======================================================================== | ||
|
||
# Patch: Sphere Immersed Boundary ======================================== | ||
'patch_ib(1)%geometry' : 8, | ||
'patch_ib(1)%x_centroid' : -3.0E-3, | ||
'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.E+00/(gam_a-1.E+00), # 2.50(Not 1.40) | ||
'fluid_pp(1)%pi_inf' : 0, | ||
'fluid_pp(1)%Re(1)' : 7535533.2, | ||
# ========================================================================== | ||
})) |
Oops, something went wrong.