A cyclicAMI pair joins two patches whose faces do not match: the sliding interface around a rotor, or two periodic sides meshed separately. The solver interpolates between them with area weights, and it tells you how good the match is in one line of the log. Most cyclicAMI problems can be read in that line before the run fails. This page covers how to declare the pair, how to read the weights, and what lowWeightCorrection does and does not fix.
Read from cyclicAMIPolyPatch.C, AMIInterpolation.C and cyclicAMIFvPatchField.C in OpenFOAM v2506 (ESI, openfoam.com), and from the same classes in OpenFOAM 9 (Foundation, openfoam.org). The presence of cyclicAMI was checked in Foundation versions 8 to 13. No case was run for this page.
The two patches are declared in constant/polyMesh/boundary, each naming the other:
AMI1
{
type cyclicAMI;
neighbourPatch AMI2;
transform noOrdering;
// nFaces and startFace as written by the mesher
}
AMI2
{
type cyclicAMI;
neighbourPatch AMI1;
transform noOrdering;
}
In every field file of the 0 directory, both patches get type cyclicAMI; and nothing else.
The transform entry says how one patch maps onto the other. In the ESI version:
| transform | Use | Extra entries |
|---|---|---|
noOrdering | The two patches sit on the same surface, such as a sliding interface | None |
rotational | Periodic sector of a rotating machine | rotationAxis, rotationCentre, optional rotationAngle in degrees |
translational | Periodic sides separated by a shift | separationVector |
Both patches of a pair must use the same transform type. If they do not, the ESI version stops and names the two patches and their types.
For each face of a patch, the solver adds up the areas of overlap with the faces of the neighbour patch and divides by the area of the face. That ratio is the sum of weights. A value of 1 means the face is fully covered by the other side.
The log prints the minimum, maximum and average over each patch. The format depends on the fork:
// ESI v2506
AMI: Patch AMI1 sum(weights) min:0.998 max:1.001 average:1
// Foundation 9
AMI: Patch AMI1 sum(weights) min/max/average = 0.998, 1.001, 1
The numbers in this example are illustrative. With a moving mesh the report comes back every time the interface is recomputed, so you can follow the weights during the rotation.
In the ESI version a second line appears only when lowWeightCorrection is set (section 4). It counts the faces whose sum of weights is under that threshold:
AMI: Patch AMI1 identified 12 faces with weights less than 0.2
The first thing to check is always the geometry of the two patches, before any numerical setting.
Stuck on this in your own case?
CFDpilot is an AI agent for OpenFOAM that runs in your terminal. It reads the case files and the solver log on your machine, and shows every change as a diff before it edits a file.
Diagnose my case →Start free · 200 credits · nothing charged
AMI1
{
type cyclicAMI;
neighbourPatch AMI2;
transform noOrdering;
lowWeightCorrection 0.2;
}
The option is off by default: both forks read it with a default of -1. With a positive value, a face whose sum of weights is below the threshold stops using the value interpolated from the neighbour patch. It uses the value of its own cell instead, which amounts to a zero gradient condition on that face. The value 0.2 above is only an example of a threshold.
What it is good for: an interface where a handful of faces lose their overlap at some angles, on an otherwise matching pair. What it is not: a repair for two patches that do not match. Every face switched to zero gradient is a face where nothing crosses the interface, so a large number of them changes the flow.
Set the same value on both patches of the pair.
No "neighbourPatch" or "coupleGroup" provided. The patch entry has neither. Add neighbourPatch with the name of the other patch.Neighbour patch name ... cannot be the same as this patch The patch names itself as neighbour.Patch areas are not consistent within ... % indicating a possible error in the specified angle of rotation A warning for rotational pairs. Once one patch is rotated by the given angle, its area does not cancel the area of the other within the match tolerance. Check rotationAngle, rotationAxis and rotationCentre.Illegal rotationAxis ... Please supply a non-zero vector. The axis is (0 0 0).These four texts are from the ESI v2506 source.
In the Foundation version, cyclicAMI exists in OpenFOAM 8, 9 and 10 and is gone from OpenFOAM 11. Its replacement is the non-conformal couple: a nonConformalCyclic patch pair, created with the createNonConformalCouples utility. The utility and the patch type are already present in OpenFOAM 10.
A case with cyclicAMI patches written for the ESI version, or for Foundation 10 and earlier, does not run as it is on Foundation 11 or later. The interface has to be rebuilt as a non-conformal couple.
grep "sum(weights)" log.solver. Read the minimum of each patch.CFDpilot is an AI agent for OpenFOAM that runs in your terminal. It reads the case files and the solver log on your machine, and shows every change as a diff before it edits a file.
Diagnose my case →Start free · 200 credits · nothing charged
For each face of a cyclicAMI patch, the solver sums the areas of overlap with the faces of the neighbour patch and divides by the area of the face. A sum of 1 means the face is fully covered by the other patch. The log prints the minimum, maximum and average of that sum over the patch.
Close to 1 for the minimum, the maximum and the average. Small deviations come from the two sides approximating a curved surface with different faces. A minimum far below 1 means some faces are only partly covered, or not covered at all, by the neighbour patch.
It is off by default, with a value of -1. When set to a positive number, every face whose sum of weights is below that number stops using the interpolated value from the neighbour patch and uses the value of its own cell instead, which is a zero gradient condition. It keeps a run alive when a few faces lose their overlap. It does not repair two patches that do not match.
Not in the Foundation version. cyclicAMI is in OpenFOAM 8, 9 and 10 and is gone from OpenFOAM 11. Its replacement is the non-conformal couple, a nonConformalCyclic patch pair created with the createNonConformalCouples utility. The ESI version still uses cyclicAMI.
The ESI version prints it for a rotational cyclicAMI pair when, after applying the rotation, the areas of the two patches do not match within the match tolerance. The message says it indicates a possible error in the specified angle of rotation. Check rotationAngle, rotationAxis and rotationCentre against the geometry.