-
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.
Merge pull request #205 from RasmitDevkota/master
- Loading branch information
Showing
10 changed files
with
180 additions
and
214 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Isentropic vortex problem (2D) | ||
|
||
Reference: Coralic, V., & Colonius, T. (2014). Finite-volume Weno scheme for viscous compressible multicomponent flows. Journal of Computational Physics, 274, 95–121. https://doi.org/10.1016/j.jcp.2014.06.003 | ||
|
||
## Density | ||
|
||
![Density](alpha_rho1.png) | ||
|
||
## Density Norms | ||
|
||
![Density Norms](density_norms.png) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,122 @@ | ||
import math | ||
import json | ||
|
||
# Parameters | ||
epsilon = '5d0' | ||
alpha = '1d0' | ||
gamma = '1.4' | ||
|
||
# Initial conditions | ||
vel1_i = '0d0' | ||
vel2_i = '0d0' | ||
T_i = '1d0' | ||
alpha_rho1_i = '1d0' | ||
pres_i = '1d0' | ||
|
||
# Perturbations | ||
vel1 = f'{vel1_i} + (y - yc)*({epsilon}/(2d0*pi))*' + \ | ||
f'exp({alpha}*(1d0 - (x - xc)**2d0 - (y - yc)**2d0))' | ||
vel2 = f'{vel2_i} - (x - xc)*({epsilon}/(2d0*pi))*' + \ | ||
f'exp({alpha}*(1d0 - (x - xc)**2d0 - (y - yc)**2d0))' | ||
alpha_rho1 = f'{alpha_rho1_i}*(1d0 - ({alpha_rho1_i}/{pres_i})*({epsilon}/(2d0*pi))*' + \ | ||
f'({epsilon}/(8d0*{alpha}*({gamma} + 1d0)*pi))*' + \ | ||
f'exp(2d0*{alpha}*(1d0 - (x - xc)**2d0' + \ | ||
f'- (y - yc)**2d0))' + \ | ||
f')**{gamma}' | ||
pres = f'{pres_i}*(1d0 - ({alpha_rho1_i}/{pres_i})*({epsilon}/(2d0*pi))*' + \ | ||
f'({epsilon}/(8d0*{alpha}*({gamma} + 1d0)*pi))*' + \ | ||
f'exp(2d0*{alpha}*(1d0 - (x - xc)**2d0' + \ | ||
f'- (y - yc)**2d0))' + \ | ||
f')**({gamma} + 1d0)' | ||
|
||
# Numerical setup | ||
Nx = 399 | ||
dx = 10./(1.*(Nx+1)) | ||
|
||
c = 1.4**0.5 | ||
C = 0.3 | ||
mydt = C * dx / c * 0.01 | ||
Nt = 1/mydt | ||
|
||
# Configuring case dictionary | ||
print(json.dumps({ | ||
# Logistics ================================================================ | ||
'run_time_info' : 'T', | ||
# ========================================================================== | ||
|
||
# Computational Domain Parameters ========================================== | ||
'x_domain%beg' : -3, | ||
'x_domain%end' : 3, | ||
'y_domain%beg' : -3, | ||
'y_domain%end' : 3, | ||
'stretch_x' : True, | ||
'stretch_y' : True, | ||
'loops_x' : 2, | ||
'loops_y' : 2, | ||
'a_x' : 1.03, | ||
'a_y' : 1.03, | ||
'x_a' : -1.5, | ||
'y_a' : -1.5, | ||
'x_b' : 1.5, | ||
'y_b' : 1.5, | ||
'm' : Nx, | ||
'n' : Nx, | ||
'p' : 0, | ||
'dt' : mydt, | ||
't_step_start' : 0, | ||
't_step_stop' : 10, | ||
't_step_save' : 1, | ||
# ========================================================================== | ||
|
||
# Simulation Algorithm Parameters ========================================== | ||
'num_patches' : 1, | ||
'model_eqns' : 3, | ||
'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-16, | ||
'mapped_weno' : 'T', | ||
'null_weights' : 'F', | ||
'mp_weno' : 'F', | ||
'riemann_solver' : 2, | ||
'wave_speeds' : 1, | ||
'avg_state' : 2, | ||
'bc_x%beg' : -4, | ||
'bc_x%end' : -4, | ||
'bc_y%beg' : -4, | ||
'bc_y%end' : -4, | ||
# ========================================================================== | ||
|
||
# Formatted Database Files Structure Parameters ============================ | ||
'format' : 1, | ||
'precision' : 2, | ||
'prim_vars_wrt' :'T', | ||
'parallel_io' :'F', | ||
'omega_wrt(3)' :'T', | ||
'fd_order' : 2, | ||
# ========================================================================== | ||
|
||
# Patch 1 ================================================================== | ||
'patch_icpp(1)%geometry' : 3, | ||
'patch_icpp(1)%x_centroid' : 0, | ||
'patch_icpp(1)%y_centroid' : 0, | ||
'patch_icpp(1)%length_x' : 10., | ||
'patch_icpp(1)%length_y' : 10., | ||
'patch_icpp(1)%vel(1)' : vel1, | ||
'patch_icpp(1)%vel(2)' : vel2, | ||
'patch_icpp(1)%pres' : pres, | ||
'patch_icpp(1)%alpha_rho(1)' : alpha_rho1, | ||
'patch_icpp(1)%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, | ||
# ========================================================================== | ||
})) | ||
|
||
# ============================================================================== |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Oops, something went wrong.