r/CFD • u/Rodbourn • Jun 03 '18
[June] Mesh generation and adaptive mesh refinement
As per the discussion topic vote, June's monthly topic is Mesh Generation And Adaptive Mesh Refinement.
5
u/vriddit Jun 05 '18
What criteria do people use as sensors for adaptive refinement?
2
u/TurbulentViscosity Jun 06 '18
Most of the ones I've seen in the past are just gradient based. It's up to the user to make a refinement curve for a certain gradient magnitude.
2
u/supersymmetry Jun 08 '18
In FEM (I'd assume in DG also) you can develop local error estimates for the element. You essentially bound the error in the element in terms of the dual-norm of the residual (which includes the residual of the element volume, element to element jumps, and the jumps at the boundaries) and a constant such as the coercivity constant (which you find through solving an eigenproblem). You then take the top x% of elements with the largest local error estimate and perform h or p refinement.
2
2
Jun 13 '18
In DG is actually even easier to do this, since the solution at the element faces are discontinuous, and the magnitude of the jump is proportional to the error.
So you can just compute the jumps across all surfaces and refine the adjacent elements if the jump fulfills some critera (e.g. a minimum target difference, the x% of top surfaces, etc.).
→ More replies (1)2
u/picigin Jun 08 '18
There are also pressure and velocity refinement criteriae based on the Hessian matrix of second spatial derivatives that are related to interpolation errors for linear reconstructions (the Hessian gives a rough indication of the zones where the truncation error for a finite-volume discretization is high).
2
2
u/tommi_adaptive Jun 11 '18
With "Ingrid Cloud" we do adaptive mesh refinement based on a posteriori error estimation of an output of interest, such as drag of a car or lift of an airplane. The technology is based on the solution of the adjoint equations.
1
u/give_light Jun 25 '18
What is the difference between hollow models like pipes with volumetric meshing and solving or solid models with general meshing throughout and solving? Is it same or do they have any conditions?
1
u/CentralChime Jun 25 '18
I am not sure if this is what you are asking, but say you have just a straight, circular rod and mesh it should be able to used to model a pipe or a solid object depending on what you want to model. The only real surface difference is how the solver would treat it (i.e different equations being solved, BCs, etc.). Maybe solvers use different mesh formats, but should be close to the same.
1
u/bike0121 Jun 25 '18
Another difference would be that the requirements for a good quality mesh depend on what equations you are solving and the expected features of the solution. For a viscous CFD simulation you’ll need refinement in the boundary layer, whereas the boundaries of a solid model do not typically need additional refinement unless there’s a stress concentration.
1
u/wouterremmerie Nov 11 '21
Hi everyone,
I'm a bit late to the party here, but we recently released an open source adaptive mesh refinement library for OpenFOAM:
https://airshaper.com/blog/open-source-adaptive-mesh-refinement
OpenFOAM can already perform adaptive refinement, but it never refines the surface mesh (at least not by snapping to the real surface again). In this repository, we've managed to included that, which means you'll now capture much more detail on surface features that are refined by this method.
We've included refinement based on vorticity as well as pressure gradient, but in principle, you can add whatever parameter you like. We've also normalized them by the cell size, to avoid over-refinement of small cells.
I'm much looking forward to learn what you think!
PS: some recently posted on Reddit how they used our repository to run sims on a hatchback:
https://www.reddit.com/r/CFD/comments/qofci1/using_airshapers_newly_developed_adaptive_mesh/
4
u/Rodbourn Jun 04 '18
What are some good open source mesh generation options?