In this month’s blog, we are ending 2020 on a festive note, by using Pointwise to…
CFD simulations involving three dimensional (3D) complex geometry have become the norm. This hasn’t lessened the need for two dimensional (2D) simulations. Sometimes geometry and flow are such that a 2D simulation is the most appropriate approach. An example is the twin deck bridge simulations covered in the February and June 2019 monthly meshes. On other occasions, 2D simulations are useful for allowing quicker simulations.
Pointwise supports generation of 2D meshes. For OpenFOAM these will be extruded by one cell thick upon export. Users have the option of specifying the extrude distance or having Pointwise calculate the distance as an average of the cell edge length (see Figure 1, solver attributes panel).
Consider a 2D simulation of the flow over an Ahmed body (see Figure 2). Interior cell sizes are controlled by boundary edge sizes and the boundary decay factor. The boundary decay factor controls how far into the grid’s interior the boundary cell size affects the interior cell size. Examples using decay factors of 0.5 and 0.95 are shown in Figures 3 and 4 and further details and usage of the boundary decay factor, can be found in this #tutorialTuesday video.
For 2D meshes it can be difficult to control the size and distribution of cells in regions where control over the mesh resolution is required by just the boundary decay. An example of this is shown in the highlighted wake region in Figure 5. For blocks (3D mesh volumes in Pointwise), source regions can be defined that allow influence on the mesh size. Unfortunately, sources only work with blocks and their associated entities. They cannot be used with individual surface meshes that are not part of a block. To work around this limitation, a feature that appeared in Pointwise version 18.1 allowing sources to adapt the mesh on block faces is used.
Mesh adaption with sources
A block is needed to utilise boundary mesh adaption from sources. This can be achieved by copying the existing surface mesh and creating the required connectors and domains to complete the block definition. The resulting block should look similar to Figure 6. The thickness of the block is inconsequential as no volume mesh will be created.
The next step requires the creation of the source region. In our example a box shape is used (see Figure 7). Make sure the source box extends past the domains in the normal direction to the 2D surface mesh. A video demonstrating how to create sources can be viewed here.
The block attributes are setup as normal. Make sure to select adapt on the domain of interest, see highlighted section of Figure 8. Instead of initialising the block and generating a volume mesh, only the boundary will be initialised (see Figure 9). Initialize Boundary Only option uses the current T-Rex and Size Field (source affects) attributes to initialise the block boundaries without incurring the computational time of initialising the entire block volume. Figure 10 shows the final mesh with influence from the source region.
Exporting the mesh as 2D
The last step is to export the mesh as 2D. Firstly, the CAE dimension needs to be switched back to 2D. Pointwise will notify you that it will delete one block since blocks are not 2D entities. This is okay since it isn’t needed anymore. Then allocate the edges of the mesh to boundary conditions. Lastly, choose File -> Export -> CAE to write out the polyMesh ready for OpenFOAM or Caelus.
Simulations using the mesh discussed above were run for air at 35 m/s using Caelus 9.04. Result for the pressure distribution are shown in Figure 11 whilst the velocity results are shown in Figures 12 and 13.
The next edition will be in October 2019. Happy Meshing!