netsse.model.ship
=================

.. py:module:: netsse.model.ship

.. autoapi-nested-parse::

   Closed-form expressions of the linear wave-to-motion transfer functions
   for a box-shaped uniformly-loaded **monohull ship**.

   .. dropdown:: Copyright (C) 2023-2026 Technical University of Denmark, R.E.G. Mounet
       :color: primary
       :icon: law

       *This code is part of the NetSSE software.*

       NetSSE is free software: you can redistribute it and/or modify it under
       the terms of the GNU General Public License as published by the Free
       Software Foundation, either version 3 of the License, or (at your
       option) any later version.

       NetSSE is distributed in the hope that it will be useful, but WITHOUT
       ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
       FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
       for more details.

       You should have received a copy of the GNU General Public License along
       with this program.  If not, see https://www.gnu.org/licenses/.

       To credit the author, users are encouraged to use below reference:

       .. code-block:: text

           Mounet, R. E. G., & Nielsen, U. D. NetSSE: An open-source Python package
           for network-based sea state estimation from ships, buoys, and other
           observation platforms (version 2.2). Technical University of Denmark,
           GitLab. February 2026. https://doi.org/10.11583/DTU.26379811.

   *Last updated on 20-02-2026 by R.E.G. Mounet*



Functions
---------

.. autoapisummary::

   netsse.model.ship.heaveCF
   netsse.model.ship.pitchCF
   netsse.model.ship.rollCF


Module Contents
---------------

.. py:function:: heaveCF(om0, beta_deg, U, L, B0, T, C_B=1)

   Computes the heave transfer function amplitude, using the closed-form
   expressions presented in Jensen et al. (2004).

   :param om0: Vector of absolute wave frequencies [rad/s].
   :type om0: array_like of shape (Nom0,)
   :param beta_deg: Vector of heading angles [deg].
   :type beta_deg: array_like of shape (Nbeta,)
   :param U: Vessel forward speed [m/s].
   :type U: float
   :param L: Length of the ship [m].
   :type L: float
   :param B0: Breadth of the ship [m].
   :type B0: float
   :param T: Draft of the ship [m].
   :type T: float
   :param C_B: Block coefficient of the ship [-].
   :type C_B: float, default 1

   :returns: **heave** -- Coefficients of the heave transfer function amplitude [m/m].
   :rtype: numpy.ndarray of shape (Nom0,Nbeta)

   .. seealso:: :py:obj:`pitchCF`, :py:obj:`rollCF`

   .. rubric:: References

   Jensen, J. J., Mansour, A. E., & Olsen, A. S. (2004). Estimation of ship
   motions using closed-form expressions. Ocean Engineering, 31(1), 61–85.
   https://doi.org/10.1016/S0029-8018(03)00108-2

   .. rubric:: Example

   >>> heave = heaveCF(om0,beta_deg,U,L,B0,T,C_B=1)


.. py:function:: pitchCF(om0, beta_deg, U, L, B0, T, C_B=1)

   Computes the pitch transfer function amplitude, using the closed-form
   expressions presented in Jensen et al. (2004).

   :param om0: Vector of absolute wave frequency [rad/s].
   :type om0: array_like of shape (Nom0,)
   :param beta_deg: Vector of heading angle [deg].
   :type beta_deg: array_like of shape (Nbeta,)
   :param U: Vessel forward speed [m/s].
   :type U: float
   :param L: Length of the ship [m].
   :type L: float
   :param B0: Breadth of the ship [m].
   :type B0: float
   :param T: Draft of the ship [m].
   :type T: float
   :param C_B: Block coefficient of the ship [-].
   :type C_B: float, default 1

   :returns: **pitch** -- Coefficients of the pitch transfer function amplitude [rad/m].
   :rtype: numpy.ndarray of shape (Nom0,Nbeta)

   .. seealso:: :py:obj:`heaveCF`, :py:obj:`rollCF`

   .. rubric:: References

   Jensen, J. J., Mansour, A. E., & Olsen, A. S. (2004). Estimation of ship
   motions using closed-form expressions. Ocean Engineering, 31(1), 61–85.
   https://doi.org/10.1016/S0029-8018(03)00108-2

   .. rubric:: Example

   >>> pitch = pitchCF(om0,beta_deg,U,L,B0,T,C_B=1)


.. py:function:: rollCF(om0, beta_deg, U, L, B0, T, C_B, C_WP, GM_T, kappa, mu, T_N=0)

   Computes the roll transfer function amplitude, using the closed-form
   expressions presented in Jensen et al. (2004).

   :param om0: Vector of absolute wave frequencies [rad/s].
   :type om0: array_like of shape (Nom0,)
   :param beta_deg: Vector of heading angles [deg].
   :type beta_deg: array_like of shape (Nbeta,)
   :param U: Vessel forward speed [m/s].
   :type U: float
   :param L: Length of the ship [m].
   :type L: float
   :param B0: Breadth of the ship [m].
   :type B0: float
   :param T: Draft of the ship [m].
   :type T: float
   :param C_B: Block coefficient of the ship [-].
   :type C_B: float
   :param C_WP: Waterplane area coefficient of the ship [-].
   :type C_WP: float
   :param GM_T: Transverse metacentric height [m].
   :type GM_T: float
   :param kappa: Custom parameter (chosen between 0 and ``C_WP``) representing the ratio
                 between the length of the aft beam and the whole ship length in the
                 simplified ship model for roll.
   :type kappa: float
   :param mu: Ratio between added viscous damping and critical damping.
   :type mu: float, default 0
   :param T_N: Roll natural period [s].

               .. note::
                   If not specified as input, ``T_N`` is calculated using empirical
                   formulas from ADA147598.
   :type T_N: float, optional

   :returns: **roll** -- Coefficients of the roll transfer function amplitude [rad/m].
   :rtype: numpy.ndarray of shape (Nom0,Nbeta)

   .. seealso:: :py:obj:`heaveCF`, :py:obj:`pitchCF`

   .. rubric:: References

   1. Jensen, J. J., Mansour, A. E., & Olsen, A. S. (2004). Estimation of ship
      motions using closed-form expressions. Ocean Engineering, 31(1), 61–85.
      https://doi.org/10.1016/S0029-8018(03)00108-2
   2. ADA147598, 1973. Code of Safety for Fishermen and Fishing Vessels.
      Part B. Safety and Health Requirements for the Construction and Equipment
      of Fishing Vessels. Inter-Governmental Maritime Consultative Organization,
      London, England.

   .. rubric:: Example

   >>> roll = rollCF(om0,beta_deg,U,L,B0,T,C_B,C_WP,GM_T,kappa,mu,T_N=0)


