$FOAM_TUTORIALS/incompressible/simpleFoam/pipeCyclic
We calculate the case where a swirling flow enters into a cylinder. The fluid flows in from the region "inlet" and out from the region "outlet". The wall of the cylinder is assumed to be a no-slip wall. Only 1/4 of the geometry is modeled, and periodic boundary condition is used on the split planes ("side1" and "side2") to estimate the overall flow.
In file 0/U, the velocity distribution of the inflow is defined by C++ code using codedFixedValue as follows. That is to say, after calculating the outer product of twice the surface center coordinates and the vector (1, 0, 0), the X component of the calculation result is replaced by 1.0.
inlet { type codedFixedValue; name swirl; code #{ const vector axis(1, 0, 0); vectorField v(2.0*this->patch().Cf() ^ axis); v.replace(vector::X, 1.0); operator==(v); #}; value $internalField; }
The calculated velocity distribution is shown below.
The meshes are as follows, and the number of mesh is 4100.
The calculation result is as follows.
In order to check the behavior of the symmetry condition cyclicAMI, we used refineHexMesh to set the number of meshes to be different for the two paired faces.