.. _aero_cgnsutils: *********************** Mesh Manipulation Tools *********************** Introduction ================================================================================ This section is not necessary to complete the tutorial but it does familiarize you with mesh manipulation tools that you may need to conduct grid refinement studies and other operations. There are several simple meshing operations that can be done easily enough from the command line. We have developed a suite of functions called `cgnsUtilities `_ that can be called from the command line to perform simple, repeatable tasks like this. Files ===== Navigate to the directory ``wing/meshing/volume`` in your tutorial folder. We will perform operations on the file ``wing_vol_L3.cgns``. cgnsUtilities Operations ======================== To get a list of all of the operations available with cgnsUtilities, run the command .. prompt:: bash cgns_utils -h For any cgns_utils operation, you can add the argument ``-h`` to get information about the required and optional parameters (e.g. ``cgns_utils coarsen -h``). Coarsening a volume mesh ------------------------ The command ``cgns_utils coarsen`` takes a volume mesh and coarsens it by removing every other node in all three dimensions. Although our volume mesh is already very coarse, we can coarsen it even further. This function is more useful in instances where we start with a very fine mesh. To coarsen the mesh run the following from the terminal: .. prompt:: bash cgns_utils coarsen wing_vol_L3.cgns wing_vol_L3_coarsened.cgns The original and the coarsened meshes are shown below. .. figure:: images/aero_wing_volume_mesh_coarsened.png :scale: 20 :align: center :alt: Wing volume mesh coarsened :figclass: align-center CGNS Viewer =========== Bundled with cgnsUtilities is a very barebones mesh viewing software that can be useful for debugging problems with the mesh such as incorrect boundary conditions or missing face-to-face connections. CGNS Viewer can be run from the terminal with the command .. prompt:: bash cgnsview