Below is a demonstration of the features of the addMatAxisFibreElementData_FEB function


clear; close all; clc;




This function adds the local element matetrial axis or fiber direction information to the input XML data (domNode) based on the input febio structure (FEB_struct).


Example: Defining the local material axis for each element

n=5; %number of elements
E=round(20*rand(n,8)); %Simulates element matrix
V_fib=zeros(n,3); %Simulated fibre directions

%Adding fibre direction, construct local orthonormal basis vectors

VF_E(:,:,1)=a; %a1 ~ e1 ~ X or first direction
VF_E(:,:,2)=d; %a2 ~ e2 ~ Y or second direction
%Vf_E %a3 ~ e3 ~ Z, third direction, e.g. fibre direction

FEB_struct.Geometry.Elements={E}; %The element sets
FEB_struct.Geometry.ElementType={'hex8'}; %The element types


%Initialize docNode object
domNode = com.mathworks.xml.XMLUtils.createDocument('febio_spec');

%Add geometry information (NodeSet)

%Add boundary condition information
Adding Geometry level
----> Adding node field
----> Adding element field
----> Adding hex8 element entries....
----> Creating MatAxis entries
----> Creating MatAxis entries
View example XML string
XML_str = xmlwrite(domNode);
<?xml version="1.0" encoding="utf-8"?>
         <node id="1">5.1699042e-01, 1.5644693e-02, 4.5796239e-03</node>
         <node id="2">5.5669463e-01, 8.6371087e-01, 7.6668200e-01</node>
         <node id="3">1.5649522e-01, 7.8069053e-02, 8.4870923e-01</node>
         <node id="4">5.6205605e-01, 6.6904259e-01, 9.1682127e-01</node>
         <node id="5">6.9480329e-01, 5.0021132e-01, 9.8696827e-01</node>
         <node id="6">4.2645554e-01, 2.1799380e-01, 5.0513310e-01</node>
         <node id="7">8.3627042e-01, 5.7161573e-01, 2.7142162e-01</node>
         <node id="8">7.3138707e-01, 1.2218915e-01, 1.0075051e-01</node>
         <node id="9">3.6003104e-01, 6.7116623e-01, 5.0784883e-01</node>
         <node id="10">4.5421237e-01, 5.9958555e-01, 5.8560913e-01</node>
         <node id="11">3.8638990e-01, 5.5976157e-02, 7.6288710e-01</node>
         <node id="12">7.7555464e-01, 5.6343019e-02, 8.2962649e-02</node>
         <node id="13">7.3427111e-01, 1.5250064e-01, 6.6159619e-01</node>
         <node id="14">4.3027785e-01, 1.9621067e-02, 5.1697901e-01</node>
         <node id="15">6.9375257e-01, 4.3517555e-01, 1.7104802e-01</node>
         <node id="16">9.4521349e-01, 8.3222148e-01, 9.3855786e-01</node>
         <node id="17">7.8423260e-01, 6.1739017e-01, 5.9048318e-01</node>
         <node id="18">7.0557186e-01, 5.2012942e-01, 4.4063468e-01</node>
         <node id="19">1.0933424e-01, 8.6386822e-01, 9.4191893e-01</node>
         <node id="20">3.8993066e-01, 9.7697918e-02, 6.5591382e-01</node>
         <node id="21">5.9090473e-01, 9.0805220e-01, 4.5194571e-01</node>
         <node id="22">4.5938005e-01, 1.0801669e-01, 8.3969742e-01</node>
         <node id="23">5.0339987e-02, 5.1699676e-01, 5.3262350e-01</node>
         <node id="24">2.2868758e-01, 1.4315602e-01, 5.5388707e-01</node>
         <node id="25">8.3418906e-01, 5.5937057e-01, 6.8006553e-01</node>
      <Elements mat="1" name="Block" type="hex8">
         <elem id="1">   0,   17,   10,   18,   12,   5,   16,   19</elem>
         <elem id="2">   11,   19,   7,   1,   16,   18,   11,   12</elem>
         <elem id="3">   2,   11,   9,   9,   18,   12,   4,   14</elem>
         <elem id="4">   3,   20,   10,   17,   19,   10,   9,   14</elem>
         <elem id="5">   13,   11,   1,   8,   4,   12,   9,   7</elem>
         <element id="1">
               <a>1.0000000e+00, 0.0000000e+00, -0.0000000e+00</a>
               <d>-0.0000000e+00, 1.0000000e+00, 0.0000000e+00</d>
         <element id="2">
               <a>1.0000000e+00, 0.0000000e+00, -0.0000000e+00</a>
               <d>-0.0000000e+00, 1.0000000e+00, 0.0000000e+00</d>
         <element id="3">
               <a>1.0000000e+00, 0.0000000e+00, -0.0000000e+00</a>
               <d>-0.0000000e+00, 1.0000000e+00, 0.0000000e+00</d>
         <element id="4">
               <a>1.0000000e+00, 0.0000000e+00, -0.0000000e+00</a>
               <d>-0.0000000e+00, 1.0000000e+00, 0.0000000e+00</d>
         <element id="5">
               <a>1.0000000e+00, 0.0000000e+00, -0.0000000e+00</a>
               <d>-0.0000000e+00, 1.0000000e+00, 0.0000000e+00</d>


Kevin Mattheus Moerman, [email protected]

GIBBON footer text


GIBBON: The Geometry and Image-based Bioengineering add-On. A toolbox for image segmentation, image-based modeling, meshing, and finite element analysis.

Copyright (C) 2017 Kevin Mattheus Moerman

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see