skip to Main Content

2D meshing with sources in Pointwise

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.

2D meshing

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).

The solver attributes for OpenFOAM include cell and face export format and point precision.
Figure 1 – The solver attributes for OpenFOAM include cell and face export format and point precision.

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.

2D Ahmed body in wind tunnel. Top image shows entire mesh and bottom shows zoomed section around body.
Figure 2 – 2D Ahmed body in wind tunnel. Top image shows entire mesh and bottom shows zoomed section around body.
2D mesh using a boundary decay factor of 0.5.
Figure 3 – 2D mesh using a boundary decay factor of 0.5.
2D mesh using a boundary decay factor of 0.5.
Figure 4 – 2D mesh using a boundary decay factor of 0.95.

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.

Highlighted wake region were better control of mesh size is desired.
Figure 5 – Highlighted wake region were better control of mesh size is desired.

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.

Block created from initial 2D mesh.
Figure 6 – Block created from initial 2D mesh.

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.

Positioning of source region surrounding body.
Figure 7 – Positioning of source region surrounding body.

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.

Selection of boundary adaption.
Figure 8: Selection of boundary adaption.
Initialise boundary only option.
Figure 9 – Initialise boundary only option.
2D mesh with influence from source region.
Figure 10 – 2D mesh with influence from 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.

CFD results

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.

Pressure distribution around 2D Ahmed body at 35 m/s.
Figure 11 – Pressure distribution around 2D Ahmed body at 35 m/s.
Velocity vectors around 2D Ahmed body at 35 m/s inlet velocity.
Figure 12 – Velocity vectors around 2D Ahmed body at 35 m/s inlet velocity.
Figure 13 – Animated streamlines over the Ahmed body.

The next edition will be in October 2019. Happy Meshing!

To find out more about Pointwise go here, or for a free trial of Pointwise, go here.

Post Series: Automotive
Back To Top
×Close search
Search