The sim's length, speed, and time constants are absolute, so a galaxy is a different object at every domain size #71

Closed
opened 2026-08-09 04:51:51 +00:00 by coilyco-ops · 0 comments
Member

Split out of #70, which chose to raise the scenario test size rather than fix this. That was the right call for landing the stellar-orbit work. This remains worth doing on its own merits.

The problem

disk_r scales with the domain. Most of the constants that interact with it do not. A galaxy at size 50 is not a small picture of a galaxy at size 500 - it is a different physical setup with different ratios everywhere.

constant value share of disk_r at size 50 at 250 at 500
FIELD_SOFTENING_SQ 25.0, so 5 cells 21% 4.0% 2.0%
ASSOCIATION_TIDAL_RADIUS_MAX 6.5 27% 5.2% 2.6%
ASSOCIATION_JOIN_RADIUS 3.2 13% 2.6% 1.3%
SN_RADIUS 2 8.3% 1.6% 0.8%
ASSOCIATION_BIRTH_RADIUS 0.9 3.8% 0.7% 0.4%

At size 50 a stellar association spans a quarter of the disk. At 500 it spans a fortieth. Same constant, entirely different object.

Speeds and times have the same problem: BIRTH_VCIRC_CAP, ASSOCIATION_ORBIT_SPEED_CAP, ASSOCIATION_BINDING_LIFETIME, ASSOCIATION_TIDAL_GRACE, and the stellar lifetimes are all absolute.

Why it matters

The site serves 500 and offers the size as a user control, so people run whatever they like. Any behaviour tuned at one size is a guess at another. #70 hit this directly: a configuration that produced a clean rotating disk at 500 over-concentrated by 7-19x at 150, with the same seeds and the same scenario.

What is already measured

GALAXY_ABL_LENGTH_REFERENCE_SIZE on main scales the five length constants by size / reference. Running size 150 scaled to 500, irregular=>spiral, t=3000 (full numbers on #70):

  • young-star central fraction 0.25 / 0.83 -> 0.18 / 0.12 against a size-500 reference of about 0.17. The birth distribution comes back almost exactly.
  • all-ages central fraction 0.31 / 0.62 -> 0.25 / 0.48 against 0.16 / 0.17. About a third of the gap.
  • vsig converges toward the reference rather than overshooting it.

So scaling lengths alone is directionally right and roughly a third of the answer.

Why only a third

Because lengths are one dimension of three. Under a self-similar scaling, if lengths go as L, speeds go as sqrt(GM/L) and times as L/v. Scaling lengths while leaving the speed caps and the association and stellar lifetimes fixed produces a setup that is self-consistent in neither the old units nor the new ones.

What the work is

  1. Classify every tunable by dimension - length, speed, time, mass, dimensionless.
  2. Express each in terms of the domain, most naturally as fractions of disk_r with speeds and times derived from it, so one reference calibration defines every size.
  3. Retune the four scenarios once against the new parameterization.
  4. Regenerate the golden fields in the same commit.
  5. Add a test that the same seed and scenario at two different sizes produces the same dimensionless metrics - concentration, extent, axis ratio, v_rot / sigma - within tolerance. That is the property this issue is really about, and nothing currently asserts it.

Step 5 is the valuable part. Without it this regresses silently the next time a constant is added.

Sequencing

Not urgent, and deliberately not coupled to #70 - that change already rolls the public site and the two should be reviewable apart. Best done after #70 lands, so the scenario retune happens once against final physics rather than twice.

Split out of #70, which chose to raise the scenario test size rather than fix this. That was the right call for landing the stellar-orbit work. This remains worth doing on its own merits. ## The problem `disk_r` scales with the domain. Most of the constants that interact with it do not. A galaxy at size 50 is not a small picture of a galaxy at size 500 - it is a different physical setup with different ratios everywhere. | constant | value | share of `disk_r` at size 50 | at 250 | at 500 | |---|---|---|---|---| | `FIELD_SOFTENING_SQ` | 25.0, so 5 cells | 21% | 4.0% | 2.0% | | `ASSOCIATION_TIDAL_RADIUS_MAX` | 6.5 | 27% | 5.2% | 2.6% | | `ASSOCIATION_JOIN_RADIUS` | 3.2 | 13% | 2.6% | 1.3% | | `SN_RADIUS` | 2 | 8.3% | 1.6% | 0.8% | | `ASSOCIATION_BIRTH_RADIUS` | 0.9 | 3.8% | 0.7% | 0.4% | At size 50 a stellar association spans a quarter of the disk. At 500 it spans a fortieth. Same constant, entirely different object. Speeds and times have the same problem: `BIRTH_VCIRC_CAP`, `ASSOCIATION_ORBIT_SPEED_CAP`, `ASSOCIATION_BINDING_LIFETIME`, `ASSOCIATION_TIDAL_GRACE`, and the stellar lifetimes are all absolute. ## Why it matters The site serves 500 and offers the size as a user control, so people run whatever they like. Any behaviour tuned at one size is a guess at another. #70 hit this directly: a configuration that produced a clean rotating disk at 500 over-concentrated by 7-19x at 150, with the same seeds and the same scenario. ## What is already measured `GALAXY_ABL_LENGTH_REFERENCE_SIZE` on `main` scales the five length constants by `size / reference`. Running size 150 scaled to 500, irregular=>spiral, t=3000 (full numbers on #70): - young-star central fraction 0.25 / 0.83 -> **0.18 / 0.12** against a size-500 reference of about 0.17. The birth distribution comes back almost exactly. - all-ages central fraction 0.31 / 0.62 -> 0.25 / 0.48 against 0.16 / 0.17. **About a third of the gap.** - `vsig` converges toward the reference rather than overshooting it. So scaling lengths alone is directionally right and roughly a third of the answer. ## Why only a third Because lengths are one dimension of three. Under a self-similar scaling, if lengths go as `L`, speeds go as `sqrt(GM/L)` and times as `L/v`. Scaling lengths while leaving the speed caps and the association and stellar lifetimes fixed produces a setup that is self-consistent in neither the old units nor the new ones. ## What the work is 1. Classify every tunable by dimension - length, speed, time, mass, dimensionless. 2. Express each in terms of the domain, most naturally as fractions of `disk_r` with speeds and times derived from it, so one reference calibration defines every size. 3. Retune the four scenarios once against the new parameterization. 4. Regenerate the golden fields in the same commit. 5. Add a test that the same seed and scenario at two different sizes produces the same *dimensionless* metrics - concentration, extent, axis ratio, `v_rot / sigma` - within tolerance. That is the property this issue is really about, and nothing currently asserts it. Step 5 is the valuable part. Without it this regresses silently the next time a constant is added. ## Sequencing Not urgent, and deliberately not coupled to #70 - that change already rolls the public site and the two should be reviewable apart. Best done after #70 lands, so the scenario retune happens once against final physics rather than twice.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-gaming/galaxy-gen#71
No description provided.