#### Hull

A hull slave, as shown in the below figure, needs force-inputs from all relevant units like propulsors, cranes, trawls, etc. and it has to know the point of attack for all these forces so that it can accurately calculate the resulting force, which ultimately leads to hull motion. Additionally, it has to get some information about the environment that it is in. The relevant output from a hull slave is its states: position, velocity and acceleration in 6 degrees of freedom. Solid arrows represent exchange of energy, while dashed arrows represent signals with no energy.

The above figure implies that the hull slave has inputs for all external forces acting upon it, their point of attack and sums them up in order to calculate its equations of motion before publishing its updated states. The above solution is not feasible because it is directly dependent on the number of thrusters, cranes and other external “force-producers”. The hull slave violates our version of the open/closed principle, because in order to extend the system with e.g. more propulsors, you have to modify its implementation! (You have to both add more inputs and include them in the force summation). To fix this we can extract the force summation out of the hull slave and place it in its own function unit between the hull slave and the propulsors, crane, etc. as shown in the figure below.

This gives us a hull slave that adheres to the open/closed principle, because you can change the number of thrusters, cranes and other external force-producers without having to modify it. So, just to emphasize; we want hull slaves to look like the below figure, with the external forces acting in CG and the environmental variables as input, and all the hull states (6-DOF position, velocity and acceleration) as outputs.

#### Propulsion

A propulsor produces thrust, which affects the motion of the hull. A Propulsor is highly prone to thrust losses due to various effects like thruster-thruster interactions which is a thrust loss occurring when you have interference between two or more propulsor jet streams; thruster-hull interactions which typically occurs because the propulsor jet stream experiences friction when traveling along the bottom of the hull, resulting in a net loss of produced thrust; and thruster ventilation losses which is a function of the propulsor submergence and occurs when the propulsor is very close to the surface or out of water. All these different losses are all dependent on factors outside of the propulsor model itself. In order to calculate the ventilation loss, the submergence must be known at every time instant; the thruster-hull loss needs information about the hull shape; and in order to calculate the thruster-thruster interaction losses, every propulsor needs to know about every other propulsor in some way. All losses are calculated using the nominal force produced by the propulsor, while its effective force is used to affect hull motion. One design option for the propulsor slaves, which lets us include loss calculations, is to have information about the hull shape, environment and every other propulsor in all propulsor slaves, but this scales horribly of course. By using experience gained through VeSim, a feasible and flexible solution is to use a Function unit which gathers the information needed to calculate the loss for each individual propulsor and provides each propulsor with their respective thrust loss. The propulsor slaves then use this loss input to calculate its effective force output. The idea is illustrated in the figure below with the use of a new Function unit: Thrust Loss Calculations.

The added Loss Calculations Function unit gets input from each Propulsor and calculates the interaction losses. The Loss Calculations Function unit uses nominal force produced by the propulsor, to calculate a loss which is sent back to the propulsor. The Propulsor uses this loss input to calculate and send an effective force to the External Hull Forces Function unit as well as its point of attack. The Environment block is to illustrate that there exists a slave that will publish information about wind, waves and current which both the Hull and the Loss Calculations Function unit needs. The Submergence output from Loss Calculations to Propulsor, is calculated from information provided by the Environment block and it is added as an output to support Propulsor models that has their own routine(s) for calculating ventilation loss. The line connecting the Hull states as an input to the Environment block is to indicate that if we want a simulation where the weather changes with respect to position, the Environment has to know the vessel position. The Loss Calculations needs the environment in order to accurately calculate the velocity output to the Propulsor slaves. The above figure has also added control inputs for the Propulsor slaves. The rev/torque input/output pair is thought connected to a motor which drives the propulsor and in VeSim it is currently assumed that the Propulsor receives revolutions as an input, so we will adopt that interface here as an example, but it is not strictly necessary to do it this way. The -angle inputs comes from some unit responsible for controlling the Rudder/Azimuth angle and the Pitch angle. This gives us the following model for a propulsor, shown in the below figure

This input/output interface for a propulsor is only suggestive and not every propulsor in a given simulation is required to have the same input/output interface. The important thing is that when you have several propulsion slaves, you have no knowledge of their inner workings and it is not possible for you to modify their inner workings. However, you have full knowledge of everything that the current propulsor model does and can do, since this is documented for each propulsor. The Function units are a point where you have full control, and a place where you can “do whatever you want”. This means that if you connect all relevant inputs and outputs to a Function unit, you find yourself in an environment where you can work with the propulsor signals however you want with full knowledge of what every signal means, does, and can do.