CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Tutorial bigWave (https://www.cfd-online.com/Forums/openfoam/76074-tutorial-bigwave.html)

Jochem May 13, 2010 08:18

Tutorial bigWave
 
Hi,

I am new in OpenFoam. I am trying to do the tutorial bigWave. I am having some trouble with the snappyHexMesh. I've runned the blockMesh first as described in the tutorial. After this i had to make an empty directory 'triSurface'. This is no problem.

The next thing i have to do is to run snappyHexMesh with the -overwrite option using 'snappyHexMesh -overwrite'. This command should write the mesh into the constant/polyMesh directory. But OpenFoam gives me an error. This is the error i get :

Create time

Create mesh for time = 0

Read mesh in = 0.09 s

Overall mesh bounding box : (0 0 0) (200 200 90)
Relative tolerance : 1e-06
Absolute matching distance : 0.000296816

Reading refinement surfaces.
Read refinement surfaces in = 0 s

Reading refinement shells.
Refinement level 1 for all cells inside refinementBox
Read refinement shells in = 0 s

Setting refinement level of surface to be consistent with shells.
Checked shell refinement in = 0 s


Determining initial surface intersections
-----------------------------------------



--> FOAM FATAL ERROR:
Number of cells in mesh:13500 does not equal size of cellLevel:55412
This might be because of a restart with inconsistent cellLevel.

From function hexRef8::getLevel0EdgeLength() const
in file polyTopoChange/polyTopoChange/hexRef8.C at line 358.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) in "/home/jochem.vermeir/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/jochem.vermeir/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 Foam::hexRef8::getLevel0EdgeLength() const in "/home/jochem.vermeir/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libdynamicMesh.so"
#3 Foam::hexRef8::hexRef8(Foam::polyMesh const&, Foam::List<int> const&, Foam::List<int> const&, Foam::refinementHistory const&) in "/home/jochem.vermeir/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libdynamicMesh.so"
#4 Foam::meshRefinement::meshRefinement(Foam::fvMesh& , double, bool, Foam::refinementSurfaces const&, Foam::shellSurfaces const&) in "/home/jochem.vermeir/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libautoMesh.so"
#5 main in "/home/jochem.vermeir/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linux64GccDPOpt/snappyHexMesh"
#6 __libc_start_main in "/lib/libc.so.6"
#7 _start at /build/buildd/eglibc-2.10.1/csu/../sysdeps/x86_64/elf/start.S:116
Aborted


Can someone tell me what i am doing wrong?

I am doing this tutorial because i want to simulate air flow trough a build environment. I think i can do this just changing the water into air. Does someone thinks this i possible?


Regards,

Jochem

AlanR May 13, 2010 17:03

Jochem,

I think you have something wrong in your snappyHexMeshDict file settings causing the error. To simulate flow through a building, I would refer to the motorBike tutorial. It's a mesh tutorial, but it has all the settings for k-epsilon turbulence modeling of the motorbike in a wind tunnel. This is probably closer to what you're trying to do than changing fluids.
I think motorBike has an Allrun file, or you can run it with three solvers: blockMesh then snappyHexMesh, then simpleFoam.

Good luck,

Alan

AlanR May 13, 2010 17:09

You also have no refinement surfaces because the triSurface directory is empty. That's the directory where you put model geometry files in .stl format. After that, you need to call the .stl file in the snappyHexMeshDict file - there are four places that you need to update to properly link the .stl file. The snappyHexMeshDict file in the tutorials will give you good examples.

Alan

Jochem May 14, 2010 06:49

Hi Alan,

First of all thanks for the tips and the quick response. I will try and run the motorbike tutorial. Probably you're correct if you say that it will be easier to just modify geometry instead of adjusting the fluid.

I still have one question about the bigWave tutorial. Do I have to insert a .stl file in the triSurface directory? I already set the geometry in the snappyHexMeshdict file like they say in the tutorial. Is this not enough to define the geometry?

Regards,

Jochem

AlanR May 14, 2010 13:32

The dictionary file tells the solver where to find the geometry file, but the actual file itself needs to be in the triSurface directory. From your first post, these statements indicate that the solver didn't fine any refinement surfaces:

Reading refinement surfaces.
Read refinement surfaces in = 0 s

Reading refinement shells.
Refinement level 1 for all cells inside refinementBox
Read refinement shells in = 0 s

Setting refinement level of surface to be consistent with shells.
Checked shell refinement in = 0 s

If it found a surface file, it would have taken some amount of time (> 0) to read and refine. I haven't looked at the bigWave tutorial, but I have spent a lot of time with snappyHexMesh. It works quite well once you get everything set up correctly - I spent a lot of time working on the setup...

Alan

Jochem May 15, 2010 08:43

Alan,

Thanks for the explanation. I've runned the motorBike tutorial without any problems.

I will now try to use this tutorial to simulate the airflow along buildings.

Regards,

Jochem


All times are GMT -4. The time now is 21:18.