CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] snappyHexMesh and boundary conditions (https://www.cfd-online.com/Forums/openfoam-meshing/71192-snappyhexmesh-boundary-conditions.html)

fijinx December 18, 2009 12:54

snappyHexMesh and boundary conditions
 
First and foremost, I am new to OpenFOAM, so this may be a silly question or one that has been brought up before. However, I am attempting to run a 2D nozzle problem and have a question on how to get empty on the front and back with snappyHexMesh. As I understand it boundary conditions are applied to patches, so if I apply a BC to the surface of an STL file that is smaller than the bounding box, it would be a 3D BC on the entire surface? I tried making the bounding box thinner than the STL file in the z direction, but came up with an error when trying to run SonicFoam about it not being 1D or 2D because the empty faces weren't divisible by the cells (or something to that effect). If anyone could shed some light on this It would be appreciated!

fijinx December 18, 2009 14:36

Actually I think I've figured out that the STL file itself needs to be broken up into the different surfaces, like in the motorBike tutorial example. I've searched all over the place, but can't seem to find a program that can make a multi-surface STL file. Could someone point me in the right direction?

linnemann December 19, 2009 03:40

Hi

Yes if you look here http://www.cfd-online.com/Forums/ope...y-patches.html

I have a brief description of how to do it with Salome.

fijinx December 20, 2009 16:17

I tried Salome and it works great for separating the Surfaces to apply BC's, however there are two problems.

1) there is no way to define the refinement of the exported STL

2) the different surfaces do not use the same edge points which creates holes at edges, which causes problems in meshing.

If anyone has a better solution, please tell!

linnemann December 21, 2009 01:53

Hi

Forgot to mention that if you want the edges to align you need to create a surface mesh in the MESH module of Salome and then export to STL from there.

You can specify the number of mesh points of a given edge (1D) as a submesh to the surface mesh (2D). This can be done creating a geometry group of the edges in the GEO module and then use this group as a submesh input.

Create a face group(s) of the patches (like inlet, outlet etc.) in the GEO module and in the mesh module right click the mesh and select "create groups from geometry" and select the GEO face group(s) in the tree.

Cant remember if you can export separate groups from the MESH module, but I will make a quick geometry and test it out for you.

EDIT:

Just checked you can only export mesh to stl, not submesh or groups. You can although explode the 3D geometry into faces and use these as separate meshes (can be a tedious process). If some care is taken to the edge mesh (number of segments) you should be able to get a combined STL with no gaps in geometry.

idrama January 15, 2010 17:01

Hey formers!

Could anybody tell what i am supposed to do with defaultPatches from the bounding box defined by the blockMeshDict. I have an internal flow and want to get rid of it.

kinda regards

claus

Wolle February 2, 2010 04:43

Hi James,

Quote:

Originally Posted by fijinx (Post 240576)
I tried Salome and it works great for separating the Surfaces to apply BC's, however there are two problems.

1) there is no way to define the refinement of the exported STL

As far, as I followed your other postings, I want to mention the following:
I think you are using SolidWorks for geometry creation, right? So then you have to set the refinement options in SolidWorks, when exporting (to what by the way? IGES? STEP (AP214)?). Salome does only (and exact!) import the geometry that has been triangulated for export by SolidWorks!

Right now I'm working on some scripts for automated use of (SolidWorks produced) IGES files, Salome, converting to STL and finally snappyHexMesh.

Cheers
Wolle

Wolle February 2, 2010 04:44

Hi all,

Quote:

Originally Posted by idrama (Post 242770)
Could anybody tell what i am supposed to do with defaultPatches from the bounding box defined by the blockMeshDict. I have an internal flow and want to get rid of it.

I think I have just posted a very similar question:

http://www.cfd-online.com/Forums/ope...tml#post244544

Cheers
Wolle


All times are GMT -4. The time now is 03:40.