Mesh adaptation is one of the NASA 2030 goals, and has been one of the areas of research and development by Pointwise in past case studies and webinars. Applied CCM is the distributor for Pointwise in Australia and New Zealand, and has also been developing mesh adaptation toolsets with an OpenFoam derivative Caelus. The Applied CCM mesh adaptation toolset has produced adapted meshes like the wing and store pictured. The wake past the wing, store and missile each have vorticity that refines the mesh locally via a point cloud. This would avoid having to decide where to put Pointwise source shapes, and would allow the mesh to refine based on the flow characteristics and different angle of attack.

User defined variables such as vorticity, velocity gradient – or any other result which can be post-processed can be combined into a “refinement metric” – are used to create a point cloud from Caelus (Figure 1 – red points). The point cloud carries the requested local element sizes and is used inside Pointwise with a glpyh script for refining the mesh and exporting the mesh at each cycle. The entire process including refining meshes, CFD simulations and further re-meshing cycles is scripted using Python with system commands.

Figure 1 – Wing and store case, with cuts of vertical and horizontal; cut of mesh, and streamlines and red points representing point cloud used for mesh adaptation

Examples of Mesh Adaptation

A few examples are used to demonstrate the re-meshing/solver over a number of cycles, including starting with a coarse mesh and refining the wake region of flow around bluff bodies. The same process could be applied to OpenFOAM or other CFD solvers.

Three Spheres

The three spheres is the first example shown for the mesh adaptation tool. As the solution develops through increasing mesh adaptation cycles, points distribute further downstream in the wake of each of the three spheres (Figure 2).

Figure 2 – Three spheres example – animation of mesh through 10 cycles, with streamlines and red points representing point cloud used for mesh adaptation

Figure 3 – three spheres example – overall number points in point cloud for 10 cycles

The number of points in the point cloud (Figure 3) for a given cycle settles out to a certain number of points (around 1400) after peaking i.e. it converges toward an adapted mesh. With this number and distribution of points the wake shape is not changing anymore, and mesh can be considered adapted.

Wing and Store

The wing and store tutorial from Pointwise tutorial is used as another example of the local mesh adaptation that occurs when using the Applied CCM mesh adaptation tool (Figure 4).

Figure 4 – Wing and store example – domains and point cloud points loaded in Pointwise used a source to influence the isotropic part of the mesh

Downstream of the missile and wing, vortex shedding leads to higher vorticity and subsequently the mesh adapts downstream in the wake (Figure 5).

Figure 5 – Wing and store example – examine of vertical slice of wing and store in Pointwise, showing points in point cloud used a source for the hexa elements (blue), prisms (green), pyramid (yellow) and tetrahedron (red)

Urban City Buildings

Consider a simple example of an urban city block with block type bluff bodies. The mesh adaptation tool can refine the mesh in the wakes of the buildings from two different flow directions (Figure 6). Some transient vortex shedding behavior is occurring which does make the mesh adaptation harder. Ideally the base case CFD run would be fairly steady, however the final adapted mesh could still be used for the transient study.

Figure 6 – Urban city block example – streamlines and slice of mesh. (left) Flow from left to right) ; (right) flow from top of screen

Want to know more?

For more information about the scripts and how it works, you can watch a recent webcast Applied CCM have done. If you would like to be able to script the meshing with Pointwise as shown here, then have a think about doing a free trial.

3 Responses to Mesh Adaptation With Python, Pointwise and Caelus

What did they use for post-processing, or was it just done in Python? How did they convert vorticity into a point cloud? Was it just based on an iso-surface? And then how were the cell size and decay values determined?

We used Fieldview for post processing streamlines etc, along with Pointwise for loading the pointcloud and mesh metrics. The conversion of vorticity into pointcloud is done in C++ within Caelus, with a function object, which is closed source. The cell size was halved if the cell met the metric threshold such as vorticity.
cheers
Martin