Cubit Mesh#
Geometry#
We can create the geometry directly from the brick primitive in Cubit.
Meshing using Journal Scripts#
We use Cubit journal files mesh_tet.jou
and mesh_hex.jou
to generate tetrahedral and hexahedral meshes, respectively.
Both of these journal files make use of the geometry.jou
, and bc.jou
files for creating the geometry and tagging boundary conditions and materials.
We use the Cubit graphical user interface to play the Journal files.
Important
We use IDless journaling in CUBIT. This allows us to reference objects in a manner that should be independent of the version of CUBIT that is being used. In the journal files, the original command used is typically commented out, and the following command is the equivalent IDless command.
Once you have run either the mesh_tet.jou
or mesh_hex.jou
journal file to construct the geometry and generate the mesh, you will have a corresponding Exodus-II file (mesh_tet.exo
or mesh_hex.exo
).
These are NetCDF files, and they can be loaded into ParaView.
This can be done by either running ParaView and loading the file, or using the script provided in the viz directory.
For example, if ParaView is in your path, you can run the following command:
paraview --script=viz/plot_mesh.py
To load the mesh with tetrahedral cells, open the Python Shell in ParaView and set the EXODUS_FILE
variable, and then run the viz/plot_mesh.py
Python script.
See ParaView Python Scripts for more information about running ParaView Python scripts.
EXODUS_FILE = "mesh_tet.exo"