CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Native Meshers: snappyHexMesh and Others (
-   -   Position of ref. box changes after snappy (

foam_noob December 17, 2009 04:47

Position of ref. box changes after snappy
1 Attachment(s)
A friendly hello to all,

I am currently simulating the airflow over a model automobile. After creating several refinement boxes and running snappy, I noticed that the positions of the boxes had changed. One of the refinement boxes is supposed to be located at the rear of the vehicle. Instead it moved to the front. The file is of STL format.

Any help is appreciated and rewarded with digital Christmas cookies. :)


fijinx December 24, 2009 03:57

This may be a solution, or not! If you read the OpenFOAM manual Section 5.3.1 page U-134 it defines the coordinate system as the order of your vertices "the x1 direction is described by moving from vertex 0 to vertex 1;" and so on. So your x y z is not as you might expect unless you follow this convention. Also, I believe snappy reads the coordinate info from the blockmesh file, so if it's defined backward, it'll be on the wrong side.


foam_noob January 12, 2010 03:23

Thank you for your reply James,

The STL file which I meshed with snappy is a closed 3d object. I only used the BlockMeshDict to create a box around the meshed STL file. Afterwards I defined the LocationInMesh to be inside the 3d object and created refinement boxes in the snappy file. The outer box created with BlockMeshDict was therefore deleted.

Now I have 2 questions.

1. Does the box created in BlockMeshDict influence the position of the refinement boxes created in snappy?

2. Does the origin of the coordinate system change after I mesh my STL file with snappy?

Thanks in advanced,


fra76 January 13, 2010 14:12

Strange, the closed STL files used for refining should not move around. What I can suggest is:
- check that it is in the position you expect, by loading it in paraFoam, together with the mesh.
- use a recent 1.6.x version, as this tool is under continuous evolution. A while ago I hit a problem with closed STL files and the mesher refining outside instead of inside them. This problem had been then fixed in one of the 1.6.x updates.

About your 2 questions, the answer is no for both!


All times are GMT -4. The time now is 16:44.