CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: snappyHexMesh and Others

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

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   December 28, 2011, 19:06
Default What's wrong with my locationInMesh (0 0 -0.5);?
  #1
Member
 
Klaus
Join Date: Mar 2009
Posts: 89
Rep Power: 9
klausb is on a distinguished road
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
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,659
Blog Entries: 39
Rep Power: 99
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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
Member
 
Klaus
Join Date: Mar 2009
Posts: 89
Rep Power: 9
klausb is on a distinguished road
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, 7 views)
File Type: txt snappyHexMeshDict.txt (9.6 KB, 8 views)
klausb is offline   Reply With Quote

Old   December 29, 2011, 06:52
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,659
Blog Entries: 39
Rep Power: 99
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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
Member
 
Klaus
Join Date: Mar 2009
Posts: 89
Rep Power: 9
klausb is on a distinguished road
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, 6 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
Member
 
Klaus
Join Date: Mar 2009
Posts: 89
Rep Power: 9
klausb is on a distinguished road
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
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,659
Blog Entries: 39
Rep Power: 99
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,659
Blog Entries: 39
Rep Power: 99
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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
Member
 
Klaus
Join Date: Mar 2009
Posts: 89
Rep Power: 9
klausb is on a distinguished road
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
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,659
Blog Entries: 39
Rep Power: 99
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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
Member
 
Klaus
Join Date: Mar 2009
Posts: 89
Rep Power: 9
klausb is on a distinguished road
Hello Bruno,

find attached the case file for review.

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

Old   December 31, 2011, 11:22
Default
  #12
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,659
Blog Entries: 39
Rep Power: 99
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
meshing a cylinder Nico A. OpenFOAM Native Meshers: blockMesh 2 April 8, 2011 04:26
meshing a cylinder Nico A. OpenFOAM Native Meshers: blockMesh 0 April 7, 2011 11:09
Blockmesh error - 2D scramjet - please help ishaninair OpenFOAM Native Meshers: blockMesh 7 March 18, 2011 01:14
LiftDrag tool nuovodna OpenFOAM Running, Solving & CFD 45 September 2, 2009 17:56
udf error srihari FLUENT 0 February 9, 2009 10:00


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