Ideal Channel Validation
The ideal-channel family is Cocoa’s quantitative check on quadrilateral and hybrid meshes. Four planforms carry five studies – a co-oscillating tide, frictionless against a closed-form solution and Manning-damped against ADCIRC, a steady uniform flow with a normal-depth solution, a meander with no closed-form solution but a closed-form balance, and a sloping beach whose shoreline moves – and each study runs on the same node set discretized three ways: all quadrilaterals, all triangles, and a hybrid of both. Every study also carries an ADCIRC row on the triangle node set, run at the formulation Cocoa implements, so a quadrilateral answer is measured against an independent implementation of the triangle answer rather than only against Cocoa’s own.
The case itself (meshes, forcing, physics and how to run it) is described under Ideal Channel (Quadrilateral Validation). This page is the results.
Every number below comes from a run of the release build made for this page or
from a committed CSV under test/data/channel/adcirc_reference/; the command
that produced each table is in Reproducing These Results.
The Mesh Family
Four planforms, each \(W = 200\) m wide:
straight: 4000 m at constant direction, flat 10 m bed.
meander: 4000 m of arc length over a flat 10 m bed, in three parts: a straight 500 m lead-in, a Langbein-Leopold [Langbein1966] sine-generated reach of three full wavelengths, \(\theta(s) = 30^\circ \sin(2\pi (s - 500\,\mathrm{m}) / \lambda)\) with \(\lambda = 1000\) m over 3000 m, and a straight 500 m lead-out. The sine spans a whole number of wavelengths, so \(\theta\) is zero at both junctions and the centerline is C1 there: the direction is continuous and the curvature jumps from zero to its largest value, as it does where a straight flume enters a bend. Five full bends, an apex radius of \(R_c = 304\) m and \(R_c/W = 1.52\), so inner-bank cells run about 0.67 times the nominal spacing and outer-bank cells about 1.33.
beach: the straight plan geometry with the bed rising linearly from 10 m deep at the forced end to 2 m above still-water level at the closed end, a slope of \(3\times 10^{-3}\).
skewbeach: the beach with a \(5\times 10^{-3}\) cross-channel tilt added, which turns the shoreline oblique to the mesh. The center-line depth profile is unchanged, so the two beaches’ fronts are directly comparable.
Two resolution tiers, and three element variants on the same nodes at both
tiers. The triangle variants split each quadrilateral cell along a diagonal, so
a quad mesh and its triangle mesh share their node set exactly and can be
compared node by node with no interpolation. The hybrid variant puts
quadrilaterals in a band of along-channel stations around the middle of the
reach and triangles outside it. A quad_tilt45 fixture of the straight
planform turns the quadrilateral lattice 45 degrees to the flow and closes the
walls and ends with triangles; it exists for the uniform-flow study alone and
is described with it. A fourth variant, triangle_alt, splits odd
along-channel stations along the other diagonal, so consecutive stations lean
opposite ways; it exists so that a quad-versus-triangle difference can be read
against a triangle-versus-triangle difference from diagonal choice alone. A
fifth, hybrid_alt, is the hybrid with that alternating split in its
triangle bands; it is committed but no study on this page runs it.
Tier |
Along-channel cell |
Cross-channel cell |
Nodes |
Quad elements |
Triangle elements |
Hybrid elements |
|---|---|---|---|---|---|---|
coarse |
100 m |
50 m |
205 |
160 |
320 |
264 (56 quad, 208 triangle) |
fine |
50 m |
25 m |
729 |
640 |
1280 |
1056 (224 quad, 832 triangle) |
The hybrid’s triangle bands are ns_cells // 3 stations at each end, so
the quadrilateral band is 14 of 40 stations at the coarse tier and 28 of 80 at
the fine one, spanning 1300 m to 2700 m on both. The beach planforms exist at
both tiers and the oblique beach at the coarse tier only, in the three main
variants; the straight and meander planforms exist at both tiers in all five.
Fig. 19 The coarse tier, drawn as the faces the mesh actually carries. Top: 600 m
of the straight channel across the junction at x = 1300 m where the hybrid’s
triangle band meets its quadrilateral band, and the turned lattice beside
them. The quadrilateral and triangle
panels are uniform, so any window represents them; the hybrid is a
triangulated mesh to the left of the junction and a quadrilateral one to the
right, which is what the window is placed on. Middle: the meander from the
inflow to 600 m past its own junction at x = 1195 m – the straight lead-in,
the junction where the sine-generated reach begins, and the first bends –
showing the inner-bank cell compression the planform produces. Bottom: bed elevation of the beach and skewbeach
planforms in meters relative to still water, with the still-water shoreline
in black and the center-line bed profile with the 3 m tidal range and the
low- and high-water shoreline positions.
The bilinear quadrilateral’s element operators, its reference map and the quadrature that forms them are in the numerical-methods theory; the wet/dry corner rules a quadrilateral needs beyond a triangle’s are Quadrilateral Rules (W1, DE1); the file encoding that lets one mesh carry both element types is Triangle/Quadrilateral Connectivity Encoding.
Co-oscillating Tide
The straight channel is forced at its open end at a period short enough to stand a wave in it, and the response is measured twice: once frictionless against the closed-form solution, and once with Manning friction and an amplitude large enough for that friction to bite, against ADCIRC on the same nodes. Both cases run 24 h behind a 2 h ramp and are fitted over hours 12 to 24, in both codes.
Frictionless channel
Reference solution
A frictionless channel of constant depth \(h\), length \(L\), forced by \(\zeta = a\cos(\omega t)\) at the open end \(x = 0\) and closed at \(x = L\), has the linear standing-wave solution [Dean1991]
The study forces at a 2400 s period, giving \(kL = 1.0573\) and a closed-end amplification \(1/\cos kL = 2.0357\). That is away from the quarter-wave resonance \(kL = \pi/2\), where the response is insensitive to resolution, and away from the M2 period the committed integration fixtures use, where \(kL = 0.057\) and the response is uniform along the channel to 0.16 percent. The amplitude is 0.01 m, so \(a/h = 10^{-3}\) and the nonlinear terms sit below the discretization error.
Two properties of the model would make a direct node-by-node comparison against Equation (8) measure something other than discretization error:
Free modes. A frictionless channel never damps the modes the ramp excites, so they persist for the whole run – the first mode’s fitted amplitude is 38 percent of \(a\) in rms over the nodes and 54 percent at its largest – and an \(L_2\) against the analytic time series is the same on every mesh. The comparison is therefore between complex amplitudes from a least-squares fit spanning the forcing frequency and the first three free modes of the open/closed channel, \(\omega_n = (2n-1)\pi\sqrt{gh}/(2L)\). Without those in the basis the seiche leaks into the forcing coefficient and floors the error at 5.5e-03 coarse and 5.7e-03 fine, which is no convergence at all.
Rotation. Cocoa always carries Coriolis, so the model solution is not the 1D one: the along-channel flow sets up a geostrophic cross-channel tilt
with \(y\) measured from the center line. The tilt puts a floor of \(3\times 10^{-4}\) under an all-node relative norm against the 1D solution, so that norm never converges. The center line carries no tilt by symmetry and is compared to the 1D solution directly; the tilt itself is reported as its own ratio, model over \(fUW/g\), which is a free check of the Coriolis term on both element types. That ratio is within \(7\times 10^{-4}\) of 1 at the coarse tier and \(1\times 10^{-4}\) at the fine one, on all three element variants under both mass matrices.
Fig. 20 The frictionless case at the coarse tier, lumped mass matrix: the fitted response at the forcing frequency (the free-mode seiche is not in it), with the mesh’s own face edges drawn over it and the cross-channel scale stretched eight times. Left: the in-phase part, which is the water level at high water at the closed end, on a shared scale from -0.0204 m to +0.0204 m; the standing wave amplifies towards the closed end and is uniform across the channel. Right: the quadrature part, the water level a quarter period later at maximum flow, on a shared scale from \(-1.7\times 10^{-5}\) m to \(+1.7\times 10^{-5}\) m. The 1D solution is exactly zero at that phase, so the whole field is the geostrophic tilt of Equation (9): antisymmetric about the center line and largest where the flow is, the same on all three meshes.
Errors and convergence
Center-line relative \(L_2\) of the complex amplitude at the forcing frequency, against Equation (8). The ADCIRC column is the same norm applied to the committed per-node amplitudes.
Mass matrix |
Tier |
quad |
triangle |
hybrid |
ADCIRC triangle |
|---|---|---|---|---|---|
lumped |
coarse |
2.633e-04 |
2.525e-04 |
2.551e-04 |
2.619e-04 |
lumped |
fine |
5.628e-05 |
5.422e-05 |
5.452e-05 |
5.667e-05 |
consistent |
coarse |
2.165e-04 |
2.059e-04 |
2.084e-04 |
2.106e-04 |
consistent |
fine |
4.556e-05 |
4.364e-05 |
4.393e-05 |
4.483e-05 |
Mass matrix |
Tier |
quad |
triangle |
hybrid |
ADCIRC triangle |
|---|---|---|---|---|---|
lumped |
coarse |
1.136e-03 |
1.052e-03 |
1.055e-03 |
1.053e-03 |
lumped |
fine |
3.856e-04 |
3.961e-04 |
3.963e-04 |
3.963e-04 |
consistent |
coarse |
1.075e-03 |
9.890e-04 |
9.917e-04 |
9.894e-04 |
consistent |
fine |
3.758e-04 |
3.873e-04 |
3.875e-04 |
3.874e-04 |
Mass matrix |
Field |
quad |
triangle |
hybrid |
ADCIRC triangle |
|---|---|---|---|---|---|
lumped |
zeta |
2.23 |
2.22 |
2.23 |
2.21 |
lumped |
u |
1.56 |
1.41 |
1.41 |
1.41 |
consistent |
zeta |
2.25 |
2.24 |
2.25 |
2.23 |
consistent |
u |
1.52 |
1.35 |
1.36 |
1.35 |
Second order in zeta holds on quadrilaterals, on triangles and on the hybrid alike, under both mass matrices, and the three element types lie within 6 percent of each other in elevation and 9 percent in velocity at either tier. The velocity converges at order 1.35 to 1.56, which is a property of the case rather than of the element type: ADCIRC’s triangles give the same order as Cocoa’s.
Run under the same protocol, the two codes agree to the same degree: Cocoa’s element types lie between 4.3 percent below and 2.8 percent above ADCIRC’s center-line elevation error over both tiers and both mass matrices, and the two converge at the same order.
Both errors carry the physics.advection default on this case, and neither
moves under it. At the fine tier under the lumped matrix the quadrilateral
elevation is 5.628e-05 where advection everywhere gives 5.598e-05, and the
velocity 3.856e-04 against 3.838e-04; the triangle and hybrid pairs are closer
still (5.422e-05 against 5.420e-05, 3.961e-04 against 3.947e-04). With
\(a/h = 10^{-3}\) the advective terms sit below the discretization error
everywhere, so switching them off one element in from the forced end changes
nothing either norm can see; the velocity norms also exclude the head and tail
cross-sections themselves.
The consistent mass matrix cuts the zeta error by about a fifth in both codes at the same resolution, independently: Cocoa’s fine-tier error falls from 5.63e-05 to 4.56e-05 on quadrilaterals, a factor of 1.24, while ADCIRC’s falls from 5.67e-05 to 4.48e-05, a factor of 1.26.
Fig. 21 The frictionless case: center-line relative \(L_2\) of the zeta amplitude against the along-channel cell length, log-log, with a second-order guide anchored at the fine tier. All four curves lie on top of each other, so neither the element type nor the implementation separates at this resolution.
Sensitivity to the fit window
The elevation norm above is a property of the fit window as much as of the mesh, and by a factor of two. Because the channel is frictionless the modes the ramp excites never decay: the non-harmonic residual holds at \(1.5\times 10^{-3}\) to \(1.8\times 10^{-3}\) of \(a\) from the end of the ramp to the end of the run, in both codes. What the fit does with that residual depends on where the window sits, and both codes respond to it the same way. Fitting the same fine-tier lumped runs over four windows:
Fit window |
quad |
triangle |
hybrid |
ADCIRC triangle |
|---|---|---|---|---|
hours 8 to 12 |
4.18e-05 |
4.03e-05 |
4.05e-05 |
4.29e-05 |
hours 12 to 18 |
8.49e-05 |
8.27e-05 |
8.30e-05 |
8.23e-05 |
hours 18 to 24 |
9.70e-05 |
9.43e-05 |
9.47e-05 |
9.35e-05 |
hours 12 to 24 |
5.63e-05 |
5.42e-05 |
5.45e-05 |
5.67e-05 |
Deepening the fit basis does not remove this. On the quadrilateral run, carrying sixteen free modes instead of three moves the four rows above to 3.66e-05, 8.31e-05, 9.66e-05 and 5.56e-05; adding the second and third harmonics of the forcing on top of the three free modes cuts the residual from 1.8e-03 to 1.1e-03 of \(a\) and still leaves 3.23e-05, 7.42e-05, 8.63e-05 and 5.25e-05. The largest lines the basis cannot absorb are the second harmonic of the forcing at 1200 s, the sum of the forcing with the first free mode near 960 s (predicted 966 s), and the second and third free modes at 548 s and 325 s rather than at the 538 s and 323 s the analytic dispersion relation gives, which is where the basis puts them. The velocity norm moves only 4 percent over the same windows.
So the frictionless case measures convergence order, and it measures the two codes against each other when both are fitted over the same window, which is what the tables above do. It cannot resolve a difference between them smaller than the window spread. The Manning-damped case below is the one whose answer does not depend on the window.
Against ADCIRC at the same mass matrix
Relative rms of the node-by-node complex amplitude difference over interior
stations, each side fitted with the same basis, from
compare_adcirc_reference.py. The head and tail cross-sections are excluded:
they carry each code’s own boundary treatment, which the two do not converge to
each other on.
Mass |
Tier |
quad zeta |
triangle zeta |
hybrid zeta |
quad u |
triangle u |
hybrid u |
|---|---|---|---|---|---|---|---|
lumped |
coarse |
3.400e-05 |
1.181e-05 |
1.083e-05 |
4.488e-03 |
1.642e-05 |
2.567e-03 |
lumped |
fine |
8.052e-06 |
2.914e-06 |
2.790e-06 |
1.685e-03 |
6.757e-06 |
9.588e-04 |
consistent |
coarse |
3.408e-05 |
5.608e-06 |
6.127e-06 |
4.488e-03 |
9.343e-06 |
2.567e-03 |
consistent |
fine |
7.982e-06 |
1.320e-06 |
1.362e-06 |
1.685e-03 |
5.794e-06 |
9.588e-04 |
The triangle columns are one to two orders of magnitude below the analytic errors of the same runs – 2.9e-06 against 5.4e-05 in elevation at the fine tier under the lumped matrix, and 6.8e-06 against 4.0e-04 in velocity – so on the shared triangulation the two implementations are the same solution to within their own round-off and fit floor. The quadrilateral and hybrid velocity columns are two orders larger, and that is an element-type difference rather than a solver one: it is the same to four digits under both mass matrices, and the Manning-damped case measures it directly against Cocoa’s own triangle run below.
Manning-damped channel
The case
The same channel and the same 2400 s forcing, with Manning’s \(n = 0.025\) at every node, a drag-coefficient floor of 0.0010 and an amplitude of 0.5 m. Quadratic friction at the frictionless case’s 0.01 m is no damping at all: \(C_d |u| / h\) is \(5\times 10^{-6}\ \text{s}^{-1}\) there and the e-fold runs to two days. At 0.5 m the velocity amplitude reaches 0.879 m/s and \(C_d = g n^2 / h^{1/3} = 2.846\times 10^{-3}\) gives \(C_d |u| / h\) of order \(3\times 10^{-4}\ \text{s}^{-1}\), an e-fold of about an hour at the peak of the cycle.
The decay is exponential until it reaches the basis floor. Fitting the run in one-hour windows from the end of the ramp, the part of the elevation that no basis frequency explains falls from \(4.70\times 10^{-2}\) m in the first window to \(7.36\times 10^{-4}\) m by the start of the fit window, an e-fold of 8356 s over the first six hours, and settles at \(2.5\times 10^{-4}\) m. That floor is the nonlinear content above the third harmonic, which the basis does not carry: refitting one settled hour on harmonics up to \(5\omega\) instead of \(3\omega\) takes the same residual from 2.48e-04 m to 5.88e-05 m, and up to \(8\omega\) to 4.62e-05 m.
Two consequences. First, the closed-end amplification is about 2.04 against the
frictionless linear 2.036, so the case still stands the same wave: friction
sets the transient’s lifetime here, not the response. Second,
\(a/h = 0.05\), so the response is not linear and Equation
(8) is not its solution – there is no closed form for
this case. Its reference is ADCIRC on the same nodes under the same friction
law (NOLIBF = 1 with the same Manning’s n as a
mannings_n_at_sea_floor nodal attribute and the same floor as
FFACTOR), and the harmonic fit carries the second and third harmonics of
the forcing in place of the free modes, which are gone by the window.
Fig. 22 The Manning-damped case at the fine tier, lumped mass matrix. Left and center: the center-line elevation and velocity amplitude at the forcing frequency along the channel, Cocoa’s three element types and ADCIRC’s triangles; the four lie on top of each other. Right: the rms of the part of the elevation record no basis frequency explains, over successive one-hour windows, on interior nodes. The dotted line is the start of the fit window.
Against ADCIRC at the same mass matrix
The same norm the frictionless case uses, over the same interior stations.
Mass |
Tier |
quad zeta |
triangle zeta |
hybrid zeta |
quad u |
triangle u |
hybrid u |
|---|---|---|---|---|---|---|---|
lumped |
coarse |
1.630e-04 |
2.201e-06 |
8.874e-06 |
4.559e-03 |
1.173e-05 |
3.315e-03 |
lumped |
fine |
1.115e-04 |
2.617e-06 |
7.472e-06 |
2.654e-03 |
2.488e-05 |
1.442e-03 |
consistent |
coarse |
1.632e-04 |
2.199e-06 |
8.880e-06 |
4.558e-03 |
1.185e-05 |
3.315e-03 |
consistent |
fine |
1.117e-04 |
2.648e-06 |
7.521e-06 |
2.651e-03 |
2.497e-05 |
1.442e-03 |
On the shared triangulation the two codes agree to \(2.6\times 10^{-6}\) in elevation at the fine tier – the same floor the frictionless triangle column reaches – and to \(2.5\times 10^{-5}\) in velocity: two independent implementations of the same equations, carrying the same Manning law formed from the same \(n\) and the same floor, over 24 h of a nonlinear response, differ by parts in \(10^{6}\) in elevation. Neither triangle column falls with refinement, because neither is measuring discretization any more.
The quadrilateral and hybrid columns are the element-type difference, and they do fall with refinement, slowly: order 0.55 in elevation and 0.78 in velocity on quadrilaterals from the coarse tier to the fine one. That is the order the inflow corner sets. The difference between a quadrilateral mesh and a triangulation of the same nodes is concentrated in a band one element thick at the forced end, where the triangulation’s fixed diagonal gives the corner a grain the quadrilaterals have not got, and a feature one element thick converges at a low order in a norm taken over the whole channel. The uniform-flow case measures the same corner directly.
Element types against each other
Reducing Cocoa’s own triangle run to the per-node amplitude form the comparator reads, and feeding it in place of the ADCIRC CSV, measures the element types against each other in exactly the norm the table above uses.
Mass |
Tier |
quad zeta |
hybrid zeta |
quad u |
hybrid u |
|---|---|---|---|---|---|
lumped |
coarse |
1.650e-04 |
9.480e-06 |
4.563e-03 |
3.317e-03 |
lumped |
fine |
1.139e-04 |
6.143e-06 |
2.669e-03 |
1.443e-03 |
consistent |
coarse |
1.652e-04 |
9.469e-06 |
4.563e-03 |
3.317e-03 |
consistent |
fine |
1.142e-04 |
6.162e-06 |
2.666e-03 |
1.443e-03 |
The velocity columns reproduce their against-ADCIRC counterparts to within 0.6 percent and the quadrilateral elevation column to within 2.2 percent, so ADCIRC contributes nothing detectable to them: what they measure is quadrilaterals against triangles. The hybrid elevation column is the exception, differing by up to 18 percent (6.14e-06 here against 7.47e-06 there at the fine tier), and that is the expected size: at \(7\times 10^{-6}\) the triangle run’s own \(2.6\times 10^{-6}\) difference from ADCIRC is a comparable contribution, and the two add roughly in quadrature. The hybrid sits between the quadrilaterals and the triangles in proportion to how much of the channel is quadrilateral.
Coriolis tilt and the fit window
The geostrophic tilt check survives the amplitude. Taking the velocity amplitude from the fit rather than from a closed form, the median ratio of the modeled wall-to-wall tilt to \(fUW/g\) over interior stations is within \(2.2\times 10^{-3}\) of 1 at the coarse tier and \(1.1\times 10^{-3}\) at the fine one, on all three element types under both mass matrices.
The fit window does not move the answer. Refitting the same runs over hours 12 to 18 and 18 to 24 instead of 12 to 24 moves the interior-node fitted amplitude by at most \(2.9\times 10^{-5}\) of itself in elevation and \(6.8\times 10^{-5}\) in velocity, on every element type at the fine tier, on quadrilaterals at the coarse one, and in ADCIRC at both.
The frictionless case’s fitted amplitude is just as stable under that test (\(4.4\times 10^{-5}\) and \(6.1\times 10^{-5}\) in Cocoa, \(3.9\times 10^{-5}\) and \(5.6\times 10^{-5}\) in ADCIRC at the fine tier). The difference is what is measured: an error against a solution \(5.6\times 10^{-5}\) away moves with the window; a difference between two codes fitted over the same window does not. Refitting both sides over the three windows gives a quadrilateral difference of 1.115e-04, 1.094e-04 and 1.137e-04 in elevation at the fine tier and 2.654e-03, 2.649e-03 and 2.658e-03 in velocity – each within 2 percent and 0.2 percent of the full-window value. The triangle column moves more in relative terms (2.6e-06, 5.1e-06 and 4.9e-07) but by under 5e-06 in absolute terms, which is the floor it sits at rather than a signal.
That is what makes this case, rather than the frictionless one, the gate the
Validation_channel_damped_adcirc_* entries run.
Uniform Flow
Reference solution
A prescribed total discharge \(Q\) enters the head of the straight channel through an ADCIRC type-22 normal-flow boundary and leaves through a fixed \(\zeta = 0\) boundary at the tail, under Manning friction with \(n = 0.025\). At steady state the cross-section discharge is an invariant of the solution: for every station,
with \(\hat{n}\) the section normal pointing downstream. The study prescribes \(Q = 2000\) m3/s over the 200 m by 10 m section, which is a mean speed near 1 m/s and a Froude number of 0.1, comfortably subcritical against the 9.9 m/s wave celerity. Normal depth for that discharge under Manning’s law,
is reached asymptotically down the channel, so the surface slope is nearly
uniform and the discharge invariant is the metric with the least modeling in
it: it is an integral the solution is forced to satisfy, and the two codes
integrate it with the same trapezoidal rule on the same node polyline
(channel_discharge.py).
Discharge error
Deviation of the realized cross-section discharge from the prescribed 2000 m3/s, over every interior station, at the final snapshot of a 12 h run.
Tier |
quad (rms, worst) |
triangle (rms, worst) |
hybrid (rms, worst) |
ADCIRC triangle (rms, worst) |
|---|---|---|---|---|
coarse |
1.89e-04, 5.67e-04 |
4.514e-03, 6.80e-03 |
1.895e-03, 3.46e-03 |
4.581e-03, 6.87e-03 |
fine |
1.71e-04, 7.24e-04 |
1.025e-02, 1.34e-02 |
5.562e-03, 1.13e-02 |
1.025e-02, 1.34e-02 |
The quadrilateral column is two orders better than the triangulated ones at the
fine tier and holds the prescribed discharge to 1.7e-04, but it does not
converge: its rms sits at 1.7e-04 to 1.9e-04 across both tiers where with
advection everywhere it reached 6.2e-06 at the fine one. The triangulated
columns are worse than with advection everywhere (1.03e-02 against
6.06e-03 at the fine tier) and they too stop converging. Both are the same
mechanism: the default leaves the head and tail cross-sections unadvected but
keeps the walls advected, so there is an abrupt element-by-element switch one
cross-section in from each end, and the momentum imbalance it leaves there is
carried as an
alternating station-to-station discharge error down the whole channel. Clearing
every boundary string instead – the walls as well – removes that error almost
entirely (triangles 6.8e-04 at the fine tier), which is the cost of sparing the
walls; what sparing them buys is the meander’s cross-bend balance further down
this page. The advection-everywhere figures on this page are the same
configurations run with physics.advection: true, and on the ADCIRC side
with no fort.13.
Cocoa’s triangles and ADCIRC’s agree to two significant figures in the rms at the coarse tier and four at the fine (4.514e-03 against 4.581e-03 and 1.0250e-02 against 1.0250e-02): the two codes are solving the same discrete problem at the same boundary treatment, so the error is the boundary condition’s and not one code’s arithmetic.
Fig. 23 Fine tier. Left: how far each interior cross-section’s discharge departs from the prescribed 2000 m3/s, as a fraction, on a log scale. The departure changes sign from one section to the next, so the magnitude is plotted: the curve is the envelope of that alternation, and its sharp minima are the sections where the envelope passes through a sign change. Cocoa’s triangle curve and ADCIRC’s lie on top of each other station for station, near \(10^{-2}\); the quadrilateral curve runs two orders below them, near \(10^{-4}\) down the whole channel. The shaded band is the reach where the hybrid mesh carries quadrilaterals: its curve leaves the triangle one at the band’s upstream edge, reaches the quadrilateral level within it, and climbs back as the triangulated outflow band takes over. Right: speed across the first interior cross-section at the final snapshot, Cocoa’s three element types, against the 1.00 m/s section mean. The quadrilateral mesh holds 0.955 to 1.018 m/s about the 1.00 m/s section mean; the triangle and hybrid meshes carry the residual corner jet, 0.74 to 1.36 m/s across the same 200 m, where with advection everywhere they ran 3.16 down to 0.12.
The inflow corner
This is the section the physics.advection default was written for,
and it is the section that shows what the default does not reach. With advection
on everywhere, the natural flux boundary at the head made a jet along one wall
which grew with resolution – 4.03 m/s against a 1.00 m/s depth-mean at the fine
tier, with a near-stagnant band beside it – in Cocoa and in ADCIRC alike. The
default clears the advection mask at the head (flux) and tail (elevation)
cross-sections and an element advects only when all of its corners do, so the
one cross-section of elements at each end carries no advective terms. That
removes most of the jet but not all of it: the jet is seeded at the flux
boundary and sustained by the advective terms in the cells immediately
downstream, which are on the walls and therefore still advect.
Tier |
quad |
triangle |
hybrid |
ADCIRC triangle |
ADCIRC, advection everywhere |
|---|---|---|---|---|---|
coarse |
1.060 |
1.286 |
1.282 |
1.284 |
1.482 |
fine |
1.054 |
1.464 |
1.455 |
1.463 |
4.032 |
The last column is the same ADCIRC case at the same IM with no fort.13,
i.e. advection everywhere on both sides.
On quadrilaterals there is no jet at either tier. The peak is 1.05 to 1.06 times the section mean, it does not grow with resolution, and it sits on the outflow cross-section at x = 4000 m where the elevation-specified tail is – not at the inflow corner. Across the first interior section of the fine tier the speed runs 0.955 to 1.018 m/s.
On the triangulated meshes the jet is reduced but not removed. The fine-tier
peak falls from 4.03 to 1.46 times the section mean, a factor of 2.8, but it is
still at the inflow corner and it still grows with refinement (1.29 at the
coarse tier and 1.46 at the fine one). Across the first interior section of the
fine tier the speed runs 0.739 to 1.362 m/s on triangles and 0.762 to 1.357 on
the hybrid, a spread of 0.62 against the 3.0 the same meshes carried with
advection everywhere. ADCIRC under the matching fort.13 reproduces Cocoa’s
triangles to three digits at both tiers (1.284 and 1.463 against 1.286 and
1.464) and puts the peak at the same corner, so the residual is the boundary
treatment and not one code’s arithmetic. It is the same result the ADCIRC experiment that motivated the
default measured directly: switching the advective terms off at the head
cross-section alone took the fine-tier peak to 1.47 m/s, and only switching them
off everywhere took it to 1.15.
Fig. 24 Fine tier, speed in m/s at the final snapshot (t = 12 h) over the first 1700 m of the channel, one shared scale from 0 to the largest speed on the displayed reach, with the mesh’s own face edges drawn and each panel’s own peak over that reach annotated. The reach runs 400 m past the start of the hybrid mesh’s quadrilateral band, marked on its panel: that mesh is triangulated over the inflow, which is why it carries the same corner jet as the triangle mesh, and its elements change type at x = 1300 m with the jet already behind them. The quadrilateral panel is near-uniform, its peak over the reach 1.02 m/s. The triangle, hybrid and ADCIRC panels carry the residual corner jet against the y = 200 m wall at 1.46 m/s, still visible most of the way down the view, and they carry the same one.
The fixed 0-2 diagonal is what makes the difference between the two results. The quadrilateral mesh has no diagonal grain for the corner to organize itself along, so a flux boundary with no advective term on its own cross-section leaves nothing behind; the triangulated meshes do, so the seed survives one cross-section inward and the advective terms on the wall cells sustain it. That is also what leaves the triangulated columns of the discharge table two orders above the quadrilateral one. Measured at the three quarter-point sections the ctest entries gate, the triangle deviation grows with refinement (5.2e-03 at the coarse tier and 1.2e-02 at the fine one), which is why those entries carry two tolerances: 2e-4 on quadrilaterals and 2e-2 on the triangulated meshes.
Cells turned 45 degrees to the flow
Every fixture above lays its quadrilateral edges along and across the channel,
so on its own the family cannot separate two readings of the uniform answer:
that the element carries no directional bias, or that its edges happened to
lie along the flow. The quad_tilt45 fixture separates them. Its lattice is
turned 45 degrees, so neither edge family runs with the flow, and the cells the
walls and the two ends cut are kept as the triangles they become. A lattice
rotated inside a straight channel cannot meet the walls on its own, and
staircasing them would change the geometry being compared; closing them with
triangles keeps the channel rectangular and makes this a hybrid mesh, which is
what a mesher produces anyway.
The lattice step is the cross-channel cell size, so each diamond has exactly
the area of the aligned fixture’s cell and the node count lands within two of
it: 203 against 205 at the coarse tier and 725 against 729 at the fine one.
That makes it a matched-resolution comparison rather than a different problem.
Because only every other lattice point on an edge is a node, the forcing
string carries fewer nodes than the aligned fixture’s, and the mesh has no row
of nodes spanning the channel at all, so the section discharge is integrated
along three geometric lines at the same quarter points
(channel_discharge.py --sections). That integral reproduces the node-row
one exactly on the aligned meshes, which is what pins it.
Mesh |
coarse peak |
fine peak |
coarse discharge deviation |
fine discharge deviation |
|---|---|---|---|---|
quadrilaterals aligned |
1.060 |
1.054 |
1.24e-04 |
1.31e-04 |
quadrilaterals at 45 degrees |
1.044 |
1.042 |
2.77e-04 |
4.70e-05 |
triangles |
1.286 |
1.464 |
6.35e-03 |
1.31e-02 |
Peak speed against the 1.00 m/s depth mean, and the worst departure of the three quarter-point sections from the prescribed discharge. The turned mesh holds the uniform answer: its peak is no larger than the aligned mesh’s, it sits at the outflow rather than at the inflow corner, and it does not grow with refinement. So the quadrilateral’s uniform answer belongs to the element and not to the orientation of its edges.
The triangles in this fixture line both walls and both ends, and no corner jet appears anyway, where the triangulated fixture at the same node count carries one. What separates them is grain rather than element type: the triangulated fixture splits every cell along the same diagonal, while these fill triangles are symmetric about the wall they close.
Fig. 25 Fine tier, speed in m/s at the final snapshot (t = 12 h) over the first 800 m, one shared scale and the mesh’s own face edges drawn. The two quadrilateral meshes are uniform over the reach; the triangulated mesh at the same node count carries the corner jet against the y = 200 m wall.
Map factors and an oblique inflow
The prescribed discharge is a physical quantity and the mesh lives on a projection, so realizing it correctly needs the boundary integral to carry the map’s scale factors. With the projection centered on the mesh every scale factor is 1 and the check is vacuous; these cases move the projection reference 9 degrees south of the mesh, where they are not.
Case (coarse tier, quadrilateral) |
Worst relative deviation |
|---|---|
Mercator |
1.220e-04 |
Equidistant cylindrical |
1.226e-04 |
Equal area |
1.236e-04 |
The same channel turned 30 degrees, equal area centered at 10 N |
1.341e-04 |
The last row is the only case whose flux boundary is oblique to both axes. With a normal along an axis one of \(n_x, n_y\) is zero and the exact Euclidean map weight cannot be told from a componentwise average; at 30 degrees on the equal-area map, where the two scale factors are 1.126 and 0.888, the averaged form is 0.588 percent low, which is about forty times the deviation measured above. The weight itself is the map-factor weight. The three centered rows sit at the same 1.2e-04 the coarse-tier quadrilateral case reaches on its own map, so the map factors still contribute nothing measurable.
Meander
The meander is forced as a river: the uniform-flow case’s 2000 m3/s enters at the head through a specified-flow boundary, leaves over a fixed \(\zeta = 0\) tail, and the reach runs 24 h behind a 2 h ramp under Manning’s n = 0.025. Every number below is read off the final snapshot. The planform is the one under The Mesh Family: both forcing boundaries sit on the straight lead-in and lead-out, and the five full bends between them share the apex radius \(R_c = 304\) m.
The sine amplitude is 30 degrees so the bend is mild enough
(\(R_c/W = 1.52\)) for the shallow-bend balance below to hold within a
few percent, and the lateral closure is a constant eddy viscosity of
20 m2/s rather than the Smagorinsky closure [Smagorinsky1963] the other studies use,
because Smagorinsky’s \(C_s\,A\,|S|\) is about 20 and 5 m2/s at
the coarse and fine tiers at the bend’s shear rate, and a closure that
refinement removes has no grid-converged solution to converge to. Cocoa reaches the constant with smagorinsky_coefficient: 0.0
and min_viscosity: 20.0, since
\(\nu = \max(\nu_\text{min}, C_s A |S|)\); ADCIRC with ESLM = +20.
Steadiness is measured, not assumed: on every one of the eight tier and variant runs, no interior section discharge moves by more than \(2.0\times 10^{-10}\) of the prescribed total between hours 22 and 24.
There is no closed-form solution. The case is measured against a conservation law, a balance, an independent implementation, and itself on a different discretization of the same nodes:
Discharge conservation. A steady flow carries the prescribed 2000 m3/s through every wall-to-wall cross-section. The deviation is reported over all interior sections. The section integral itself is exact to \(10^{-12}\) relative on a field that is uniformly 1 m/s along the local channel direction, so the table shows the discrete solution’s own local mass balance.
Cross-bend superelevation. Around a bend the centrifugal acceleration is balanced by a cross-stream surface slope [Chow1959], \(\partial\zeta/\partial r = u^2/(g r)\), so the outer bank stands higher than the inner one. \(U\) is the section-mean speed formed from the discharge and the apex section-mean total depth – 0.992 m/s at the coarse tier, the surface standing about 0.08 m above still water through the bends – and with \(W = 200\) m the width and \(R_c = 304\) m the apex radius the shallow-bend estimate is \(U^2 W / (g R_c) = 0.0660\) m. That is the \(a \to 0\) limit of the exact integral over \(r = R_c \pm W/2\) for a speed uniform across the section, \((U^2/g)\ln(r_o/r_i) = 0.0685\) m, with \(a = W/(2R_c) = 0.329\): the series is \(1 + a^2/3 + a^4/5 + \ldots\), so \(a^2 = 0.108\) and the leading correction is 3.6 percent, 3.9 percent summed. The estimate is expected to hold within a few percent.
ADCIRC, on the fixed-diagonal triangle node set, at the formulation Cocoa implements and at the same constant viscosity (
ESLM = +20).Each element variant against the fixed-diagonal triangulation on the same nodes, node by node with no interpolation.
Fig. 26 Coarse tier, steady state at the final snapshot (t = 24 h). Left column: water level on one shared scale from -0.170 m to +0.170 m. Right column: speed on one shared scale from 0 to 1.24 m/s. Rows: Cocoa’s quadrilaterals, fixed-diagonal triangulation, alternating-diagonal triangulation and hybrid, then ADCIRC on the fixed-diagonal node set. The bottom row is the quadrilateral answer minus the fixed-diagonal triangle answer, node by node on the shared node set, on its own scale of \(\pm 6.2\) mm and \(\pm 43\) mm/s. Every panel carries its own mesh’s face edges.
Discharge conservation
Tier |
quad |
triangle |
triangle_alt |
hybrid |
ADCIRC |
|---|---|---|---|---|---|
coarse |
1.19e-02, 2.24e-02 |
6.35e-03, 1.40e-02 |
1.44e-02, 2.44e-02 |
9.61e-03, 2.30e-02 |
6.35e-03, 1.40e-02 |
fine |
2.46e-03, 4.92e-03 |
1.34e-03, 3.37e-03 |
2.16e-03, 4.07e-03 |
2.00e-03, 4.92e-03 |
1.34e-03, 3.37e-03 |
Every variant converges at better than second order – the rms falls by 4.8 on quadrilaterals and 4.7 on triangles – and every one is at a quarter of a percent or better at the fine tier. Cocoa’s fixed-diagonal triangles and ADCIRC’s reproduce each other to four significant figures at both tiers.
Cross-bend structure
Superelevation is the outer-bank minus inner-bank water level at each of the five apexes, interpolated in arc length between the two sections that bracket it (both tiers put every apex on a section), averaged over the five. The bank peaks are the largest speed along the inner and along the outer wall over the quarter wavelength either side of an apex, worst bend reported.
Tier |
Variant |
Superelevation [m] |
/ estimate |
Inner bank peak [m/s] |
Outer bank peak [m/s] |
|---|---|---|---|---|---|
coarse |
quad |
0.0717 |
1.09 |
1.24 |
1.13 |
triangle |
0.0658 |
1.00 |
1.23 |
1.14 |
|
triangle_alt |
0.0627 |
0.95 |
1.22 |
1.14 |
|
hybrid |
0.0695 |
1.05 |
1.24 |
1.16 |
|
ADCIRC |
0.0658 |
1.00 |
1.23 |
1.14 |
|
fine |
quad |
0.0684 |
1.04 |
1.22 |
1.17 |
triangle |
0.0670 |
1.01 |
1.22 |
1.17 |
|
triangle_alt |
0.0668 |
1.01 |
1.22 |
1.17 |
|
hybrid |
0.0680 |
1.03 |
1.22 |
1.17 |
|
ADCIRC |
0.0670 |
1.01 |
1.22 |
1.17 |
Every run banks its free surface the right way at every bend, on every mesh and at both tiers, and the mean converges onto the shallow-bend estimate: the four element types span 0.95 to 1.09 times it at the coarse tier and 1.01 to 1.04 at the fine one, where the remaining few percent is the same order as the estimate’s own 3.6 percent shallow-bend correction. The bank peak speeds converge with it, onto 1.22 m/s on the inner bank and 1.17 m/s on the outer against a 1.00 m/s section mean.
The balance is the advective term’s own signature, so it is the measurement that
decides where the physics.advection default stops. The default spares
the land walls, so the cells against both banks – where a bend’s cross-stream
momentum flux lives – keep their advective terms and the table above is the
full-advection result to three digits. Clearing every boundary string instead
costs the balance the outermost cell on each bank: the recovered fraction then
tracks the advecting share of the width rather than converging on the estimate
(0.55 to 0.60 at the coarse tier, where 2 of the 4 lateral cells advect, and
0.77 to 0.79 at the fine tier, where 6 of 8 do). That is the cost the default
avoids, and it is why the walls are spared.
Element variants against each other
Tier |
quad, zeta [m] |
quad, speed [m/s] |
alt, zeta [m] |
alt, speed [m/s] |
hybrid, zeta [m] |
hybrid, speed [m/s] |
|---|---|---|---|---|---|---|
coarse |
2.194e-03 |
1.607e-02 |
1.383e-03 |
1.598e-02 |
1.599e-03 |
1.171e-02 |
fine |
4.266e-04 |
3.786e-03 |
3.314e-04 |
3.341e-03 |
3.252e-04 |
2.579e-03 |
order |
2.36 |
2.09 |
2.06 |
2.26 |
2.30 |
2.18 |
The element type and the diagonal choice both converge away. Quadrilaterals and the fixed-diagonal triangulation on the same nodes differ by 2.2e-03 m in water level at the coarse tier and 4.3e-04 m at the fine one, and by 1.6e-02 m/s and 3.8e-03 m/s in speed, at slightly better than second order. The two triangulations differ from each other by less than either differs from the quadrilaterals – the alternating-diagonal column starts lower in water level and so has less to shed, which is why its elevation order is the shallowest – and all three differences shrink together.
Against ADCIRC
Tier |
triangle |
quad |
triangle_alt |
hybrid |
|---|---|---|---|---|
coarse |
1.3e-03, 3.7e-05 |
2.2e-02, 1.6e-02 |
1.4e-02, 1.6e-02 |
1.6e-02, 1.2e-02 |
fine |
1.3e-03, 2.6e-05 |
4.6e-03, 3.8e-03 |
4.2e-03, 3.3e-03 |
3.7e-03, 2.6e-03 |
Cocoa’s fixed-diagonal triangles reproduce ADCIRC’s to 1.3e-03 relative in
water level and 2.6e-05 to 3.7e-05 in speed – 1.2e-04 m and 2.4e-05 m/s in
absolute terms at the fine tier. Two implementations of the same formulation,
closure and advection state on the same triangulation agree one to two orders
tighter than either agrees with the quadrilaterals, and the quadrilateral,
alternating-diagonal and hybrid columns converge toward the triangle one as the
mesh refines. The matched closure is load-bearing here: with ADCIRC at its own
default IM = 211112 instead, the same comparison reads 1.1e-02 and 9.5e-03
in water level, an order worse at both tiers.
Fig. 27 Both tiers at steady state (t = 24 h), against the along-channel cell length (100 and 50 m), log-log. Left: interior rms difference from the fixed-diagonal triangulation, solid for water level [m], dashed for speed [m/s]. Right: rms deviation of the interior section discharges from the prescribed 2000 m3/s, relative, with ADCIRC dashed over Cocoa’s triangle curve it lies on.
Stable time step
The meander runs at a quarter of the straight flow case’s step for its tier – 0.5 s coarse, 0.25 s fine. Sweeping the step upward until a 6 h run fails or takes the water level past 1 m, against a steady response of 0.13 to 0.21 m, gives each variant’s ceiling:
Tier |
quad |
triangle |
triangle_alt |
hybrid |
Step the study uses |
|---|---|---|---|---|---|
coarse |
4.0 |
4.0 |
3.0 |
4.0 |
0.5 |
fine |
2.5 |
2.0 |
1.5 |
2.0 |
0.25 |
The ceiling halves with the cell size, as a CFL limit does. Quadrilaterals, the fixed-diagonal triangulation and the hybrid reach the same ceiling at the coarse tier and the quadrilaterals a slightly higher one at the fine tier; the alternating-diagonal triangulation reaches a lower one at both. Element type costs nothing in step size here; diagonal alternation costs about a quarter of it. The study’s step leaves a factor of six to ten in hand on every mesh.
Wetting and Drying
The case
The beach planform is a sloping-beach case of the kind used to exercise
wet/dry schemes [Balzano1998]: its bed rises at \(3\times 10^{-3}\), so a 1.5 m,
3-hour tide moves the shoreline \(1.5 / 3\times 10^{-3} = 500\) m each way:
ten elements per half cycle at the coarse tier, twenty at the fine one. The
high-water shoreline is at 3833 m, 167 m short of the closed end, so the front
never interacts with the tail wall. The run is 12 h behind a 2 h ramp and the metrics cover hours 6
to 12, the last two full cycles, which is three ramp lengths in – far enough
that ADCIRC’s unclamped \(\tanh(2t/D)\) ramp is at 0.99999 and its residual
amplitude deficit is four orders of magnitude below one element length of front
position.
skewbeach adds a \(5\times 10^{-3}\) cross-channel tilt, so the
shoreline crosses the mesh obliquely instead of lying along a cross-section.
The cross-slope is not a multiple of the along-channel slope: at
the coarse tier the along-channel depth step is 0.30 m per cell and the
cross-channel one 0.25 m, so no two nodes of a cell share a bed elevation and
the corners wet one at a time.
The front metric
The metric is the front position \(x_f(t)\) on the channel center line,
reported two ways because they fail differently. The node front is the last
center-line node each code’s own wet/dry flag calls wet, scanning from the
forced end (Cocoa’s masked output, ADCIRC’s nodecode.63), so a wet pond
stranded beyond the shoreline does not move it. It is quantized to one element
and carries no interpretation. The interpolated front refines it by
extrapolating the total depth from the last two wet nodes, the only two whose
elevation means anything, to the depth at which each code stops calling a node
wet:
with \(H = h + \zeta\) and \(N\) the last wet node. Clipping into the element ahead of the last wet node keeps a nearly flat surface from projecting the shoreline across the whole beach. The arithmetic is identical on both sides, so a difference between the two codes is a difference between the codes and not between two definitions of a shoreline.
On a linear bed under a nearly flat surface the front follows the surface, so \(x_f\) is sinusoidal and its motion is summarized by a least-squares single-tone fit at the forcing frequency,
Fitting rather than differencing keeps the metric from being dominated by the element-scale steps the node front takes. Because both sides share \(\omega\), the amplitude ratio between a run and the reference is the peak-speed ratio.
Wet/dry parameters
The rules themselves – nodal drying, nodal wetting, elemental drying, the landlocked rule, and the quadrilateral reading of the corner rules over the four half-triangles – are in Wetting and Drying.
Cocoa |
ADCIRC |
Note |
|---|---|---|
|
|
Same meaning and same derived thresholds: both codes take
\(0.8 H_0\) as the elevation floor and \(1.2 H_0\) as the
wetting and elemental-drying threshold ( |
|
|
The head-driven velocity floor of the wetting rule, same use on both sides. |
|
|
Both are the code’s own default and both mean the elevation slope limiter never fires, so the beach case exercises no limiter on either side. |
|
(none) |
Cocoa floors the total depth at 0.1 m before dividing by it in the
friction; ADCIRC’s |
(none) |
|
A state-change hysteresis in the fort.15 format. This ADCIRC reads them
into |
|
|
Not the same wetting-velocity form: Cocoa runs |
|
|
A constant drag coefficient on both sides rather than Manning’s n.
Cocoa reaches it by zeroing |
masked output at dry nodes |
|
Each code’s own wet/dry verdict rather than a threshold re-derived from
the elevation field. Cocoa writes |
Front results
Center line, hours 6 to 12, from compare_wetdry_front.py. The difference
columns compare the interpolated fronts at the snapshots the two sides share.
Run |
Tier |
Excursion |
Peak speed |
rms diff |
max diff |
Speed ratio |
|---|---|---|---|---|---|---|
ADCIRC triangle |
coarse |
1034.0 m |
0.3008 m/s |
– |
– |
– |
cocoa triangle |
coarse |
1034.4 m |
0.3009 m/s |
1.57 m |
6.93 m |
1.0004 |
cocoa hybrid |
coarse |
1034.4 m |
0.3009 m/s |
1.57 m |
6.94 m |
1.0004 |
cocoa quad |
coarse |
1034.5 m |
0.3009 m/s |
2.27 m |
9.81 m |
1.0004 |
ADCIRC triangle |
fine |
1035.1 m |
0.3011 m/s |
– |
– |
– |
cocoa triangle |
fine |
1035.4 m |
0.3012 m/s |
1.45 m |
9.98 m |
1.0003 |
cocoa hybrid |
fine |
1035.4 m |
0.3012 m/s |
1.46 m |
9.97 m |
1.0003 |
cocoa quad |
fine |
1035.5 m |
0.3012 m/s |
1.75 m |
9.37 m |
1.0003 |
ADCIRC triangle |
skewbeach coarse |
1033.6 m |
0.3007 m/s |
– |
– |
– |
cocoa triangle |
skewbeach coarse |
1033.6 m |
0.3007 m/s |
2.35 m |
12.92 m |
0.9999 |
cocoa hybrid |
skewbeach coarse |
1033.5 m |
0.3006 m/s |
2.50 m |
12.92 m |
0.9999 |
cocoa quad |
skewbeach coarse |
1033.7 m |
0.3007 m/s |
3.71 m |
11.28 m |
1.0001 |
All three element types advance the front at ADCIRC’s speed to within 0.05 percent and never depart from its position by more than 9.8 m at the coarse tier (0.10 element lengths), 10.0 m at the fine one (0.20) or 12.9 m on the oblique shoreline. The bound the mechanism admits is still three element lengths – each code places the front inside the element that contains it, so a one-element disagreement in the last wet node can put the two interpolated fronts two element lengths apart, and the extrapolation of Equation (11) can carry a fraction of a cell further – but with advection off in the band inside the open boundary, the two codes never disagree about which element the front is in at any snapshot of any of the nine runs.
The hybrid rows match the triangle rows to a tenth of a meter on the beach
because the family’s quadrilateral band ends at 2700 m and the front never
retreats past 2758 m at either tier; on skewbeach they part in the second
decimal where the oblique shoreline clips that band.
Run |
2000 m (below low water) |
3300 m (intertidal) |
3700 m (near high water) |
|---|---|---|---|
ADCIRC triangle |
wet 100.0%, -1.545 .. 1.538 m |
wet 50.0%, 0.025 .. 1.561 m |
wet 22.2%, 1.224 .. 1.562 m |
cocoa triangle |
wet 100.0%, -1.546 .. 1.542 m |
wet 50.1%, 0.024 .. 1.566 m |
wet 22.4%, 1.225 .. 1.562 m |
cocoa hybrid |
wet 100.0%, -1.546 .. 1.542 m |
wet 50.1%, 0.024 .. 1.566 m |
wet 22.4%, 1.225 .. 1.561 m |
cocoa quad |
wet 100.0%, -1.546 .. 1.543 m |
wet 50.1%, 0.023 .. 1.567 m |
wet 22.4%, 1.225 .. 1.562 m |
A front position alone cannot distinguish a shoreline in the right place from a shoreline in the right place for the wrong reason. The stations can: the fraction of the window each station spends wet agrees within 0.2 percentage points across all four runs, and the elevation range each one sees agrees to within 5 mm.
Fig. 28 Coarse tier. The interpolated front position on the center line against time for the three Cocoa element types and the committed ADCIRC reference. The vertical line at 6 h opens the metric window.
Fig. 29 Coarse tier. Left: which center-line nodes the quadrilateral run calls wet (dark blue) or dry (white), as a function of position and time; the edge of the blue region is the node front. Right: ADCIRC’s own front position on the same axes. The quadrilateral front traces the same sawtooth, one element per step, over the same range.
Fig. 30 Coarse tier, the intertidal reach from 2400 m to 4000 m at low water (t = 10.55 h), mid flood (11.25 h) and high water (11.95 h), with the cross-channel scale stretched four times. Color is the total depth \(h + \zeta\) of elements every one of whose corners is wet, on one shared scale from 0 to 1.5 m; tan is a dry or deactivated element; dots mark the nodes each code calls wet; the mesh’s own face edges are drawn over everything. The four rows are ADCIRC’s triangles and Cocoa’s triangle, hybrid and quadrilateral meshes, and they put the shoreline in the same cell at all three phases.
Fig. 31 The same four meshes and the same shared 0 to 1.5 m depth scale at the fine tier, at t = 10.52 h, 11.25 h and 11.98 h, where the cells are half as long and the front crosses twenty of them per half cycle.
Fig. 32 The oblique planform at the coarse tier, the same three phases at t = 10.55 h, 11.27 h and 11.98 h, the same shared 0 to 1.5 m depth scale and the same fourfold cross-channel stretch. The shoreline now crosses the mesh at an angle and each code resolves it as a staircase one cell deep; the four meshes produce the same staircase.
The ADCIRC Protocol
ADCIRC’s IM selects between several algebraically distinct forms of the same
equations. Every committed reference is at IM = 513112 or, for the
consistent mass matrix, IM = 513111.
Digit |
Value |
Flag |
What it selects |
|---|---|---|---|
1 |
5 |
|
Two-part, velocity-based symmetric GWCE lateral stress |
2 |
1 |
|
Non-conservative GWCE advection |
3 |
3 |
|
Integration by parts, velocity-based symmetric momentum lateral stress |
4 |
1 |
|
Non-conservative momentum advection |
5 |
1 |
|
Corrected area integration |
6 |
2 |
|
Lumped GWCE mass matrix |
Digit 6 is the only digit that separates the two mass matrices: 513111 sets
ILump = 0 and echoes Consistent GWCE mass matrix, and it is paired with
A00 B00 C00 = 0.35 0.30 0.35, the same triple Cocoa’s consistent-solver
configs write into numeric.gwce_coefficients. Cocoa’s solver: explicit
matches the lumped pair and solver: implicit the consistent one.
Digit 3 is the one that matters, on both cases that have shear to resolve. Digit 1 makes the same choice on the GWCE side, and it also keeps Smagorinsky available: ADCIRC rejects a Smagorinsky coefficient only under the Kolar-Gray form (digit 1 = 1).
On the uniform-flow case digit 3 sets how large the residual corner jet is.
Measured at both tiers with the matched fort.13 in place and nothing else
changed, peak speed against the 1.000 m/s depth-mean is 1.284 and 1.463 m/s at
CME_LS_IBPSV (digit 3 = 3) against 1.105 and 1.192 m/s at CME_LS_IBPV
(digit 3 = 1), coarse to fine. The two forms stand 16 percent apart at the
coarse tier and 23 percent at the fine one, where without the fort.13 they
stood a factor of 2.4 apart (4.032 against 1.703). The jet is
made by the advective term at the natural flux boundary and amplified by the
symmetric closure; the fort.13 removes most of the term’s contribution and
the closure’s amplification of what is left scales down with it.
On the meander digit 3 matters in the comparison, not in the balance. The cross-bend superelevation recovers 0.996 and 1.015 of the estimate at the coarse and fine tiers at digit 3 = 3, against 0.959 and 0.982 at digit 3 = 1 – a few percent. Node by node the two forms are further apart than that: Cocoa’s triangles sit 1.3e-03 relative from ADCIRC in water level at digit 3 = 3 against 9.5e-03 to 1.1e-02 at ADCIRC’s own default 211112, an order worse at both tiers. A bend has cross-stream shear everywhere, not only at a boundary, so matching the closure remains a condition of the comparison. Cocoa implements the symmetric momentum form and the reference is matched at digit 3 = 3.
Where advection is evaluated is matched too, and it has to be, because Cocoa’s
default does not advect everywhere. physics.advection:
off_at_open_boundaries clears Cocoa’s advection mask at every node of the
boundary strings where the domain is truncated – the elevation-specified,
specified-flow and radiation strings, not the land walls – and an element
advects only when all of its corners do, so a band one element thick just
inside those strings carries no advective terms. ADCIRC reaches the same state
through a fort.13 advection_state attribute, whose per-node value is a
depth threshold rather than a flag: ADVECTLOCAL (nodalattr.F) advects
an element only where the still-water depth is at or above the threshold at
every corner. make_adcirc_case.py writes 1.0e4 m – three orders above
every depth in these meshes – at the nodes of those same strings (the head
cross-section of a tide case; the head and the tail of a flow case) and the
default 0.0 elsewhere, and names the attribute in fort.15. Same node set,
same element-wise AND: the two are equivalent by construction, and every
committed run’s fort.16 echoes Finished loading advection_state.
Four other settings are matched, not defaulted:
Lateral viscosity. ADCIRC reads a negative
ESLMas a Smagorinsky coefficient and a positive one as a constant eddy viscosity, andfort.16echoes which it took. Every case but the meander runsESLM = -0.2, matching the Smagorinsky coefficient of 0.2 the Cocoa validation configs write explicitly; the meander runsESLM = +20, matching the constant 20 m2/s that case is closed with on both sides. An inviscid ADCIRC (ESLM = 0) against a viscous Cocoa diverges on the flow case at both tiers. With the closure matched, all fifteen committed case, tier and mass combinations complete.tau0. 0.05, positive, matching Cocoa’s default, with no negative-
TAU0depth-dependent semantics in play on either side.Ramp and fit window. Cocoa ramps \(\tanh(2t/D)/\tanh 2\) clamped to exactly 1 at \(t \ge D\); ADCIRC ramps \(\tanh(2t/D)\), unnormalized and unclamped, so it is at 0.964 where Cocoa is at 1.000 and reaches 1 only asymptotically (0.995 at 1.5D, 0.99999 at 3D). Behind a 4 h ramp that leaves ADCIRC about 7e-04 short of full forcing across a 6 to 12 h window: a uniform amplitude deficit the harmonic fit reports as error at every station, the forced boundary node included. Both periodic references therefore run 24 h with a 2 h ramp and are fitted over hours 12 to 24, six ramp lengths in, where the deficit is below the discretization error, and Cocoa runs the same protocol so that the two codes are measured the same way.
Bottom friction.
NOLIBF = 1in every case. The frictionless tide case carriesFFACTOR = 0exactly; the two discharge-forced cases and the beach carry a constant drag coefficient there, \(g n^2 / h^{1/3}\) at the fixture depth. The damped tide case is the one that needs the depth dependence, so it carries Manning’s \(n = 0.025\) at every node through amannings_n_at_sea_floornodal attribute and readsFFACTORas the drag-coefficient floor, which is what ADCIRC makes of it once that attribute is loaded. Cocoa is given the same pair asphysics.manning_nandphysics.cf_lower_limit, and both codes then form \(C_d = g n^2 / (h + \zeta)^{1/3}\) at every node each step.
The ADCIRC meshes are the committed triangle fixtures’ own node sets written in
Cartesian meters (ICS = 1), so no map factor enters on either side, and the
bathymetry reaches ADCIRC as the same per-node numbers the Cocoa mesh carries
rather than as a second slope formula. Coriolis is a constant
CORI = 7.0705799e-5, which is \(2\Omega\sin 29^\circ\); the fixtures
span 200 m of latitude, over which \(f\) is constant to \(10^{-6}\), and
a Cartesian ADCIRC mesh has no latitude to compute it from.
Full provenance – the ADCIRC commit, the binary, the generation date, every
fort.15 setting, and the list of departures that cannot be matched – is in
test/data/channel/adcirc_reference/README.md, beside the CSVs themselves.
Fifteen CSVs are committed: the frictionless tide, the damped tide, the flow
and the meander studies at both tiers, the two tide cases at both tiers under
the consistent mass matrix as well, and the beach at both tiers plus the
oblique beach at the coarse tier.
Reproducing These Results
The comparisons that gate the build are the Validation_channel_* ctest
entries, which are excluded from the default suite:
ctest --test-dir build -L validation
They are the fine-tier cross-sections of the two tide cases and of the flow tables above, the coarse-tier cross-section of the meander tables, and both tiers of the wet/dry tables, at tolerances set to the measured errors with margin. One case at any tier and variant runs standalone:
cd test/data/channel
# Frictionless tide against the analytic solution
python3 run_channel_validation.py --study tide --variant quad --tier fine \
--cocoa <cocoa> --workdir /tmp/tide --tolerance-zeta 1.2e-4 --tolerance-u 8e-4
# Manning-damped tide against ADCIRC, either mass matrix
python3 run_channel_validation.py --study damped --variant quad --tier fine \
--mass consistent --compare adcirc --cocoa <cocoa> --workdir /tmp/damped \
--tolerance-zeta 2.5e-4 --tolerance-u 5.5e-3
# Uniform flow against the prescribed discharge
python3 run_channel_validation.py --study flow --variant quad --tier fine \
--cocoa <cocoa> --workdir /tmp/flow --tolerance-q 2e-4
# Meander: discharge conservation, the cross-bend balance, ADCIRC, and
# one element variant against another on the same nodes
python3 run_channel_validation.py --study meander --variant quad --tier coarse \
--compare discharge,bends --cocoa <cocoa> --workdir /tmp/meander \
--tolerance-q 4e-2 --tolerance-ratio 0.15
python3 run_channel_validation.py --study meander --variant triangle --tier coarse \
--compare adcirc --cocoa <cocoa> --workdir /tmp/meander \
--tolerance-zeta 3e-3 --tolerance-u 1e-3
python3 run_channel_validation.py --study meander --variant quad --peer triangle \
--tier coarse --cocoa <cocoa> --workdir /tmp/meander \
--tolerance-zeta 5e-3 --tolerance-u 6e-2
# Wet/dry front against the committed ADCIRC series
python3 run_channel_validation.py --study beach --variant quad --tier coarse \
--cocoa <cocoa> --workdir /tmp/beach --tolerance-front 50 --tolerance-speed 5e-3
Regenerating and checking the mesh fixtures is described under Ideal Channel (Quadrilateral Validation).
Regenerating the ADCIRC reference needs an ADCIRC binary; without one the script says so and exits 0, because the committed CSVs already carry the reference:
export ADCIRC_EXE=/path/to/adcirc
python3 run_adcirc_reference.py --cases tide,damped,flow,meander --tiers coarse,fine
python3 run_adcirc_reference.py --cases tide,damped --tiers coarse,fine --mass consistent
python3 run_adcirc_reference.py --cases beach --tiers coarse,fine
python3 run_adcirc_reference.py --cases skewbeach --tiers coarse
Regenerating the figures on this page: the commands are in
docs/sphinx/_static/images/channel/README.md, which lists the run grid the
plotting scripts read and the one invocation per figure.