CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

simpleSRFoam, makePatch and cyclic patch

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By aloeven

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 22, 2011, 18:21
Default simpleSRFoam, makePatch and cyclic patch
  #1
Senior Member
 
Join Date: Feb 2010
Posts: 213
Rep Power: 17
vaina74 is on a distinguished road
Hi everybody.

I'm trying to set up case with simpleSRFFoam solver (OpenFOAM-1.5-dev). I based myself on the mixer tutorial in order to simulate a 4 blades marine propeller.
I created a simple geometry for a test, a one single blade into a 90° wedge, so don't care if the mesh is coarse and the domain is small. I generated a mesh with Netgen and then exported in OpenFOAM-1.5+ format. The tutorial is not clear about that - maybe becouse the side periodic patched are equivalent - but I guess I must 'map' one side on the other one. If I'm right, I can use createPatch for that, but I'm experienced some errors. Does it depend on my horrible testing mesh? Isn't my boundary file correct? I attach a pic of the mesh and report my boundary file and the createPatchDict.

boundary
Code:
7
(
    blade
    {
        type            wall;
        nFaces          208424;
        startFace       3274581;
    }
    inlet
    {
        type            patch;;
        nFaces          644;
        startFace       3483005;
    }
    outlet
    {
        type            patch;
        nFaces          646;
        startFace       3483649;
    }
    cyclic1
    {
        type            patch;
        nFaces          1493;
        startFace       3484295;
    }
    cyclic2
    {
        type            patch;
        nFaces          1390;
        startFace       3485788;
    }
    top
    {
        type            patch;
        nFaces          138;
        startFace       3487178;
    }
    hub
    {
        type            wall;
        nFaces          30015;
        startFace       3487316;
    }
)
creatPatchDict
Code:
matchTolerance 1E-3;
pointSync true;
patches
(
    {
        name side;
        type cyclic;
        constructFrom patches;
        patches (cyclic1 cyclic2);
    }
);
error
Code:
Create time

Reading createPatchDict.

Using relative tolerance 0.001 to match up faces and points

Create polyMesh for time = 0

Adding new patch side of type cyclic as patch 7

Moving faces from patch cyclic1 to patch 7
Moving faces from patch cyclic2 to patch 7

Doing topology modification to order faces.

cyclicPolyPatch::getGeometricHalves : Writing half0 faces to OBJ file "/home/maurizio/OpenFOAM/maurizio-1.5-dev/run/propeller/side_half0_faces.obj"
cyclicPolyPatch::getGeometricHalves : Writing half1 faces to OBJ file "/home/maurizio/OpenFOAM/maurizio-1.5-dev/run/propeller/side_half1_faces.obj"
cyclicPolyPatch::getGeometricHalves : Writing half0 face centres to OBJ file "/home/maurizio/OpenFOAM/maurizio-1.5-dev/run/propeller/side_half0.obj"
cyclicPolyPatch::getGeometricHalves : Writing half1 face centres to OBJ file "/home/maurizio/OpenFOAM/maurizio-1.5-dev/run/propeller/side_half1.obj"
--> FOAM Serious Error : 
    From function cyclicPolyPatch::getGeometricHalves(const primitivePatch&, labelList&, labelList&) const
    in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 508
    Patch side gets decomposed in two zones ofinequal size: 1493 and 1390
This means that the patch is either not two separate regions or one region where the angle between the different regions is not sufficiently sharp.
Please adapt the featureCos setting.
Continuing with incorrect face ordering from now on!


face 1440 area does not match neighbour 2881 by 80.3222% -- possible face ordering problem.
patch:side my area:3.6008e-05 neighbour area:1.53729e-05 matching tolerance:0.001
Mesh face:3515888 vertices:3((0.1902 -0.170322 0.170322) (0.181659 -0.168743 0.168743) (0.18614 -0.163609 0.163609))
Neighbour face:3517329 vertices:3((0.071 0.155563 0.155563) (0.066 0.155563 0.155563) (0.0687394 0.159912 0.159912))
Other errors also exist, only the largest is reported. Please rerun with cyclic debug flag set for more information.

    From function cyclicPolyPatch::calcTransforms()
    in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 197.

FOAM exiting
UPDATE

After read some posts, I was in doubt about the side patches defining, so I created one single patche for both side faces. I launched simpleSRFFoam and obtain
Code:
Create time

Create mesh for time = 0



face 580 area does not match neighbour 1161 by 104.235% -- possible face ordering problem.
patch:side my area:0.000293579 neighbour area:9.24105e-05 matching tolerance:0.001
Mesh face:871780 vertices:3((-0.302074 0.177347 0.177347) (-0.309214 0.19858 0.19858) (-0.286492 0.189158 0.189158))
Neighbour face:872361 vertices:3((0.0801642 -0.174874 0.174874) (0.080741 -0.162749 0.162749) (0.091457 -0.164054 0.164054))
Other errors also exist, only the largest is reported. Please rerun with cyclic debug flag set for more information.

    From function cyclicPolyPatch::calcTransforms()
    in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 197.

