Example 9821: Generating supernumerary vessels for a pulmonary arterial mesh

This example demonstrates the use of an empirically based algorithm to generate pulmonary supernumerary blood vessels. "Supernumerary" vessels are extra pulmonary blood vessels (i.e. vessels which do not accompany the airways) which tend to branch off at right angles and quickly branch towards the closest respiratory unit. This example is illustrated for a portion of the arterial vessels in the left lower lobe (LLL) of the human lung. A series of data points are generated, each one represents a single acinar (gas exchange) unit. The supernumerary branches branch off the stem vessels and 'grow' towards the closest data point.

Created by Kelly Burrowes, 04/2004.

A branch of arteries (red)

Series of data points

Supernumerary vessels (gold)

Close in view of the arterial mesh

To create an image in order to visualise the results of this simulation, use draw.com.


The comfile run by this example is as follows:

# If the example path is not set, default to current directory
if (! defined $example) {
    $example = "./";
}
# Drop off the trailing / in the example path
$chopped = chop $example;
if ($chopped ne "/") {
    $example .= $chopped;
}

fem de param;r;$example/super; #define parameters
fem de coor 3,1;               #define coordinates
fem de base;r;$example/super;  #define 1D basis function

#reads in, then exports the data points for the left lower lobe (LLL)
fem de data;r;$example/lll_data;
fem export data;artery_data as artery_data;

#reads in the nodes and elements of a portion of the arterial mesh in the LLL
fem de node;r;$example/initial_arteries;
fem de elem;r;$example/initial_arteries;

#sets up field framework for radius only (not alveolar field)
fem de mesh;c lung field only_radius_field; 

#evaluates the generations and orders of the vessels
fem evaluate order;

#this inputs a constant value of 3.650 for the first mesh element
fem update mesh geometry radius_field 1 element 1 constant 3.650;

#defines the radius of each of the vessels, using a strahler diameter ratio of 1.5997
fem update mesh geometry radius_field 1 rd_strahler ratio_diameter 1.5997;

#adds the supernumerary vessels to the existing arterial mesh
#d_ratio:defines the diameter ratio of the supernumerary vessel to the stem vessel
#sv_freq=the supernumerary frequency from each stem vessel
#diam_ratio=the Strahler based diameter ratio -> used to define diameter of each vessel
#d_max_order=the diameter of the maximum order vessel (i.e. Strahler order 17)
fem de mesh;c lung add_super d_ratio 0.3 sv_freq 1.05 arteries diameter diam_ratio 1.5997 d_max_order 30;

#exports the nodes and elements on the mesh
fem export node;lll_arteries as lll_arteries;
fem export elem;lll_arteries as lll_arteries;

#exports the stem element group (containing all stem vessels before supernumerary addition)
fem export elem;stem as stem elem stem;

#an element group containing all the supernumerary elements (called supernumerary)
#gets created in the code, this is exported for viewing:
fem export elem;supernumeraries as supernumerary elem supernumerary;

Additional testing commands:

fem list nodes region all

Files used by this example are:

Name                     Modified     Size

example_9821.com 08-Jul-2004 2.1k artery_data.exdata 11-Jun-2004 463k convert.com 11-Jun-2004 128 draw.com 11-Jun-2004 1.8k initial_arteries.ipelem 11-Jun-2004 254k initial_arteries.ipnode 11-Jun-2004 174k lll_arteries.exelem 11-Jun-2004 2.7M lll_arteries.exnode 11-Jun-2004 807k lll_data.ipdata 11-Jun-2004 886k reorder.com 11-Jun-2004 1.0k stem.exelem 11-Jun-2004 1.1M super.ipbase 11-Jun-2004 893 super.ippara 23-Jun-2005 5.9k supernumeraries.exelem 11-Jun-2004 157k test.com 08-Jul-2004 2.2k test_output.com 11-Jun-2004 26

Download the entire example:

Name                           Modified     Size

examples_9_98_982_9821.tar.gz 19-Aug-2006 488k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmFailureSun Mar 6 00:13:01 20162
last breakThu Apr 7 00:33:00 20115
last successSun Aug 16 01:18:00 20095
cm-debugFailureSun Mar 6 00:18:29 20164
last breakThu Apr 7 00:21:00 20117
last successFri Aug 21 00:29:00 20096
mips-irix
cmSuccessSun Aug 19 01:53:51 200724
cm-debugSuccessWed Aug 15 01:45:09 200747
cm-debug-clear-mallocSuccessSat Aug 18 01:57:27 200755
cm-debug-clear-malloc7SuccessMon Aug 20 02:06:59 200760
cm64SuccessSun Aug 19 01:54:16 200724
cm64-debugSuccessTue Aug 21 01:49:58 200750
rs6000-aix
cmSuccessWed Mar 4 01:09:07 20092
cm-debugSuccessMon Mar 2 01:10:42 20098
cm64SuccessWed Mar 4 01:09:32 20093
cm64-debugSuccessTue Mar 3 01:14:49 20098
x86_64-linux
cmFailureSun Mar 6 00:01:26 20161
last breakSun Aug 23 00:54:00 20093
last successSun Aug 16 01:04:00 20093
cm-debugFailureSun Mar 6 00:01:44 20162
last breakThu Apr 7 00:07:00 20112
last successFri Aug 21 00:18:00 20095

Testing status by file:


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

Input last modified: Thu Jun 23 12:50:43 2005


CMISS Help / Examples / 9 / 98 / 982 / 9821