Skip to content

Hydrodynamic Coefficients

This module provides dimensionless flow parameters, added mass calculations, force regime classification and preliminary Morison equation applicability screening.

Governing equations

Reynolds number

\[ Re = \frac{U_m D}{\nu} \]

Keulegan-Carpenter number

\[ KC = \frac{U_m T}{D} \]

Oscillatory frequency parameter

\[ \beta = \frac{D^2}{\nu T} \]

For nonzero oscillatory velocity:

\[ \beta = \frac{Re}{KC} \]

Displaced fluid mass

\[ m_f = \rho \frac{\pi D^2}{4} \]

Added mass

\[ m_a = C_A \rho \frac{\pi D^2}{4} \]

Inertia coefficient

\[ C_M = 1 + C_A \]

Drag-to-inertia peak ratio

\[ R = \frac{C_D KC}{\pi^2 C_M} \]

Equal-force KC

\[ KC_{equal} = \frac{\pi^2 C_M}{C_D} \]

Relative surface roughness

\[ \epsilon_r = \frac{k_s}{D} \]

Relative member diameter

\[ \delta = \frac{D}{\lambda} \]

Diffraction parameter

\[ kD = \frac{2\pi D}{\lambda} \]

Example

from fluidmec.hydrodynamics import (
    cylinder_flow_parameters,
    drag_inertia_ratio,
    hydrodynamic_force_regime,
)

re, kc, beta = cylinder_flow_parameters(
    velocity=2.0,
    diameter=4.0,
    period=8.0,
    kinematic_viscosity=1.05e-6,
)

ratio = drag_inertia_ratio(
    kc_number=kc,
    drag_coefficient=1.0,
    inertia_coefficient=2.0,
)

print(re, kc, beta)
print(ratio)
print(hydrodynamic_force_regime(kc))

Engineering assumptions

  • Fixed circular cylindrical members.
  • Sinusoidal oscillatory flow for peak-force comparisons.
  • Prescribed hydrodynamic coefficients.
  • Non-negative added mass coefficient in the conversion model.
  • Consistent SI units.
  • Undisturbed normal fluid velocity.
  • No explicit wake shielding or structural interaction.
  • No automatic empirical coefficient prediction.

The default relative-diameter threshold of 0.2 is a preliminary screening criterion, not a design-code compliance check.

The default force-regime tolerance of 5 percent is a configurable numerical classification convention.

The drag-to-inertia ratio compares individual peak magnitudes rather than simultaneous forces.

Analytical verification

For a cylinder with a diameter of 4 m, peak velocity of 2 m/s, period of 8 s and kinematic viscosity of 1.05e-6 m2/s:

Parameter Expected result
Reynolds number 7.619048e6
KC number 4.000000
Frequency parameter 1.904762e6
Drag/inertia ratio 0.202642
Equal-force KC 19.739209

The force ratio assumes Cd = 1 and Cm = 2.

API reference

fluidmec.hydrodynamics.coefficients

Hydrodynamic coefficients and oscillatory flow parameters.

cylinder_flow_parameters

cylinder_flow_parameters(velocity: ArrayLike, diameter: ArrayLike, period: ArrayLike, kinematic_viscosity: ArrayLike) -> tuple[float | np.ndarray, float | np.ndarray, float | np.ndarray]

Return Reynolds number, KC number and frequency parameter.

Parameters:

Name Type Description Default
velocity array_like

Peak normal fluid speed [m/s].

required
diameter array_like

Cylinder diameter [m].

required
period array_like

Oscillation period [s].

required
kinematic_viscosity array_like

Fluid kinematic viscosity [m^2/s].

required

Returns:

Type Description
tuple

Reynolds number, KC number and beta [-]. Outputs share a common broadcast shape.