FOAM exiting
It seems to me that a sort of createPatch is include in the simpleSRFFoam solver code - can anyone confirm or correct that? Anyway, I go on with the same error (how can I run a cyclic debug flag?)
Attached Images
File Type: jpg pic.jpg (66.2 KB, 25 views)

Last edited by vaina74; January 22, 2011 at 20:19.
vaina74 is offline   Reply With Quote

Old   January 24, 2011, 03:35
Default
  #2
Senior Member
 
Join Date: Feb 2010
Posts: 213
Rep Power: 17
vaina74 is on a distinguished road
I've just run a simple test with a meshed cube and I realized that createPatch works fine when the side faces have the same number of tet cells. If I generate a different amount of cells, it doesn't work anymore. Is this a constraint? I wonder how I can control and obtain the same number of side cells in more complex geometries.
Please, can anyone help me?
vaina74 is offline   Reply With Quote

Old   January 26, 2011, 10:04
Default
  #3
Member
 
Alex
Join Date: Apr 2010
Posts: 32
Rep Power: 15
aloeven is on a distinguished road
If you want to create a cyclic patch from two patches, those two patches should match (within some tolerance). So if you create the mesh with some external mesh generator, be sure that the patches are linked. The number of cells should be the same, but also the relative position.

But you are using 1.5-dev, so if you cannot create a mesh with matching patches, you can always use the cyclicGgi patch type. The cyclicGgi will also work for more complicated problems, when both patches (cyclic1 and cyclic2) are full non-matching.
aloeven is offline   Reply With Quote

Old   January 26, 2011, 11:50
Default
  #4
Senior Member
 
Join Date: Feb 2010
Posts: 213
Rep Power: 17
vaina74 is on a distinguished road
Thanks for your reply. I already used cyclicGgi with MRFSimpleFoam solver. I'll make a test.
vaina74 is offline   Reply With Quote

Old   February 28, 2011, 05:05
Default
  #5
Member
 
Claudio
Join Date: Mar 2010
Posts: 57
Rep Power: 16
claco is on a distinguished road
Quote:
Originally Posted by vaina74 View Post
Thanks for your reply. I already used cyclicGgi with MRFSimpleFoam solver. I'll make a test.
Dear Sir,

I am investigating the flow through a single channel of a radial pump. So I have to use cyclicGgi (OF 1.5-dev). I ask You: Have I to use createPatch, Am I advised to do so, or what else?
For the moment I do not perform this action, and the calculations seem to perform well, even if the results compared with some others are not so good. So I am worried about cyclicGgi.

Thank You in advance

Yours sincerely,


Claudio
claco is offline   Reply With Quote

Old   February 28, 2011, 05:22
Default
  #6
Member
 
Alex
Join Date: Apr 2010
Posts: 32
Rep Power: 15
aloeven is on a distinguished road
@Claudio

I don't see the point in using createPatch. The only thing I used for cyclicGgi was faceSet and setsToZones to create the two cyclic zones from the cyclic patches.

You can see a description of the use of cyclicGgi in this presentation (slide 23):
http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2009/OlivierPresentation/case_study_2009_OP.pdf

Best regards,
Alex.
Aabadani likes this.
aloeven is offline   Reply With Quote

Old   February 28, 2011, 08:20
Default
  #7
Member
 
Claudio
Join Date: Mar 2010
Posts: 57
Rep Power: 16
claco is on a distinguished road
Quote:
Originally Posted by aloeven View Post
@Claudio

I don't see the point in using createPatch. The only thing I used for cyclicGgi was faceSet and setsToZones to create the two cyclic zones from the cyclic patches.

You can see a description of the use of cyclicGgi in this presentation (slide 23):
http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2009/OlivierPresentation/case_study_2009_OP.pdf

Best regards,
Alex.
Dear Alex,

I have troubles when decomposing the case having cyclicGgi patches. A segmentation fault occurs?
Is the a procedure to be followed to perform this task?
I have already stored in the controlDict file the string "preservePatches ( Per1 );".

However this error occurs anyway. Moreover, why I cannot define also a preserve patch for the other cyclic patch, named Per2?


Thank You,


Claudio
claco is offline   Reply With Quote

Old   February 28, 2011, 08:26
Default
  #8
Member
 
Alex
Join Date: Apr 2010
Posts: 32
Rep Power: 15
aloeven is on a distinguished road
Quote:
Originally Posted by claco View Post
I have already stored in the controlDict file the string "preservePatches ( Per1 );".
You should put it in system/decomposeParDict

Quote:
Originally Posted by claco View Post
However this error occurs anyway. Moreover, why I cannot define also a preserve patch for the other cyclic patch, named Per2?
You can (and have to) define both patches as preserved. Just add to decomposeParDict:

preservePatches (Per1 Per2);
aloeven is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 09:37.