DEMO_febio_0013_disc_pressure_varying

Below is a demonstration for:

Contents

Keywords

clear; close all; clc;

Plot settings

fontSize=20;
faceAlpha1=0.8;
markerSize=25;
markerSize2=20;
lineWidth=3;

Control parameters

% Path names
defaultFolder = fileparts(fileparts(mfilename('fullpath')));
savePath=fullfile(defaultFolder,'data','temp');

% Defining file names
febioFebFileNamePart='tempModel';
febioFebFileName=fullfile(savePath,[febioFebFileNamePart,'.feb']); %FEB file name
febioLogFileName=[febioFebFileNamePart,'.txt']; %FEBio log file name
febioLogFileName_disp=[febioFebFileNamePart,'_disp_out.txt']; %Log file name for exporting displacement
febioLogFileName_stress=[febioFebFileNamePart,'_stress_out.txt']; %Log file name for exporting force

%Load
pressureValueMin=0.1e-4;
pressureValueMax=2.0e-4;
loadCase=1;
switch loadCase
    case 1
        loadType='pressure';
    case 2
        loadType='traction';
end

%Specifying dimensions and number of elements
pointSpacing=1;
inputStruct.cylRadius=30;
inputStruct.numRadial=round((inputStruct.cylRadius*pi)/pointSpacing);
inputStruct.cylHeight=3;
inputStruct.numHeight=round(inputStruct.cylHeight/pointSpacing);
inputStruct.meshType='tri';
inputStruct.closeOpt=1;

% Derive patch data for a cylinder
[Fs,Vs,Cs]=patchcylinder(inputStruct);

%Material parameter set
c1=1e-3; %Shear-modulus-like parameter
m1=2; %Material parameter setting degree of non-linearity
k_factor=1e2; %Bulk modulus factor
k=c1*k_factor; %Bulk modulus

% FEA control settings
numTimeSteps=10; %Number of time steps desired
max_refs=25; %Max reforms
max_ups=0; %Set to zero to use full-Newton iterations
opt_iter=6; %Optimum number of iterations
max_retries=5; %Maximum number of retires
dtmin=(1/numTimeSteps)/100; %Minimum time step size
dtmax=1/numTimeSteps; %Maximum time step size

Creating model geometry and mesh

The disc is meshed using tetrahedral elements using tetgen

inputStruct.stringOpt='-pq1.2AaY';
inputStruct.Faces=Fs;
inputStruct.Nodes=Vs;
inputStruct.holePoints=[];
inputStruct.faceBoundaryMarker=Cs; %Face boundary markers
inputStruct.regionPoints=getInnerPoint(Fs,Vs); %region points
inputStruct.regionA=tetVolMeanEst(Fs,Vs); %Volume for regular tets
inputStruct.minRegionMarker=2; %Minimum region marker
[meshStruct]=runTetGen(inputStruct); % Mesh model using tetrahedral elements using tetGen
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--- TETGEN Tetrahedral meshing --- 17-Dec-2020 09:18:23
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--- Writing SMESH file --- 17-Dec-2020 09:18:23
----> Adding node field
----> Adding facet field
----> Adding holes specification
----> Adding region specification
--- Done --- 17-Dec-2020 09:18:24
--- Running TetGen to mesh input boundary--- 17-Dec-2020 09:18:24
Opening /mnt/data/MATLAB/GIBBON/data/temp/temp.smesh.
Delaunizing vertices...
Delaunay seconds:  0.036107
Creating surface mesh ...
Surface mesh seconds:  0.005518
Recovering boundaries...
Boundary recovery seconds:  0.006707
Removing exterior tetrahedra ...
Spreading region attributes.
Exterior tets removal seconds:  0.000927
Recovering Delaunayness...
Delaunay recovery seconds:  0.015794
Refining mesh...
Refinement seconds:  0.030617
Optimizing mesh...
Optimization seconds:  0.002009

Writing /mnt/data/MATLAB/GIBBON/data/temp/temp.1.node.
Writing /mnt/data/MATLAB/GIBBON/data/temp/temp.1.ele.
Writing /mnt/data/MATLAB/GIBBON/data/temp/temp.1.face.
Writing /mnt/data/MATLAB/GIBBON/data/temp/temp.1.edge.

Output seconds:  0.034257
Total running seconds:  0.132102

Statistics:

  Input points: 1830
  Input facets: 3656
  Input segments: 5484
  Input holes: 0
  Input regions: 1

  Mesh points: 2880
  Mesh tetrahedra: 11774
  Mesh faces: 25376
  Mesh faces on exterior boundary: 3656
  Mesh faces on input facets: 3656
  Mesh edges on input segments: 5484
  Steiner points inside domain: 1050

--- Done --- 17-Dec-2020 09:18:24
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--- Importing TetGen files --- 17-Dec-2020 09:18:24
--- Done --- 17-Dec-2020 09:18:24

Access model element and patch data

Fb=meshStruct.facesBoundary;
Cb=meshStruct.boundaryMarker;
V=meshStruct.nodes;
CE=meshStruct.elementMaterialID;
E=meshStruct.elements;

Plotting model boundary surfaces and a cut view

hFig=cFigure;
subplot(1,2,1); hold on;
title('Model boundary surfaces and labels','FontSize',fontSize);
gpatch(Fb,V,Cb,'k',faceAlpha1);
colormap(gjet(6)); icolorbar;
axisGeom(gca,fontSize);

hs=subplot(1,2,2); hold on;
title('Cut view of solid mesh','FontSize',fontSize);
optionStruct.hFig=[hFig hs];
meshView(meshStruct,optionStruct);
axisGeom(gca,fontSize);
drawnow;

Defining the boundary conditions

The visualization of the model boundary shows colors for each side of the disc. These labels can be used to define boundary conditions.

%Define supported node sets
bcSupportList=unique(Fb(Cb==1,:)); %Node set part of selected face

%Define pressure surface
F_pressure=fliplr(Fb(Cb==2,:)); %The top face set

%Create spatially varying pressure
X=V(:,1);
C_pressure=mean(X(F_pressure),2); %Initialize as X-coordinate
C_pressure=C_pressure-min(C_pressure(:)); %Subtract minimum so range is 0-..
C_pressure=C_pressure./max(C_pressure(:)); %Devide by maximum so range is 0-1
C_pressure=C_pressure.^2;
C_pressure=C_pressure.*(pressureValueMax-pressureValueMin)+pressureValueMin; %Scale/offset to pressure range

Visualizing boundary conditions. Markers plotted on the semi-transparent model denote the nodes in the various boundary condition lists.

hf=cFigure;
title('Boundary conditions','FontSize',fontSize);
xlabel('X','FontSize',fontSize); ylabel('Y','FontSize',fontSize); zlabel('Z','FontSize',fontSize);
hold on;

gpatch(Fb,V,'kw','none',0.5);

hl(1)=plotV(V(bcSupportList,:),'k.','MarkerSize',markerSize);
hl(2)=gpatch(F_pressure,V,C_pressure,'k',1);
patchNormPlot(F_pressure,V);
legend(hl,{'BC full support','Pressure surface'});
colormap(gjet(250)); colorbar;
axisGeom(gca,fontSize);
camlight headlight;
drawnow;

Defining the FEBio input structure

See also febioStructTemplate and febioStruct2xml and the FEBio user manual.

%Get a template with default settings
[febio_spec]=febioStructTemplate;

%febio_spec version
febio_spec.ATTR.version='3.0';

%Module section
febio_spec.Module.ATTR.type='solid';

%Control section
febio_spec.Control.analysis='STATIC';
febio_spec.Control.time_steps=numTimeSteps;
febio_spec.Control.step_size=1/numTimeSteps;
febio_spec.Control.solver.max_refs=max_refs;
febio_spec.Control.solver.max_ups=max_ups;
febio_spec.Control.time_stepper.dtmin=dtmin;
febio_spec.Control.time_stepper.dtmax=dtmax;
febio_spec.Control.time_stepper.max_retries=max_retries;
febio_spec.Control.time_stepper.opt_iter=opt_iter;

%Material section
materialName1='Material1';
febio_spec.Material.material{1}.ATTR.name=materialName1;
febio_spec.Material.material{1}.ATTR.type='Ogden';
febio_spec.Material.material{1}.ATTR.id=1;
febio_spec.Material.material{1}.c1=c1;
febio_spec.Material.material{1}.m1=m1;
febio_spec.Material.material{1}.c2=c1;
febio_spec.Material.material{1}.m2=-m1;
febio_spec.Material.material{1}.k=k;

%Mesh section
% -> Nodes
febio_spec.Mesh.Nodes{1}.ATTR.name='nodeSet_all'; %The node set name
febio_spec.Mesh.Nodes{1}.node.ATTR.id=(1:size(V,1))'; %The node id's
febio_spec.Mesh.Nodes{1}.node.VAL=V; %The nodel coordinates

% -> Elements
partName1='Part1';
febio_spec.Mesh.Elements{1}.ATTR.name=partName1; %Name of this part
febio_spec.Mesh.Elements{1}.ATTR.type='tet4'; %Element type
febio_spec.Mesh.Elements{1}.elem.ATTR.id=(1:1:size(E,1))'; %Element id's
febio_spec.Mesh.Elements{1}.elem.VAL=E; %The element matrix

% -> Surfaces
surfaceName1='LoadedSurface';
febio_spec.Mesh.Surface{1}.ATTR.name=surfaceName1;
febio_spec.Mesh.Surface{1}.tri3.ATTR.id=(1:1:size(F_pressure,1))';
febio_spec.Mesh.Surface{1}.tri3.VAL=F_pressure;

% -> NodeSets
nodeSetName1='bcSupportList';
febio_spec.Mesh.NodeSet{1}.ATTR.name=nodeSetName1;
febio_spec.Mesh.NodeSet{1}.node.ATTR.id=bcSupportList(:);

%MeshDomains section
febio_spec.MeshDomains.SolidDomain.ATTR.name=partName1;
febio_spec.MeshDomains.SolidDomain.ATTR.mat=materialName1;

%Boundary condition section
% -> Fix boundary conditions
febio_spec.Boundary.bc{1}.ATTR.type='fix';
febio_spec.Boundary.bc{1}.ATTR.node_set=nodeSetName1;
febio_spec.Boundary.bc{1}.dofs='x,y,z';

%MeshData secion
%-> Surface data
loadDataName1='LoadData1';
switch loadType
    case 'pressure'
        febio_spec.MeshData.SurfaceData.ATTR.name=loadDataName1;
        febio_spec.MeshData.SurfaceData.ATTR.surface=surfaceName1;
        febio_spec.MeshData.SurfaceData.ATTR.datatype='scalar';
        febio_spec.MeshData.SurfaceData.face.ATTR.lid=(1:1:numel(C_pressure))';
        febio_spec.MeshData.SurfaceData.face.VAL=C_pressure;
    case 'traction'
        febio_spec.MeshData.SurfaceData.ATTR.name=loadDataName1;
        febio_spec.MeshData.SurfaceData.ATTR.surface=surfaceName1;
        febio_spec.MeshData.SurfaceData.ATTR.datatype='vec3';
        febio_spec.MeshData.SurfaceData.face.ATTR.lid=(1:1:numel(C_pressure))';
        febio_spec.MeshData.SurfaceData.face.VAL=[zeros(size(C_pressure)) zeros(size(C_pressure)) -C_pressure];
end

%Loads section
% -> Surface load
switch loadType
    case 'pressure'
        febio_spec.Loads.surface_load{1}.ATTR.type='pressure';
        febio_spec.Loads.surface_load{1}.ATTR.surface=surfaceName1;
        febio_spec.Loads.surface_load{1}.pressure.ATTR.lc=1;
        febio_spec.Loads.surface_load{1}.pressure.ATTR.type='map';
        febio_spec.Loads.surface_load{1}.pressure.VAL=loadDataName1;
        febio_spec.Loads.surface_load{1}.symmetric_stiffness=1;
    case 'traction'
        febio_spec.Loads.surface_load{1}.ATTR.type='traction';
        febio_spec.Loads.surface_load{1}.ATTR.surface=surfaceName1;
        febio_spec.Loads.surface_load{1}.traction.ATTR.lc=1;
        febio_spec.Loads.surface_load{1}.traction.ATTR.type='map';
        febio_spec.Loads.surface_load{1}.traction.VAL=loadDataName1;
