Example 21e4: Creating volume elements from fitted surfaces

Hooking together surfaces to create volume elements

Having created (hopefully) aligned surfaces you should now be able to hook them together.

The volumes

The volumes have already been created, they reside here. Note that these volumes use different surfaces than those that have been created in this documentation. The elements can be viewed in cmgui using the com file view-volume.com. You should see output like the following image:

Creating the volume elements

New basis functions

These new elements will require different basis functions for interpolation. The previous elements were 2d elements, while these are 3d. The basis functions used can be seen in volume.ipbase.

Linking surfaces together

There is no simple way to do this. In the end, I did it by hand, manually entering the node numbers where the input for elements was prompted. You can do this by typing the following into cm:

fem def elem;p;volumes
And this will give you a prompt like the following:
 Element number [    1]: 1
 The number of geometric Xj-coordinates is [3]: 3
 The basis function type for geometric variable 1 is [1]: 2
 The basis function type for geometric variable 2 is [1]: 2
 The basis function type for geometric variable 3 is [1]: 2
 Enter the 6 global numbers for basis 2: 1 8 14 51 58 64
 Enter the 6 numbers for basis 3 [prev]: 1 8 14 51 58 64
Note:How many nodes you are prompted for is dependent on the basis function entered. Basis function 1 prompts for 8 nodes (ie is a rectangular prism) while basis function 2 prompts for 6 nodes (is a sector element). These sector elements are used at the apex of the heart to close the surface.

Quality

The quality of this final mesh is rather low. Some of the surfaces intersect with each other, and also some of the elements have a certain degree of shear to them.


The comfile run by this example is as follows:

gfx cre mat copper ambient 1 0.2 0 diff 0.6 0.3 0 spec 0.7 0.7 0.5 shin 0.3
gfx cre mat gold amb 1 0.4 0 diff 1 0.7 0 spec 0.5 0.5 0.5 shininess 0.8
gfx create material silver ambient 0.4 0.4 0.4 diffuse 0.7 0.7 0.7 emission 0 0 0 specular 0.7 0.7 0.7 alpha 1 shininess 0.6
gfx create material skin ambient 1 0.2 0 diffuse 0.8 0.7 0.45 emission 0 0 0 specular 0.4 0.2 0.2 alpha 1 shininess 0.2
gfx create material black_skin ambient 0.4 0.1 0.1 diffuse 0.4 0.2 0.1 emission 0 0 0 specular 0.5 0.5 0.5 alpha 1 shininess 0.2
gfx create material red ambient 1 0 0 diffuse 1 0 0
gfx create material green ambient 0 1 0 diffuse 0 1 0
gfx read node all
gfx read elem all
# Extract the nodal derivatives as vector fields:
gfx def field dx_ds1 node_value fe_field coordinates d/ds1
gfx def field dx_ds2 node_value fe_field coordinates d/ds2
# Extract the cross derivative:
gfx def field d2x_ds1ds2 node_value fe_field coordinates d2/ds1ds2
gfx mod g_e heart general element_discretization "5*5*1"
gfx mod g_e heart node_points glyph sphere size 3 mat skin select_on
gfx mod g_e heart node_points glyph arrow_solid size "0*4*4" scale_factors "10*0*0" orientation dx_ds1 mat gold selected_mat gold draw_selected
gfx mod g_e heart node_points glyph arrow_solid size "0*4*4" scale_factors "10*0*0" orientation dx_ds2 mat silver selected_mat silver draw_selected
gfx mod g_e heart node_points glyph arrow_solid size "0*4*4" scale_factors "10*0*0" orientation d2x_ds1ds2 mat red draw_selected invisible
gfx modify g_element heart surfaces material copper invisible
gfx node_tool edit

gfx create win

Files used by this example are:

Name                   Modified     Size

example_21e4.com 09-Feb-2001 1.5k adjust-all.com 09-Feb-2001 1.5k all/ 27-Feb-2004 - all.exelem 09-Feb-2001 63k all.exnode 09-Feb-2001 25k all.ipelem 09-Feb-2001 24k all.ipnode 09-Feb-2001 68k bicubic-sector.ipbase 09-Feb-2001 3.0k epi.ipelem 09-Feb-2001 7.8k epi.ipnode 09-Feb-2001 22k lv.ipelem 09-Feb-2001 7.8k lv.ipnode 09-Feb-2001 22k rv.ipelem 09-Feb-2001 9.5k rv.ipnode 09-Feb-2001 24k volume.ipbase 09-Feb-2001 15k

Download the entire example:

Name                           Modified     Size

examples_2_21_21e_21e4.tar.gz 19-Aug-2006 130k

Html last generated: Sun Mar 6 05:50:10 2016

Input last modified: Fri Feb 9 14:03:31 2001


CMISS Help / Examples / 2 / 21 / 21e / 21e4