Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,9 @@ and the hole's loss of mass; interactions between the particles; anything else n
Why does anything repeat across scales at all? At a critical point, such as water at 647 K and 22 MPa or a magnet
at its Curie temperature, fluctuations of every size appear, from the size of a molecule up to a correlation length
ξ that grows without limit as the temperature approaches T_c. A 2D Ising lattice and site percolation, run with
seeded random numbers in `critical/model.js`, come out at or close to the exact answers: the Ising results within
1.5 standard deviations, the percolation threshold within one standard error once open edges are allowed for, and
the spanning cluster's dimension 0.8% low (details in
seeded random numbers in `critical/model.js`, come out at or close to the exact or high-precision answers: the
Ising results within 1.5 standard deviations, the percolation threshold within one standard error once open edges
are allowed for, and the spanning cluster's dimension 0.8% low (details in
[critical/README.md](critical/README.md#what-it-reproduces), issue #20):

- T_c from where the Binder cumulants of two lattice sizes cross: 2.2704 ± 0.0017 J/k_B, against Onsager's
Expand All @@ -358,8 +358,8 @@ nobody tunes: the flow's Reynolds number, or the time gravity has had to act, se
smooth on the largest scales, as the [opening section](#where-the-intuition-holds-and-where-it-breaks) describes).
Real fluids have the same mechanism with three-dimensional exponents: ξ grows 4.27-fold for each tenfold approach
to T_c (ν = 0.630; Kos, Poland, Simmons-Duffin and Vichi 2016), against tenfold for the 2D lattice. `npm test`
checks the study against the exact results and, for percolation at finite sizes, against Ziff and Newman's
measurements (`tests/critical.mjs`).
checks the study against the exact or high-precision results and, for percolation at finite sizes, against Ziff and
Newman's measurements (`tests/critical.mjs`).

Mistakes found along the way are in [CORRECTIONS.md](CORRECTIONS.md). Open questions are the
[issues](https://github.com/Foundation-0/fractals/issues).
Expand Down
18 changes: 9 additions & 9 deletions critical/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ for each of nine seeds and as their mean. No script prints three kinds of number
of the checks with 120 other sets of seeds, described under [What it reproduces](#what-it-reproduces); γ/ν's
finite-size bias of +0.0012 and the Binder cumulant's offset of 0.0007 at L = 16, worked out from published
results; and the 11% and 25% uncertainties of an error bar. `npm test` (`tests/critical.mjs`) checks the numbers
compared with an exact value: the table under "What it reproduces", the ξ table, the measurement-trap cumulant with
a fixed count and the same numbers in the short answer. It checks the cumulant measured the other way only against
that one, and the point where the spanning probability at L = 32 is one half against Ziff and Newman's measurement
there. Without Monte Carlo, it also checks the open-edge shift against their measured crossings for L = 64 to 256.
The rest are printed but not checked: the slopes over other ranges of L, the cluster shares, the size ratios, the
point where the spanning probability at L = 256 is one half, the other comparisons with Ziff and Newman's
measurements and each percolation seed's results. Exact values are quoted from the sources named beside them.
Started 18 October 2026.
compared with an exact or high-precision value (Newman and Ziff's measured threshold, whose error is negligible
here): the table under "What it reproduces", the ξ table, the measurement-trap cumulant with a fixed count and the
same numbers in the short answer. It checks the cumulant measured the other way only against that one, and the
point where the spanning probability at L = 32 is one half against Ziff and Newman's measurement there. Without
Monte Carlo, it also checks the open-edge shift against their measured crossings for L = 64 to 256. The rest are
printed but not checked: the slopes over other ranges of L, the cluster shares, the size ratios, the point where
the spanning probability at L = 256 is one half, the other comparisons with Ziff and Newman's measurements and each
percolation seed's results. Exact values are quoted from the sources named beside them. Started 18 October 2026.

The other studies find self-similarity over a range of scales and ask where it stops. This one asks why it appears
at all, in the one case where the exact answers are known and both ends of the range can be moved at will.
Expand Down Expand Up @@ -331,7 +331,7 @@ size of a molecule.
- L. Onsager, *Crystal statistics. I. A two-dimensional model with an order-disorder transition*, Phys. Rev. 65, 117 (1944). Not consulted directly; T_c and the energy are checked against Caselle et al. (2002). https://doi.org/10.1103/PhysRev.65.117
- A. Pelissetto and E. Vicari, *Critical phenomena and renormalization-group theory*, Phys. Rep. 368, 549 (2002), secs. 1.3, 1.6.2, 3.1, 3.5, 5, 7.1 and 11.3. https://doi.org/10.1016/S0370-1573(02)00219-3 (https://arxiv.org/abs/cond-mat/0012164)
- Planck Collaboration, *Planck 2018 results. VI. Cosmological parameters*, A&A 641, A6 (2020). https://doi.org/10.1051/0004-6361/201833910 (https://arxiv.org/abs/1807.06209)
- J. Salas and A. D. Sokal, *Universal amplitude ratios in the critical two-dimensional Ising model on a torus*, J. Stat. Phys. 98, 551 (2000), sec. 4.1 and Table 2. https://doi.org/10.1023/A:1018611122166 (https://arxiv.org/abs/cond-mat/9904038)
- J. Salas and A. D. Sokal, *Universal amplitude ratios in the critical two-dimensional Ising model on a torus*, J. Stat. Phys. 98, 551 (2000), secs. 1, 4.1 and 4.3 and Tables 2 and 5. https://doi.org/10.1023/A:1018611122166 (https://arxiv.org/abs/cond-mat/9904038)
- M. Scrimgeour et al., *The WiggleZ Dark Energy Survey: the transition to large-scale cosmic homogeneity*, MNRAS 425, 116–134 (2012). https://doi.org/10.1111/j.1365-2966.2012.21402.x (https://arxiv.org/abs/1205.6812)
- S. Smirnov and W. Werner, *Critical exponents for two-dimensional percolation*, Math. Res. Lett. 8, 729 (2001). https://doi.org/10.4310/MRL.2001.v8.n6.a4 (https://arxiv.org/abs/math/0109120)
- U. Wolff, *Collective Monte Carlo updating for spin systems*, Phys. Rev. Lett. 62, 361 (1989). Not consulted directly; the add probability is as in Fujimoto and Otsuka (2020, appendix B). https://doi.org/10.1103/PhysRevLett.62.361
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ <h2 class="h2" id="studies-h">One question, asked at every scale.</h2>
<li><b><a href="gravitational-atom/">Gravitational atom beside hydrogen</a></b>: the same wave equation at two scales, drawn at matched size.</li>
<li><b><a href="https://github.com/Foundation-0/fractals/tree/main/quantum-paths">Quantum paths</a></b>: where a recorded path's fractal dimension 2 starts and stops.</li>
<li><b><a href="https://github.com/Foundation-0/fractals/tree/main/critical">The critical point</a></b>: a magnet whose spins point only up or down repeats itself across scales only when tuned to its critical point; away from it the repetition stops at the correlation length.</li>
<li><b><a href="https://github.com/Foundation-0/fractals/tree/main/turbulence">Turbulence</a></b>: between the size where a flow is stirred and the size where viscosity takes over, the same energy flux passes through every scale; the bursts do not scale exactly.</li>
<li><b><a href="https://github.com/Foundation-0/fractals/tree/main/turbulence">Turbulence</a></b>: between the size where a flow is stirred and the size where viscosity takes over, the same energy flux passes through every scale; the bursts do not scale exactly, and where the cascade ends depends on the medium.</li>
<li><b>Cosmic homogeneity</b>: the scale where galaxy clustering stops looking fractal. Model and checks written; <a href="https://github.com/Foundation-0/fractals/issues/17">issue 17</a> tracks publication.</li>
<li><b>Open questions</b>: halos within halos. <a href="https://github.com/Foundation-0/fractals/issues">The issue list</a> is the programme.</li>
</ul></div>
Expand Down
25 changes: 14 additions & 11 deletions tests/critical.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// Checks the critical-point study (critical/model.js, issue #20) against exact results: Onsager's T_c and energy,
// Yang's magnetisation, the exact correlation length, the 2D Ising exponents, the Binder cumulant at T_c, the
// measurement trap in cluster runs, Newman and Ziff's percolation threshold and the 91/48 dimension; and against Ziff
// and Newman's measurements of the same percolation system at finite sizes: their crossings of two sizes test the
// open-edge shift, and one point tests the runs. Run: npm test (or node tests/critical.mjs).
// Each check states the source, the value it is compared with (an exact value, or in those two checks Ziff and
// Newman's measurements), the model's value and the tolerance. The Monte Carlo runs use fixed seeds and integer-only
// Checks the critical-point study (critical/model.js, issue #20) against exact or high-precision results: Onsager's
// T_c and energy, Yang's magnetisation, the exact correlation length, the 2D Ising exponents, the Binder cumulant at
// T_c, the measurement trap in cluster runs, Newman and Ziff's measured percolation threshold, 0.59274621(13), whose
// error is negligible here, and the 91/48 dimension; and against Ziff and Newman's measurements of the same
// percolation system at finite sizes: their crossings of two sizes test the open-edge shift, and one point tests the
// runs. Run: npm test (or node tests/critical.mjs).
// Each check states the source, the value compared with (exact, Newman and Ziff's threshold, or in two checks Ziff and
// Newman's measurements), the model's value and the tolerance. Monte Carlo runs use fixed seeds and integer-only
// random numbers, so every run, on every Node version, prints the same numbers. Ising error bars are jackknife
// estimates over 40 blocks. The percolation checks use the mean over nine seeds, the study seed and eight others, with
// the standard error of that mean as error bar: the scatter between the nine seeds over 3. Each tolerance is a fixed
Expand Down Expand Up @@ -47,9 +48,10 @@ function check(name, ok, detail, src) {
console.log(`${ok ? 'PASS' : 'FAIL'} ${name}\n ${detail} ${src}`);
if (!ok) fails++;
}
// A Monte Carlo estimate {value, err} against an exact value: passes if exact - lo <= model <= exact + hi, where tol is
// A Monte Carlo estimate {value, err} against a reference value: passes if ref - lo <= model <= ref + hi, where tol is
// one number (lo = hi = tol) or [lo, hi], and the error bar is finite (a jackknife replicate can fail and give NaN).
// `label` names the value compared with when it is a published measurement rather than an exact value.
// `label` names the value compared with when it is a published measurement rather than an exact value: 'reference' for
// Newman and Ziff's threshold, whose error (1.3e-7) is negligible here, 'measured' for a finite-size measurement.
function near(name, est, want, tol, src, why, d, label = 'exact') {
const [lo, hi] = Array.isArray(tol) ? tol : [tol, tol], dev = est.value - want;
const finite = Number.isFinite(est.err), ok = finite && dev >= -lo && dev <= hi;
Expand All @@ -68,7 +70,8 @@ function nearRel(name, est, want, rel, src, why) {
if (!ok) fails++;
}

// 1. The closed forms themselves (no Monte Carlo): these test the code against the published formulas.
// 1. No Monte Carlo: the closed forms against the published formulas, the open-edge shift also against Ziff & Newman's
// measured crossings (Table 1), and the random-number generator.
const ONS = 'Onsager 1944', YANG = 'Yang 1952', CHPV = 'Caselle, Hasenbusch, Pelissetto & Vicari 2002 (arXiv:cond-mat/0106372)';
check('Critical temperature: sinh(2/T_c) = 1, T_c = 2/ln(1 + sqrt 2)', Math.abs(Math.sinh(2 / TC) - 1) < 1e-14 && Math.abs(KC - 0.4406868) < 1e-7,
`T_c = ${TC.toFixed(6)}, 1/T_c = ${KC.toFixed(7)} (published 0.4406868...)`, `${ONS}; ${CHPV} sec. 2.1`);
Expand Down Expand Up @@ -205,7 +208,7 @@ for (const c of pool.wide) near(`p_c from the crossing of the spanning probabili
'nine seeds scatter more than the repeat\'s 120. About half of that excess is the study seed\'s: it sits 0.0013 ' +
'high, about 2.4 standard deviations of a single seed beyond the shift (single seeds scatter by about 0.0005 in ' +
'the repeat; 0.0006 for the eight other seeds). A mean more than 0.0010 above p_c or 0.0009 below fails, so an ' +
'offset of 0.0012 fails. The mean sits 0.2 sigma above the shift', 5);
'offset of 0.0012 fails. The mean sits 0.2 sigma above the shift', 5, 'reference');
near(`Fractal dimension of the spanning cluster at p_c: mass ~ L^D, least squares over L = ${pool.Ls.slice(1).join(', ')}, mean of ${n} seeds`,
pool.D, PERC.D, [0.024, 0.008], 'D = 2 - 5/48 = 91/48: Lawler, Schramm & Werner 2002 (one-arm exponent 5/48)',
'tolerance: the slope between successive sizes rises with L (1.861, 1.876 and 1.884 from L = 32 to 256, means of the ' +
Expand Down
Loading