## ListGetInteger error in Periodic BC

Numerical methods and mathematical models of Elmer

### ListGetInteger error in Periodic BC

Hello,

I am getting an error in the sif file which I can't figure out:
ERROR:: ListGetInteger: Given value 7 for property: [Periodic BC] larger than given maximum: 5

However my mesh.boundary contains 16 boundaries so more than 5.

Here is the periodic bc from my sif file.

Code: Select all
`Boundary Condition 5   Name = "Periodic"   Target Boundaries = 11   Periodic BC = 7   Periodic BC Rotate(3) = 0.0 0.0 \$3.141592654/6.   Periodic BC Velocity 1 = Logical True   Periodic BC Velocity 2 = Logical True   Periodic BC Velocity 3 = Logical True   Periodic BC Pressure = Logical TrueEnd`

Any help appreciated.
Thank you.

Denis Cohen
denis.cohen

Posts: 25
Joined: 15 Dec 2010, 13:50

### Re: ListGetInteger error in Periodic BC

Hi

Note that the index of "Periodic BC" refers to the i in the "Boundary Condition i" declaration. Only if your "Target Boundaries = i" for all i, are these the same. Often there are less BCs than there are Target Boundaries.

-Peter
raback

Posts: 1903
Joined: 22 Aug 2009, 11:57
Location: Espoo, Finland

### Re: ListGetInteger error in Periodic BC

Hi Peter,

I am confused because I thought there is no relation between the i of
Boundary Condition i
and the assignment of a number to the keywords Target Boundaries and Periodic BC. I am now at a loss of how to do it.
My mesh.boundary contains 16 boundaries of which there is an inlet (Boundary 11) and an outlet (Boundary 7). The problem is periodic so outlet = inlet for velocity and pressure. In my .sif file I define 4 types of BC (modified from my previous email but error persists). Here is the part of the sif file:

Code: Select all
`!---------------------------------------------------!---------------- BOUNDARY CONDITIONS --------------!---------------------------------------------------Boundary Condition 1   Name = "Bottom"   Target Boundaries(3) = 1 2 3   Velocity 1 = Real 0.0   Velocity 2 = Real 0.0   Velocity 3 = Real 0.0!  Flux Integrate = Logical TrueEnd!---------------------------------------------------Boundary Condition 2  Name = "Top"  Target Boundaries(3) = 4 5 6  Velocity 1 = Variable Coordinate     Real MATC "vtheta(0.0) * sqrt(pow(tx(0),2) + pow(tx(1),2)) * (-sin(atan(tx(1)/tx(0))))"  Velocity 2 = Variable Coordinate     Real MATC "vtheta(0.0) * sqrt(pow(tx(0),2) + pow(tx(1),2)) * (cos(atan(tx(1)/tx(0))))"  Velocity 3 = Real 0.0End!---------------------------------------------------Boundary Condition 3  Name = "Inner-Outer Walls"  Target Boundaries(6) = 8 9 10 12 13 14  Normal-Tangential Velocity = Logical True  Velocity 1 = Real 0.0End!---------------------------------------------------Boundary Condition 4   Name = "Periodic"   Target Boundaries = 11   Periodic BC = 7   Periodic BC Rotate(3) = 0.0 0.0 \$3.141592654/6.   Periodic BC Velocity 1 = Logical True   Periodic BC Velocity 2 = Logical True   Periodic BC Velocity 3 = Logical True   Periodic BC Pressure = Logical TrueEnd`

I don't know what is not working here. Thanks for your help.

Denis
denis.cohen

Posts: 25
Joined: 15 Dec 2010, 13:50

### Re: ListGetInteger error in Periodic BC

Hi

So you don't have any BC for the periodic outlet currently. You should add
Code: Select all
`Boundary Condition 5   Name = "Periodic_Counterpart"   Target Boundaries = 7End`

And then set the "Periodic BC= 5" correspondingly.

-Peter
raback

Posts: 1903
Joined: 22 Aug 2009, 11:57
Location: Espoo, Finland

### Re: ListGetInteger error in Periodic BC

Hi Peter,

OK this seems to have fixed it. I am now getting a WARNING that suggests something is still wrong.

here the part of my sif with the inlet/outlet periodic bc:

Code: Select all
`!---------------------------------------------------Boundary Condition 4   Name = "Inlet"   Target Boundaries = 5End!---------------------------------------------------Boundary Condition 5   Name = "Outlet"   Target Boundaries = 8    Periodic BC = 5   Periodic BC Rotate(3) = 0.0 0.0 -\$acos(-1.0)/6.   Periodic BC Velocity 1 = Logical True   Periodic BC Velocity 2 = Logical True   Periodic BC Velocity 3 = Logical True   Periodic BC Pressure = Logical TrueEnd`

I get this WARNING

