Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
e0fd6e8
periodic ibs,forcing,fft,drag,
May 20, 2025
711c0fe
Merge pull request #1 from MFlowCode/master
conraddelgado May 20, 2025
bd91e4f
statistics computation
Jun 10, 2025
3b15726
autocorrelation function calc
Jun 25, 2025
aa4a876
sphere locations for phi=0.1
Jun 25, 2025
163e14b
Merge branch 'MFlowCode:master' into master
conraddelgado Aug 11, 2025
d39eca9
Reorganization for PR
conraddelgado Aug 18, 2025
c35d577
statistics verification -> test gpus
conraddelgado Aug 25, 2025
e004d22
gpu bug fix with periodic forcing
Aug 27, 2025
40efc90
mpi data output bug for filtered q
conraddelgado Aug 27, 2025
cb3ddf8
Merge branch 'MFlowCode:master' into master
conraddelgado Aug 28, 2025
30fb0e7
gpu profiling blocks
Sep 2, 2025
0a35fda
full tensor stats and data output
conraddelgado Sep 2, 2025
8ab21bd
added filtered pres stats
conraddelgado Sep 3, 2025
f1b8839
updated pressure calc in vol filter and cleanup
conraddelgado Sep 3, 2025
b85bbf0
pointer reference gpu bug in viscous stress tensor calc
Sep 4, 2025
74971f0
Merge branch 'MFlowCode:master' into master
conraddelgado Sep 5, 2025
aff2ca4
bug fix causes 1d tests to fail
conraddelgado Sep 5, 2025
622a0a6
particle drag force bug fix, accumulation
Sep 8, 2025
39f84d1
updated interphase momentum exch calc
Sep 13, 2025
def36a9
removed print statements for runs
Sep 15, 2025
2c2213d
Merge branch 'MFlowCode:master' into master
conraddelgado Sep 17, 2025
ee8d259
Delete examples/3D_ibm_sphere_periodic directory
conraddelgado Sep 17, 2025
a0d2015
batched mpiAlltoAll for tensors
conraddelgado Sep 22, 2025
4dfe3cc
gpu data allocation
conraddelgado Sep 25, 2025
9df22ab
Merge branch 'MFlowCode:master' into master
conraddelgado Sep 25, 2025
3e6aed6
batched mpiAlltoall for cons vars and tensors
Sep 25, 2025
3e81245
starting runs
Sep 28, 2025
303ffab
single precision alltoall
conraddelgado Oct 1, 2025
17c5f21
Merge branch 'MFlowCode:master' into master
conraddelgado Oct 7, 2025
8ac9838
24 batch alltoall
Oct 8, 2025
f573193
energy forcing
Oct 8, 2025
d314261
div stress tensor fix
conraddelgado Oct 21, 2025
a768d86
Merge branch 'MFlowCode:master' into master
conraddelgado Oct 23, 2025
6a94d81
Merge branch 'MFlowCode:master' into master
conraddelgado Oct 24, 2025
4a52d83
merge with master
conraddelgado Nov 5, 2025
646831b
src/common
conraddelgado Nov 5, 2025
0a4d4e5
formatting
conraddelgado Nov 5, 2025
2d90828
periodic ib bug, gp selection alg
conraddelgado Nov 13, 2025
9c6d3fa
gpu ib buff populate bug fix
conraddelgado Nov 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 154 additions & 0 deletions runs/3d_1sphere_filtering/case.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
import json
import math
import numpy as np

Mu = 1.84e-05
gam_a = 1.4
R = 287.0

D = 0.1

P = 101325 # Pa
rho = 1.225 # kg/m^3

T = P/(rho*R)

M = 1.2
Re = 1500.0
v1 = M*(gam_a*P/rho)**(1.0/2.0)

mu = rho*v1*D/Re # dynamic viscosity for current case

#print('mu: ', mu)
#print('v1: ', v1)
#print('rho: ', rho)
#print('Kn = ' + str( np.sqrt(np.pi*gam_a/2)*(M/Re) )) # Kn < 0.01 = continuum flow

dt = 4.0E-06
Nt = 1000
t_save = 10

Nx = 63
Ny = 63
Nz = 63

