Skip to content
Draft. This manual is new and still being checked against the software as it is verified. Some pages will change. If something here does not match what you see, the software is right — tell us and we will fix the page.

Reduce a 3-D case to 2-D

OpenFOAM has no 2-D solver. A 2-D case is a mesh one cell thick with the two side faces declared empty, and the solver then drops that direction from every equation.

Runs on the free tier. It is roughly a hundred times cheaper than the 3-D equivalent, which is why so much everyday CFD is 2-D.

  1. Select Mesh.
  2. Turn on Two-dimensional.
  3. Set Thin direction to x, y or z. It cannot be the flow direction — that is the direction the answer is in, and the Problems tab rejects it.
  4. A frontAndBack patch is added for you and held at Empty (2D). The note under the control confirms the block is one cell thick along the chosen axis.
  5. Press Generate mesh.

Turning Two-dimensional back off removes the patch again, so the boundary condition list never carries an entry for a patch the mesh no longer has.

If the mesh comes from elsewhere, the same thing is done under Operations:

  • Extrude a patch with Mode Linear, along the patch normal, Layers 1 and a small Thickness sweeps a surface into a one-cell slab.
  • Rename or merge patches with Type empty declares the two thin faces. As the hint puts it: empty is what makes a mesh two dimensional.

Then set the patch to Empty (2D) under Boundary conditions so the case and the mesh agree.

  • The Problems tab is clear. A case set to two-dimensional with no Empty (2D) patch is an error — the solver would otherwise treat it as 3-D and quietly solve a direction you did not want.
  • The cell count on Mesh dropped by about the factor you expected.
  • A 2-D case and an axisymmetric case are alternatives, not a combination. Declaring both is rejected; see set up an axisymmetric case.