end

%LoadData section
% -> load_controller
febio_spec.LoadData.load_controller{1}.ATTR.id=1;
febio_spec.LoadData.load_controller{1}.ATTR.type='loadcurve';
febio_spec.LoadData.load_controller{1}.interpolate='LINEAR';
febio_spec.LoadData.load_controller{1}.points.point.VAL=[0 0; 1 1];

%Output section
% -> log file
febio_spec.Output.logfile.ATTR.file=febioLogFileName;
febio_spec.Output.logfile.node_data{1}.ATTR.file=febioLogFileName_disp;
febio_spec.Output.logfile.node_data{1}.ATTR.data='ux;uy;uz';
febio_spec.Output.logfile.node_data{1}.ATTR.delim=',';
febio_spec.Output.logfile.node_data{1}.VAL=1:size(V,1);

febio_spec.Output.logfile.element_data{1}.ATTR.file=febioLogFileName_stress;
febio_spec.Output.logfile.element_data{1}.ATTR.data='s1';
febio_spec.Output.logfile.element_data{1}.ATTR.delim=',';
febio_spec.Output.logfile.element_data{1}.VAL=1:size(E,1);

Quick viewing of the FEBio input file structure

The febView function can be used to view the xml structure in a MATLAB figure window.

febView(febio_spec); %Viewing the febio file

Exporting the FEBio input file

Exporting the febio_spec structure to an FEBio input file is done using the febioStruct2xml function.

febioStruct2xml(febio_spec,febioFebFileName); %Exporting to file and domNode
% febView(febioFebFileName);

Running the FEBio analysis

To run the analysis defined by the created FEBio input file the runMonitorFEBio function is used. The input for this function is a structure defining job settings e.g. the FEBio input file name. The optional output runFlag informs the user if the analysis was run succesfully.

febioAnalysis.run_filename=febioFebFileName; %The input file name
febioAnalysis.run_logname=febioLogFileName; %The name for the log file
febioAnalysis.disp_on=1; %Display information on the command window
febioAnalysis.runMode='internal';%'internal';

[runFlag]=runMonitorFEBio(febioAnalysis);%START FEBio NOW!!!!!!!!
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-------->    RUNNING/MONITORING FEBIO JOB    <-------- 17-Dec-2020 09:18:29
FEBio path: /home/kevin/FEBioStudio/bin/febio3
# Attempt removal of existing log files                17-Dec-2020 09:18:29
 * Removal succesful                                   17-Dec-2020 09:18:29
# Attempt removal of existing .xplt files              17-Dec-2020 09:18:29
 * Removal succesful                                   17-Dec-2020 09:18:29
# Starting FEBio...                                    17-Dec-2020 09:18:29
  Max. total analysis time is: Inf s

===========================================================================
         ________    _________   _______       __     _________            
        |        |\ |        |\ |       \\    |  |\  /         \\          
        |    ____|| |    ____|| |    __  ||   |__|| |    ___    ||         
        |   |\___\| |   |\___\| |   |\_| ||    \_\| |   //  \   ||         
        |   ||__    |   ||__    |   ||_| ||   |  |\ |  ||    |  ||         
        |       |\  |       |\  |         \\  |  || |  ||    |  ||         
        |    ___||  |    ___||  |    ___   || |  || |  ||    |  ||         
        |   |\__\|  |   |\__\|  |   |\__|  || |  || |  ||    |  ||         
        |   ||      |   ||___   |   ||__|  || |  || |   \\__/   ||         
        |   ||      |        |\ |          || |  || |           ||         
        |___||      |________|| |_________//  |__||  \_________//          
                                                                           
      F I N I T E   E L E M E N T S   F O R   B I O M E C H A N I C S      
                                                                           
  version 3.1.0
  FEBio is a registered trademark.                                         
  copyright (c) 2006-2020 - All rights reserved                            
                                                                           
===========================================================================

Default linear solver: pardiso
Reading file /mnt/data/MATLAB/GIBBON/data/temp/tempModel.feb ...SUCCESS!

Setting parameter "pressure" to : 0

 ]0;(0%) tempModel.feb - FEBio 3.1.0  
===== beginning time step 1 : 0.1 =====

Setting parameter "pressure" to : 0.1

Reforming stiffness matrix: reformation #1

===== reforming stiffness matrix:
	Nr of equations ........................... : 7794
	Nr of nonzeroes in stiffness matrix ....... : 148887
 1
 Nonlinear solution status: time= 0.1
	stiffness updates             = 0
	right hand side evaluations   = 3
	stiffness matrix reformations = 1
	step from line search         = 0.545521
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            6.560848e-07    2.105243e-04    0.000000e+00 
	   energy              1.230880e-02    1.400077e-03    1.230880e-04 
	   displacement        1.631704e+03    4.855837e+02    4.855837e-04 
Reforming stiffness matrix: reformation #2

 2
 Nonlinear solution status: time= 0.1
	stiffness updates             = 0
	right hand side evaluations   = 4
	stiffness matrix reformations = 2
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            6.560848e-07    1.351961e-05    0.000000e+00 
	   energy              1.230880e-02    5.335784e-04    1.230880e-04 
	   displacement        1.631704e+03    1.641225e+02    1.212671e-03 
Reforming stiffness matrix: reformation #3

 3
 Nonlinear solution status: time= 0.1
	stiffness updates             = 0
	right hand side evaluations   = 5
	stiffness matrix reformations = 3
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            6.560848e-07    1.825677e-06    0.000000e+00 
	   energy              1.230880e-02    3.934498e-05    1.230880e-04 
	   displacement        1.631704e+03    2.591010e+01    1.586617e-03 
