2
$\begingroup$

I have been using Fenics to model some simple electrostatic problems, but now I need to simulate more complicated geometries. Assuming

  • I have created a mesh of several objects, and know their positions in space
  • Each node in those objects carries properties of those objects (dielectric constant/etc)

which software and approach should I use to subdivide the free space between these objects (and some bounding box style boundary), so that

  • Mesh density depends on distance from objects / geometric complexity
  • Fenics will know where the boundary is, and the boundary conditions (zero potential at "infinity")
  • Fenics will know the values of charge / dielectric in this free space (set to some default for example)

In my simple problems I have used hand coded functions for determining boundary, calculating boundary conditions, and for objects (such as a capacitor's plates) I have used their geometry to assign charges/etc (for example if (distance from sphere center < radius) charge = 1.0 else 0)

$\endgroup$

1 Answer 1

2
$\begingroup$

Refer to dolfin-convert script installed within FEniCS, and its manual page,

$ man dolfin-convert

for supported mesh formats. Then pick some software generating those formats.

Note that cell functions (useful for specifying permitivities in your case) and/or facet functions (useful for boundary and interfacial conditions) are not fully supported by dolfin-convert for all formats. To get those details one can dive into <PYTHONPATH>/dolfin_utils/meshconvert/meshconvert.py or simply try.

AFAIK, at least Triangle (2D) and Gmsh (2D and 3D) formats are quite well supported by dolfin-convert.

$\endgroup$
2
  • $\begingroup$ thanks, i have been trying with gmsh for the geometry and it seem fine, but i am lost when it comes to defining the cell functions. i'll have a look through the docs when i get my meshes working $\endgroup$ Commented Nov 18, 2014 at 9:07
  • $\begingroup$ after a bit of mucking around renaming surfaces i got gmsh and dolfin-convert to cooperate $\endgroup$ Commented Nov 19, 2014 at 3:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.