Marine systems simulation
Loading...
Searching...
No Matches
Usage

The main purpose of fhsim_environment is to provide one single, shared source of truth when it comes to the environment which FhSim models interact with. It contains methods for both querying and change this environment. This means that if one SimObject incorporates a change (e.g. a wake field or a transition in sea state), all other SimObjects are affected. They all operate in the same environment, and they don't need to know about each other or share any knowledge about each others implementations.

This codebase contains a collection of SimObjects and classes to this end, as well as some SimObjects for testing (and demonstrating) its abilities. The set of available SimObjects can be found in modules. The most fundamental ones are:

  • EnvironmentProvider is the underlying class which handles all aspects of the environment, such as setting parameters or answering to queries. This is the class most SimObjects will use for environment access.
  • Environment is the SimObject which instantiates and registers the EnvironmentProvider for use by other SimObjects. It is also responsible for its visualisation.
  • SeafloorForcesInterface contains some functions for calculating the contact forces between components and the seafloor.

When the SimObject Environment is created, it creates an instance of EnvironmentProvider and registers it within FhSim for use by other SimObjects. Other SimObjects can then access the environment through the EnvironmentProvider. This enables them to both query the environment and to change it.