Skip to content

Tutorial 1

Eric Kerfoot edited this page Feb 8, 2017 · 8 revisions

This tutorial covers loading a CHeart mesh and visualizing it. CHeart is the internal physics package used at KCL, its data format is a very simple series of matrix files. This is the simplest way of getting mesh data into Eidolon although other formats are supported.

  1. In the Eidolon directory there will be libraries and Python source you need as well as the shell script run.sh. Use this shell script to start it up, which should look like the following:

  1. The first step in creating visuals is to load the data. In this case we shall load a Nodal Lagrange hex mesh stored in CHeart format. The CHeart plugin for Eidolon provides a GUI window for selecting node and element files, and selecting the format the elements have. Select from the menu "Import" -> "Cheart Object" which will bring up the following:

  1. Click the first "Choose" button and select the node file linmesh_FE.X from the MeshData directory in the tutorial directory. This should also automatically select linmesh_FE.T which is the topology file. The node and topology files don't have to have similar names like this, Eidolon makes it easier by looking for similarly named T files when an X file is chosen. Select Hexahedron as the geometry type, Nodal Lagrange as the the topology type, 1 as the order, and click "OK". The plugin will also attempt to choose these values by guessing the topology type in the T file, but always double check these are correct.

  2. An object should now be present in the "Objects" list of the "Scene" tab. This list stores all loaded scene objects and all representation objects associated with them. The window below this will always contain the properties dialog for the selected object. Click on the item in the list to bring up its properties box.

  3. Select "Volumes" from the "Types" dropdown list and click "Create". This will create a scene object representation composed of triangles which represents the volume of the figure (the solid mesh essentially). Other types includes lines for representing outlines of elements, points for representing control nodes and interpolated points, and others. Right-clicking on the scene object will bring up a menu to create representations as well, however only the basic ones are present here and they offer no ability to adjust parameters.

  4. After a few moments a mesh should pop up in the view window like this:

  1. Click "See All" to optimize the camera position. The camera is moved around with the mouse: left click drag to rotate, right click drag to translate relative to the camera, mouse wheel or middle click drag to zoom.

  2. We will now load a data field, which is a per-node list of values. The data is stored in CHeart format again, which allows any number of real values to be associated with any particular node. Select the data object in the "Objects" box and then from the menu "Import" -> "Cheart Field". This will bring up:

  1. Click "Add Field Files..." and select the file linmesh_dist.D from the MeshData directory. This is a bogus field that was calculated as the distance from an arbitrary point, it will use the spatial topology so you don't need to say anything about the .T file or choose the topology type. If you wanted to load a data field that had its own topology then you would specify a .T file and state its format. By leaving this blank the loaded spatial topology you've already visualized will be used for the field. Set the dimension value to 1 to indicate that the .D file stores 1 value per node, and click OK.

  2. Click on the representation object in the "Objects" box (which should be called "Mesh Volumes") to bring up its properties box. In the "Material" section select "Rainbow" in the "Name" dropdown menu and "linmesh_dist" in the "Data Field" dropdown menu, and click "Apply". This selects a pre-loaded material called "Rainbow" and requests that it be used to determine the colour for the mesh based on the given field. This material has spectrum colour values, so these will be used with the values stored in the field to determine what interpolated colour to apply to each node. If the spectrum values or field were not present then the materials diffuse colour would be used instead as a uniform colouration. You can see the properties and options that materials have by clicking on the "Materials" tab and clicking on any of the pre-loaded ones present.

  3. In a few moments you should see a rainbow-colored heart mesh on screen.

  1. From the menu select File -> Take Screenshot. This will bring up the "Save File" dialog, choose a file name and click Save to produce a screenshot of the current screen.

On the Command Line

Doing all of that up to step 6 can actually be accomplished on the command line as well:

./run.sh --cheartload=tutorial/linmesh_FE.X,tutorial/linmesh_FE.T,Hex1NL --cheartrepr=volume

The commands are explained in Usage.

Clone this wiki locally