This directory contains the two numerical authorities for the finite matching
constant in the Chan et al. Generalised Lubrication Equation (GLE): the
Scott--Hocking one-phase integral problem and the constant-slip two-phase
Stokes wedge. They are validation tools, not runtime dependencies:
src-local/ consumes frozen tables of
Lengths, the phase-A viscosity and the contact-line speed are scaled so that
The discretisation uses separate conforming P2/P1 Taylor--Hood meshes on a logarithmic radial grid. On both solid walls it imposes no penetration and the same Navier condition,
At the flat interface, Lagrange multipliers impose zero normal velocity in each
phase and a common tangential velocity. Tangential-traction continuity then
follows from the weak problem. No normal-traction continuity condition is
imposed: that stress jump belongs to the subsequent
The outer arc receives the exact two-phase Huh--Scriven wedge velocity. The inner arc is set to zero, the regular contact-line limit, and is moved towards the origin during the sensitivity study.
The code integrates the Navier traction on both walls at every radial knot. In the overlap region the cumulative force is
where
The frozen runtime table interpolates
Runtime interpolation uses a local cubic Lagrange polynomial on four
neighbouring angle nodes and a local quartic Lagrange polynomial on five
neighbouring
For scott_hocking.py solves the public integral equation of
Scott (2020) and freezes
data/scott-hocking-m0-nodes.csv; data/scott-hocking-m0.csv remains the
independent transcription of Scott's published Table 1. The convention
conversion is
The one-phase generator solves Scott's equation (2.1),
and evaluates
The frozen nonuniform grid has 70 direct nodes. It is refined around the
turning point of the regularised large-angle function and towards both angle
limits. Every node is compared with coarser and wider-domain calculations. The
maximum recorded sensitivity is
Runtime interpolation is performed on the regular quantities
with Scott's endpoint asymptotics. These asymptotic endpoint intervals are numerically checked but are not labelled analytic exact.
For every requested node, table compares the reported
- a mesh with 75% of the logarithmic radial resolution;
- an inner radius divided by four, retaining the logarithmic resolution;
- an outer radius multiplied by four, retaining the logarithmic resolution;
- the same fit window shifted by one radial decade.
The maximum of those four changes and the within-window drift is recorded as
estimated_error_Q. This is a convergence sensitivity estimate, not a
rigorous a posteriori error bound. The command also gates the fitted Cox slope,
the normwise backward error of every KKT solve, and the relative residual of
the interface and pressure-gauge constraints. It refuses to write if any row
fails unless --allow-unconverged is deliberately supplied; such a manifest
cannot subsequently be frozen.
The production tolerances are
uv reads the pinned PEP 723 environments directly from the generator
scripts. The pinned NumPy/SciPy stack supports Python 3.9--3.12; the upper
bound prevents uv from attempting unsupported source builds on Python 3.13.
The one-phase reference can be regenerated and verified independently of the
finite-$M$ FEM evidence:
OPENBLAS_NUM_THREADS=4 OMP_NUM_THREADS=4 VECLIB_MAXIMUM_THREADS=4 \
uv run gle-ode/reference-generator/scott_hocking.py generate
uv run gle-ode/reference-generator/scott_hocking.py verifyThis writes the node CSV, independent checkpoint CSV, manifest and
src-local/gle-slip-scott-data.h. For a single integral-equation solve:
uv run gle-ode/reference-generator/scott_hocking.py solve \
--theta-rad 1.0 --spacing 0.05 --radius 40The two-phase public anchors and a single-case diagnostic are:
uv run gle-ode/reference-generator/generate.py anchors
uv run gle-ode/reference-generator/generate.py solve \
--theta-deg 60 --viscosity-ratio 0.1 --jsonGenerate the stored half-plane table on the adaptively refined 27 by 10 grid:
uv run gle-ode/reference-generator/generate.py table \
--theta-deg-grid "30,32.5,35:145:5,147.5,150" \
--log10-M-grid=-2,-1.875,-1.75,-1.5:0:0.25 \
--inner-radius 1e-8 --outer-radius 1e8 --radial-cells 480 \
--fit-lower 1e5 --fit-upper 1e7 \
--tolerance-Q 1e-3 --tolerance-slope 2e-3 --tolerance-linear 1e-10 \
--output gle-ode/reference-generator/data/two-phase-q-nodes.csvGenerate an independent FEM solve at the centre of every table cell:
uv run gle-ode/reference-generator/generate.py table \
--theta-deg-grid "31.25,33.75,37.5:142.5:5,146.25,148.75" \
--log10-M-grid=-1.9375,-1.8125,-1.625:-0.125:0.25 \
--inner-radius 1e-8 --outer-radius 1e8 --radial-cells 480 \
--fit-lower 1e5 --fit-upper 1e7 \
--tolerance-Q 1e-3 --tolerance-slope 2e-3 --tolerance-linear 1e-10 \
--output gle-ode/reference-generator/data/two-phase-q-checkpoints.csvFreeze the nodes, check all cell centres, and emit the dependency-free C data:
python3 gle-ode/reference-generator/freeze_table.py merge \
--shards gle-ode/reference-generator/data/two-phase-q-nodes.csv \
--output gle-ode/reference-generator/data/two-phase-q.csv
python3 gle-ode/reference-generator/freeze_table.py check \
--table gle-ode/reference-generator/data/two-phase-q.csv \
--checkpoints gle-ode/reference-generator/data/two-phase-q-checkpoints.csv \
--tolerance-observed-Q 1e-3 --tolerance-error-budget-Q 3e-3 \
--tolerance-right-angle-Q 1e-3 \
--tolerance-symmetry-Q 1e-3 \
--output gle-ode/reference-generator/data/two-phase-q-interpolation-audit.csv
python3 gle-ode/reference-generator/freeze_table.py emit-c \
--table gle-ode/reference-generator/data/two-phase-q.csv \
--output src-local/gle-slip-table-data.hThe production node grid has 27 angle values and 10 stored viscosity values
(270 nodes). The checkpoint grid has 26 by 9 values (234 cell centres).
Independent node shards may replace the single --shards input above, but
each shard must have the same generator source hash, method, mesh, fit window,
tolerances and convergence checks. Their union must be a complete rectangular
grid unless an exact target grid is selected. Merge split cell-centre runs in
the same way with the explicit checkpoint mode, for example:
python3 gle-ode/reference-generator/freeze_table.py merge \
--kind checkpoints \
--shards path/to/checkpoint-shards/*.csv \
--output gle-ode/reference-generator/data/two-phase-q-checkpoints.csvAdaptive refinements may overlap a larger, previously frozen dataset without forming a rectangular union. In that case, select the exact Cartesian output grid after merging the inputs:
python3 gle-ode/reference-generator/freeze_table.py merge \
--kind checkpoints \
--shards path/to/original.csv path/to/refinement-shards/*.csv \
--theta-grid "31.25,33.75,37.5:142.5:5,146.25,148.75" \
--log10-M-grid=-1.9375,-1.8125,-1.625:-0.125:0.25 \
--output gle-ode/reference-generator/data/two-phase-q-checkpoints.csvComma-separated values and inclusive start:stop:step ranges can be mixed.
Every input CSV and manifest is hash-, convergence- and configuration-checked
before any row is discarded. The selected coordinates must all exist, and the
result must be a complete rectangular grid; missing points or duplicate input
nodes stop the merge. The output manifest records the selected grid, row counts
and each validated input hash.
At each checkpoint, the audit records
where
The audit separately checks the numerical
Each generated row and manifest records the SHA-256 of the exact
generate.py source. Each manifest also records the SHA-256 of its CSV.
freeze_table.py merge rejects a non-converged manifest, a source-hash
mismatch, altered CSV contents, or incompatible numerical settings. The
interpolation audit records the hashes of the frozen table, independent
checkpoint CSV and audit CSV. emit-c verifies all three immediately before
writing the header, so changing any evidence file makes the validation stale
and blocks emission. Regenerate or rerun the affected stage; do not patch a
manifest by hand.
The Scott--Hocking evidence follows the same rule on a separate hash path:
its manifest binds the exact scott_hocking.py, node CSV and independent
checkpoint CSV, and the generated C header embeds all three hashes. This
separation means regenerating one-phase evidence does not change the frozen
two-phase FEM provenance.
The frozen table stores
extends the finite-viscosity runtime range to
The FEM solver itself rejects angles below
Run the deterministic freeze tests and the coarse FEM tests with:
python3 gle-ode/reference-generator/tests/test_scott_reference.py
uv run gle-ode/reference-generator/tests/test_scott_solver.py
python3 gle-ode/reference-generator/tests/test_freeze_table.py
uv run gle-ode/reference-generator/tests/test_generator.py