De Wolf, RubenReimold, FelixFeng, YuheJacobs, Matthieu Benoit C.Dekeyser, WouterSamaey, GiovanniBaelmans, Martine2024-04-032024-04-032024-04-032024-03-0810.1002/ctpp.202300154https://infoscience.epfl.ch/handle/20.500.14299/206883WOS:001180741200001This paper presents a first implementation of gradient, divergence, and particle tracing schemes for the EMC3 code, a stochastic 3D plasma fluid code widely employed for edge plasma and impurity transport modeling in tokamaks and stellarators. These schemes are essential to accommodate plasma drift computations, which are currently absent in the code. Plasma drifts have been recognized to significantly influence transport of particles and energy, and their inclusion in future code upgrades will substantially enhance the code's predictive capabilities. For gradient and divergence calculations, we introduce a second-order least-squares gradient scheme. We confirm the second-order convergence properties and assess the accuracy of several analytical test cases in the presence of synthetic noise. In the second part of this paper, we employ the validated gradient scheme in a fourth-order Runge-Kutta particle tracing scheme to trace a particle through a generic drift velocity field. The impact of synthetic noise on the scheme's performance is investigated by evaluating various error metrics. We find that the implemented schemes function as intended and exhibit sufficient accuracy to enable drift computations.Physical SciencesDivergenceDriftsEmc3GradientParticle TracingToward plasma drifts in EMC3: Implementation of gradient, divergence, and particle tracing schemestext::journal::journal article::research article