Meshing

Contents

Meshing#

To represent a geometry in the domain, such as a body, Nassu needs to process its geometry into the solver mesh format, a process called meshing. This is done by transforming the body’s representation, given by a .lnas file, into a cloud of points in the domain.

Note

The format for Nassu geometry is a .lnas file, Lagrangian Nassu. It’s the representation of a series of triangles, similar to the .stl format, and support the specifications of surfaces for it.

You can know more about .lnas and how to generate them in stl2lnas repository.

These geometries are defined by the domain.bodies field in the configuration file

simulation:
  - name: BuildingSimulation

    domain:
      bodies:
        solid-body1:
          lnas_path: "lnas/solid-body1.lnas"
        solid-body2:
          lnas_path: "lnas/solid-body2.lnas"

The Lagrangian mesh points are taken as the vertexes of triangular meshs. The averaged area of triangles adjacent to the vertex is considered to each point. For that reason, it’s important to use a .stl of sufficiently regular elements. The figure below illustrates the difference between an inadequate and an ideal mesh for IBM.

Mesh regularity

Meshes regularity (left bad, right good)#

The mesh confection can be performed by any external tool such as FreeCAD or MeshLab that can generate a .stl mesh. After thath, the .stl can be used to generate a .lnas file through stl2lnas.

Data extraction#

It’s very common to extract data from a body, such as \(\rho\) for pressure calculation afterwards. This can be done by specifying bodies for extraction in data.series.series_name.bodies field.

It’s important to notice that the extraction is done using the resolution from the original mesh. The original vertices and triangles from the original .lnas are the ones used to extract data from the body (considering all bodies transformations and such).

Important

Make sure that your mesh has the desired spatial resolution for data extraction. If the mesh is more refined than required, or less refined, it should be updated for use.

Another capability is to extract data from a surface. It’s possible to specify a probe using a body as body_name.surface_name to consider only the triangles from a .lnas surface.