Mesh for OpenFOAM: specifying domain correctly
When developing your mesh for using the fluid dynamics solver OpenFOAM, make sure your domain is specified correctly in GMSH: I didn't get any errors on their side. Only when checking the mesh using OF's 'checkMesh' did I see OF thought there was only 1 cell/element.
# specify the domain of where you want the fluid dynamics predicted (required for OpenFOAM)
entitiesL = len(gmsh.model.getEntities(3))
entities = []
for i in range(1, entitiesL + 1):
entities.append(i)
gmsh.model.addPhysicalGroup(3, entities)
Edited by Nick Howlett