FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
Introduction

FhSim is a software tool and an API for describing and simulating real world systems. The systems are formulated as ordinary differential equations, and FhSim uses for time-domain integration for the simulation. The integration can be performed by several integration routines. FhSim offers 3D visualization based on the open source rendering engine Ogre3D. A user will typically build a system from several predefined SimObjects, which are sub-models typically modeling a physical system or some characteristics of such a system. The term SimObject is a simplification of "Simulation Object". These SimObjects can be used to compose different systems. Each SimObject is defined through both internal models and external properties, such as input ports, output ports and parameters. Each SimObject also contains its own visualization, making its visualization valid regardless of the rest of the system.

The composition of the system to simulate, as well as controlling how the simulation is to be performed, is defined through XML input files or specialized applications.

FhSim is built especially to satisfy the following conditions:

  • Fast simulations.
  • Possibility to embed in other applications.
  • The ability to debug development using visualization of the system.
  • Relatively few and complex SimObjects
  • The need for SimObjects to query other SimObjects, as well as having access to shared resources (useful e.g. for shared environments).
  • Separate development and usage of submodels. This means that users only needs to know the interface of the SimObjects, and also that SimObjects based on confidential code can be used by others without disclosing the code.
  • Accumulation of project results and knowledge through SimObject libraries.

Existing model libraries

The various FhSim Model libraries collect FhSim models in pre-compiled libraries. Some libraries will be publicly available, some are closed and other have their own licensing terms, see Model libraries.

Overview of central SimObject libraries and their inter-dependencies

How a model is put together

Complex systems are modeled as a set of objects with input ports, output ports and parameters. Each of these objects is referred to as a SimObject, short for simulation object. A SimObject implements its own differential equations. Several SimObjects are connected through their input and output ports. The connections between the different SimObjects are defined through input files and/or xml strings.

The FhSim API is written in C++. The SimObjects are usually also written in C++ and compiled into a loadable shared library (dll or so). It is possible to write SimObjects in other languages, as long as it is possible to compile these into shared libraries or call them from the C language. The model development is, however, in practice usually done in C++, as existing methods make this the simplest choice.

The open source rendering engine Ogre3D is used for the visualization. Ogre3D is built into FhSim, and should not be installed by users of the FhSim libraries. For the basic usage of FhSim only a fundamental understanding of Ogre3D is needed.

For the tools and executables that make up an FhSim installation, see Software overview; for the classes those figures name and what each is responsible for, see how it works internally.

Availability

FhSim is available as open source. The core framework source code is publicly accessible to simplify integration, encourage adoption, and allow users to extend the system as needed. See License and terms of use for license details.