Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 0 additions & 2 deletions docs/documentation/case.md
Original file line number Diff line number Diff line change
Expand Up @@ -717,8 +717,6 @@ To restart the simulation from $k$-th time step, see @ref running "Restarting Ca
| `chem_wrt_T` | Logical | Write temperature field for chemistry output |
| `fft_wrt` | Logical | Enable FFT output |
| `sim_data` | Logical | Write interface and energy data files (post_process) |
| `integral_wrt` | Logical | Write integral data |
| `num_integrals` | Integer | Number of integral regions |
| `down_sample` | Logical | Enable output downsampling |
| `fd_order` | Integer | Order of finite differences for computing the vorticity and the numerical Schlieren function [1,2,4] |
| `schlieren_alpha(i)` | Real | Intensity of the numerical Schlieren computed via `alpha(i)` |
Expand Down
10 changes: 0 additions & 10 deletions src/common/m_derived_types.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,16 +428,6 @@ module m_derived_types
type(vec3_dt), allocatable, dimension(:) :: var
end type mpi_io_airfoil_ib_var

!> Derived type annexing integral regions
type integral_parameters
real(wp) :: xmin !< Min. boundary first coordinate direction
real(wp) :: xmax !< Max. boundary first coordinate direction
real(wp) :: ymin !< Min. boundary second coordinate direction
real(wp) :: ymax !< Max. boundary second coordinate direction
real(wp) :: zmin !< Min. boundary third coordinate direction
real(wp) :: zmax !< Max. boundary third coordinate direction
end type integral_parameters

!> Parameters for body force with spatial support
type spbf_parameters
real(wp) :: amp
Expand Down
130 changes: 0 additions & 130 deletions src/simulation/m_data_output.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,6 @@ contains
end if
end do

if (integral_wrt) then
do i = 1, num_integrals
write (file_path, '(A,I0,A)') '/D/integral', i, '_prim.dat'
file_path = trim(case_dir) // trim(file_path)

open (i + 70, FILE=trim(file_path), form='formatted', POSITION='append', STATUS='unknown')
end do
end if

end subroutine s_open_probe_files

!> Write stability criteria extrema to the run-time information file at the given time step
Expand Down Expand Up @@ -1155,8 +1146,6 @@ contains
real(wp) :: nondim_time !< Non-dimensional time
real(wp) :: tmp !< Temporary variable to store quantity for mpi_allreduce
integer :: npts !< Number of included integral points
real(wp) :: rad, thickness !< For integral quantities
logical :: trigger !< For integral quantities
real(wp) :: rhoYks(1:num_species)

T = dflt_T_guess
Expand Down Expand Up @@ -1525,125 +1514,6 @@ contains
end if
end do

if (integral_wrt .and. bubbles_euler) then
if (n == 0) then
do i = 1, num_integrals
int_pres = 0._wp
max_pres = 0._wp
k = 0; l = 0
npts = 0
do j = 1, m
pres = 0._wp
do s = 1, num_vels
vel(s) = 0._wp
end do
rho = 0._wp
pres = 0._wp
gamma = 0._wp
pi_inf = 0._wp
qv = 0._wp

if ((integral(i)%xmin <= x_cb(j)) .and. (integral(i)%xmax >= x_cb(j))) then
npts = npts + 1
call s_convert_to_mixture_variables(q_cons_vf, j, k, l, rho, gamma, pi_inf, qv, Re)
do s = 1, num_vels
vel(s) = q_cons_vf(eqn_idx%cont%end + s)%sf(j, k, l)/rho
end do

pres = ((q_cons_vf(eqn_idx%E)%sf(j, k, l) - 0.5_wp*(q_cons_vf(eqn_idx%mom%beg)%sf(j, k, &
& l)**2._wp)/rho)/(1._wp - q_cons_vf(eqn_idx%alf)%sf(j, k, l)) - pi_inf - qv)/gamma
int_pres = int_pres + (pres - 1._wp)**2._wp
end if
end do
int_pres = sqrt(int_pres/(1._wp*npts))

if (num_procs > 1) then
tmp = int_pres
call s_mpi_allreduce_sum(tmp, int_pres)
end if

if (proc_rank == 0) then
if (bubbles_euler .and. (num_fluids <= 2)) then
write (i + 70, '(6x,f12.6,f24.8)') nondim_time, int_pres
end if
end if
end do
else if (p == 0) then
if (num_integrals /= 3) then
call s_mpi_abort('Incorrect number of integrals')
end if

rad = integral(1)%xmax
thickness = integral(1)%xmin

