|
MFC
Exascale flow solver
|
Real fields of a particle MPI slot, as (names, indices, count) in pack order. Used by both pack and unpack routines to ensure. More...
Functions/Subroutines | |
| impure subroutine, public | s_initialize_particles_el_module (bc_type, rows, ids, n_loc) |
| Allocate the particle and projected-field arrays, load this rank's n_loc particles from rows (input file, with global IDs ids, or restart), project them onto the grid, and precompute the interpolation and finite-difference weights. | |
| impure subroutine | s_load_particles (rows, ids, n_loc) |
| Store this rank's n_loc particles: on a fresh start rows hold x, y, z, u, v, w, radius with global IDs ids, on a restart the restart-file columns. | |
| impure subroutine | s_add_particle (inputpart, part_id, glb_part_id) |
| Store one particle from the input file: position, velocity, radius, mass from particle_pprho0ref_particle, and its fluctuation-model seed. | |
| impure subroutine | s_restart_particles (io_data, n_loc) |
| Store this rank's n_loc particles from the restart file columns io_data. | |
| subroutine, public | s_compute_particles_el_dynamics (q_prim_vf, bc_type, stage) |
| Interpolate the fluid state to each particle, compute the drag, pressure-gradient, added-mass and fluctuating forces, and store the particle RHS for this RK stage. With two-way coupling, also project the forces onto the grid. Particles advance in lockstep with the fluid, using the same TVD RK stages (s_update_lagrange_particles_tdv_rk). | |
| impure subroutine | s_abort_nonfinite_force () |
| Report every particle whose force is not finite (position, velocities, fluid state, Re, Ma and the force term that failed first) and abort the run. | |
| subroutine | s_get_drag_viscosity (q_prim_vf, fluid_pres, fluid_rho, pi_inf_mix, alpha, re_mix, mu, i, j, k) |
| Fluid viscosity for the drag correlations: from the mixture Reynolds number when viscous, from the mixture model with chemistry, otherwise mu_ref with an optional Sutherland correction. | |
| subroutine | s_smear_field_contributions (bc_type, ind_start, ind_end, recompute_gsum) |
| Project the particle quantities ind_start:ind_end onto the grid with the Gaussian kernel (Maeda and Colonius, 2018), exchange them across rank boundaries, and turn the projected particle volume fraction into the fluid volume fraction. recompute_gSum relocates the particles and recomputes the kernel normalization. | |
| subroutine, public | s_compute_particles_el_source (q_cons_vf, q_prim_vf, rhs_vf) |
| Add the two-way coupling source terms to the fluid RHS: volume-fraction terms and the projected particle forces (Maeda and Colonius, 2018). | |
| subroutine | s_add_pressure_source (rhs) |
| rhs -= (alpha_p/alpha_f)*field_vars(part_field_idxdsrc_tmp). | |
| impure subroutine, public | s_update_lagrange_particles_tdv_rk (bc_type, stage, coef) |
| Advance particle positions and velocities by one TVD RK stage with the stage coefficients coef (a row of rk_coef), then apply boundary conditions and rank handover. | |
| impure subroutine | s_enforce_el_particles_boundary_conditions (bc_type) |
| Enforce boundary conditions on Lagrangian particles. Phases: (1) GPU->host transfer, (2) MPI particle exchange with neighbors, (3) per-particle BC (clamp at walls, remove outside the domain) and compaction on the host, (4) host->GPU transfer, (5) re-smear onto Eulerian grid. | |
| impure subroutine | s_copy_particle_time_level (dest, src) |
| Copy time level src into dest (1: committed u^n, 2: stage value). | |
| subroutine, public | s_compute_particle_gradients (ql, qr, dir) |
| Store the particle field gradients along dir (pressure, velocity, and density with added mass) from this sweep's reconstructed face states. Called inside the RHS direction loop, so the face states need no extra copy. | |
| subroutine | s_gradient_field (vl_field, vr_field, dq, dir, fbeg, fend) |
| Cell-centered derivative along dir of the sum of components fbeg:fend: the difference of the right and left reconstructed face states over the cell width. The face states are stored in (x, y, z) order for every sweep direction, so dq shares their (i, j, k) indexing. | |
| impure subroutine | s_compute_barycentric_weights (npts) |
| Barycentric Lagrange interpolation weights at every cell in each direction, computed once. | |
| impure subroutine, public | s_sync_particles_for_save () |
| Copy the particle state and projected volume fraction to the host before a save, and abort if any particle position or velocity is NaN. | |
| impure subroutine | s_mpi_sendrecv_lag_particles () |
| Send the particles on the transfer list to their new ranks and append the particles received from the neighbors (host data). | |
| impure subroutine | s_pack_lag_particle (k, q) |
| Pack particle k into MPI send slot q, in the field order of s_unpack_lag_particle. | |
| impure subroutine | s_unpack_lag_particle (k, q) |
| Unpack particle k from MPI receive slot q, in the field order of s_pack_lag_particle. | |
| impure subroutine | s_copy_lag_particle (dest, src) |
| Copy particle src's state into slot dest, to compact the particle arrays after removals. | |
| integer function | f_particle_capacity (n) |
| Array length for n particles: headroom for arrivals from neighbor ranks, capped at the global count. | |
| impure subroutine | s_allocate_particle_arrays (n) |
| Allocate the per-particle arrays (host and device) with room for n particles. | |
| impure subroutine | s_deallocate_particle_arrays () |
| Deallocate the per-particle arrays (host and device). | |
| impure subroutine | s_grow_particle_arrays (n) |
| Reallocate the per-particle arrays with room for n particles, keeping the state of the first n_el_particles_loc. Host data: the caller updates the device. | |
| impure subroutine, public | s_finalize_particles_el_module () |
| Deallocate the particle arrays. | |
Variables | |
| integer | particle_cap |
| Allocated length of the per-particle arrays. | |
| integer, dimension(:,:), allocatable, public | lag_part_id |
| Global and local IDs. | |
| real(wp), dimension(:), allocatable, public | particle_mass |
| Particle Mass. | |
| real(wp), dimension(:), allocatable | p_am |
| Particle Added Mass. | |
| integer(seed_kind), dimension(:), allocatable, public | particle_seed |
| State of the particle's fluctuation-model RNG. | |
| real(wp), dimension(:), allocatable, public | particle_rad |
| Particle radius (constant: particles are rigid). | |
| real(wp), dimension(:,:,:), allocatable, public | particle_pos |
| Particle's position. | |
| real(wp), dimension(:,:,:), allocatable, public | particle_posprev |
| Particle's previous position. | |
| real(wp), dimension(:,:,:), allocatable, public | particle_vel |
| Particle's velocity. | |
| real(wp), dimension(:,:,:), allocatable | particle_s |
| Particle's computational cell position in real format. | |
| real(wp), dimension(:,:), allocatable | particle_dposdt |
| Time derivative of the particle's position. | |
| real(wp), dimension(:,:), allocatable | particle_dveldt |
| Time derivative of the particle's velocity. | |
| type(scalar_field), dimension(:), allocatable, public | q_particles |
| Eulerian projection of particle data (volume fraction, momentum, sources). | |
| type(scalar_field), dimension(:), allocatable | kahan_comp_particles |
| Kahan compensation for q_particles accumulation. | |
| type(scalar_field), dimension(:), allocatable | field_vars |
| Interpolated Eulerian field gradients at particle locations. | |
| type(scalar_field), dimension(:), allocatable | rhs_old |
| For previous rhs values. | |
| type(scalar_field), dimension(:), allocatable | weights_x_interp |
| For precomputing weights. | |
| type(scalar_field), dimension(:), allocatable | weights_y_interp |
| For precomputing weights. | |
| type(scalar_field), dimension(:), allocatable | weights_z_interp |
| For precomputing weights. | |
| integer | nweights_interp |
| real(wp), dimension(:,:), allocatable, public | f_p |
| force on each particle | |
| real(wp), dimension(:,:), allocatable, public | fqs_fluct |
| QS fluctuation force on each particle. | |
| real(wp), dimension(:), allocatable | gsum |
| gaussian sum for each particle | |
| real(wp), dimension(:,:), allocatable, public | fluid_vel_at_particle |
| fluid velocity at each particle | |
| real(wp), dimension(:), allocatable, public | density_at_particle |
| density at each particle | |
| real(wp), dimension(:), allocatable | pres_at_particle |
| fluid pressure at each particle | |
| integer, dimension(:), allocatable | force_status |
| First non-finite force term of each particle (0 if none). | |
| real(wp), dimension(:,:), allocatable | force_re_mach |
| Particle Reynolds and Mach numbers, reported with force_status. | |
Real fields of a particle MPI slot, as (names, indices, count) in pack order. Used by both pack and unpack routines to ensure.
Per-particle arrays as (name, type, extents after the particle index). State persists across stages and moves with the particle;
Euler-Lagrange solid particle solver with two-way coupling.
Tracks non-deformable solid particles in compressible flow using Gaussian volume-averaging (Maeda & Colonius, J. Computational Physics, 361, 2018). Supports multiple drag correlations, pressure gradient and added mass forces. Derived from the m_bubbles_EL module. Kernel functions are in m_particles_EL_kernels.
|
private |
Array length for n particles: headroom for arrivals from neighbor ranks, capped at the global count.
Definition at line 3083 of file m_particles_EL.fpp.f90.
|
private |
Report every particle whose force is not finite (position, velocities, fluid state, Re, Ma and the force term that failed first) and abort the run.
Definition at line 1929 of file m_particles_EL.fpp.f90.
|
private |
Store one particle from the input file: position, velocity, radius, mass from particle_pprho0ref_particle, and its fluctuation-model seed.
Definition at line 1669 of file m_particles_EL.fpp.f90.
|
private |
rhs -= (alpha_p/alpha_f)*field_vars(part_field_idxdsrc_tmp).
Definition at line 2400 of file m_particles_EL.fpp.f90.
|
private |
Allocate the per-particle arrays (host and device) with room for n particles.
Definition at line 3092 of file m_particles_EL.fpp.f90.
|
private |
Barycentric Lagrange interpolation weights at every cell in each direction, computed once.
Definition at line 2733 of file m_particles_EL.fpp.f90.
| subroutine, public m_particles_el::s_compute_particle_gradients | ( | real(wp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:), intent(in) | ql, |
| real(wp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:), intent(in) | qr, | ||
| integer, intent(in) | dir ) |
Store the particle field gradients along dir (pressure, velocity, and density with added mass) from this sweep's reconstructed face states. Called inside the RHS direction loop, so the face states need no extra copy.
Definition at line 2644 of file m_particles_EL.fpp.f90.
| subroutine, public m_particles_el::s_compute_particles_el_dynamics | ( | type(scalar_field), dimension(sys_size), intent(in) | q_prim_vf, |
| type(integer_field), dimension(1:num_dims,1:2), intent(in) | bc_type, | ||
| integer, intent(in) | stage ) |
Interpolate the fluid state to each particle, compute the drag, pressure-gradient, added-mass and fluctuating forces, and store the particle RHS for this RK stage. With two-way coupling, also project the forces onto the grid. Particles advance in lockstep with the fluid, using the same TVD RK stages (s_update_lagrange_particles_tdv_rk).
Host copies; amdflang reads Re_size stale cross-TU
Definition at line 1738 of file m_particles_EL.fpp.f90.
| subroutine, public m_particles_el::s_compute_particles_el_source | ( | type(scalar_field), dimension(sys_size), intent(inout) | q_cons_vf, |
| type(scalar_field), dimension(sys_size), intent(inout) | q_prim_vf, | ||
| type(scalar_field), dimension(sys_size), intent(inout) | rhs_vf ) |
Add the two-way coupling source terms to the fluid RHS: volume-fraction terms and the projected particle forces (Maeda and Colonius, 2018).
Definition at line 2255 of file m_particles_EL.fpp.f90.
|
private |
Copy particle src's state into slot dest, to compact the particle arrays after removals.
Definition at line 3043 of file m_particles_EL.fpp.f90.
|
private |
Copy time level src into dest (1: committed u^n, 2: stage value).
Definition at line 2591 of file m_particles_EL.fpp.f90.
|
private |
Deallocate the per-particle arrays (host and device).
Definition at line 3767 of file m_particles_EL.fpp.f90.
|
private |
Enforce boundary conditions on Lagrangian particles. Phases: (1) GPU->host transfer, (2) MPI particle exchange with neighbors, (3) per-particle BC (clamp at walls, remove outside the domain) and compaction on the host, (4) host->GPU transfer, (5) re-smear onto Eulerian grid.
Definition at line 2521 of file m_particles_EL.fpp.f90.
| impure subroutine, public m_particles_el::s_finalize_particles_el_module |
Deallocate the particle arrays.
Definition at line 4508 of file m_particles_EL.fpp.f90.
|
private |
Fluid viscosity for the drag correlations: from the mixture Reynolds number when viscous, from the mixture model with chemistry, otherwise mu_ref with an optional Sutherland correction.
Definition at line 1989 of file m_particles_EL.fpp.f90.
|
private |
Cell-centered derivative along dir of the sum of components fbeg:fend: the difference of the right and left reconstructed face states over the cell width. The face states are stored in (x, y, z) order for every sweep direction, so dq shares their (i, j, k) indexing.
Definition at line 2667 of file m_particles_EL.fpp.f90.
|
private |
Reallocate the per-particle arrays with room for n particles, keeping the state of the first n_el_particles_loc. Host data: the caller updates the device.
Definition at line 4402 of file m_particles_EL.fpp.f90.
| impure subroutine, public m_particles_el::s_initialize_particles_el_module | ( | type(integer_field), dimension(1:num_dims,1:2), intent(in) | bc_type, |
| real(wp), dimension(:,:), intent(in) | rows, | ||
| integer, dimension(:), intent(in) | ids, | ||
| integer, intent(in) | n_loc ) |
Allocate the particle and projected-field arrays, load this rank's n_loc particles from rows (input file, with global IDs ids, or restart), project them onto the grid, and precompute the interpolation and finite-difference weights.
Definition at line 630 of file m_particles_EL.fpp.f90.
|
private |
Store this rank's n_loc particles: on a fresh start rows hold x, y, z, u, v, w, radius with global IDs ids, on a restart the restart-file columns.
Definition at line 1598 of file m_particles_EL.fpp.f90.
|
private |
Send the particles on the transfer list to their new ranks and append the particles received from the neighbors (host data).
Definition at line 2930 of file m_particles_EL.fpp.f90.
|
private |
Pack particle k into MPI send slot q, in the field order of s_unpack_lag_particle.
Definition at line 2951 of file m_particles_EL.fpp.f90.
|
private |
Store this rank's n_loc particles from the restart file columns io_data.
Definition at line 1711 of file m_particles_EL.fpp.f90.
|
private |
Project the particle quantities ind_start:ind_end onto the grid with the Gaussian kernel (Maeda and Colonius, 2018), exchange them across rank boundaries, and turn the projected particle volume fraction into the fluid volume fraction. recompute_gSum relocates the particles and recomputes the kernel normalization.
Definition at line 2074 of file m_particles_EL.fpp.f90.
| impure subroutine, public m_particles_el::s_sync_particles_for_save |
Copy the particle state and projected volume fraction to the host before a save, and abort if any particle position or velocity is NaN.
Definition at line 2892 of file m_particles_EL.fpp.f90.
|
private |
Unpack particle k from MPI receive slot q, in the field order of s_pack_lag_particle.
Definition at line 2997 of file m_particles_EL.fpp.f90.
| impure subroutine, public m_particles_el::s_update_lagrange_particles_tdv_rk | ( | type(integer_field), dimension(1:num_dims,1:2), intent(in) | bc_type, |
| integer, intent(in) | stage, | ||
| real(wp), dimension(4), intent(in) | coef ) |
Advance particle positions and velocities by one TVD RK stage with the stage coefficients coef (a row of rk_coef), then apply boundary conditions and rank handover.
Definition at line 2456 of file m_particles_EL.fpp.f90.
| real(wp), dimension(:), allocatable, public m_particles_el::density_at_particle |
density at each particle
Definition at line 597 of file m_particles_EL.fpp.f90.
| real(wp), dimension(:,:), allocatable, public m_particles_el::f_p |
force on each particle
Definition at line 554 of file m_particles_EL.fpp.f90.
|
private |
Interpolated Eulerian field gradients at particle locations.
For cell quantities (field gradients, etc.)
Definition at line 521 of file m_particles_EL.fpp.f90.
| real(wp), dimension(:,:), allocatable, public m_particles_el::fluid_vel_at_particle |
fluid velocity at each particle
Definition at line 596 of file m_particles_EL.fpp.f90.
|
private |
Particle Reynolds and Mach numbers, reported with force_status.
Definition at line 612 of file m_particles_EL.fpp.f90.
|
private |
First non-finite force term of each particle (0 if none).
Definition at line 611 of file m_particles_EL.fpp.f90.
| real(wp), dimension(:,:), allocatable, public m_particles_el::fqs_fluct |
QS fluctuation force on each particle.
Definition at line 568 of file m_particles_EL.fpp.f90.
|
private |
gaussian sum for each particle
Definition at line 582 of file m_particles_EL.fpp.f90.
|
private |
Kahan compensation for q_particles accumulation.
Definition at line 518 of file m_particles_EL.fpp.f90.
| integer, dimension(:,:), allocatable, public m_particles_el::lag_part_id |
Global and local IDs.
Definition at line 411 of file m_particles_EL.fpp.f90.
|
private |
Definition at line 526 of file m_particles_EL.fpp.f90.
|
private |
Particle Added Mass.
Definition at line 438 of file m_particles_EL.fpp.f90.
|
private |
Allocated length of the per-particle arrays.
Definition at line 410 of file m_particles_EL.fpp.f90.
|
private |
Time derivative of the particle's position.
Definition at line 501 of file m_particles_EL.fpp.f90.
|
private |
Time derivative of the particle's velocity.
Definition at line 502 of file m_particles_EL.fpp.f90.
| real(wp), dimension(:), allocatable, public m_particles_el::particle_mass |
Particle Mass.
Definition at line 425 of file m_particles_EL.fpp.f90.
| real(wp), dimension(:,:,:), allocatable, public m_particles_el::particle_pos |
Particle's position.
Definition at line 484 of file m_particles_EL.fpp.f90.
| real(wp), dimension(:,:,:), allocatable, public m_particles_el::particle_posprev |
Particle's previous position.
Definition at line 485 of file m_particles_EL.fpp.f90.
| real(wp), dimension(:), allocatable, public m_particles_el::particle_rad |
Particle radius (constant: particles are rigid).
Definition at line 469 of file m_particles_EL.fpp.f90.
|
private |
Particle's computational cell position in real format.
Definition at line 487 of file m_particles_EL.fpp.f90.
| integer(seed_kind), dimension(:), allocatable, public m_particles_el::particle_seed |
State of the particle's fluctuation-model RNG.
Definition at line 452 of file m_particles_EL.fpp.f90.
| real(wp), dimension(:,:,:), allocatable, public m_particles_el::particle_vel |
Particle's velocity.
Definition at line 486 of file m_particles_EL.fpp.f90.
|
private |
fluid pressure at each particle
Definition at line 598 of file m_particles_EL.fpp.f90.
| type(scalar_field), dimension(:), allocatable, public m_particles_el::q_particles |
Eulerian projection of particle data (volume fraction, momentum, sources).
Definition at line 517 of file m_particles_EL.fpp.f90.
|
private |
For previous rhs values.
Definition at line 522 of file m_particles_EL.fpp.f90.
|
private |
For precomputing weights.
Definition at line 523 of file m_particles_EL.fpp.f90.
|
private |
For precomputing weights.
Definition at line 524 of file m_particles_EL.fpp.f90.
|
private |
For precomputing weights.
Definition at line 525 of file m_particles_EL.fpp.f90.