Troubleshooting Guide

OpenFOAM fanPressureJump: Duplicate "patchType cyclic" and a Fan Baffle That Works

You put a fan in your domain as a pair of cyclic baffles, set fanPressureJump on the pressure field, and the first written time step shows patchType cyclic; twice on the fan patch. It looks like a broken dictionary, so you go hunting for a syntax error that is not there. The duplicate line is harmless. The things that do break a fan baffle are quieter: the neighbour patch left as plain cyclic, a fan curve in Pa fed to an incompressible solver, and a flow direction that does not match the owner patch.

Checked against the OpenFOAM 9 source (Foundation, openfoam.org). fanPressureJump exists from OpenFOAM 7 to 13. The duplicated entry appears in versions 7, 8 and 9 and is gone from 10 onwards. The ESI fork (openfoam.com) uses a different condition, named fan, with its own keywords. This page does not cover it.

By Rayan Bhar, CFD Engineer ยท Updated November 2026

1. The duplicated patchType line is only cosmetic

This is what the written pressure field looks like on the owner patch in OpenFOAM 9:

fan_side1
{
    type            fanPressureJump;
    patchType       cyclic;
    patchType       cyclic;
    jump            uniform 121.613;
    value           nonuniform List<scalar> ...
}

The entry is written by two different classes, one after the other:

When OpenFOAM reads the file back, the second entry replaces the first. Both say cyclic, so nothing changes. You cannot remove the line from the case side, and there is nothing to fix. In OpenFOAM 10 and later the second write was dropped, so the line shows up once.

2. Both baffle patches need fanPressureJump

This is the mistake that costs results. A common setup puts the fan condition on one patch and leaves the other one as plain cyclic in 0/p:

// wrong: the neighbour side applies no jump
fan_side1
{
    type            fanPressureJump;
    patchType       cyclic;
    fanCurve        table ((0 150) (0.03 110) (0.06 0));
    value           uniform 0;
}
fan_side2
{
    type            cyclic;
}

A cyclic pair is two patch fields, one per side, and each side builds its own view of the cell across the baffle. With a jump condition, the owner side sees the neighbour cell value minus the jump and the neighbour side sees the owner cell value plus the jump. That only happens if both fields are jump fields. The neighbour does not read the fan curve itself. It asks the owner field for the jump.

If the neighbour patch is plain cyclic, it sees the owner cell value with no jump added. One half of the coupling has the pressure rise and the other half does not. The case still runs, which is why this one is easy to miss.

The correct pair:

fan_side1
{
    type            fanPressureJump;
    patchType       cyclic;
    fanCurve        table ((0 150) (0.03 110) (0.06 0));
    value           uniform 0;
}
fan_side2
{
    type            fanPressureJump;
    patchType       cyclic;
    value           uniform 0;
}

Only the owner patch reads fanCurve. The owner is the first patch of the pair in constant/polyMesh/boundary. Putting the curve on both patches does no harm, and it is what createBaffles does when you give it one patchFields entry for the pair.

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

3. Fan curve units: Pa is wrong for pimpleFoam

The condition evaluates the curve and applies the result to the pressure field as it is. There is no density correction on the jump.

Incompressible solvers such as pimpleFoam and simpleFoam solve for kinematic pressure, p/rho, in m2/s2. A manufacturer curve is in Pa. Feed it in unchanged and the fan is stronger than the real one by a factor equal to the density. For air at 1.2 kg/m3, 150 Pa is 125 m2/s2, so every pressure value of the curve has to be divided by 1.2:

// manufacturer curve, Pa vs m3/s:      (0 150) (0.03 110) (0.06 0)
// for pimpleFoam, divided by rho = 1.2: 
fanCurve        table ((0 125) (0.03 91.7) (0.06 0));

With a compressible solver the pressure field is in Pa and the curve goes in as given.

The table clamps outside its range by default, so a flow rate above the last point returns the last value. You do not need an outOfBounds entry for that.

4. Direction: why the jump sits at the first table value

The flow rate is taken on the owner patch, with its sign. Before the curve is evaluated, a negative flow rate is clamped to zero, and a negative result is clamped to zero as well:

jump = sign * max( fanCurve( max(sign * Q, 0) ), 0 )

// sign = 1 by default, -1 with "reverse true"

So if the flow crosses the baffle against the owner patch, Q is negative, the curve is evaluated at zero flow, and the jump stays at the first value of your table for the whole run. If the written jump never moves off that value, the direction is the problem. Set reverse true; on the owner patch. It flips both the flow rate sign and the direction of the jump.

5. A clean setup with createBaffles

Create the face zone with your mesher, then let createBaffles build the cyclic pair and write the pressure condition on both patches in one go. This is the pattern of the TJunctionFan tutorial:

// system/createBafflesDict
internalFacesOnly true;

baffles
{
    fan
    {
        type        faceZone;
        zoneName    fanZone;

        patchPairs
        {
            type            cyclic;

            patchFields
            {
                p
                {
                    type            fanPressureJump;
                    patchType       cyclic;
                    fanCurve        table ((0 125) (0.03 91.7) (0.06 0));
                    jump            uniform 0;
                    value           uniform 0;
                }
            }
        }
    }
}

Fields you do not list in patchFields, such as U, k or nut, need a plain cyclic entry on both patches. Then check constant/polyMesh/boundary: both patches should be type cyclic, each with a neighbourPatch pointing at the other, and the same nFaces.

6. How to check the fan is doing what you think

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

Source and documentation

Frequently Asked Questions

Why does fanPressureJump write patchType cyclic twice?

In OpenFOAM 7, 8 and 9 the entry is written by two different classes. The base patch field writes patchType because fanPressureJump overrides the cyclic constraint type, then fixedJump writes it again. The duplicate is only in the output. When the file is read back the second entry replaces the first, so the case behaves the same. From OpenFOAM 10 the second write is gone.

Should the neighbour patch of a fan baffle be cyclic or fanPressureJump?

fanPressureJump on both patches. Only the owner patch reads the fan curve, and the neighbour patch takes the jump from it. If the neighbour is left as plain cyclic in the pressure field, that half of the coupling applies no jump at all and the pressure rise is one-sided.

What units does the fanCurve use with pimpleFoam or simpleFoam?

The x axis is the total volumetric flow rate through the patch in m3/s. The y axis is in the units of the pressure field. Incompressible solvers solve for kinematic pressure, p/rho, in m2/s2, and the condition applies the curve value as it is. A curve given in Pa has to be divided by the density first.

Why is my fan jump stuck at the first value of the table?

The flow is crossing the baffle against the owner patch. A negative flow rate is clamped to zero before the curve is evaluated, so the jump stays at the value the curve gives for zero flow. Set reverse true; on the owner patch.

Is fanCurve or jumpTable the right keyword?

fanCurve is the current keyword and takes the pressure jump as a function of total volumetric flow rate. jumpTable is kept for backward compatibility with the old fan condition and takes the jump as a function of the local normal velocity. If both are present, fanCurve is used.