Personal tools
You are here: Home / cm / Wiki / Tutorial 1
Navigation
Log in


Forgot your password?
 

Tutorial 1

<br> <h1>The basic functionality of CMISS</h1> <p><b>CMISS</b> is a set of numerical modelling tools for use in <b>C</b>ontinuum <b>M</b>echanics, <b>I</b>mage analysis, <b>S</b>ignal processing and <b>S</b>ystem identification based on finite element, boundary element and finite difference techniques. It has been developed primarily for biomechanics research, but is a general purpose modelling tool for solving partial differential equations over complex domains. The equations can be non-linear, time-dependent and defined in one, two or three spatial dimensions in a number of alternative coordinate systems. CMISS is made up of two main parts: a computational back-end kernel called <b>cm</b>, and a front-end graphical user interface called <b>cmgui</b>.</p>

<p>These tutorials focus on the computational back-end cm to solve various problems in continuum mechanics. Explanation of the methods and theoretical considerations can be found in the <a href="/documentation/course_notes/fembem_notes/" target="new">FEM/BEM Notes</a>.</p>

<h2>CMISS examples</h2>

<p>A repository of <a href="http://cmiss.bioeng.auckland.ac.nz/development/examples/">Examples of CMISS problems</a> demonstrates various capabilities of the package. These are recommended to get a first taste of the notation and syntax within CMISS. These tutorials will walk you through some simple examples of Finite and Boundary Element problems. You may need this web page open along with a unix command shell so that you can refer it for some explanation of the commands and required inputs.</p>

<p>Before running an example, it is recommended that you create your own directory (folder) in which each example will be run. Name it without using any white-space characters. For example, when running the <a href="http://cmiss.bioeng.auckland.ac.nz/development/examples/1/11/111/index.html" target="new">example 111</a>, you could create a directory (folder) called 'Example_111' by using the following command in your unix shell:<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; mkdir Example_111 &lt;enter&gt;</p>

<p>Then move into this directory using the change directory command<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cd Example_111 &lt;enter&gt;</p>

<p>Now, you can <b>run</b> example 111 by using the command<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cm -example 111 &lt;enter&gt;</p>

<p>This unix command will execute all of the CMISS command for this example in one-go, i.e. after executing the first CMISS command, the subsequent CMISS commands will be automatically exectuted until everything is done (or until execution terminated by the user via 'Ctrl+c'). If you make a mistake while entering an input value, the safest thing to do is to quit 'cm', and re-run the example. Hence, while running the examples, please pay extra attention when reading the explanation comments regarding the commands and inputs that are given in the examples web pages.</p>

<p>To quit cm, use the command<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; quit &lt;enter&gt;<br> at any time (you may also use the abbreviation 'q' instead).</p>

<p>Run through this example taking careful note of each command. (We recommend that you first read through the tutorials in parallel with these notes). Note that the '!' and '#' symbols in the command file denote comments.</p>

<h2>Command syntax</h2>

<p>Here we give a very brief illustration of the syntax structure you will encounter with CMISS. This is by no means a complete description - there is a more detailed listing and explanation of <a href="http://cmiss.bioeng.auckland.ac.nz/development/help/cm/commands/index.html">all <b>cm</b>-commands</a>. One way to become familiar with this syntax is to simply experiment with it, AND make mistakes. <i>Failure is the Mother of success!</i></p>

<h3>FEM</h3> <p>There are several environments within CMISS. <b>FEM</b> sets the environment appropriately that you can start defining a finite or boundary element model.</p>

<h3>FEM define</h3> <p>Plenty of objects exist within the FEM environment, e.g. nodes, basis functions, elements, etc. and can be 'define'd, 'list'ed, 'open'ed, etc.</p>

<p>e.g. <b>FEM define nodes</b> is used to define nodal parameters such as geometric coordinates and derivatives.</p>

<h3>FEM define nodes;l/p/r/w</h3> <p>'<b>r</b>' stands for reading in nodal parameters from a file.<br> '<b>w</b>' for writing nodal parameters into a file.<br> '<b>p</b>' for entering new nodal parameters using the <i>command line prompt</i>.<br> '<b>l</b>' for reading in nodal parameters whilst simultaneously listing them to the screen.</p>

<h3>FEM define nodes;l/p/r/w&lt;;FILENAMEcurrent&gt;</h3> <p>Anything between the angle brackets - <b>&lt;;anything&gt; </b> - is optional and <b>&lt;;FILENAMEcurrent&gt;c</b> means that e.g. by using the command <b>FEM define nodes;w</b> the nodal parameters are written into a file named <b>FILENAME</b> in the <b>current</b> directory. Be sure to use semicolons '<b>;</b>' to separate the various command qualifiers. The file may be written into a different directory with a different file name by using the command:</p>

<h3>FEM define nodes;w&lt;;DifferentFILENAMEDifferentDirectoryPath</h3>

<p>After having executed all commands from the command file you should find that a number of files with the names 'fem_mesh.ip****' are now in your directory. These files contain the information regarding node locations, choice of basis functions and element definitions. For further detail, there is a list of all CMISS File Extensions. In the following, we give an explanation of the file extensions used for example 111.</p>

<table border="1">
<thead>
<tr>
<td><b>Input files</b></td> <td><b>Output files</b></td> <td><b>Significance</b></td>

</tr>

</thead> <tbody>

<tr>
<td>filename.ipnode</td> <td>filename.opnode</td> <td>Nodal values, x,y,z-values, derivative information</td>

</tr> <tr>

<td>filename.ipbase</td> <td>filename.opbase</td> <td>Basis parameters, Lagrangian, Hermite, degrees of freedom in different directions,

etc</td>

</tr> <tr>

<td>filename.ipelem</td> <td>filename.opelem</td> <td>Element parameters, Connectivity matrix, etc</td>

</tr>

</tbody>

</table> <br>

<h2>Customising the examples to create your own models</h2>

<p>Another way of running the examples that is also recommended is to download all relevant files listed at the bottom each example web page into your folder. Then, run the example from this folder by using command</p>

<p>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cm filename.com &lt;enter&gt;</p>

<p>The above 'filename.com' refers to the name of the <b>cm command-file</b> (you do not have to specify the extension '.com'). You can edit the com-file by using text editors such as <b>gedit</b> or <b>kwrite</b>. Similarly, individual parameters can be changed in the 'file.ip****' files (these are just text files). Then the results can be re-computed and re-examined by re-running the com-file. This provides a flexible and powerful way to create your own models.</p>

<p>These tutorials will lead you through some simple CMISS examples and will introduce some of the functionality of the CMISS package. We recommend to experiment with these examples by introducing slight variations to the geometry, boundary conditions, etc. Through this, several questions will arise, which will hopefully help to strengthen and deepen your understanding of the CMISS world.</p>

<h2>cm online help and support</h2>

<p>The latest information on <b>cm</b> is available on the <a href="/cm/wiki/"><b>cm</b> wiki</a>. There you'll find a whole host of information regarding using, installing and developing cm. Explanations regarding theoretical aspects of the algorithms can be found in the <a href="/documentation/course_notes/fembem_notes/" target="new">FEM/BEM Notes</a>.</p>

<p>As with all software packages there will be bugs - we would like to know about them, so you could try entering them via the <a href="https://tracker.bioeng.auckland.ac.nz/buglist.cgi?query_format=specific&bug_status=__open__&product=CMISS-cm"><b>cm</b> bug/feature tracker</a> (there is no real support for this list, so no guarantee of a response).</p>

<hr> Tutorial 2 <hr>