Example 2218: Fit myocardial fibre field and write iod file


The comfile run by this example is as follows:

#Fits myocardial fibre field                                                                                                        
# Before running this .com file:                                                                                                    
# 1) You may need to alter NDMX to 10000 (fe20)                                                                                     
#    and perhaps NCMX,NEMX(60),NOMX(150),NPMX(120),NYMX (250),NZMX etc.                                                             
# 2) You must create H**_my_ref_f.ipnode file from                                                                                  
#    H**_my_ref_g.ipnode by adding two new duplicate                                                                                
#    nodes for each of the 9 RV border nodes                                                                                        
#    i.e. nodes 15,17,20,22,25,27,81,24,78                                                                                          
#    - a total of 18 new (extra) nodes starting at number 100.                                                                      
#     Extra nodes 100,101 will be identical to border node 15                                                                       
#     Extra nodes 102,103 will be identical to border node 17                                                                       
#     Extra nodes 104,105 will be identical to border node 20                                                                       
#     Extra nodes 106,107 will be identical to border node 22                                                                       
#     Extra nodes 108,109 will be identical to border node 25                                                                       
#     Extra nodes 110,111 will be identical to border node 27                                                                       
#     Extra nodes 112,113 will be identical to border node 81                                                                       
#     Extra nodes 114,115 will be identical to border node 24                                                                       
#     Extra nodes 116,117 will be identical to border node 78                                                                       
#    You must change the number of nodes to 117 (top of file)                                                                       
# 3) You must create H**_rs_, and H**_rf_, ref_3D_f.ipfibr files from                                                               
#    the corresponding H**_*_ref_f.ipfibr file by replacing each of the                                                             
#    border node numbers listed above with the corresponding extra node,                                                            
#    (even number for RF, odd for RS.) eg. in RS replace 27 with 111,                                                               
#    and changing the basis number from "2" to "3" (top of file).                                                                   
# 4) The H**_ep, and H**_lv, *_ref_3D_f.ipfibr files used below must                                                                
#    created from, and are identical to, the *_ref_f.ipfibr files                                                                   
#    except that the basis number should be changed from "2" to "3".                                                                
                                                                                                                                    
fem assign;p HEART            #type in the heart number you want to work                                                            
#                              with (02 in this case)                                                                               
fem define coordinates;r;h00;example                                                                                                    
#                             !reads the coordinate system definitions for a                                                        
#                              standard prolate spheroid                                                                            
fem define base;r;h00_my_sfread;example  #reads basis function definitions                                                              
fem define elements;r;h00_my_ref_ed;example                                                                                             
#                             !reads element definitons                                                                             

# Command updated by fixcom.sh on Wed Aug 23 17:48:09 NZT 2000
# Old command: fem define nodes;r;H//HEART//_my_ref_f;example                                                                                          
fem define nodes;r;HHEART_my_ref_f;example

#                             !reads full set of nodal parameters                                                                   
fem define lines;c            #calculate line set                                                                                   

# Command updated by fixcom.sh on Wed Aug 23 17:48:09 NZT 2000
# Old command: fem define lines;r;h00_my_ref_ed//HEART                                                                                             
fem define lines;r;h00_my_ref_edHEART

                              #read line set                                                                                        
fem define fibres;r;h00_my_ref_f;example                                                                                                
#                             !reads standard fibre definitions                                                                     

# Command updated by fixcom.sh on Wed Aug 23 17:48:09 NZT 2000
# Old command: fem define fibres;r;H//HEART//_ep_ref_3D_f;example                                                                                      
fem define fibres;r;HHEART_ep_ref_3D_f;example

#                             !reads epicardial fibre definitions                                                                   

# Command updated by fixcom.sh on Wed Aug 23 17:48:09 NZT 2000
# Old command: fem define fibres;r;H//HEART//_lv_ref_3D_f;example                                                                                      
fem define fibres;r;HHEART_lv_ref_3D_f;example

#                             !reads LV fibre definitions                                                                           

# Command updated by fixcom.sh on Wed Aug 23 17:48:09 NZT 2000
# Old command: fem define fibres;r;H//HEART//_rf_ref_3D_f;example                                                                                      
fem define fibres;r;HHEART_rf_ref_3D_f;example

#                             !reads RV free wall fibre definitions                                                                 

# Command updated by fixcom.sh on Wed Aug 23 17:48:09 NZT 2000
# Old command: fem define fibres;r;H//HEART//_rs_ref_3D_f;example                                                                                      
fem define fibres;r;HHEART_rs_ref_3D_f;example

#                             !reads RV septal fibre definitions                                                                    

# Command updated by fixcom.sh on Wed Aug 23 17:48:09 NZT 2000
# Old command: fem define data;r;H//HEART//_my_f;example fibre                                                                                         
fem define data;r;HHEART_my_f;example fibre

#                             !reads myocardial fibre data                                                                          
fem define data;c xi          #calculates data xi coordinates with respect                                                          
#                              to mesh                                                                                              
fem change data fibre -120 60 in 1..30 from 0.9 to 1.0                                                                              
fem change data fibre -90 90 in 3..8 from 0.0 to 0.9                                                                                
fem change data fibre -90 90 in 13..18 from 0.0 to 0.9                                                                              
fem change data fibre -90 90 in 21..30 from 0.0 to 0.9                                                                              
fem change data fibre -90 90 in 33..38 from 0.5 to 1.0                                                                              
fem change data fibre -60 120 in 43..48 from 0.5 to 1.0                                                                             
fem change data fibre -90 90 in 51..60 from 0.8 to 1.0                                                                              
fem change data fibre -25 155 in 33..38 from 0.0 to 0.5                                                                             
fem change data fibre 0 180 in 43..48 from 0.0 to 0.5                                                                               
fem change data fibre 0 180 in 51..60 from 0.0 to 0.8                                                                               
fem change data fibre -90 90 in 1,2,9,10,11,12,19,20 from 0.33 to 0.9                                                               
fem change data fibre -25 155 in 1,2,9,10,11,12,19,20 from 0.0 to 0.33                                                              
fem change data fibre -120 60 in 31,32,39,40,41,42,49,50 from 0.9 to 1.0                                                            
fem change data fibre -90 90 in 31,32,39,40,41,42,49,50 from 0.33 to 0.9                                                            
fem change data fibre 0 180 in 31,32,39,40,41,42,49,50 from 0.0 to 0.33                                                             
#                             !changes the fibre angle data ranges                                                                  
fem define fit;r;h00_my_ref_f;example fibre                                                                                             
#                             !specifies fit parameters                                                                             
fem fit fibre                 #fits fibre data                                                                                      

# Command updated by fixcom.sh on Wed Aug 23 17:48:09 NZT 2000
# Old command: fem define fibres;w;H//HEART//_my_ref_f                                                                                             
fem define fibres;w;HHEART_my_ref_f

#                             !writes fitted fibre parameters to new file                                                           
#                              h02_my_ref.ipfibr                                                                                    
fem cancel data                                                                                                                     

# Command updated by fixcom.sh on Wed Aug 23 17:48:09 NZT 2000
# Old command: fem write h//HEART//_ref_f;iod#writes full .iod file, geometry and fibres                                                           
fem write hHEART_ref_f;iod#writes full .iod file, geometry and fibres

fem quit                                                                                                                            

Files used by this example are:

Name              Modified     Size

example_2218.com 24-Aug-2000 11k

Download the entire example:

Name                           Modified     Size

examples_2_22_221_2218.tar.gz 19-Aug-2006 2.4k

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

Input last modified: Thu Aug 24 19:25:38 2000


CMISS Help / Examples / 2 / 22 / 221 / 2218