CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: snappyHexMesh and Others (https://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/)
-   -   Water burst inside snappyHexMesh (https://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/110188-water-burst-inside-snappyhexmesh.html)

raysark December 5, 2012 11:09

Water burst inside snappyHexMesh
 
1 Attachment(s)
Hi,

i am a begineer in OpenFoam.

I created an stl file representing three connected tubes and this is my snappyHexMesh.

I want to find a way to add a water box inside me snappyHexMesh that bursts like the damBreak case.

Do you know what do I have to write and where (e.g. snappyHexMeshDict)?

Thank you

mturcios777 December 5, 2012 13:34

The damBreak case uses setFields to define a region where the fluid is located (two-phase flow). If this is all you want, then you don't need to do anything in snappyHexMesh, just use setFields. If you want actual patches you can set conditions on (split the domain into an inside/outside), you'll need to refer to the pimpleDyMFoam propeller tutorial case. They create an internal cylinder to use as an AMI boundary; you could use the same approach.

raysark December 5, 2012 13:53

Quote:

Originally Posted by mturcios777 (Post 395980)
The damBreak case uses setFields to define a region where the fluid is located (two-phase flow). If this is all you want, then you don't need to do anything in snappyHexMesh, just use setFields. If you want actual patches you can set conditions on (split the domain into an inside/outside), you'll need to refer to the pimpleDyMFoam propeller tutorial case. They create an internal cylinder to use as an AMI boundary; you could use the same approach.

I tried to use setFields but I couldn't do it. At the beginning I set a boxToCell with water in the Mesh but of course disappeared when I executed snappyHexMesh. Do you know which box "command" to use in order to keep it in after the snappyHexMesh. Probably I need a box that it is not connected to any of the faces of the blockMesh so i can locate it in the place where the snappyHexMesh appears and with locationInMesh to keep. Sorry if too complicated and thank you for the pimpleDyMFoam case I will see it

mturcios777 December 5, 2012 13:55

You have to use setFields after snappyHexMesh.

raysark December 5, 2012 14:34

Quote:

Originally Posted by mturcios777 (Post 395987)
You have to use setFields after snappyHexMesh.

I set the locationInMesh so both the blockMesh and the snappyHexMesh can be seen and I used setFields after the snapyHexMesh. everything was ok until I pressed play and no volume field for water was available in the Mesh only the blockMesh and the snappyHexMesh

mturcios777 December 5, 2012 14:49

After you have created your domain with snappyHexMesh, you can then run setFields on the newly created domain. Make sure that the settings in system/controlDict have your start time to be the mesh created by sHM. Are you using the overwrite function for sHM, or are you keeping the intermediate meshes?


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