rel2true_speed(2, 20, 0)18.0
Equations in this section are the equivalent to the equations in appendix E of ITTC. However, mostly the functions here are a wrapper over the functions found in the trig module
Remember that windspeed is ALWAYS positive, the direction tells you if it is helping or hindering the ship. Negative wind speeds are positive windspeeds rotated \(180^\circ\).
Understanding wind directions and speeds, aswell as their conversion into relative and true forms can be confusing, the below figures aim to clarify how this works
The two functions in this section convert relative wind speed and direction to thier True equivalents.
Calculating true windspeed from relative windspeed and direction
\[V_\textrm{WR} = \sqrt{V_{WR}^2 + V_G^2 - 2V_{WR} V_G \cos(\psi_{WR})}\]
ITTC equations: E-2
rel2true_speed (relative_windspeed:float, sog:float, relative_wind_direction:float)
converts a relative wind speed and direction to a true wind speed
| Type | Details | |
|---|---|---|
| relative_windspeed | float | speed of wind relative to ship |
| sog | float | speed over ground |
| relative_wind_direction | float | wind direction relative to ship |
| Returns | float | True windspeed |
If the wind is blowing has a relative angle of 0, (meaning the wind is blowing from the bow to the stern) and has a relative windspeed of 2 knots, then the true windspeed can be calculated as
Conversely if the wind is blowing from stern to bow this means the true windspeed is 22
However if the relative angle is \(-45^\circ\) then the true windspeed is
Remember that windspeed is ALWAYS positive, the direction tells you if it is helping or hindering the ship
How to calculate the true direction from the relative direction.
$$ _ = ( )
$$
ITTC equations: E-3
rel2true_dir (relative_wind_speed:float, sog:float, relative_wind_direction:float, vessel_heading:float, constrain_to_positive:bool=True)
converts relative wind direction to true wind direction
| Type | Default | Details | |
|---|---|---|---|
| relative_wind_speed | float | Speed of the wind relative to the ship | |
| sog | float | Speed of the ship overground | |
| relative_wind_direction | float | direction of wind in radians relative to the ship | |
| vessel_heading | float | The direction of the ship through the water | |
| constrain_to_positive | bool | True | Should the function return a value between 0 and 2 pi |
| Returns | float | the true wind directionangle relative to north in radians. |
Considering a ship where the relative wind direction is 0, the relative windspeed is 2, and the ships heading is \(45^\circ\) or \(\frac{\pi}{2}\), then the true wind speed is
Although by default the wind direction is constrained to return only positive values between \(0\) and \(2\pi\), values between \(-\frac{\pi}{2}\) and \(\frac{\pi}{2}\), can be created using constrain_to_positive = False
Calculating relative wind speed from true wind speed and direction as shown in the equation below
\[V_\textrm{WR} = \sqrt{V_{TW}^2 + V_G^2 + 2V_{TW} V_G \cos(\psi_{WT} - \psi)}\]
ITTC equations: E-7, E-10
true2rel_speed (true_wind_speed:float, sog:float, true_wind_direction:float, vessel_heading:float)
converts true windspeed to relative
| Type | Details | |
|---|---|---|
| true_wind_speed | float | The windspeed over ground |
| sog | float | Speed over ground of the vessel |
| true_wind_direction | float | Direction of wind relative to north |
| vessel_heading | float | Direction of vessel in water relative to north |
| Returns | float | returns relative windspeed using the same units entered |
As an example consider a ship travelling at 20 knots with a direction due north. The wind blows due north with a speed of 22 knots
Caclulating relative windspeed from true windspeed and direction
\[\psi_\textrm{WR} = \text{arctan2}\left( \frac{ V_\textrm{WT} \textrm{sin}(\psi_\textrm{WT} - \psi)}{ V_\textrm{G} + V_\textrm{WT} \textrm{cos}(\psi_\textrm{WT} - \psi)} \right)\]
ITTC equations: E-6, E-9
true2rel_dir (true_wind_speed:float, sog:float, true_wind_direction:float, vessel_heading:float, constrain_to_positive:bool=True)
converts true direction speed to relative
| Type | Default | Details | |
|---|---|---|---|
| true_wind_speed | float | The windspeed over ground | |
| sog | float | Speed over ground of the vessel | |
| true_wind_direction | float | Direction of wind relative to north | |
| vessel_heading | float | Direction of vessel in water relative to north | |
| constrain_to_positive | bool | True | Should the function return a value between 0 and 2 pi |
| Returns | float | relative wind direction |
We can see that if a ship is heading due north and the true windspeed is also due east. When the ship is at 20 knots and the wind is at 22 knots, the relative direction of the wind is as below
If the wind direction is due west, the relative wind direction is the negative of the previous value
Unless of course ‘constrain_to_positive’ is set to true
The ITTC method proposes taking the average windspeed across a double run to average for errors in readings This function is a wrapper round the ‘combine_vectors’ function from the trig module. \[c \; \text{cos}(\gamma) = a \; \text{cos}(\alpha) + b \; \text{cos}(\beta), \] \[c \; \text{sin}(\gamma) = a \; \text{sin}(\alpha) + b \; \text{sin}(\beta), \]
\[c = \sqrt{(\frac{c \; \text{cos}(\gamma)^2 + c \; \text{sin}(\gamma)^2}{2})} \]
\[\gamma = \text{arctan2} \left( \frac{c \; \text{cos}(\gamma)}{c \; \text{sin}(\gamma)} \right)\]
Where \(a\) and \(b\) are the true windspeeds of two paired runs and \(\alpha\) and \(\beta\) are there true direction.
The function takes the magnitude and angle of two vectors and outputs the magnitude and angle of the resultant vector.
One can question whether this approach makes physical sense under certain conditions, the user should consider what is happening in the test and consult the reasoning of the ITTC for further details.
ITTC equations: E-4, E-5
double_run_average (a, b, alpha, beta)
In the example below on the first run a ship is faced with a wind of 13m/s blowing from the north, whilst on the second run the wind has dropped to 5m/s and is coming from the east. The function calculates the mean wind speed across both runs.
Adjusts the windspeed taking into account the height of the anemometer on the ship relative to the reference height for windspeed
\[V_\textrm{WTref} = V_\textrm{WT} \left( \frac{Z_\textrm{ref}}{Z_a} \right)^\frac{1}{9}\]
ITTC equations: E-8
vertical_position_anemometer (true_wind_speed:float, reference_height:float, measured_height:float)
Adjusts the windspeed taking into account the height of the anemometer on the ship relative to the reference height for windspeed
| Type | Details | |
|---|---|---|
| true_wind_speed | float | True windspeed [m/s] |
| reference_height | float | reference height [m] |
| measured_height | float | measured height [m] |
| Returns | float | The true windspeed corrected for measurement height |
The adjusted wind speed differences are often small but the corrections can still influence the final result