Example 9823b: Navier-Stokes flow including external pressure field derived from soft-tissue mechanics solution

This example demonstrates the second stage of coupling lung mechanical deformation to pulmonary blood flow. After determining the deformed geometry of the arterial model within the lung volume we then want to calculate the distribution of flow within the arterial network. To do this we incorporate the pressure values, as calculated via the soft-tissue mechanics model ( see mechanics examples) into the flow solution as an external pressure field acting on the blood vessels. The reduced Navier-Stokes equations are solved using a Lax-Wendroff numerical technique ( see flow examples) to yield the pressure, velocity and flow solutions within the arterial model.

Created by Kelly Burrowes, 01/2007.

The above figures represent the pressure (kPa) and velocity (mm/s) distributions, repsectively, within the simple arterial geometry.

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


The comfile run by this example is as follows:

# Example 9823b

# 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 define param;r;$example/flow;                      #Define array bounds
fem define coord;r;$example/flow;                      #Define co-ordinate system for problem
fem define base;r;$example/flow;                       #Define 1D linear basis function for model

fem define node;r;$example/small_arteries;             #Read in nodes and elements representing
fem define element;r;$example/small_arteries;          #the arterial vessel geometry

fem define field;r;$example/radius;                    #Define the radius field for the blood vessels
fem define element;d;$exampe/radius field;             #Sets up element field variables

fem define;add field;d;$example/all field_variables 2; #Adds an addition 2 fields to contain the
                                                       #pressure and velocity solutions
fem define element;d;$example/all field;

fem define;add field;r;$example/external_pressure;     #Defines external pleural pressure field
fem define elem;d;$example/external_pressure field;

fem define grid;r;$example/flow coronary;
# Defines grid points with coronary option to discretise the spatial computational domain. 
fem update grid geometry;
fem define equation;r;$example/flow;                   #Defines equations                          
fem define material;r;$example/flow;                   #Reads in physical & mechanical properties
fem update material field material 4 no_field 1;
fem update material field material 13 no_field 4;      #Updates external pressure field for grid
#####  NB: CMISS code currently assumes external pressure field is material parameter #13  #####
fem define time;r;$example/step;        
fem define initial;r;$example/flow;                    #Defines initial conditions
fem define solve;r;$example/flow;                      #Defines solution parameters

$time_initial=0.00;                                    #Sets the initial time
$time_final=5;                                         #Sets the final time
$time_step=0.0008;                                     #Sets the time step time
$write_out_period=1;                                   #Sets the results write out period

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

# Results output loop

for ($time=$time_initial;$time<$time_final;$time=$time+$write_out_period)
{
fem solve restart to $write_out_period delta_t $time_step;
fem export points;$time+$write_out_period grid as vessel offset 0
}                                                                           



Additional testing commands:

fem list nodes

Files used by this example are:

Name                      Modified     Size

example_9823b.com 19-Jan-2007 2.8k 0.exnode 19-Jan-2007 10k 1.exnode 19-Jan-2007 10k 2.exnode 19-Jan-2007 10k 3.exnode 19-Jan-2007 10k 4.exnode 19-Jan-2007 10k 5.exnode 19-Jan-2007 10k draw.com 19-Jan-2007 2.0k external_pressure.ipfiel 19-Jan-2007 1.5k field.com 19-Jan-2007 614 flow.ipbase 19-Jan-2007 893 flow.ipcoor 19-Jan-2007 572 flow.ipequa 19-Jan-2007 1.3k flow.ipgrid 19-Jan-2007 216 flow.ipinit 19-Jan-2007 908 flow.ipmate 19-Jan-2007 6.7k flow.ippara 19-Jan-2007 5.9k flow.ipsolv 19-Jan-2007 759 radius.ipfiel 19-Jan-2007 2.2k small_arteries.ipelem 19-Jan-2007 2.5k small_arteries.ipnode 19-Jan-2007 2.2k step.iptime 19-Jan-2007 1.5k test.com 19-Jan-2007 2.6k test_output.com 19-Jan-2007 15 transit.out 19-Jan-2007 506 vessel.exelem 19-Jan-2007 13k

Download the entire example:

Name                                 Modified     Size

examples_9_98_982_9823_9823b.tar.gz 20-Jan-2007 93k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmSuccessSun Mar 6 00:03:24 20162
cm-debugFailureSun Mar 6 00:05:13 20161
last breakFri Jun 5 00:14:00 20150
last successThu Jun 4 00:13:00 20156
mips-irix
cmSuccessSun Aug 19 01:46:32 200714
cm-debugSuccessWed Aug 15 01:54:40 200767
cm-debug-clear-mallocSuccessSat Aug 18 02:06:59 200771
cm-debug-clear-malloc7SuccessMon Aug 20 02:00:43 200779
cm64SuccessSun Aug 19 01:46:55 200715
cm64-debugSuccessTue Aug 21 01:53:16 200768
rs6000-aix
cmSuccessWed Mar 4 01:09:08 20093
cm-debugSuccessMon Mar 2 01:12:59 200917
cm64SuccessWed Mar 4 01:09:09 20093
cm64-debugSuccessTue Mar 3 01:17:02 200916
x86_64-linux
cmSuccessSun Mar 6 00:02:05 201616
cm-debugFailureSun Mar 6 00:01:25 20160
last breakFri Jun 5 00:04:00 20150
last successThu Jun 4 00:04:00 201525

Testing status by file:


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

Input last modified: Fri Jan 19 15:15:15 2007


CMISS Help / Examples / 9 / 98 / 982 / 9823 / 9823b