CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: snappyHexMesh and Others (http://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/)
-   -   Giving patch names within stl files (http://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/81409-giving-patch-names-within-stl-files.html)

Nik_ October 26, 2010 09:05

Giving patch names within stl files
 
Hi - I'm trying to build a mesh with snappy using an stl file. The following example builds a corner of a cube, but I also want to name the individual faces on the corner cube so I can apply an appropriate boundary condition at these (named) patches. Is this something I can do ?

Thanks for all your help in advance!

MANY THANKS TO Niklas for help with this... for the record:

solid cube_corner
facet normal 0.0 -1.0 0.0
outer loop
vertex 0.0 0.0 0.0
vertex 1.0 0.0 0.0
vertex 0.0 0.0 1.0
endloop
endfacet
facet normal 0.0 0.0 -1.0
outer loop
vertex 0.0 0.0 0.0
vertex 0.0 1.0 0.0
vertex 1.0 0.0 0.0
endloop
endfacet
facet normal 0.0 0.0 -1.0
outer loop
vertex 0.0 0.0 0.0
vertex 0.0 0.0 1.0
vertex 0.0 1.0 0.0
endloop
endfacet
facet normal 0.577 0.577 0.577
outer loop
vertex 1.0 0.0 0.0
vertex 0.0 1.0 0.0
vertex 0.0 0.0 1.0
endloop
endfacet
endsolid


becomes

solid cube_corner1
facet normal 0.0 -1.0 0.0
outer loop
vertex 0.0 0.0 0.0
vertex 1.0 0.0 0.0
vertex 0.0 0.0 1.0
endloop
endfacet
endsolid cube_corner1
solid cube_corner2
facet normal 0.0 0.0 -1.0
outer loop
vertex 0.0 0.0 0.0
vertex 0.0 1.0 0.0
vertex 1.0 0.0 0.0
endloop
endfacet
facet normal 0.0 0.0 -1.0
outer loop
vertex 0.0 0.0 0.0
vertex 0.0 0.0 1.0
vertex 0.0 1.0 0.0
endloop
endfacet
facet normal 0.577 0.577 0.577
outer loop
vertex 1.0 0.0 0.0
vertex 0.0 1.0 0.0
vertex 0.0 0.0 1.0
endloop
endfacet
endsolid cube_corner2

niklas October 26, 2010 09:36

yes, your stl should look like this

solid patch1
...facets
endsolie patch1
solid patch2
...facets
endsolid patch2


at the moment all your facets are grouped together

Novi October 27, 2010 13:41

Using blender to name patches
 
Hey, I did my stl file in solidworks and saved it in stl file. Then I assembled the parts in blender so I can name the patches. How exactly can i do that?
all i did was click at the body and then change the 'OB' field into the name that i wanted. Is it correct?
and also i tried to export it back as a single stl file, but it seems it wont produce the whole parts into one. it only generated an stl file with a single part.

can anyone help me with this?


thank you so much.


All times are GMT -4. The time now is 23:39.