Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into templates
Browse files Browse the repository at this point in the history
  • Loading branch information
wilfonba committed May 22, 2024
2 parents f171174 + b0bf8c7 commit ac7a6dd
Show file tree
Hide file tree
Showing 10 changed files with 181 additions and 134 deletions.
217 changes: 105 additions & 112 deletions benchmarks/hypo_hll/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,119 +26,112 @@
s = math.floor((ncells / 2.0) ** (1/3))
Nx, Ny, Nz = 2*s, s, s

Mu = 1.84E-05
gam_a = 1.4

D = 0.1

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

# Computational Domain Parameters ==========================================
# x direction
'x_domain%beg' : -5*D,
'x_domain%end' : 5.0*D,
# y direction
'y_domain%beg' : -2.5*D,
'y_domain%end' : 2.5*D,
# z direction
'z_domain%beg' : -2.5*D,
'z_domain%end' : 2.5*D,

'cyl_coord' : 'F',
'm' : Nx,
'n' : Ny,
'p' : Nz,
'dt' : 1.0E-7,
't_step_start' : 0,
't_step_stop' : int(20*(45*size + 5)),
't_step_save' : int(4*(45*size + 5)),
# ==========================================================================

# 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,
# Advect both volume fractions
'adv_alphan' : 'T',
# No need to ensure the volume fractions sum to unity at the end of each
# 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.E-16,
'weno_Re_flux' : 'T',
'weno_avg' : 'T',
'avg_state' : 2,
'mapped_weno' : 'T',
'null_weights' : 'F',
'mp_weno' : 'T',
'riemann_solver' : 2,
'wave_speeds' : 1,
# We use ghost-cell extrapolation
'bc_x%beg' : -3,
'bc_x%end' : -3,
'bc_y%beg' : -3,
'bc_y%end' : -3,
'bc_z%beg' : -3,
'bc_z%end' : -3,
# Set IB to True and add 1 patch
'ib' : 'T',
'num_ibs' : 1,
# ==========================================================================

# Formatted Database Files Structure Parameters ============================
'format' : 1,
'precision' : 2,
'prim_vars_wrt' :'T',
'E_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' : 5*D,
'patch_icpp(1)%length_z' : 5*D,
# Specify the patch primitive variables
'patch_icpp(1)%vel(1)' : 527.2E+00,
'patch_icpp(1)%vel(2)' : 0.0E+00,
'patch_icpp(1)%vel(3)' : 0.0E+00,
'patch_icpp(1)%pres' : 10918.2549,
'patch_icpp(1)%alpha_rho(1)' : 0.2199,
'patch_icpp(1)%alpha(1)' : 1.E+00,
# # ========================================================================

# Patch: Sphere Immersed Boundary ========================================
'patch_ib(1)%geometry' : 8,
'patch_ib(1)%x_centroid' : -3.0E-3,
'patch_ib(1)%y_centroid' : 0.0,
'patch_ib(1)%z_centroid' : 0.0,
'patch_ib(1)%radius' : D/2,
'patch_ib(1)%slip' : 'T',
# ==========================================================================

# Fluids Physical Parameters ===============================================
'fluid_pp(1)%gamma' : 1.E+00/(gam_a-1.E+00), # 2.50(Not 1.40)
'fluid_pp(1)%pi_inf' : 0,
'fluid_pp(1)%Re(1)' : 7535533.2,
# ==========================================================================
# Logistics ================================================
'run_time_info' : 'T',
# ==========================================================

# Computational Domain Parameters ==========================
'x_domain%beg' : 0.E+00,
'x_domain%end' : 1.E+00,
'y_domain%beg' : 0.E+00,
'y_domain%end' : 2.E+00,
'z_domain%beg' : 0.E+00,
'z_domain%end' : 1.E+00,
'm' : Nx,
'n' : Ny,
'p' : Nz,
'dt' : 1e-8,
't_step_start' : 0,
't_step_stop' : int(60*(95*size + 5)),
't_step_save' : int(12*(95*size + 5)),
# ==========================================================