Reforming stiffness matrix: reformation #4

 4
 Nonlinear solution status: time= 0.1
	stiffness updates             = 0
	right hand side evaluations   = 6
	stiffness matrix reformations = 4
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            6.560848e-07    1.016072e-09    0.000000e+00 
	   energy              1.230880e-02    5.200896e-07    1.230880e-04 
	   displacement        1.631704e+03    6.309398e-01    1.649589e-03 
Reforming stiffness matrix: reformation #5

 5
 Nonlinear solution status: time= 0.1
	stiffness updates             = 0
	right hand side evaluations   = 7
	stiffness matrix reformations = 5
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            6.560848e-07    2.643798e-14    0.000000e+00 
	   energy              1.230880e-02    6.100024e-11    1.230880e-04 
	   displacement        1.631704e+03    2.785961e-03    1.653770e-03 
Reforming stiffness matrix: reformation #6

 6
 Nonlinear solution status: time= 0.1
	stiffness updates             = 0
	right hand side evaluations   = 8
	stiffness matrix reformations = 6
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            6.560848e-07    3.884655e-21    0.000000e+00 
	   energy              1.230880e-02    1.387350e-19    1.230880e-04 
	   displacement        1.631704e+03    3.192749e-08    1.653770e-03 

convergence summary
    number of iterations   : 6
    number of reformations : 6

------- converged at time : 0.1


Data Record #1
===========================================================================
Step = 1
Time = 0.1
Data = ux;uy;uz
File = /mnt/data/MATLAB/GIBBON/data/temp/tempModel_disp_out.txt

Data Record #2
===========================================================================
Step = 1
Time = 0.1
Data = s1
File = /mnt/data/MATLAB/GIBBON/data/temp/tempModel_stress_out.txt
 ]0;(10%) tempModel.feb - FEBio 3.1.0  
===== beginning time step 2 : 0.2 =====

Setting parameter "pressure" to : 0.2

Reforming stiffness matrix: reformation #1

 1
 Nonlinear solution status: time= 0.2
	stiffness updates             = 0
	right hand side evaluations   = 3
	stiffness matrix reformations = 1
	step from line search         = 0.559934
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            6.626444e-07    2.087672e-04    0.000000e+00 
	   energy              1.206043e-02    1.300559e-03    1.206043e-04 
	   displacement        1.549428e+03    4.857859e+02    4.857859e-04 
Reforming stiffness matrix: reformation #2

 2
 Nonlinear solution status: time= 0.2
	stiffness updates             = 0
	right hand side evaluations   = 4
	stiffness matrix reformations = 2
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            6.626444e-07    9.456362e-06    0.000000e+00 
	   energy              1.206043e-02    4.488306e-04    1.206043e-04 
	   displacement        1.549428e+03    1.402653e+02    1.146245e-03 
Reforming stiffness matrix: reformation #3

 3
 Nonlinear solution status: time= 0.2
	stiffness updates             = 0
	right hand side evaluations   = 5
	stiffness matrix reformations = 3
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            6.626444e-07    9.360270e-07    0.000000e+00 
	   energy              1.206043e-02    2.374715e-05    1.206043e-04 
	   displacement        1.549428e+03    1.811182e+01    1.447273e-03 
Reforming stiffness matrix: reformation #4

 4
 Nonlinear solution status: time= 0.2
	stiffness updates             = 0
	right hand side evaluations   = 6
	stiffness matrix reformations = 4
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            6.626444e-07    1.522817e-10    0.000000e+00 
	   energy              1.206043e-02    1.429079e-07    1.206043e-04 
	   displacement        1.549428e+03    2.371102e-01    1.483970e-03 
Reforming stiffness matrix: reformation #5

 5
 Nonlinear solution status: time= 0.2
	stiffness updates             = 0
	right hand side evaluations   = 7
	stiffness matrix reformations = 5
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            6.626444e-07    7.017868e-16    0.000000e+00 
	   energy              1.206043e-02    3.307750e-12    1.206043e-04 
	   displacement        1.549428e+03    3.714045e-04    1.485393e-03 

convergence summary
    number of iterations   : 5
    number of reformations : 5

------- converged at time : 0.2


Data Record #1
===========================================================================
Step = 2
Time = 0.2
Data = ux;uy;uz
File = /mnt/data/MATLAB/GIBBON/data/temp/tempModel_disp_out.txt

Data Record #2
===========================================================================
Step = 2
Time = 0.2
Data = s1
File = /mnt/data/MATLAB/GIBBON/data/temp/tempModel_stress_out.txt
 ]0;(20%) tempModel.feb - FEBio 3.1.0  
===== beginning time step 3 : 0.3 =====

Setting parameter "pressure" to : 0.3

Reforming stiffness matrix: reformation #1

 1
 Nonlinear solution status: time= 0.3
	stiffness updates             = 0
	right hand side evaluations   = 3
	stiffness matrix reformations = 1
	step from line search         = 0.606455
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            6.756341e-07    2.069292e-04    0.000000e+00 
	   energy              1.140565e-02    1.049744e-03    1.140565e-04 
	   displacement        1.342761e+03    4.938511e+02    4.938511e-04 
Reforming stiffness matrix: reformation #2

 2
 Nonlinear solution status: time= 0.3
	stiffness updates             = 0
	right hand side evaluations   = 4
	stiffness matrix reformations = 2
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            6.756341e-07    4.316413e-06    0.000000e+00 
	   energy              1.140565e-02    3.113704e-04    1.140565e-04 
	   displacement        1.342761e+03    9.784634e+01    1.029522e-03 
Reforming stiffness matrix: reformation #3

 3
 Nonlinear solution status: time= 0.3
	stiffness updates             = 0
	right hand side evaluations   = 5
	stiffness matrix reformations = 3
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            6.756341e-07    2.833858e-07    0.000000e+00 
	   energy              1.140565e-02    8.874961e-06    1.140565e-04 
	   displacement        1.342761e+03    9.561960e+00    1.233896e-03 
Reforming stiffness matrix: reformation #4

 4
 Nonlinear solution status: time= 0.3
	stiffness updates             = 0
	right hand side evaluations   = 6
	stiffness matrix reformations = 4
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            6.756341e-07    4.826462e-12    0.000000e+00 
	   energy              1.140565e-02    1.359626e-08    1.140565e-04 
	   displacement        1.342761e+03    3.871479e-02    1.247315e-03 
