Skip to content

Commit 9898d6b

Browse files
authored
Merge branch 'MFlowCode:master' into source
2 parents 1dcd10d + 465bd4f commit 9898d6b

File tree

23 files changed

+1824
-615
lines changed

23 files changed

+1824
-615
lines changed

docs/documentation/case.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -652,15 +652,17 @@ Implementation of the parameters into the model follow [Ando (2010)](references.
652652

653653
### 10. Velocity Field Setup
654654

655-
| Parameter | Type | Description |
656-
| ---: | :----: | :--- |
657-
| `perturb_flow` | Logical | Perturb the initlal velocity field by random noise |
658-
| `perturb_flow_fluid`| Integer | Fluid density whose flow is to be perturbed |
659-
| `perturb_flow_mag` | Real | Set the magnitude of flow perturbations |
660-
| `perturb_sph` | Logical | Perturb the initial partial density by random noise |
661-
| `perturb_sph_fluid` | Integer | Fluid component whose partial density is to be perturbed |
662-
| `vel_profile` | Logical | Set the mean streamwise velocity to hyperbolic tangent profile |
663-
| `instability_wave` | Logical | Perturb the initial velocity field by instability waves |
655+
| Parameter | Type | Description |
656+
| ---: | :----: | :--- |
657+
| `perturb_flow` | Logical | Perturb the initlal velocity field by random noise |
658+
| `perturb_flow_fluid` | Integer | Fluid density whose flow is to be perturbed |
659+
| `perturb_flow_mag` | Real | Set the magnitude of flow perturbations |
660+
| `perturb_sph` | Logical | Perturb the initial partial density by random noise |
661+
| `perturb_sph_fluid` | Integer | Fluid component whose partial density is to be perturbed |
662+
| `mixlayer_vel_profile` | Logical | Set the mean streamwise velocity to hyperbolic tangent profile |
663+
| `mixlayer_vel_coef` | Real | Coefficient for the hyperbolic tangent profile of a mixing layer |
664+
| `mixlayer_perturb` | Logical | Perturb the initial velocity field by instability waves |
665+
| `mixlayer_domain` | Real | Domain size of a mixing layer for the linear stability analysis |
664666

665667
The table lists velocity field parameters.
666668
The parameters are optionally used to define initial velocity profiles and perturbations.
@@ -675,9 +677,15 @@ The parameters are optionally used to define initial velocity profiles and pertu
675677

676678
- `perturb_sph_fluid` specifies the fluid component whose partial density is to be perturbed.
677679

678-
- `vel_profile` activates setting the mean streamwise velocity to hyperbolic tangent profile. This option works only for 2D and 3D cases.
680+
- `mixlayer_vel_profile` activates setting of the mean streamwise velocity to hyperbolic tangent profile. This option works only for 2D and 3D cases.
679681

680-
- `instability_wave` 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] = -5`, and ``vel_profile = 'T'``.
682+
- `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:
683+
684+
$$ u = patch\_icpp(1)\%vel(1) * tanh(y\_cc * mixlayer\_vel\_profile) $$
685+
686+
- `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'`.
687+
688+
- `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$.
681689

682690
### 11. Phase Change Model
683691
| Parameter | Type | Description |

docs/documentation/expectedPerformance.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ These are reported as (X/Y cores), where X is the used cores, and Y is the total
3434
| NVIDIA RTX6000 (SP GPU) | 1 GPU | 3.9 | NVHPC 22.11 | GT Phoenix |
3535
| AMD EPYC 7763 (Milan) | 64/64 cores | 4.1 | GNU 11.4.0 | NCSA Delta |
3636
| AMD EPYC 7713 (Milan) | 64/64 cores | 5.0 | GNU 12.3.0 | GT Phoenix |
37+
| Intel Xeon Platinum 8480CL (Sapphire Rapids) | 56/56 cores | 5.0 | NVHPC 24.5 | GT Phoenix |
3738
| Intel Xeon Gold 6454S (Sapphire Rapids) | 32/32 cores | 5.6 | NVHPC 24.5 | GT Rogues Gallery |
3839
| Intel Xeon Platinum 8462Y+ (Sapphire Rapids) | 32/32 cores | 6.2 | GNU 12.3.0 | GT ICE |
3940
| Intel Xeon Gold 6548Y+ (Emerald Rapids) | 32/32 cores | 6.6 | Intel oneAPI 2021.9 | GT ICE |
Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
import json
2+
import math
3+
4+
Mu = 1.84E-05
5+
gam_a = 1.4
6+
gam_b = 1.1
7+
8+
9+
x0 = 10E-06
10+
p0 = 101325.
11+
rho0 = 1.E+03
12+
c0 = math.sqrt( p0/rho0 )
13+
patm = 1.
14+
15+
#water props
16+
n_tait = 7.1
17+
B_tait = 3.43E+05/ p0
18+
mul0 = 1.002E-03 #viscosity
19+
ss = 0.07275 #surface tension
20+
pv = 2.3388E+03 #vapor pressure
21+
22+
gamma_v = 1.33
23+
M_v = 18.02
24+
mu_v = 0.8816E-05
25+
k_v = 0.019426
26+
27+
#air props
28+
gamma_n = 1.4
29+
M_n = 28.97
30+
mu_n = 1.8E-05
31+
k_n = 0.02556
32+
33+
#air props
34+
# gamma_gas = gamma_n
35+
gamma_gas = 1.4
36+
37+
#reference bubble size
38+
R0ref = 10.E-06
39+
40+
pa = 0.1 * 1.E+06 / 101325.
41+
42+
#Characteristic velocity
43+
uu = math.sqrt( p0/rho0 )
44+
#Cavitation number
45+
Ca = (p0 - pv)/(rho0*(uu**2.))
46+
#Weber number
47+
We = rho0*(uu**2.)*R0ref/ss
48+
#Inv. bubble Reynolds number
49+
Re_inv = mul0/(rho0*uu*R0ref)
50+
51+
vft = 1E-12
52+
vf0 = 1E-03
53+
54+
cact = math.sqrt(n_tait*(p0 + p0*B_tait) / ((1 - vf0) * rho0) )
55+
cfl = 0.3
56+
Nx = 400
57+
Ny = 200
58+
dx = 6.E-03 / (x0*float(Nx))
59+
dt = cfl*dx*c0/cact
60+
dt = dt
61+
62+
63+
64+
Min = 1.2
65+
beta = (n_tait + 1) * Min**2 / (Min**2 * (n_tait - 1 + 2*vf0) + 2 * (1 - vf0))
66+
vel = Min * cact * (beta - 1) / beta
67+
delta = (1 - vf0) + n_tait * Min**2 * (beta - 1) * (1 + B_tait) / beta
68+
69+
# Configuring case dictionary
70+
print(json.dumps({
71+
# Logistics ================================================================
72+
'run_time_info' : 'F',
73+
# ==========================================================================
74+
75+
# Computational Domain Parameters ==========================================
76+
'x_domain%beg' : 0.0E+00,
77+
'x_domain%end' : 6.0E-03 / x0,
78+
'y_domain%beg' : 0.0E+00,
79+
'y_domain%end' : 3.0E-03 / x0,
80+
'cyl_coord' : 'F',
81+
'm' : Nx,
82+
'n' : Ny,
83+
'p' : 0,
84+
'dt' : dt,
85+
't_step_start' : 0,
86+
't_step_stop' : 1000, #3000
87+
't_step_save' : 10, #10
88+
# ==========================================================================
89+
90+
# Simulation Algorithm Parameters ==========================================
91+
'num_patches' : 2,
92+
# Use the 5 equation model
93+
'model_eqns' : 2,
94+
'alt_soundspeed' : 'F',
95+
'num_fluids' : 1,
96+
# Advect both volume fractions
97+
'adv_alphan' : 'T',
98+
# No need to ensure the volume fractions sum to unity at the end of each
99+
# time step
100+
'mpp_lim' : 'F',
101+
# Correct errors when computing speed of sound
102+
'mixture_err' : 'T',
103+
# Use TVD RK3 for time marching
104+
'time_stepper' : 3,
105+
# Reconstruct the primitive variables to minimize spurious
106+
# Use WENO5
107+
'weno_order' : 5,
108+
'weno_eps' : 1.E-16,
109+
'weno_Re_flux' : 'F',
110+
'weno_avg' : 'T',
111+
'avg_state' : 2,
112+
# Use the mapped WENO weights to maintain monotinicity
113+
'mapped_weno' : 'T',
114+
'null_weights' : 'F',
115+
'mp_weno' : 'F',
116+
# Use the HLLC Riemann solver
117+
'riemann_solver' : 2,
118+
'wave_speeds' : 1,
119+
'bc_x%beg' : -6,
120+
'bc_x%end' : -3,
121+
'bc_y%beg' : -3,
122+
'bc_y%end' : -3,
123+
# Set IB to True and add 1 patch
124+
'ib' : 'T',
125+
'num_ibs' : 1,
126+
# ==========================================================================
127+
128+
# Formatted Database Files Structure Parameters ============================
129+
# Export primitive variables in double precision with parallel
130+
# I/O to minimize I/O computational time during large simulations
131+
'format' : 1,
132+
'precision' : 2,
133+
'prim_vars_wrt' :'T',
134+
'ib_wrt' :'T',
135+
'fd_order' : 1,
136+
'omega_wrt(3)' :'T',
137+
'parallel_io' :'T',
138+
# ==========================================================================
139+
140+
#Ambient State =====================================
141+
'patch_icpp(1)%geometry' : 3,
142+
'patch_icpp(1)%x_centroid' : 3.0E-03 / x0,
143+
'patch_icpp(1)%y_centroid' : 1.50E-03 / x0,
144+
'patch_icpp(1)%length_x' : 6.0E-03 / x0,
145+
'patch_icpp(1)%length_y' : 3.0E-03 / x0,
146+
'patch_icpp(1)%alpha_rho(1)' : (1.-vf0),
147+
'patch_icpp(1)%alpha(1)' : vf0,
148+
'patch_icpp(1)%vel(1)' : 1.5,
149+
'patch_icpp(1)%vel(2)' : 0.0E+00,
150+
'patch_icpp(1)%pres' : 1.E+00,
151+
'patch_icpp(1)%r0' : 1.,
152+
'patch_icpp(1)%v0' : 0.0E+00,
153+
# # ========================================================================
154+
155+
#Shocked State =====================================
156+
'patch_icpp(2)%geometry' : 3,
157+
'patch_icpp(2)%x_centroid' : 0.5E-03 / x0,
158+
'patch_icpp(2)%y_centroid' : 1.50E-03 / x0,
159+
'patch_icpp(2)%length_x' : 1.0E-03 / x0,
160+
'patch_icpp(2)%length_y' : 3.0E-03 / x0,
161+
'patch_icpp(2)%alpha_rho(1)' : beta,
162+
'patch_icpp(2)%alpha(1)' : beta*vf0,
163+
'patch_icpp(2)%vel(1)' : vel / c0,
164+
'patch_icpp(2)%vel(2)' : 0.0E+00,
165+
'patch_icpp(2)%pres' : delta,
166+
'patch_icpp(2)%r0' : 1.,
167+
'patch_icpp(2)%v0' : 0.0E+00,
168+
'patch_icpp(2)%alter_patch(1)' : 'T',
169+
# # ========================================================================
170+
171+
# Patch: Cylinder Immersed Boundary ========================================
172+
'patch_ib(1)%geometry' : 4,
173+
'patch_ib(1)%x_centroid' : 1.5E-03 / x0,
174+
'patch_ib(1)%y_centroid' : 1.5E-03 / x0,
175+
'patch_ib(1)%c' : 1.0E-03 / x0,
176+
'patch_ib(1)%t' : 0.15,
177+
'patch_ib(1)%p' : 0.4,
178+
'patch_ib(1)%m' : 0.02,
179+
'patch_ib(1)%slip' : 'F',
180+
'patch_ib(1)%theta' : 15,
181+
# # =========================================================================
182+
'pref' : p0,
183+
'rhoref' : rho0,
184+
# Fluids Physical Parameters ===============================
185+
# Surrounding liquid
186+
'fluid_pp(1)%gamma' : 1.E+00/(n_tait-1.E+00),
187+
'fluid_pp(1)%pi_inf' : n_tait*B_tait/(n_tait-1.),
188+
'fluid_pp(1)%mul0' : mul0,
189+
'fluid_pp(1)%ss' : ss,
190+
'fluid_pp(1)%pv' : pv,
191+
'fluid_pp(1)%gamma_v' : gamma_v,
192+
'fluid_pp(1)%M_v' : M_v,
193+
'fluid_pp(1)%mu_v' : mu_v,
194+
'fluid_pp(1)%k_v' : k_v,
195+
#'fluid_pp(1)%Re(1)' : 80000,
196+
197+
# Last fluid_pp is always reserved for bubble gas state ===
198+
# if applicable ==========================================
199+
'fluid_pp(2)%gamma' : 1./(gamma_gas-1.),
200+
'fluid_pp(2)%pi_inf' : 0.0E+00,
201+
'fluid_pp(2)%gamma_v' : gamma_n,
202+
'fluid_pp(2)%M_v' : M_n,
203+
'fluid_pp(2)%mu_v' : mu_n,
204+
'fluid_pp(2)%k_v' : k_n,
205+
# ==========================================================
206+
207+
# Bubbles ==================================================
208+
'bubbles' : 'T',
209+
'bubble_model' : 2,
210+
'polytropic' : 'T',
211+
'polydisperse' : 'F',
212+
'R0_type' : 1,
213+
'poly_sigma' : 0.3,
214+
'thermal' : 3,
215+
'R0ref' : x0,
216+
'nb' : 1,
217+
'Ca' : Ca,
218+
'Web' : We,
219+
'Re_inv' : Re_inv,
220+
'qbmm' : 'F',
221+
'dist_type' : 1,
222+
'sigR' : 0.1,
223+
'sigV' : 0.3,
224+
'rhoRV' : 0.0,
225+
# ==========================================================
226+
# ==========================================================================
227+
}))

examples/2D_mixing_artificial_Ma/case.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@
9494
'avg_state' : 2,
9595
'bc_x%beg' : -1,
9696
'bc_x%end' : -1,
97-
'bc_y%beg' : -5,
98-
'bc_y%end' : -5,
97+
'bc_y%beg' : -6,
98+
'bc_y%end' : -6,
9999
# ==========================================================================
100100

101101
# Formatted Database Files Structure Parameters ============================

examples/3D_turb_mixing/case.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@
8383
'avg_state' : 2,
8484
'bc_x%beg' : -1,
8585
'bc_x%end' : -1,
86-
'bc_y%beg' : -5,
87-
'bc_y%end' : -5,
86+
'bc_y%beg' : -6,
87+
'bc_y%end' : -6,
8888
'bc_z%beg' : -1,
8989
'bc_z%end' : -1,
9090
# ==========================================================================

0 commit comments

Comments
 (0)