CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Pre-Processing (
-   -   Boundary condition and source in electromagnetic problems (

evgenii November 22, 2005 10:06

Hi, everyone! I'm a new user
Hi, everyone!
I'm a new user of OpenFoam, so I have a few questions.

I'm trying to use OpenFoam to solve some electromagnetic problems.

First of all, I don't understand do I need to write file "boundary" in "/constant/PolyMesh" or OpenFoam will generate it. If it will, how can it specify correct boundary conditions(I mean "physical type")? If I need to write this file on my own, how can I calculate "nFaces" and "startFace" for each patch?

Second question. I need to specify zero tangential component of electric field at the boundary.(Normal component is arbitrary). Should I determine special physicalType for boundary condition? I hope you'd give me advise how to do it better.

And the last question. I need to to specify source in the centre of my mesh as dipole alternately changing in time(= electric current). How can I do it?

vvqf November 22, 2005 11:26

I haven't used electromagnetic
I haven't used electromagnetic solver.

usually you don't need to write boudary file, OpenFoam will generate it when you do application to generate the mesh. But you can also write your own boundary file sometimes.

please read User/Programming Guide, search for "boundary conditions", I think you can find what you want.

mss March 5, 2007 08:15

Hi, I am using mhdFOAM. It s
I am using mhdFOAM.
It seems that the boundary conditions we can impose on the magnetic
field B are only of Dirichlet type (B constant). Is it possible to impose
a Neuman type condition (given rotational of B, or imposed

thank u,

gschaider March 6, 2007 16:20

Hi Rita (With the choice of
Hi Rita

(With the choice of possible BCs you are refering to FoamX?)

You can replace the fixedValue-BCs with fixedGradient (or mixed) in the B file.

For the more complicated stuff (rotational etc) you might have to write your own BC

All times are GMT -4. The time now is 19:30.