|
MFC
Exascale flow solver
|
Go to the source code of this file.
Modules | |
| module | m_particle_cloud |
| Generates particle beds by converting particle_cloud patch specifications into individual immersed boundary patches before domain reduction. Each rank runs the same deterministic placement so no MPI broadcast of particle positions is needed. | |
Functions/Subroutines | |
| impure subroutine, public | m_particle_cloud::s_generate_particle_clouds (particle_cloud_ibs) |
| Generate all particle beds and fill particle_cloud_ibs. Called on all ranks before s_reduce_ib_patch_array. | |
| subroutine | m_particle_cloud::s_particle_cloud_random_box (cloud_idx, ib_idx, particle_cloud_ibs) |
| Generates a random distributions of particles in a box with a minimum spacing. | |
| subroutine | m_particle_cloud::s_particle_cloud_lattice (cloud_idx, ib_idx, particle_cloud_ibs) |
| Places particles on the optimally dense lattice for the cloud region: a triangular lattice in 2D, a face-centered cubic lattice in 3D. The lattice spacing is set by the particle density (num_particles over the region area/volume); if that spacing falls below the required centre-to-centre distance (2*radius + min_spacing), the region is too dense and the run is aborted. | |
| subroutine | m_particle_cloud::s_add_cloud_particle (cloud_idx, ib_idx, geom, px, py, pz, particle_cloud_ibs) |
| Writes a single placed particle into particle_cloud_ibs at the next free slot, advancing ib_idx. Shared by all packing methods so the per-particle ib_patch_parameters setup stays in one place. | |
| real(wp) function | m_particle_cloud::f_xorshift (seed) |
| Xorshift PRNG. Advances seed in-place and returns a value in [0, 1). | |
| integer function | m_particle_cloud::f_bin_hash (bx, by, bz, hash_size) |
| Hash bin coordinates to a 1-indexed slot in [1, hash_size]. Uses large prime multipliers to spread bins across buckets. Hash collisions are benign: the distance check catches false neighbours. | |