FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
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.

Prerequisites

You will need the FhSim installer and a license file to get started. These can be found here. To acquire a license file, please contact your SINTEF liaison or the FhSim team via the project's issue tracker.

For license access/support, contact your organization FhSim administrator or licensing contact.

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.

You can provide a license either by setting SFH_LICENSE_FILE to a valid file path, or by placing a file named license.lic in the current working directory (for example the FhSim bin folder). Note that the binary directory of the FhSim installation is not added to PATH automatically.

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

FhSim executables

The table below is the authoritative list of the programs installed in the bin directory. Some sample input files are kept in the examples/input sub-directory.

Executable Visualization build only Description
FhSim No Runs a scenario without visualization.
FhVis Yes Runs a scenario with Ogre3D visualization (-s real-time pacing, -r, --fps).
FhSimUI Yes SDL2/ImGui front end: same scenarios, plus an interactive file browser and diagnostic overlays. See FhSimUI — the interactive front end.
fhsim_plot No Bakes a results CSV (or a diagnostics JSON) into a browser viewer and opens it.
FhFmuExport No Exports a scenario as an FMU. See FMU tools.
Note
There is no separate real-time executable. Real time is a pacing mode of the existing programs — see Real-time pacing.
Which of these you have access to depends on your license and on whether your package was built with visualization: FhVis and FhSimUI are present in visualization builds only. In a Debug build the names carry a _d suffix (FhSim_d, FhVis_d, FhSimUI_d, fhsim_plot_d).
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 to the bin sub-directory. In the following we use Windows as example. Linux is similar, only that executables in a folder are 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.
Note
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.