Skip to main content
10 votes

Why FVM can handle unstructured meshes while FDM cannot?

The difference between finite volumes and finite differences is really more about the form of the equations solved. In typical FV methods, the conservative form is ...
Darren Engwirda's user avatar
8 votes
Accepted

Unstructured mesh vs hybrid structured/unstructured for numerical simulations

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{\...
HBR's user avatar
  • 1,668
8 votes

Mesh ordering algorithms used by COMSOL Multiphysics

The idea of "ordering the nodes" in a finite element mesh to improve the computational time of the sparse solver originated in the large structural analysis FE codes of the 70's. Those codes typically ...
Bill Greene's user avatar
  • 6,339
7 votes
Accepted

Is there any open-source code for a hybrid 2D mesh (triangles and quadrilaterals)?

You can use Gmsh for this purpose. I show an example below. ...
nicoguaro's user avatar
  • 8,622
4 votes
Accepted

How to find out the difference between a structured and unstructured mesh using the file containing the mesh information?

There are two different types of meshes that are commonly termed "structured": the points are placed on an equispaced grid; and the elements have the same connectivity. Some people might call any ...
nicoguaro's user avatar
  • 8,622
4 votes

Working with large mesh files

My answer is primarily opinion-based, given my experience. In my work, I haven't (yet) dealt with meshes quite as large as what you're describing. However, I've seen large enough meshes to hint that ...
LedHead's user avatar
  • 1,253
4 votes
Accepted

C++ library unstructured mesh writer to VTK format (or similar)

I think you are looking for Kitware VTK, basically, the main library for interaction with VTK files. Examples page will contain a lot of samples, including the one you are looking for: output of an ...
Anton Menshov's user avatar
  • 8,742
3 votes
Accepted

How to calculate skewness for a mesh?

From the discussions and the paper, OpenFOAM seems to have implemented a measure of skewness. This answer is not an explanation why the different definitions of skewness might be equivalent, I am just ...
Abdullah Ali Sivas's user avatar
3 votes

Why FVM can handle unstructured meshes while FDM cannot?

I would propose to think of the different schools of coming up with discretizations (FVM/FEM/FD), not as excluding or separate. There is surely overlap, they are -methods- to derive discretizations. ...
MPIchael's user avatar
  • 3,065
3 votes
Accepted

How is central difference scheme second-order accurate?

The expression with $g=1/2$ is second order if and only if f is the midpoint of P and N.The expression with $g\in[0,1]$ is second order if f is on PN and$fN/Pf=g$. If f is anywhere else you need to ...
Philip Roe's user avatar
  • 1,204
3 votes

Unstructured mesh vs hybrid structured/unstructured for numerical simulations

I think that both meshes are good. But depending of the problem at hand, one might be better than the other. In the domain that you are mentioning, one thing to consider is that you probably don't ...
nicoguaro's user avatar
  • 8,622
3 votes
Accepted

Partition mesh into predetermined submeshes

For your first question, constructing the adjacency graph of the "partitions" (what you call "cell groups"): Let's say you have an array $p_K$ in which you store for each cell $K$ ...
Wolfgang Bangerth's user avatar
3 votes
Accepted

Which algorithms exist to create a tetrahedral volume mesh from an STL file?

I don't agree with Wolfgang that you should never write things yourself, but writing a tetrahedral mesh generator is a big task and his estimate of a year's worth of work sounds about right. My ...
Daniel Shapero's user avatar
3 votes

Gmsh Python: Specify mesh regularity conditons

If you're prepared to be a little more flexible with your definition of cell "centres", it's possible to achieve the regularity constraints you seek via Delaunay Triangulations and Voronoi ...
Darren Engwirda's user avatar
3 votes
Accepted

Generating unstructured finite volume mesh

“Finite volume” and “finite element” refer to ways of discretizing functions and operators over a mesh. The mesh generation itself is not strictly a part of either method and the same mesh can be used ...
whpowell96's user avatar
  • 3,101
2 votes
Accepted

2D mesh generator with geometric primitives

Shewchuk's triangle mesh generator produces high quality meshes and is quite robust. However, the boundary definition is a series of straight lines. So to produce a sequence of refined meshes over a ...
Bill Greene's user avatar
  • 6,339
2 votes
Accepted

How to compute gradient of a cell having a boundary face?

Disclaimer: I'm not 100% sure but I thought that I should provide my working solution to the above problem, for any future visitor that might have the same questions. The answer is for a steady ...
Algo's user avatar
  • 304
2 votes

Parallel mesh partitioning

All software I know of first enumerates nodes locally, and then uses this local enumeration to generate a global enumeration. I suggest that you want to read the following manuscript about all of ...
Wolfgang Bangerth's user avatar
2 votes

Meshing surface of a sphere with a subdomain

I found a solution by replacing the points with line segments: ...
Fab von Bellingshausen's user avatar
2 votes

Meshing surface of a sphere with a subdomain

Why don't you take a look a HEALpix which provides a nice equal area hierarchical triangulation of the surface of the sphere with no distorted triangles: https://healpix.jpl.nasa.gov/ https://en....
JonesTheAstronomer's user avatar
2 votes
Accepted

How to evaluate the average value of a polynomial inside the triangle area in finite volume sense?

If $(x_i,y_i)$ is the centroid of the triangle, then $$ \frac{1}{\Delta_i}\int_{\Delta_i}{p(x,y)}\,dx\,dy = p(x_i,y_i) = \bar{\psi}_i $$ This is mid-point quadrature, which is exact for an affine ...
cfdlab's user avatar
  • 3,078
2 votes

Developing a meshfree contouring algorithm

Maybe this is not a full answer to your question. However, I am currently developing my own unstructured mesh generator and found this toolbox quite helpful. Perhaps there are some algorithms which ...
ConvexHull's user avatar
  • 1,498
2 votes

Developing a meshfree contouring algorithm

The following paper does a decent job of answering my question: D. H. McLain, Drawing Contours from Arbitrary Data Points, The Computer Journal, Volume 17, Issue 4, November 1974, Pages 318–324, ...
IPribec's user avatar
  • 645
2 votes
Accepted

Unstructured mesh preprocessing

I would leave out a few things to make it more simple. This is how we do it for our code which is capable of using polyhedral meshes: https://github.com/nikola-m/freeCappuccino-dev/blob/master/src/...
Johntra Volta's user avatar
2 votes

Convert unstructured mesh to structured mesh

in Gmsh only planes that have four corner points could be meshed with structured meshes using Trasnfinite option. In your file, ...
Masa's user avatar
  • 194
2 votes

Which algorithms exist to create a tetrahedral volume mesh from an STL file?

Creating meshes is a non-trivial enterprise and you will probably spend a year or two implementing the relevant algorithms yourself. Instead, just use what others have used -- specifically, use the ...
Wolfgang Bangerth's user avatar
1 vote

How to compute gradient of a cell having a boundary face?

I had the same question a few days ago when I was developing an unstructured FVM solver for conduction/diffusion. And now I find that no matter what the boundary condition is, just set the gradient of ...
xianghua xu's user avatar
1 vote

How is central difference scheme second-order accurate?

Assuming $F (not f)$ as the face center, we have the following taylor expansions for $\phi$: $$\phi_p = \phi_F + \nabla\phi_F.(r_P-r_F)+O(2)→×|r_N-r_F|$$ $$\phi_N=\phi_F + \nabla\phi_F.(r_N-r_F)+O(2)→×...
Naghi's user avatar
  • 235
1 vote

Why FVM can handle unstructured meshes while FDM cannot?

You can use FD too, and it is very straight forward... fit a polynomial to neighboring cells or nodes, differentiate and use... It is very efficient as it's not tight by the use of the control volume, ...
Sammy's user avatar
  • 11
1 vote

How to find out the difference between a structured and unstructured mesh using the file containing the mesh information?

If it's a structured grid of hexahedra, then each node should have the same valence (number of adjacent hexes), eight. So I would scan through the list of hexes, and make sure that each node index ...
rchilton1980's user avatar
  • 5,076

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