Wave-Induced Dynamic Pressure¶
The fluidmec.waves.pressure module implements first-order
wave-induced pressure, hydrostatic pressure decomposition,
and monochromatic pressure-based wave reconstruction.
Coordinate convention¶
- Horizontal coordinate x is positive in the propagation direction.
- Vertical coordinate z is positive upwards.
- Still water level is at z = 0.
- The seabed is at z = -h.
- All dimensional quantities use SI units.
Governing equations¶
The linearised unsteady Bernoulli equation gives
The hydrostatic gauge pressure is
The pressure response factor is
The wave-induced pressure perturbation is
Total gauge pressure is
Absolute pressure is
Wave-induced pressure must not be confused with the velocity-based dynamic pressure rho*U^2/2.
Pressure reconstruction¶
For a known monochromatic wave number,
For pressure amplitude Pa,
For peak-to-peak pressure range,
The default minimum accepted pressure response is 0.1. This limits the inverse correction gain to 10.
The threshold is configurable and is not a universal engineering standard. Low responses are rejected rather than silently clipped.
Basic usage¶
from fluidmec.waves import (
solve_wave_number,
wave_dynamic_pressure,
wave_gauge_pressure,
wave_absolute_pressure,
)
k = solve_wave_number(8.0, 20.0)
pd = wave_dynamic_pressure(
1.0, 0.0, -5.0, 0.0, k, 20.0
)
pg = wave_gauge_pressure(
1.0, 0.0, -5.0, 0.0, k, 20.0
)
pabs = wave_absolute_pressure(
1.0, 0.0, -5.0, 0.0, k, 20.0
)
Sensor reconstruction¶
from fluidmec.waves import (
extract_wave_pressure,
solve_wave_number,
surface_elevation_from_pressure,
)
k = solve_wave_number(8.0, 20.0)
pressure = extract_wave_pressure(
measured_pressure=160000.0,
z=-5.0,
atmospheric_pressure=101325.0,
)
eta = surface_elevation_from_pressure(
pressure, k, -5.0, 20.0
)
For gauge-pressure measurements, use an atmospheric reference of zero.
For absolute-pressure measurements, supply the appropriate measured atmospheric reference.
Numerical stability¶
The pressure response factor reuses the stable exponential
depth factors implemented in fluidmec.waves.airy.
This avoids direct hyperbolic overflow at large kh.
Responses may underflow to zero at extreme depths. Such responses cannot be inverted and are rejected.
Nonfinite results are rejected throughout the pressure API.
Assumptions and limitations¶
- First-order linear Airy wave theory.
- Incompressible, inviscid and irrotational fluid.
- Constant density and water depth.
- No background current or surface tension.
- No nonlinear velocity-head contribution.
- No instantaneous free-surface stretching.
- No cavitation or structural interaction model.
- Fixed and known sensor elevation.
- Known monochromatic wave number for reconstruction.
- No automatic removal of tidal trends or sensor drift.
- No irregular-wave spectral reconstruction.
The linear pressure field is evaluated within the mean water column. Near wave troughs, some evaluation points may lie above the instantaneous physical water surface.
Validation¶
The accompanying tests verify:
- Hydrostatic pressure and pressure decomposition.
- Analytical pressure response factors.
- Unsteady Bernoulli consistency.
- Horizontal and vertical momentum equations.
- Pressure periodicity.
- Deep-water and shallow-water limits.
- Wave-height and surface-elevation reconstruction.
- Gauge and absolute sensor pressure extraction.
- Numerical overflow and underflow handling.
- Reconstruction threshold enforcement.
- NumPy broadcasting and scalar return types.
Visualisation¶
python examples/wave_pressure_example.py
Generated output:
outputs/wave_pressure_analysis.png
API reference¶
Pressure fields and pressure-based reconstruction of linear waves.
This module implements first-order wave-induced pressure using the linearised unsteady Bernoulli equation and Airy wave theory.
Coordinate convention
x : horizontal coordinate, positive in the propagation direction. z : vertical coordinate, positive upwards from still water level. h : positive water depth, with the seabed at z = -h.
Physical assumptions
- Incompressible, inviscid and irrotational fluid.
- Small-amplitude, two-dimensional progressive gravity waves.
- Constant fluid density and water depth.
- Horizontal impermeable seabed.
- No background current or surface tension.
- First-order free-surface boundary conditions.
- No second-order Bernoulli velocity-head contribution.
All dimensional inputs and outputs use SI units.
Wave-induced dynamic pressure in this module means the pressure perturbation -rhod(phi)/dt, not the velocity head rhoU**2/2.
Pressure reconstruction assumes a known wave number and a monochromatic linear wave. Broadband irregular-wave reconstruction requires frequency-dependent spectral processing.
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 | |
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 | |
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 | |
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 | |
_finite_output
¶
_finite_output(value: ArrayLike, name: str) -> ScalarOrArray
Return a finite scalar or array.
Source code in src/fluidmec/waves/pressure.py
64 65 66 67 68 69 70 71 72 73 74 | |
_validate_sensor_elevation
¶
_validate_sensor_elevation(z: ArrayLike) -> np.ndarray
Validate a sensor coordinate at or below still water level.
Source code in src/fluidmec/waves/pressure.py
77 78 79 80 81 82 83 84 85 86 | |
_specific_weight
¶
_specific_weight(density: ArrayLike, gravity: ArrayLike) -> np.ndarray
Calculate positive fluid specific weight in N/m^3.
Source code in src/fluidmec/waves/pressure.py
89 90 91 92 93 94 95 96 97 98 99 100 | |
_validate_minimum_response
¶
_validate_minimum_response(minimum_response: float) -> float
Validate a scalar inverse-reconstruction threshold.
Source code in src/fluidmec/waves/pressure.py
103 104 105 106 107 108 109 110 111 112 113 114 | |
pressure_response_factor
¶
pressure_response_factor(wave_number: ArrayLike, z: ArrayLike, depth: ArrayLike) -> ScalarOrArray
Calculate the linear wave pressure response factor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
wave_number
|
array_like
|
Positive angular wave number k [rad/m]. |
required |
z
|
array_like
|
Vertical evaluation coordinate [m]. Must satisfy -depth <= z <= 0. |
required |
depth
|
array_like
|
Positive still-water depth h [m]. |
required |
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Dimensionless pressure response factor Kp. |
Notes
Kp = cosh(k(z+h))/cosh(kh).
Kp equals one at still water level and decreases towards the seabed.
Stable exponential depth factors are reused from the Airy wave module to avoid hyperbolic overflow. Very small responses may underflow to zero.
Source code in src/fluidmec/waves/pressure.py
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 | |
pressure_response_factor_from_period
¶
pressure_response_factor_from_period(period: ArrayLike, z: ArrayLike, depth: ArrayLike, gravity: ArrayLike = ENGINEERING_GRAVITY, *, method: str = 'newton', tolerance: float = 1e-10, max_iterations: int = 100) -> ScalarOrArray
Calculate pressure response from wave period and depth.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
array_like
|
Positive wave period T [s]. |
required |
z
|
array_like
|
Vertical coordinate [m], with -depth <= z <= 0. |
required |
depth
|
array_like
|
Positive water depth [m]. |
required |
gravity
|
array_like
|
Positive gravitational acceleration [m/s^2]. |
ENGINEERING_GRAVITY
|
method
|
(newton, bisection)
|
Linear dispersion solver. |
"newton"
|
tolerance
|
float
|
Relative dimensionless dispersion residual tolerance. |
1e-10
|
max_iterations
|
int
|
Maximum dispersion solver iterations. |
100
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Dimensionless pressure response factor. |
Notes
Wave number is obtained from the linear dispersion relation before calculating the pressure response.
Source code in src/fluidmec/waves/pressure.py
153 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 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | |
wave_hydrostatic_pressure
¶
wave_hydrostatic_pressure(z: ArrayLike, density: ArrayLike = SEAWATER_DENSITY, gravity: ArrayLike = ENGINEERING_GRAVITY) -> ScalarOrArray
Calculate the hydrostatic gauge pressure baseline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
array_like
|
Vertical coordinate below still water level [m]. Must be non-positive. |
required |
density
|
array_like
|
Positive constant fluid density [kg/m^3]. |
SEAWATER_DENSITY
|
gravity
|
array_like
|
Positive gravitational acceleration [m/s^2]. |
ENGINEERING_GRAVITY
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Hydrostatic gauge pressure [Pa]. |
Notes
p_h = -rhogz.
Atmospheric pressure is excluded.
This function uses the upward-positive wave coordinate convention. Water-column depth validation is performed by the wave pressure functions that accept water depth.
Source code in src/fluidmec/waves/pressure.py
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 | |
wave_pressure_amplitude
¶
wave_pressure_amplitude(amplitude: ArrayLike, wave_number: ArrayLike, z: ArrayLike, depth: ArrayLike, density: ArrayLike = SEAWATER_DENSITY, gravity: ArrayLike = ENGINEERING_GRAVITY) -> ScalarOrArray
Calculate the amplitude of wave-induced pressure.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amplitude
|
array_like
|
Non-negative surface wave amplitude a [m]. |
required |
wave_number
|
array_like
|
Positive angular wave number k [rad/m]. |
required |
z
|
array_like
|
Vertical coordinate [m], with -depth <= z <= 0. |
required |
depth
|
array_like
|
Positive water depth [m]. |
required |
density
|
array_like
|
Positive constant fluid density [kg/m^3]. |
SEAWATER_DENSITY
|
gravity
|
array_like
|
Positive gravitational acceleration [m/s^2]. |
ENGINEERING_GRAVITY
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Non-negative wave pressure amplitude Pa [Pa]. |
Notes
Pa = rhoga*Kp.
The peak-to-peak pressure range of a regular monochromatic wave is twice this amplitude.
Source code in src/fluidmec/waves/pressure.py
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 | |
wave_dynamic_pressure
¶
wave_dynamic_pressure(amplitude: ArrayLike, x: ArrayLike, z: ArrayLike, time: ArrayLike, wave_number: ArrayLike, depth: ArrayLike, density: ArrayLike = SEAWATER_DENSITY, gravity: ArrayLike = ENGINEERING_GRAVITY, *, phase_offset: ArrayLike = 0.0) -> ScalarOrArray
Calculate instantaneous wave-induced pressure perturbation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amplitude
|
array_like
|
Non-negative wave amplitude a [m]. |
required |
x
|
array_like
|
Horizontal evaluation coordinate [m]. |
required |
z
|
array_like
|
Vertical evaluation coordinate [m]. Must satisfy -depth <= z <= 0. |
required |
time
|
array_like
|
Evaluation time [s]. |
required |
wave_number
|
array_like
|
Positive angular wave number k [rad/m]. |
required |
depth
|
array_like
|
Positive water depth [m]. |
required |
density
|
array_like
|
Positive constant fluid density [kg/m^3]. |
SEAWATER_DENSITY
|
gravity
|
array_like
|
Positive gravitational acceleration [m/s^2]. |
ENGINEERING_GRAVITY
|
phase_offset
|
array_like
|
Initial wave phase offset [rad]. |
0.0
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Signed wave-induced pressure perturbation [Pa]. |
Notes
p' = rhogaKpcos(theta).
theta = kx - omegat + phase_offset.
Angular frequency is obtained from the linear dispersion relation.
This is the first-order unsteady Bernoulli pressure, not the velocity-based dynamic pressure rho*U**2/2.
Source code in src/fluidmec/waves/pressure.py
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 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 | |
wave_gauge_pressure
¶
wave_gauge_pressure(amplitude: ArrayLike, x: ArrayLike, z: ArrayLike, time: ArrayLike, wave_number: ArrayLike, depth: ArrayLike, density: ArrayLike = SEAWATER_DENSITY, gravity: ArrayLike = ENGINEERING_GRAVITY, *, phase_offset: ArrayLike = 0.0) -> ScalarOrArray
Calculate first-order total gauge pressure.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amplitude
|
array_like
|
Non-negative wave amplitude [m]. |
required |
x
|
array_like
|
Horizontal and vertical coordinates [m]. The vertical coordinate must satisfy -depth <= z <= 0. |
required |
z
|
array_like
|
Horizontal and vertical coordinates [m]. The vertical coordinate must satisfy -depth <= z <= 0. |
required |
time
|
array_like
|
Evaluation time [s]. |
required |
wave_number
|
array_like
|
Positive wave number [rad/m]. |
required |
depth
|
array_like
|
Positive water depth [m]. |
required |
density
|
array_like
|
Positive fluid density [kg/m^3]. |
SEAWATER_DENSITY
|
gravity
|
array_like
|
Positive gravitational acceleration [m/s^2]. |
ENGINEERING_GRAVITY
|
phase_offset
|
array_like
|
Initial wave phase offset [rad]. |
0.0
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Hydrostatic plus wave-induced gauge pressure [Pa]. |
Notes
p_g = -rhogz + p'.
The linearised field is not clipped at zero pressure. Evaluation near the moving free surface may fall outside the instantaneous physical water column.
Source code in src/fluidmec/waves/pressure.py
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 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 | |
wave_absolute_pressure
¶
wave_absolute_pressure(amplitude: ArrayLike, x: ArrayLike, z: ArrayLike, time: ArrayLike, wave_number: ArrayLike, depth: ArrayLike, density: ArrayLike = SEAWATER_DENSITY, gravity: ArrayLike = ENGINEERING_GRAVITY, *, atmospheric_pressure: ArrayLike = ATMOSPHERIC_PRESSURE, phase_offset: ArrayLike = 0.0) -> ScalarOrArray
Calculate first-order absolute pressure beneath a wave.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amplitude
|
array_like
|
Non-negative wave amplitude [m]. |
required |
x
|
array_like
|
Horizontal and vertical coordinates [m]. The vertical coordinate must satisfy -depth <= z <= 0. |
required |
z
|
array_like
|
Horizontal and vertical coordinates [m]. The vertical coordinate must satisfy -depth <= z <= 0. |
required |
time
|
array_like
|
Evaluation time [s]. |
required |
wave_number
|
array_like
|
Positive wave number [rad/m]. |
required |
depth
|
array_like
|
Positive water depth [m]. |
required |
density
|
array_like
|
Positive fluid density [kg/m^3]. |
SEAWATER_DENSITY
|
gravity
|
array_like
|
Positive gravitational acceleration [m/s^2]. |
ENGINEERING_GRAVITY
|
atmospheric_pressure
|
array_like
|
Non-negative atmospheric pressure reference [Pa]. |
ATMOSPHERIC_PRESSURE
|
phase_offset
|
array_like
|
Initial wave phase offset [rad]. |
0.0
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Absolute pressure predicted by linear theory [Pa]. |
Notes
p_abs = p_atm + p_h + p'.
No cavitation model or nonlinear free-surface correction is included. The caller is responsible for assessing physical applicability.
Source code in src/fluidmec/waves/pressure.py
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 | |
pressure_correction_factor
¶
pressure_correction_factor(wave_number: ArrayLike, z: ArrayLike, depth: ArrayLike, *, minimum_response: float = DEFAULT_MINIMUM_RESPONSE) -> ScalarOrArray
Calculate the inverse pressure response factor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
wave_number
|
array_like
|
Positive wave number [rad/m]. |
required |
z
|
array_like
|
Sensor elevation [m], with -depth <= z <= 0. |
required |
depth
|
array_like
|
Positive water depth [m]. |
required |
minimum_response
|
float
|
Minimum accepted dimensionless pressure response. Must satisfy 0 < minimum_response <= 1. Default is 0.1, corresponding to a maximum correction gain of 10. |
DEFAULT_MINIMUM_RESPONSE
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Dimensionless pressure correction gain 1/Kp. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If any pressure response is below the specified minimum or if the result is nonfinite. |
Notes
Small responses amplify measurement noise. The threshold is a configurable software safeguard, not a universal engineering design criterion. Responses are rejected rather than clipped.
Source code in src/fluidmec/waves/pressure.py
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 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 | |
surface_elevation_from_pressure
¶
surface_elevation_from_pressure(pressure_perturbation: ArrayLike, wave_number: ArrayLike, z: ArrayLike, depth: ArrayLike, density: ArrayLike = SEAWATER_DENSITY, gravity: ArrayLike = ENGINEERING_GRAVITY, *, minimum_response: float = DEFAULT_MINIMUM_RESPONSE) -> ScalarOrArray
Reconstruct surface elevation from wave pressure.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pressure_perturbation
|
array_like
|
Signed wave-induced pressure perturbation [Pa]. Hydrostatic and atmospheric components must already have been removed. |
required |
wave_number
|
array_like
|
Positive wave number [rad/m]. |
required |
z
|
array_like
|
Sensor elevation [m], with -depth <= z <= 0. |
required |
depth
|
array_like
|
Positive water depth [m]. |
required |
density
|
array_like
|
Positive constant fluid density [kg/m^3]. |
SEAWATER_DENSITY
|
gravity
|
array_like
|
Positive gravitational acceleration [m/s^2]. |
ENGINEERING_GRAVITY
|
minimum_response
|
float
|
Minimum accepted pressure response factor. |
DEFAULT_MINIMUM_RESPONSE
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Reconstructed signed surface elevation [m]. |
Notes
eta = p'/(rhogKp).
This monochromatic reconstruction assumes known wave number and constant sensor elevation.
Source code in src/fluidmec/waves/pressure.py
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 | |
wave_height_from_pressure_amplitude
¶
wave_height_from_pressure_amplitude(pressure_amplitude: ArrayLike, wave_number: ArrayLike, z: ArrayLike, depth: ArrayLike, density: ArrayLike = SEAWATER_DENSITY, gravity: ArrayLike = ENGINEERING_GRAVITY, *, minimum_response: float = DEFAULT_MINIMUM_RESPONSE) -> ScalarOrArray
Reconstruct regular wave height from pressure amplitude.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pressure_amplitude
|
array_like
|
Non-negative amplitude of wave pressure [Pa]. This is half the peak-to-peak pressure range. |
required |
wave_number
|
array_like
|
Positive wave number [rad/m]. |
required |
z
|
array_like
|
Sensor elevation [m], with -depth <= z <= 0. |
required |
depth
|
array_like
|
Positive water depth [m]. |
required |
density
|
array_like
|
Positive fluid density [kg/m^3]. |
SEAWATER_DENSITY
|
gravity
|
array_like
|
Positive gravitational acceleration [m/s^2]. |
ENGINEERING_GRAVITY
|
minimum_response
|
float
|
Minimum accepted pressure response factor. |
DEFAULT_MINIMUM_RESPONSE
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Reconstructed regular wave height H [m]. |
Notes
H = 2Pa/(rhog*Kp).
This function does not estimate significant wave height from an irregular-wave pressure spectrum.
Source code in src/fluidmec/waves/pressure.py
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 | |
wave_height_from_pressure_range
¶
wave_height_from_pressure_range(pressure_range: ArrayLike, wave_number: ArrayLike, z: ArrayLike, depth: ArrayLike, density: ArrayLike = SEAWATER_DENSITY, gravity: ArrayLike = ENGINEERING_GRAVITY, *, minimum_response: float = DEFAULT_MINIMUM_RESPONSE) -> ScalarOrArray
Reconstruct wave height from peak-to-peak pressure.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pressure_range
|
array_like
|
Non-negative peak-to-peak pressure range [Pa]. |
required |
wave_number
|
array_like
|
Positive wave number [rad/m]. |
required |
z
|
array_like
|
Sensor elevation [m], with -depth <= z <= 0. |
required |
depth
|
array_like
|
Positive water depth [m]. |
required |
density
|
array_like
|
Positive fluid density [kg/m^3]. |
SEAWATER_DENSITY
|
gravity
|
array_like
|
Positive gravitational acceleration [m/s^2]. |
ENGINEERING_GRAVITY
|
minimum_response
|
float
|
Minimum accepted pressure response factor. |
DEFAULT_MINIMUM_RESPONSE
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Reconstructed regular wave height [m]. |
Notes
H = pressure_range/(rhogKp).
The pressure range must represent the wave-induced peak-to-peak variation of a regular wave.
Source code in src/fluidmec/waves/pressure.py
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 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 | |
extract_wave_pressure
¶
extract_wave_pressure(measured_pressure: ArrayLike, z: ArrayLike, density: ArrayLike = SEAWATER_DENSITY, gravity: ArrayLike = ENGINEERING_GRAVITY, *, atmospheric_pressure: ArrayLike = 0.0) -> ScalarOrArray
Remove hydrostatic and atmospheric pressure baselines.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
measured_pressure
|
array_like
|
Finite measured gauge or absolute pressure [Pa]. |
required |
z
|
array_like
|
Non-positive sensor elevation relative to SWL [m]. |
required |
density
|
array_like
|
Positive constant fluid density [kg/m^3]. |
SEAWATER_DENSITY
|
gravity
|
array_like
|
Positive gravitational acceleration [m/s^2]. |
ENGINEERING_GRAVITY
|
atmospheric_pressure
|
array_like
|
Atmospheric reference pressure [Pa]. Use zero for a gauge-pressure sensor. Supply measured atmospheric pressure for an absolute-pressure sensor. |
0.0
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Signed pressure perturbation [Pa]. |
Notes
p' = p_measured - p_atm - p_h.
This function assumes the sensor elevation and hydrostatic reference are known. Tidal changes, sensor drift and other low-frequency components are not automatically removed.
Source code in src/fluidmec/waves/pressure.py
760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 | |
References¶
Dean, R. G. and Dalrymple, R. A. (1991). Water Wave Mechanics for Engineers and Scientists. World Scientific.