TASK: Produce MODEL_SPEC v1.0 (canonical, frozen). Output JSON only. INPUT DATA (read from the uploaded markdown files): - State vector and inputs: x(t) = [z(t), v_p(t), T_b(t), S(t), w(t)] u(t) = [L(t), C(t), N(t), Ψ(t), T_a(t)] - Equations to include exactly: (A) Power mapping P_tot(t) = P_bg + P_scr(L) + P_cpu(C) + P_net(N,Ψ,w) (B) Terminal voltage V_term = V_oc(z) - v_p - I*R0(T_b,S) (C) SOC ODE: dz/dt = - I / (3600 * Q_eff(T_b,S)) (D) Polarization ODE: dv_p/dt = I/C1 - v_p/(R1*C1) (E) Thermal ODE: dT_b/dt = ( I^2*R0 + I*v_p - hA*(T_b - T_a) ) / C_th (F) Tail ODE: dw/dt = (σ(N)-w)/τ(N) with τ_up, τ_down switching rule (G) CPL closure: R0*I^2 - (V_oc(z)-v_p)*I + P_tot = 0 I = (V_oc(z)-v_p - sqrt(Δ)) / (2*R0) Δ = (V_oc(z)-v_p)^2 - 4*R0*P_tot (H) V_oc(z) (modified Shepherd): V_oc(z)=E0 - K(1/z - 1) + A*exp(-B(1-z)) (I) R0(T_b,S) Arrhenius + SOH factor (J) Q_eff(T_b,S) temperature + aging factor with max-floor METHODLOGY (must define explicitly in JSON): 1) Domain constraints and guards: - z ∈ [0,1], S ∈ (0,1], w ∈ [0,1] - define z_eff = max(z, z_min) for V_oc to avoid 1/z singularity - define Q_eff_floor to avoid negative capacity 2) Event functions and termination logic: Define three event functions: gV(t)=V_term(t)-V_cut gz(t)=z(t) (threshold 0) gΔ(t)=Δ(t) (threshold 0) Terminate at first crossing where any event function becomes ≤ 0. Record termination_reason ∈ {"V_CUTOFF","SOC_ZERO","DELTA_ZERO"}. 3) Define TTE precisely: TTE = t* - t0 where t* is the earliest event time. Use linear interpolation between the last two time samples for the event that triggers termination. DELIVERABLE (JSON ONLY): Return a JSON object with keys: - "states" (list of {name, unit, bounds}) - "inputs" (list of {name, unit, bounds}) - "parameters" (list of {name, unit, description}) - "equations" (each equation as a string; use the exact variable names) - "guards" (z_min, Q_eff_floor, clamp rules) - "events" (definition of gV, gz, gΔ; termination logic) - "tte_definition" (interpolation formula and tie-breaking rule if multiple cross in same step) - "numerics" (method="RK4_nested_CPL", dt_symbol="dt", stage_recompute_current=true) VALIDATION (must be encoded as JSON fields too): - "dimension_check": list required units consistency checks - "monotonicity_check": SOC must be non-increasing while I>=0 - "feasibility_check": Δ must be >=0 before sqrt; if Δ<0 at any evaluation, event triggers OUTPUT FORMAT: JSON only, no markdown, no prose.