CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Meshing & Mesh Conversion (
-   -   3D snappyHexMesh Help (

Ice_Man June 20, 2012 15:43

3D snappyHexMesh Help
2 Attachment(s)

I am attempting to modify the wingMotion tutorial to make it 3D and also change the geometry of the wing.obj. I have been succesful in changing the obj file to what I want and using snappyhexmesh to "snap" that geometry into my blockMesh domain. However, when I run extrudemesh createpatch and simplefoam my object is no longer visible and the geometry becomes two dimensional. I do not know what solvers to run in this situation that will find solutions in 3D.

Any help/guidance is appreciated. I have attached my obj and blockMeshDict.

lovecraft22 June 20, 2012 17:44

Why do you run extrudeMesh if your case is supposed to be 3D?

Ice_Man June 21, 2012 09:42

I used extrudeMesh because thats what is used in the wingMotion tutorial I am trying to modify. I also tried skipping the wextrudemesh and create patch steps and running simplefoam but it crashes when create and extrude are not run before it. What kind of solvers/approach do you suggest I use in order to keep the simulation 3D?

lovecraft22 June 21, 2012 09:49

If you want your case to be a 3D one then you don't need to run neither extrudeMesh nor createPatch which, in fact, are command used to make a 1 element mesh along a chosen direction, giving you 2D results then.

Just skip those two commands.
You may want to have a look at a 3D case, such as the motorbike one for instance.

Also, you defined two faces of your domain (on your blockMeshDict) as empty, that's a special boundary condition used in 2D simulation so you may want to change that condition as well.

I would also suggest you to have a look at the user manual at page U-20 where a 2D mesh is generated for the lid driven flow.

Ice_Man June 21, 2012 10:31

Thanks for your help lore,
I changed all the empty faces to walls and my mesh looks fine. When I try to run simpleFoam I get the following error message:
Cannot find file "points" in directory "polyMesh" in times 0 down to constant

From function Time::findInstance(const fileName&, const word&, const IOobject::readOption, const word&)
in file db/Time/findInstance.C at line 188.

FOAM exiting

I believe that the points file that it is looking for is supposed to be created by running extrudemesh. Should I try to find the points file somewhere else or is there a way to get simplefoam to run without that file?

lovecraft22 June 21, 2012 10:35

Did you run snappyHexMesh -overwrite or just snappyHexMesh?

If you run the latter, then you got with folders 0,1,2,3 and point should be within folder 3, meaning you have to chose that as the starting time for the simulation in your controlDict.

Ice_Man June 21, 2012 13:42

Thanks again that was very helpful I was running snappyhexmesh overwrite. I was able to get simplefoam running after a few more minor changes.
Currently the wingMotion folder is divided into three subfolders; wingMotion_snappyHexMesh, wingMotion2D_simpleFoam and wingMotion2D_pimpleDyMFoam. I copied the 3 file from snappyhexmesh into the wingMotion2D_simplefoam folder and that allowed simplefoam to run. What should I do now? I want to get my object to move through the mesh due to the inlet velocity, I think I want to run pimpleDyMFoam, but I am getting the following error message:
Create time

Create mesh for time = 3

Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Selecting motion solver: displacementLaplacian
Selecting motion diffusion: inverseDistance
--> FOAM Warning :
From function polyBoundaryMesh::patchSet(const wordReList&, const bool) const
in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 573
Cannot find any patch names matching wing
Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RASModel
Selecting RAS turbulence model kOmegaSST
alphaK1 0.85034;
alphaK2 1;
alphaOmega1 0.5;
alphaOmega2 0.85616;
gamma1 0.5532;
gamma2 0.4403;
beta1 0.075;
beta2 0.0828;
betaStar 0.09;
a1 0.31;
c1 10;

Reading field rAU if present

No field sources present

PIMPLE: no residual control data found. Calculations will employ 2 corrector loops

Starting time loop


All times are GMT -4. The time now is 08:06.