Wave Phase and Time-Dependent Loading¶
Overview¶
The phase loading module extends Fluidmec's member force and moment calculations to simultaneous multi-member hydrodynamic load histories.
It supports spatial wave phase differences, harmonic load combination, periodic peak detection, temporal refinement and directional load envelopes.
Coordinate conventions¶
- Cartesian x and y coordinates are horizontal.
- z is positive upwards.
- The still water level is z = 0.
- Wave directions are measured from +x towards +y.
- Direction inputs are in degrees.
- Wave phases are in radians.
- All physical quantities use SI units.
Directional wave phase¶
The wave phase is
The spatial phase difference between two positions is
The signed wave travel delay is
Harmonic load combination¶
For harmonic loads with a common angular frequency,
the combined complex amplitude is
The resultant amplitude and phase are obtained from the magnitude and argument of Z.
For two equal-amplitude harmonic loads,
This expression does not generally describe nonlinear Morison drag.
Simultaneous structural loading¶
Member force and moment histories are calculated using wave_current_member_force_moment.
All members are evaluated at common time samples and about a common global reference point.
The horizontal base shear and overturning moment are calculated from the signed vector sums.
Temporal sampling¶
One wave period is discretised into N samples:
The repeated endpoint is excluded.
For sufficiently smooth maxima, sampled peak underestimation is bounded by a second-order temporal discretisation relationship.
Quadratic peak refinement¶
Three neighbouring samples are used to estimate a local quadratic maximum.
Periodic neighbours are used at the first and last samples.
The refinement is an interpolation estimate.
The directional envelope solver re-evaluates the physical member solver at candidate refined times and retains the larger physical objective value.
Directional load envelopes¶
For a given wave direction,
The critical sampled direction is determined by comparing the directional peak values.
The directional sweep is discrete and does not guarantee a continuous global maximum.
Vertical force and torsion envelopes use absolute magnitudes while preserving their signed values.
Engineering example¶
from fluidmec.hydrodynamics import (
directional_load_envelope,
)
members = [
{
"name": "A",
"start": [0, 0, -40],
"end": [0, 0, 0],
"diameter": 4,
},
{
"name": "B",
"start": [30, 0, -40],
"end": [30, 0, 0],
"diameter": 4,
},
]
result = directional_load_envelope(
members,
directions=[0, 30, 60, 90],
wave_height=2,
period=8,
depth=40,
reference=[0, 0, -40],
current_velocity=1,
samples=256,
)
print(result["critical"]["overturning"])
Assumptions and limitations¶
- Regular monochromatic linear waves.
- Prescribed steady currents.
- Fixed straight cylindrical members.
- Mean submerged geometry.
- No wave diffraction or wake shielding.
- No instantaneous wetting and drying.
- No structural dynamic response.
- No irregular-wave spectra.
- No wave-current dispersion coupling.
- No fatigue or structural capacity assessment.
The calculated quantities are time-dependent applied hydrodynamic loads.
The moving wave surface in the animation is illustrative; it does not modify the mean submerged integration limits.
Displayed force vectors are positioned at member midpoints for visualisation only.
Numerical verification¶
Tests include:
- Directional phase and Cartesian projection.
- Signed wave travel delay.
- Analytical harmonic load cancellation.
- Periodic time grids.
- Peak interpolation and periodic boundaries.
- Controlled temporal convergence.
- Independent member summation.
- Horizontal and vertical moment decomposition.
- Two-column inertia cancellation.
- Uniform-current directional envelopes.
Visualisation¶
Run the complete engineering example:
python examples/phase_loading_example.py --animate
Results are saved under outputs/lesson32/.
API reference¶
fluidmec.hydrodynamics.phase_loading
¶
Spatial phase and time-dependent hydrodynamic loading.
All physical quantities use SI units. Wave directions are measured from +x towards +y. Wave directions use degrees; wave phases use radians.
Structural load histories represent applied loads.
wave_direction_vector
¶
wave_direction_vector(direction: ArrayLike) -> np.ndarray
Return horizontal wave propagation unit vectors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
direction
|
array_like
|
Propagation direction in degrees. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Cartesian unit vectors with shape (..., 3). |
Source code in src/fluidmec/hydrodynamics/phase_loading.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | |
projected_wave_distance
¶
projected_wave_distance(position: ArrayLike, direction: ArrayLike) -> float | np.ndarray
Project Cartesian positions onto the wave axis.
Returns signed distances in metres.
Source code in src/fluidmec/hydrodynamics/phase_loading.py
117 118 119 120 121 122 123 124 125 126 127 128 | |
directional_wave_phase
¶
directional_wave_phase(position: ArrayLike, time: ArrayLike, wave_number: ArrayLike, angular_frequency: ArrayLike, *, direction: ArrayLike = 0.0, phase_offset: ArrayLike = 0.0) -> float | np.ndarray
Return unwrapped directional wave phase in radians.
Inputs follow NumPy broadcasting rules.
Source code in src/fluidmec/hydrodynamics/phase_loading.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | |
spatial_phase_difference
¶
spatial_phase_difference(first: ArrayLike, second: ArrayLike, wave_number: ArrayLike, *, direction: ArrayLike = 0.0) -> float | np.ndarray
Return signed phase(second) - phase(first).
Source code in src/fluidmec/hydrodynamics/phase_loading.py
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | |
wave_phase_time_delay
¶
wave_phase_time_delay(phase_difference: ArrayLike, angular_frequency: ArrayLike) -> float | np.ndarray
Convert signed phase difference to seconds.
Source code in src/fluidmec/hydrodynamics/phase_loading.py
178 179 180 181 182 183 184 185 186 187 188 189 190 | |
harmonic_load_resultant
¶
harmonic_load_resultant(amplitudes: ArrayLike, phases: ArrayLike, *, axis: int = 0) -> tuple[float | np.ndarray, float | np.ndarray]
Combine harmonic loads using complex amplitudes.
The harmonic convention is
load(t) = amplitude * cos(omega*t - phase)
Amplitudes must be nonnegative. Phases are in radians.
Returns:
| Type | Description |
|---|---|
(amplitude, phase)
|
Combined amplitude and phase. |
Notes
Phase is mathematically undefined at zero resultant amplitude. Near complete numerical cancellation, the returned phase is set to zero.
Source code in src/fluidmec/hydrodynamics/phase_loading.py
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 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 | |
periodic_time_grid
¶
periodic_time_grid(period: float, samples: int = 256, *, start: float = 0.0) -> np.ndarray
Return equally spaced samples over one period.
The repeated endpoint is excluded.
Source code in src/fluidmec/hydrodynamics/phase_loading.py
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | |
simultaneous_load_sum
¶
simultaneous_load_sum(histories: ArrayLike, *, axis: int = 0) -> np.ndarray
Sum signed Cartesian load histories.
The final axis must contain Cartesian components. The summation axis must not be the Cartesian axis.
Source code in src/fluidmec/hydrodynamics/phase_loading.py
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | |
sampled_peak
¶
sampled_peak(time: ArrayLike, values: ArrayLike, *, absolute: bool = False) -> dict[str, float | int]
Locate the maximum of a scalar time history.
With absolute=True, the signed value at the maximum absolute magnitude is retained.
Source code in src/fluidmec/hydrodynamics/phase_loading.py
305 306 307 308 309 310 311 312 313 314 315 316 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 | |
refine_periodic_peak
¶
refine_periodic_peak(values: ArrayLike, period: float, *, start: float = 0.0, absolute: bool = False) -> dict[str, float | int]
Estimate a periodic peak using three samples.
Samples must be uniformly spaced over one period, with the repeated endpoint excluded.
The returned peak is an interpolation estimate, not a new physical solver evaluation.
Source code in src/fluidmec/hydrodynamics/phase_loading.py
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 | |
structure_load_history
¶
structure_load_history(members: Sequence[Mapping], *, time: ArrayLike, wave_height: float, period: float, depth: float, reference: ArrayLike = (0.0, 0.0, 0.0), wave_direction: float = 0.0, **parameters) -> dict
Calculate simultaneous structural load histories.
Each member mapping requires start, end and diameter.
Optional member-specific keys: name, group, drag_coefficient, inertia_coefficient.
Other environmental parameters are passed to wave_current_member_force_moment.
Returns:
| Type | Description |
|---|---|
dict
|
Total and individual member histories, group histories, base shear, overturning, vertical force and torsion. |
Notes
This is an applied hydrodynamic load aggregator, not a structural dynamic response solver.
Source code in src/fluidmec/hydrodynamics/phase_loading.py
410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 | |
directional_load_envelope
¶
directional_load_envelope(members: Sequence[Mapping], directions: ArrayLike, *, wave_height: float, period: float, depth: float, samples: int = 256, reference: ArrayLike = (0.0, 0.0, 0.0), refine: bool = True, **parameters) -> dict
Evaluate peak loads across wave directions.
Directional maxima are sampled, not continuous optimisations over direction.
With refine=True, each interpolated critical time is re-evaluated using the physical member solver.
Current direction remains fixed unless the caller changes it between separate envelope calculations.
Source code in src/fluidmec/hydrodynamics/phase_loading.py
550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 | |
References¶
-
Dean and Dalrymple (1991). Water Wave Mechanics for Engineers and Scientists.
-
Morison et al. (1950). The Force Exerted by Surface Waves on Piles.
-
Sarpkaya (2010). Wave Forces on Offshore Structures.