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/)
-   -   [mesh manipulation] Odd cyclic boundary... please help! (https://www.cfd-online.com/Forums/openfoam-meshing/106016-odd-cyclic-boundary-please-help.html)

JackW August 15, 2012 09:32

Odd cyclic boundary... please help!
 
1 Attachment(s)
Hi,

I am having some trouble with an imported gmsh file for a simpleFoam run on a T106A aerofoil.

I have included the velocity profile photo.

The idea is that the geometry represents a turbine cascade, so the top and bottom both have cyclic boundaries imposed. I started by copying the aerofoil2d example then using my geometry by performing gmshToFoam and altering the files in 0 and the constant/polymesh/boundary.

I use OF 2.1.1, and I changed the type of boundary to cyclic and used the matchNeighbour to associate the two together. I then in 0 set type to cyclic (without specifying any value) for U, p, nut, nuTilda.

After calling simpleFoam I got the error saying the boundaries don't match by nearly 2% (although I know that not to be the case), so I increased matchTolerance appropriately.

The sim runs and produces the attached profile. The flow angle is 45degs above horizontal. I expected the higher speed to continue onto the underside - however there is clearly not a match between the upper and lower surfaces.
________

It looks also as if little pockets of lower speed occur at the boundaries. and get pushed through the flow. I was wondering if most of my problems occur because when I create the mesh in gmsh, gmsh doesn't realise that I intend to use cyclic boundaries and so the points don't match up? Or if I haven't set the case up properly I have used a constant resolution throughout the space to try and minimise this.

Any help would be greatly appreciated, thank you very much!

Jack

chegdan August 15, 2012 10:08

Jack,

I see that you are using simpleFoam with cyclics. Solvers that use cyclics (like channelFoam) prescribe a body force to maintain flow. With simpleFoam, it will "die out" since it is used to model pressure driven flow. You will need to add a body force. Fortunately there is some help on the forum (http://www.cfd-online.com/Forums/ope...implefoam.html on post 9) but it was found that you have to use Upwind and lower your relaxation factors in order to maintain stability. As an alternative, you can use the mapped boundary condition (example in tutorials/pisoFoam/les/pitzDailyMapped). The difference in the cyclic and mapped is that the cyclic is two way coupled and will require a body force, while the mapped patch is one-way coupled and can be used to set an average velocity/flowrate. Hope this helps.

JackW August 15, 2012 21:03

Hi Dan,

Thanks - although this wasn't the problem. It was more a logistical problem with unordered faces (I am new to OF). The channel example uses a PG to drive the flow, in my above example the cyclic directions are not in the direction of the flow, so the flow is still driven by the the inflow. And the cyclics work fine now :)

Ps. Anyone coming to this thread for problems on cyclics, I found my solution by:
Creating a createPatchDict file in the system folder, via this syntax:

https://unihub.ru/tools/ofservice/br...atchDict?rev=2

run createPatch

Update files in 0/ to use the newly created patches.

Hope this helps anyone struggling to use imported and/or unstructured meshes with cyclic bcs.

chegdan August 16, 2012 09:51

Excellent that you figured it out and it was simple...and better that you came back and answered your post!

Thoma August 20, 2012 02:31

Quote:

Originally Posted by JackW (Post 377286)

Ps. Anyone coming to this thread for problems on cyclics, I found my solution by:
Creating a createPatchDict file in the system folder, via this syntax:

https://unihub.ru/tools/ofservice/br...atchDict?rev=2

run createPatch

Update files in 0/ to use the newly created patches.

Hope this helps anyone struggling to use imported and/or unstructured meshes with cyclic bcs.


Can you please post here the syntax for your createPatchDict? I am not able to open the link.

Thank you!

Thoma August 20, 2012 20:12

Here it is:

| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object createPatchDict;
}


// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


// Tolerance used in matching faces. Absolute tolerance is span of
// face times this factor. To load incorrectly matches meshes set this
// to a higher value.
matchTolerance 1E-3;


// Do a synchronisation of coupled points after creation of any patches.
// Note: this does not work with points that are on multiple coupled patches
// with transformations.
pointSync true;


// Patches to create.
patchInfo
(
{
name topAndBottom;
dictionary
{
type patch;
}
constructFrom patches;
patches ( auto0 auto2 );
}


{
name inlet;
dictionary
{
type patch;
}
constructFrom patches;
patches ( auto1 );
}


{
name outlet;
dictionary
{
type patch;
}
constructFrom patches;
patches ( auto3 );
}


{
name wing;
dictionary
{
type wall;
}
constructFrom patches;
patches ( auto4 );
}


{
name back;
dictionary
{
type empty;
}
constructFrom patches;
patches ( auto5 );
}


{
name front;
dictionary
{
type empty;
}
constructFrom patches;
patches ( auto6 );
}
);

Sunxing May 9, 2013 22:49

Quote:

Originally Posted by JackW (Post 377225)
Hi,

I am having some trouble with an imported gmsh file for a simpleFoam run on a T106A aerofoil.

I have included the velocity profile photo.

The idea is that the geometry represents a turbine cascade, so the top and bottom both have cyclic boundaries imposed. I started by copying the aerofoil2d example then using my geometry by performing gmshToFoam and altering the files in 0 and the constant/polymesh/boundary.

I use OF 2.1.1, and I changed the type of boundary to cyclic and used the matchNeighbour to associate the two together. I then in 0 set type to cyclic (without specifying any value) for U, p, nut, nuTilda.

After calling simpleFoam I got the error saying the boundaries don't match by nearly 2% (although I know that not to be the case), so I increased matchTolerance appropriately.

The sim runs and produces the attached profile. The flow angle is 45degs above horizontal. I expected the higher speed to continue onto the underside - however there is clearly not a match between the upper and lower surfaces.
________

It looks also as if little pockets of lower speed occur at the boundaries. and get pushed through the flow. I was wondering if most of my problems occur because when I create the mesh in gmsh, gmsh doesn't realise that I intend to use cyclic boundaries and so the points don't match up? Or if I haven't set the case up properly I have used a constant resolution throughout the space to try and minimise this.

Any help would be greatly appreciated, thank you very much!

Jack

Hi Thomas,

May I know your inlet and outlet boundary conditions of your case? I'm also simulating a turbine cascade with the following BCs:
inlet: fixed total pressure and total temperature
outlet:fixed static pressure
I'm not sure that I have set the P file correctly. So I want to know your bcs and how you set them.

regards
Sunxing


All times are GMT -4. The time now is 07:59.