Example h3: Simulation of aortic pressure in a simple bifurcation network

In this example we simulate the measured aortic pressure (see example_h1) at the proximal end of the parent link of a three-link simple bifurcation network shown below. The presssure of the distal ends of both daughter links are held at constant level of 12.46 kPa (mean arterial pressure).

The governing equations that describe the physics of the system are identical to that discussed in the example_h2. The numerical method implemented to solve these model equations is Lax-Wendroff two-step fully explicit method. The geometry of the network is modelled using 1D cubic hermite finite elements. Further details of the numerical method can be obtained from Smith. N.P., Ph.D Thesis, UoA 1999.

In order to make a movie to visualise the simulation results, use view.com.

Simulation of Aortic Pressure

The comfile run by this example is as follows:

# Set fine to 1 to make the example run longer for benchmarking.
$fine = 0;

  eval { require Time::HiRes };
  if( $@ )
      print "warning: $@";
      import Time::HiRes qw(time);

sub cpu_time()
    # Add user/system parent/child cpu_times.
    my $result = 0;
    map { $result += $_ } times;

sub print_timing($$$)
    my ($message,$wall,$cpu) = @_;
    printf "%s: %.3fs wall, %.3fs cpu.\n", $message, $wall, $cpu;

sub print_memory_use()
    # Different operating systems have different data and ps uses different
    # arguments so try a series of commands in an attempt to collect the
    # information.
    system qw(ps -o vsz -p), $$;
    system qw(ps -l -p), $$;
    system qw(ps v), $$;

fem define parameter;r;bifur;example      # Declares array dimensions
fem define coordinate;r;bifur;example     # Defines the coordinate system
fem define node;r;bifur;example           # Reads in nodal information
fem define base;r;bifur;example           # Defines basis function (02 funcns : 1. 1D cubic hermite 2. 1D linear)
fem define element;r;bifur;example        # Reads in element information
fem define field;r;bifur;example          # Reads in fields. Only first field (unstressed radius at nodes) is necessary for this problem
fem define element;r;bifur;example field  # Defines interpolation of field variables (linear)
# Define grid points with coronary option to discretise the spatial computational domain.
if( $fine ) {
  fem define grid;r;bifur-fine;example coronary
} else {
  fem define grid;r;bifur;example coronary
fem update grid geometry;
fem define equation;r;bifur;example       # Defines equations                          
fem define material;r;bifur;example       # Reads in physical & mechanical properties
fem update material field material 4 no_field 1;
#                                         # Updates unstressed radius (mat 4) from field 1
fem define time;r;periodic;example        # Define boundary conditions. Aortic press. at inlet and mean aortic press.(constant) at distal ends.
fem define initial;r;bifur;example        # Defines initial conditions
fem define solve;r;bifur;example          # Defines solution parameters

$time_initial=0.00;                       # Sets the initial time
$time_final=0.87;                         # Sets the final time
#$time_step = $fine ? 0.000025 : 0.0001;
$time_step = $fine ? 0.000025 : 0.0003;

$write_out_period=0.0435;  #0.01;                 # Sets the results write out interval

fem export points;$time_initial grid as vessel offset 0;         
fem export grid;vessel as vessel offset_node 0 elastic_tube; 

# Results output loop

($wall_setup,$cpu_setup) = (time, cpu_time);
print_timing 'setup', $wall_setup - $^T, $cpu_setup;

for ($time=$time_initial;$time<$time_final;$time=$time+$write_out_period)       
#$file=sprintf "%3.2f",$time+$write_out_period;
fem solve restart to $write_out_period delta_t $time_step;
#fem export points;$file grid as vessel offset 0           
fem export points;$time grid as vessel offset 0           

($wall_solve,$cpu_solve) = (time, cpu_time);
print_timing 'solve', $wall_solve - $wall_setup, $cpu_solve - $cpu_setup;

Additional testing commands:

fem list nodes

Files used by this example are:

Name               Modified     Size

example_h3.com 17-Oct-2005 3.2k 0.0435.exnode 17-Oct-2005 10k 0.087.exnode 17-Oct-2005 10k 0.1305.exnode 17-Oct-2005 10k 0.174.exnode 17-Oct-2005 10k 0.2175.exnode 17-Oct-2005 10k 0.261.exnode 17-Oct-2005 10k 0.3045.exnode 17-Oct-2005 10k 0.348.exnode 17-Oct-2005 10k 0.3915.exnode 17-Oct-2005 10k 0.435.exnode 17-Oct-2005 10k 0.4785.exnode 17-Oct-2005 10k 0.522.exnode 17-Oct-2005 10k 0.5655.exnode 17-Oct-2005 10k 0.609.exnode 17-Oct-2005 10k 0.6525.exnode 17-Oct-2005 10k 0.696.exnode 17-Oct-2005 10k 0.7395.exnode 17-Oct-2005 10k 0.783.exnode 17-Oct-2005 10k 0.8265.exnode 17-Oct-2005 10k 0.87.exnode 17-Oct-2005 10k 0.9135.exnode 05-Oct-2001 15k 0.exnode 17-Oct-2005 10k bifur-fine.ipgrid 02-Sep-2004 224 bifur.ipbase 05-Oct-2001 2.0k bifur.ipcoor 05-Oct-2001 572 bifur.ipelem 05-Oct-2001 1.1k bifur.ipelfd 05-Oct-2001 818 bifur.ipequa 22-Nov-2005 1.3k bifur.ipfiel 05-Oct-2001 1.2k bifur.ipgrid 17-Oct-2005 223 bifur.ipinit 17-Oct-2005 676 bifur.ipmate 09-Nov-2001 6.9k bifur.ipnode 05-Oct-2001 1.8k bifur.ippara 12-Nov-2002 5.9k bifur.ipsolv 27-Aug-2002 760 periodic.iptime 05-Oct-2001 2.1k test_output.com 05-Oct-2001 15 vessel.exelem 17-Oct-2005 14k view.com 26-Aug-2004 1.9k

Download the entire example:

Name                  Modified     Size

examples_h_h3.tar.gz 19-Aug-2006 450k

Testing status by version:

StatusTestedReal time (s)
cmSuccessSun Mar 6 00:02:51 20161
cm-debugSuccessSat Mar 5 00:10:18 20163
cmSuccessSun Aug 19 01:40:40 200710
cm-debugSuccessWed Aug 15 01:40:43 200737
cm-debug-clear-mallocSuccessSat Aug 18 01:52:33 200748
cm-debug-clear-malloc7SuccessMon Aug 20 01:49:43 200749
cm64SuccessSun Aug 19 01:41:29 200710
cm64-debugSuccessTue Aug 21 01:39:36 200739
cm64-debug-clear-mallocSuccessThu Apr 1 12:35:59 2004262
cmSuccessWed Mar 4 01:08:39 20091
cm-debugSuccessMon Mar 2 01:10:08 20099
cm64SuccessWed Mar 4 01:08:31 20092
cm64-debugSuccessTue Mar 3 01:15:16 20099
cmSuccessSun Mar 6 00:01:51 201612
cm-debugSuccessSat Mar 5 00:03:51 201616

Testing status by file:

Html last generated: Sun Mar 6 05:51:37 2016

Input last modified: Tue Nov 22 11:43:35 2005

CMISS Help / Examples / h / h3