|
| 1 | +#!/usr/bin/env python3 |
| 2 | +import math |
| 3 | +import json |
| 4 | + |
| 5 | +# Numerical setup |
| 6 | +Nx = 201 |
| 7 | +dx = 1.0 / (1.0 * (Nx + 1)) |
| 8 | + |
| 9 | +Tend = 64e-06 |
| 10 | +Nt = 4000 |
| 11 | +mydt = Tend / (1.0e00 * Nt) |
| 12 | +# print(mydt) |
| 13 | +# Configuring case dictionary |
| 14 | +print( |
| 15 | + json.dumps( |
| 16 | + { |
| 17 | + # Logistics |
| 18 | + "run_time_info": "T", |
| 19 | + # Computational Domain Parameters |
| 20 | + "x_domain%beg": 0.0e00, |
| 21 | + "x_domain%end": 1.0e00, |
| 22 | + # 'y_domain%beg' : 0.E+00, |
| 23 | + # 'y_domain%end' : 0.002, |
| 24 | + "m": Nx, |
| 25 | + "n": 0, |
| 26 | + "p": 0, |
| 27 | + "dt": mydt, |
| 28 | + "t_step_start": 0, |
| 29 | + "t_step_stop": int(Nt), |
| 30 | + "t_step_save": int(Nt / 200), |
| 31 | + # Simulation Algorithm Parameters |
| 32 | + "num_patches": 2, |
| 33 | + "model_eqns": 3, |
| 34 | + "alt_soundspeed": "F", |
| 35 | + "num_fluids": 1, |
| 36 | + "mpp_lim": "F", |
| 37 | + "mixture_err": "F", |
| 38 | + "time_stepper": 3, |
| 39 | + "weno_order": 5, |
| 40 | + "weno_eps": 1.0e-16, |
| 41 | + "weno_Re_flux": "F", |
| 42 | + "weno_avg": "F", |
| 43 | + "mapped_weno": "F", |
| 44 | + "null_weights": "F", |
| 45 | + "mp_weno": "T", |
| 46 | + "riemann_solver": 2, |
| 47 | + "wave_speeds": 1, |
| 48 | + "avg_state": 2, |
| 49 | + "bc_x%beg": -3, |
| 50 | + "bc_x%end": -3, |
| 51 | + #'bc_y%beg' : -3, |
| 52 | + #'bc_y%end' : -3, |
| 53 | + # Turning on Hyperelasticity |
| 54 | + "hyperelasticity": "T", |
| 55 | + # Formatted Database Files Structure Parameters |
| 56 | + "format": 1, |
| 57 | + "precision": 2, |
| 58 | + "prim_vars_wrt": "T", |
| 59 | + "parallel_io": "F", |
| 60 | + # Patch 1 L |
| 61 | + "patch_icpp(1)%geometry": 1, |
| 62 | + "patch_icpp(1)%x_centroid": 0.25, |
| 63 | + # 'patch_icpp(1)%y_centroid' : 0.001, |
| 64 | + "patch_icpp(1)%length_x": 0.5, |
| 65 | + # 'patch_icpp(1)%length_y' : 0.002, |
| 66 | + "patch_icpp(1)%vel(1)": 10, |
| 67 | + # 'patch_icpp(1)%vel(2)' : 100*0, |
| 68 | + "patch_icpp(1)%pres": 1.0e5, |
| 69 | + "patch_icpp(1)%alpha_rho(1)": 1000, |
| 70 | + "patch_icpp(1)%alpha(1)": 1.0, |
| 71 | + "patch_icpp(1)%tau_e(1)": 0.0, |
| 72 | + # Patch 2 R |
| 73 | + "patch_icpp(2)%geometry": 1, |
| 74 | + "patch_icpp(2)%x_centroid": 0.75, |
| 75 | + # 'patch_icpp(2)%y_centroid' : 0.001, |
| 76 | + "patch_icpp(2)%length_x": 0.5, |
| 77 | + # 'patch_icpp(2)%length_y' : 0.002, |
| 78 | + "patch_icpp(2)%vel(1)": 10, # -10, |
| 79 | + # 'patch_icpp(2)%vel(2)' : -100*0, |
| 80 | + "patch_icpp(2)%pres": 1.0e05, |
| 81 | + "patch_icpp(2)%alpha_rho(1)": 1000, |
| 82 | + "patch_icpp(2)%alpha(1)": 1.0, |
| 83 | + "patch_icpp(2)%tau_e(1)": 0.0, |
| 84 | + # Fluids Physical Parameters |
| 85 | + "fluid_pp(1)%gamma": 1.0e00 / (4.4e00 - 1.0e00), |
| 86 | + "fluid_pp(1)%pi_inf": 4.4e00 * 6.0e08 / (4.4e00 - 1.0e00), |
| 87 | + "fluid_pp(1)%G": 1.0e00, # .E+010, |
| 88 | + } |
| 89 | + ) |
| 90 | +) |
0 commit comments