zoomy_core.model.analysis_linear module

zoomy_core.model.analysis_linear module#

Module zoomy_core.model.analysis_linear.

class zoomy_core.model.analysis_linear.LinearWaveAnalyser(model)#

Bases: object

Lightweight 1D linear-wave analyser for models with symbolic flux/source.

Workflow: 1) Build PDE expressions: d_t(Q) + d_x(F(Q)) - S(Q, D) = 0 2) Insert plane-wave ansatz for selected fields 3) Resolve requested derivative symbols (e.g. d_txx_h) from ansatz 4) Extract O(eps) system and solve for omega, then c = omega / k

linearize_from_quasilinear(base_state, perturbation_functions, assumptions=None, print_steps=True)#
Generic Step 2:
  • Insert q = q0 + eps*q1(t,x) into quasilinear PDE form

  • Expand to O(eps)

solve_phase_velocity_from_linearized(linearized_system, perturbation_functions, assumptions=None, print_steps=True)#
Generic Step 3:
  • Insert q1 = qhat * exp(i(kx - wt)) into already-linearized equations

  • Solve det(A)=0 for omega, return c=omega/k

analyse_phase_velocity(base_state, amplitude_symbols, field_to_amplitude, print_steps=True)#
Parameters:
  • base_state – dict like {“h”: h0, “hu”: hu0}

  • amplitude_symbols – list of unknown amplitudes, e.g. [h1, m1]

  • field_to_amplitude – dict mapping variable name -> amplitude symbol e.g. {“h”: h1, “hu”: m1}