{'fraction_non_alphanumeric': 0.017374517374517374, 'fraction_numerical': 0.0, 'mean_word_length': 5.790393013100437, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A method for implementing Dirichlet and third‐type boundary conditions in PTRW simulations

We present an efficient and accurate numerical method for implementing Dirichlet boundary conditions in particle tracking random walk (PTRW) simulations of advective‐dispersive transport. This is a challenge, because defining concentrations for Dirichlet boundary conditions requires invoking control volumes of some kind, which are not natural to the Lagrangian‐based PTRW concept. Our method performs a Galerkin projection of PTRW‐based particle densities onto control volumes that discretize the boundary. Thus, we obtain concentration values at the boundary condition and can control the particle release rates such that the prescribed boundary values are met. This allows for complex‐shaped internal and external boundaries, where concentration values are fixed to prescribed values. Third‐type boundary conditions can be addressed as well. We test and illustrate the properties and behavior of our method in a series of test cases. The results are benchmarked against the conceptually related semianalytical method MASST (multiple analytical source superposition technique) and to those of a finite element method (FEM). While MASST is restricted to uniform velocity fields due to the underlying analytical solutions, FEM is limited in heterogeneous velocity fields at large Péclet numbers by numerical dispersion in the feasible discretization range. The results demonstrate that our proposed method performs better than the other methods in both regimes.