zoomy_core.symsolver.discretization.reconstruction#
Face reconstruction of the solver templates: order 1 takes cell values of the
reconstruction variables W(Q) to the faces, order 2 a limited LSQ gradient, and
the inverse map recovers Q. Nothing is clipped: face positivity is the flux
kernel’s, cell positivity MOOD’s.
Module Contents#
Functions#
Face traces |
|
|
|
The cells the a-priori front detector ( |
|
|
|
|
|
Limiter factor per row and cell (the NSM’s limiter, per-row overrides, then
ties), 1 where no row is limited; |
Data#
API#
- zoomy_core.symsolver.discretization.reconstruction.LIMITERS#
None
- zoomy_core.symsolver.discretization.reconstruction.reconstruct(nsm, Q, Qaux, p, time, order, demote, mesh)#
Face traces
(QL, QR)of order 1 (cell values) or 2 (limited LSQ gradient);QRon a boundary face is a placeholder for the BC value.Args
demote:Falsenone,Trueall cells, or a cell mask; demoted cells are constant inW(MOOD).
References
van Leer 1979, https://doi.org/10.1016/0021-9991(79)90145-1
Mavriplis 2003, https://doi.org/10.2514/6.2003-3986
- zoomy_core.symsolver.discretization.reconstruction.shore_extension(nsm, rows)#
((eta, h), eps)for the free-surface reconstruction, else(): the stencil of the free-surface roweta(W roweta, the depth’s slot) takes a DRY neighbour’s value as its hydrostatic extensionmin(eta_k, eta_i); a neighbour is dry when its depth (W rowh, the bed’s slot) is at most the model’swet_dry_eps.The order-2 hydrostatic reconstruction is well balanced when the reconstruction maps a lake at rest to a constant free surface in every wet cell (Audusse et al. 2004, Sec. 3). With dry cells that state is
eta = constwhereh > 0andh = 0,b >= etaelsewhere, and a dry cell’seta = bis no free surface: a bank above the lake would give the wet shore cell a free-surface slope, which a limiter keeping the face values within the neighbour bounds removes (the shore cell is a local minimum ofeta) but a smooth one (Venkatakrishnan) does not, and the slope accelerates water at rest. The hydrostatic reconstruction’s own face state continues the water level of the wet cell to a higher neighbouring bed (h* = max(0, eta_i - max(b_i, b_k))); the same continuation in the stencil,min(eta_k, eta_i), makes the gradient and the limiter bounds of a lake at rest exactly flat for any limiter, and leaves a lower dry neighbour (b_k < eta_i, the flooding front) as it is.References
Audusse et al. 2004, https://doi.org/10.1137/S1064827503431090
- zoomy_core.symsolver.discretization.reconstruction.front_demotion(nsm, Q, G, phi, rows, mesh)#
The cells the a-priori front detector (
ReconstructionSpec.front_tol) demotes to first order, or None when it is off: the depthhextrapolated with the gradient ofhand the limiter factor of the free-surface roweta, i.e. the depth the limitedetaand the bed imply.References
Gallardo, Pares, Castro 2007, https://doi.org/10.1016/j.jcp.2007.08.007
- zoomy_core.symsolver.discretization.reconstruction.maps(nsm)#
(W(Q), Q(W))kernels, or(None, None)whenQitself is reconstructed.
- zoomy_core.symsolver.discretization.reconstruction.bed_rows(nsm)#
(bed, depth)rows when the reconstruction is the pair (h, eta = b + h) withbed=BedReconstruction.derived, else None.References
Audusse et al. 2004, https://doi.org/10.1137/S1064827503431090
- zoomy_core.symsolver.discretization.reconstruction.limited(nsm, W, Wg, G, mesh, shore=())#
Limiter factor per row and cell (the NSM’s limiter, per-row overrides, then ties), 1 where no row is limited;
shoreisshore_extension’s, so the bounds come from the same stencil values as the gradient.