2.4 KiB
Optional central-density constraint
The n=1 sandbox now supplies central density only to its Lane–Emden seed. Its equilibrium model fixes the polytropic EOS, surface pressure, total mass, and angular momentum. The existing public API already supports this combination; no operator, normalization, preconditioner, or solver API changes are needed.
constraint::FixedCentralDensity remains an explicit, optional model
specification. For n=3 it can select the scale along the nonrotating homology
family. Omitting it remains permitted and may expose a singular or poorly
conditioned problem. Neither the model nor the solver silently inserts a phase
constraint or regularization based on the polytropic index. Seed-only central
density sets an initial condition, not an additional equilibrium equation.
The hypothesis is that fixing the spherical central density together with K, M, and nonzero J can distort the interior of an n=1 equilibrium. The implemented constraint fixes central enthalpy and adds a scalar source to the hydrostatic row; a small bordered residual can therefore coexist with a larger physical residual after that source is removed. This is separate from the late Krylov failure: the initial no-phase J=.01 control retained that failure while reducing the unbordered residual, with negligible change in virial balance.
The next matched control is n=1, J=.05 with and without the constraint, using the same mesh, seed, normalization, preconditioner, and solver settings. Record formal solve status separately from the retained state's physical quality. Compare energy and force virial errors against the required 1e-5 milestone, mass and J, actual angular velocity, the unbordered residual, and location-resolved central enthalpy/EOS/Bernoulli errors. The phased baseline's sampled maximum EOS mismatch is about .934% of the density scale despite virial errors near 3e-7; its cause requires this control. Higher-spin no-phase cases follow if the matched control is satisfactory. J or angular velocity in reference units is not itself a measured fraction of critical rotation.
The added user-API regression covers the previously missing explicit-seed, no-phase context construction and solver borrowing/release path. Existing tests already cover the square fixed-J root and its Jacobian column. This lifecycle test performs no Newton solve and makes no physical-convergence claim. Retain the existing phased n=3 tests; unphased n=3 convergence is not a requirement.