Skip to content

Commit 9ed4224

Browse files
authored
Merge pull request #84 from Project-SEA-Stack/release/v0.5
Release v0.5
2 parents c16016c + 7e7de96 commit 9ed4224

69 files changed

Lines changed: 478714 additions & 48568 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.5.0] — 2026-02-16
9+
10+
### Added
11+
12+
- **VSG free-surface visualization** — animated water-surface mesh driven by the wave model, with per-vertex normals and configurable grid resolution (`vsg_water_surface`)
13+
- **Radiated wave overlay** — visualization of body-generated wave patterns layered on the free surface (`vsg_radiation_surface`)
14+
- **PBR ocean materials, scene lighting, and GUI stats component** — new modules `vsg_materials`, `vsg_lighting`, `vsg_gui_component`, `vsg_config`
15+
- **Wave model API extensions**`GetElevationGradientXY()` and `GetElevationForVisualization()` added to `WaveBase`, `RegularWave`, and `IrregularWave`
16+
- **Added-mass determinism unit test**`test_added_mass_determinism` verifies bit-identical added-mass assembly across independent trials and sweeps all Chrono solver types
17+
- **Regression tests produce HDF5 output** validated by external Python comparison scripts; tests now run fully headless (all GUI/visualization code stripped from test builds)
18+
- **CPack packaging** — project DLLs (`HydroChrono`, `HydroChronoGUI`) now included in the installer ZIP
19+
- **OpenMP runtime** (`vcomp140.dll`) explicitly installed for MSVC packages
20+
- **Chrono DLL collection** changed to glob all DLLs from Chrono's bin directory, capturing transitive VSG/yaml-cpp/draco dependencies
21+
22+
### Changed
23+
24+
- **Switched added-mass implementation to Chrono's built-in `ChLoadHydrodynamics`** — replaces HydroChrono's legacy `ChLoadAddedMass` (`ChLoadCustomMultiple`-based) as the default. The legacy implementation is retained in the codebase and can be re-activated by uncommenting `#define HYDROCHRONO_USE_LEGACY_ADDED_MASS` in `hydro_system.h`.
25+
- Default solver changed from GMRES to SPARSE_QR for most regression tests (faster, deterministic)
26+
- Irregular wave surface evaluation performance improved (parallelism and caching)
27+
- Regression test report generator now correctly parses CTest logs for PASS/FAIL status instead of assuming PASS when plots exist
28+
29+
### Fixed
30+
31+
- **YAML runner: `LoadSolverData` never called** — YAML structure mismatch prevented solver data from being loaded
32+
- **YAML runner: mesh file paths broken**`m_script_directory` was empty, breaking relative `model_file:` paths
33+
- **Regression report image paths** — report generator now computes correct relative paths to plot images instead of using hardcoded paths
34+
- OSWEC solver switched from SPARSE_QR to GMRES to prevent divergence (see Known Issues)
35+
- RM3 decay test fixes and cleanup
36+
- Sphere irregular wave test default arguments corrected
37+
- **Regular wave excitation phase indexing for multi-body systems**`RegularWave::GetForceAtTime()` used `excitation_force_phase_[rowEx]` instead of `excitation_force_phase_[body_offset + rowEx]`, causing body 2+ to use body 1's excitation phase. This affected the RM3 plate (and any second+ body) heave response in regular waves. Single-body models (e.g., sphere) were unaffected.
38+
39+
### Known Issues
40+
41+
- **OSWEC tests use GMRES solver.** OSWEC demos and tests use GMRES rather than SPARSE_QR. SPARSE_QR may work for OSWEC but has not yet been validated.
42+
- **PSOR solver cannot handle added-mass assembly.** The added-mass determinism unit test solver sweep reports that PSOR errors out because it cannot handle stiffness/damping matrices. All other swept solvers (SPARSE_QR, SPARSE_LU, MINRES, GMRES, BICGSTAB, BARZILAIBORWEIN, APGD) pass assembly.
43+
44+
## [0.4.0] — 2025
45+
46+
- YAML-driven CLI (`run_hydrochrono`) for running simulations from text-based configuration files
47+
- Cummins-equation time-domain solver with BEM hydrodynamic coefficients (BEMIO HDF5 format)
48+
- Multibody system support via Project Chrono (bodies, joints, actuators)
49+
- Irrlicht run-time visualization (optional)
50+
- HDF5 output for post-processing and validation
51+
- Regression test suite (IEA sphere, OSWEC, RM3, F3OF / DeepCWind)
52+
- Windows installer (ZIP) via CPack

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ endif()
2020
# ===============================================================================
2121