# immersed boundary dictionary
ib_dict = {}
ib_dict.update({
f"patch_ib({1})%geometry": 8,
f"patch_ib({1})%x_centroid": 0.0,
f"patch_ib({1})%y_centroid": 0.0,
f"patch_ib({1})%z_centroid": 0.0,
f"patch_ib({1})%radius": D / 2,
f"patch_ib({1})%slip": "F",
})

# Configuring case dictionary
case_dict = {
# Logistics
"run_time_info": "T",
# Computational Domain Parameters
# x direction
"x_domain%beg": -5.0 * D,
"x_domain%end": 5.0 * D,
# y direction
"y_domain%beg": -5.0 * D,
"y_domain%end": 5.0 * D,
# z direction
"z_domain%beg": -5.0 * D,
"z_domain%end": 5.0 * D,
"cyl_coord": "F",
"m": Nx,
"n": Ny,
"p": Nz,
"dt": dt,
"t_step_start": 0,
"t_step_stop": Nt, # 3000
"t_step_save": t_save, # 10
"t_step_stat_start": 100,
# Simulation Algorithm Parameters
# Only one patches are necessary, the air tube
"num_patches": 1,
# Use the 5 equation model
"model_eqns": 2,
# 6 equations model does not need the K \div(u) term
"alt_soundspeed": "F",
# One fluids: air
"num_fluids": 1,
# time step
"mpp_lim": "F",
# Correct errors when computing speed of sound
"mixture_err": "T",
# Use TVD RK3 for time marching
"time_stepper": 3,
# Reconstruct the primitive variables to minimize spurious
# Use WENO5
"weno_order": 5,
"weno_eps": 1.0e-14,
"weno_Re_flux": "T",
"weno_avg": "T",
"avg_state": 2,
"mapped_weno": "T",
"null_weights": "F",
"mp_weno": "T",
"riemann_solver": 2,
"low_Mach": 1,
"wave_speeds": 1,
# periodic bc
"bc_x%beg": -1,
"bc_x%end": -1,
"bc_y%beg": -1,
"bc_y%end": -1,
"bc_z%beg": -1,
"bc_z%end": -1,
# Set IB to True and add 1 patch
"ib": "T",
"num_ibs": 1,
"viscous": "T",
# Formatted Database Files Structure Parameters
"format": 1,
"precision": 2,
"prim_vars_wrt": "T",
"E_wrt": "T",
"q_filtered_wrt": "T",
"parallel_io": "T",
# Patch: Constant Tube filled with air
# Specify the cylindrical air tube grid geometry
"patch_icpp(1)%geometry": 9,
"patch_icpp(1)%x_centroid": 0.0,
# Uniform medium density, centroid is at the center of the domain
"patch_icpp(1)%y_centroid": 0.0,
"patch_icpp(1)%z_centroid": 0.0,
"patch_icpp(1)%length_x": 10 * D,
"patch_icpp(1)%length_y": 10 * D,
"patch_icpp(1)%length_z": 10 * D,
# Specify the patch primitive variables
"patch_icpp(1)%vel(1)": v1,
"patch_icpp(1)%vel(2)": 0.0e00,
"patch_icpp(1)%vel(3)": 0.0e00,
"patch_icpp(1)%pres": P,
"patch_icpp(1)%alpha_rho(1)": rho,
"patch_icpp(1)%alpha(1)": 1.0e00,
# Patch: Sphere Immersed Boundary
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (gam_a - 1.0e00), # 2.50(Not 1.40)
"fluid_pp(1)%pi_inf": 0,
"fluid_pp(1)%Re(1)": 1.0 / mu,

# new case additions
"periodic_forcing": "T",
"periodic_ibs": "T",
"volume_filtering_momentum_eqn": "T",

"u_inf_ref": v1,
"rho_inf_ref": rho,
"T_inf_ref": T,

"store_levelset": "F",
"slab_domain_decomposition": "T",
"compute_autocorrelation": "T",
}

case_dict.update(ib_dict)

print(json.dumps(case_dict))
153 changes: 153 additions & 0 deletions runs/3d_1sphere_periodic/case.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
import json
import math
import numpy as np

Mu = 1.84e-05
gam_a = 1.4
R = 287.0

D = 0.1

P = 101325 # Pa
rho = 1.225 # kg/m^3

T = P/(rho*R)

M = 1.2
Re = 1500.0
v1 = M*(gam_a*P/rho)**(1.0/2.0)

mu = rho*v1*D/Re # dynamic viscosity for current case