Reforming stiffness matrix: reformation #5

 5
 Nonlinear solution status: time= 0.3
	stiffness updates             = 0
	right hand side evaluations   = 7
	stiffness matrix reformations = 5
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            6.756341e-07    8.716456e-18    0.000000e+00 
	   energy              1.140565e-02    1.106687e-14    1.140565e-04 
	   displacement        1.342761e+03    7.367364e-06    1.247405e-03 

convergence summary
    number of iterations   : 5
    number of reformations : 5

------- converged at time : 0.3


Data Record #1
===========================================================================
Step = 3
Time = 0.3
Data = ux;uy;uz
File = /mnt/data/MATLAB/GIBBON/data/temp/tempModel_disp_out.txt

Data Record #2
===========================================================================
Step = 3
Time = 0.3
Data = s1
File = /mnt/data/MATLAB/GIBBON/data/temp/tempModel_stress_out.txt
 ]0;(30%) tempModel.feb - FEBio 3.1.0  
===== beginning time step 4 : 0.4 =====

Setting parameter "pressure" to : 0.4

Reforming stiffness matrix: reformation #1

 1
 Nonlinear solution status: time= 0.4
	stiffness updates             = 0
	right hand side evaluations   = 2
	stiffness matrix reformations = 1
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            6.935111e-07    9.826278e-04    0.000000e+00 
	   energy              1.062778e-02    7.942441e-03    1.062778e-04 
	   displacement        1.117155e+03    1.117155e+03    1.117155e-03 
Reforming stiffness matrix: reformation #2

 2
 Nonlinear solution status: time= 0.4
	stiffness updates             = 0
	right hand side evaluations   = 3
	stiffness matrix reformations = 2
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            6.935111e-07    8.255817e-09    0.000000e+00 
	   energy              1.062778e-02    5.772412e-06    1.062778e-04 
	   displacement        1.117155e+03    9.890901e-01    1.069474e-03 
Reforming stiffness matrix: reformation #3

 3
 Nonlinear solution status: time= 0.4
	stiffness updates             = 0
	right hand side evaluations   = 4
	stiffness matrix reformations = 3
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            6.935111e-07    6.622765e-10    0.000000e+00 
	   energy              1.062778e-02    1.184349e-08    1.062778e-04 
	   displacement        1.117155e+03    4.656540e-01    1.027459e-03 
Reforming stiffness matrix: reformation #4

 4
 Nonlinear solution status: time= 0.4
	stiffness updates             = 0
	right hand side evaluations   = 5
	stiffness matrix reformations = 4
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            6.935111e-07    1.757025e-16    0.000000e+00 
	   energy              1.062778e-02    5.516322e-14    1.062778e-04 
	   displacement        1.117155e+03    9.497625e-05    1.027588e-03 

convergence summary
    number of iterations   : 4
    number of reformations : 4

------- converged at time : 0.4


Data Record #1
===========================================================================
Step = 4
Time = 0.4
Data = ux;uy;uz
File = /mnt/data/MATLAB/GIBBON/data/temp/tempModel_disp_out.txt

Data Record #2
===========================================================================
Step = 4
Time = 0.4
Data = s1
File = /mnt/data/MATLAB/GIBBON/data/temp/tempModel_stress_out.txt
 ]0;(40%) tempModel.feb - FEBio 3.1.0  
===== beginning time step 5 : 0.5 =====

Setting parameter "pressure" to : 0.5

Reforming stiffness matrix: reformation #1

 1
 Nonlinear solution status: time= 0.5
	stiffness updates             = 0
	right hand side evaluations   = 2
	stiffness matrix reformations = 1
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            7.150052e-07    6.424882e-04    0.000000e+00 
	   energy              9.909670e-03    5.130960e-03    9.909670e-05 
	   displacement        9.277275e+02    9.277275e+02    9.277275e-04 
Reforming stiffness matrix: reformation #2

 2
 Nonlinear solution status: time= 0.5
	stiffness updates             = 0
	right hand side evaluations   = 3
	stiffness matrix reformations = 2
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            7.150052e-07    3.638928e-09    0.000000e+00 
	   energy              9.909670e-03    9.497994e-07    9.909670e-05 
	   displacement        9.277275e+02    1.117559e+00    8.830079e-04 
Reforming stiffness matrix: reformation #3

 3
 Nonlinear solution status: time= 0.5
	stiffness updates             = 0
	right hand side evaluations   = 4
	stiffness matrix reformations = 3
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            7.150052e-07    2.000106e-10    0.000000e+00 
	   energy              9.909670e-03    1.395723e-10    9.909670e-05 
	   displacement        9.277275e+02    2.594857e-01    8.545748e-04 
Reforming stiffness matrix: reformation #4

 4
 Nonlinear solution status: time= 0.5
	stiffness updates             = 0
	right hand side evaluations   = 5
	stiffness matrix reformations = 4
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            7.150052e-07    2.560380e-16    0.000000e+00 
	   energy              9.909670e-03    4.427032e-14    9.909670e-05 
	   displacement        9.277275e+02    9.087444e-05    8.547185e-04 

convergence summary
    number of iterations   : 4
    number of reformations : 4

------- converged at time : 0.5


Data Record #1
===========================================================================
Step = 5
Time = 0.5
Data = ux;uy;uz
File = /mnt/data/MATLAB/GIBBON/data/temp/tempModel_disp_out.txt

Data Record #2
===========================================================================
Step = 5
Time = 0.5
Data = s1
File = /mnt/data/MATLAB/GIBBON/data/temp/tempModel_stress_out.txt
 ]0;(50%) tempModel.feb - FEBio 3.1.0  
===== beginning time step 6 : 0.6 =====

Setting parameter "pressure" to : 0.6

Reforming stiffness matrix: reformation #1

 1
 Nonlinear solution status: time= 0.6
	stiffness updates             = 0
	right hand side evaluations   = 2
	stiffness matrix reformations = 1
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            7.391810e-07    4.380335e-04    0.000000e+00 
	   energy              9.309286e-03    3.445254e-03    9.309286e-05 
	   displacement        7.829883e+02    7.829883e+02    7.829883e-04 
