OpenFOAM uses Cartesian coordinates. All the cases in OpenFOAM are computed as a three-dimensional. Even if the case is one-dimensional or two-dimensional, it is necessary to have at least one volume cell in each direction.
In general, there are three ways how to create mesh for OpenFOAM:
Creating mesh in blockMesh – part of OpenFOAM
Creating mesh in snappyHexMesh – part of OpenFOAM
Creating mesh with other tools and importing it to OpenFOAM. OpenFOAM supports following mesh conversions: