magnitude_of_vector#
- rojak.turbulence.calculations.magnitude_of_vector(x_component, y_component, is_abs=False, is_squared=False)[source]#
Magnitude of vector
Convenience method to calculate magnitude of a 2D vector, i.e. \(\sqrt{x^2 + y^2}\)
- Parameters:
x_component (DataArray) – x-values of vector
y_component (DataArray) – y-values of vector
is_abs (bool) – If
True, the components of vector is absolute (i.e. \(\sqrt{|x|^2 + |y|^2}\). Defaults toFalse.is_squared (bool) – If
True, the components of vector is squared (i.e. \(x^2 + y^2\)). Defaults toFalse.
- Return type: