16  Tutorial 04 - Non-dimensionalization and Linearization

Question 1

A ship has the following non-dimensional parameters:

\(m' = 0.022\), \(Y_v' = -0.15\), \(Y_{\dot{v}}' = -0.010\), \(Y_r' = 0.02\),

\(Y_{\dot{r}}' = -0.0005\), \(N_v' = -0.008\), \(N_{\dot{v}}' = -0.0005\), \(N_r' = -0.04\),

\(N_{\dot{r}}' = -0.002\), \(Y_{\delta}' = 0.02\), \(N_{\delta}' = -0.01\), \(I_z' = 0.002\)

At \(t' = 0\), the ship has \(v' = 0.05\) and \(r' = 0.02\). Calculate the initial non-dimensional accelerations \(\dot{v}'\) and \(\dot{r}'\) when \(\delta = 5^\circ\) (assuming no other external forces and that the BCS origin is at the center of gravity).

Question 2

A ship with \(N_{\delta}' = -0.0002\) is applying a rudder of \(10^\circ\). Given:

  • Length \(L = 160\) m
  • Speed \(U = 8\) m/s
  • \(\rho = 1025\) kg/m³

Calculate:

  • The dimensional yaw moment \(N\) in kN·m due to the rudder alone
  • The yaw moment from the rudder in kN·m at the same rudder angle if speed increases to \(12\) m/s
  • The required rudder angle to maintain the same yaw moment as seen at \(U = 8\) m/s at \(U = 12\) m/s

Question 3

Consider the following nonlinear equation:

\(\dot{x} = -x^2 + \cos(x) + u\)

where \(u\) is a control input. Linearize this equation about the equilibrium point \(x_e = \frac{\pi}{2}\), \(u_e = 5\) using Taylor series expansion. Note that the new linearized differential equation will still be in terms of \(x\) and \(u\)

Question 4

Convert the following dimensional hydrodynamic derivatives to non-dimensional form given \(L = 150\) m, \(U = 10\) m/s, \(\rho = 1025\) kg/m³:

  • \(Y_v = -2.5 \times 10^5\) N·s/m
  • \(N_r = -8.0 \times 10^7\) N·m·s
  • \(Y_{\delta} = 4.2 \times 10^5\) N

Solution 1

A ship has the following non-dimensional parameters:

\(m' = 0.022\), \(Y_v' = -0.15\), \(Y_{\dot{v}}' = -0.010\), \(Y_r' = 0.02\),

\(Y_{\dot{r}}' = -0.0005\), \(N_v' = -0.008\), \(N_{\dot{v}}' = -0.0005\), \(N_r' = -0.04\),

\(N_{\dot{r}}' = -0.002\), \(Y_{\delta}' = 0.02\), \(N_{\delta}' = -0.01\), \(I_z' = 0.002\)

At \(t' = 0\), the ship has \(v' = 0.05\) and \(r' = 0.02\). Calculate the initial non-dimensional accelerations \(\dot{v}'\) and \(\dot{r}'\) when \(\delta = 5^\circ\) (assuming no other external forces and that the BCS origin is at the center of gravity).

Code
import numpy as np

def solve_problem1():
    m_prime = 0.022
    Y_v_prime = -0.15
    Y_dot_v_prime = -0.010
    Y_r_prime = 0.02
    Y_dot_r_prime = -0.0005
    N_v_prime = -0.008
    N_dot_v_prime = -0.0005
    N_r_prime = -0.04
    N_dot_r_prime = -0.002
    Y_delta_prime = 0.02
    N_delta_prime = -0.01
    delta = 5 * np.pi / 180
    I_z_prime = 0.002
    v_prime = 0.05
    r_prime = 0.02

    M_mat = np.array([
        [m_prime - Y_dot_v_prime, -Y_dot_r_prime], 
        [-N_dot_v_prime, I_z_prime - N_dot_r_prime]
    ])
    f_vec = np.array([
        Y_v_prime * v_prime + (Y_r_prime - m_prime) * r_prime + Y_delta_prime * delta, 
        N_v_prime * v_prime + N_r_prime * r_prime + N_delta_prime * delta
    ])
    sol = np.linalg.solve(M_mat, f_vec)
    print(f"The initial non-dimensional accelerations in sway is {sol[0]:.4f} and in yaw is {sol[1]:.4f}\n")

solve_problem1()
The initial non-dimensional accelerations in sway is -0.1733 and in yaw is -0.4965

Solution 2

A ship with \(N_{\delta}' = -0.0002\) is applying a rudder of \(10^\circ\). Given:

  • Length \(L = 160\) m
  • Speed \(U = 8\) m/s
  • \(\rho = 1025\) kg/m³

Calculate:

  • The dimensional yaw moment \(N\) in kN·m due to the rudder alone
  • The yaw moment from the rudder in kN·m at the same rudder angle if speed increases to \(12\) m/s
  • The required rudder angle to maintain the same yaw moment as seen at \(U = 8\) m/s at \(U = 12\) m/s
Code
import numpy as np

def solve_problem2():
    L = 160
    U = 8
    U_new = 12
    rho = 1025
    N_delta_prime = -0.0002
    delta = 10 * np.pi / 180
    
    N = N_delta_prime * 0.5 * rho * L**3 * U**2 * delta    
    
    N_new = N_delta_prime * 0.5 * rho * L**3 * U_new**2 * delta
    
    delta_new = N / (N_delta_prime * 0.5 * rho * L**3 * U_new**2) * 180 / np.pi
    
    print(f"The dimensional yaw moment is {N * 1e-3:.2f} kN·m\n")
    print(f"The yaw moment at {U_new} m/s is {N_new * 1e-3:.2f} kN·m\n")
    print(f"The required rudder angle to maintain the same yaw moment at U = {U_new} m/s is {delta_new:.2f} degrees\n")

solve_problem2()
The dimensional yaw moment is -4689.66 kN·m

The yaw moment at 12 m/s is -10551.73 kN·m

The required rudder angle to maintain the same yaw moment at U = 12 m/s is 4.44 degrees

Solution 3

Consider the following nonlinear equation:

\(\dot{x} = -x^2 + \cos(x) + u\)

where \(u\) is a control input. Linearize this equation about the equilibrium point \(x_e = \frac{\pi}{2}\), \(u_e = 5\) using Taylor series expansion. Note that the new linearized differential equation will still be in terms of \(x\) and \(u\)

Code
import numpy as np

def solve_problem3():
    # f(x, u): -x**2 + cos(x) + u   
    x_e = np.pi/2
    u_e = 5
    
    f = -x_e**2 + np.cos(x_e) + u_e
    df_dx = -2*x_e - np.sin(x_e)
    df_du = 1
    
    print(f"The linearized equation is given by:\n")
    print(f"\\dot{{x}} = {f - df_dx*x_e - df_du*u_e:.3f} {df_dx:.3f}x + {df_du:.3f}u\n")

solve_problem3()
The linearized equation is given by:

\dot{x} = 4.038 -4.142x + 1.000u

Solution 4

Convert the following dimensional hydrodynamic derivatives to non-dimensional form given \(L = 150\) m, \(U = 10\) m/s, \(\rho = 1025\) kg/m³:

  • \(Y_v = -2.5 \times 10^5\) N·s/m
  • \(N_r = -8.0 \times 10^7\) N·m·s
  • \(Y_{\delta} = 4.2 \times 10^5\) N
Code
import numpy as np

def solve_problem4():
    L = 150
    U = 10
    rho = 1025
    Y_v = -2.5 * 10**5
    N_r = -8.0 * 10**7
    Y_delta = 4.2 * 10**5
    
    Y_v_prime = Y_v / (0.5 * rho * L**2 * U)
    N_r_prime = N_r / (0.5 * rho * L**4 * U)
    Y_delta_prime = Y_delta / (0.5 * rho * L**2 * U**2)
    
    print(f"The non-dimensional parameters are:\n")
    print(f"Y_v' = {Y_v_prime:.6f}\n")
    print(f"N_r' = {N_r_prime:.6f}\n")
    print(f"Y_{{\delta}}' = {Y_delta_prime:.6f}")

solve_problem4()
The non-dimensional parameters are:

Y_v' = -0.002168

N_r' = -0.000031

Y_{\delta}' = 0.000364