# Tag Info

17

The following picture illustrates a mesh with a hanging node and a mesh containing no hanging node: Usually with a finite element mesh the vertices are shared with their other neighbouring elements, but the circled node does not belong to the bottom triangle. We call this node a hanging node. This commonly occurs during the process of adaptive mesh ...

16

The are essentially two approaches to free quad meshing: Direct methods generate a quad mesh directly, usually by some advancing front method. The Paving paper is a standard reference and is the method used by CUBIT, so you have seen these meshes in many publications. Indirect methods generate some intermediate decomposition of the domain (e.g. triangles) ...

10

I would recommend you look at gmsh. It has both text and CAD-like input, capable of 2D and 3D, higher order meshes. It is licensed under the GPL, so there are some restrictions on integrating it into closed source software, but is otherwise completely free/open-source.

10

I would recommend gmsh. I have just started working with this program actually only a few days ago. But it is straight-forward to use. You can create various 2D and even 3D-geometries and it offers a ton of information, boundary nodes, etc.. Here is a link to the website: http://geuz.org/gmsh/ They have many useful references, there is a manual of course ...

9

You are confused about different concepts. A mesh is really just a collection of cells defined by the vertices of the mesh and which vertices together form each cell. Consequently, a mesh is an entirely geometric object. It knows nothing about finite element spaces one may define on it -- that's for a later step in your workflow. It's also important that ...

9

First, create a list of faces in the mesh. From there you should be able to create a map from faces to tets, as each face must belong to either one or two tets. The faces that belong to only one tet are your boundary faces.

7

