1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
/// Minimum supported grid dimension along either axis for `WaveHeightfield2D`.
pub const WAKE_MIN_GRID_DIM: usize = 8;
/// Maximum supported grid dimension along either axis for `WaveHeightfield2D`.
pub const WAKE_MAX_GRID_DIM: usize = 512;
/// Default horizontal cell spacing in meters for `WaveHeightfield2D`.
pub const WAKE_DEFAULT_CELL_SIZE_M: f32 = 0.25;
/// Default shallow-water wave propagation speed in meters per second.
pub const WAKE_DEFAULT_WAVE_SPEED_MPS: f32 = 2.4;
/// Default interior viscous wave damping rate per second.
pub const WAKE_DEFAULT_DAMPING: f32 = 0.35;
/// Default perimeter absorbing sponge width in grid cells.
pub const WAKE_DEFAULT_SPONGE_WIDTH: usize = 4;
/// Default absorbing sponge damping coefficient at grid boundaries.
pub const WAKE_DEFAULT_SPONGE_STRENGTH: f32 = 4.5;
/// Default wake foam exponential decay rate per second.
pub const WAKE_DEFAULT_FOAM_DECAY: f32 = 1.6;
/// Maximum Courant-Friedrichs-Lewy number permitted per explicit Verlet substep.
pub const WAKE_MAX_CFL_NUMBER: f32 = 0.42;
/// Maximum time step accepted per `step` call before clamping for stability.
pub const WAKE_MAX_DT_SECS: f32 = 0.05;
/// Maximum substeps executed within a single `step` invocation.
pub const WAKE_MAX_SUBSTEPS: usize = 16;
/// Absolute wave displacement clamp in meters guarding against numerical blowup.
pub const WAKE_HEIGHT_CLAMP_M: f32 = 10.0;
/// Minimum vertical surface speed in meters per second that generates wake foam.
pub const WAKE_FOAM_VELOCITY_THRESHOLD: f32 = 0.45;
/// Foam accumulation multiplier applied to energetic surface ripples.
pub const WAKE_FOAM_GAIN: f32 = 0.65;
/// Default asset name used when generating a `Mesh3D` from `WaveHeightfield2D`.
pub const WAKE_DEFAULT_MESH_NAME: &str = "wave_heightfield_2d";