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] What's wrong with my locationInMesh (0 0 -0.5);? (https://www.cfd-online.com/Forums/openfoam-meshing/95686-whats-wrong-my-locationinmesh-0-0-0-5-a.html)

klausb December 28, 2011 18:06

What's wrong with my locationInMesh (0 0 -0.5);?
 
Hello,

what's wrong with my locationInMesh (0 0 -0.5);?

--> FOAM FATAL ERROR:
Point (0 0 -0.5) is not inside the mesh or on a face or edge.
Bounding box of the mesh (-0.25 -0.5 -1.5) (0.75 0.5 0)

I tried plenty of coordinates but I keep getting the same error message.

Klaus

wyldckat December 29, 2011 03:37

Greetings Klaus,

Quote:

Originally Posted by klausb (Post 337210)
what's wrong with my locationInMesh (0 0 -0.5);?

--> FOAM FATAL ERROR:
Point (0 0 -0.5) is not inside the mesh or on a face or edge.
Bounding box of the mesh (-0.25 -0.5 -1.5) (0.75 0.5 0)

You are possibly trying values that are nice and round. Try something like: (0.01212132312 0.0131151412312 -0.532412781426)
Because the "locationInMesh" point is used as a reference for correlating positions of every vertex and geometry face, so it cannot be placed in the same place as any other vertex, line nor face.

Good luck!
Bruno

klausb December 29, 2011 05:28

.... many attempts later, still no luck?!?!
 
2 Attachment(s)
Hello Bruno,

I kept trying to find suitable coordinates for locationInMesh but the error remains.

I attached the log file and the dict, maybe the cause is somewhere else?!

Klaus

wyldckat December 29, 2011 05:52

Hi Klaus,

At first glance, the only wrong looking thing I can find is that this particular point is too close to the end of the bounding box.

I suggest that you create a simple STL file, a cube or something like that, and place it in the same place where your wing is being placed. If it still fails with said cube, package the case with the cube and post it here, so we can confirm if it is really a problem in the dictionary files or if it's your "snappyHexMesh" that is somehow damaged.

The other suggestion is to re-test one of the tutorial cases that use snappyHexMesh, to confirm if the utility is working at all!

By the way, which OpenFOAM version are you using?

Best regards,
Bruno

klausb December 29, 2011 09:30

still the same problem > here the details
 
1 Attachment(s)
Hello Bruno,

1. I ran the motorBike and the bullet case, in both cases snappyHexMesh worked fine.

2. I use OpenFoam version 2.0.1. (git)

3. I created a cube and tried again, but the problem remains

Find attached the case file with the cube.

Klaus

klausb December 29, 2011 16:32

A fix, not a solution > How can I move cube.stl?
 
Hello,

I figured out that the problem exists apparently only, when the z-dimension of the domain is negative (I used that to deal with the x,y,z orientation of my CAD system/stl files generated).

When I changed the orientation snappyHexMesh worked.

Is there a smart way of moving an object e.g. my cube.stl inside the domain to another position?

Klaus

wyldckat December 29, 2011 16:36

Hi Klaus,

Well, on the case you attached, all I had to do was change:
Code:

locationInMesh (0.24912132312 0.49131151412312 -10e-3);
To this:
Code:

locationInMesh (0.24912132312 0.49131151412312 10e-3);
This change was necessary because your blockMeshDict in the attached case has the following limits:
Code:

(-0.25 -0.5 0) (0.75 0.5 1.5)
Can you confirm if this works for you?

If it does and the other one still doesn't, then try moving the cube to the same quadrant as your wing. I say this because there might be a bug associated to having the whole mesh placed in Z<=0.
Although I've now tested this hypothesis and was unable to make it crash.

So, all that's left is for you to re-test things on your side!

Best regards,
Bruno

wyldckat December 29, 2011 16:39

Quote:

Originally Posted by klausb (Post 337326)
Is there a smart way of moving an object e.g. my cube.stl inside the domain to another position?

:D Fortunately there seems to exist one in OpenFOAM 2.0 and above. Run the following command for the full information:
Code:

surfaceTransformPoints -help
Example:
Code:

surfaceTransformPoints constant/triSurface/cube.stl constant/triSurface/cube.obj -translate '(1 0 0)'
You might ask "Why cube.obj?" - this might come in handy because the Obj files (Wavefront format) are in ASCII format (useful for visually debugging the file itself), have a better definition of vertices and how they interconnect... and can also be opened in ParaView.

Best regards,
Bruno

klausb December 29, 2011 19:30

The error remains, when the domain mesh is z<=0
 
Hello Bruno,

I did the test with the cube, positioned exactly where the wing was located in the mesh with z<=0.

The error remained:

--> FOAM FATAL ERROR:
Point (0.249121 0.491312 -1.01236) is not inside the mesh or on a face or edge.
Bounding box of the mesh:(-0.25 -0.5 -1.5) (0.75 0.5 0)

From function refinementParameters::findCells(const polyMesh&) const
in file autoHexMesh/autoHexMeshDriver/refinementParameters/refinementParameters.C at line 107.

FOAM exiting


The fix is, as you suggested "surfaceTransformPoints":

surfaceTransformPoints allows to position, rotate, scale... an object in space, hence it can be positioned in a mesh with z>=0 wherever appropriate.

Thank you for your support!

Klaus

wyldckat December 30, 2011 04:50

Hi Klaus,

Could you please post the cube case you have that had that problem? I would like to confirm if this is a bug or just a strange alignment of planets ;)

Best regards,
Bruno

klausb December 30, 2011 09:02

here the case file
 
1 Attachment(s)
Hello Bruno,

find attached the case file for review.

Klaus

wyldckat December 31, 2011 10:22

Hi Klaus,

I was concerned this might be a bug, but I finally found out why you were having problems. The reason was/is simple:
  • You have in your "blockMeshDict" the following sequence of vertices:
    Code:

    vertices
    (
        (-250.0 -500.0  0)
        ( 750.0 -500.0  0)
        ( 750.0  500.0  0)
        (-250.0  500.0  0)
        (-250.0 -500.0  -1500.0)
        ( 750.0 -500.0  -1500.0)
        ( 750.0  500.0  -1500.0)
        (-250.0  500.0  -1500.0)
    );

  • When you should have:
    Code:

    vertices
    (
        (-250.0 -500.0  -1500.0)
        ( 750.0 -500.0  -1500.0)
        ( 750.0  500.0  -1500.0)
        (-250.0  500.0  -1500.0)
        (-250.0 -500.0  0)
        ( 750.0 -500.0  0)
        ( 750.0  500.0  0)
        (-250.0  500.0  0)
    );

When we run blockMesh with your vertices, it complains about negative volumes and such. If you do a check to the mesh:
Code:

checkMesh -constant
It complains about that and other issues.
As soon as we use the proper vertex distribution, these problems no longer occur :)

So next time, check your mesh and confirm that things are properly defined ;)

Best regards,
Bruno


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