On Mar 19, 2007, at 10:17 PM, Chris Calebrese wrote:

I’m trying to create objects in 3D, specifically a cylinder, within a larger mesh. The object will be static and will be solid (for example it will not permit diffusion, while the surrounding medium will). Below I have created an object in 3D inside of a rectangular mesh, where the position of the object is defined by the value of pillar=1 (concept taken from one of the level set examples). Because the mesh is square, the edges will “pixilated.” Is there a better way to define a cylinder or other smooth, non-planar face within a larger mesh (perhaps create an irregular grid?).
Hi Chris,

A mesh where the cell faces lie directly on the interface will gain accuracy because the boundary between the two regions has better definition, but you lose some accuracy due to using an unstructured mesh. The relative cost
I am not sure about.

The best way to create a mesh where the faces are on the boundary is with Gmsh.
The are three options for doing this:

1) Gmsh will make a circle within a square in 2D and mesh it. The
interface between the two regions will then have faces along it. You could then use the extruder from <http://matdl-osi.org/fipy/wiki/SurfaceOfSphere> to extrude it into 3D. The actually link for extrude.py is <http://matdl- osi.org/fipy/attachment/wiki/SurfaceOfSphere/extrude.py?format=raw>. I am not sure whether the extruder can create layers. Jon, can the extruder create layers or is it just one layer as used for the spherical problem? Looking at the code it only seems to be one layer. I imagine this could be extended to multiple layers without too much difficulty.

2) The other option would be to create the volume objects in gmsh and mesh it directly. Actually, this may be the more straight forward than option 1. The GmshImporter3D should do the trick once the mesh has been created.

3) What you did. It may be inaccurate, but it depends what you are looking for in your solution.

We have just updated the gmsh importer to read the new (2.0) gmsh file format so you'll need to checkout trunk if you use version 2.0
of gmsh.

Hope this helps.

Cheers

--
Daniel Wheeler


Reply via email to