Linear Airy Wave Theory¶
The Airy module implements first-order, finite-depth surface gravity wave fields.
Coordinate convention¶
- x: horizontal position, positive in the direction of propagation.
- z: vertical position, positive upwards.
- z = 0: still-water level.
- z = -h: horizontal impermeable seabed.
- t: time in seconds.
All dimensional quantities use SI units.
Governing equations¶
For incompressible, irrotational flow, the velocity potential satisfies Laplace's equation:
Wave phase¶
Surface elevation¶
where wave amplitude is half the wave height.
Dispersion relation¶
The period-based functions reuse the existing Fluidmec dispersion solver.
Velocity potential¶
The velocity convention is
Stream function¶
The stream function convention is
The stream function is zero at the seabed.
Instantaneous streamlines are not equivalent to particle trajectories in unsteady flow.
Boundary conditions¶
Impermeable seabed¶
Dynamic free-surface condition¶
Kinematic free-surface condition¶
Numerical stability¶
Direct evaluation of hyperbolic functions can overflow for large dimensionless water depths.
Fluidmec uses the equivalent exponential forms:
NumPy expm1 reduces cancellation near the seabed.
These formulations are valid within the mean water column, where exponential arguments remain non-positive.
Symbols and units¶
| Symbol | Description | SI unit |
|---|---|---|
| a | Wave amplitude | m |
| h | Water depth | m |
| x | Horizontal coordinate | m |
| z | Vertical coordinate | m |
| t | Time | s |
| k | Wave number | rad/m |
| omega | Angular frequency | rad/s |
| eta | Surface elevation | m |
| phi | Velocity potential | m²/s |
| psi | Stream function | m²/s |
Basic example¶
from fluidmec.waves import (
surface_elevation_from_period,
velocity_potential_from_period,
stream_function_from_period,
)
a = 1.0
T = 8.0
h = 20.0
x = 10.0
z = -5.0
t = 0.0
eta = surface_elevation_from_period(a, x, t, T, h)
phi = velocity_potential_from_period(
a, x, z, t, T, h
)
psi = stream_function_from_period(
a, x, z, t, T, h
)
print(eta, phi, psi)
Vectorised spatial wave fields¶
import numpy as np
from fluidmec.waves import (
solve_wave_number,
velocity_potential,
stream_function,
)
a = 1.0
T = 8.0
h = 20.0
k = solve_wave_number(T, h)
x = np.linspace(0.0, 200.0, 500)
z = np.linspace(-h, 0.0, 100)
xx, zz = np.meshgrid(x, z)
phi = velocity_potential(a, xx, zz, 0.0, k, h)
psi = stream_function(a, xx, zz, 0.0, k, h)
print(phi.shape)
print(psi.shape)
Both fields have shape (100, 500).
Assumptions and limitations¶
- Small-amplitude linear gravity waves.
- Incompressible, inviscid and irrotational fluid.
- Constant water depth.
- Horizontal impermeable seabed.
- No background current.
- Negligible surface tension and dissipation.
- Two-dimensional progressive waves.
- Free-surface conditions linearised at z = 0.
- Potential and stream-function calculations are restricted to the mean water column.
- Wave breaking, nonlinear harmonics and mean mass transport are not represented.
- Extreme dimensional inputs may exceed the supported floating-point range.
- Applicability of linear theory must be assessed separately.
Scientific validation¶
The test suite includes:
- Analytical wave phase and surface elevation.
- Spatial and temporal periodicity.
- Stable depth attenuation calculations.
- Deep-water limiting solutions.
- Laplace equation residuals.
- Dynamic and kinematic boundary conditions.
- Impermeable seabed validation.
- Potential and stream-function consistency.
- NumPy broadcasting and input validation.
Finite-difference residuals depend on the chosen spatial and temporal discretisation.
Visualisation¶
Run the example script to generate a high-resolution scientific dashboard.
python examples/airy_wave_example.py
To additionally generate an animated GIF:
python examples/airy_wave_example.py --animate
Output files are saved in the project outputs directory.
API Reference¶
Linear Airy wave theory for finite-depth surface gravity waves.
Coordinate convention
x : Horizontal position, positive in the propagation direction. z : Vertical position, positive upwards. z = 0 : Still-water level. z = -h : Impermeable horizontal seabed.
Governing equations
theta = kx - omegat + phase_offset
eta = a*cos(theta)
phi = (ga/omega)C(z)*sin(theta)
psi = (ga/omega)S(z)*cos(theta)
C(z) = cosh(k(z+h))/cosh(kh)
S(z) = sinh(k(z+h))/cosh(kh)
omega**2 = gktanh(k*h)
Velocity convention
u = d(phi)/dx = d(psi)/dz w = d(phi)/dz = -d(psi)/dx
Assumptions
- Linear, small-amplitude surface gravity waves.
- Two-dimensional progressive wave propagation.
- Incompressible, inviscid and irrotational fluid.
- Constant water depth and horizontal impermeable seabed.
- No background current.
- Negligible surface tension and dissipation.
- Free-surface boundary conditions linearised at z = 0.
All dimensional inputs and outputs use SI units. Angles are expressed in radians.
The functions support NumPy broadcasting. They do not independently establish whether linear theory is appropriate for a particular wave amplitude or environmental condition.
References
Dean, R. G. and Dalrymple, R. A. (1991). Water Wave Mechanics for Engineers and Scientists. World Scientific.
as_float_array
¶
as_float_array(value: ArrayLike, name: str) -> np.ndarray
Convert input to a finite floating-point array.
Source code in src/fluidmec/core/_validation.py
13 14 15 16 17 18 19 20 21 22 23 24 | |
format_output
¶
format_output(result: ArrayLike) -> float | np.ndarray
Return a Python float for scalar results.
Source code in src/fluidmec/core/_validation.py
69 70 71 72 73 74 75 76 77 78 79 | |
validate_non_negative
¶
validate_non_negative(value: ArrayLike, name: str) -> np.ndarray
Validate non-negative numerical inputs.
Source code in src/fluidmec/core/_validation.py
41 42 43 44 45 46 47 48 49 50 51 52 | |
validate_positive
¶
validate_positive(value: ArrayLike, name: str) -> np.ndarray
Validate strictly positive numerical inputs.
Source code in src/fluidmec/core/_validation.py
27 28 29 30 31 32 33 34 35 36 37 38 | |
dispersion_angular_frequency
¶
dispersion_angular_frequency(wave_number: ArrayLike, depth: ArrayLike, gravity: ArrayLike = ENGINEERING_GRAVITY) -> float | np.ndarray
Calculate angular frequency from the dispersion relation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
wave_number
|
array_like
|
Wave-number magnitude k, in rad/m. Positive. |
required |
depth
|
array_like
|
Still-water depth h, in metres. Positive. |
required |
gravity
|
array_like
|
Gravitational acceleration, in m/s^2. |
ENGINEERING_GRAVITY
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Angular frequency omega, in rad/s. |
Notes
Equation:
omega = sqrt(g*k*tanh(k*h))
Assumes linear surface gravity waves.
Source code in src/fluidmec/waves/dispersion.py
397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 | |
solve_wave_number
¶
solve_wave_number(period: ArrayLike, depth: ArrayLike, gravity: ArrayLike = ENGINEERING_GRAVITY, *, method: str = 'newton', tolerance: float = 1e-10, max_iterations: int = 100) -> float | np.ndarray
Solve the linear wave dispersion relation for k.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
array_like
|
Wave period T, in seconds. Positive. |
required |
depth
|
array_like
|
Still-water depth h, in metres. Positive. |
required |
gravity
|
array_like
|
Gravitational acceleration g, in m/s^2. |
ENGINEERING_GRAVITY
|
method
|
(newton, bisection)
|
Safeguarded Newton-Raphson or bisection. |
"newton"
|
tolerance
|
float
|
Relative dimensionless residual tolerance. Must be between zero and one, exclusive. |
1e-10
|
max_iterations
|
int
|
Maximum number of solver evaluations. |
100
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Positive wave-number magnitude k, in rad/m. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If physical inputs or solver options are invalid. |
RuntimeError
|
If the solver does not converge. |
Notes
Solves:
x*tanh(x) = mu
where x = kh and mu = omega**2h/g.
Convergence criterion:
abs(x*tanh(x) - mu) / mu <= tolerance
Newton steps outside the root bracket are replaced by bisection steps.
Supports NumPy broadcasting. Every array element must converge before the function returns.
The result is based on linear gravity wave theory, without current or surface tension.
Source code in src/fluidmec/waves/dispersion.py
180 181 182 183 184 185 186 187 188 189 190 191 192 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 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 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 342 343 344 | |
angular_frequency
¶
angular_frequency(period: ArrayLike) -> float | np.ndarray
Calculate angular wave frequency.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
array_like
|
Wave period T, in seconds. Must be strictly positive. |
required |
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Angular frequency omega, in radians per second. |
Notes
Equation: omega = 2 * pi / T.
Angular frequency measures the temporal rate of change of wave phase.
Source code in src/fluidmec/waves/parameters.py
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | |
_validate_vertical_coordinates
¶
_validate_vertical_coordinates(z: ArrayLike, depth: ArrayLike) -> tuple[np.ndarray, np.ndarray]
Validate coordinates within the mean water column.
Source code in src/fluidmec/waves/airy.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
_finite_result
¶
_finite_result(result: ArrayLike, name: str) -> float | np.ndarray
Reject non-finite calculated results.
Source code in src/fluidmec/waves/airy.py
89 90 91 92 93 94 95 96 97 98 99 | |
wave_phase
¶
wave_phase(x: ArrayLike, time: ArrayLike, wave_number: ArrayLike, angular_frequency: ArrayLike, phase_offset: ArrayLike = 0.0) -> float | np.ndarray
Calculate the phase of a progressive sinusoidal wave.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
array_like
|
Horizontal position in metres. |
required |
time
|
array_like
|
Time in seconds. |
required |
wave_number
|
array_like
|
Positive wave-number magnitude in rad/m. |
required |
angular_frequency
|
array_like
|
Positive angular frequency in rad/s. |
required |
phase_offset
|
array_like
|
Initial phase offset in radians. |
0.0
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Unwrapped wave phase in radians. |
Notes
Equation:
theta = k*x - omega*t + phase_offset
Positive k and omega describe propagation in the positive x direction.
This general phase function does not independently enforce the gravity-wave dispersion relation.
Source code in src/fluidmec/waves/airy.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | |
surface_elevation
¶
surface_elevation(amplitude: ArrayLike, x: ArrayLike, time: ArrayLike, wave_number: ArrayLike, angular_frequency: ArrayLike, phase_offset: ArrayLike = 0.0) -> float | np.ndarray
Calculate sinusoidal free-surface elevation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amplitude
|
array_like
|
Non-negative wave amplitude in metres. Wave amplitude equals half the wave height. |
required |
x
|
array_like
|
Horizontal position in metres. |
required |
time
|
array_like
|
Time in seconds. |
required |
wave_number
|
array_like
|
Positive wave number in rad/m. |
required |
angular_frequency
|
array_like
|
Positive angular frequency in rad/s. |
required |
phase_offset
|
array_like
|
Initial phase offset in radians. |
0.0
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Surface elevation relative to still water, in metres. |
Notes
Equation:
eta = a*cos(k*x - omega*t + phase_offset)
The wave-number and frequency inputs must be physically consistent for gravity-wave applications.
Source code in src/fluidmec/waves/airy.py
156 157 158 159 160 161 162 163 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 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | |
surface_elevation_from_period
¶
surface_elevation_from_period(amplitude: ArrayLike, x: ArrayLike, time: ArrayLike, period: ArrayLike, depth: ArrayLike, gravity: ArrayLike = ENGINEERING_GRAVITY, *, phase_offset: ArrayLike = 0.0, method: str = 'newton', tolerance: float = 1e-10, max_iterations: int = 100) -> float | np.ndarray
Calculate finite-depth surface elevation from period.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amplitude
|
array_like
|
Non-negative wave amplitude in metres. |
required |
x
|
array_like
|
Horizontal position in metres. |
required |
time
|
array_like
|
Time in seconds. |
required |
period
|
array_like
|
Positive wave period in seconds. |
required |
depth
|
array_like
|
Positive still-water depth in metres. |
required |
gravity
|
array_like
|
Positive gravitational acceleration in m/s^2. |
ENGINEERING_GRAVITY
|
phase_offset
|
array_like
|
Initial phase in radians. |
0.0
|
method
|
(newton, bisection)
|
Dispersion solver method. |
"newton"
|
tolerance
|
float
|
Relative dispersion residual tolerance. |
1e-10
|
max_iterations
|
int
|
Maximum dispersion solver evaluations. |
100
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Surface elevation in metres. |
Notes
Wave number is obtained from the finite-depth linear dispersion relation.
Source code in src/fluidmec/waves/airy.py
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 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | |
cosh_depth_factor
¶
cosh_depth_factor(wave_number: ArrayLike, z: ArrayLike, depth: ArrayLike) -> float | np.ndarray
Calculate the stable hyperbolic cosine depth factor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
wave_number
|
array_like
|
Positive wave number in rad/m. |
required |
z
|
array_like
|
Vertical coordinate in metres, satisfying -h <= z <= 0. |
required |
depth
|
array_like
|
Positive still-water depth in metres. |
required |
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Dimensionless cosine depth attenuation factor. |
Notes
Governing expression:
C = cosh(k*(z+h))/cosh(k*h)
Stable exponential formulation:
C = exp(k*z)*(1 + exp(-2*k*(z+h)))
/ (1 + exp(-2*k*h))
All exponential arguments are non-positive within the mean water column.
At z = 0, C = 1.
Source code in src/fluidmec/waves/airy.py
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 | |
sinh_depth_factor
¶
sinh_depth_factor(wave_number: ArrayLike, z: ArrayLike, depth: ArrayLike) -> float | np.ndarray
Calculate the stable hyperbolic sine depth factor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
wave_number
|
array_like
|
Positive wave number in rad/m. |
required |
z
|
array_like
|
Vertical coordinate in metres, satisfying -h <= z <= 0. |
required |
depth
|
array_like
|
Positive still-water depth in metres. |
required |
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Dimensionless sine depth attenuation factor. |
Notes
Governing expression:
S = sinh(k*(z+h))/cosh(k*h)
Stable exponential formulation:
S = exp(k*z)*(1 - exp(-2*k*(z+h)))
/ (1 + exp(-2*k*h))
NumPy expm1 is used to reduce cancellation close to the seabed.
At z = -h, S = 0. At z = 0, S = tanh(k*h).
Source code in src/fluidmec/waves/airy.py
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 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 | |
velocity_potential
¶
velocity_potential(amplitude: ArrayLike, x: ArrayLike, z: ArrayLike, time: ArrayLike, wave_number: ArrayLike, depth: ArrayLike, gravity: ArrayLike = ENGINEERING_GRAVITY, *, phase_offset: ArrayLike = 0.0) -> float | np.ndarray
Calculate the finite-depth Airy wave velocity potential.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amplitude
|
array_like
|
Non-negative wave amplitude in metres. |
required |
x
|
array_like
|
Horizontal position in metres. |
required |
z
|
array_like
|
Vertical position in metres, within -h <= z <= 0. |
required |
time
|
array_like
|
Time in seconds. |
required |
wave_number
|
array_like
|
Positive wave number in rad/m. |
required |
depth
|
array_like
|
Positive still-water depth in metres. |
required |
gravity
|
array_like
|
Positive gravitational acceleration in m/s^2. |
ENGINEERING_GRAVITY
|
phase_offset
|
array_like
|
Initial phase in radians. |
0.0
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Velocity potential in m^2/s. |
Notes
Equation:
phi = (g*a/omega)*C(z)*sin(theta)
where omega satisfies the linear dispersion relation.
The potential convention is u = d(phi)/dx and w = d(phi)/dz.
Assumes linear, inviscid, irrotational gravity waves without background current.
Source code in src/fluidmec/waves/airy.py
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 408 409 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 | |
velocity_potential_from_period
¶
velocity_potential_from_period(amplitude: ArrayLike, x: ArrayLike, z: ArrayLike, time: ArrayLike, period: ArrayLike, depth: ArrayLike, gravity: ArrayLike = ENGINEERING_GRAVITY, *, phase_offset: ArrayLike = 0.0, method: str = 'newton', tolerance: float = 1e-10, max_iterations: int = 100) -> float | np.ndarray
Calculate the Airy velocity potential from wave period.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amplitude
|
array_like
|
Non-negative wave amplitude in metres. |
required |
x
|
array_like
|
Horizontal and vertical coordinates in metres. Vertical coordinates must satisfy -h <= z <= 0. |
required |
z
|
array_like
|
Horizontal and vertical coordinates in metres. Vertical coordinates must satisfy -h <= z <= 0. |
required |
time
|
array_like
|
Time in seconds. |
required |
period
|
array_like
|
Positive wave period in seconds. |
required |
depth
|
array_like
|
Positive still-water depth in metres. |
required |
gravity
|
array_like
|
Gravitational acceleration in m/s^2. |
ENGINEERING_GRAVITY
|
phase_offset
|
array_like
|
Initial phase in radians. |
0.0
|
method
|
(newton, bisection)
|
Dispersion solver method. |
"newton"
|
tolerance
|
float
|
Relative dispersion residual tolerance. |
1e-10
|
max_iterations
|
int
|
Maximum dispersion solver evaluations. |
100
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Velocity potential in m^2/s. |
Notes
Uses the dispersion solver to determine wave number. The angular frequency in the potential is evaluated from the resulting wave number.
Source code in src/fluidmec/waves/airy.py
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 | |
stream_function
¶
stream_function(amplitude: ArrayLike, x: ArrayLike, z: ArrayLike, time: ArrayLike, wave_number: ArrayLike, depth: ArrayLike, gravity: ArrayLike = ENGINEERING_GRAVITY, *, phase_offset: ArrayLike = 0.0) -> float | np.ndarray
Calculate the finite-depth Airy wave stream function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amplitude
|
array_like
|
Non-negative wave amplitude in metres. |
required |
x
|
array_like
|
Horizontal position in metres. |
required |
z
|
array_like
|
Vertical position in metres, within -h <= z <= 0. |
required |
time
|
array_like
|
Time in seconds. |
required |
wave_number
|
array_like
|
Positive wave number in rad/m. |
required |
depth
|
array_like
|
Positive still-water depth in metres. |
required |
gravity
|
array_like
|
Gravitational acceleration in m/s^2. |
ENGINEERING_GRAVITY
|
phase_offset
|
array_like
|
Initial phase in radians. |
0.0
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Stream function in m^2/s. |
Notes
Equation:
psi = (g*a/omega)*S(z)*cos(theta)
Convention:
u = d(psi)/dz
w = -d(psi)/dx
The stream function is zero at the seabed. Instantaneous streamlines are not particle trajectories in this unsteady flow.
Source code in src/fluidmec/waves/airy.py
533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 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 | |
stream_function_from_period
¶
stream_function_from_period(amplitude: ArrayLike, x: ArrayLike, z: ArrayLike, time: ArrayLike, period: ArrayLike, depth: ArrayLike, gravity: ArrayLike = ENGINEERING_GRAVITY, *, phase_offset: ArrayLike = 0.0, method: str = 'newton', tolerance: float = 1e-10, max_iterations: int = 100) -> float | np.ndarray
Calculate the Airy stream function from wave period.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amplitude
|
array_like
|
Non-negative wave amplitude in metres. |
required |
x
|
array_like
|
Horizontal and vertical coordinates in metres. Vertical coordinates must satisfy -h <= z <= 0. |
required |
z
|
array_like
|
Horizontal and vertical coordinates in metres. Vertical coordinates must satisfy -h <= z <= 0. |
required |
time
|
array_like
|
Time in seconds. |
required |
period
|
array_like
|
Positive wave period in seconds. |
required |
depth
|
array_like
|
Positive still-water depth in metres. |
required |
gravity
|
array_like
|
Gravitational acceleration in m/s^2. |
ENGINEERING_GRAVITY
|
phase_offset
|
array_like
|
Initial phase in radians. |
0.0
|
method
|
(newton, bisection)
|
Dispersion solver method. |
"newton"
|
tolerance
|
float
|
Relative dispersion residual tolerance. |
1e-10
|
max_iterations
|
int
|
Maximum dispersion solver evaluations. |
100
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Stream function in m^2/s. |
Notes
Uses the finite-depth dispersion solver.
Source code in src/fluidmec/waves/airy.py
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 | |
surface_elevation_time_derivative
¶
surface_elevation_time_derivative(amplitude: ArrayLike, x: ArrayLike, time: ArrayLike, wave_number: ArrayLike, angular_frequency: ArrayLike, phase_offset: ArrayLike = 0.0) -> float | np.ndarray
Calculate the time derivative of surface elevation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amplitude
|
array_like
|
Non-negative wave amplitude in metres. |
required |
x
|
array_like
|
Horizontal position in metres. |
required |
time
|
array_like
|
Time in seconds. |
required |
wave_number
|
array_like
|
Positive wave number in rad/m. |
required |
angular_frequency
|
array_like
|
Positive angular frequency in rad/s. |
required |
phase_offset
|
array_like
|
Initial phase in radians. |
0.0
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Surface elevation time derivative in m/s. |
Notes
Equation:
d(eta)/dt = a*omega*sin(theta)
Under the linear kinematic free-surface condition, this equals vertical fluid velocity evaluated at z = 0.
Source code in src/fluidmec/waves/airy.py
682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 | |
References¶
Dean, R. G. and Dalrymple, R. A. (1991). Water Wave Mechanics for Engineers and Scientists. World Scientific.