Skip to content

Investigate 64³ resolution instability anomaly in Alfvénic cascade #82

@anjor

Description

@anjor

Problem

The 64³ resolution exhibits anomalous instability requiring 10× stronger dissipation (η=20.0) compared to expected scaling from 32³ (η~1.5). This contrasts with 128³ which follows expected scaling (η=2.0).

Evidence from PR #81

Systematic parameter search showed 7 failed attempts before finding stable parameters:

Attempt η r amp Result
1 0.5 4 1.0 Blowup (~1.4×10⁶)
2 0.5 4 0.1 Blowup
3 5.0 4 0.1 Catastrophic (1.6×10²⁷)
4 1.5 2 0.8 NaN at t=2.1 τ_A
5 2.5 2 0.05 NaN at t=14.8 τ_A
6 8.0 2 0.05 NaN at t=20.4 τ_A
7 20.0 2 0.05 Stable to 40 τ_A
8 20.0 2 0.01 Stable to 100 τ_A ✅

Current workaround: η=20.0 with gentle forcing (amplitude=0.01) produces correct k⊥^(-5/3) spectra but is not a fundamental solution.

Possible Root Causes

1. Wavenumber Resonance

  • Forcing at k=1,2 may resonate with dealiased modes at k~21 (2/3 cutoff of N=64)
  • Specific mode interactions at this resolution?
  • Check if 48³ or 80³ exhibit similar behavior

2. Critical Balance Violation

  • τ_nl ~ τ_A condition may fail at specific k⊥ range for 64³
  • Need to verify eddy turnover time vs Alfvén time across scales
  • Compare (k⊥v⊥)^(-1) vs (k∥v_A)^(-1) at different resolutions

3. Dealiasing Issues

  • 2/3 cutoff at k_max = (N-1)//3 may have resolution-dependent artifacts
  • For N=64: k_max=21, for N=128: k_max=42
  • Could be specific to how nonlinear terms alias at this boundary

4. CFL/Courant Number

  • Max CFL = max(|u|)·dt/dx may exceed stability threshold
  • Need to log max velocity and check if approaching CFL limit
  • Timestep dt~0.005 may be inappropriate for 64³ specifically

5. Aliasing Error Accumulation

  • Energy may leak from inertial range to Nyquist modes
  • Accumulation over time causes instability
  • Exponential growth near k_max that normalized dissipation can't control

Recommended Investigation

Diagnostic Logging (High Priority)

Add to alfvenic_cascade_benchmark.py:

# After each timestep
max_velocity = jnp.max(jnp.abs(irfftn(state.z_plus + state.z_minus)))
cfl = max_velocity * dt / dx
max_nonlinear = jnp.max(jnp.abs(poisson_bracket(...)))

print(f"Max CFL: {cfl:.4f}, Max nonlinear: {max_nonlinear:.2e}")

Resolution Sweep (Medium Priority)

Run at intermediate resolutions:

  • 48³: Between 32³ and 64³
  • 80³: Between 64³ and 128³
  • Check if anomaly is specific to N=64 or gradual transition

Wavenumber Analysis (Medium Priority)

# After forcing
forcing_spectrum = jnp.abs(state.z_plus)**2
plt.semilogy(k_perp, forcing_spectrum, label='After forcing')
# Check for unexpected energy at high k

Critical Balance Check (Low Priority)

# Compute eddy turnover time
tau_nl = 1 / (k_perp * v_perp)
tau_A = 1 / (k_parallel * v_A)
print(f"τ_nl/τ_A ratio: {tau_nl/tau_A}")  # Should be ~1

Success Criteria

  • Identify root cause of 64³ instability
  • Either fix instability OR document as intrinsic limitation
  • Determine if intermediate resolutions (48³, 80³) have similar issues
  • If fixable, reduce η from 20.0 to expected ~1.5

References

Related Code

  • examples/alfvenic_cascade_benchmark.py:115-125 (64³ parameters)
  • src/krmhd/timestepping.py:444-456 (normalized hyper-dissipation)
  • src/krmhd/physics.py:z_plus_rhs() (nonlinear terms)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions