CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (http://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   Interpolation Error on FAM Mesh with Cyclic BCs (http://www.cfd-online.com/Forums/openfoam-bugs/91245-interpolation-error-fam-mesh-cyclic-bcs.html)

 ngj August 4, 2011 08:17

Interpolation Error on FAM Mesh with Cyclic BCs

Hi

I have tested the new cyclic boundary condition in FAM, however, I experience a problem when using it. The mesh is horizontal, 2D, and discretised equidistanly. The field, qB, I need to interpolate (actually what to evaluate the divergence, however, it does not matter), is

Code:

```dimensions      [0 2 -1 0 0 0 0]; internalField  nonuniform List<vector> 12 ( (8.79856e-06 -1.51105e-17 -1.51894e-17) (8.79855e-06 -1.5199e-17 -1.51006e-17) (8.79855e-06 -1.51123e-17 -1.51874e-17) (8.79856e-06 -1.51697e-17 -1.51302e-17) (8.79856e-06 -1.517e-17 -1.51301e-17) (8.79857e-06 -1.50686e-17 -1.52316e-17) (8.79857e-06 -1.52095e-17 -1.50908e-17) (8.79857e-06 -1.50941e-17 -1.52062e-17) (8.79856e-06 -1.50789e-17 -1.52212e-17) (8.79856e-06 -1.5249e-17 -1.5051e-17) (8.79856e-06 -1.52412e-17 -1.50587e-17) (8.79855e-06 -1.52707e-17 -1.5029e-17) ) ; boundaryField {     cyclic1     {         type            cyclic;         value          nonuniform List<vector> 2((8.79856e-06 -1.51906e-17 -1.51092e-17) (8.79856e-06 -1.51906e-17 -1.51092e-17));     }     frontAndBack     {         type            empty;     } }```
which is essentially a vector in the x-direction of almost constant magnitude.

Performing the interpolation yields

Code:

```dimensions      [0 2 -1 0 0 0 0]; internalField  nonuniform List<vector> 11 ( (8.79855e-06 -1.51547e-17 -1.51432e-17) (8.79855e-06 -1.51556e-17 -1.51422e-17) (8.79856e-06 -1.5141e-17 -1.51588e-17) (8.79856e-06 -1.51698e-17 -1.51311e-17) (8.79856e-06 -1.51193e-17 -1.518e-17) (8.79857e-06 -1.5139e-17 -1.51612e-17) (8.79857e-06 -1.51518e-17 -1.51494e-17) (8.79856e-06 -1.50865e-17 -1.52146e-17) (8.79856e-06 -1.51639e-17 -1.51379e-17) (8.79856e-06 -1.52451e-17 -1.50558e-17) (8.79856e-06 -1.52559e-17 -1.50439e-17) ) ; boundaryField {     cyclic1     {         type            cyclic;         value          nonuniform List<vector> 2((1.6495e-12 -1.51906e-17 -7.92696e-20) (-1.6495e-12 -1.51906e-17 8.02252e-20));     }     frontAndBack     {         type            empty;     } }```
which is correct for the internal field, however, the boundary values is given a value of 0. This, of course, directly affects the magnitude of the divergence in the faces neighbouring the cyclic boundary.

I have been playing a bit around with the values in the original field, and the experience is the following:
1. Carrying out qB[0] *= -1.0 before the interpolation, results in a value on the boundary, which is the correct, however, with wrong sign.
2. Carrying out qB[<last>] *= -1.0 before the interpolation, results in a value on the boundary, which is the correct with the correct sign.
3. As already seen, doing nothing, the value at the boundary is ~0.0.
This suggests to me that either:
1. part of the field is multiplied with "-1.0" before the interpolation, which hardly makes sense or
2. the interpolation weight is for some reason wrong.
All of the above is done in OpenFoam-1.6-ext.

Any help on this is highly appreciated.

Niels

 ngj August 9, 2011 06:12

Has been reported in OpenFoam-extend bug-tracker:

http://sourceforge.net/apps/mantisbt...view.php?id=87

Kind regards,

Niels

 All times are GMT -4. The time now is 20:16.