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] SnappyHexMeshDict setup Problem (https://www.cfd-online.com/Forums/openfoam-meshing/61476-snappyhexmeshdict-setup-problem.html)

jakoff February 18, 2009 11:45

SnappyHexMeshDict setup Problem
 
Hello,

This is probably an easy question for anyone already using snappy for a while but after searching the Forum for quite a while and trying to solve the problem by myself i'm asking for your help!

I want to use snappyHexMesh for the first time and tried to adapt and understand the motorBike tutorial but when I start snappy I get the error:

"meshQualityControls is undefined in dictionary"

and it stops.

I used the meshQuality Options down in the snappyHexMeshDict from the motorBike tutorial. Do I need a file with additional parameters or how can I solve this issue?

Hopefully someone can give me a hint what to do.

Thanks

wolle1982 February 19, 2009 02:57

hi, no our don't need any f
 
hi,

no our don't need any further file. "is undefined" very often means that before the entry (here meshQualityControls) there is something missing, that completes the routine before.

e.g.: a ";", ")", "}" .....mostly the ";"

please check that. or post your snappyHexMeshDict here.

wolle1982 February 20, 2009 03:29

Hi Jakob, it is very clear
 
Hi Jakob,

it is very clear what goes wrong:

you made the initial mesh with blockMesh and then inserted a STL file of a cube AND you defined a refinementRegion (here: a searchableBox). this is not necessary. refinementRegions (boxes and spheres) define refinement regions in ADDITION to the refined geometry. very needful to refine like wake-region (Nachlauf) behind a car or a wing.

but you only want to refine around your cube, so get rid of the refinementRegion and you'll be fine, see: you defined "outside" of the box, which means that sHM refines EVERYTHING outside this box. here: it refines 5 times. your cube only is refined 3 times, thats why you cannot see it. The refinement level is always referred to global Mesh cell-size, not to local cell-size.

another possibility for you to refine only a stupid box is to get rid of your STL file and only define a searchable box with mode "inside". pay attention to locate your locationInMesh-Point outside this box (in both cases). sHM then refines the initial Mesh in such a way, that inside your searchable box the given refinementlevel (5) is homogeneously reached. the locationInMesh-Point tells sHM to keep all cells outside the box and deletes the cells inside the box. so, the result is the same. disadvantage: works only for boxes and spheres.

jakoff February 20, 2009 06:11

Thank you Wolfgang, your ex
 
Thank you Wolfgang,

your explanations made things a lot better to understand for me.

I found my mistake and I could have had everything running already, but my stl file was corrupted. So thats why it didn't work.

A couple of weeks and I might even get it running ;)

stevendarkes March 4, 2009 11:11

Hi Foamers, I have a proble
 
Hi Foamers,

I have a problem with snappyHexMesh. I would like to mesh a simple case on one processor but OF is always looking for decomposeParDict!

Any idea where I have to specify that I want to run it on one processor?

Thank's in advance!

norman1981 March 4, 2009 11:19

Hi Steven, copy the decompo
 
Hi Steven,

copy the decomposeParDict file taken from the motorBike tutorial case in your system directory and modify it in this way:

numberOfSubdomains 1;

method hierarchical;

hierarchicalCoeffs
{
n (1 1 1);
delta 0.001;
order xyz;
}

Regards

Norman

wolle1982 March 4, 2009 11:49

ADD-ON to Norman, it totall
 
ADD-ON to Norman,

it totally doesn't matter how many domains are defined in the decomposeParDict. It's just necessary that there is one at all.

greetings.

Bob June 29, 2009 09:26

Dear,

I would like to continue on this thread as it is related to my problem.
To learn using snappyHexMesh I want to mesh the surface of a sphere. In addition to this, in order to model the wake behind the sphere, I define a block as refinementRegion.

When I do this, sHM does refine the sphere's surface but not the region of the block. As long as the sphere resides in the block's region, no refinement of the block is obtained. Once the block is moved away from the sphere it does work though.

According to the manual this should be possible, but I do miss something. Does anyone experienced this before? Below, I included the castellatedMeshControls; hopefully, the error is trivial:-)...

Many thanks,

Regards,
Bob



geometry
{
box
{
type searchableBox;
min (3.5 1.5 3.5);
max (20 -1.5 6.5);
}

ball.stl
{
type triSurfaceMesh;
name ball;
}

};

// Settings for the castellatedMesh generation.
castellatedMeshControls
{
maxLocalCells 1000000;
maxGlobalCells 2000000;
minRefinementCells 10;
nCellsBetweenLevels 3;

features
(

);

refinementSurfaces
{
ball
{
// Surface-wise min and max refinement level
level (2 2);
}
}

resolveFeatureAngle 30;

refinementRegions
{
box
{
mode inside;
levels ((1 1));
}
}


locationInMesh (2.1 2.1 3.6);
}


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