# Simulation Algorithm Parameters ==========================
'num_patches' : 2,
'model_eqns' : 2,
'alt_soundspeed' : 'F',
'num_fluids' : 2,
'adv_alphan' : 'T',
'mpp_lim' : 'F',
'mixture_err' : 'F',
'time_stepper' : 3,
'weno_order' : 3,
'weno_eps' : 1.E-16,
'weno_Re_flux' : 'F',
'weno_avg' : 'F',
'mapped_weno' : 'F',
'null_weights' : 'F',
'mp_weno' : 'F',
'riemann_solver' : 1,
'wave_speeds' : 1,
'avg_state' : 2,
'bc_x%beg' : -3,
'bc_x%end' : -3,
'bc_y%beg' : -3,
'bc_y%end' : -3,
'bc_z%beg' : -3,
'bc_z%end' : -3,
# ==========================================================

# Turning on Hypoelasticity ================================
'hypoelasticity' : 'T',
# ==========================================================

# Formatted Database Files Structure Parameters ============
'format' : 1,
'precision' : 2,
'prim_vars_wrt' :'T',
'parallel_io' :'F',
# ==========================================================

# Patch 1 L ================================================
'patch_icpp(1)%geometry' : 9,
'patch_icpp(1)%x_centroid' : 0.35,
'patch_icpp(1)%y_centroid' : 1.0,
'patch_icpp(1)%z_centroid' : 0.5,
'patch_icpp(1)%length_x' : 0.7,
'patch_icpp(1)%length_y' : 2,
'patch_icpp(1)%length_z' : 1,
'patch_icpp(1)%vel(1)' : 0.0,
'patch_icpp(1)%vel(2)' : 0.0,
'patch_icpp(1)%vel(3)' : 0.0,
'patch_icpp(1)%pres' : 1E+09,
'patch_icpp(1)%alpha_rho(1)' : 1000,
'patch_icpp(1)%alpha_rho(2)' : 0.,
'patch_icpp(1)%alpha(1)' : 1,
'patch_icpp(1)%alpha(2)' : 0.,
'patch_icpp(1)%tau_e(1)' : 0.0,
# ==========================================================

# Patch 2 R ================================================
'patch_icpp(2)%geometry' : 9,
'patch_icpp(2)%x_centroid' : 0.85,
'patch_icpp(2)%y_centroid' : 1.0,
'patch_icpp(2)%z_centroid' : 0.5,
'patch_icpp(2)%length_x' : 0.3,
'patch_icpp(2)%length_y' : 2.0,
'patch_icpp(2)%length_z' : 1.0,
'patch_icpp(2)%vel(1)' : 0,
'patch_icpp(2)%vel(2)' : 0,
'patch_icpp(2)%vel(3)' : 0,
'patch_icpp(2)%pres' : 1E+05,
'patch_icpp(2)%alpha_rho(1)' : 0.,
'patch_icpp(2)%alpha_rho(2)' : 50.,
'patch_icpp(2)%alpha(1)' : 0,
'patch_icpp(2)%alpha(2)' : 1,
'patch_icpp(2)%tau_e(1)' : 0.0,
# ==========================================================

# Fluids Physical Parameters ===============================
'fluid_pp(1)%gamma' : 1.E+00/(4.4E+00-1.E+00),
'fluid_pp(1)%pi_inf' : 4.4E+00*6.E+08/(4.4E+00 - 1.E+00),
'fluid_pp(1)%G' : 1.E+09,
'fluid_pp(2)%gamma' : 1.E+00/(1.4E+00-1.E+00),
'fluid_pp(2)%pi_inf' : 0.,
'fluid_pp(2)%G' : 0.,
# ==========================================================
}))
# ==============================================================================
2 changes: 1 addition & 1 deletion docs/documentation/visualization.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ $$ R\_1, {\\dot R}\_1, \dots, R\_{N\_b}, {\\dot R}\_{N\_b} $$

