Exercise | Error messages | Details
As of version 2.9 (2019 Apr 25) the source licence became truly free/libre and open source, although the downloadable binaries have a more restrictive licence. You will need to register in order to download.
The first official release of the new FEBio Studio took place on 2020 Aug 27 for Linux and Mac OSX and on 2020 Sep 1 for MS Windows. It includes preprocessing and postprocessing as well as the FEBio solver itself.
The downloads include good manuals in the doc
directory.
In addition, the FEBio
Knowledgebase
contains download and installation instructions
(‘Getting Started’);
tutorials that serve as useful introductions to the programme;
the manuals; and more.
In addition, the
support forums are quite responsive.
To install FEBio Studio under MS Windows,
download and save the .zip
file; double-click on it to open it, and then double-click on
the .exe
file that it contains. Follow the steps
to complete the installation.
If FEBio complains about missing DLL’s,
see this
forum link;
at
vs/older-downloads, under
,
download
Microsoft Visual C++ Redistributable for Visual Studio 2017.
To install FEBio Studio under Linux,
download the .run
file;
open a terminal window;
use cd
to get into the directory where the .run
file was saved;
use chmod +x
to make
the .run
file executable;
and then run it
by doing ./FEBioStudio_…_installer.run
where ‘_…_
’ depends on the version
that you’re installing.
If you're using Linux as a guest under VirtualBox
or similar software,
I recommend that you install FEBio Studio under your host
operating system rather than under Linux.
Old versions of the separate FEBio, PreView and PostView software
can be downloaded from the
FEBio archive page.
To install the software, open the .zip
file for each package, extract and save the executable installer,
and run it.
To install an old FEBio under Linux
(because you have trouble with the latest version),
download febio_lnx64_2.9.1.zip
, for example, and save
it in Downloads/FEBio/
under your home directory.
Double-click on the .zip
file and extract its contents
(e.g., FEBio-2.9.1-linux-x64-installer.run
).
In a command window, do
cd ~/Downloads/FEBio
chmod u+x FEBio-2.9.1-linux-x64-installer.run
./FEBio-2.9.1-linux-x64-installer.run
Do the installation. Assuming that you accepted the default
installation directory, and that your .feb
file
is test.feb
in directory ~/whatever/
,
then to run your model give the commands
cd ~/whatever
~/FEBio-2.9.1/bin/febio2 test.feb
The parts of the instructions here that were written for the old PreView and PostView are in grey. Some or all of them may still be relevant.
Release notes:
Versions of format for .feb
files:
In at least one case
(whether or not to create separate .dat
files for
each time step),
recent versions of FEBio use behaviour specified
for version 2.5 of the format even if the .feb
file uses
version 2.0.
If your computer has multiple processors (cores),
an environment variable can be set to specify how many
to use. For example, using the bash shell under Linux, do
export OMP_NUM_THREADS=n
. See the manual for
details. An alternative wording in a
forum post (2018 Apr 25) says that the linear solver
automatically uses the maximum number of threads available;
the OMP_NUM_THREADS
environment variable applies only to
matrix assembly, and requesting more threads may slow down the matrix
assembly for small models.
There are some issues with PreView 2.1. One student experienced
bizarre behaviour under Windows 10: the PreView window was completely
white but dropdown menus would appear when he hovered in the right
place.
Separately, I found that (1) Preview installed itself
as PreView2.exe
but in the Start Menu it pointed
to PreView.exe
; and (2) when I run it on a 1366×768
screen, the window is too tall to fit on the screen and the height
can't be adjusted.
FEBio 2.7 implements some new features in the plot file that are only supported since PostView 2.2’ (ref) but as of 2018 Sep 10 there is no PostView 2.2 for Linux. A workaround is to use FEBio 2.5.
Download and install FEBio Studio. At the FEBio Knowledgebase, under , do the three tutorials:
Before starting the tutorials, you should read at least Chapters 1 and 2 of the FEBio Studio User’s Manual. The notes below may also be useful.
In the section heading
‘Running an FEBio Simulation in PreView’, ‘PreView’
means FEBio Studio.
The instructions in this section are out of date.
In step 1, when it says
‘Open the PreView file …’, it is referring to the
model created in the first tutorial. You must have already saved it as an
FEBio Studio model (.fsm
) file.
do
or left-click on the icon.
In the dialogue window that opens up, for the sake of this tutorial
you can probably just accept all of the default settings.
Click on .
Watch the output go by and wait for FEBio to finish. Hopefully
at the end there will be a message saying
NORMAL TERMINATION
.
A file called filename.xplt
should have
been created.
You will be asked if you wish to load the results –
click on .
The following notes in grey in this section are probably not useful if you’re using FEBio Studio.
alias
in order to be able to run FEBio from whatever directory
your model file is in.
Debian GNU/Linux uses the bash
shell by default so the alias
command includes an
equal sign:alias febio='/path/to/febio/executable/'
PATH
environment variable (the list of
locations searched when you give a command). However, this seems
to only be done the first time you installed FEBio.
This means that, if you're not careful,
you might end up running the first-installed version even after you
install another version.
It's important to confirm what version
you're actually running by checking the version number
displayed in FEBio's output.
With a symbolic link.
An alternative to either relying on the PATH
or
creating an alias
is to create a ‘symbolic link’.
The following procedure for doing so uses the command line
in a terminal window:
mkdir
command to
make a bin
subdirectory:mkdir bin
bin
directory (if it exists) will automatically appear first
in your PATH
and will therefore
be the first place the operating
system looks when you give a command.
cd
command to change
into that subdirectory:cd bin
ln -s
command to
create a symbolic link febio
that points to where
the FEBio executable is. The details depend on the version of
FEBio. An example is the following:ln -s ~/Downloads/FEBio/febio_lnx64_centos_2.5.2.8980/febio-2.5.2/bin/febio2.lnx64 febio
cd
to the directory
where your .feb
file is and give the commandfebio filename.feb
(replacing
filename
by the actual file name.
febio>
prompt into ~/.xsession-errors
and fills up the disk
(ref).
PATH
environment variable.
(Some versions of the installer adjust the PATH for you.)
For Windows 8, the place for setting the environment variable is
found by doing
For Windows 10,
.
Alternative methods of running FEBio have disadvantages, such as
involving more typing or not immediately displaying error messages.
Don’t try putting the .feb
file in the directory
where the FEBio
executable file has been installed – by default FEBio won't be able to write
its results into that directory, and it’s a bad idea anyways
to mix software and data.
If you have trouble accessing the manual using the
entry, check that it specifies the correct file name; one version of the installer for version 2.3 specified 2.0 in the name of the manual.Note that for FEBio version 2:
PATH
is something like
C:\Program Files\febio-2.3.1\bin
, not
C:/Program Files/FEBio/
as shown in the manual.
febio2
or febio2x64
,
not febio
as shown in the manual.
You need to invoke a new Command Prompt in MS Windows for the
revised PATH
to take effect.
cd
command to
get into the directory where
you stored the model that you created in PreView.
febio2 -i filename.feb
~/bin/febio2 -i filename.feb
bin
directory.
For ‘Opening the Simulation Output’: After clicking on
to say you wish to load the results, you will immediately see the post-processing interface, effectively skipping this section.For ‘Viewing the Model’s Animation’: The icon for the time dialogue box is now a clock face, not a check mark; it is just to the right of the animation toolbar.
For ‘Visualizing Data with the Color Map’:
The icon with concentric circles may not be greyed out to start with.
Look for the name of an .xplt
file in the
section at the left of the interface,
rather than job1 in a tab.
filename.xplt
.
Scale factor
for the Displacement Map
,
or, if appropriate, adjust the material properties and loads
in your model.
.log
file with the same name as
your .feb
file.
This model does not define any output variables.
Do you wish to continue?
Negative jacobian
error messages like the
following, saying that the model initialization failed,
it may mean that some or all of your elements are
numbered backward. If your model was generated using
Fie, it may mean that some lines were
traced clockwise instead of counterclockwise.
**************************** E R R O R **************************** Negative jacobian detected at integration point 1 of element 1 Jacobian = -320903 Did you use the right node numbering? Nodes:619,685,1141,1091 ******************************************************************* FATAL ERROR: Model initialization failed
Negative jacobian
messages like
the following, it means that FEBio successfully ran your
simulation for a while and then failed.
************************************************************************* * ERROR * * * * Negative jacobian was detected at element 1231 at gauss point 1 * * jacobian = -0.346871 * * * ************************************************************************* ------- failed to converge at time : 0.911313 Max. nr of retries reached. 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 .................... : 20
E R R O R T E R M I N A T I O NIt should normally run all the way to t=1. In this case it completed 20 time steps and then failed at t≈0.9. This may mean that your deformations have become so large that some elements have become too distorted to be able to continue. You could try reducing the pressure or force loads.
Negative jacobian
messages like those above
but the number of time steps completed is equal to zero,
it may mean that one of the following has occurred:
************************************************************************* * WARNING * * * * Max nr of iterations reached. * * Stiffness matrix will now be reformed. * ************************************************************************* Reforming stiffness matrix: reformation #15 ************************************************************************* * ERROR * * * * Max nr of reformations reached. * ************************************************************************* ------- failed to converge at time : 0.0015625 Max. nr of retries reached. 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 .................... : 0
E R R O R T E R M I N A T I O N
unrecognized tag "LoadData"
has been known to occur because no pressure data were found.
This section summarizes some information from the FEBio documentation and source code.
FEBio's ‘elastic solid’ materials are all ‘hyperelastic’ (defined in terms of strain-energy functions) and are divided into two groups:
laugon
to turn the method on and atol
to specify a tolerance).
In Section 7.8.2, it is stated that incompressibility
‘is usually enforced using a penalty formulation
(although an augmented Lagrangian method is also available)’.
coupled
when there is also an uncoupled version.
Defining a discrete damper in FEBio is painful. The dampers are known as ‘rigid dampers’, which is a perverse way of saying that they must be connected at both ends to rigid bodies. The following is a first attempt to explain it to myself.
Suppose you want to connect a damper between node number 101 on your model and node number 102 somewhere in space away from the model. For each of the two nodes, define a ‘rigid material’ that in turn defines a rigid body:
<Material> <material id="14" name="node 101" type="rigid body"> <density>1</density> <center_of_mass>x101, y101, z101</center_of_mass> </material> <material id="15" name="node 102" type="rigid body"> <density>1</density> <center_of_mass>x102, y102, z102</center_of_mass> </material> </Material>Each rigid body here is actually just a point mass and the x, y and z coordinates of its centre of mass correspond to the coordinates of the associated node.
The ‘rigid body’ located on your model must be connected to the model by defining a contact:
<Contact> <contact type="rigid" name="damperContact"> <node id="101" rb="14"></node> </contact> </Contact>
The rigid body at the other end of the damper is fixed in space using a constraint, with the rigid body referred to by the name of its material:
<Constraints> <rigid_body mat="15"> <fixed bc="x"/> <fixed bc="y"/> <fixed bc="z"/> <fixed bc="Rx"/> <fixed bc="Ry"/> <fixed bc="Rz"/> </rigid_body> </Constraints>
Finally, the damper itself is created between the two rigid bodies with the damping coefficient c (in units of force per velocity):
<Constraints> <constraint type="rigid damper" name="RigidDamper01"> <body_a>14</body_a> <body_b>15</body_b> <c>c</c> <insertion_a>x101, y101, z101</insertion_a> <insertion_b>x102, y102, z102</insertion_b> </constraint> </Constraints>
It is necessary to set the flag <check_zero_diagonal>
to false
(ref).
See Free Format Input ► Control Section ►
Time Stepper Parameters
in the User’s Manual.
In version 3.3.2 (2021 Apr 4) a new-time control parameter was added,
dtforce
,
which forces the time stepper to use the maximum time step.
Pseudocode based on FETimeStepController.cpp
:
//! If the previous time step was able to converge in less than //! opt_iter iterations the step size is increased, else it //! is decreased. if(niter > 0) { scale = sqrt(opt_iter/niter) if(scale >= 1) { //if niter <= opt_iter dtn = dtn + (dtmax - dtn)*MIN(.20, scale - 1); dtn = MIN(dtn, 5.0*m_dtp); dtn = MIN(dtn, dtmax); } else { dtn = dtn - (dtn - m_dtmin)*(1 - scale); dtn = MAX(dtn, m_dtmin); dtn = MIN(dtn, dtmax); } }
opt_iter
is initialized to 11, not 10.
if (nretries == 0) ddt = dt / (max_retries + 1) //first time if (aggressiveness == 0) { dtn = dt - ddt } //default method else { dtn = dt*0.5 }
In FESolidSolver2.cpp
the following default
Newmark-integration parameter values are defined, corresponding
to the trapezoidal (or midpoint) rule:
ρ∞ = −2 α = αf = 1.0 αm = 1.0 β = 0.25 γ = 0.5
Later there is the following logic, which does not seem to be documented:
if (ρ∞ = −1) //Euler integration α = αf = αm = 1.0 β = 0.25(1 + αm − αf)2 γ = 0.5 + αm − αf else if (0 ≤ ρ∞ ≤ 1) //Generalized-α integration α = αf = 1/(1 + ρ∞) αm = (2−ρ∞)/(1+ρ∞) β = 0.25(1 + αm − αf)2 γ = 0.5 + αm − αf else //use the user-defined α, β & γ αf = αm = αuser β = βuser γ = γuser
For ρ∞ = 0 (heaviest numerical damping): α = αf = 1, αm = 2, β = 1, γ = 1.5.
For ρ∞ = 1 (lightest numerical damping): α = αf = 0.5, αm = 0.5, β = 0.25, γ = 0.5.