|
flow 0.4.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Functions | |
| Fquad (x, y, r) | |
| disk_cell_areas (cy, cz, rho, j0, j1, k0, k1) | |
| exact_openness (N, C, Rr) | |
EXACT analytic face apertures for sphere packings -> peclet.flow set_openness_override.
The in-solver aperture estimators (set_aperture_order 1/2) are limited to the trilinearly
sampled SDF field; for ANALYTIC geometry this module computes machine-precision apertures
(closed-form disk-rectangle overlap, validated to 4e-16) and returns the three staggered
openness fields (ox[i] = -x face of cell i, x-fastest [x,y,z] arrays).
Provenance: the aperture-bias investigation (flow doc/collocated_paper_plan.md row 51) -- the
one-sample linear model carries a signed convexity bias (+0.59%/+0.27% bed permeability at
R=8/12, decaying ~h^2); exact apertures remove it. Multi-sphere faces are handled by clamped
subtraction (a slight over-closing where solid disks of different spheres overlap on one face
-- rare, counted, and conservative). A sub-resolution floor (1e-6) is REQUIRED: alpha ~ 1e-12
rows destroy the pressure-operator conditioning (measured: GPU watchdog-level solve stalls).
For general (non-sphere) analytic SDFs the same interface should be fed by a high-order
implicit quadrature (R. Saye, SIAM J. Sci. Comput. 37(2), 2015) -- not implemented here.
Usage:
from exact_apertures_spheres import exact_openness
ox, oy, oz = exact_openness(N, centers_cells, radii_cells) # cubic N, periodic
s.set_openness_override(ox.ravel(order="F"), oy.ravel(order="F"), oz.ravel(order="F"))
| exact_apertures_spheres.Fquad | ( | x, | |
| y, | |||
| r | |||
| ) |
Vectorized area of {u<x, v<y, u^2+v^2<r^2}, disk at origin.
Definition at line 26 of file exact_apertures_spheres.py.
References G.
Referenced by disk_cell_areas().
| exact_apertures_spheres.disk_cell_areas | ( | cy, | |
| cz, | |||
| rho, | |||
| j0, | |||
| j1, | |||
| k0, | |||
| k1 | |||
| ) |
Vectorized exact disk-cell overlap areas on cells [j,j+1]x[k,k+1], j in [j0,j1), k in [k0,k1).
Definition at line 52 of file exact_apertures_spheres.py.
References Fquad().
Referenced by exact_openness().
| exact_apertures_spheres.exact_openness | ( | N, | |
| C, | |||
| Rr | |||
| ) |
o[a][i,j,k]: openness of the -a face of cell (i,j,k); union over spheres by subtraction with clamping (multi-sphere faces are rare; counted and reported).
Definition at line 63 of file exact_apertures_spheres.py.
References disk_cell_areas().