Code: Select all
`PeriodicProjector: Starting to buildWARNING:: PeriodicProjector: Nodes belonging to both Master and Target: 1239PeriodicProjector: Suggested angle between two normals in degs:    0.000E+00PeriodicProjector: Number of periodic nodes: 1320, 1320PeriodicProjector: Rotating target with:    0.000E+00   0.000E+00  -5.236E-01PeriodicProjector: Master normal:   -4.540E-01   8.910E-01   0.000E+00PeriodicProjector: Initial Target normal:   -4.540E-01   8.910E-01   0.000E+00PeriodicProjector: Rotated Target normal:   -4.458E-01   8.951E-01   0.000E+00PeriodicProjector: Angle between Master and initial Target:  0.00000E+00PeriodicProjector: Angle between Master and rotated Target:  5.23599E-01WARNING:: PeriodicProjector: Rotation may be incorrect!PeriodicProjector: Minimum values for this periodic BC:     2.228E-01   1.135E-01   1.741E-02PeriodicProjector: Minimum values for target periodic BC:   2.228E-01   1.135E-01   1.741E-02PeriodicProjector: Minimum values for rotated target:       2.238E-01   1.115E-01   1.741E-02PeriodicProjector: Maximum values for this periodic BC:     4.010E-01   2.043E-01   2.400E-01PeriodicProjector: Maximum values for target periodic BC:   4.010E-01   2.043E-01   2.400E-01PeriodicProjector: Maximum values for rotated target:       4.028E-01   2.006E-01   2.400E-01PeriodicProjector: Bounding box for this periodic BC:     1.782E-01   9.080E-02   2.226E-01PeriodicProjector: Bounding box for target periodic BC:   1.782E-01   9.080E-02   2.226E-01PeriodicProjector: Bounding box for rotated target:       1.790E-01   8.917E-02   2.226E-01PeriodicProjector: Scaling with:    1.000E+00   1.000E+00   1.000E+00PeriodicProjector: Translation:   -1.028E-03   2.040E-03   3.469E-18BuildQuandrantTree: StartBuildQuandrantTree: ReadyWARNING:: InterpolateMeshToMesh:  Point was not found in any of the elements!           1WARNING:: InterpolateMeshToMesh:  Point was not found in any of the elements!           3WARNING:: InterpolateMeshToMesh:  Point was not found in any of the elements!           4WARNING:: InterpolateMeshToMesh:  Point was not found in any of the elements!           5WARNING:: InterpolateMeshToMesh:  Point was not found in any of the elements!           6WARNING:: InterpolateMeshToMesh:  Point was not found in any of the elements!           7WARNING:: InterpolateMeshToMesh:  Point was not found in any of the elements!           8WARNING:: InterpolateMeshToMesh:  Point was not found in any of the elements!           9WARNING:: InterpolateMeshToMesh:  Point was not found in any of the elements!          10WARNING:: InterpolateMeshToMesh:  Point was not found in any of the elements!          11WARNING:: InterpolateMeshToMesh:  Point was not found in any of the elements!          12WARNING:: InterpolateMeshToMesh:  Point was not found in any of the elements!          13WARNING:: InterpolateMeshToMesh:  Point was not found in any of the elements!          14WARNING:: InterpolateMeshToMesh:  Point was not found in any of the elements!          15WARNING:: InterpolateMeshToMesh:  Point was not found in any of the elements!          16WARNING:: InterpolateMeshToMesh:  Point was not found in any of the elements!          17WARNING:: GlobalToLocal: did not converge. rst  2.73667599485800686E-020 -1.07155289217097487E-020 -6.93889390390722838E-018  2.22044604925031308E-016 err          51  1.77432542772708389E-006  2.22044604925031308E-016  1.49011611938476563E-008 delta  3.84653583449562871E-015 -2.13348013301076425E-014   0.0000000000000000 prevdelta  1.86072364586724714E-014  1.91508223610561327E-014   0.0000000000000000`
...

The outlet position is obtained from the inlet by a rotation of +pi/6 along the z-axis. I thought that this would do it:
Periodic BC Rotate(3) = 0.0 0.0 -\$acos(-1.0)/6.
Trying with a + kept the WARNING.

Am I misunderstanding the Rotation?

Thanks

Denis
denis.cohen

Posts: 25
Joined: 15 Dec 2010, 13:50

### Re: ListGetInteger error in Periodic BC

Hi Denis

After the coordinate transformation the two BCs should be on top of each other. Now it seems close but not accurate enough. Can you increase the accuracy by some means, or do you think that they should be accurate as is?

-Peter
raback

Posts: 1903
Joined: 22 Aug 2009, 11:57
Location: Espoo, Finland

### Re: ListGetInteger error in Periodic BC

Hi Peter,
I don't know why the boundaries are not on top. I am using gmsh to make the 2d mesh, then ExtrudeMesh to create the 3d.

But anyway I think it should be accurate as is. Should I do something to suppress the warnings?

Also should the rotation in the Periodic BC be from the Target Boundary to the Periodic BC or vice versa?

Thanks for your help.

Denis
denis.cohen

Posts: 25
Joined: 15 Dec 2010, 13:50

### Re: ListGetInteger error in Periodic BC

Hi Denis

Your case seems close enough so that I suspect the angle of rotation is correct. Do you have problems with all the nodes, or just with some subset?

-Peter
raback

Posts: 1903
Joined: 22 Aug 2009, 11:57
Location: Espoo, Finland

### Re: ListGetInteger error in Periodic BC

Hi Peter,

I think it's all the nodes of the periodic The periodic bc should have 1320 nodes. I only get 1277 lines with this WARNING:

WARNING:: InterpolateMeshToMesh: Point was not found in any of the elements! 1031

The remaining nodes are likely the Dirichlet nodes.

I am also not getting a good flow solution. Could that be due to Elmer not finding the nodes? It could also be that I have some errors in my sif file.

Thanks

Denis
denis.cohen

Posts: 25
Joined: 15 Dec 2010, 13:50

### Re: ListGetInteger error in Periodic BC

Hi

If Elmer does not find the nodes then it cannot make the periodic system happen.

Perhaps you could define a small case for inspection.

-Peter
raback