do i = 1, num_integrals
int_pres = 0._wp
max_pres = 0._wp
l = 0
npts = 0
do j = 1, m
do k = 1, n
trigger = .false.
if (i == 1) then
! inner portion
if (sqrt(x_cb(j)**2._wp + y_cb(k)**2._wp) < (rad - 0.5_wp*thickness)) trigger = .true.
else if (i == 2) then
! net region
if (sqrt(x_cb(j)**2._wp + y_cb(k)**2._wp) > (rad - 0.5_wp*thickness) .and. sqrt(x_cb(j)**2._wp &
& + y_cb(k)**2._wp) < (rad + 0.5_wp*thickness)) trigger = .true.
else if (i == 3) then
! everything else
if (sqrt(x_cb(j)**2._wp + y_cb(k)**2._wp) > (rad + 0.5_wp*thickness)) trigger = .true.
end if

pres = 0._wp
do s = 1, num_vels
vel(s) = 0._wp
end do
rho = 0._wp
pres = 0._wp
gamma = 0._wp
pi_inf = 0._wp
qv = 0._wp

if (trigger) then
npts = npts + 1
call s_convert_to_mixture_variables(q_cons_vf, j, k, l, rho, gamma, pi_inf, qv, Re)
do s = 1, num_vels
vel(s) = q_cons_vf(eqn_idx%cont%end + s)%sf(j, k, l)/rho
end do

pres = ((q_cons_vf(eqn_idx%E)%sf(j, k, l) - 0.5_wp*(q_cons_vf(eqn_idx%mom%beg)%sf(j, k, &
& l)**2._wp)/rho)/(1._wp - q_cons_vf(eqn_idx%alf)%sf(j, k, l)) - pi_inf - qv)/gamma
int_pres = int_pres + abs(pres - 1._wp)
max_pres = max(max_pres, abs(pres - 1._wp))
end if
end do
end do

if (npts > 0) then
int_pres = int_pres/(1._wp*npts)
else
int_pres = 0._wp
end if

if (num_procs > 1) then
tmp = int_pres
call s_mpi_allreduce_sum(tmp, int_pres)

tmp = max_pres
call s_mpi_allreduce_max(tmp, max_pres)
end if

if (proc_rank == 0) then
if (bubbles_euler .and. (num_fluids <= 2)) then
write (i + 70, '(6x,f12.6,f24.8,f24.8)') nondim_time, int_pres, max_pres
end if
end if
end do
end if
end if

end subroutine s_write_probe_files

!> Write footer with stability criteria extrema and run-time to the information file, then close it
Expand Down
8 changes: 0 additions & 8 deletions src/simulation/m_global_parameters.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,9 +548,7 @@ contains

fd_order = dflt_int
probe_wrt = .false.
integral_wrt = .false.
num_probes = dflt_int
num_integrals = dflt_int

do i = 1, num_probes_max
probe(i)%x = dflt_real
Expand All @@ -559,12 +557,6 @@ contains
end do

do i = 1, num_probes_max
integral(i)%xmin = dflt_real
integral(i)%xmax = dflt_real
integral(i)%ymin = dflt_real
integral(i)%ymax = dflt_real
integral(i)%zmin = dflt_real
integral(i)%zmax = dflt_real
end do
Comment on lines 559 to 560

