Skip to content

Commit b842f21

Browse files
authored
Merge branch 'master' into frontier-CI2
2 parents 32a8292 + 47053f8 commit b842f21

File tree

35 files changed

+1182
-1464
lines changed

35 files changed

+1182
-1464
lines changed

.typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ gam = "gam"
1717
Gam = "Gam"
1818
strang = "strang"
1919
Strang = "Strang"
20+
TKE = "TKE"
2021

2122
[files]
2223
extend-exclude = ["docs/documentation/references*", "tests/", "toolchain/cce_simulation_workgroup_256.sh"]

benchmarks/ibm/case.py

Lines changed: 32 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
dx = 1.0 / (1.0 * (Nx + 1))
2525

26-
Tend = 64e-06
26+
Tend = 1e-4
2727
Nt = 200
2828
mydt = Tend / (1.0 * Nt)
2929

@@ -48,21 +48,21 @@
4848
"t_step_stop": int(20 * (95 * size + 5)),
4949
"t_step_save": int(20 * (95 * size + 5)),
5050
# Simulation Algorithm Parameters
51-
"num_patches": 2,
51+
"num_patches": 1,
5252
"model_eqns": 2,
5353
"alt_soundspeed": "F",
54-
"num_fluids": 1,
54+
"num_fluids": 2,
5555
"mpp_lim": "F",
5656
"mixture_err": "F",
5757
"time_stepper": 3,
5858
"weno_order": 5,
5959
"weno_eps": 1.0e-16,
60-
"weno_Re_flux": "F",
61-
"weno_avg": "F",
62-
"mapped_weno": "F",
60+
"weno_Re_flux": "T",
61+
"weno_avg": "T",
62+
"mapped_weno": "T",
6363
"null_weights": "F",
6464
"mp_weno": "F",
65-
"riemann_solver": 1,
65+
"riemann_solver": 2,
6666
"wave_speeds": 1,
6767
"avg_state": 2,
6868
"bc_x%beg": -3,
@@ -71,48 +71,45 @@
7171
"bc_y%end": -3,
7272
"bc_z%beg": -3,
7373
"bc_z%end": -3,
74-
# Turning on Hypoelasticity
75-
"hypoelasticity": "T",
76-
"fd_order": 4,
74+
# Turn on IBM
75+
"ib": "T",
76+
"num_ibs": 1,
77+
"viscous": "T",
7778
# Formatted Database Files Structure Parameters
7879
"format": 1,
7980
"precision": 2,
8081
"prim_vars_wrt": "T",
8182
"parallel_io": "T",
8283
# Patch 1 L
8384
"patch_icpp(1)%geometry": 9,
84-
"patch_icpp(1)%x_centroid": 0.25,
85+
"patch_icpp(1)%x_centroid": 0.5,
8586
"patch_icpp(1)%y_centroid": 0.25,
8687
"patch_icpp(1)%z_centroid": 0.25,
87-
"patch_icpp(1)%length_x": 0.5,
88+
"patch_icpp(1)%length_x": 1.0,
8889
"patch_icpp(1)%length_y": 0.5,
8990
"patch_icpp(1)%length_z": 0.5,
90-
"patch_icpp(1)%vel(1)": 0.0,
91+
"patch_icpp(1)%vel(1)": 0.1,
9192
"patch_icpp(1)%vel(2)": 0,
9293
"patch_icpp(1)%vel(3)": 0,
93-
"patch_icpp(1)%pres": 1.0e8,
94-
"patch_icpp(1)%alpha_rho(1)": 1000,
95-
"patch_icpp(1)%alpha(1)": 1.0,
96-
"patch_icpp(1)%tau_e(1)": 0.0,
97-
# Patch 2 R
98-
"patch_icpp(2)%geometry": 9,
99-
"patch_icpp(2)%x_centroid": 0.75,
100-
"patch_icpp(2)%y_centroid": 0.25,
101-
"patch_icpp(2)%z_centroid": 0.25,
102-
"patch_icpp(2)%length_x": 0.5,
103-
"patch_icpp(2)%length_y": 0.5,
104-
"patch_icpp(2)%length_z": 0.5,
105-
"patch_icpp(2)%vel(1)": 0,
106-
"patch_icpp(2)%vel(2)": 0,
107-
"patch_icpp(2)%vel(3)": 0,
108-
"patch_icpp(2)%pres": 1.0e05,
109-
"patch_icpp(2)%alpha_rho(1)": 1000,
110-
"patch_icpp(2)%alpha(1)": 1.0,
111-
"patch_icpp(2)%tau_e(1)": 0.0,
94+
"patch_icpp(1)%pres": 1.0,
95+
"patch_icpp(1)%alpha_rho(1)": 0.8e00,
96+
"patch_icpp(1)%alpha(1)": 0.8e00,
97+
"patch_icpp(1)%alpha_rho(2)": 0.2e00,
98+
"patch_icpp(1)%alpha(2)": 0.2e00,
99+
# Patch: Sphere Immersed Boundary
100+
"patch_ib(1)%geometry": 8,
101+
"patch_ib(1)%x_centroid": 0.25,
102+
"patch_ib(1)%y_centroid": 0.25,
103+
"patch_ib(1)%z_centroid": 0.25,
104+
"patch_ib(1)%radius": 0.1,
112105
# Fluids Physical Parameters
113-
"fluid_pp(1)%gamma": 1.0e00 / (4.4e00 - 1.0e00),
114-
"fluid_pp(1)%pi_inf": 4.4e00 * 6.0e08 / (4.4e00 - 1.0e00),
115-
"fluid_pp(1)%G": 10e09,
106+
# Specify 2 fluids
107+
"fluid_pp(1)%gamma": 1.0e00 / (1.4 - 1.0e00),
108+
"fluid_pp(1)%pi_inf": 0,
109+
"fluid_pp(1)%Re(1)": 54000,
110+
"fluid_pp(2)%gamma": 1.0e00 / (1.4 - 1.0e00),
111+
"fluid_pp(2)%pi_inf": 0,
112+
"fluid_pp(2)%Re(1)": 54000,
116113
}
117114
)
118115
)

