https://linen.dev logo
improve meshing
# meshing
o
So i am creating a new thread to discuss about this
"you can't just "create BL" as cells can't be created 1:1" what do you mean @kandelabr ?
k
one cell on the surface doesn't necessarily produce 1 cell at the inner (last) boundary layer
o
for the publications @qr there are 2 out of my mind right now: 1. Foldover-free maps in 50 lines of code (from where it comes the charizard on the previous image) 2.Robust Topological Construction of All-hexahedral Boundary Layer Meshes (just for quad meshes buuuut there are a bunch of quad remeshers around)
due to convex/concave angles you mean?
k
exactly
you can squeeze them together or smooth the hell out of them but you'll always get skewness/non-ortho
o
this I think is (almost) solved with this publication if you keep only 1 layer to create that then you divide Automatic curved block structure and hexahedral mesh generation for hypersonic CFD
k
so when you mesh manually you take that into account and place blocks so that cells are where they need to be
o
also for quad meshes...
k
I'll take a look
o
we discused about already, it is from this https://cea.hal.science/cea-04622270v1/document
k
I remember the image
would like to see this on some more complex geometries
o
well the logic it takes into account this
k
In the video I can't see cells being added/removed... the flange snappy tutorial is a very good case actually - sharp edges, small holes, convex/concave features, you name it
right, will have to read the article 🙂
o
the original one comes from here: The receding front method applied to hexahedral mesh generation of exterior domains
i wanted to implement this in salome, but i dont have the manpower and energy right now... :/
k
OK, I'll read that too
o
shit man.... i began working on it...
hate my life so much procastination...
k
I'll vibe-code that
in fact, I'll just give Him the articles and say "Implement. Make no mistakes"
o
not all of us have fancy premium acounts
k
k
Well it's not that expensive but also not that terribly smart
Does cut a few corners, tho. I don't want to vibe-code on top of my old-school typings but I'm okay with fresh starts
o
i dont know i try to limit myself not because i am cheap but to not rely on it too much
k
that's wise and it'll take a few years until the smoke clears
then we'll see where it's necessary and where not. And how much it costs and who now has who's data
o
true true, but it is more that i already cut corners all the time so if i go vibe coding my shit my small programming skills will go down the hill too fast
k
We'll see if we'll need them at all. Like, do you know how to use a slide rule?
Again, vibe-coding a feature or a small app is one thing. Maintaining heaps of code... we'll see
Anyway, let's do some meshing meanwhile
k
not sure about that sharp edge there
o
which one?
q
That inward corners gonna hurt
k
skewness > ∞
yes but the orthogonal angle at right could easily be as the upper two
q
Exactly what I was imagining
k
aye, better
o
any better possibility?
want the best it could to make the logic.
k
you have five 90-deg corners and two different approaches there, any good reason for that?
o
mmmm some are internal and some external (concave vs convex) but you are right that there was some issues it should be like this: https://cdn.discordapp.com/attachments/1569637100075360347/1569711308251865119/image.png?ex=6af47313&is=6af32193&hm=65d31ceee38332fa5afc543a8a41ef88f1c1b4a91d3755cbbc2bdabd45f2166f&
k
no, vice versa, here you'll have thin BL cells in the bulk
o
sorry i was right before, dihedral angle (angle on the edge taking into account surface orientation, ie., inside/outisde) of 90 or more, simply extend, no extra block. 90 or less insert a block
k
all should be easy peasy except that sharp corner
same if there was a convex one somewhere
o
what do you mean
k
you don't have a convex sharp corner (less than 90-deg) but it would be the same logic
don't mind, carry on
t
And then solve what happens when two extrusion fronts meet
m
Maybe a small thought I had. IMO this is actually the "best" division system. Because when you consider where adding BLs gets hard (corners) its also actually where you do not need boundary layers (I consider a BL stretched cells that are compressed normal to the surface) because the assumption that you gradient normal to the wall is way larger than the parallel one becomes wrong and you should actually just add isotropic elements there. In my experience that is also why surface meshers that have a option to "refine the mesh near discontinuous edges" are the best basis for BL extrusion. If you do this you naturally approach isotropic elements at these corners and also dont have problems with non othogonality
o
for 2D it was simple but i got brain blocked on how to deal with the 3D part: my current geometry is this one to add more type of constraints but i not sure how to deal with the edges on the flat surface and going out of it: https://cdn.discordapp.com/attachments/1569637100075360347/1570337727856254996/image.png?ex=6af6ba79&is=6af568f9&hm=606063d259238c55398c16092589102661094bcc2d85dfdcce87f7c25673606e&
well i craked lol ahahah claude make GTA 7 with mesh smoothing also.
it implemented the "Robust Topological Construction of All-hexahedral Boundary Layer Meshes" directly. this can create a single layer, i added to add extra layers, for the moment there are no overlapping checking, so it is not good but getting next step
and mixing some other codes to the mix to improve the overall result...
k
sooo... you have your mesher now?
that are comming from the original code
at least no overlapping
still needs a looooooot of improvements
what i implemented (claude obviously) during this weekend the following workflow (only for CAD models so steps, for the moment): * conformal surface meshing to CAD, tri, quad-dominant, quad (might fail), polygon all conformal to the CAD itself * boundary layer first, not just simple extrusion but also as it can be seen on the corner of the impeller it is adding elements like this approach where is necessary * buffer layer to core mesh, this is the most shitty part for the moment, current options: tetra+pyr, tetra alone (decomposition of hexas on the boundary with this buffer layer into a hexa with a cross in the middle), and mosaic like transition with polyhedral * core mesh, with level transition, 2:1 transition as snappy, 3:1 transition (fully hexa) by dualizing the 2:1, 2:1 with basic elements instead of polyhedral with hanging nodes, and 3:1 real hexa transition (using patterns to replace the polyhedral with hanging nodes) * smoothing/untangling, several algorithms most of them are limited to non polyhedral mesh sadly (only tkeskita for poly). currently developing and not 'fully there': * surface mesh fully quad mesh (reliable) * boundary layer first, there is still cases where it needs to be improved so it can be made more robust, it gives 100% coverage but with some bad quality cells (althought check mesh is passing with ok) * buffer layer, the mosaic approach with 'bubble like polyhedral' still is quite shitty i did not got any good source of code to import this from the current quality is worst than the other buffer approaches which IMO surprised me a lot but this i need to keep looking if i find things around as currently was coded from scratch * core mesh, 3:1 real transition and more control on the refinement etc * make the other smoothers compatible with polyhedral currently it achieved for my current cad which is not the simplest but far from a dummy case the resutl are comparable with snappy results for same number of cells.
will continue Wednesday when i get back my tokens lol, but i must say it is promising in any case.... my idea at the end is add a 'best of option' which will run the different combinations for a geometry and give back which would be better results, as most of the option are toggles, meaning do the buffer one way or another. i am more and more thinking that there will be not a single approach that will give best results for every geometry (lets see when every option around is implemented...) after some more real testing. I also have some ideas for the case of having as input a surface mesh that is not closed etc etc similar to snappy but in that particular case, i will leave it really to the end as it is reeeeeally something i am not encountering in my workflows (i always have a CAD clean model) and also i prefer to perfect the mesher with a cad which is way more clean than using as input a ugly surface mesh.