|
1 | | -#ifndef HYDRO_FORCES_H |
2 | | -#define HYDRO_FORCES_H |
3 | | - |
4 | 1 | /********************************************************************* |
5 | 2 | * @file hydro_forces.h |
| 3 | + * @brief HydroForces façade: attaches hydrodynamic forces to Chrono bodies. |
6 | 4 | * |
7 | | - * @brief Header file of HydroForces main class and helper classes |
8 | | - * ComponentFunc and ForceFunc6d. |
9 | | - * |
10 | | - * ARCHITECTURE: |
11 | | - * HydroForces is a thin adapter over HydroSystem + ChronoHydroCoupler. |
12 | | - * Force computation is handled internally by HydroSystem, which owns: |
13 | | - * - HydrostaticsComponent (restoring forces + buoyancy) |
14 | | - * - RadiationComponent (RIRF convolution, owns velocity history) |
15 | | - * - ExcitationComponent (wave forcing) |
16 | | - * |
17 | | - * The sign convention is: total = hydrostatics - radiation + waves. |
18 | | - * (RadiationComponent applies the negative sign internally since damping |
19 | | - * opposes motion.) |
| 5 | + * MAIN TYPES: |
| 6 | + * - HydroForces: Primary hydrodynamics façade (adapter over HydroSystem) |
| 7 | + * - ForceFunc6d: Wraps 6-DOF force/torque callbacks per body |
| 8 | + * - ComponentFunc: Per-DOF force function for Chrono's ChForce system |
20 | 9 | * |
21 | | - * MAIN RESPONSIBILITIES: |
22 | | - * - HydroForces: Façade over HydroSystem; provides Chrono force callbacks |
23 | | - * - ForceFunc6d: Wraps 6-DOF force/torque callbacks for Chrono bodies |
24 | | - * - ComponentFunc: Per-DOF force function for Chrono's ChForce system |
| 10 | + * ROLE: This is the main entry point for C++ usage. Internally delegates |
| 11 | + * to HydroSystem (Chrono-free core) and ChronoHydroCoupler. Used by both |
| 12 | + * C++ tests/demos and the YAML runner (hydrochrono.exe). |
25 | 13 | * |
26 | | - * COMPONENT CONSTRUCTION: |
27 | | - * Force components are constructed via factory methods: |
28 | | - * - CreateHydrostaticsComponent() |
29 | | - * - CreateRadiationComponent() |
30 | | - * - CreateExcitationComponent() |
31 | | - * These are the single source of truth for component configuration. |
32 | | - * |
33 | | - * INTERACTIONS: |
34 | | - * - Used by setup_hydro_from_yaml to create and configure HydroForces instances |
35 | | - * - Called by Chrono during simulation via ChForce callbacks |
36 | | - * - Reads HDF5 data through H5FileInfo (not directly exposed here) |
37 | | - * - Uses WaveBase hierarchy for wave excitation (passed in constructor) |
38 | | - * |
39 | | - * KEY ASSUMPTIONS: |
40 | | - * - Bodies are 1-indexed in CoordinateFuncForBody (legacy, from ForceFunc6d) |
41 | | - * - All bodies share same H5 file (multibody data in single file) |
42 | | - * - 6 DOF per body (surge, sway, heave, roll, pitch, yaw) |
43 | | - * - Forces computed once per time step and cached via prev_time check |
| 14 | + * KEY ASSUMPTIONS: 6 DOF per body, bodies named "body1", "body2", etc. |
44 | 15 | *********************************************************************/ |
45 | 16 |
|
| 17 | +#ifndef HYDRO_FORCES_H |
| 18 | +#define HYDRO_FORCES_H |
| 19 | + |
46 | 20 | // Include hydro_types.h FIRST to ensure BodyForces and GeneralizedForce are available |
47 | 21 | // before any other includes that might conflict (e.g., config/hydro_config.h) |
48 | 22 | #include <hydroc/core/hydro_types.h> |
|
0 commit comments