CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[mesh manipulation] How to create patch after snappyHexMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 8, 2008, 09:00
Default How to create patch after snappyHexMesh
  #1
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 18
hsieh is on a distinguished road
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
hsieh is offline   Reply With Quote

Old   August 8, 2008, 09:01
Default press send too fast before add
  #2
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 18
hsieh is on a distinguished road
press send too fast before adding the picture.

\image{cup};

Pei
hsieh is offline   Reply With Quote

Old   August 8, 2008, 09:02
Default OK, let me try this again.
  #3
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 18
hsieh is on a distinguished road
OK, let me try this again.


hsieh is offline   Reply With Quote

Old   August 8, 2008, 10:08
Default We do this by either: 1. Usin
  #4
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
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.
eugene is offline   Reply With Quote

Old   August 8, 2008, 11:59
Default Hi, Eugene, Thanks. I thin
  #5
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 18
hsieh is on a distinguished road
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.
hsieh is offline   Reply With Quote

Old   August 10, 2008, 16:28
Default Thanks Eugene, I was not aw
  #6
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
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.
bastil is offline   Reply With Quote

Old   August 11, 2008, 06:12
Default Hi Bastil, We use CATIA/ANS
  #7
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
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.
eugene is offline   Reply With Quote

Old   August 11, 2008, 08:10
Default Hi, Eugene, My understandin
  #8
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 18
hsieh is on a distinguished road
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
hsieh is offline   Reply With Quote

Old   August 11, 2008, 11:40
Default Like I said, I don't know soli
  #9
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
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.
atg likes this.
eugene is offline   Reply With Quote

Old   August 11, 2008, 11:43
Default Eugene, thanks once more. I
  #10
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
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
bastil is offline   Reply With Quote

Old   August 12, 2008, 05:13
Default These days we mostly use NASTR
  #11
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
These days we mostly use NASTRAN with and without multi-regions.
eugene is offline   Reply With Quote

Old   September 1, 2008, 11:53
Default Hi all, I have problems exp
  #12
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
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.
bastil is offline   Reply With Quote

Old   September 13, 2008, 13:57
Default Hey all, What I've found to w
  #13
New Member
 
Dustin
Join Date: Mar 2009
Posts: 6
Rep Power: 17
nitsud is on a distinguished road
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
atg likes this.
nitsud is offline   Reply With Quote

Old   September 22, 2008, 17:41
Default Hi, Eugene, I am wondering
  #14
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 18
hsieh is on a distinguished road
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
hsieh is offline   Reply With Quote

Old   September 23, 2008, 04:05
Default Pei, you can have a look at
  #15
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
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
atg likes this.
bastil is offline   Reply With Quote

Old   November 25, 2008, 02:45
Default Hey all just an FYI.. If yo
  #16
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 555
Rep Power: 27
linnemann will become famous soon enough
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
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   December 12, 2008, 04:39
Default Hi, i'm trying to create a
  #17
New Member
 
Bastien Holbek
Join Date: Mar 2009
Posts: 15
Rep Power: 17
bholbek is on a distinguished road
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
bholbek is offline   Reply With Quote

Old   December 12, 2008, 05:19
Default Last thing, what should i d
  #18
New Member
 
Bastien Holbek
Join Date: Mar 2009
Posts: 15
Rep Power: 17
bholbek is on a distinguished road
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
bholbek is offline   Reply With Quote

Old   December 12, 2008, 07:28
Default It's enough that you put all y
  #19
Senior Member
 
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 237
Rep Power: 18
fra76 is on a distinguished road
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
fra76 is offline   Reply With Quote

Old   December 12, 2008, 11:37
Default Hi, Thank you for your answ
  #20
New Member
 
Bastien Holbek
Join Date: Mar 2009
Posts: 15
Rep Power: 17
bholbek is on a distinguished road
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
bholbek is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Commercial meshers] Fluent3DMeshToFoam simvun OpenFOAM Meshing & Mesh Conversion 50 January 19, 2020 15:33
[Other] dynamicTopoFVMesh and pointDisplacement RandomUser OpenFOAM Meshing & Mesh Conversion 6 April 26, 2018 07:30
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 19:43
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) cfdonline2mohsen OpenFOAM 3 October 21, 2013 09:28
chtMultiRegionFoam Tutorial m.nichols19 OpenFOAM 12 September 9, 2010 11:56


All times are GMT -4. The time now is 00:24.