docs/documentation/case.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,6 @@ When ``polytropic = 'F'``, the gas compression is modeled as non-polytropic due
825825
| `mixlayer_vel_profile` | Logical | Set the mean streamwise velocity to hyperbolic tangent profile |
826826
| `mixlayer_vel_coef` | Real | Coefficient for the hyperbolic tangent profile of a mixing layer |
827827
| `mixlayer_perturb` | Logical | Perturb the initial velocity field by instability waves |
828-
| `mixlayer_domain` | Real | Domain size of a mixing layer for the linear stability analysis |
829828

830829
The table lists velocity field parameters.
831830
The parameters are optionally used to define initial velocity profiles and perturbations.
@@ -840,15 +839,13 @@ The parameters are optionally used to define initial velocity profiles and pertu
840839

841840
- `perturb_sph_fluid` specifies the fluid component whose partial density is to be perturbed.
842841

843-
- `mixlayer_vel_profile` activates setting the mean streamwise velocity to a hyperbolic tangent profile. This option works only for 2D and 3D cases.
842+
- `mixlayer_vel_profile` activates setting the mean streamwise velocity to a hyperbolic tangent profile. This option works only for `n > 0`.
844843

845844
- `mixlayer_vel_coef` is a parameter for the hyperbolic tangent profile of a mixing layer when `mixlayer_vel_profile = 'T'`. The mean streamwise velocity profile is given as:
846845

847-
$$ u = patch\_icpp(1)\%vel(1) * tanh(y\_cc * mixlayer\_vel\_profile) $$
846+
$$ u = \mbox{patch\_icpp(1)\%vel(1)} * \tanh( y_{cc} * \mbox{mixlayer\_vel\_coef}) $$
848847

849-
- `mixlayer_perturb` activates the perturbation of initial velocity by instability waves obtained from linear stability analysis for a mixing layer with hyperbolic tangent mean streamwise velocity profile. This option only works for `n > 0`, `bc_y%[beg,end] = -6`, `num_fluids = 1`, `model_eqns = 2` and `mixlayer_vel_profile = 'T'`.
850-
851-
- `mixlayer_domain` defines the domain size to compute spatial eigenvalues of the linear instability analysis when `mixlayer_perturb = 'T'`. For example, the spatial eigenvalue in `x` direction in 2D problem will be $2 \pi \alpha / (mixlayer\_domain*patch\_icpp(1)\%length\_y)$ for $\alpha = 1$, $2$ and $4$.
848+
- `mixlayer_perturb` activates the velocity perturbation for a temporal mixing layer with hyperbolic tangent mean streamwise velocity profile, using an inverter version of the spectrum-based synthetic turbulence generation method proposed by Guo et al. (2023, JFM). This option only works for `p > 0` and `mixlayer_vel_profile = 'T'`.
852849