Source code in src/fluidmec/hydrodynamics/coefficients.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
def cylinder_flow_parameters(
    velocity: ArrayLike,
    diameter: ArrayLike,
    period: ArrayLike,
    kinematic_viscosity: ArrayLike,
) -> tuple[
    float | np.ndarray,
    float | np.ndarray,
    float | np.ndarray,
]:
    """Return Reynolds number, KC number and frequency parameter.

    Parameters
    ----------
    velocity : array_like
        Peak normal fluid speed [m/s].
    diameter : array_like
        Cylinder diameter [m].
    period : array_like
        Oscillation period [s].
    kinematic_viscosity : array_like
        Fluid kinematic viscosity [m^2/s].

    Returns
    -------
    tuple
        Reynolds number, KC number and beta [-].
        Outputs share a common broadcast shape.
    """
    u = as_float_array(velocity, "velocity")
    d = as_float_array(diameter, "diameter")
    t = as_float_array(period, "period")
    nu = as_float_array(kinematic_viscosity, "kinematic_viscosity")

    validate_non_negative(u, "velocity")
    validate_positive(d, "diameter")
    validate_positive(t, "period")
    validate_positive(nu, "kinematic_viscosity")

    re = reynolds_number(
        velocity=u,
        length=d,
        kinematic_viscosity=nu,
    )

    kc = keulegan_carpenter_number(
        velocity=u,
        period=t,
        length=d,
    )

    beta = oscillatory_frequency_parameter(
        length=d,
        period=t,
        kinematic_viscosity=nu,
    )

    re, kc, beta = np.broadcast_arrays(re, kc, beta)

    return (
        format_output(re),
        format_output(kc),
        format_output(beta),
    )

displaced_mass_per_unit_length

displaced_mass_per_unit_length(diameter: ArrayLike, density: ArrayLike = SEAWATER_DENSITY) -> float | np.ndarray

Calculate displaced fluid mass per unit length [kg/m].

.. math:: m_f = \rho \frac{\pi D^2}{4}

Source code in src/fluidmec/hydrodynamics/coefficients.py
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
def displaced_mass_per_unit_length(
    diameter: ArrayLike,
    density: ArrayLike = SEAWATER_DENSITY,
) -> float | np.ndarray:
    r"""Calculate displaced fluid mass per unit length [kg/m].

    .. math::
        m_f = \rho \frac{\pi D^2}{4}
    """
    d = as_float_array(diameter, "diameter")
    rho = as_float_array(density, "density")

    validate_positive(d, "diameter")
    validate_positive(rho, "density")

    return format_output(rho * np.pi * d**2 / 4.0)

added_mass_per_unit_length

added_mass_per_unit_length(diameter: ArrayLike, added_mass_coefficient: ArrayLike = 1.0, density: ArrayLike = SEAWATER_DENSITY) -> float | np.ndarray

Calculate added fluid mass per unit length [kg/m].

.. math:: m_a = C_A \rho \frac{\pi D^2}{4}

Source code in src/fluidmec/hydrodynamics/coefficients.py
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
def added_mass_per_unit_length(
    diameter: ArrayLike,
    added_mass_coefficient: ArrayLike = 1.0,
    density: ArrayLike = SEAWATER_DENSITY,
) -> float | np.ndarray:
    r"""Calculate added fluid mass per unit length [kg/m].

    .. math::
        m_a = C_A \rho \frac{\pi D^2}{4}
    """
    ca = as_float_array(added_mass_coefficient, "added_mass_coefficient")

    validate_non_negative(ca, "added_mass_coefficient")

    displaced = displaced_mass_per_unit_length(
        diameter=diameter,
        density=density,
    )

    return format_output(ca * np.asarray(displaced))

inertia_coefficient_from_added_mass

inertia_coefficient_from_added_mass(added_mass_coefficient: ArrayLike) -> float | np.ndarray

Convert added mass coefficient to inertia coefficient.

.. math:: C_M = 1 + C_A

Source code in src/fluidmec/hydrodynamics/coefficients.py
128
129
130
131
132
133
134
135
136
137
138
139
140
def inertia_coefficient_from_added_mass(
    added_mass_coefficient: ArrayLike,
) -> float | np.ndarray:
    r"""Convert added mass coefficient to inertia coefficient.

    .. math::
        C_M = 1 + C_A
    """
    ca = as_float_array(added_mass_coefficient, "added_mass_coefficient")

    validate_non_negative(ca, "added_mass_coefficient")

    return format_output(1.0 + ca)

added_mass_coefficient_from_inertia

added_mass_coefficient_from_inertia(inertia_coefficient: ArrayLike) -> float | np.ndarray

Convert inertia coefficient to added mass coefficient.

This conversion assumes a non-negative added mass coefficient under the conventional Morison formulation.

.. math:: C_A = C_M - 1

Source code in src/fluidmec/hydrodynamics/coefficients.py
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
def added_mass_coefficient_from_inertia(
    inertia_coefficient: ArrayLike,
) -> float | np.ndarray:
    r"""Convert inertia coefficient to added mass coefficient.

    This conversion assumes a non-negative added mass
    coefficient under the conventional Morison formulation.

    .. math::
        C_A = C_M - 1
    """
    cm = as_float_array(inertia_coefficient, "inertia_coefficient")

    if np.any(cm < 1.0):
        raise ValueError(
            "inertia_coefficient must be at least 1.0 for this added mass model."
        )

    return format_output(cm - 1.0)

