Skip to content

Physics Formulations

LiranOG edited this page May 9, 2026 · 15 revisions

⚛️ Physics Formulations

GRANITE v0.6.8 | ← Parameter Reference | Roadmap →

Complete governing equations with references. For implementation details see docs/DEVELOPER_GUIDE.md §5.


1. Spacetime: CCZ4 Formulation

GRANITE evolves the Einstein field equations G_μν = 8π T_μν using the CCZ4 (Conformal and Covariant Z4) formulation of Alic et al. (2012). CCZ4 extends BSSN by promoting the algebraic constraint Z_μ = 0 to a dynamical field, enabling exponential damping.

Conformal decomposition:

γ̃_ij = χ · γ_ij,   χ = (det γ_ij)^{-1/3}

Evolution equations:

∂_t χ = (2/3) χ (α K − ∂_i β^i) + β^i ∂_i χ

∂_t γ̃_ij = −2α Ã_ij + γ̃_ik ∂_j β^k + γ̃_jk ∂_i β^k
            − (2/3) γ̃_ij ∂_k β^k + β^k ∂_k γ̃_ij

∂_t K = −D_i D^i α + α(Ã_ij Ã^ij + K²/3)
         − κ₁(1+κ₂)αΘ + 4πα(ρ + S) + β^i ∂_i K

∂_t Θ = (1/2)α(R − Ã_ij Ã^ij + (2/3)K²)
          − α Γ̂^μ_{μν} Z^ν − κ₁(2+κ₂)αΘ + β^i ∂_i Θ

Production defaults: κ₁ = 0.02, κ₂ = 0, η = 2.0


2. Gauge Conditions

1+log Slicing (Lapse)

∂_t α = β^i ∂_i α − 2α K

Singularity-avoiding: α → 0 near punctures, preventing evolution from reaching physical singularity.

Gamma-Driver (Shift) — Moving Punctures

∂_t β^i = (3/4) B^i
∂_t B^i = ∂_t Γ̃^i − η B^i

(Campanelli et al. 2006; Baker et al. 2006)

Trumpet geometry: At sufficient resolution (dx < 0.2M) and with ko_sigma = 0.1, the lapse profile forms a trumpet geometry near each puncture. At coarser resolution (dx > 0.5M), the trumpet is unresolved — this is expected behavior, not a bug.


3. GRMHD: Valencia Formulation

The matter sector evolves conserved variables via:

∂_t U + ∂_i F^i(U) = S(U, g_μν)

Conserved variables:

U = √γ · (D, S_j, τ, B^i, D·Y_e)^T

D   = ρ W                               (baryon density)
S_j = ρ h W² v_j + ε_jkl (v^k − β^k/α) B^l √γ/α  (momentum)
τ   = ρ h W² − P − D                    (energy)

Geometric source terms S couple to spacetime via Christoffel symbols evaluated from the CCZ4 GRMetric3 output.


4. Magnetic Field: Constrained Transport

Evolves via the induction equation:

∂_t B^i + ∂_j (v^j B^i − v^i B^j) = 0

subject to: ∂_i B^i = 0 (no magnetic monopoles)

GRANITE enforces ∇·B = 0 to machine precision at all times via Constrained Transport (Evans & Hawley 1988). The magnetic field is stored on cell faces (staggered grid); the CT update guarantees exact discrete divergence = 0.


5. Equations of State

EOS Type Implementation Use Case
Ideal gas (Γ-law) IdealGasEOS(Γ) SMBH mergers (Γ=4/3), validation tests
Tabulated nuclear TabulatedEOS with tri-linear interpolation in (ρ, T, Y_e) Neutron star mergers (v0.8+)

Sound speed is always computed exactly from the EOS — never from a hardcoded Γ (fixed bug C1).


6. Radiation: M1 Moment Closure (Built, Not Active in v0.6.8)

Energy equation:

∂_t E + ∂_i F^i = −κ_a (E − E_eq) + Q_leakage

Flux equation:

∂_t F^i + ∂_j P^ij = −(κ_a + κ_s) F^i

M1 Eddington tensor (Minerbo 1978, Levermore 1984):

P^ij = [(1−ξ)/2] δ^ij E + [(3ξ−1)/2] n^i n^j E

ξ = ξ(f),  f = |F|/(cE)  (radiation flux factor)

⚠️ Status: The M1 module is implemented and tested but is not called in the main RK3 evolution loop in v0.6.8. Radiation physics is completely inactive. Planned for v0.7.


7. Numerical Methods

Spatial Derivatives (4th-order)

(∂_x f)_i = (−f_{i+2} + 8f_{i+1} − 8f_{i−1} + f_{i−2}) / (12 Δx) + O(Δx⁴)

Requires nghost = 4.

Kreiss-Oliger Dissipation

(∂_t u)_KO = −σ (Δx)^{2p-1} / 2^{2p} · D^{2p} u,   p = 3 (6th-order)

σ = 0.1 is the safe default. Never exceed 0.15.

SSP-RK3 (Shu & Osher 1988)

U^(1)   = U^n + Δt L(U^n)
U^(2)   = (3/4) U^n + (1/4) [U^(1) + Δt L(U^(1))]
U^(n+1) = (1/3) U^n + (2/3) [U^(2) + Δt L(U^(2))]

Reconstruction Schemes

Scheme Order Stencil Use case
PLM (Piecewise Linear Method) 2nd 3 cells Quick tests
PPM (Colella & Woodward 1984) 3rd 4 cells Contact discontinuities
MP5 (Suresh & Huynh 1997) 5th 6 cells Production default

Riemann Solvers

Solver Physics Notes
HLLE GR-aware (uses actual GRMetric3) Fixed C3; fast but diffusive
HLLD (Miyoshi & Kusano 2005) All 7 MHD wave families Preferred for MHD accuracy

8. Full Reference List

Reference Used in GRANITE
Alic et al. 2012, PRD 85, 064040 CCZ4 formulation
Baker et al. 2006, PRL 96, 111102 Moving punctures
Berger & Oliger 1984, J. Comput. Phys. 53, 484 AMR + subcycling
Bona et al. 1995, PRL 75, 600 1+log slicing
Brandt & Brügmann 1997, PRL 78, 3606 Two-Punctures ID
Campanelli et al. 2006, PRL 96, 111101 Moving punctures / Gamma-driver
Colella & Woodward 1984, J. Comput. Phys. 54, 174 PPM reconstruction
Evans & Hawley 1988, ApJ 332, 659 Constrained transport
Levermore 1984, J. Quant. Spectrosc. Radiat. Transfer 31, 149 M1 closure
Minerbo 1978, J. Quant. Spectrosc. Radiat. Transfer 20, 541 Eddington factor
Miyoshi & Kusano 2005, J. Comput. Phys. 208, 315 HLLD Riemann solver
Nakano et al. 2015, PRD 91, 104022 Ψ₄ extrapolation
Reisswig & Pollney 2011, CQG 28, 195015 Fixed-frequency GW integration
Shu & Osher 1988, J. Comput. Phys. 77, 439 SSP-RK3
Suresh & Huynh 1997, J. Comput. Phys. 136, 83 MP5 reconstruction

See also: Architecture Overview | Benchmarks & Validation | Scientific Context


Clone this wiki locally