If you are not using AMR and do not want to scale beyond 1K-4K cores then simply do this. Rank 0 reads the entire mesh and partitions it using METIS/Scotch etc. (Note: This is a serial operation). Rank 0 broadcasts the element/node partitioning info to all other ranks and frees the memory (used to store the mesh) All ranks read the nodes/elements they own (...

7

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 ...

7

I think you could use the "marching cubes" algorithm. If memory serves, it requires a grid of samples as input, so at the very least you should be able to sample your function and run the algorithm as-is. You also might be able to modify the algorithm to callback to f directly. There's a popular implementation at http://paulbourke.net/geometry/polygonise/ ...

6

The answer to your question can depend on quite a few things, such as whether you need a turbulence model, and which one you choose if so, and how you are handling the "top" of your fluid since moving interfaces are nontrivial. You are also imposing discontinuities on the boundary at the edges of your inlet so a nonuniform mesh would be advantageous for you....

6

In my opinion, it is not a good neither a bad mesh. It clearly depends on the PDE you are considering. The finite space to which the PDE is projected is your mesh, where your operators, e.g. $\vec{\textrm{grad}}$ (gradients), $\textrm{div}$ (divergences), $\triangle$ (Laplacians)... strongly depend on that mesh and become matrices:  \vec{\textrm{grad}}\...

6

You can use Gmsh for this purpose. I show an example below. // Points Point(1) = {-2, -2, 0, 1.0}; Point(2) = {2, -2, 0, 1.0}; Point(3) = {2, 2, 0, 1.0}; Point(4) = {-2, 2, 0, 1.0}; Point(5) = {-10, -10, 0, 2.0}; Point(6) = {10, -10, 0, 2.0}; Point(7) = {10, 10, 0, 2.0}; Point(8) = {-10, 10, 0, 2.0}; // Lines Line(1) = {1, 2}; Line(2) = {2, 3}; Line(3) = {...

5

If an unrestricted triangulation is OK, you can do it with scipy.spatial.Delaunay which uses Qhull.

5

How about; Watson, D.F. Computing the n-dimensional Delaunay tessellation with application to Voronoi polytopes. Comput J 24, 167–172 (1981). http://comjnl.oxfordjournals.org/content/24/2/167.abstract If I understood it, it should be $\mathcal{O}\left(n^{\frac{2p-1}{n}}\right)$, isn't that better then $Ω\left(n^{p/2}\right)$?

5

I think all the more modern FEM libraries (e.g. deal.II, libmesh, ...) use the octree-based scheme (or, to be more precise: oct-forests, with one tree starting from each cell of an unstructured coarse mesh). There are many advantages to this, primarily because you know the hierarchy of mesh cells. This implies that you can easily do coarsening, geometric ...

5

This feature seems to be available in CGAL

5

Permit me to clarify - you ask about "structured mesh" that's "quadrilateral." By definition, a structured mesh (or grid) consists of quads (2D) and hexes (3D). So I want to clarify that you're inquiring about automatic structured quad/hex grid generation. If so, you're seeking the holy grail. While there are many software tools for generating structured ...

5

gmsh is a viable way to generate quadrilateral meshes in 2d. It's also open source.

5

I suggest the following simple algorithm: Depending on whether you want symmetry of the mesh, either start at a point $x_0$ at the left end of your interval, or in the center. In the latter case, just mirror the mesh you obtain. Having performed the algorithm to $x_k$, compute $x_{k+1}$ as $x_k+h_k$, where \begin{gather} h_k = \min \left\{ h_{\max}, \frac{\...

5

I'll expand my comment to an answer. Since your surface is fairly smooth, rather than generating a surface mesh, you can generate a 2D mesh of just the $(x, y)$-points that have been sampled, and then create a surface mesh by adding in the $z$-values later. This might suffice or it might not. Triangulation algorithms, like the one Tyler Olsen linked, are ...

5

Yes there is a relationship, the Euler characteristic: For a 2-dimensional orientable manifold with boundaries embedded in $\mathbb{R}^3$, the Euler characteristic is $\chi = V - E + F = 2 - 2g - b$ where $V$ is the number of vertices, $E$ is the number of edges, $F$ is the number of faces, $g$ is the genus of the manifold, and $b$ is the number of ...

5

Starting a community answer, in line with your model question Mesh Generation Mesh Generation: Application to Finite Elements (P.-L. George and P. Frey) Hermes, Lyon, 2000. A clear primer on the core technology and terminology of mesh generation. Written in a fairly mathematical style, which might not appeal to those of a more practical outlook. Will fit ...

5

In addition to the voxel-based approach that rchilton suggests, you could also look at Delaunay-type algorithms. For example, the Computational Geometry Algorithms Library (CGAL) has some built-in functionality for surface mesh generation with examples here. You could also try distmesh, the essential idea of which has been ported to a number of other ...

4

Dynamic $h$-adaptive mesh refinement is very effective for picking up isotropic features of the solution. Many AMR implementation enforce a refinement criterion like $2:1$ for octree refinement. This sometimes leads to a larger refined region than necessary, but usually some geometric grading is necessary anyway and different AMR implementations can keep the ...

4

I usually use tetgen for 3D (MIT license for research/non-commercial) and triangle for 2D (Custom license free for non-commercial). To script them, you write a input file and call the command line.

4

Concerning the flow simulation, an upper bound is given by the relation $N\geq Re^{9/4}$, where $N$ is the number of mesh nodes and $Re$ is the Reynolds number, derived for direct numerical simulation . In your case with $L=120m$, $u=0.1m/s$ and $\nu = 10^{-6}m^2/s$, you have $Re \approx 1.2 \cdot 10^5$ what - in theory - means that you will need about $2.... 4 Metis does not guarantee that the partitions are non-empty, so your code must deal with this situation. 4 I think you can do this using convex hull software (e.g. QHull) via the lifting algorithm. At least, the documentation of matlab's "delaunayn" command seems to indicate as much. 4 In your problem description, note that$80\text{mm} \neq 0.008 \text{m}$. That said, every quantity in a computer program is just a number. It's up to you to interpret it. So of course you can run a simulation where the domain has an edge length of 80 or 0.08 -- they refer to the same domain, after all. But depending on what you use as your base unit, you ... 4 I have 1D finite-volume code written in python for a cell-centred mesh, First generate a sequence which is the location of the faces,$ \{ x_{j-1/2} \}\$. For example, for uniform spacing over the domain [0,1] this is a simple as, a = 0 b = 1 J = 50 faces = numpy.linspace(a, b, J} After you have the faces the rest is easy because the faces uniquely ...

Only top voted, non community-wiki answers of a minimum length are eligible