Reforming stiffness matrix: reformation #2

 2
 Nonlinear solution status: time= 0.6
	stiffness updates             = 0
	right hand side evaluations   = 3
	stiffness matrix reformations = 2
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            7.391810e-07    2.180063e-09    0.000000e+00 
	   energy              9.309286e-03    8.955842e-08    9.309286e-05 
	   displacement        7.829883e+02    1.150408e+00    7.441095e-04 
Reforming stiffness matrix: reformation #3

 3
 Nonlinear solution status: time= 0.6
	stiffness updates             = 0
	right hand side evaluations   = 4
	stiffness matrix reformations = 3
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            7.391810e-07    5.011097e-11    0.000000e+00 
	   energy              9.309286e-03    1.234230e-09    9.309286e-05 
	   displacement        7.829883e+02    1.343752e-01    7.253724e-04 
Reforming stiffness matrix: reformation #4

 4
 Nonlinear solution status: time= 0.6
	stiffness updates             = 0
	right hand side evaluations   = 5
	stiffness matrix reformations = 4
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            7.391810e-07    3.115929e-16    0.000000e+00 
	   energy              9.309286e-03    4.391844e-14    9.309286e-05 
	   displacement        7.829883e+02    7.795754e-05    7.255449e-04 

convergence summary
    number of iterations   : 4
    number of reformations : 4

------- converged at time : 0.6


Data Record #1
===========================================================================
Step = 6
Time = 0.6
Data = ux;uy;uz
File = /mnt/data/MATLAB/GIBBON/data/temp/tempModel_disp_out.txt

Data Record #2
===========================================================================
Step = 6
Time = 0.6
Data = s1
File = /mnt/data/MATLAB/GIBBON/data/temp/tempModel_stress_out.txt
 ]0;(60%) tempModel.feb - FEBio 3.1.0  
===== beginning time step 7 : 0.7 =====

Setting parameter "pressure" to : 0.7

Reforming stiffness matrix: reformation #1

 1
 Nonlinear solution status: time= 0.7
	stiffness updates             = 0
	right hand side evaluations   = 2
	stiffness matrix reformations = 1
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            7.655205e-07    3.156210e-04    0.000000e+00 
	   energy              8.825418e-03    2.437041e-03    8.825418e-05 
	   displacement        6.749907e+02    6.749907e+02    6.749907e-04 
Reforming stiffness matrix: reformation #2

 2
 Nonlinear solution status: time= 0.7
	stiffness updates             = 0
	right hand side evaluations   = 3
	stiffness matrix reformations = 2
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            7.655205e-07    1.534264e-09    0.000000e+00 
	   energy              8.825418e-03    3.707826e-07    8.825418e-05 
	   displacement        6.749907e+02    1.154418e+00    6.422386e-04 
Reforming stiffness matrix: reformation #3

 3
 Nonlinear solution status: time= 0.7
	stiffness updates             = 0
	right hand side evaluations   = 4
	stiffness matrix reformations = 3
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            7.655205e-07    1.393533e-11    0.000000e+00 
	   energy              8.825418e-03    7.466577e-10    8.825418e-05 
	   displacement        6.749907e+02    7.462477e-02    6.293017e-04 
Reforming stiffness matrix: reformation #4

 4
 Nonlinear solution status: time= 0.7
	stiffness updates             = 0
	right hand side evaluations   = 5
	stiffness matrix reformations = 4
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            7.655205e-07    3.752631e-16    0.000000e+00 
	   energy              8.825418e-03    3.649248e-14    8.825418e-05 
	   displacement        6.749907e+02    6.853441e-05    6.294902e-04 

convergence summary
    number of iterations   : 4
    number of reformations : 4

------- converged at time : 0.7


Data Record #1
===========================================================================
Step = 7
Time = 0.7
Data = ux;uy;uz
File = /mnt/data/MATLAB/GIBBON/data/temp/tempModel_disp_out.txt

Data Record #2
===========================================================================
Step = 7
Time = 0.7
Data = s1
File = /mnt/data/MATLAB/GIBBON/data/temp/tempModel_stress_out.txt
 ]0;(70%) tempModel.feb - FEBio 3.1.0  
===== beginning time step 8 : 0.8 =====

Setting parameter "pressure" to : 0.8

Reforming stiffness matrix: reformation #1

 1
 Nonlinear solution status: time= 0.8
	stiffness updates             = 0
	right hand side evaluations   = 2
	stiffness matrix reformations = 1
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            7.937196e-07    2.398308e-04    0.000000e+00 
	   energy              8.438632e-03    1.812885e-03    8.438632e-05 
	   displacement        5.938915e+02    5.938915e+02    5.938915e-04 
Reforming stiffness matrix: reformation #2

 2
 Nonlinear solution status: time= 0.8
	stiffness updates             = 0
	right hand side evaluations   = 3
	stiffness matrix reformations = 2
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            7.937196e-07    1.184228e-09    0.000000e+00 
	   energy              8.438632e-03    7.850879e-07    8.438632e-05 
	   displacement        5.938915e+02    1.171198e+00    5.665382e-04 
Reforming stiffness matrix: reformation #3

 3
 Nonlinear solution status: time= 0.8
	stiffness updates             = 0
	right hand side evaluations   = 4
	stiffness matrix reformations = 3
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            7.937196e-07    5.048997e-12    0.000000e+00 
	   energy              8.438632e-03    4.122479e-10    8.438632e-05 
	   displacement        5.938915e+02    4.778884e-02    5.568358e-04 
Reforming stiffness matrix: reformation #4

 4
 Nonlinear solution status: time= 0.8
	stiffness updates             = 0
	right hand side evaluations   = 5
	stiffness matrix reformations = 4
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            7.937196e-07    4.750112e-16    0.000000e+00 
	   energy              8.438632e-03    3.039492e-14    8.438632e-05 
	   displacement        5.938915e+02    6.514542e-05    5.570299e-04 

convergence summary
    number of iterations   : 4
    number of reformations : 4

