Offshore Hydrodynamic Visualisation¶
Fluidmec provides engineering visualisation tools for fixed offshore jacket structures subjected to regular waves and prescribed steady currents.
Installation¶
pip install "fluidmec[visualization]"
Quick start¶
import numpy as np
from fluidmec.hydrodynamics import (
generate_jacket,
jacket_load_history,
)
from fluidmec.visualization import (
plot_jacket_loading,
plot_hydrodynamic_dashboard,
)
jacket = generate_jacket(
depth=40,
base_width=30,
base_length=30,
)
result = jacket_load_history(
jacket,
time=np.linspace(0, 8, 256, endpoint=False),
wave_height=2,
period=8,
current_velocity=1,
wave_direction=30,
)
fig, ax = plot_jacket_loading(jacket, result)
fig.savefig("jacket_loading.png", dpi=300)
Available functionality¶
- Three-dimensional jacket geometry.
- Member force magnitude calculations.
- Member overturning moment calculations.
- Structural loading colour maps.
- Member resultant force vectors.
- Global structural load histories.
- Signed structural group contributions.
- Directional loading envelopes.
- Spatial and temporal convergence studies.
- Combined engineering dashboards.
- Animated offshore hydrodynamic loading.
Physical conventions¶
| Quantity | Unit |
|---|---|
| Length | m |
| Time | s |
| Velocity | m/s |
| Acceleration | m/s² |
| Force | N |
| Moment | N m |
| Density | kg/m³ |
| Wave direction | degrees |
| Phase offset | radians |
The vertical coordinate is positive upwards, with the mean water surface at z = 0.
Wave direction is measured from positive x towards positive y.
Plots may display forces in kN or MN and moments in MN m.
Member force magnitude¶
The resultant member force is
Member loading plots use a fixed colour scale based on the maximum member force across the supplied time history.
Overturning moment¶
The horizontal overturning moment magnitude is
Structural group contributions are projected onto the global horizontal moment direction at the critical loading time.
Negative contributions represent opposing moments.
Numerical convergence¶
Spatial quadrature and temporal sampling are varied independently against a highly resolved numerical reference.
The relative percentage error is
Numerical convergence does not establish experimental accuracy.
Assumptions and limitations¶
- Fixed rigid structural members.
- Linear regular-wave kinematics.
- Morison-equation hydrodynamic loading.
- Prescribed steady current interaction.
- No structural deformation or dynamic response.
- No wake shielding or diffraction modelling.
- Force arrows originate at illustrative member midpoints.
- Structural centre lines do not represent cylinder surfaces.
- Directional envelopes depend on angular sampling resolution.
- Closed polar plots assume a complete directional sweep.
- Animations display precomputed numerical results.
- Numerical convergence is not experimental validation.
API reference¶
Numerical data processing¶
fluidmec.visualization.hydrodynamic_data
¶
Numerical data processing for hydrodynamic visualisation.
member_force_magnitudes
¶
member_force_magnitudes(forces: ArrayLike) -> np.ndarray
Calculate resultant member force magnitudes in N.
Source code in src/fluidmec/visualization/hydrodynamic_data.py
25 26 27 28 29 30 31 32 33 34 | |
member_moment_magnitudes
¶
member_moment_magnitudes(moments: ArrayLike) -> np.ndarray
Calculate horizontal overturning magnitudes in N m.
Source code in src/fluidmec/visualization/hydrodynamic_data.py
37 38 39 40 41 42 43 44 45 46 | |
hydrodynamic_convergence_data
¶
hydrodynamic_convergence_data(jacket, *, wave_height, period, spatial_points=(4, 8, 16, 32, 64), temporal_samples=(16, 32, 64, 128, 256, 512), reference_points=128, reference_samples=1024, **parameters)
Evaluate spatial and temporal load convergence.
Spatial and temporal resolutions are varied independently against a highly resolved numerical reference solution.
Source code in src/fluidmec/visualization/hydrodynamic_data.py
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 86 87 88 89 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 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 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |
Engineering plots¶
fluidmec.visualization.hydrodynamic_plots
¶
Engineering plots for offshore hydrodynamic loading.
plot_jacket_geometry
¶
plot_jacket_geometry(jacket, *, ax=None)
Plot jacket centre lines by structural group.
Source code in src/fluidmec/visualization/hydrodynamic_plots.py
130 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 158 159 160 161 162 163 164 165 166 167 | |
plot_jacket_loading
¶
plot_jacket_loading(jacket, result, *, frame=None, cmap='viridis', ax=None, colorbar=True)
Colour members by resultant force magnitude in kN.
Source code in src/fluidmec/visualization/hydrodynamic_plots.py
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 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | |
plot_member_force_vectors
¶
plot_member_force_vectors(jacket, result, *, frame=None, arrow_fraction=0.18, ax=None)
Plot scaled member resultant force vectors.
Arrows originate at member midpoints for illustration. They do not represent exact centres of pressure.
Source code in src/fluidmec/visualization/hydrodynamic_plots.py
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 | |
plot_structure_load_history
¶
plot_structure_load_history(result, *, quantity='overturning', ax=None)
Plot a global structural loading history.
Source code in src/fluidmec/visualization/hydrodynamic_plots.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 | |
plot_group_contributions
¶
plot_group_contributions(result, *, ax=None)
Plot signed group contributions at peak overturning.
Source code in src/fluidmec/visualization/hydrodynamic_plots.py
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 | |
plot_directional_envelope
¶
plot_directional_envelope(envelope, *, quantity='overturning', close=True, ax=None)
Plot a directional peak-load envelope.
Source code in src/fluidmec/visualization/hydrodynamic_plots.py
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 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 | |
plot_load_convergence
¶
plot_load_convergence(data, *, study='spatial', ax=None)
Plot numerical convergence errors.
Source code in src/fluidmec/visualization/hydrodynamic_plots.py
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 | |
plot_hydrodynamic_dashboard
¶
plot_hydrodynamic_dashboard(jacket, result, *, envelope=None, convergence=None)
Create a coordinated six-panel engineering dashboard.
Source code in src/fluidmec/visualization/hydrodynamic_plots.py
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 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 | |
Animation¶
fluidmec.visualization.hydrodynamic_animation
¶
Animated offshore hydrodynamic visualisations.
animate_jacket_loading
¶
animate_jacket_loading(jacket, result, *, wave_height, period, wave_direction=0.0, phase_offset=0.0, gravity=9.81, frames=120, fps=20, cmap='turbo', rotate=True)
Animate jacket loading and simultaneous load histories.
Wave direction is measured in degrees from positive x towards positive y. Phase offset is in radians.
The animation displays precomputed hydrodynamic results. The wave surface is illustrative linear wave kinematics.
Source code in src/fluidmec/visualization/hydrodynamic_animation.py
16 17 18 19 20 21 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 86 87 88 89 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 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 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 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 | |