|
| 1 | +import json |
| 2 | +import math |
| 3 | + |
| 4 | +Mu = 1.84E-05 |
| 5 | +gam_a = 1.4 |
| 6 | + |
| 7 | +# Configuring case dictionary |
| 8 | +print(json.dumps({ |
| 9 | + # Logistics ================================================================ |
| 10 | + 'run_time_info' : 'T', |
| 11 | + # ========================================================================== |
| 12 | + |
| 13 | + # Computational Domain Parameters ========================================== |
| 14 | + # For these computations, the cylinder is placed at the (0,0,0) |
| 15 | + # domain origin. |
| 16 | + # axial direction |
| 17 | + 'x_domain%beg' : 0.0E+00, |
| 18 | + 'x_domain%end' : 8.0E-03, |
| 19 | + # r direction |
| 20 | + 'y_domain%beg' : 0.0E+00, |
| 21 | + 'y_domain%end' : 6.0E-03, |
| 22 | + 'cyl_coord' : 'F', |
| 23 | + 'm' : 199, |
| 24 | + 'n' : 139, |
| 25 | + 'p' : 0, |
| 26 | + 'cfl_adap_dt' : 'T', |
| 27 | + 'cfl_target' : 0.3, |
| 28 | + 'n_start' : 0, |
| 29 | + 't_save' : 8e-5, |
| 30 | + 't_stop' : 8e-3, |
| 31 | + # ========================================================================== |
| 32 | + |
| 33 | + # Simulation Algorithm Parameters ========================================== |
| 34 | + # Only one patches are necessary, the air tube |
| 35 | + 'num_patches' : 1, |
| 36 | + # Use the 5 equation model |
| 37 | + 'model_eqns' : 2, |
| 38 | + 'alt_soundspeed' : 'F', |
| 39 | + # One fluids: air |
| 40 | + 'num_fluids' : 1, |
| 41 | + # No need to ensure the volume fractions sum to unity at the end of each |
| 42 | + # time step |
| 43 | + 'mpp_lim' : 'F', |
| 44 | + # Correct errors when computing speed of sound |
| 45 | + 'mixture_err' : 'T', |
| 46 | + # Use TVD RK3 for time marching |
| 47 | + 'time_stepper' : 3, |
| 48 | + # Use WENO5 |
| 49 | + 'weno_order' : 5, |
| 50 | + 'weno_eps' : 1.E-16, |
| 51 | + # 'weno_Re_flux' : 'T', |
| 52 | + 'weno_avg' : 'T', |
| 53 | + 'avg_state' : 2, |
| 54 | + 'mapped_weno' : 'T', |
| 55 | + 'null_weights' : 'F', |
| 56 | + 'mp_weno' : 'T', |
| 57 | + 'riemann_solver' : 2, |
| 58 | + 'wave_speeds' : 1, |
| 59 | + # We use ghost-cell |
| 60 | + 'bc_x%beg' : -3, |
| 61 | + 'bc_x%end' : -3, |
| 62 | + 'bc_y%beg' : -2, |
| 63 | + 'bc_y%end' : -2, |
| 64 | + # Set IB to True and add 1 patch |
| 65 | + 'ib' : 'T', |
| 66 | + 'num_ibs' : 1, |
| 67 | + # ========================================================================== |
| 68 | + |
| 69 | + # Formatted Database Files Structure Parameters ============================ |
| 70 | + 'format' : 1, |
| 71 | + 'precision' : 2, |
| 72 | + 'prim_vars_wrt' :'T', |
| 73 | + 'E_wrt' :'T', |
| 74 | + 'parallel_io' :'T', |
| 75 | + 'c_wrt' :'T', |
| 76 | + # ========================================================================== |
| 77 | + |
| 78 | + # Patch: Constant Tube filled with air ===================================== |
| 79 | + # Specify the cylindrical air tube grid geometry |
| 80 | + 'patch_icpp(1)%geometry' : 3, |
| 81 | + 'patch_icpp(1)%x_centroid' : 4.0E-03, |
| 82 | + # Uniform medium density, centroid is at the center of the domain |
| 83 | + 'patch_icpp(1)%y_centroid' : 3.0E-03, |
| 84 | + 'patch_icpp(1)%length_x' : 8.0E-03, |
| 85 | + 'patch_icpp(1)%length_y' : 6.0E-03, |
| 86 | + # Specify the patch primitive variables |
| 87 | + 'patch_icpp(1)%vel(1)' : 5E+00, |
| 88 | + 'patch_icpp(1)%vel(2)' : 0.0E+00, |
| 89 | + 'patch_icpp(1)%pres' : 1.E+00, |
| 90 | + 'patch_icpp(1)%alpha_rho(1)' : 1.E+00, |
| 91 | + 'patch_icpp(1)%alpha(1)' : 1.E+00, |
| 92 | + # # ======================================================================== |
| 93 | + |
| 94 | + # Patch: Cylinder Immersed Boundary ======================================== |
| 95 | + 'patch_ib(1)%geometry' : 2, |
| 96 | + 'patch_ib(1)%x_centroid' : 1.5E-03, |
| 97 | + 'patch_ib(1)%y_centroid' : 3E-03, |
| 98 | + 'patch_ib(1)%radius' : 0.4E-03, |
| 99 | + 'patch_ib(1)%slip' : 'F', |
| 100 | + # # ======================================================================== |
| 101 | + |
| 102 | + # Fluids Physical Parameters =============================================== |
| 103 | + 'fluid_pp(1)%gamma' : 1.E+00/(gam_a-1.E+00), # 2.50(Not 1.40) |
| 104 | + 'fluid_pp(1)%pi_inf' : 0, |
| 105 | + 'fluid_pp(1)%Re(1)' : 250000, |
| 106 | + # ========================================================================== |
| 107 | +})) |
0 commit comments