Skip to content

Commit

Permalink
new example
Browse files Browse the repository at this point in the history
  • Loading branch information
wilfonba committed Dec 23, 2024
1 parent e4b8976 commit 8383415
Showing 1 changed file with 117 additions and 0 deletions.
117 changes: 117 additions & 0 deletions examples/2D_triple_point/case.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
#!/usr/bin/env python3
import math
import json

eps = 1e-8
Nx = 699
Ny = 299

print(json.dumps({
# Logistics ================================================
'run_time_info' : 'F',
# ==========================================================

# Computational Domain Parameters ==========================
'x_domain%beg' : 0,
'x_domain%end' : 7,
'y_domain%beg' : 0,
'y_domain%end' : 3,
'm' : int(Nx),
'n' : int(Ny),
'p' : 0,
'cfl_adap_dt' : 'T',
'cfl_target' : 0.8,
'n_start' : 0,
't_stop' : 4.0,
't_save' : 0.04,
# ==========================================================

# Simulation Algorithm Parameters ==========================
'num_patches' : 3,
'model_eqns' : 2,
'alt_soundspeed' : 'F',
'num_fluids' : 2,
'mpp_lim' : 'T',
'mixture_err' : 'T',
'time_stepper' : 3,
'weno_order' : 7,
'weno_eps' : 1.E-16,
'weno_Re_flux' : 'F',
'weno_avg' : 'F',
'mapped_weno' : 'T',
'null_weights' : 'F',
'mp_weno' : 'F',
'riemann_solver' : 2,
'wave_speeds' : 1,
'avg_state' : 2,
'bc_x%beg' : -3,#11,
'bc_x%end' : -3,#12
'bc_y%beg' : -3,
'bc_y%end' : -3,
# ==========================================================

# Formatted Database Files Structure Parameters ============
'format' : 1,
'precision' : 2,
'prim_vars_wrt' :'T',
'schlieren_wrt' :'T',
'fd_order' : 4,
'schlieren_alpha(1)' : 0.5,
'schlieren_alpha(2)' : 0.5,
'parallel_io' :'T',
# ==========================================================

# Patch 1: Left state ====================================
'patch_icpp(1)%geometry' : 3,
'patch_icpp(1)%x_centroid' : 0.5,
'patch_icpp(1)%y_centroid' : 3,
'patch_icpp(1)%length_x' : 1,
'patch_icpp(1)%length_y' : 6,
'patch_icpp(1)%vel(1)' : 0.,
'patch_icpp(1)%vel(2)' : 0.,
'patch_icpp(1)%pres' : 1.,
'patch_icpp(1)%alpha_rho(1)' : (1 - eps)*1.,
'patch_icpp(1)%alpha_rho(2)' : eps,
'patch_icpp(1)%alpha(1)' : 1 - eps,
'patch_icpp(1)%alpha(2)' : eps,
# ==========================================================

# Patch 2: Top right state ================================
'patch_icpp(2)%geometry' : 3,
'patch_icpp(2)%alter_patch(1)' : 'T',
'patch_icpp(2)%x_centroid' : 4,
'patch_icpp(2)%y_centroid' : 2.25,
'patch_icpp(2)%length_x' : 6,
'patch_icpp(2)%length_y' : 1.5,
'patch_icpp(2)%vel(1)' : 0.,
'patch_icpp(2)%vel(2)' : 0.,
'patch_icpp(2)%pres' : 0.1,
'patch_icpp(2)%alpha_rho(1)' : (1-eps)*0.125,
'patch_icpp(2)%alpha_rho(2)' : eps,
'patch_icpp(2)%alpha(1)' : 1 - eps,
'patch_icpp(2)%alpha(2)' : eps,
# ==========================================================

# Patch 3: Bottom right state =============================
'patch_icpp(3)%geometry' : 3,
'patch_icpp(3)%alter_patch(1)' : 'T',
'patch_icpp(3)%x_centroid' : 4,
'patch_icpp(3)%y_centroid' : 0.75,
'patch_icpp(3)%length_x' : 6,
'patch_icpp(3)%length_y' : 1.5,
'patch_icpp(3)%vel(1)' : 0.,
'patch_icpp(3)%vel(2)' : 0.,
'patch_icpp(3)%pres' : 0.1,
'patch_icpp(3)%alpha_rho(1)' : eps,
'patch_icpp(3)%alpha_rho(2)' : (1 - eps)*1.,
'patch_icpp(3)%alpha(1)' : eps,# 0.95
'patch_icpp(3)%alpha(2)' : 1 - eps,#0.05,
# ==========================================================

# Fluids Physical Parameters ===============================
'fluid_pp(1)%gamma' : 1./(1.5 - 1.),
'fluid_pp(1)%pi_inf' : 0,
'fluid_pp(2)%gamma' : 1./(1.4 - 1.),
'fluid_pp(2)%pi_inf' : 0.,
# ==========================================================
}))

0 comments on commit 8383415

Please sign in to comment.