------- converged at time : 0.8


Data Record #1
===========================================================================
Step = 8
Time = 0.8
Data = ux;uy;uz
File = /mnt/data/MATLAB/GIBBON/data/temp/tempModel_disp_out.txt

Data Record #2
===========================================================================
Step = 8
Time = 0.8
Data = s1
File = /mnt/data/MATLAB/GIBBON/data/temp/tempModel_stress_out.txt
 ]0;(80%) tempModel.feb - FEBio 3.1.0  
===== beginning time step 9 : 0.9 =====

Setting parameter "pressure" to : 0.9

Reforming stiffness matrix: reformation #1

 1
 Nonlinear solution status: time= 0.9
	stiffness updates             = 0
	right hand side evaluations   = 2
	stiffness matrix reformations = 1
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            8.235964e-07    1.907834e-04    0.000000e+00 
	   energy              8.128412e-03    1.408807e-03    8.128412e-05 
	   displacement        5.319135e+02    5.319135e+02    5.319135e-04 
Reforming stiffness matrix: reformation #2

 2
 Nonlinear solution status: time= 0.9
	stiffness updates             = 0
	right hand side evaluations   = 3
	stiffness matrix reformations = 2
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            8.235964e-07    1.006502e-09    0.000000e+00 
	   energy              8.128412e-03    1.096311e-06    8.128412e-05 
	   displacement        5.319135e+02    1.218196e+00    5.090126e-04 
Reforming stiffness matrix: reformation #3

 3
 Nonlinear solution status: time= 0.9
	stiffness updates             = 0
	right hand side evaluations   = 4
	stiffness matrix reformations = 3
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            8.235964e-07    2.530315e-12    0.000000e+00 
	   energy              8.128412e-03    2.564876e-10    8.128412e-05 
	   displacement        5.319135e+02    3.597247e-02    5.010345e-04 
Reforming stiffness matrix: reformation #4

 4
 Nonlinear solution status: time= 0.9
	stiffness updates             = 0
	right hand side evaluations   = 5
	stiffness matrix reformations = 4
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            8.235964e-07    6.379387e-16    0.000000e+00 
	   energy              8.128412e-03    2.839361e-14    8.128412e-05 
	   displacement        5.319135e+02    6.763128e-05    5.012287e-04 

convergence summary
    number of iterations   : 4
    number of reformations : 4

------- converged at time : 0.9


Data Record #1
===========================================================================
Step = 9
Time = 0.9
Data = ux;uy;uz
File = /mnt/data/MATLAB/GIBBON/data/temp/tempModel_disp_out.txt

Data Record #2
===========================================================================
Step = 9
Time = 0.9
Data = s1
File = /mnt/data/MATLAB/GIBBON/data/temp/tempModel_stress_out.txt
 ]0;(90%) tempModel.feb - FEBio 3.1.0  
===== beginning time step 10 : 1 =====

Setting parameter "pressure" to : 1

Reforming stiffness matrix: reformation #1

 1
 Nonlinear solution status: time= 1
	stiffness updates             = 0
	right hand side evaluations   = 2
	stiffness matrix reformations = 1
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            8.550345e-07    1.576339e-04    0.000000e+00 
	   energy              7.877729e-03    1.135505e-03    7.877729e-05 
	   displacement        4.835651e+02    4.835651e+02    4.835651e-04 
Reforming stiffness matrix: reformation #2

 2
 Nonlinear solution status: time= 1
	stiffness updates             = 0
	right hand side evaluations   = 3
	stiffness matrix reformations = 2
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            8.550345e-07    9.416239e-10    0.000000e+00 
	   energy              7.877729e-03    1.294410e-06    7.877729e-05 
	   displacement        4.835651e+02    1.300404e+00    4.642561e-04 
Reforming stiffness matrix: reformation #3

 3
 Nonlinear solution status: time= 1
	stiffness updates             = 0
	right hand side evaluations   = 4
	stiffness matrix reformations = 3
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            8.550345e-07    1.723653e-12    0.000000e+00 
	   energy              7.877729e-03    1.872886e-10    7.877729e-05 
	   displacement        4.835651e+02    3.131571e-02    4.571281e-04 
Reforming stiffness matrix: reformation #4

 4
 Nonlinear solution status: time= 1
	stiffness updates             = 0
	right hand side evaluations   = 5
	stiffness matrix reformations = 4
	step from line search         = 1.000000
	convergence norms :     INITIAL         CURRENT         REQUIRED
	   residual            8.550345e-07    9.053577e-16    0.000000e+00 
	   energy              7.877729e-03    3.070357e-14    7.877729e-05 
	   displacement        4.835651e+02    7.618258e-05    4.573198e-04 

convergence summary
    number of iterations   : 4
    number of reformations : 4

------- converged at time : 1


Data Record #1
===========================================================================
Step = 10
Time = 1
Data = ux;uy;uz
File = /mnt/data/MATLAB/GIBBON/data/temp/tempModel_disp_out.txt

Data Record #2
===========================================================================
Step = 10
Time = 1
Data = s1
File = /mnt/data/MATLAB/GIBBON/data/temp/tempModel_stress_out.txt
 ]0;(100%) tempModel.feb - FEBio 3.1.0  

 N O N L I N E A R   I T E R A T I O N   I N F O R M A T I O N

	Number of time steps completed .................... : 10

	Total number of equilibrium iterations ............ : 44

	Average number of equilibrium iterations .......... : 4.4

	Total number of right hand evaluations ............ : 57

	Total number of stiffness reformations ............ : 44


 L I N E A R   S O L V E R   S T A T S

	Total calls to linear solver ........ : 44

	Avg iterations per solve ............ : 1

	Time in linear solver: 0:00:02

 ]0;(0%) tempModel.feb - FEBio 3.1.0  
 Elapsed time : 0:00:04


 N O R M A L   T E R M I N A T I O N

 * Log file found.                                     17-Dec-2020 09:18:33
# Parsing log file...                                  17-Dec-2020 09:18:33
    number of iterations   : 6                         17-Dec-2020 09:18:34
    number of reformations : 6                         17-Dec-2020 09:18:34
