https://linen.dev logo
triMesher
# meshing
o
I created a thread as it is quite secific questions, interesting, 1. what is the "new" on the BL generation I mean what is the logic behind it? from what I know, there are two different approaches, node offset or face offset using normals, your approach is different? did you publish about it somewhere? 2. topology cleanup, nice, do you have some examples to show what can 'clean' automatically? 3.in regards to laplacian smoothing are you doing a quality check? as laplacian or centroid smoothing directly applied without checking the results can break the mesh for really concave and convex angles.... also, you are applying it to the BL? i missunderstood? how do you deal with the BL thikness if thats is the case as the smoothing will destroy your constant thickness if i am not missing somethign. 4. okey nice for the triangular meshing algorithm, your end goal is to be able to plug different 'internal volume/area' algorithms, so one can select among them? 5. you did it inside Openfoam framework or in general? 6. does it support multi region? something like ' multiple pipes not connected between each other'? (so with 'empty space' not connecting the mesh?)
7. in your images the BL is triangulated, it is just paraview when doing the slice of it? or you have a fully tri mesh (including the BL cells)?
u
1) It is actually a mix of both approaches. The layer extrusion is ultimately performed from the vertices/nodes, but the orientation and displacement distance are not computed solely from local node information. I also use geometric information coming from the surrounding surface segments to determine the extrusion direction and spacing.
2) For the geometry cleanup, one important step happens before the actual layer extrusion. I resample the input surface in order to prepare a cleaner and more suitable boundary for the BL generation. This resampling step can also include a local fitting/smoothing procedure to reduce small imperfections or noise on the input geometry. The goal is not to change the physical geometry in a significant way, but to remove small discretization artifacts that could otherwise create bad extrusion
3) Good question. I agree that applying Laplacian smoothing blindly can easily degrade the mesh quality, especially in highly concave or convex regions. In my case, the smoothing is not applied everywhere. For the boundary-layer mesh, it is restricted to specific regions and performed under a set of constraints designed to preserve the overall layer structure. The objective is to improve local mesh quality without destroying the boundary-layer topology or significantly altering the prescribed layer thickness distribution. The boundary-layer smoothing and the triangular core-mesh smoothing are also treated separately. The boundary-layer mesh has its own set of constraints, while the triangular mesh can be smoothed more aggressively since it does not have the same thickness-preservation requirements. In practice, preserving the integrity of the boundary layers is always prioritized over maximizing the smoothing effect.
4) The code is already designed so that other core-meshing algorithms can be implemented relatively easily in the future. However, this is not my immediate priority. From my experience with tools such as snappyHexMesh, the main difficulty is usually the boundary-layer generation. The triangular core mesh can have imperfections, but these imperfections are generally less critical than poor-quality prismatic layers, which can directly compromise the CFD mesh quality. For that reason, my current priority is first to make the boundary-layer pipeline robust, then move toward 3D and tetrahedral meshing, before spending time implementing several alternative algorithms for the core mesh.
5) No. The input parameter file is inspired by the OpenFOAM dictionary format, and the output is directly written as a polyMesh folder that can be used immediately in OpenFOAM. However, the meshing algorithms themselves are completely independent from OpenFOAM. The current implementation is written entirely in Python and does not rely on any OpenFOAM libraries or infrastructure. At the moment, the mesh shown above (around 300k cells) takes approximately 7 minutes to generate on my PC. For the 3D version, I plan to progressively move the performance-critical parts to Rust. This will give me much finer control over memory management and parallelization, which should significantly improve performance for large-scale meshes.
6) Currently, the mesher can handle multiple disconnected objects within a single fluid domain. In fact, the NASA 30N30P case shown above is already an example of a multi-body configuration with several independent airfoil elements. However, it does not yet support multiple independent fluid domains being meshed simultaneously. This is actually one of the features I am currently working on. The long-term goal is to support more general multi-region configurations while keeping the boundary-layer generation and topology handling robust.
7) This is mostly a visualization artifact. The boundary-layer mesh is predominantly composed of quadrilateral elements. The only exception is the first layer in fan regions, where a few triangles can be introduced. These triangles are used intentionally to allow the boundary layer to turn rapidly around very sharp angles while maintaining a valid topology and avoiding excessive cell distortion. Once past these highly curved regions, the boundary-layer mesh transitions back to predominantly quadrilateral elements.
o
highly recommend you checking this publication then. https://arxiv.org/abs/2102.03069
also with your current approach BL first core after, I dont think there is much room for other core algorithms, as you need to be conformal to the internal boundary layer, therefore you need and advancing front approach which will highly limit your possibilites, another one would be develop a connectivity middle layer but this will be a headhach
yeah i meant separate fluid domains.
oh nice aproach, never saw this.
did you made a publication or something about it?
u
Yes, I agree. When I mentioned “other core algorithms”, I was mostly thinking about other cell types, for example a polygonal core mesh, or a mixed approach with mostly quadrilateral cells and triangles only at the junction with the boundary-layer outer front. Initially, I considered a constrained Delaunay approach, but I quickly moved away from it for exactly the reason you described: once the boundary layer is generated first, the core mesh has to conform to its internal boundary, which makes a pure Delaunay-based strategy much less natural.
It depends on what comes next for me. I finished my Master's degree only three months ago. If I find an interesting PhD opportunity related to meshing and CFD, then I would be more than happy to publish the work. Otherwise, there is also a possibility that I will try to turn it into a commercial project and use it as a source of income, in which case I would need to think more carefully about what should be published and what should remain proprietary. For now, I'm keeping both options open.
o
I agree, yeah the mixed approach is what i meant when saying connectivity middle layer.
where are you placed currently? physically I mean
u
For now, I am mainly looking at PhD opportunities in Switzerland, as my partner would like to stay there. Since I completed my Master's at EPFL, I am currently focusing mostly on EPFL and ETH Zurich. That being said, if an attractive and competitive opportunity comes up elsewhere, I would definitely be open to moving as well.
o
i would highly recommend to contact these two teams in france, https://team.inria.fr/titane/ and https://pixel.inria.fr/ but well it is france ahhaha
u
To be honest, I also had a few opportunities in France, notably at École Polytechnique, but I decided to decline them. I'm originally from France, and after spending several years there, I'd like to experience something different for a while. 😅
If you happen to have contacts in England or the US, I could definitely be interested as well 😄
o
nop non
c
Cool....But how on earth would you deal with tight spaces? Do you merge the inflation layers together?
u
In the case of narrow spaces: Typically, a channel that narrows down, or any equivalent topological configuration: either the user manually specifies thinner boundary layers in that region (it is possible to define parameters on a segment-by-segment basis in the input geometries); or the program runs as is, and in that case it will stop the extrusion once a minimum gap, defined as a parameter, is reached. If it is a narrow space caused by a corner: if the angle is acceptable (see the figure), the extrusion proceeds normally; if the angle is too acute, the extrusion will also stop, and the remaining region will be filled with triangles. There is no layer merging. https://cdn.discordapp.com/attachments/1518906783769563247/1522198097487331450/IMG_20260619_000727_790.jpg?ex=6a4798f3&is=6a464773&hm=05e3ccfee7d51735786468fc0f97331fc989d2dc375c110e06573138bb9d1486&
In the image you have only prismatic layer. Triangles are paraview artefacts, in reality you have only quad.
o
You have an option on by default that is triangulate when doing a slice, I think it comes from there 👌🏻
3 Views