Skip to main content

Module fdtd_fluid

Module fdtd_fluid 

Source
Expand description

QAC Mode 0x0000 (pressure_velocity_continuum) Wire Adapter & 3D Staggered Fluid FDTD Facade.

Re-exports the canonical 3D staggered-grid fluid FDTD/CPML solver and Mode 0x0000 64-byte wire record types from [etalon_sim::acoustics_continuum::fdtd_fluid] and the WGSL compute kernels from [etalon_wgsl_forge::numerical::physics::acoustic_fdtd], adding QAC batch wire codecs and f64 $\leftrightarrow$ f32 GPU state buffer adapters.

Structs§

AcousticFluidFdtdGpuParams
Parameters for a 3D staggered fluid FDTD leapfrog step (ACOUSTIC_FLUID_FDTD_WGSL).
FluidFdtdConfig
Configuration for the 3D staggered-grid fluid acoustic FDTD solver.
FluidFdtdState
Complete restartable state for the 3D staggered fluid acoustic FDTD solver.
FluidMedium
Stationary homogeneous fluid medium parameters (Schema 200 subset).
PressureVelocityRecord
Mode 0x0000 (pressure_velocity_continuum) 64-byte wire record.
StaggeredFluidOffsets
Staggered component offsets in fractions of grid spacing and solver clock ticks (AQ-02).

Enums§

AcousticFluidGpuBoundary
Boundary mode for GPU/CPU f32 staggered fluid FDTD stepping.
FluidBoundaryCondition
Boundary condition kind for the 3D fluid FDTD solver.
NumericalError
Errors raised by QAC numerical continuum and room/dispersion solvers.

Constants§

ACOUSTIC_FLUID_CELL_STRIDE
Scalars per cell in the flat 3D fluid FDTD state buffer: [p, vx, vy, vz].
ACOUSTIC_FLUID_FDTD_ENTRY
Entry-point name of ACOUSTIC_FLUID_FDTD_WGSL.
ACOUSTIC_FLUID_FDTD_WGSL
WGSL compute kernel for 3D staggered-grid fluid acoustic pressure-velocity FDTD.
MODE_PRESSURE_VELOCITY_CONTINUUM
Canonical QAC mode identifier for pressure_velocity_continuum.
PRESSURE_VELOCITY_RECORD_STRIDE
Exact record stride in bytes for Mode 0x0000.
PV_DEFINED_VALIDITY_MASK
Mask of all defined validity bits in Mode 0x0000.
PV_VALID_ENERGY_DENSITY
Validity bit for collocated energy density energy_density_j_m3.
PV_VALID_INTENSITY
Validity bit for collocated acoustic intensity intensity_w_m2.
PV_VALID_POSITION
Validity bit flags for PressureVelocityRecord.
PV_VALID_PRESSURE
Validity bit for acoustic pressure perturbation pressure_pa.
PV_VALID_VELOCITY
Validity bit for particle velocity vector particle_velocity_m_s.

Functions§

acoustic_fluid_fdtd_step_cpu
CPU reference stepper for one full 3D staggered fluid FDTD leapfrog step (ACOUSTIC_FLUID_CELL_STRIDE = 4).
acoustic_fluid_fdtd_step_gpu
Convenience GPU wrapper that allocates a WgpuComputeContext and runs acoustic_fluid_fdtd_step_with_context.
acoustic_fluid_fdtd_step_with_context
Dispatch one full 3D staggered fluid FDTD leapfrog step using a caller-supplied WgpuComputeContext.
collocate_fluid_cell
Interpolate staggered velocities in space and time to cell center (ix, iy, iz) at step $n$.
decode_pressure_velocity_records
Decode a contiguous byte slice of 64-byte Mode 0x0000 wire records into PressureVelocityRecord values.
encode_pressure_velocity_records
Encode a slice of Mode 0x0000 PressureVelocityRecord values into contiguous 64-byte wire records.
evaluate_direct_energy_and_intensity
Evaluate collocated energy density and intensity only when the offsets are collocated; rejects direct multiplication of staggered fields without interpolation (C02 Mode 00).
fluid_config_to_gpu_params
Convert a FluidFdtdConfig into AcousticFluidFdtdGpuParams for WGSL compute execution.
pack_fluid_fdtd_state_f32
Pack a FluidFdtdState into the flat f32 storage buffer layout ([p, vx, vy, vz] per cell) consumed by ACOUSTIC_FLUID_FDTD_WGSL.
step_fluid_fdtd_in_place
Advance the 3D staggered-grid fluid FDTD state by one full leapfrog step $\Delta t$ with zero heap allocations on the hot path.
unpack_fluid_fdtd_state_f32
Unpack a flat f32 storage buffer ([p, vx, vy, vz] per cell) back into a FluidFdtdState.