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

[snappyHexMesh] What's wrong with my locationInMesh (0 0 -0.5);?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 28, 2011, 19:06
Default What's wrong with my locationInMesh (0 0 -0.5);?
  #1
Senior Member
 
Klaus
Join Date: Mar 2009
Posts: 281
Rep Power: 22
klausb will become famous soon enough
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
klausb is offline   Reply With Quote

Old   December 29, 2011, 04:37
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Klaus,

Quote:
Originally Posted by klausb View Post
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
__________________
wyldckat is offline   Reply With Quote

Old   December 29, 2011, 06:28
Default .... many attempts later, still no luck?!?!
  #3
Senior Member
 
Klaus
Join Date: Mar 2009
Posts: 281
Rep Power: 22
klausb will become famous soon enough
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
Attached Files
File Type: txt log.snappyHexMesh.txt (2.5 KB, 13 views)
File Type: txt snappyHexMeshDict.txt (9.6 KB, 15 views)
klausb is offline   Reply With Quote

Old   December 29, 2011, 06:52
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
__________________
wyldckat is offline   Reply With Quote

Old   December 29, 2011, 10:30
Default still the same problem > here the details
  #5
Senior Member
 
Klaus
Join Date: Mar 2009
Posts: 281
Rep Power: 22
klausb will become famous soon enough
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
Attached Files
File Type: gz base.tar.gz (7.9 KB, 7 views)
klausb is offline   Reply With Quote

Old   December 29, 2011, 17:32
Default A fix, not a solution > How can I move cube.stl?
  #6
Senior Member
 
Klaus
Join Date: Mar 2009
Posts: 281
Rep Power: 22
klausb will become famous soon enough
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
klausb is offline   Reply With Quote

Old   December 29, 2011, 17:36
Default
  #7
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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 is offline   Reply With Quote

Old   December 29, 2011, 17:39
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by klausb View Post
Is there a smart way of moving an object e.g. my cube.stl inside the domain to another position?
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
__________________

Last edited by wyldckat; December 29, 2011 at 17:45. Reason: added "Example:"
wyldckat is offline   Reply With Quote

Old   December 29, 2011, 20:30
Default The error remains, when the domain mesh is z<=0
  #9
Senior Member
 
Klaus
Join Date: Mar 2009
Posts: 281
Rep Power: 22
klausb will become famous soon enough
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
klausb is offline   Reply With Quote

Old   December 30, 2011, 05:50
Default
  #10
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
__________________
wyldckat is offline   Reply With Quote

Old   December 30, 2011, 10:02
Default here the case file
  #11
Senior Member
 
Klaus
Join Date: Mar 2009
Posts: 281
Rep Power: 22
klausb will become famous soon enough
Hello Bruno,

find attached the case file for review.

Klaus
Attached Files
File Type: gz base.tar.gz (7.8 KB, 7 views)
klausb is offline   Reply With Quote

Old   December 31, 2011, 11:22
Default
  #12
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
__________________
wyldckat 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
[blockMesh] FATAL ERROR: face 6 in patch 2 does not have neighbour cell face: 4(8 9 21 20) robingilbert OpenFOAM Meshing & Mesh Conversion 28 November 23, 2023 07:32
[blockMesh] meshing a cylinder Nico A. OpenFOAM Meshing & Mesh Conversion 6 June 19, 2017 15:12
blockMesh error: ill defined primitiveEntry starting at keyword 'vertices' mgab OpenFOAM Pre-Processing 3 January 24, 2017 04:03
icoFoam- unphysical results Mirage12 OpenFOAM Running, Solving & CFD 2 July 12, 2013 04:52
[blockMesh] square cylinder obstacle fferroni OpenFOAM Meshing & Mesh Conversion 2 May 26, 2012 05:48


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