Example 21b: Fit deformed geometry data to calculate a strain field: 6 elements

The comfile run by this example is as follows:

fem                                     #change environment
fem define data;r;undeformed;example    #define data points for undeformed sample
fem list data                           #lists undeformed data
fem define window                       #define display window
fem draw data                           #draw undeformed data
fem define nodes;r;elements_6;example   
fem draw nodes
fem define base;r;elements_6;example    #reads values for basis function from file
fem de elements;r;elements_6;example    #define elements by selecting nodes from left
fem draw lines rgb=blue 
fem update scale normalise              #normalise nodal derivs & update scale factors
fem de fibre;d                          #define the fibre direction
fem de elements;r;elements_6;example fibre #define elements for fibres
fem define field;r;elements_6;example   #define 2 field variables for 6 elements
fem define element;r;example field      #define field elements
fem define xi;c contain                 #calculate xi location of initial mesh
fem draw data trace                     #draw xi locations on inital mesh 
fem list data                           #list data x,y and xi position

fem define fit;r;datafit;example geom         #linear fit with smoothing
fem define data;r;deformed;example deformed   #reads deformed data points from file

fem draw data                           #draw new data set (deformed) as + in graph
fem fit                                 #fit nodes (--> XI POINTS CLOSE TO DATA PTS)
fem list nodes                          #note field values have new nodal field values

fem define equation;r;datafit;example   #define finite elasticity problem 
fem update solution field 1,2
fem dr line deformed rgb=red
fem de no;w;deformed dep 1               #write deformed coords to deformed.ipnode

#fem list strain                         !strain calculated from xp and zp
#fem list strain;straindata data table reference !list strain calculation in 
#fem draw strain vectors data scale 0.05 !strain eigenvectors on the position of 

#fem update geometry from field          !this overwrites original mesh (strains now 0)
#fem draw data trace                     !draw xi positions on new mesh
#fem draw data projections               !data pts projected to new mesh
#fem list data;fiterrors errors full !list errors in fit into file "fiterrors"

Files used by this example are:

Name               Modified     Size

example_21b.com 20-Nov-2001 2.3k datafit.ipequa 02-May-2004 2.4k datafit.ipfit 13-Apr-2007 1.9k deformed.ipdata 10-Apr-2000 1.2k deformed.ipnode 10-Apr-2000 123 elements_6.ipbase 10-Apr-2000 2.5k elements_6.ipelem 10-Apr-2000 2.0k elements_6.ipelfb 10-Apr-2000 895 elements_6.ipelfd 10-Apr-2000 1.2k elements_6.ipfibr 30-Jan-2001 1.3k elements_6.ipfiel 10-Apr-2000 6.6k elements_6.ipnode 10-Apr-2000 7.4k fiterrors.opdata 10-Apr-2000 1.7k fitteddata.ipxi 10-Apr-2000 4.2k straindata.opstra 10-Apr-2000 45k undeformed.ipdata 10-Apr-2000 1.2k

Download the entire example:

Name                      Modified     Size

examples_2_21_21b.tar.gz 14-Apr-2007 10k

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

Input last modified: Fri Apr 13 10:30:46 2007

CMISS Help / Examples / 2 / 21 / 21b