spectral_galerkin_heat.physics.spectral_cpu_kernels
CPU-based spectral method kernels for the heat equation.
Public functions in this module are called by SpectralSolver (NumpyBackend):
- update_modes_etd1: Time integration step
- compute_latent_heat_source: Latent heat and evaporation effects
- reconstruct_surface_temperature: Extract solution on top surface
Classes
CPU spectral state: |
Functions
|
Update spectral coefficients for ETD1 scheme. |
|
Accumulate volumetric source term into temperature modes. |
|
Accumulate a surface source at z=0 into temperature modes. |
Module Contents
- class spectral_galerkin_heat.physics.spectral_cpu_kernels.SpectralSolverState(phys, geom, num, fine)
Bases:
spectral_galerkin_heat.physics.spectral_state.SpectralSolverStateCPU spectral state:
spectral_state.SpectralSolverStatebound to NumPy.
- spectral_galerkin_heat.physics.spectral_cpu_kernels.update_modes_etd1(aK, KK, Cp_broadcast, B_scaled, a_temp_out)
Update spectral coefficients for ETD1 scheme. Calculates: a_out = aK + (KK * Cp) * B_scaled
- spectral_galerkin_heat.physics.spectral_cpu_kernels.add_source_term_modes(a_temp, KK, Q_modes)
Accumulate volumetric source term into temperature modes. a_temp += KK * Q_modes
- spectral_galerkin_heat.physics.spectral_cpu_kernels.add_bottom_surface_source(a_temp, KK, Cp_broadcast_bottom, B_scaled)
Accumulate a surface source at z=0 into temperature modes. a_temp[p,:,:] += KK[p,:,:] * Cp_bottom[p] * B_scaled[:,:]