------- converged at time : 0.1                        17-Dec-2020 09:18:34
    number of iterations   : 5                         17-Dec-2020 09:18:34
    number of reformations : 5                         17-Dec-2020 09:18:34
------- converged at time : 0.2                        17-Dec-2020 09:18:34
    number of iterations   : 5                         17-Dec-2020 09:18:34
    number of reformations : 5                         17-Dec-2020 09:18:34
------- converged at time : 0.3                        17-Dec-2020 09:18:34
    number of iterations   : 4                         17-Dec-2020 09:18:34
    number of reformations : 4                         17-Dec-2020 09:18:34
------- converged at time : 0.4                        17-Dec-2020 09:18:34
    number of iterations   : 4                         17-Dec-2020 09:18:34
    number of reformations : 4                         17-Dec-2020 09:18:34
------- converged at time : 0.5                        17-Dec-2020 09:18:34
    number of iterations   : 4                         17-Dec-2020 09:18:34
    number of reformations : 4                         17-Dec-2020 09:18:34
------- converged at time : 0.6                        17-Dec-2020 09:18:34
    number of iterations   : 4                         17-Dec-2020 09:18:34
    number of reformations : 4                         17-Dec-2020 09:18:34
------- converged at time : 0.7                        17-Dec-2020 09:18:34
    number of iterations   : 4                         17-Dec-2020 09:18:34
    number of reformations : 4                         17-Dec-2020 09:18:34
------- converged at time : 0.8                        17-Dec-2020 09:18:34
    number of iterations   : 4                         17-Dec-2020 09:18:34
    number of reformations : 4                         17-Dec-2020 09:18:34
------- converged at time : 0.9                        17-Dec-2020 09:18:34
    number of iterations   : 4                         17-Dec-2020 09:18:34
    number of reformations : 4                         17-Dec-2020 09:18:34
------- converged at time : 1                          17-Dec-2020 09:18:34
 Elapsed time : 0:00:04                                17-Dec-2020 09:18:34
 N O R M A L   T E R M I N A T I O N
# Done                                                 17-Dec-2020 09:18:34
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Import FEBio results

if runFlag==1 %i.e. a succesful run

Importing nodal displacements from a log file

    dataStruct=importFEBio_logfile(fullfile(savePath,febioLogFileName_disp),1,1);

    %Access data
    N_disp_mat=dataStruct.data; %Displacement
    timeVec=dataStruct.time; %Time

    %Create deformed coordinate set
    V_DEF=N_disp_mat+repmat(V,[1 1 size(N_disp_mat,3)]);

Plotting the simulated results using anim8 to visualize and animate deformations

    DN_magnitude=sqrt(sum(N_disp_mat(:,:,end).^2,2)); %Current displacement magnitude

    % Create basic view and store graphics handle to initiate animation
    hf=cFigure; %Open figure
    gtitle([febioFebFileNamePart,': Press play to animate']);
    title('Displacement magnitude [mm]','Interpreter','Latex')
    hp=gpatch(Fb,V_DEF(:,:,end),DN_magnitude,'k',1); %Add graphics object to animate
    hp.Marker='.';
    hp.MarkerSize=markerSize2;
    hp.FaceColor='interp';

    axisGeom(gca,fontSize);
    colormap(gjet(250)); colorbar;
    caxis([0 max(DN_magnitude)]);
    axis(axisLim(V_DEF)); %Set axis limits statically
    camlight headlight;

    % Set up animation features
    animStruct.Time=timeVec; %The time vector
    for qt=1:1:size(N_disp_mat,3) %Loop over time increments
        DN_magnitude=sqrt(sum(N_disp_mat(:,:,qt).^2,2)); %Current displacement magnitude

        %Set entries in animation structure
        animStruct.Handles{qt}=[hp hp]; %Handles of objects to animate
        animStruct.Props{qt}={'Vertices','CData'}; %Properties of objects to animate
        animStruct.Set{qt}={V_DEF(:,:,qt),DN_magnitude}; %Property values for to set in order to animate
    end
    anim8(hf,animStruct); %Initiate animation feature
    drawnow;

Importing element stress from a log file

    dataStruct=importFEBio_logfile(fullfile(savePath,febioLogFileName_stress),1,1);

    %Access data
    E_stress_mat=dataStruct.data;

    E_stress_mat(isnan(E_stress_mat))=0;

Plotting the simulated results using anim8 to visualize and animate deformations

    [CV]=faceToVertexMeasure(E,V,E_stress_mat(:,:,end));

    % Create basic view and store graphics handle to initiate animation
    hf=cFigure; %Open figure
    gtitle([febioFebFileNamePart,': Press play to animate']);
    title('$\sigma_{1}$ [MPa]','Interpreter','Latex')
    hp=gpatch(Fb,V_DEF(:,:,end),CV,'k',1); %Add graphics object to animate
    hp.Marker='.';
    hp.MarkerSize=markerSize2;
    hp.FaceColor='interp';

    axisGeom(gca,fontSize);
    colormap(gjet(250)); colorbar;
    caxis([min(E_stress_mat(:)) max(E_stress_mat(:))]/3);
    axis(axisLim(V_DEF)); %Set axis limits statically
    camlight headlight;

    % Set up animation features
    animStruct.Time=timeVec; %The time vector
    for qt=1:1:size(N_disp_mat,3) %Loop over time increments

        [CV]=faceToVertexMeasure(E,V,E_stress_mat(:,:,qt));

        %Set entries in animation structure
        animStruct.Handles{qt}=[hp hp]; %Handles of objects to animate
        animStruct.Props{qt}={'Vertices','CData'}; %Properties of objects to animate
        animStruct.Set{qt}={V_DEF(:,:,qt),CV}; %Property values for to set in order to animate
    end
    anim8(hf,animStruct); %Initiate animation feature
    drawnow;
end

GIBBON www.gibboncode.org

Kevin Mattheus Moerman, gibbon.toolbox@gmail.com

GIBBON footer text

License: https://github.com/gibbonCode/GIBBON/blob/master/LICENSE

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

Copyright (C) 2006-2020 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 http://www.gnu.org/licenses/.