Marine systems simulation
2 Installation and setup

There are two main approaches for installing FhSim:

  1. An installer application for end-user consumption;
  2. Using conan package manager for development installation.

This page explains Option 1; see Setup developer environment for Option 2.


You will need the FhSim installer and a license file to get started. These can be found here (expand the fhsim branch). Download the licence file license.lic and the installer variant applicable to your platform. We currently support recent versions of Windows and Linux (Debian/Ubuntu). To acquire a license file with longer duration, please contact karlr.nosp@m.@sin.nosp@m.tef.n.nosp@m.o or your SINTEF liaison.

Update doc when FhSim license issuer service is operational.

FhSim installation

The most convenient way of running the installer is using its graphical interface; simply run the installer executable. It is possible to run the installer in a terminal environment, see <installer name> --help for instructions on headless installation. On Linux, you might have to make the installation script executable.

The license file can either be put in the FhSim bin folder, or set by the environmental variable SFH_LICENSE_FILE. Note that the binary directory of the FhSim installation is not added to PATH. If the SFH_LICENSE_FILE environmental variable is not set, the bin folder (containing a valid license file) must be the working directory when running FhSim.

FhSim with visualization is intended for a graphical environment. If you install in a pure terminal environment, there may be missing system packages. On Linux, this includes X11 and Open GL packages. Note: FhVis needs a running X11 server on Linux.

There are four main executable programs available with FhSim: FhSim, FhVis, FhRtSim, FhRtVis, see table below. Some sample input files are kept in the examples/input sub-directory. Note that you will usually either have access to i) FhSim and FhRtSim, or, ii) FhVis and FhRtVis.

Executable Description
FhSim FhSim, no visualization
FhVis FhSim, with visualization
FhRtSim FhSim, with real time requirements, no visualization
FhRtVis FhSim, with visualization and real time requirements
If you are using a virtual machine, FhSim with visualization might not work if OpenGL 3+ is not supported. In this case, consider using FhSim without visualization or on a physical machine that supports OpenGL version >=3.

Linux specifics

For Ubuntu >=20 and Debian >=11 you may need to install libgl1:

sudo apt install libgl1

and, libxcb-xinerama0:

sudo apt install libxcb-xinerama0

Running FhSim executables

Suppose FhSim is installed to /home/john/fhsim-playpen or C:\Users\john\fhsim-playpen. Navigate to this directory and go the bin sub-directory. In the following we use Windows as example. Linux is similar, only that executables in a folder is run with ./ prefix.

FhSim --help

A help message for FhSim should appear.

Run FhSim without visualization
In a command window from the binary directory run
FhSim --input-file <input_file>
This runs the standard FhSim executable without visualization.
Run FhSim with visualization
In a command window from the binary directory run
FhVis --input-file <input_file>
This runs the standard FhSim executable with visualization. If this is the first time the visualization is run, you will get a dialog asking for visualization options. Choose one of the available rendering systems. It is recommended to set Full screen = No.
If you want to change the visualization settings later you need to delete ogre.cfg, which is located in the resources folder of your FhSim installation. The visualization settings can also be changed by manually editing ogre.cfg.