### Step 1: Setting up your Environment

Begin by downloading the `.zip` file [here](https://gatech.box.com/s/1diud4lgequvuie5fg2ac6hcvoelndu5).
Begin by downloading the `.zip` file [here](https://www.dropbox.com/scl/fi/bdk8702oas8zqu0mk24vx/paceParaview.zip?rlkey=bov1s6lra0z7dhhrh6etniucx&st=2m9xvls4&dl=0).
This file contains two things:

- A bash script to automate the job submission process and provide instructions for remote connection
Expand Down
7 changes: 4 additions & 3 deletions src/simulation/m_mpi_proxy.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ contains
#:for VAR in ['t_step_old', 'm', 'n', 'p', 'm_glb', 'n_glb', 'p_glb', &
& 't_step_start','t_step_stop','t_step_save','t_step_print', &
& 'model_eqns','num_fluids','time_stepper', 'riemann_solver', &
& 'model_eqns','time_stepper', 'riemann_solver', &
& 'wave_speeds', 'avg_state', 'precision', 'bc_x%beg', 'bc_x%end', &
& 'bc_y%beg', 'bc_y%end', 'bc_z%beg', 'bc_z%end', 'fd_order', &
& 'num_probes', 'num_integrals', 'bubble_model', 'thermal', &
& 'R0_type', 'num_mono', 'relax_model']
& 'R0_type', 'num_mono', 'relax_model', 'num_ibs']
call MPI_BCAST(${VAR}$, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
#:endfor
Expand All @@ -157,7 +157,7 @@ contains
& 'parallel_io', 'hypoelasticity', 'bubbles', 'polytropic', &
& 'polydisperse', 'qbmm', 'monopole', 'probe_wrt', 'integral_wrt', &
& 'prim_vars_wrt', 'weno_avg', 'file_per_process', 'relax', &
& 'adv_n', 'adap_dt', 'ib', 'num_ibs' ]
& 'adv_n', 'adap_dt', 'ib' ]
call MPI_BCAST(${VAR}$, 1, MPI_LOGICAL, 0, MPI_COMM_WORLD, ierr)
#:endfor
Expand All @@ -174,6 +174,7 @@ contains
#:if not MFC_CASE_OPTIMIZATION
call MPI_BCAST(weno_order, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
call MPI_BCAST(nb, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
call MPI_BCAST(num_fluids, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
#:endif
do i = 1, num_fluids_max
Expand Down
14 changes: 8 additions & 6 deletions src/simulation/m_start_up.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ contains
if (CRAY_ACC_MODULE == "") then
call s_mpi_abort("CRAY_ACC_MODULE is not set. Exiting...")
end if
#endif
#endif
#endif
#endif

end subroutine s_read_input_file ! -------------------------------------

Expand Down Expand Up @@ -481,7 +481,7 @@ contains
else
call s_mpi_abort('File '//trim(file_loc)//' is missing. Exiting...')
end if

! Assigning local cell boundary locations
x_cb(-1:m) = x_cb_glb((start_idx(1) - 1):(start_idx(1) + m))
! Computing the cell width distribution
Expand Down Expand Up @@ -1247,7 +1247,7 @@ contains
call acc_present_dump()
#endif

if (hypoelasticity) call s_initialize_hypoelastic_module()
if (hypoelasticity) call s_initialize_hypoelastic_module()
if (relax) call s_initialize_phasechange_module()
call s_initialize_data_output_module()
call s_initialize_derived_variables_module()
Expand Down Expand Up @@ -1355,7 +1355,9 @@ contains
! carried out if the simulation is in fact not truly executed in parallel.

call s_mpi_bcast_user_inputs()

call s_initialize_parallel_io()

call s_mpi_decompose_computational_domain()

end subroutine s_initialize_mpi_domain
Expand All @@ -1371,7 +1373,7 @@ contains
end if
!$acc update device(nb, R0ref, Ca, Web, Re_inv, weight, R0, V0, bubbles, polytropic, polydisperse, qbmm, R0_type, ptil, bubble_model, thermal, poly_sigma, adv_n, adap_dt, n_idx, pi_fac)
!$acc update device(R_n, R_v, phi_vn, phi_nv, Pe_c, Tw, pv, M_n, M_v, k_n, k_v, pb0, mass_n0, mass_v0, Pe_T, Re_trans_T, Re_trans_c, Im_trans_T, Im_trans_c, omegaN , mul0, ss, gamma_v, mu_v, gamma_m, gamma_n, mu_n, gam)
!$acc update device(dx, dy, dz, x_cb, x_cc, y_cb, y_cc, z_cb, z_cc)
!$acc update device(dx, dy, dz, x_cb, x_cc, y_cb, y_cc, z_cb, z_cc)
!$acc update device(bc_x%vb1, bc_x%vb2, bc_x%vb3, bc_x%ve1, bc_x%ve2, bc_x%ve3)
!$acc update device(bc_y%vb1, bc_y%vb2, bc_y%vb3, bc_y%ve1, bc_y%ve2, bc_y%ve3)
!$acc update device(bc_z%vb1, bc_z%vb2, bc_z%vb3, bc_z%ve1, bc_z%ve2, bc_z%ve3)
Expand Down Expand Up @@ -1400,7 +1402,7 @@ contains
if (grid_geometry == 3) call s_finalize_fftw_module
call s_finalize_mpi_proxy_module()
call s_finalize_global_parameters_module()
if (relax) call s_finalize_relaxation_solver_module()
if (relax) call s_finalize_relaxation_solver_module()
if (any(Re_size > 0)) then
call s_finalize_viscous_module()
end if
Expand Down
8 changes: 5 additions & 3 deletions toolchain/dependencies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,16 @@ endif()

# SILO
if (MFC_SILO)
find_package(Git REQUIRED)

# If we are using the CCE, HDF5 is not built, and we wish to find
# the system's cray-hdf5. Otherwise, we point SILO to find HDF5 in
# our common install directory using SILO_HDF5_DIR.
ExternalProject_Add(silo
GIT_REPOSITORY "https://github.com/henryleberre/Silo"
GIT_TAG af955eb5dd009caf00c41ca51611b37c052b042c
GIT_SHALLOW ON
GIT_REPOSITORY "https://github.com/LLNL/Silo"
GIT_TAG 438477c80d32a3e1757d4584b993f382cace1535
GIT_PROGRESS ON
PATCH_COMMAND "${GIT_EXECUTABLE}" stash && "${GIT_EXECUTABLE}" apply "${CMAKE_SOURCE_DIR}/Silo.patch"
CMAKE_ARGS -DSILO_ENABLE_SHARED=OFF
-DSILO_ENABLE_SILOCK=OFF
-DSILO_ENABLE_BROWSER=OFF
Expand Down
25 changes: 25 additions & 0 deletions toolchain/dependencies/Silo.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 7405f0dc998ac104b4b5c0536bbf9b0644d85a11 Mon Sep 17 00:00:00 2001
From: Henry LE BERRE <hberre3@gatech.edu>
Date: Mon, 1 Apr 2024 17:06:21 -0400
Subject: [PATCH] CMake MFC Fixes

---
CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 111eb42..9e460f7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,7 +68,7 @@ project(Silo VERSION ${SILO_VERSION} LANGUAGES CXX C)
###-----------------------------------------------------------------------------
# location for Silo CMake includes
###-----------------------------------------------------------------------------
-set(CMAKE_MODULE_PATH ${Silo_SOURCE_DIR}/CMake)
+list(APPEND CMAKE_MODULE_PATH "${Silo_SOURCE_DIR}/CMake")

###-----------------------------------------------------------------------------
# If not already set, use a default build type of Release
--
2.45.1

Loading

0 comments on commit ac7a6dd

Please sign in to comment.