Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Meshing is the process of dividing up the domain of interest into smaller elements (or cells) so that numerical methods can be used to solve the partial differential equations required to model fluids. Creating a high quality mesh is crucial for obtaining accurate results, plus it often helps the simulation converge faster. This guide will focus more on how to setup a mesh in SimScale but I’ll start with a brief discussion on mesh design to provide context for the various settings.

Mesh Design

...

Mesh design is mostly about finding just enough mesh elements to accurately represent the geometry of interest. Minimizing the number of mesh elements reduces the time and computing power required for the simulation, but not having enough increases the error of the results. A quick metric to use is the total number of elements. This number gives a rough idea of the mesh resolution and can help predict how long a simulation will take, or if SimScale can even complete the simulation. What I mean by this is that after about 12-14M elements, SimScale will run out of memory when using 16 cores. For reference, we mostly used 10-12M elements during the development of MSXIV.

...

Then refinements are used to create appropriately sized elements between the car’s surface and the domain walls. Essentially, the area around the car should have the finest elements, then the edges of the domain should have the coarsest elements, and there should be a gradient of element sizes between them. There should also be moderately fine elements in the wake of the vehicle.

Mesh Settings

...

General Mesh Settings + Geometry Primitives

I think that gives enough context to start, so I’ll talk about how to actually set this up in SimScale now. To start editing the mesh settings, click Mesh in the left navigation panel.

General Mesh Settings + Geometry Primitives

That should bring up global mesh settings, meaning that these settings apply everywhere in the domain (Other settings may only apply to specific regions). Change the algorithm from Standard to Hex-dominant parametric. This gives more control over the mesh and primarily uses hex-based elements rather than tet-based elements. Now expand the Geometry primitives section in the navigation panel and select the Background Mesh Box. A panel should open with the minimum x, y, and z coordinates, along with the maximum x, y, and z coordinates. I used minimum values of 0, 0, and -35, and maximum values of 5, 5, and 15. Next, select the Material Point section. This point determines which volume is divided into elements, so make sure the point is located within the background mesh box, but outside of the car geometry. While we’re here, add 2 Cartesian box geometry primitives. Select a region trailing from the car with one box inside the other one. For example use 0, 0, -20 to 2, 2, -4 for one, and 0, 0, -16 to 1.5, 1.5, -4 for the other. This is to enclose the wake behind the car, with 2 different mesh densities. Return to the general mesh settings. Beneath the algorithm setting, there should be a section for Bounding box resolution. I’ve been using values of 20, 20, and 200.

...

Expand
titleBad Mesh Results
Warning

Figure 2.4: Incomplete boundary layer formation around the pontoon, notice the discontinuous boundary layers and wavy distortions that are created outside of the prism elements.

...