Skip to content

Commit

Permalink
example cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisZYJ committed Jun 21, 2024
1 parent 0829f92 commit 462cb8e
Show file tree
Hide file tree
Showing 8 changed files with 361 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
91 changes: 91 additions & 0 deletions examples/1D_shuosher_teno/case.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
#!/usr/bin/env python3

import math
import json

# Numerical setup
Nx = 1000
dx = 1./(1.*(Nx+1))

Tend, Nt = 1.8, 2000
mydt = Tend/(1.*Nt)

# Configuring case dictionary
print(json.dumps({
# Logistics ================================================================
'run_time_info' : 'T',
# ==========================================================================

# Computational Domain Parameters ==========================================
'x_domain%beg' : 0.,
'x_domain%end' : 10.,
'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,
'adv_alphan' : 'T',
'mpp_lim' : 'F',
'mixture_err' : 'F',
'time_stepper' : 3,
'weno_order' : 5,
'weno_eps' : 1.E-40,
'teno' : 'T',
'teno_CT' : 1.E-6,
'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' : 2,
'precision' : 2,
'prim_vars_wrt' :'T',
'rho_wrt' :'T',
'parallel_io' :'T',
# ==========================================================================


# Background to cover whole domain with basic line patch
# Patch 1 Left (0 < x < 1) ===============================================
'patch_icpp(1)%geometry' : 1,
'patch_icpp(1)%x_centroid' : 0.5,
'patch_icpp(1)%length_x' : 1.,
'patch_icpp(1)%vel(1)' : 2.629,
'patch_icpp(1)%pres' : 10.333,
'patch_icpp(1)%alpha_rho(1)' : 3.857,
'patch_icpp(1)%alpha(1)' : 1.,
# ==========================================================================


# One anlytic patch to take care of 1 < x < 10
# Patch 2 Analytic =========================================================
'patch_icpp(2)%geometry' : 1,
'patch_icpp(2)%x_centroid' : 5.5,
'patch_icpp(2)%length_x' : 9.,
'patch_icpp(2)%vel(1)' : 0.,
'patch_icpp(2)%pres' : 1.,
'patch_icpp(2)%alpha_rho(1)' : '1 + 0.2*sin(5*x)',
'patch_icpp(2)%alpha(1)' : 1.,
# ==========================================================================

# Fluids Physical Parameters ===============================================
'fluid_pp(1)%gamma' : 1.E+00/(1.4-1.E+00),
'fluid_pp(1)%pi_inf' : 0.0,
# ==========================================================================
}))

# ==============================================================================
90 changes: 90 additions & 0 deletions examples/1D_shuosher_wenojs/case.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#!/usr/bin/env python3

import math
import json

# Numerical setup
Nx = 1000
dx = 1./(1.*(Nx+1))

Tend, Nt = 1.8, 2000
mydt = Tend/(1.*Nt)

# Configuring case dictionary
print(json.dumps({
# Logistics ================================================================
'run_time_info' : 'T',
# ==========================================================================

# Computational Domain Parameters ==========================================
'x_domain%beg' : 0.,
'x_domain%end' : 10.,
'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,
'adv_alphan' : 'T',
'mpp_lim' : 'F',
'mixture_err' : 'F',
'time_stepper' : 3,
'weno_order' : 5,
'weno_eps' : 1.E-40,
'mapped_weno' : 'F',
'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' : 2,
'precision' : 2,
'prim_vars_wrt' :'T',
'rho_wrt' :'T',
'parallel_io' :'T',
# ==========================================================================


# Background to cover whole domain with basic line patch
# Patch 1 Left (0 < x < 1) ===============================================
'patch_icpp(1)%geometry' : 1,
'patch_icpp(1)%x_centroid' : 0.5,
'patch_icpp(1)%length_x' : 1.,
'patch_icpp(1)%vel(1)' : 2.629,
'patch_icpp(1)%pres' : 10.333,
'patch_icpp(1)%alpha_rho(1)' : 3.857,
'patch_icpp(1)%alpha(1)' : 1.,
# ==========================================================================


# One anlytic patch to take care of 1 < x < 10
# Patch 2 Analytic =========================================================
'patch_icpp(2)%geometry' : 1,
'patch_icpp(2)%x_centroid' : 5.5,
'patch_icpp(2)%length_x' : 9.,
'patch_icpp(2)%vel(1)' : 0.,
'patch_icpp(2)%pres' : 1.,
'patch_icpp(2)%alpha_rho(1)' : '1 + 0.2*sin(5*x)',
'patch_icpp(2)%alpha(1)' : 1.,
# ==========================================================================

# Fluids Physical Parameters ===============================================
'fluid_pp(1)%gamma' : 1.E+00/(1.4-1.E+00),
'fluid_pp(1)%pi_inf' : 0.0,
# ==========================================================================
}))

