4
$\begingroup$

I have a geometry and a finite element method where there are a couple internal interfaces across which I want to enforce some fairly simple jump conditions.

One recommendation I've gotten has been to align the mesh with the interfaces and generate zero thickness elements along the interfaces, so that every nodal point on the interface is associated with a duplicate node. Is there a mesh generator that will do something like this for unstructured meshes? (I cannot use structured meshes in my application.)

The idea is to do XFEM to account for the interface conditions, and generating zero thickness elements seems like the simplest way to implement it.

$\endgroup$
5
  • $\begingroup$ Also, for what it's worth, I'm aware of Vinh Phu Nguyen's work at sites.google.com/site/phuvinhnguyensite/home/programs, which seems like it might do what I want it to do for gmsh; I'm more interested in mesh generators that don't require a third-party tool to generate zero thickness elements. $\endgroup$ Commented May 9, 2014 at 18:33
  • 1
    $\begingroup$ Cubit does it. Google for Cubit + Cohesive elements. $\endgroup$
    – stali
    Commented May 9, 2014 at 20:12
  • $\begingroup$ @stali: You should add your comment as an answer below. $\endgroup$ Commented May 10, 2014 at 20:28
  • $\begingroup$ @GeoffOxberry: Are you interested in 2D or 3D? I'm not sure Cubit does well for 3D problems. You could try to contact Anna Pandolfi to check whether she has a code that will do the job. $\endgroup$ Commented May 12, 2014 at 3:05
  • $\begingroup$ @BiswajitBanerjee: Both. 2D would be best to start. $\endgroup$ Commented May 12, 2014 at 4:01

1 Answer 1

7
$\begingroup$

Gmsh (http://geuz.org/gmsh/) will do it for you. Simply create all of the volumes, surfaces, and lines that are required to describe the geometry and interfaces. Then, assign a "physical" id to everything that you want meshed. Once you mesh the geometry, everything to which you have assigned a physical ID will be meshed. The "zero thickness" elements will simply be 2D elements (tri/quad) in a 3d mesh or line elements in a 2D mesh.

Gmsh feels a bit clunky at first, but once you get the hang of using the interface or writing input files manually, it can be a very easy way to generate unstructured meshes. Below, I have pasted a simple input file that generates a square with a diagonal line interface. To use this in gmsh, copy the below text into a file with a .geo extension (doesn't matter, this is convention). Then (in Linux) from the command line, run "gmsh -2 (your file name).geo". This will create (your file name).msh in the same directory. To visualize the mesh, run "gmsh (your file name).msh". Running gmsh on the .geo file will display the geometry, but not the mesh.

This is an image of a mesh created by the following input file: enter image description here

lc=0.1; //characteristic mesh size (optional make smaller to refine mesh)

// Place points
Point(1) = {0,0,0,lc};
Point(2) = {1,0,0,lc};
Point(3) = {1,1,0,lc};
Point(4) = {0,1,0,lc};

// Create lines from points
Line(1) = {1,2};
Line(2) = {2,3};
Line(3) = {3,4};
Line(4) = {4,1};
Line(5) = {3,1};

// Define line loops used to construct surfaces
Line Loop(1) = {1,2,5};
Line Loop(2) = {-5,3,4};

// Make surfaces from line loops
Plane Surface(1) = {1}; //using LL #1
Plane Surface(2) = {2}; //using LL #2

// Showing off another gmsh feature:
// Tell gmsh to use mostly quads rather than tris for surface #2
Recombine Surface(2);

// Give physical IDs to everything you want meshed
Physical Line(1) = {5}; //Line #5 --> Interface
Physical Surface(2) = {1}; //Surface #1 --> Lower triangle (tris)
Physical Surface(3) = {2}; // Surface #2 --> Upper triangle (mostly quads)
$\endgroup$
4
  • $\begingroup$ Yes, I agree. That's something I came across yesterday; I was waiting for stali to add his answer re: Cubit. I think your answer is better than what I could have written. I think the Crack plugin was what I was looking for, because I need to track a jump across an interface (in your example, say, Line 5). $\endgroup$ Commented May 12, 2014 at 20:54
  • $\begingroup$ Is the interface location known ahead of time? If not, you probably will still have issues. Without knowing more about your problem it's hard to give any better suggestions. Also, I just realized that the markup interpreter killed the angle brackets I used in filenames. Editing... $\endgroup$ Commented May 13, 2014 at 5:51
  • $\begingroup$ Yes, I know the interface location ahead of time, and it is static. $\endgroup$ Commented May 13, 2014 at 5:59
  • 1
    $\begingroup$ I know this is raising the dead a little bit on this post, but someone else just asked a related question: scicomp.stackexchange.com/questions/20795/… I wanted to put it here that I created a utility to make zero-thickness quads on these sorts of interfaces in gmsh meshes. Hopefully this makes it easier for people to find. $\endgroup$ Commented Sep 22, 2015 at 23:41

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.