! GRCBC flags
Expand Down
4 changes: 0 additions & 4 deletions src/simulation/m_mpi_proxy.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,6 @@ contains
#:for VAR in [ 'x','y','z' ]
call MPI_BCAST(probe(j)%${VAR}$, 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
#:endfor

#:for VAR in [ 'xmin', 'xmax', 'ymin', 'ymax', 'zmin', 'zmax' ]
call MPI_BCAST(integral(j)%${VAR}$, 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
#:endfor
end do

! manual: spatial-support body-force derived-type members (the bf_spatial_support toggle is broadcast by
Expand Down
10 changes: 3 additions & 7 deletions toolchain/mfc/case_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1366,16 +1366,12 @@ def check_grcbc(self):
if grcbc_vel_out:
self.prohibit(bc_beg != -8 and bc_end != -8, f"Subsonic Outflow Velocity (grcbc_vel_out) requires bc_{dir}%beg = -8 or bc_{dir}%end = -8")

def check_probe_integral_output(self):
"""Checks probe and integral output requirements (simulation)"""
def check_probe_output(self):
"""Checks probe output requirements (simulation)"""
probe_wrt = self.get("probe_wrt", "F") == "T"
integral_wrt = self.get("integral_wrt", "F") == "T"
fd_order = self.get("fd_order")
bubbles_euler = self.get("bubbles_euler", "F") == "T"

self.prohibit(probe_wrt and fd_order is None, "fd_order must be specified for probe_wrt")
self.prohibit(integral_wrt and fd_order is None, "fd_order must be specified for integral_wrt")
self.prohibit(integral_wrt and not bubbles_euler, "integral_wrt requires bubbles_euler to be enabled")

# Pre-Process Specific Checks

Expand Down Expand Up @@ -2329,7 +2325,7 @@ def validate_simulation(self):
self.check_bubbles_lagrange()
self.check_continuum_damage()
self.check_grcbc()
self.check_probe_integral_output()
self.check_probe_output()

def validate_pre_process(self):
"""Validate pre-process-specific parameters"""
Expand Down
2 changes: 1 addition & 1 deletion toolchain/mfc/lint_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def check_physics_docs_coverage(repo_root: Path) -> list[str]:
"check_bc_patches", # boundary patch geometry
"check_grid_stretching", # grid stretching parameters
"check_qbmm_pre_process", # QBMM pre-process settings
"check_probe_integral_output", # probe/integral output settings
"check_probe_output", # probe output settings
"check_finite_difference", # fd_order value validation
"check_flux_limiter", # output dimension requirements
"check_liutex_post", # output dimension requirements
Expand Down
20 changes: 1 addition & 19 deletions toolchain/mfc/params/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@ def get_value_label(param_name: str, value: int) -> str:
"ib_neighborhood_radius": {"min": 1},
"num_source": {"min": 1},
"num_probes": {"min": 1},
"num_integrals": {"min": 1},
"nb": {"min": 1},
"m": {"min": 0},
"n": {"min": 0},
Expand Down Expand Up @@ -509,11 +508,6 @@ def get_value_label(param_name: str, value: int) -> str:
"recommends": ["cfl_target"],
}
},
"integral_wrt": {
"when_true": {
"requires": ["fd_order"],
}
},
}


Expand Down Expand Up @@ -649,10 +643,8 @@ def _load():
_r("many_ib_patch_parallelism", LOG, {"ib"})

# Probes
for n in ["num_probes", "num_integrals"]:
_r(n, INT, {"probes"})
_r("num_probes", INT, {"probes"})
_r("probe_wrt", LOG, {"output", "probes"})
_r("integral_wrt", LOG, {"output", "probes"})

# Output
_r("precision", INT, {"output"})
Expand Down Expand Up @@ -1033,12 +1025,6 @@ def _load():
for d in ["x", "y", "z"]:
_r(f"probe({i})%{d}", REAL, {"probes"})

# integrals (5 integral regions)
for i in range(1, 6):
for d in ["x", "y", "z"]:
_r(f"integral({i})%{d}min", REAL, {"probes"})
_r(f"integral({i})%{d}max", REAL, {"probes"})

# Extended BC
for d in ["x", "y", "z"]:
px = f"bc_{d}%"
Expand Down Expand Up @@ -1190,7 +1176,6 @@ def _init_registry():
"ib_airfoil": ("type(ib_airfoil_parameters)", "num_ib_airfoils_max", True, "Per-airfoil NACA user inputs"),
"stl_models": ("type(ib_stl_parameters)", "num_stl_models_max", True, "Per-STL model parameters"),
"probe": ("type(vec3_dt)", "num_probes_max", False, None),
"integral": ("type(integral_parameters)", "num_probes_max", False, None),
"acoustic": ("type(acoustic_parameters)", "num_probes_max", True, "Acoustic source parameters"),
"chem_params": ("type(chemistry_parameters)", None, True, None),
"rburn": ("type(reactive_burn_parameters)", None, True, "Condensed-phase reactive-burn (programmed detonation) parameters"),
Expand Down Expand Up @@ -1334,9 +1319,6 @@ def _decl(targets: set, *names: str) -> None:
"probe_wrt",
"num_probes",
"probe",
"integral_wrt",
"num_integrals",
"integral",
"acoustic_source",
"num_source",
"acoustic",
Expand Down
2 changes: 0 additions & 2 deletions toolchain/mfc/params/descriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
"prim_vars_wrt": "Write primitive variables",
"cons_vars_wrt": "Write conservative variables",
"probe_wrt": "Write probe data",
"integral_wrt": "Write integral data",
"parallel_io": "Enable parallel I/O",
"file_per_process": "Write separate file per MPI process",
"format": "Output format",
Expand Down Expand Up @@ -142,7 +141,6 @@
"num_source": "Number of acoustic sources",
# Probes and integrals
"num_probes": "Number of probe points",
Comment on lines 142 to 143
"num_integrals": "Number of integral regions",
# MPI/GPU
"rdma_mpi": "Enable RDMA for MPI communication (GPUs)",
# Misc
Expand Down
Loading