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
2 changes: 1 addition & 1 deletion 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ <h1 class="display">Not on the map</h1>
<p>Source code under the <a href="https://github.com/Foundation-0/fractals/blob/main/LICENSE">Apache License 2.0</a>.</p>
</div>
<div class="foot-cols">
<div><h2 class="foot-h">Studies</h2><ul><li><a href="./">Witness Map</a></li><li><a href="gravitational-atom/">Gravitational atom</a></li><li><a href="https://github.com/Foundation-0/fractals/issues">Open questions</a></li></ul></div>
<div><h2 class="foot-h">Studies</h2><ul><li><a href="./">Witness Map</a></li><li><a href="gravitational-atom/">Gravitational atom</a></li><li><a href="https://github.com/Foundation-0/fractals/tree/main/quantum-paths">Quantum paths</a></li><li><a href="https://github.com/Foundation-0/fractals/tree/main/critical">The critical point</a></li><li><a href="https://github.com/Foundation-0/fractals/tree/main/turbulence">Turbulence</a></li><li><a href="https://github.com/Foundation-0/fractals/issues">Open questions</a></li></ul></div>
<div><h2 class="foot-h">Record</h2><ul><li><a href="witness-map/model.js">The model (JS)</a></li><li><a href="https://github.com/Foundation-0/fractals/tree/main/tests">Checks</a></li><li><a href="https://github.com/Foundation-0/fractals/blob/main/CORRECTIONS.md">Corrections</a></li></ul></div>
<div><h2 class="foot-h">Source</h2><ul><li><a href="https://github.com/Foundation-0/fractals">Repository</a></li><li><a href="https://github.com/Foundation-0/fractals/issues/new">Report an error</a></li><li><a href="https://foundation-0.github.io/f0/">Foundation0</a></li></ul></div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +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 (`tests/critical.mjs`).
checks the study against the exact 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
153 changes: 102 additions & 51 deletions critical/README.md

Large diffs are not rendered by default.

18 changes: 13 additions & 5 deletions critical/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
* Open edges: R_L(p) = 1/2 + a1 (p - p_c) L^(1/nu) + b0 / L + ..., nu = 4/3 (Ziff & Newman 2002, sec. I), with
* b0 = 0.322 and a1 = 0.765 (their sec. IV). As in their sec. II, the p where R_L1 and R_L2 cross then sits above
* p_c by (b0/a1)(1/L1 - 1/L2) / (L2^(3/4) - L1^(3/4)): +0.00040 for L = 32 and 128, +0.00012 for 64 and 256.
* Their Table 1 gives their measurements on this same system, with errors "generally in the last digit quoted".
* PERC.zn holds those for L = 32 to 256: R_L(p_c); p_0.5, where R_L(p) = 1/2; and the crossing of R_L/2 and R_L
Comment thread
ahrazzle marked this conversation as resolved.
Resolved
* (their p_c-c^(2)); PERC.zn.places, the decimals each is quoted to.
* Random numbers: xoshiro128** seeded through splitmix32, integer arithmetic only, so a seed gives the same run on
* every JavaScript engine.
*/
Expand All @@ -40,7 +43,10 @@
const TC = 2 / Math.log(1 + Math.SQRT2);
const KC = 1 / TC;
const EXP = { beta: 1 / 8, nu: 1, eta: 1 / 4, gamma: 7 / 4 };
const PERC = { pc: 0.59274621, D: 91 / 48, oneArm: 5 / 48, nu: 4 / 3, b0: 0.322, a1: 0.765 };
const PERC = { pc: 0.59274621, D: 91 / 48, oneArm: 5 / 48, nu: 4 / 3, b0: 0.322, a1: 0.765,
zn: { Ls: [32, 64, 128, 256], atPc: [0.509535, 0.504890, 0.502476, 0.50124], // Ziff & Newman 2002, Table 1
half: [0.5918352, 0.5924657, 0.5926613, 0.5927208], cross: [0.594825, 0.593413, 0.592952, 0.592808],
places: { atPc: [6, 6, 6, 5], half: [7, 7, 7, 7], cross: [6, 6, 6, 6] } } }; // decimals as Table 1 quotes them
const TWO32 = 4294967296;