# ==============================================================================
90 changes: 90 additions & 0 deletions examples/1D_shuosher_wenom/case.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#!/usr/bin/env python3

import math
import json

# Numerical setup
Nx = 1000
dx = 1./(1.*(Nx+1))

Tend, Nt = 1.8, 2000
mydt = Tend/(1.*Nt)

# Configuring case dictionary
print(json.dumps({
# Logistics ================================================================
'run_time_info' : 'T',
# ==========================================================================

# Computational Domain Parameters ==========================================
'x_domain%beg' : 0.,
'x_domain%end' : 10.,
'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,
'adv_alphan' : 'T',
'mpp_lim' : 'F',
'mixture_err' : 'F',
'time_stepper' : 3,
'weno_order' : 5,
'weno_eps' : 1.E-40,
'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' : 2,
'precision' : 2,
'prim_vars_wrt' :'T',
'rho_wrt' :'T',
'parallel_io' :'T',
# ==========================================================================


# Background to cover whole domain with basic line patch
# Patch 1 Left (0 < x < 1) ===============================================
'patch_icpp(1)%geometry' : 1,
'patch_icpp(1)%x_centroid' : 0.5,
'patch_icpp(1)%length_x' : 1.,
'patch_icpp(1)%vel(1)' : 2.629,
'patch_icpp(1)%pres' : 10.333,
'patch_icpp(1)%alpha_rho(1)' : 3.857,
'patch_icpp(1)%alpha(1)' : 1.,
# ==========================================================================


# One anlytic patch to take care of 1 < x < 10
# Patch 2 Analytic =========================================================
'patch_icpp(2)%geometry' : 1,
'patch_icpp(2)%x_centroid' : 5.5,
'patch_icpp(2)%length_x' : 9.,
'patch_icpp(2)%vel(1)' : 0.,
'patch_icpp(2)%pres' : 1.,
'patch_icpp(2)%alpha_rho(1)' : '1 + 0.2*sin(5*x)',
'patch_icpp(2)%alpha(1)' : 1.,
# ==========================================================================

# Fluids Physical Parameters ===============================================
'fluid_pp(1)%gamma' : 1.E+00/(1.4-1.E+00),
'fluid_pp(1)%pi_inf' : 0.0,
# ==========================================================================
}))

# ==============================================================================
90 changes: 90 additions & 0 deletions examples/1D_shuosher_wenoz/case.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#!/usr/bin/env python3

import math
import json

# Numerical setup
Nx = 1000
dx = 1./(1.*(Nx+1))

Tend, Nt = 1.8, 2000
mydt = Tend/(1.*Nt)

# Configuring case dictionary
print(json.dumps({
# Logistics ================================================================
'run_time_info' : 'T',
# ==========================================================================

# Computational Domain Parameters ==========================================
'x_domain%beg' : 0.,
'x_domain%end' : 10.,
'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,
'adv_alphan' : 'T',
'mpp_lim' : 'F',
'mixture_err' : 'F',
'time_stepper' : 3,
'weno_order' : 5,
'weno_eps' : 1.E-40,
'wenoz' : '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' : 2,
'precision' : 2,
'prim_vars_wrt' :'T',
'rho_wrt' :'T',
'parallel_io' :'T',
# ==========================================================================


# Background to cover whole domain with basic line patch
# Patch 1 Left (0 < x < 1) ===============================================
'patch_icpp(1)%geometry' : 1,
'patch_icpp(1)%x_centroid' : 0.5,
'patch_icpp(1)%length_x' : 1.,
'patch_icpp(1)%vel(1)' : 2.629,
'patch_icpp(1)%pres' : 10.333,
'patch_icpp(1)%alpha_rho(1)' : 3.857,
'patch_icpp(1)%alpha(1)' : 1.,
# ==========================================================================


# One anlytic patch to take care of 1 < x < 10
# Patch 2 Analytic =========================================================
'patch_icpp(2)%geometry' : 1,
'patch_icpp(2)%x_centroid' : 5.5,
'patch_icpp(2)%length_x' : 9.,
'patch_icpp(2)%vel(1)' : 0.,
'patch_icpp(2)%pres' : 1.,
'patch_icpp(2)%alpha_rho(1)' : '1 + 0.2*sin(5*x)',
'patch_icpp(2)%alpha(1)' : 1.,
# ==========================================================================

# Fluids Physical Parameters ===============================================
'fluid_pp(1)%gamma' : 1.E+00/(1.4-1.E+00),
'fluid_pp(1)%pi_inf' : 0.0,
# ==========================================================================
}))

# ==============================================================================

0 comments on commit 462cb8e

Please sign in to comment.