CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Help with Tunnel in Dambreak Tutorial Modification (https://www.cfd-online.com/Forums/openfoam/201654-help-tunnel-dambreak-tutorial-modification.html)

Braedan May 7, 2018 15:06

Help with Tunnel in Dambreak Tutorial Modification
 
So I have just started using openfoam, and have gone through some tutorials. I wanted to learn by modifying the dam break tutorial to encompass a tunnel for the water to flow through rather than just the water flowing over. I used the boundary conditions from the weir tutorial for an inlet and outlet for the water flow. I have also extended the tutorial to 3 dimensions. Now I wanted to add a tunnel and have achieved creating a hex of the tunnel, but I am confused on how to establish the tunnel as a hole, as right now it is just another boundary block and its 2 faces touch with the faces of the dam walls so no water will flow through the tunnel. I have tried separating the hex blocks into smaller ones to accompany for this change and of course changing the walls as well, but I only get massive errors from the blockMesh about faces not matching their patches and hexes not forming correctly. Then I proceeded on to try and create the walls of the dam and walls of the tunnel as patches and mergepatchpairs to try and establish a connection between the two but have got an error when I tried to establish the boundary conditions in my files in 0.orig for the Initial conditions on the patches. Ive spent two days trying to do this but still no luck, I feel like it is a very easy solution but it manages to escape my grasp. Any and all help is very much appreciated! Thank you very much for your time.
~Braedan

vatavuk May 9, 2018 16:28

Hi Braedan,

Welcome to the forum!
It is difficult to understand what you are trying to do. Could you make a drawing with the flow configuration you want to simulate?

Best Regards,
Paulo

Braedan May 9, 2018 16:36

Hey Vatavuk,
Thanks for the reply. Unfortunately, at the moment I am unable to create a diagram being on the go. In essence I want to reconfigure the geometry of the damBreak tutorial so that the water, rather than flowing over the dam, flows through a block created through the dam. But my problem is that I cannot create the wall of the dam on either side where the wall of the dam is aligned with the tunnel block is empty, so that the water will actually flow through the block. I will hopefully be able to upload a drawing of the configuration I want if my problem is still to confusing at a later time. Thank you

vatavuk May 10, 2018 09:15

Hi Braedan,

There are two ways to create your geometry and mesh:

a) Use blockMesh. This may become difficult because blockMesh by default requires that the interface between blocks match perfectly with each other.

b) Use blockMesh and snappyHexMesh. This is normally best choice for a complicated geometry. First you create a simple block using blockMesh, then you create the dam with the tunnel using a CAD program and export the model to the stl format. The last step is to insert the dam inside the block using snappyHexMesh. To perform those steps, you may follow the tutorial in the link below:

https://www.hpc.ntnu.no/display/hpc/...llway+Tutorial

This tutorial was prepared for version 2.0 of OF. The geometry and mesh creation part of the tutorial works fine with the new versions of OF, but to run interFoam you must make some adaptations that are described in:

https://unicfd.ru/en/training-tracks...-openfoam-4-1/

Best regards,
Paulo


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