What is the best way to define a *fixed* space (volume) charge density in OpenFOAM? The electrostaticFoam source code appears to use the continuity equation (in bold), implying rho is not fixed in space:

I was able to do this by copying and modying the electrostatics solver directly. The trick is to specify the charge density for every part of the mesh by looping through it and then running the solver. If you want fixed space charge, make sure your solver doesn't change rho.