CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: snappyHexMesh and Others (http://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/)
-   -   Baffle/Cyclic Region Creation (http://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/108745-baffle-cyclic-region-creation.html)

GRAUPS October 31, 2012 11:47

Baffle/Cyclic Region Creation
 
Hey, I'm looking to create an internal face / baffle region / cyclic region in snappyHexMesh. I know that openFOAM doesn't support internal boundaries unless they're cyclics. My goal is to be able to define these cyclic regions while meshing so that they are placed in the boundary file upon mesh completion.

What is the best way to do this and where do they get defined in SnappyHexMeshDict?
Or do these cyclics need to be manually entered in some way after the mesh is created?

wyldckat October 31, 2012 15:46

Greetings Brock,

A quick search seems to have proved my suspicions (thanks @oga_shin):
  1. Set in "snappyHexMeshDict" to create "faceZones". For more, run:
    Code:

    find $FOAM_APP -name snappyHexMeshDict
    And study the file that should appear, namely OpenFOAM's "applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict".
    Some of the tutorials should also help with examples for creating "faceZones":
    Code:

    find $FOAM_TUTORIALS -name snappyHexMeshDict
  2. Then use createBaffles for converting those "faceZones" to baffles. For more, run:
    Code:

    find $FOAM_TUTORIALS -name Allrun | xargs grep -sl createBaffles
    And study how createBaffles can be used.
Best regards,
Bruno

GRAUPS October 31, 2012 16:15

Bruno, thank you so much for your reply. Looking at the snappyHexMeshDict example in your first suggestion has answered most of my questions. I had been simply finding and grepping in the $FOAM_TUTORIALS... but the one you found is a more complete example with explanations. Thanks!

ZKW November 16, 2012 06:47

1 Attachment(s)
Dear Bruno,

I work with SnappyHexMesh, i am also used to creating mesh with MultiRegionMesh using Emesh and Cellzone in SnappyHexMesh.

1. when the patches or faces created by SnappyHexMesh why are they defined as walls and not defined as patches??

2. Is it possible to convert these faces(walls) to Internalfaces after SnappyHexMesh ??

I have 3 closed .Stl files, 2 of which form the Fluid region (air) & one the solid region housing both the Liquid region. & Interface between the 2 liquids i need to provide a Velocity Boundary condition and I want flow throught the Patch.. So i am defining it as Cyclic...

3. Am i correct.. or is there any other way??

4. Does the baffle region act as a cyclic patch if i define.

5. Where do i define about the baffle region in blockMesh or in SnappyHexMesh??

Now i have defined it in blockMesh.
baffle1Wall_1
{
type cyclic;
// sampleMode nearestPatchFace;
// sampleRegion region0;
// samplePatch baffle1Wall_0;
matchTolerance 0.0001;
neighbourPatch baffle1Wall_0;
offsetMode uniform;
offset (0 0 0);
faces ();
}


blockMesh works & I can see the Boundary condition

baffle1Wall_0
{
type cyclic;
nFaces 0;
startFace 8090;
matchTolerance 0.0001;
neighbourPatch baffle1Wall_1;
}


Regards
Unnikrishnan.

wyldckat November 20, 2012 08:56

Greetings Unnikrishnan and welcome to the forum!

OK, several of your questions are answered in the main "snappyHexMeshDict" example located at "applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict" in OpenFOAM's main directory. You can browse online here: https://github.com/OpenFOAM/OpenFOAM...xMeshDict#L122 - start reading from line number 122.

For the rest, I suggest you study the case and solution presented here: http://www.cfd-online.com/Forums/ope...nd-tunnel.html - there you'll find out how to create baffles from "faceZones"!

As for cyclics vs baffles:
  • cyclics work as if they were matter teleportation patches :D
  • baffles act as zero thickness walls inside a mesh, as far as I know.
Best regards,
Bruno

ZKW November 21, 2012 10:35

Thanks Bruno

The Tip was very helpful, I am using the patchInfo type Patch in the SnappyHexMeshDict.
fan2
{
// Surface-wise min and max refinement level
level (3 4);
patchInfo // Solved my problem
{
type patch;
// Solved my problem, Now using a patch
}
faceZone fan2;
cellZone fan2;
cellZoneInside inside;
}
fan3
{
// Surface-wise min and max refinement level
level (3 4);
patchInfo
{
// type cyclic;
// Not possible to use cyclic, as it requires a neighbouring patch,
// i am not able to provide a neighbouring patch.

type patch;
}
faceZone fan3;
cellZone fan3;
cellZoneInside inside;
}


If you have some or details explaining where is the correct option to use patch, baffle and cyclic... (i.e a patch is like an Internal face, where you can define B.C right??)

Also: This is my second ID( ZKW ), I am very old member (Unnikrsn), Have to use company ID as posting pictures related to work.

Thanks & Regards
Unnikrishnan.

ZKW November 22, 2012 06:30

1 Attachment(s)
Dear Bruno,

I have the following setup in my case.
A Fan circulating air within a closed Body ( Setup for PIV simulation ).

as previous discussed in this thread I have created the Patch using the option in snappyHexMesh
patchInfo
{
type patch;
}

I have a air (fluidRegion) and fan (fluidRegion)
I define the Velocity Boundary Condition in air/U and the fan/U file.

air/U
internalField uniform (0.5 0 0 );
boundaryField
{
air_to_fan
{
type inletOutlet;
value $internalField;
inletValue uniform ( 1.5035 0 0 );
}
}

fan/U
internalField uniform (3.07 0 0 );
boundaryField
{
fan1_to_air
{
type inletOutlet;
value $internalField;
inletValue uniform ( 1.5035 0 0 );
}
}

My results doesn't match the experimental results.

Am I using the correct Boundary condition ??
Should i use the Cyclic patch, For Cyclic Patch, how should i use the cyclic patch.

I also would like to have some help if using the fan or the fanPressure patch a correct option.
OpenFOAM-2.1.x/src/finiteVolume/fields/fvPatchFields/derived/fanPressure
While using this patch, I can only define Pressure, is there an option to define Velocity.

My main problem is that it is a single air Region.
I am not sure. How to solve this problem.. kindly help.

Thanks & Regards
Unnikrishnan.

wyldckat November 23, 2012 16:08

Hi Unnikrishnan,

Sorry, but unfortunately I'm not familiar enough with how the fan system works :(

I suggest you ask this at the dedicated sub-forum: Running, Solving & CFD

Best regards,
Bruno


All times are GMT -4. The time now is 22:29.