853850
### 11. Phase Change Model
854851
| Parameter | Type | Description |

docs/documentation/references.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
- <a id="Gottlieb98">Gottlieb, S. and Shu, C.-W. (1998). Total variation diminishing runge-kutta schemes. Mathematics of computation of the American Mathematical Society, 67(221):73–85.</a>
2222

23+
- <a id="Guo23">Guo, H., Jiang, P., Ye, L., & Zhu, Y. (2023). An efficient and low-divergence method for generating inhomogeneous and anisotropic turbulence with arbitrary spectra. Journal of Fluid Mechanics, 970, A2.</a>
24+
2325
- <a id="Henrick05">Henrick, A. K., Aslam, T. D., and Powers, J. M. (2005). Mapped weighted essentially nonoscillatory schemes: achieving optimal order near critical points. Journal of Computational Physics, 207(2):542–567.</a>
2426

2527
- <a id="Borges08">Borges, R., Carmona, M., Costa, B., and Don, W. S. (2008). An improved weighted essentially non-oscillatory scheme for hyperbolic conservation laws. Journal of computational physics, 227(6):3191–3211.</a>
@@ -34,6 +36,8 @@
3436

3537
- <a id="Meng16">Meng, J. C. C. (2016). Numerical simulations of droplet aerobreakup. PhD thesis, California Institute of Technology.</a>
3638

39+
- <a id="Michalke64"> Michalke, A. (1964). On the inviscid instability of the hyperbolictangent velocity profile. Journal of Fluid Mechanics, 19(4), 543-556.</a>
40+
3741
- <a id="Pirozzoli13">Pirozzoli, S., and Colonius, T. (2013). Generalized characteristic relaxation boundary conditions for unsteady compressible flow simulations. Journal of Computational Physics, 248:109-126.</a>
3842

3943
- <a id="Preston07">Preston, A., Colonius, T., and Brennen, C. (2007). A reduced-order model of diffusive effects on the dynamics of bubbles. Physics of Fluids, 19(12):123302.</a>

examples/2D_mixing_artificial_Ma/case.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@
108108
# Mixing layer
109109
"mixlayer_vel_profile": "T",
110110
"mixlayer_vel_coef": 1.0,
111-
"mixlayer_domain": 1.0,
112-
"mixlayer_perturb": "T",
113111
# Artificial Mach number
114112
"pi_fac": pi_fac,
115113
# Fluids Physical Parameters

examples/3D_turb_mixing/case.py

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,38 @@
44

55
# SURROUNDING FLOW
66
# Nondimensional parameters
7-
Re0 = 50.0 # Reynolds number
7+
Re0 = 320.0 # Reynolds number
88
M0 = 0.2 # Mach number
99

1010
# Fluid properties
1111
gamma = 1.4
12-
pi_inf = 0.0
1312

1413
# Free stream velocity & pressure
1514
u0 = 1.0
1615
pres0 = 1.0 / (gamma * M0**2)
1716

1817
# Domain size
19-
Lx = 59.0
20-
Ly = 59.0
21-
Lz = 59.0
18+
Lx = 160.0
19+
Ly = 160.0
20+
Lz = 80.0
2221

2322
# Number of grid cells
24-
Nx = 191
25-
Ny = 191
26-
Nz = 191
23+
Nx = 1023
24+
Ny = 1023
25+
Nz = 511
2726

2827
# Grid spacing
2928
dx = Lx / float(Nx)
3029
dy = Ly / float(Ny)
3130
dz = Lz / float(Nz)
3231