// ---------- random numbers ----------
Expand Down Expand Up @@ -419,9 +425,10 @@
Dbig: jackknife(B, b => logSlope(Ls.slice(1), sums.slice(1).map(s => masses(s, b).big))) };
}
// Percolation pooled over nine independent seeds, the study seed and the eight of STUDY.perc.pool. Each estimate is
// the nine seeds' mean; its error is the standard error of that mean, the scatter between seeds (sd) over 3. Also:
// the slope of ln(mass) against ln L between successive sizes, the change from one of those slopes to the next, and
// how much leaving out L = 32 raises the fit.
// the nine seeds' mean; its error is the standard error of that mean, the scatter between seeds (sd) over 3. At
// every L: R(p_c) and the p where R = 1/2; above L = 32, the crossing with the next smaller size. Also: the slope
// of ln(mass) against ln L between successive sizes, the change from one of those slopes to the next, and how much
// leaving out L = 32 raises the fit.
function studyPooled() {
const P = STUDY.perc, seeds = [P.seed].concat(P.pool), each = seeds.map(s => studyPercolation(s)), Ls = each[0].Ls;
const pool = f => {
Expand All @@ -432,7 +439,8 @@
const slope = (r, i) => Math.log(r.span[i + 1].value / r.span[i].value) / Math.log(Ls[i + 1] / Ls[i]);
return { seeds, Ls, each,
wide: each[0].wide.map((c, k) => ({ L1: c.L1, L2: c.L2, p: pool(r => r.wide[k].p.value) })),
half: pool(r => r.half[r.half.length - 1].value), // p where R = 1/2 at the largest L
atPc: Ls.map((L, i) => pool(r => r.atPc[i].value)), half: Ls.map((L, i) => pool(r => r.half[i].value)),
adjacent: each[0].adjacent.map((c, k) => ({ L1: c.L1, L2: c.L2, p: pool(r => r.adjacent[k].p.value) })),
D: pool(r => r.D.value), Dall: pool(r => r.Dall.value),
local: Ls.slice(1).map((L, i) => ({ L1: Ls[i], L2: L, D: pool(r => slope(r, i)) })),
change: Ls.slice(2).map((L, i) => ({ L1: Ls[i], L2: Ls[i + 1], L3: L,
Expand Down
32 changes: 30 additions & 2 deletions critical/table.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// critical/table.mjs (about 65 s). The runs are the same fixed-seed runs that tests/critical.mjs makes, so the numbers
// match; not every number printed here is checked (critical/README.md says which are). Percolation runs with nine
// seeds, and its checks use their mean: printed here with each seed's values, the standard error of the mean, the
// slopes of the spanning cluster's mass between successive sizes, and how much leaving out L = 32 raises its fit.
// slopes of the spanning cluster's mass between successive sizes, and how much leaving out L = 32 raises its fit; and
// the means beside Ziff & Newman's measurements on this same system (2002, Table 1).
// (node critical/table.mjs scatter, which used to print eight of those seeds on their own, now prints the same.)
// No script prints the numbers critical/README.md takes from the one-off repeat with 120 other sets of seeds, or the
// finite-size shifts it works out from published formulas other than the open-edge shifts printed below; the README
Expand Down Expand Up @@ -87,7 +88,7 @@ console.log(`\nPercolation pooled over nine seeds (${seeds[0]}, then ${seeds.sli
'each seed with its jackknife error, then the mean with its standard error');
const cols = [['p_c, L = 32/128', r => r.wide[0].p, pool.wide[0].p, PERC.pc, 5, CR.edgeShift(32, 128)],
['p_c, L = 64/256', r => r.wide[1].p, pool.wide[1].p, PERC.pc, 5, CR.edgeShift(64, 256)],
['D, L = 64-256', r => r.D, pool.D, PERC.D, 4], ['p(R = 1/2), L = 256', r => r.half[last], pool.half, PERC.pc, 5],
['D, L = 64-256', r => r.D, pool.D, PERC.D, 4], ['p(R = 1/2), L = 256', r => r.half[last], pool.half[last], PERC.pc, 5],
['D, L = 32-256', r => r.Dall, pool.Dall, PERC.D, 4]];
console.log(col('seed', 6) + cols.map(c => col(c[0], 22)).join(''));
pool.each.forEach((r, i) => console.log(col(seeds[i], 6) + cols.map(c => col(pm(c[1](r), c[4]), 22)).join('')));
Expand All @@ -104,4 +105,31 @@ console.log(' change from one of those slopes to the next, seed by seed: ' + po
`L = ${x.L1}-${x.L2} to ${x.L2}-${x.L3}: ${pm(x.D, 3)}`).join(', '));
console.log(` D over L = 64-256 less D over L = 32-256: ${pm(pool.rise, 3)}, positive for ${pool.rise.v.filter(x => x > 0).length} of ` +
`${pool.rise.v.length} seeds`);

// The nine seeds' means against Ziff & Newman's measurements on this same system at the same sizes (their Table 1),
// with z = (mean - theirs) / standard error of the mean; their own errors are in the last digit quoted. The crossing
// at L is that of L/2 and L. Then how far open edges move their values from the L -> infinity ones, in the same units.
const zn = PERC.zn, zi = L => zn.Ls.indexOf(L), z = (m, v) => (m.value - v) / m.err;
const quoted = (k, j) => zn[k][j].toFixed(zn.places[k][j]); // as Table 1 prints it: 0.504890, not 0.50489
const adj = L => pool.adjacent.find(x => x.L2 === L), zs = [];
console.log('\nPercolation against Ziff & Newman\'s measurements on the same system (2002, Table 1), means of the nine seeds');
console.log(col('L', 5) + col('R(p_c)', 18) + col('Z&N', 10) + col('z', 7) + col('p where R = 1/2', 20) + col('Z&N', 11) + col('z', 7) +
col('crossing L/2, L', 20) + col('Z&N', 10) + col('z', 7));
p.Ls.forEach((L, i) => {
const R = pool.atPc[i], h = pool.half[i], c = adj(L), j = zi(L);
zs.push(z(R, zn.atPc[j]), z(h, zn.half[j]));
if (c) zs.push(z(c.p, zn.cross[j]));
console.log(col(L, 5) + col(pm(R, 4), 18) + col(quoted('atPc', j), 10) + col(z(R, zn.atPc[j]).toFixed(2), 7) +
col(pm(h, 5), 20) + col(quoted('half', j), 11) + col(z(h, zn.half[j]).toFixed(2), 7) +
(c ? col(pm(c.p, 5), 20) + col(quoted('cross', j), 10) + col(z(c.p, zn.cross[j]).toFixed(2), 7) : col('-', 20)));
});
console.log(` ${zs.length} comparisons, largest |z| ${Math.max(...zs.map(Math.abs)).toFixed(2)}`);
const eff = (f, from) => p.Ls.map((L, i) => from(i) ? (f(i) / from(i).err).toFixed(1) : '-').join(', ');
console.log(` open-edge effect in their values, in standard errors of the mean, L = ${p.Ls.join(', ')}:\n R(p_c) - 1/2: ` +
eff(i => zn.atPc[zi(p.Ls[i])] - 0.5, i => pool.atPc[i]) + '; p_c - p where R = 1/2: ' +
eff(i => PERC.pc - zn.half[zi(p.Ls[i])], i => pool.half[i]) + '; crossing - p_c: ' +
eff(i => zn.cross[zi(p.Ls[i])] - PERC.pc, i => adj(p.Ls[i]) && adj(p.Ls[i]).p));
const h32 = pool.half[p.Ls.indexOf(32)];
console.log(` at L = 32: p_c less their p where R = 1/2 = ${(PERC.pc - zn.half[zi(32)]).toFixed(5)}; the mean is ` +
`${((PERC.pc - h32.value) / h32.err).toFixed(1)} standard errors below p_c (tests/critical.mjs checks it against theirs)`);
console.log(`\nruntime ${((Date.now() - start) / 1000).toFixed(1)} s on Node ${process.versions.node}`);
2 changes: 1 addition & 1 deletion gravitational-atom/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ <h3>What it leaves out</h3>
<p>Source code under the <a href="https://github.com/Foundation-0/fractals/blob/main/LICENSE">Apache License 2.0</a>.</p>
</div>
<div class="foot-cols">
<div><h2 class="foot-h">Studies</h2><ul><li><a href="../">Witness Map</a></li><li><a href="./">Gravitational atom</a></li><li><a href="https://github.com/Foundation-0/fractals/issues">Open questions</a></li></ul></div>
<div><h2 class="foot-h">Studies</h2><ul><li><a href="../">Witness Map</a></li><li><a href="./">Gravitational atom</a></li><li><a href="https://github.com/Foundation-0/fractals/tree/main/quantum-paths">Quantum paths</a></li><li><a href="https://github.com/Foundation-0/fractals/tree/main/critical">The critical point</a></li><li><a href="https://github.com/Foundation-0/fractals/tree/main/turbulence">Turbulence</a></li><li><a href="https://github.com/Foundation-0/fractals/issues">Open questions</a></li></ul></div>
<div><h2 class="foot-h">Record</h2><ul><li><a href="atom.js">The model (JS)</a></li><li><a href="https://github.com/Foundation-0/fractals/tree/main/tests">Checks</a></li><li><a href="https://github.com/Foundation-0/fractals/blob/main/CORRECTIONS.md">Corrections</a></li></ul></div>
<div><h2 class="foot-h">Source</h2><ul><li><a href="https://github.com/Foundation-0/fractals">Repository</a></li><li><a href="https://github.com/Foundation-0/fractals/issues/new">Report an error</a></li><li><a href="https://foundation-0.github.io/f0/">Foundation0</a></li></ul></div>
</div>
Expand Down
8 changes: 5 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,11 @@ <h2 class="h2" id="studies-h">One question, asked at every scale.</h2>
<div class="notes"><ul>
<li><b><a href="./">The Witness Map</a></b> (this page): where quantum turns classical, object by object.</li>
<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>Quantum paths</b>: where a recorded path's fractal dimension 2 starts and stops. Model and checks written; <a href="https://github.com/Foundation-0/fractals/issues/16">issue 16</a> tracks publication.</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>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, turbulence's two cutoffs, and why repetition appears at all. <a href="https://github.com/Foundation-0/fractals/issues">The issue list</a> is the programme.</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>
</div>
</section>
Expand All @@ -250,7 +252,7 @@ <h2 class="h2" id="studies-h">One question, asked at every scale.</h2>
<p>Source code under the <a href="https://github.com/Foundation-0/fractals/blob/main/LICENSE">Apache License 2.0</a>.</p>
</div>
<div class="foot-cols">
<div><h2 class="foot-h">Studies</h2><ul><li><a href="./">Witness Map</a></li><li><a href="gravitational-atom/">Gravitational atom</a></li><li><a href="https://github.com/Foundation-0/fractals/issues">Open questions</a></li></ul></div>
<div><h2 class="foot-h">Studies</h2><ul><li><a href="./">Witness Map</a></li><li><a href="gravitational-atom/">Gravitational atom</a></li><li><a href="https://github.com/Foundation-0/fractals/tree/main/quantum-paths">Quantum paths</a></li><li><a href="https://github.com/Foundation-0/fractals/tree/main/critical">The critical point</a></li><li><a href="https://github.com/Foundation-0/fractals/tree/main/turbulence">Turbulence</a></li><li><a href="https://github.com/Foundation-0/fractals/issues">Open questions</a></li></ul></div>
<div><h2 class="foot-h">Record</h2><ul><li><a href="witness-map/model.js">The model (JS)</a></li><li><a href="https://github.com/Foundation-0/fractals/tree/main/tests">Checks</a></li><li><a href="https://github.com/Foundation-0/fractals/blob/main/CORRECTIONS.md">Corrections</a></li></ul></div>
<div><h2 class="foot-h">Source</h2><ul><li><a href="https://github.com/Foundation-0/fractals">Repository</a></li><li><a href="https://github.com/Foundation-0/fractals/issues/new">Report an error</a></li><li><a href="https://foundation-0.github.io/f0/">Foundation0</a></li></ul></div>
</div>
Expand Down
Loading
Loading