Marine systems simulation
Setup developer environment

If your intention is to create new models in FhSim, you have come to the right place! If, however, you only want to run pre-existing models without doing programming whatsoever, please consider installing FhSim using an installer instead.


You will need recent versions of the following tools:

  • conan, which is a python-based package manager for C/C++ projects.
  • A functional C++ development environment, with a fairly recent compiler, gcc >= 8 or msvc++ >= 14.1.
  • CMake build system generator.
  • git version control system.
  • doxygen documentation generator.

Make sure these tools are installed before you continue.

Add the sintef-public remote conan:

conan remote add sintef-public
conan config set general.revisions_enabled=1

Setup a conan profile:

conan profile new --detect default
# gcc only:
conan profile update settings.compiler.libcxx=libstdc++11 default

You will also need to acquire a license file, please contact or your SINTEF liaison.

Update doc when FhSim license issuer service is operational.

Getting started

Suppose you are working on a project fhsim_awesome, which is a SimObject library that depends on FhSim. In case you do not have access to such a project, create one with SimObject template tool.

Typical commands to build a project with FhSim visualization enabled is

cd fhsim_awesome
mkdir build && cd build
conan install .. -s build_type=Release -o fhsim:with_visualization=True --build missing
conan build ..

The install command above should have installed the FhSim executables and dependencies to the build/playpen directory. Once your project is built, its SimObject library is located in build/playpen/bin/SimObjectLibraries. When running FhSim executables, it is practical to use build/playpen/bin as working directory. The license file can either be put in this folder, or stored elsewhere and pointed to by the environmental variable SFH_LICENSE_FILE.

Suppose there exist an input file in fhsim_awesome/examples/input/Example.xml. You can run this with FhSim as follows:

cd fhsim_awesome/build/playpen/bin
FhVis ../../../examples/input/Example.xml

If this works you are ready to proceed by creating your own SimObjects, see Create a SimObject or its library.