Example 8112: Deformation of the full rectangular-cartesian canine heart model

Deformation of the full rectangular-cartesian heart model


The comfile run by this example is as follows:


set num_threads 12;


$OUTPUT_DIR = "output/";
if( ! -d ${OUTPUT_DIR})
{
		mkdir ${OUTPUT_DIR};
}
#
$TRUE = 1;
$FALSE = 0;
#
# Solve for or read in deformations
#
$MAX_PRESS = 10;
$SOLVE_INFLATION = $TRUE;
$WALL = 1;





fem;
fem define para;r;heart;
fem define coord;r;rc3d            
fem define base;r;heart                               # Geometry and fibres
fem define;add bases;r;3Linear-2PressAuxXi3_3x3x3Gauss $WALL;   #9 Pressure
fem define node;r;refined
fem define element;r;refined
fem define fibre;r;refined
fem define element;r;refined fibre 


fem export nodes;heart as heart    #export nodes to cmgui
fem export elements;heart as heart #export elements to cmgui

fem group nodes 4,17,59,2 as some_base

fem group elements 3..8,13..18,21..30,63..68 as lv_epi
fem group elements 33..38,43..48,51..60,73..78 as lv_endo
fem group elements 31..32,39..42,49..50,71,72,79,80 as sept
fem group elements 1..2,9..12,19..20 as rv_free

fem group elements 63..68,71..80 as base
fem group elements 61,62,69,70 as base_rv
fem group elements 1..60 as ventricle 


fem define equation;r;finelas_tch_incomp region $WALL lock;

fem define material;r;heart gauss region $WALL;
fem define active;r;active0_00 region $WALL;
fem define initial;r;heart region $WALL;
fem define solve;r;newton region $WALL;




		print "\033[0;30;43m    Increase cavity pressures incrementally to simulate diastole    \033[0m\n"; 
    #
		set out;steps_inflate on;
		$NAME1 = "heart_def_00";
		$NAME2 = "_active_0000";
		$ITERS = 50;
		$TOL = 0.001;
		
		for $PRESS ( 0..10 ) 
		{
				if ($PRESS < 1) 
				{
						$FILENAME = ${NAME1}."0".${PRESS}.${NAME2}; 
            $INCREM = 0.0;
        } elsif ($PRESS < 10) {
		        $FILENAME = ${NAME1}."0".${PRESS}.${NAME2};
            $INCREM = 0.1;
        } else {
            $FILENAME = ${NAME1}.${PRESS}.${NAME2};
            $INCREM = 0.1;
        }

        fem solve increment $INCREM iter $ITERS error $TOL;
        fem define initial;w;${OUTPUT_DIR}.${FILENAME};
        #
       fem update gauss stress fibre components Piola;
       fem export gauss;${OUTPUT_DIR}.${FILENAME}."_gauss_stress" yg as gauss_stress;
       fem update gauss strain fibre components ;
       fem export gauss;${OUTPUT_DIR}.${FILENAME}."_gauss_strain" yg as gauss_strain;
        #
        fem export nodes;${OUTPUT_DIR}.${FILENAME}  as heart;
        fem export nodes;${OUTPUT_DIR}${FILENAME}_def field as heart;
        fem export elements;${OUTPUT_DIR}.${FILENAME} as heart;
        fem export elements;${OUTPUT_DIR}${FILENAME}_def field as wall;
    }


fem quit

Files used by this example are:

Name                                    Modified     Size

example_8112.com 05-Feb-2001 2.5k 3Linear-2PressAuxXi3_3x3x3Gauss.ipbase 05-Feb-2001 1.9k active0_00.ipacti 03-Mar-2004 777 finelas_tch_incomp.ipequa 02-May-2004 2.1k heart.exelem 05-Feb-2001 664k heart.exnode 05-Feb-2001 149k heart.ipbase 05-Feb-2001 11k heart.ipelem 05-Feb-2001 64k heart.ipelfb 05-Feb-2001 27k heart.ipfibr 05-Feb-2001 51k heart.ipinit 05-Feb-2001 7.2k heart.ipmate 24-May-2001 7.5k heart.ippara 12-Nov-2002 5.8k newton.ipsolv 16-Aug-2010 2.7k newton.ipsolv.old 13-Apr-2007 2.5k output/ 27-Feb-2004 - rc3d.ipcoor 05-Feb-2001 728 refined.ipelem 05-Feb-2001 85k refined.ipelfb 05-Feb-2001 43k refined.ipfibr 05-Feb-2001 75k refined.ipnode 05-Feb-2001 344k

Download the entire example:

Name                           Modified     Size

examples_8_81_811_8112.tar.gz 17-Aug-2010 4.4M

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

Input last modified: Mon Aug 16 11:22:37 2010


CMISS Help / Examples / 8 / 81 / 811 / 8112