2222
project(HydroChrono
23-
VERSION 0.4.0
23+
VERSION 0.5.0
2424
DESCRIPTION "Hydrodynamics for Project Chrono."
2525
LANGUAGES CXX
2626
)
@@ -303,6 +303,7 @@ set(HC_SOURCES
303303
src/hydro/radiation/radiation_rirf_convolution.cpp
304304
src/hydro/core/hydro_forces.cpp
305305
# Chrono coupling layer (bridges Chrono physics with Chrono-free core)
306+
src/hydro/chrono/added_mass.cpp
306307
src/hydro/chrono/chrono_state_utils.cpp
307308
src/hydro/chrono/chrono_hydro_coupler.cpp
308309
src/hydro/force_components/hydrostatics_component.cpp
@@ -325,6 +326,7 @@ set(HC_HEADERS
325326
include/hydroc/core/hydro_forces.h
326327
include/hydroc/core/hydro_types.h
327328
include/hydroc/core/system_state.h
329+
include/hydroc/coupling/added_mass.h
328330
include/hydroc/coupling/chrono_coupler.h
329331
include/hydroc/io/h5_reader.h
330332
include/hydroc/io/h5_writer.h

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
<p align="center">
33
<img src="docs/assets/img/hydrochrono_banner.png" />
44
<br/>
5-
<a href="https://github.com/NREL/HydroChrono/releases"><img src="https://img.shields.io/badge/version-v0.4-blue.svg" /></a>
5+
<a href="https://github.com/NREL/HydroChrono/releases"><img src="https://img.shields.io/badge/version-v0.5-blue.svg" /></a>
66
<a href="#"><img src="https://img.shields.io/badge/status-Prototype-orange.svg" /></a>
77
</p>
88

9-
> ⚠️ HydroChrono is under active development (`v0.4` prototype). This early release focuses on a YAML‑driven CLI and portable HDF5 outputs so you can try the code and share feedback. Expect rapid iteration over the coming year (inc. more advanced PTO, control, mooring & hydrodynamics) — please get in touch if you have any issues or feature requests.
9+
> ⚠️ HydroChrono is under active development (`v0.5` prototype). This early release focuses on a YAML‑driven CLI, real-time VSG visualization with animated free-surface rendering, and portable HDF5 outputs so you can try the code and share feedback. Expect rapid iteration over the coming year (inc. more advanced PTO, control, mooring & hydrodynamics) — please get in touch if you have any issues or feature requests.
1010
1111

1212
HydroChrono (Hydrodynamics for Project Chrono) is a hydrodynamics simulation toolkit built on [Project Chrono](https://projectchrono.org/). It is designed for simulating wave energy converters (WECs) and other complex ocean systems, and is **100% free and open‑source** end‑to‑end — no proprietary dependencies required. This repo ships a prototype, YAML‑driven CLI app for running simulations and exporting portable results.
@@ -20,6 +20,7 @@ HydroChrono (Hydrodynamics for Project Chrono) is a hydrodynamics simulation too
2020
- Uses Boundary Element Method (BEM) hydrodynamic coefficients (e.g., from [Capytaine](https://github.com/capytaine/capytaine)) to describe added mass, radiation damping, and wave excitation. HydroChrono reads these coefficients from BEMIO‑format HDF5 (.h5) files, an approach familiar to [WEC‑Sim](https://github.com/WEC-Sim/WEC-Sim) users.
2121
- Runs time‑domain simulations via the Cummins equation (impulse‑response/convolution form for radiation effects).
2222
- Builds complex, nonlinear multibody systems using Project Chrono; hydrodynamic loads are currently first‑order, with expanded models planned.
23+
- **Real-time VSG visualization** with animated free-surface rendering driven by the wave model, radiated wave overlays, PBR ocean materials, and interactive GUI stats (new in v0.5).
2324
- Supports a YAML-driven CLI, with logging, GUI and exports portable results to HDF5 for post‑processing and validation.
2425

2526
## Download
@@ -61,7 +62,7 @@ Tips: use `--quiet` to reduce logs, `--debug`/`--trace` for deeper diagnostics.
6162

6263
### GUI Example
6364

64-
Use the GUI to visually inspect the assembled multibody system (bodies, joints, actuators) and verify that YAML inputs are wired correctly. Use the `--nogui` option to disable visualization straight from CLI, or change the settings in the `*.simulation.yaml` file.
65+
Use the GUI to visually inspect the assembled multibody system (bodies, joints, actuators) and verify that YAML inputs are wired correctly. With VSG enabled, the visualization includes an animated free-surface mesh and radiated wave overlays driven by the live wave model. Use the `--nogui` option to disable visualization straight from CLI, or change the settings in the `*.simulation.yaml` file.
6566

6667
<p align="center"><img src="docs/assets/img/gui_example.png" width="40%" /></p>
6768

build.ps1

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ if ($Help) {
7171
Write-Host " .\build.ps1 -Clean -Verbose # Clean build with details"
7272
Write-Host " .\build.ps1 -Package # Build and create ZIP`n"
7373

74+
Write-Host "LONG TESTS:" -ForegroundColor Yellow
75+
Write-Host " Set `$env:HYDROCHRONO_LONG_TESTS='1' before running ctest to use extended"
76+
Write-Host " simulation durations for publication-quality regression reports.`n"
77+
7478
Write-Host "CONFIG FILE:" -ForegroundColor Yellow
7579
Write-Host ' { "ChronoDir": "C:/path/to/chrono/build/cmake" }' -ForegroundColor Gray
7680
Write-Host ""
@@ -361,7 +365,16 @@ Write-Host "BUILD SUCCESSFUL" -ForegroundColor Green
361365
Write-Host "========================================`n" -ForegroundColor Green
362366

363367
Write-Host "Output: $binPath" -ForegroundColor Cyan
368+
Write-Host ""
364369
Write-Host "Tests: ctest -C $BuildType -L regression --test-dir build" -ForegroundColor Gray
365370
Write-Host " ctest -C $BuildType -L unit --test-dir build" -ForegroundColor Gray
366371
Write-Host " Add -V for verbose output, --output-on-failure for failures only" -ForegroundColor DarkGray
367372
Write-Host ""
373+
Write-Host "Long: `$env:HYDROCHRONO_LONG_TESTS='1'" -ForegroundColor Gray
374+
Write-Host " ctest -C $BuildType -L regression --test-dir build" -ForegroundColor Gray
375+
Write-Host " Runs with extended simulation durations" -ForegroundColor DarkGray
376+
Write-Host ""
377+
Write-Host "Report: python tests/regression/utilities/generate_report.py --build-dir build --pdf" -ForegroundColor Gray
378+
Write-Host " Generates regression test report (markdown + PDF) in build/bin/report/" -ForegroundColor DarkGray
379+
Write-Host " Requires: pip install pypandoc (or pandoc on PATH)" -ForegroundColor DarkGray
380+
Write-Host ""
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-22.6 KB
Binary file not shown.
-23.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)