drag_inertia_ratio

drag_inertia_ratio(kc_number: ArrayLike, drag_coefficient: ArrayLike = 1.0, inertia_coefficient: ArrayLike = 2.0) -> float | np.ndarray

Calculate the ratio of drag and inertia peak amplitudes.

Assumes sinusoidal oscillatory flow, a fixed circular cylinder and constant hydrodynamic coefficients.

At KC = 0, the returned zero represents the limiting ratio, not a ratio of two nonzero physical forces.

.. math:: R = \frac{C_D KC}{\pi^2 C_M}

Source code in src/fluidmec/hydrodynamics/coefficients.py
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
def drag_inertia_ratio(
    kc_number: ArrayLike,
    drag_coefficient: ArrayLike = 1.0,
    inertia_coefficient: ArrayLike = 2.0,
) -> float | np.ndarray:
    r"""Calculate the ratio of drag and inertia peak amplitudes.

    Assumes sinusoidal oscillatory flow, a fixed circular
    cylinder and constant hydrodynamic coefficients.

    At KC = 0, the returned zero represents the limiting
    ratio, not a ratio of two nonzero physical forces.

    .. math::
        R = \frac{C_D KC}{\pi^2 C_M}
    """
    kc = as_float_array(kc_number, "kc_number")
    cd = as_float_array(drag_coefficient, "drag_coefficient")
    cm = as_float_array(inertia_coefficient, "inertia_coefficient")

    validate_non_negative(kc, "kc_number")
    validate_non_negative(cd, "drag_coefficient")
    validate_positive(cm, "inertia_coefficient")

    return format_output(cd * kc / (np.pi**2 * cm))

equal_force_kc

equal_force_kc(drag_coefficient: ArrayLike = 1.0, inertia_coefficient: ArrayLike = 2.0) -> float | np.ndarray

Calculate KC for equal drag and inertia peak amplitudes.

Both coefficients must be strictly positive.

.. math:: KC_{equal} = \frac{\pi^2 C_M}{C_D}

Source code in src/fluidmec/hydrodynamics/coefficients.py
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
def equal_force_kc(
    drag_coefficient: ArrayLike = 1.0,
    inertia_coefficient: ArrayLike = 2.0,
) -> float | np.ndarray:
    r"""Calculate KC for equal drag and inertia peak amplitudes.

    Both coefficients must be strictly positive.

    .. math::
        KC_{equal} = \frac{\pi^2 C_M}{C_D}
    """
    cd = as_float_array(drag_coefficient, "drag_coefficient")
    cm = as_float_array(inertia_coefficient, "inertia_coefficient")

    validate_positive(cd, "drag_coefficient")
    validate_positive(cm, "inertia_coefficient")

    return format_output(np.pi**2 * cm / cd)

hydrodynamic_force_regime

hydrodynamic_force_regime(kc_number: ArrayLike, drag_coefficient: ArrayLike = 1.0, inertia_coefficient: ArrayLike = 2.0, *, tolerance: float = 0.05) -> str | np.ndarray

Classify relative drag and inertia peak amplitudes.

The default tolerance defines an equal-peak band between ratios of 0.95 and 1.05.

Returns:

Type Description
str or ndarray

no_oscillation, inertia_dominated, comparable or drag_dominated.

Source code in src/fluidmec/hydrodynamics/coefficients.py
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
def hydrodynamic_force_regime(
    kc_number: ArrayLike,
    drag_coefficient: ArrayLike = 1.0,
    inertia_coefficient: ArrayLike = 2.0,
    *,
    tolerance: float = 0.05,
) -> str | np.ndarray:
    """Classify relative drag and inertia peak amplitudes.

    The default tolerance defines an equal-peak band
    between ratios of 0.95 and 1.05.

    Returns
    -------
    str or ndarray
        no_oscillation, inertia_dominated,
        comparable or drag_dominated.
    """
    tol = as_float_array(tolerance, "tolerance")

    if tol.ndim != 0 or not 0.0 <= float(tol) < 1.0:
        raise ValueError("tolerance must be a scalar in [0, 1).")

    kc = as_float_array(kc_number, "kc_number")

    ratio = np.asarray(
        drag_inertia_ratio(
            kc_number=kc,
            drag_coefficient=drag_coefficient,
            inertia_coefficient=inertia_coefficient,
        )
    )

    result = np.where(
        kc == 0.0,
        "no_oscillation",
        np.where(
            ratio < 1.0 - tol,
            "inertia_dominated",
            np.where(
                ratio > 1.0 + tol,
                "drag_dominated",
                "comparable",
            ),
        ),
    )

    if result.ndim == 0:
        return str(result.item())

    return result

