How to create patch after snappyHexMesh
Hi,
snappyHexMesh is a great tool. Save me lots of time creating meshes. However, I do run into a problem with some situations. I am wondering if anyone has encounter the same isssue and have ways to resolve it. As seen in the picture, I want to create a mesh "inside" the cup. I have stl file of the geometry. So, I create a simple block to contain the cup. After snappyHexMesh, I got the mesh inside the cup. But, at the point, there is only 1 patch, that is the wall of the whole geometry. I need to separate this 1 patch into: inlet, wall1, wall2, and atmospheric. How to achieve this? Sometimes, the patch I am interested in may be curved surfaces, so that patch is not always flat. Suggestions will be highly appreciated. Pei |
press send too fast before add
press send too fast before adding the picture.
\image{cup}; Pei |
OK, let me try this again.
|
We do this by either:
1. Usin
We do this by either:
1. Using separate STL surfaces for each region 2. Using STL or NASTRAN surfaces with multiple internal regions. You can also get additional patches from the original blockMesh by intersecting the surface geometry with the block boundary. |
Hi, Eugene,
Thanks. I thin
Hi, Eugene,
Thanks. I think I understand approach #1, but, can you explain approach #2? It is not clear to me what STL/Nastran surfaces with multiple internal regions means. How to create that? Pei PS: I use SolidWorks to create geometries. |
Thanks Eugene,
I was not aw
Thanks Eugene,
I was not aware that the file may also be in Nastran format? This is quite helpful. I am also wondering how you make snappyhexmesh to use multiple stl-Files at one time? Is it sufficant to place them into the trisurface dictionary? Thanks. |
Hi Bastil,
We use CATIA/ANS
Hi Bastil,
We use CATIA/ANSA to make surfaces and these tools provides the capability of exporting multi-regioned surfaces. I have never personally used solidWorks, so I cannot comment on that. To use multiple surfaces just add more surfaces to the geometry and refinementSurfaces sections of the snappyHexMesh dict. Of course they need to be in the triSurface directory as well. |
Hi, Eugene,
My understandin
Hi, Eugene,
My understanding is that, the geometry has to "close". For example, say, a cube. It has 6 sides, top, bottom, left, right, front, back. When exporting to STL, the STL file consists of several triangulates, and we no longer have patch name, such as top/bottom/front/back/left/right associate with the STL file. In snappyHexMesh, all 6 surfaces got lumpped into 1 surface, say called cubeWall. Is ther a way to keep the the original patch names in STL? In SolidWorks, it can select a surface, split it into two surfaces (can be any shape). But, once exporting to STL, there is no name assocates with the surface. I can export specific patch surface to STL, but, can it be used in snappyHexMesh? Pei |
Like I said, I don't know soli
Like I said, I don't know solidWorks. But in our regioned STL files regions look something like this:
solid top 'triangle stuff' endsolid top solid bottom 'more triangle stuff' endsolid bottom etc. I don't think this kind of regioning is a standard STL feature. However, NASTRAN does support regions by default. |
Eugene,
thanks once more. I
Eugene,
thanks once more. I also do not use SolidWorks. I guess from CATIA your way is multi-part stl? What about ANSA? I do not know ANSA, do you use stl there, too? The other question was if nastran-Format is possible, too. This seems to be the case. Regards |
These days we mostly use NASTR
These days we mostly use NASTRAN with and without multi-regions.
|
Hi all,
I have problems exp
Hi all,
I have problems exporting multi-region Nastran files from Hypermesh. It seems HM has different Nastan formats (long, CFD, standard,..) OF only reads "standard" option. However, regions are not discovered and I have some warnings about unrecognised NASTRAN-commands. I see HM has written regions into the file, but obviously the format is wrong. What does it have to look like? Regards. |
Hey all,
What I've found to w
Hey all,
What I've found to work in solidwork is to generate individual solid bodies for each patch that you'd like to generate, then save them as individual, ASCII .stl files (not allowing solidworks to translate them to positive space, so you insure relative positioning is correct), then concatenate the .stl files, and apply the snappyHexMesh to that. This worked OK for me, and actually sort of makes sense with the way that my solidworks assemblies work. Thanks, D |
Hi, Eugene,
I am wondering
Hi, Eugene,
I am wondering if you can post a complete multi-part stl (simple geometries will do). I am wondering if I can edit my stl file from SolidWorks to try out snappyHexMesh. thanks! Pei |
Pei,
you can have a look at
Pei,
you can have a look at the Motorbike Tutorial. This is exactly what you are looking for. However, I would be interested in a example Nastran-File from a simple geometry that works (remain both patches and patch-names). I am struggeling with the Hypermesh-Export so far. Thanks. Regards Basti |
Hey all just an FYI..
If yo
Hey all just an FYI..
If you are using Salome to create your geometry. (CAElinux is a live dvd with salome installed if you want to try it out) You have the option to explode your geometry into faces give them names like vel_inlet press_outlet etc.. and export each face to their own .stl file. exporting to an ASCII .stl will allow you to edit the text and give each solid names. You can then use these multiple files in snappyHexMesh (haven't tried this so don't know if it handles multiple files). The other way is to combine the face .stl files into a fully defined solid by appending each separate .stl file into one by for example using a command like this. (assuming it is a cylinder) cat inlet.stl >> assembly.stl cat outlet.stl >> assembly.stl cat walls.stl >> assembly.stl Then you have a fully defined solid and provided you have given the three solids names these will be added to your final boundaries file and you can specify the inlet/oulet conditions as usual after running snappyHexMesh. Hope this helps anyone. Regards |
Hi,
i'm trying to create a
Hi,
i'm trying to create a mesh inside a geometry with the snappyHexMesh utility. The mesh seems ok but i can get the patch i want. I have different stl surfaces and i would like to have a patch for each of them. However, I just have the patchs related to my initial background hex mesh and one, corresponding to te complete geometry... Is using different stl surfaces not sufficient? Thank you Bastien |
Last thing,
what should i d
Last thing,
what should i do with the boundaries of my background hex mesh. I don't simulate anything outside the geometry. Put empty for example? Thank you Bastien |
It's enough that you put all y
It's enough that you put all your patches in one STL file. At the end you will have different patches in your mesh, where the mesh has been built. Using multiple stl files is fine as well. Check that you saved your STL as ascii, as in binary files patch names are not written.
I cannot understand your last question. If you need to mesh inside your geometry, you should not have any mesh between it and your background mesh, as your keep point must be inside. If you have a mesh on both sides, it means that you have a hole in your geometry. Hope this helps, Francesco |
Hi,
Thank you for your answ
Hi,
Thank you for your answer. actually, i don't have mesh outside my geometry, it's ok. However, snappyHexMesh creates a defaultFaces patch, which comes from my background hex mesh, i think. Is it normal? Thanks Eric |
Hi,
an other problem relate
Hi,
an other problem related to the patch concerns curved surfaces. For example, i have an inlet which is a curved sufrace. Using snappyHexMesh, i can see that a important part of my inlet is made of holes! I think it comes form hexahedral cells which have been removed when 50% or more of their volume lies out of the region of interest. Could it be due to bad snapping parameters? I'm using this ones: // Settings for the snapping. snapControls { //- Number of patch smoothing iterations before finding correspondence // to surface nSmoothPatch 3; //- Relative distance for points to be attracted by surface feature point // or edge. True distance is this factor times local // maximum edge length. tolerance 4.0; //- Number of mesh displacement relaxation iterations. nSolveIter 30; //- Maximum number of snapping relaxation iterations. Should stop // before upon reaching a correct mesh. nRelaxIter 5; } Could someone help me? Thank you Bastien |
Hello bholbek,
you mentioned an interesting point. What is supposed to to with defualtPatches defined by the blockMeshDict. Have you already gotten some answer or how you have solved this problem. kind rigards |
help on creating patches
2 Attachment(s)
I'm trying to create patches from multiple stl files
I tried as posted in the previous post but I get the error: keyword castellatedMeshControl is undefined Is there something wrong with the file? |
2 Attachment(s)
Dear All,
I'm new to snappyhexmesh and me too I hit the same problem (holes into the patches). See pictures. I'm still doing tests but if someone knows the solution I appreciate, thanks. Daniele |
This is strange, did you set up different levels at the inlet?
Maybe try the same level of refinement and a bit higher level of refinement? |
Even with the same refinement setup I've got the same problem.
A little explanation of what I'm doing: I'm trying to setup patches using a stl files. It's just a simple pipe with an inlet and an outlet (oh, yes, what else...;)) I defined the faces in Salome and exported three different files: one is for full geometry, one for the inlet face and the other for the outlet one. In snappyHexMeshDict I use: Code:
geometry Code:
refinementSurfaces Maybe the holes are caused by the file of the full geometry that already contains the faces included in the inlet/outlet stl files. I do this way because, in general, I think it would be more comfortable to define just the patches and leave the other faces undefined. I don't know whether I was able to explain... In order to define patches in stl geometry, do I have to export all and only the surfaces (sure, grouped by their function, in my case still 3 files) ? Daniele |
Yes, you have to define a stl file for each of the patches.
No overlapping faces seem to be allowed. This way I solved the holes problem. Daniele |
Quote:
|
Well, I'm just a beginner so be carefull with my advices.
Anyway ,my problem was having several overlapping surfaces. I think there's no problem in having multiple not-overlapping patches. Daniele |
thanks Daniele
|
hi,Pei. I have the same problem with you. Have you solved your problem at last. If so, could you please tell me how is that solved?
|
Hi Daniele,
I'm facing same problem, do you mean work-flow should be like this? - realize your CAD geometry - explode into faces - make group of faces (inlet, outlet, walls) - export every single group of faces as STL ascii - write every geometry file into SHM dict. sounds correct to you? |
Yes. These are the steps I follow.
|
Non-closedness after removing patch surfaces
1 Attachment(s)
Dear all,
2014 is long gone - still, I am thankful for your thread since I have the same issues: a fractured patch, just like user danvicas images show. I have compressed a minimal working example (MWE) below. Yes, I use individual .stl files for each patch. Yes, I use the same refinement levels. But geometrically speaking, it is impossible to remove overlapping surfaces - and that's a problem: I have the whole geometry (wall+inlet+outlet) as an .stl file. When I try to remove the outlet face in the whole file manually, e.g. by using blender, I create a non-closed geometry. Code:
snappyHexMesh -checkGeometry I even tried redistributing the nodes in the whole geometry:
How did you all get past this? Thanks again for the previous discussion! Yeru |
All times are GMT -4. The time now is 06:50. |