I'm trying to generate a mesh from a stl-file consisting of several different solids and I'm not sure what to type into the geometry subdirectory. I've tried to do it similarly to the motorBike tutorial but it doesn't work.
Here's the message I get when I try running Snappy:
Cannot find triSurfaceMesh starting from "/home/kristian/OpenFOAM/kristian-1.5/run/localHawk/constant/triSurface/LocalHawk.stl"
From function triSurfaceMesh::checkFile(const fileName&, const fileName&)
in file searchableSurface/triSurfaceMesh.C at line 56.
Is this because of an error in the geometry subdirectory?
btw: I'm a beginner to openFOAM.
make sure to have in the snappyHexMeshDict all the subsequent entries:
// Surface-wise min and max refinement level
level (0 0);
locationInMesh (0.001 0.001 0.001);
Thank you dani.
I've read through the file several times and I'm almost certain I've included the stl-file name correctly everywhere I'm supposed to.
Could any other errors result in the same message?
e.g if there's something wrong with the stl?
I am also not sure about the refinementbox entry. can someone explain to me what exactly the "min" and "max" entries are?
Okay.. I just found out it would be a good idea to check and see if my model was even inside the background mesh. Which it wasn't, so I'm guessing that is the problem.
Why has the origin moved from where it originally was in my SolidWorks-file and what can i do to align it?
Edit: Nope. That didn't solve it either. Any Ideas?
1. min/max refinement level means what is says: force to minimum refinement, and limit maximum. My hint: make both the same (eg. (3 3) then the mesh even looks better.
2. on the STL file: make sure, the STL file contains the region name of the "patch" you want to use and refine. see http://www.cfd-online.com/Forums/ope...e-stlfile.html
remember: the filename is a different from the geometry name inside the file.
3. most CAD progs work in mm. OF and sHM work in m. So maybe your geometry i just 1000times bigger. or if it's offseted from the origin in the CAD prog by 1 mm, in OF it is offseted 1m ! check that! in that case, just mesh 1000times bigger and later transformate with the transformPoints Tool.
hope that helps a little
Yes thank you, that helped a lot.
I was actually wondering about the
min (-0.3 -0.4 -0.1);
max ( 3.0 0.4 1.4);
entry in the motorBike example. but I saw you hadn't typed it into your example so I guess it's not necessary?
The modell is 790mm long in SolidWorks. Does that mean that it's probably 790m in the stl file?
yes, the CAD Prog works in mm. the STL File doesn't contain any units. so it says: "lenght 790" eg. importing it into OF which works in m would make it 790m wide. but, as i said, don't worry. just mesh it like this and afterwards use the command
transformPoints -scale "(0.001 0.001 0.001)"that will solve it. you can check with checkMesh there it prints out the bounding box of your model in m.
Otherwise there are some openSource tools to scale/transform/rotate STL files. just search for...
The searchable box is only a BOX where the mesh will get refined in (the name "searchable" is a little missunderstanding, i know). it is useful in refining the wake area behind a geometry. the searchable box can also be a sphere, as can be seen in the igloo tutorial.
I think I have understood all that now. There's an option in the export window in SW that allows you to change the units from mm to m f.ex.
But I still can't run my snappy. when I try running it now it tells me that snapControls is undefined:
<< keyword snapControls is undefined in dictionary "/home/kristian/OpenFOAM/kristian-1.5/run/localHawk/system/snappyHexMeshDict"
file: /home/kristian/OpenFOAM/kristian-1.5/run/localHawk/system/snappyHexMeshDict from line 9 to line 180.
From function dictionary::subDict(const word& keyword)
in file db/dictionary/dictionary.C at line 288. >>
Du I have to specify the snapControls for each region in the geometry? If yes, how?
I tried running a code with the exact same syntax on a single body geometry and that worked fine.
the error sounds like you've deleted sometihing BEFORE the snapcontrol command. most likely a ";" or "." oder ")" oder "}" .....
no, you don't have to define multi snap control...
you were right. A missing ";" was the problem.
But here's another (probably simple) question:
What can cause the program to think that the "locationInMesh" is "not inside the mesh or on a face or edge" when in fact it isn't?
I am sure I've positioned the point right next to my geometry and I tried moving it slightly to make sure it's not on a face or edge, and moving it to the edge of the domain and inside the geometry.
no matter where I move it I get the same message.
thanks for all the help.
i also once had the same problem. the geometry MUST have the same coordinate system as later used in openfoam. so check already while building in CAD.
then again: mm and m checked??
how to use snappy mesh
i am trying to use snappy mesh for simpleFoam solver (snappy motor bike tutorial case), just increased the cells 100000 in to 3400000.
my questions are:
*) this is confusing question for me, can we use minX, maxX, minY,maxY,minZ, maxZ as a boundary?
if yes i am using like this
minX= inlet, maxX=outlet, minY,maxY,minZ and maxZ are wall.
please tell me is it right or not?
the remaining motor bike as wall
1) if it is wrong how can we give the inlet and outlet conditions?
in the inlet 0/U
value uniform (20 0 0);
in the outlet 0/p
value uniform 0;
when i run simpleFoam solver i am getting the following error message;
Create mesh for time = 0
Reading field p
ill defined primitiveEntry starting at keyword 'boundaryField' on line 18 and ending at line 388
file: /volume/cfd4_shared/2009-ct-PI-004/OpenFOAM/sivakumar1.5.x/run/tutorials/snappyHexMesh/motorBike/0/p at line 388.
From function primitiveEntry::readEntry(const dictionary& dict,Istream& is)
in file db/dictionary/primitiveEntry/primitiveEntryIO.C at line 210.
i have attached k epsilon U and p as well the boundary please have a look and help me to overcome this problem
I have attached an image of the motorbike tutorial after just 50 iterations.
The case seems to run fine.
The question is about the surface mesh on the side of the motorbike.
In some places it is very strange (like 2 cells; the first over the second) with green spots.
Is it just a problem of viewing correctly the surface mesh or not ?
What is the 'best way' to view grids done with snappyHexMesh ?
Let's see, by what I know:
thanks for your advices.
I use 1.6.x version.
The "ExtractCellsByRegion" tool works well.
I am trying to evaluate the possibilities of OpenFOAM in the field of ship hydrodynamics, for the moment I want to try to get the wave field generated by a single catamaran hull using interFOAM. However, after creating the background mesh, I am having the same problem as the OP, I get the error with the .stl file. I have checked everything in this post but I keep getting the same message. The ASCII stl file looks ok, I even changed the solid name in the stl file to match the file name and the name I want to give the patch.
żAny other suggestions?
Ok, forget about my previous post... The cause of the error is mainly that I am an idiot (and that the folder names are case sensitive)...
|All times are GMT -4. The time now is 02:34.|