relative_surface_roughness

relative_surface_roughness(roughness_height: ArrayLike, diameter: ArrayLike) -> float | np.ndarray

Calculate relative cylinder surface roughness.

.. math:: \epsilon_r = \frac{k_s}{D}

Source code in src/fluidmec/hydrodynamics/coefficients.py
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
def relative_surface_roughness(
    roughness_height: ArrayLike,
    diameter: ArrayLike,
) -> float | np.ndarray:
    r"""Calculate relative cylinder surface roughness.

    .. math::
        \epsilon_r = \frac{k_s}{D}
    """
    ks = as_float_array(roughness_height, "roughness_height")
    d = as_float_array(diameter, "diameter")

    validate_non_negative(ks, "roughness_height")
    validate_positive(d, "diameter")

    return format_output(ks / d)

relative_member_diameter

relative_member_diameter(diameter: ArrayLike, wavelength: ArrayLike) -> float | np.ndarray

Calculate cylinder diameter relative to wavelength.

.. math:: \delta = \frac{D}{\lambda}

Source code in src/fluidmec/hydrodynamics/coefficients.py
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
def relative_member_diameter(
    diameter: ArrayLike,
    wavelength: ArrayLike,
) -> float | np.ndarray:
    r"""Calculate cylinder diameter relative to wavelength.

    .. math::
        \delta = \frac{D}{\lambda}
    """
    d = as_float_array(diameter, "diameter")
    length = as_float_array(wavelength, "wavelength")

    validate_positive(d, "diameter")
    validate_positive(length, "wavelength")

    return format_output(d / length)

diffraction_parameter

diffraction_parameter(diameter: ArrayLike, wavelength: ArrayLike) -> float | np.ndarray

Calculate the diameter-based diffraction parameter.

.. math:: kD = \frac{2\pi D}{\lambda}

Source code in src/fluidmec/hydrodynamics/coefficients.py
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
def diffraction_parameter(
    diameter: ArrayLike,
    wavelength: ArrayLike,
) -> float | np.ndarray:
    r"""Calculate the diameter-based diffraction parameter.

    .. math::
        kD = \frac{2\pi D}{\lambda}
    """
    relative = relative_member_diameter(
        diameter=diameter,
        wavelength=wavelength,
    )

    return format_output(2.0 * np.pi * np.asarray(relative))

morison_applicability

morison_applicability(diameter: ArrayLike, wavelength: ArrayLike, *, threshold: float = 0.2) -> str | np.ndarray

Screen Morison applicability using relative diameter.

This is a geometric screening criterion only. It does not establish full engineering suitability.

Returns:

Type Description
str or ndarray

slender_member or diffraction_review_required.

Source code in src/fluidmec/hydrodynamics/coefficients.py
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
def morison_applicability(
    diameter: ArrayLike,
    wavelength: ArrayLike,
    *,
    threshold: float = 0.2,
) -> str | np.ndarray:
    """Screen Morison applicability using relative diameter.

    This is a geometric screening criterion only.
    It does not establish full engineering suitability.

    Returns
    -------
    str or ndarray
        slender_member or diffraction_review_required.
    """
    limit = as_float_array(threshold, "threshold")

    if limit.ndim != 0 or not 0.0 < float(limit) <= 1.0:
        raise ValueError("threshold must be a scalar in (0, 1].")

    relative = np.asarray(
        relative_member_diameter(
            diameter=diameter,
            wavelength=wavelength,
        )
    )

    result = np.where(
        relative <= limit,
        "slender_member",
        "diffraction_review_required",
    )

    if result.ndim == 0:
        return str(result.item())

    return result

References

  • Morison, J. R., O'Brien, M. P., Johnson, J. W., and Schaaf, S. A. (1950). The Force Exerted by Surface Waves on Piles.

  • Sarpkaya, T. (2010). Wave Forces on Offshore Structures. Cambridge University Press.

  • DNV-RP-C205. Environmental Conditions and Environmental Loads.