FEBio

Exercise | Error messages | Details

1. Getting the software

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 Other Tools, Frameworks, and Redistributables, 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:

See 3.1.1 Format Specification Versions in the User Manual for details.

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.

1.1 Problems

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.

2. Creating and running a simple model

Download and install FEBio Studio. At the FEBio Knowledgebase, under Tutorials ► Intro to FEBio Studio, 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.

2.1 Preprocessing (creating a model)

2.2 Processing (running a simulation)

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 FEBio ► Run FEBio … or left-click on the Run FEBio 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 Run.

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 Yes.

The following notes in grey in this section are probably not useful if you’re using FEBio Studio.

  1. Follow the instructions in Chapter 2 of the FEBio User’s Manual for setting up FEBio.
  2. Get access to a command line. For example, in MS Windows do Start ► All Programs ► Accessories ► Command Prompt.
  3. At the command line, use the cd command to get into the directory where you stored the model that you created in PreView.
  4. Give the command febio2 -i filename.feb
    or ~/bin/febio2 -i filename.feb
    if you’re using a symbolic link in your bin directory.

2.3 Postprocessing (analyzing simulation output)

For ‘Opening the Simulation Output’: After clicking on Yes 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 Post section at the left of the interface, rather than job1 in a Model tab.

  1. Open the file filename.xplt.
  2. From the dropdown list in the main toolbar, select which quantity you want to display; for example, displacement ► Total displacement
  3. Click on the Play button PostView Play button in the animation toolbar. The animation toolbar, at the far right, may not be immediately visible unless your PostView window is very wide; it can be dragged to a different position.
  4. PostView scale factor If you don’t see any displacements, you can try increasing the Scale factor for the Displacement Map, or, if appropriate, adjust the material properties and loads in your model.
  5. Use the Toggle colormap button PostView Toggle Colormap button to enable or disable the use of a colour map for the quantity being displayed. Several different colour maps are available. The Fire colour map provides strong contrast, a good use of different hues, and an almost monotonic increase of brightness between black and white.

3. Interpreting FEBio error messages

Here are some of the error messages you might get. They’re stored in a .log file with the same name as your .feb file.

4. FEBio details

This section summarizes some information from the FEBio documentation and source code.

4.1 Materials

FEBio's ‘elastic solid’ materials are all ‘hyperelastic’ (defined in terms of strain-energy functions) and are divided into two groups:

4.2 Discrete dampers

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).

4.3 Time-step controller

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:

4.4 Time-domain integration

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.


AudiLab home page
R. Funnell
Last modified: 2023-11-28 12:35:33