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] snappyHexMesh running (https://www.cfd-online.com/Forums/openfoam-meshing/137044-snappyhexmesh-running.html)

lguillem June 9, 2014 11:35

snappyHexMesh running
 
Hello,

I'm trying to solve cfd problem using snappyHexMesh. The program works quite well but only for the mesh and it stops then. I don't find any internet help to find out what is the problem.

The problem seems to come from the running file. What is the best runApplication to make it works. I've tried some like :

runApplication snappyHexMesh

runApplication snappyHexMesh -overwrite

runApplication decomposePar
runApplication foamJob -parallel -screen snappyHexMesh
runApplication reconstructParMesh -latestTime

Has any body have ever had such a problem? Could you help me for it?

Cheers

wyldckat June 9, 2014 13:29

Greetings lguillem and welcome to the forum!

There is a very simple reason why snappyHexMesh doesn't work as a solver: it's only a mesher!! ;)

For more information about snappyHexMesh, have a look here: http://openfoamwiki.net/index.php/SnappyHexMesh

Best regards,
Bruno

lguillem June 10, 2014 04:47

Hi Bruno,

Thank you for your answer, but there is something I don't understand.
When I don't put the snapptHexMeshDict in the system file and when I run the code, calculations are made. I mean I have folders which are created (0, 0.1, 0.2...).
And when I put the snappyHexMeshDict in the system file and when I put "runApplication snappyHexMesh" in the "Allrun", those folders doesn't appear.

Would you know why ?
Thanks again for your answer.

Cheers,
Louise.

lguillem June 10, 2014 09:54

In fact snappyHexMesh create the folder 0.01 0.02 and 0.03.
And then, interDymFoam is not able to calculate because it doesn't find the 0 folder.

How can I resolve this problem ?

Cheers,
Louise.

wyldckat June 10, 2014 09:59

Hi Louise,

You're not looking at the bigger picture. From your description, my guess is that when you don't use snappyHexMesh, you still have the base mesh that was created with blockMesh. Therefore, there is a mesh available and the solver might be able to run with it.
But when you run snappyHexMesh, the resulting mesh is of very poor quality and the solver crashes soon enough.

Whenever you use the function "runApplication" in the Allrun scripts, it will create a log file with the log.name file, with the name of the application that is executed. For example, you will get "log.blockMesh" and "log.snappyHexMesh" files, when the respective applications are used. Open those log files with a text editor and you will then be able to see if things went well or not.

Furthermore, if feels like you're not familiar/comfortable with the shell/command line. Therefore, I suggest that you look for tutorials on this topic. For example: http://linuxcommand.org/learning_the_shell.php


edit: If you don't give more information about which tutorial case you're trying to run, then it gets rather complicated to help you :(.

Best regards,
Bruno

lguillem June 10, 2014 11:14

Thank again for your answer.

I will try to explain more my problem. Sorry for my english, I am french.

I want to use the tutorial floatingObject (using interdymfoam).
I want to create a snappyHexMeshDict to create a sphere inside a tank.
The snappyHexMesh seems to be working, because there is no fatal error in log.snappyhexmesh and folders 0.01, 0.02, 0.03 are created.
On the contrary, there are fatal errors in the log.interdymfoam. It is written ;


Create time

Create mesh for time = 0.03

Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Selecting motion solver: displacementLaplacian


--> FOAM FATAL IO ERROR:
cannot find file

file: /home/RN2/LouiseCode/floatingObject/0.03/pointDisplacement at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.

FOAM exiting



Am I clear ?

Best,
Louise.

wyldckat June 11, 2014 15:11

Hi Louise,

OK, that makes it a lot easier to understand what is happening in your case!

The problem is that since you did not use the option "-overwrite" with snappyHexMesh, it created those additional time folders, one per mesh stage (castellated, snapped, with layers).

For example:
Code:

snappyHexMesh -overwrite
After the mesh is complete and the only time folder available is "0", then in that folder should be the initial fields for the simulation to work as intended.

Best regards,
Bruno

lguillem June 13, 2014 11:28

Hi Bruno,

Thank you very much for your answer and for the time you've put into it !

Best regards,
Louise.


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