g4chargeit: Geant4 Kinetic MC Charging Framework
- g4chargeit is a Geant4-based kinetic Monte Carlo framework that self-consistently simulates time-dependent electrostatic charging in dielectric materials across microscopic and macroscopic scales.
- It combines explicit stochastic charge deposition with iterative electric field reconstruction using adaptive octrees to resolve fine-scale variations in complex geometries.
- Designed for realistic scenarios like lunar regolith charging, it links microscopic particle interactions to macroscopic phenomena, predicting patchy surface charges and corresponding force regimes.
g4chargeit is a Geant4-based kinetic Monte Carlo framework for simulating time-dependent electrostatic charging in dielectric materials. It was introduced as a self-consistent method that combines validated particle-transport physics from Geant4, explicit stochastic charge deposition and reabsorption, and iterative reconstruction of the electric potential and field. Although the representative application is regolith charging on the Moon under average dayside conditions, the framework is presented as a general multiscale approach that links microscopic scattering events to the continuity equation of surface charge density and to the formation of macroscopic surface charge patches in complex grain geometries (Gandhi et al., 19 Feb 2026).
1. Problem definition and conceptual scope
The framework addresses a charging problem that is simultaneously stochastic, multiscale, and self-consistent. In the formulation used for g4chargeit, microscopic particle interactions occur at the nm scale, charge accumulates over grain surfaces and within cavities at larger scales, and the resulting electric field feeds back on later particle trajectories. This combination is the central reason the framework was developed: conventional Monte Carlo transport codes can model scattering well, but they typically do not self-consistently evolve the electric field, whereas analytical charging models often simplify geometry too aggressively by assuming idealized packed spheres, uniform emission, or simplified yield models (Gandhi et al., 19 Feb 2026).
The principal motivation is especially strong for airless planetary bodies such as the Moon. Solar ultraviolet photons and solar-wind plasma generate photoelectrons and plasma charging, and the resulting electrostatic environment affects dust lofting, adhesion, dust mitigation systems, and surface hazards. Within this setting, g4chargeit is designed to bridge microscopic emission and scattering physics with the emergent electrostatic structure of realistic granular materials. A plausible implication is that the framework is most useful in regimes where local geometry and evolving fields are inseparable from the charging dynamics.
2. Transport engine and software architecture
The simulation framework is built in Geant4 v11.3.0 and uses standard Geant4 infrastructure plus extensions for geometry import, parallel execution, trajectory storage, source definition, and periodic boundaries. The architecture described for the code is summarized below.
| Component | Use |
|---|---|
| Geant4 v11.3.0 | Core transport framework |
| GDML | Importing complex geometries |
| OpenMP | Parallelization |
| ROOT | Storing trajectories and analysis |
| GPS | Defining particle sources |
| g4pbc | Periodic boundary conditions |
The Monte Carlo transport is kinetic in the sense that particles are propagated through matter according to probabilistic interaction rules. Geant4 handles the stochastic sequence of photoelectric absorption, electron emission, Auger processes, elastic and inelastic scattering, Coulomb scattering of ions, backscattering, and energy loss. The physics list is modified to use G4EmStandardPhysics_option4, which relies on low-energy Livermore models and evaluated databases such as EPDL97, EPICS2017, EEDL, and EADL, plus Scofield binding-energy data. The paper also notes validation of stopping ranges against SRIM for ions and CASINO for electrons (Gandhi et al., 19 Feb 2026).
The treatment of transport is explicit rather than reduced to a simplified parameterization. Photons from the solar spectrum can cause photoelectric emission directly; protons from the solar wind undergo Coulomb scattering and implant into the material; and low-energy electrons may be deflected, absorbed, or penetrate into grains depending on energy and local field. In the SiO sphere example reported in the paper, about 85% of incident photons undergo photoelectric absorption, most photoelectrons stop near the emitting surface, some are scattered into neighboring grains, and a small fraction escape the simulation volume. For solar-wind protons, the code reproduces implantation depths on the order of nm.
3. Self-consistent electrostatics and charge relaxation
A defining feature of g4chargeit is that the electric field is not imposed externally and then held fixed. Instead, the simulation is iterated in time: an initial Geant4 transport simulation is run, deposited charges are recorded, an updated electrostatic potential and field are reconstructed from those charges, and the updated field is fed back into the next transport step. The paper describes this as re-initializing the Monte Carlo simulation at each discrete time step so that charges deposited in earlier iterations affect later trajectories (Gandhi et al., 19 Feb 2026).
For a charge at position , the contribution to the potential is written as
with the total field obtained by superposition over all charges deposited in prior iterations. Because a direct sum over all deposited charges is computationally expensive for large particle counts, the implementation uses two adaptive octrees: , which stores deposited charges, and , which stores the field map used by the transport solver. Deposited charges are assigned to voxels in ; voxels are split until each contains a single integer charge or reaches a minimum size; is constructed on a coarse grid; a Barnes–Hut approximation is used to represent distant clusters efficiently; and cells are refined adaptively wherever field gradients exceed a threshold . This produces a nonuniform mesh that is fine where the field changes sharply, including inside micro-cavities, and coarse elsewhere.
The framework also incorporates material-dependent electrostatics and charge dissipation. If a voxel contains multiple materials, an effective dielectric constant is computed using
0
After the field map is built, it is passed back into Geant4 and particle motion is integrated using G4DormandPrince745, described in the paper as a high-order adaptive Runge–Kutta solver based on Dormand–Prince (DoPri5), with DeltaOneStep = 0.1~\mu\text{m}. Charge relaxation is modeled through the continuity equation for surface charge density,
1
where 2 is the net charging current and 3 is the conductivity. For lunar regolith, the conductivity is given as
4
while the simulations shown use a constant conductivity of about
5
corresponding to an equivalent temperature of about 6 K. Operationally, dissipation is applied voxel-by-voxel in 7 before the updated charge map is saved for the next iteration.
4. Lunar regolith charging as the representative application
The principal application developed in the paper is dayside lunar regolith charging under quiet solar conditions. The assumed environment consists of solar UV photons incident at 8, solar-wind protons at 9 keV incident at 0, and low-energy solar-wind electrons with average energy 1 eV incident isotropically. The corresponding current densities are given as roughly 2 for photoelectrons, 3 for solar-wind protons, and 4 for solar-wind electrons. The photoelectron current density is therefore about 15 times larger than the proton current density, so photoemission dominates the charging dynamics on the dayside (Gandhi et al., 19 Feb 2026).
Within this environment, the physically important mechanism is micro-cavity charging. The paper emphasizes that micro-cavities between neighboring grains trap and reabsorb emitted photoelectrons. Many emitted electrons do not leave the surface cleanly; instead, they are reabsorbed by nearby grains, become confined by local electric fields, or are scattered back into neighboring grains. The consequence is a patchy, spatially heterogeneous charge distribution rather than uniform charging of exposed surfaces. As the field grows, it alters subsequent particle motion, enhances reabsorption, and reinforces charge localization.
The same mechanism is used to explain the emergence of repulsive electrostatic forces. Once charge accumulates asymmetrically in a cavity, surfaces facing the cavity can carry like-signed charge, generating repulsive electric pressure that tends to push grains apart. The force component is written as
5
where 6 is the surface normal. In irregular and realistic packings, the paper reports same-sign pressure regions on opposing cavity walls, corresponding to repulsive interactions. This is presented as qualitatively consistent with the patched-charge picture and with experimental observations that micro-cavities can generate dust-lofting-capable repulsion.
5. Benchmarks, geometry dependence, and physical interpretation
The framework is benchmarked first against a simple hexagonal packing of SiO7 spheres. In that configuration, g4chargeit agrees well with the analytical model of Zimmerman et al., and the field evolution matches closely for both photoelectron and solar-wind cases. For the solar-wind case, the paper reports agreement within about 4.85%. For photons, however, the paper identifies a specific improvement over earlier work: rather than imposing a simplified photoelectron population, g4chargeit explicitly simulates photon interactions and secondary electron energies. Because the emitted photoelectrons can have energies up to roughly 8, they can be much more energetic than the 9 eV electrons assumed in the earlier analytical model, leading to a higher saturation field in the new simulations (Gandhi et al., 19 Feb 2026).
The paper then moves to less symmetric geometries. In irregularly packed spheres, charge accumulates inside micro-cavities, repulsive regions appear in electric-pressure maps, and the cavity forces differ substantially from the attractive patterns seen in regular packing. The study interprets this as a demonstration that geometry alone can change the sign and character of the electrostatic interaction. A more realistic simulation uses a grain stack derived from synchrotron X-ray microtomography of a planetary simulant, with porosity around 52%, consistent with lunar soil. In that geometry, broken symmetry, sharp protrusions, recessed cavities, and irregular local normals produce highly nonuniform field and pressure patterns; the micro-cavity zoom-ins again show same-sign pressure patterns corresponding to repulsion.
The physical interpretation is deliberately conservative. The simulated cavity forces are described as consistent with prior observations of dust lofting analogs and patchy cavity charging, but they remain below lunar gravity for the small timescales considered, so the grains remain static in the simulation. The method therefore models the precursor charging stage rather than the full dynamical lofting event. The paper estimates cavity forces on the order of 0 N in one case, while lunar gravity on a 50 1m silica sphere is about 2 N, implying that lofting would require much larger forces over longer times or under different conditions.
6. Numerical workflow, limitations, and broader applicability
The numerical workflow is organized around repeated Geant4 runs with automated preprocessing and postprocessing. Each iteration runs on a single HPC node with 24 threads; memory demand is at least 8 GB per process; SLURM is used for job scheduling; Python scripts automate the sequence of Geant4 runs; the outputs consist of ROOT trajectory files and text field maps; PyVista is used for field visualization; and pyROOT is used for parsing trajectories. The main bottlenecks identified in the paper are thread interdependence and input/output overhead from data handling, with computational cost scaling with world size because larger geometries generate more octree boxes and more stored field data (Gandhi et al., 19 Feb 2026).
The principal limitation stated explicitly is that grain motion is not yet evolved as the grains themselves rearrange. The current framework therefore captures charging, field reconstruction, and force generation, but not the subsequent mechanical dynamics of a changing granular bed. This suggests that the present implementation is best understood as a charging-and-field solver for fixed geometries rather than a fully coupled electrostatic-granular dynamics code.
Within that scope, the broader significance of g4chargeit is its role as an open-source, all-in-one multiscale framework connecting microscopic scattering and emission physics, voxelized charge accumulation, self-consistent electrostatic field evolution, and macroscopic force generation. Although demonstrated on lunar regolith, the method is described as applicable to many other dielectric charging problems, including dust mitigation technologies, spacecraft charging, dielectric breakdown, semiconductor and condensed-matter charge transport, and potentially even electrostatic phenomena in biological or soft-matter systems. The code is openly available at https://github.com/kgandhi63/g4chargeit.git.