CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   electrostatic solver questions (https://www.cfd-online.com/Forums/openfoam/69433-electrostatic-solver-questions.html)

larss October 22, 2009 14:20

electrostatic solver questions
 
Hello,

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?

Code:

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

solve
(
    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

Code:

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!
Lars


All times are GMT -4. The time now is 15:20.