#print('mu: ', mu)
#print('v1: ', v1)
#print('rho: ', rho)
#print('Kn = ' + str( np.sqrt(np.pi*gam_a/2)*(M/Re) )) # Kn < 0.01 = continuum flow

dt = 4.0E-06
Nt = 100
t_save = 10

Nx = 63
Ny = 63
Nz = 63

# immersed boundary dictionary
ib_dict = {}
ib_dict.update({
f"patch_ib({1})%geometry": 8,
f"patch_ib({1})%x_centroid": 0.0,
f"patch_ib({1})%y_centroid": 0.0,
f"patch_ib({1})%z_centroid": 0.0,
f"patch_ib({1})%radius": D / 2,
f"patch_ib({1})%slip": "F",
})

# Configuring case dictionary
case_dict = {
# Logistics
"run_time_info": "T",
# Computational Domain Parameters
# x direction
"x_domain%beg": -5.0 * D,
"x_domain%end": 5.0 * D,
# y direction
"y_domain%beg": -5.0 * D,
"y_domain%end": 5.0 * D,
# z direction
"z_domain%beg": -5.0 * D,
"z_domain%end": 5.0 * D,
"cyl_coord": "F",
"m": Nx,
"n": Ny,
"p": Nz,
"dt": dt,
"t_step_start": 0,
"t_step_stop": Nt, # 3000
"t_step_save": t_save, # 10
# Simulation Algorithm Parameters
# Only one patches are necessary, the air tube
"num_patches": 1,
# Use the 5 equation model
"model_eqns": 2,
# 6 equations model does not need the K \div(u) term
"alt_soundspeed": "F",
# One fluids: air
"num_fluids": 1,
# time step
"mpp_lim": "F",
# Correct errors when computing speed of sound
"mixture_err": "T",
# Use TVD RK3 for time marching
"time_stepper": 3,
# Reconstruct the primitive variables to minimize spurious
# Use WENO5
"weno_order": 5,
"weno_eps": 1.0e-14,
"weno_Re_flux": "T",
"weno_avg": "T",
"avg_state": 2,
"mapped_weno": "T",
"null_weights": "F",
"mp_weno": "T",
"riemann_solver": 2,
"low_Mach": 1,
"wave_speeds": 1,
# periodic bc
"bc_x%beg": -1,
"bc_x%end": -1,
"bc_y%beg": -1,
"bc_y%end": -1,
"bc_z%beg": -1,
"bc_z%end": -1,
# Set IB to True and add 1 patch
"ib": "T",
"num_ibs": 1,
"viscous": "T",
# Formatted Database Files Structure Parameters
"format": 1,
"precision": 2,
"prim_vars_wrt": "T",
"E_wrt": "T",
#"q_filtered_wrt": "T",
"parallel_io": "T",

"patch_icpp(1)%geometry": 9,
"patch_icpp(1)%x_centroid": 0.0,
# Uniform medium density, centroid is at the center of the domain
"patch_icpp(1)%y_centroid": 0.0,
"patch_icpp(1)%z_centroid": 0.0,
"patch_icpp(1)%length_x": 10 * D,
"patch_icpp(1)%length_y": 10 * D,
"patch_icpp(1)%length_z": 10 * D,
# Specify the patch primitive variables
"patch_icpp(1)%vel(1)": v1,
"patch_icpp(1)%vel(2)": 0.0e00,
"patch_icpp(1)%vel(3)": 0.0e00,
"patch_icpp(1)%pres": P,
"patch_icpp(1)%alpha_rho(1)": rho,
"patch_icpp(1)%alpha(1)": 1.0e00,
# Patch: Sphere Immersed Boundary
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (gam_a - 1.0e00), # 2.50(Not 1.40)
"fluid_pp(1)%pi_inf": 0,
"fluid_pp(1)%Re(1)": Re,

# new case additions
"periodic_forcing": "T",
"periodic_ibs": "T",
#"compute_particle_drag_vi": "F",
#"compute_particle_drag_si": "F",
#"volume_filtering_momentum_eqn": "T",

"u_inf_ref": v1,
"rho_inf_ref": rho,
"T_inf_ref": T,

"store_levelset": "F",
"slab_domain_decomposition": "T",
}

case_dict.update(ib_dict)

print(json.dumps(case_dict))
Loading