3332
# Time advancement
34-
cfl = 0.1
35-
T = 100.0
36-
dt = cfl * dx / u0
33+
cfl = 0.5
34+
T = 150.0
35+
dt = cfl * dx / (u0 / M0 + 1)
3736
Ntfinal = int(T / dt)
3837
Ntstart = 0
39-
Nfiles = 100
38+
Nfiles = 30
4039
t_save = int(math.ceil((Ntfinal - 0) / float(Nfiles)))
4140
Nt = t_save * Nfiles
4241
t_step_start = Ntstart
@@ -53,6 +52,11 @@
5352
"x_domain%end": Lx,
5453
"y_domain%beg": -Ly / 2.0,
5554
"y_domain%end": Ly / 2.0,
55+
"stretch_y": "T",
56+
"a_y": 2,
57+
"y_a": -0.3 * Ly,
58+
"y_b": 0.3 * Ly,
59+
"loops_y": 2,
5660
"z_domain%beg": 0.0,
5761
"z_domain%end": Lz,
5862
"m": Nx,
@@ -68,10 +72,9 @@
6872
"num_fluids": 1,
6973
"time_stepper": 3,
7074
"weno_order": 5,
71-
"weno_eps": 1.0e-16,
72-
"weno_Re_flux": "T",
73-
"weno_avg": "T",
74-
"mapped_weno": "T",
75+
"weno_eps": 1.0e-40,
76+
"weno_Re_flux": "F",
77+
"wenoz": "T",
7578
"riemann_solver": 2,
7679
"wave_speeds": 1,
7780
"avg_state": 2,
@@ -85,7 +88,7 @@
8588
# Formatted Database Files Structure Parameters
8689
"format": 1,
8790
"precision": 2,
88-
"cons_vars_wrt": "T",
91+
"cons_vars_wrt": "F",
8992
"prim_vars_wrt": "T",
9093
"parallel_io": "T",
9194
"fd_order": 1,
@@ -99,7 +102,7 @@
99102
"patch_icpp(1)%y_centroid": 0.0,
100103
"patch_icpp(1)%z_centroid": Lz / 2.0,
101104
"patch_icpp(1)%length_x": Lx,
102-
"patch_icpp(1)%length_y": Ly,
105+
"patch_icpp(1)%length_y": 1e6,
103106
"patch_icpp(1)%length_z": Lz,
104107
"patch_icpp(1)%alpha_rho(1)": 1.0,
105108
"patch_icpp(1)%alpha(1)": 1.0,
@@ -109,8 +112,6 @@
109112
"patch_icpp(1)%pres": pres0,
110113
# Mixing layer
111114
"mixlayer_vel_profile": "T",
112-
"mixlayer_vel_coef": 1.0,
113-
"mixlayer_domain": 1.0,
114115
"mixlayer_perturb": "T",
115116
# Fluids Physical Parameters
116117
# Surrounding liquid
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Temporally evolving turbulent mixing layer (3D)
2+
3+
Reference:
4+
> Bell, J. H., & Mehta, R. D. (1990). Development of a two-stream mixing layer from tripped and untripped boundary layers. AIAA Journal, 28(12), 2034-2042.
5+
> Rogers, M. M., & Moser, R. D. (1994). Direct simulation of a self‐similar turbulent mixing layer. Physics of Fluids, 6(2), 903-923.
6+
> Pantano, C., & Sarkar, S. (2002). A study of compressibility effects in the high-speed turbulent shear layer using direct simulation. Journal of Fluid Mechanics, 451, 329-371.
7+
> Vaghefi, S. N. S. (2014). Simulation and modeling of compressible turbulent mixing layer. State University of New York at Buffalo.
8+
> Wang, X., Wang, J., & Chen, S. (2022). Compressibility effects on statistics and coherent structures of compressible turbulent mixing layers. Journal of Fluid Mechanics, 947, A38.
9+
10+
## Description
11+
This directory (`turbulence_stat`) contains sub-directories and Matlab scripts for computing turbulence statistics of 3D temporally evolving turbulent mixing layer as described below:
12+
13+
Files:
14+
- `set_user_inputs.m`: User input parameters are defined in this file.
15+
- `run_turbulence.m`: Turbulence statistics (growth rate, Reynolds stress, TKE budget) are computed and plots are generated in this file.
16+
- `average_tke_over_self_similar.m`: Averaging over self-similar period of TKE budget is performed in this file.
17+
- `submit_batch_job_*.sh`: Example scripts for batch job submission on DoD Carpenter (PBS system) and NCSA Delta (Slurm system)
18+
19+
Directories:
20+
- `log`: Log files from batch job are stored in this directory.
21+
- `reference_data`: Data from reference papers are provided in this directory.
22+
- `variables`: User inputs from `set_user_inputs.m` are saved as Matlab data (`user_inputs.mat`) in this directory.
23+
- `results`: Outputs are stored in sub-directories in the directory.

0 commit comments

Comments
 (0)