CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   ElectrostaticFoam problemerror (http://www.cfd-online.com/Forums/openfoam-solving/59397-electrostaticfoam-problemerror.html)

sverdoold October 6, 2007 18:09

Hello, I am trying to use Ope
 
Hello,
I am trying to use OpenFoam to determine the electric field which then is to be used in some other code. After quite some hassle I got things to work at least slightly (although I still have major problems exporting/extracting the electric field values).

I am pretty new to Foam, but when I took a closer look at the electrostaticFoam source I got the impression that the electric field (rhoFlux in the solver) is a surfaceScalarField, so if I am correct consists of scalar values at the surfaces of the mesh cells. However, I think an electric field is always directed and should therefore be a surfaceVectorField or so. Is this correct or am I missing a crucial point here?

I tried to change this, but in that process could not get the code to compile anymore due to problems with the various operators and the new type of rhoFlux.
Does anyone have comments, ideas, suggestions or anything else about this?
Any help would be greatly appreciated!

Sjaak

gschaider October 7, 2007 15:17

It's the same as with the regu
 
It's the same as with the regular phi (see discussions elsewhere): if you multiply it with the face-normal you get your vector value.

masspec June 21, 2010 18:22

Quote:

Originally Posted by gschaider (Post 192300)
It's the same as with the regular phi (see discussions elsewhere): if you multiply it with the face-normal you get your vector value.

Hi! Do you happened to know what does the following code in ElectrostaticFOAM does?

solve(fvm:: ddt(rho)+ fvm :: div (rhoFlux, rho) ) I do not
understand what does this do? It does not look like a continuity
equation for the charge conservation. And also rhoFlux should be a
surface vector field, and rho is a volume field, how could them be mixed
together for calculation?


All times are GMT -4. The time now is 22:27.