CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   electrostatic solver questions (

larss October 22, 2009 14:20

electrostatic solver questions

I recently started working with OpenFOAM and as I plan to do some electrostatic simulations. However I'm having some trouble with the electrostatic solver. The first question regards the code of the solver:

what do these two calculations do?


rhoFlux = -k*mesh.magSf()*fvc::snGrad(phi);

    fvm::ddt(rho) + fvm::div(rhoFlux, rho)

What exactly is rhoFlux? I have no idea what it could be, especially as it has the strange unit [m^2/s]. k also is a mystery, as it has the unit [1/Tesla].

The second question is about the poisson equation


solve (    fvm::laplacian(phi) + rho/epsilon0    );
the charge density rho causes an electric potential phi, respectively the electric potential is caused by the charge.
I'm using the charged_wire tutorial and from a technican's view I only know the voltage (=potential) of the wire, but not its charge. However when I set the boundary conditions to "calculated" or to "zeroGradient" I either get an error from the solver or the charge is zero. How can I solve this problem without knowing or calculating the charge in advance?

Thanks for your help!

All times are GMT -4. The time now is 04:51.