|
[Sponsors] |
[snappyHexMesh] Declaring a single STL file's faces to be different boundaries |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 17, 2021, 04:01 |
Declaring a single STL file's faces to be different boundaries
|
#1 |
New Member
Homer Bacanto
Join Date: Dec 2020
Posts: 13
Rep Power: 6 |
Let's say that I have an STL file in the form of a cube, with its bottom face on the ground so it only has five visible faces within the generated blockmesh.
Is there a way for me to declare each of these individual faces as a different boundary or a different cellzone so I can sample each face with surfaceFieldValue or volFieldValue? I know that it should be possible to do so if I import each face as a different STL file, but I'm aiming to do this with tens of STL objects, so I was wondering if there was a quicker way. Any help would be much appreciated. |
|
March 17, 2021, 23:47 |
|
#2 |
New Member
Homer Bacanto
Join Date: Dec 2020
Posts: 13
Rep Power: 6 |
Anyone? Bump
|
|
March 18, 2021, 04:25 |
|
#3 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29 |
Quicker way: using a CAD software which preserve faces names when exporting a STL file. Have a look in the motorbike tutorial: the STL contain the whole motorbike geometry with different names in it.
This is a recurrent question, you should find several threads on the forum about that and the different options to deal with it. Cheers, Yann |
|
March 18, 2021, 22:35 |
|
#4 | |
New Member
Homer Bacanto
Join Date: Dec 2020
Posts: 13
Rep Power: 6 |
Quote:
Hello, Yann! Thank you for that suggestion. Unfortunately, I am currently using an add-on that automatically exports solids/cubes as one STL file, and I understand that decomposing each into their individual faces will be difficult. Is there an alternative option? Another question is how do you specify a cellZone with snappyHexMesh using one STL file with multiple solids inside? Thank you! |
||
March 19, 2021, 04:35 |
|
#5 |
Senior Member
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13 |
There are ways. I recently desribed (an unconvenient) one here and Carlos suggested to use blender: How to split stl file?
To specify cellZones you can either do that after meshing with the topoSet tool or introduce entries in the refinementSurfaces subdictionary. When I do this, I usually split the stl i have in to separate ones for each body (of utility "surfaceSplitByPatch") and then reference the single stl files. There you can declare a cellZoneInside and it should work. google for the correct syntax. //Or use locationsInMesh as Yann suggests below. I wasn't aware of that, as I never do it that way. Last edited by AtoHM; March 19, 2021 at 05:56. |
|
March 19, 2021, 04:50 |
|
#6 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29 |
Hello Homer,
Have you tried to open your STL file with a text editor to see if there are several solids named inside? It should follow this syntax: Code:
solid name [...] endsolid name solid another_name [...] ensolid another_name The only other way around I can think of would be to use topoSet and createPatch to separate the faces after meshing but it won't be easier than exporting individual STL files for meshing. About cellZones: you can use a STL file to define a cellZone in snappyHexMesh if your STL contains a single closed volume. So you need to use as many STL as cellZones you need to create and you won't be able to do it if your STL contains several volumes. If you are using the ESI-OpenCFD OpenFOAM branch, you can use a STL file containing several closed volumes and use the "locationsInMesh" to create cellZones. (OpenFOAM-v1612+ and above) Yann |
|
Tags |
openfoam, snappyhexmesh, stl file |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Can't Shake Erros: patch type 'patch' not constraint type 'empty' | BrendaEM | OpenFOAM Meshing & Mesh Conversion | 12 | April 3, 2022 19:32 |
[snappyHexMesh] Layers not growing at all | zonda | OpenFOAM Meshing & Mesh Conversion | 12 | June 6, 2020 12:28 |
[Other] Mesh Importing Problem | cuteapathy | ANSYS Meshing & Geometry | 2 | June 24, 2017 06:29 |
foam-extend_3.1 decompose and pyfoam warning | shipman | OpenFOAM | 3 | July 24, 2014 09:14 |
DecomposePar unequal number of shared faces | maka | OpenFOAM Pre-Processing | 6 | August 12, 2010 10:01 |