Three-dimensional flows
In one minuteFlow past a sphere on an unstructured cubed-sphere mesh of curved hexahedra tests the 3-D path on a genuinely three-dimensional flow, inviscid against exact properties and laminar against accepted data, with adjoint derivatives of all six force and moment coefficients; a spanwise extrusion of the aerofoil case must reproduce the two-dimensional solution.
Two- and three-dimensional computations share the physics kernels but differ in everything dimensional: metric terms, neighbour coupling across hexahedral faces in eight possible relative orientations, one more direction of flux differencing, larger element blocks, surface integration over curved quadrilateral faces, three force and three moment components, and the adjoint of all of it. The studies on this page exercise that path on flows that vary in all three directions.
Inviscid sphere: exact properties#
Subsonic inviscid flow (M = 0.2) past a sphere of diameter 1 in a spherical far field of radius 10, on a cubed-sphere mesh of curved hexahedra (geometry degree 4): six blocks whose local axes are rotated against each other, so that the block interfaces contain all eight relative face orientations and the flow solve itself exercises the orientation tables. The exact solution is isentropic, has no drag (d'Alembert) and, by symmetry, no lift, side force or moment. Its surface pressure is known to O(M²) from the Janzen–Rayleigh expansion of the compressible potential, whose first correction is derived in closed form in the study module (surface speed 3/2 + 0.3131 M² at the equator) and checked numerically here; the neglected terms are O(M⁴) = 1.6e-03 times a coefficient of order one. Reported per polynomial degree: the L2 entropy error, the drag coefficient (frontal-area reference) and the area-weighted L2 difference of the wall pressure coefficient to that reference.
- Janzen–Rayleigh correction solves its equation (largest defect)2.99e-06expected < 1e-5 (finite-difference check)pass
- all solves convergedyesexpected truepass
- block interfaces show all 8 relative face orientations8expected = 8pass
- entropy error falls with p (smallest ratio between consecutive orders)2.494expected > 2pass
- spurious drag |cd| falls with p (smallest ratio)2.103expected > 1.5pass
- spurious drag |cd| at the highest resolution0.003294expected < 0.03pass
- surface cp error against Janzen–Rayleigh falls with p (smallest ratio)3.084expected > 1.5pass
- surface cp, area-weighted L2 difference to Janzen–Rayleigh, highest resolution0.01099expected < 0.03pass
- lift, side force and moments vanish (largest |coefficient|)1.11e-13expected < 1e-8pass
Run notes The far-field boundary at 20 radii imposes the free stream through a Riemann flux; the potential-flow disturbance there is of relative size (a/r)³/2 = 6e-5. The drag and entropy thresholds are bounds observed with margin on this mesh, not asymptotic rates: four polynomial degrees on one mesh do not establish an order of convergence.
gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build
Data table
| series | polar angle from the front stagnation point (degrees) | cp |
|---|---|---|
| 216 elements, p = 1 | 20.7536 | 0.160173 |
| 216 elements, p = 1 | 20.7536 | 0.160173 |
| 216 elements, p = 1 | 20.7536 | 0.512597 |
| 216 elements, p = 1 | 20.7536 | 0.451849 |
| 216 elements, p = 1 | 20.7536 | 0.160173 |
| 216 elements, p = 1 | 20.7536 | 0.160173 |
| 216 elements, p = 1 | 45.993 | -0.108021 |
| 216 elements, p = 1 | 45.993 | 0.366706 |
| 216 elements, p = 1 | 45.993 | 0.177826 |
| 216 elements, p = 1 | 45.993 | -0.0490417 |
| 216 elements, p = 1 | 45.993 | 0.307355 |
| 216 elements, p = 1 | 45.993 | -0.0490417 |
| 216 elements, p = 1 | 45.993 | -0.126705 |
| 216 elements, p = 1 | 45.993 | -0.0490417 |
| 216 elements, p = 1 | 45.993 | -0.108021 |
| 216 elements, p = 1 | 45.993 | -0.130971 |
| 216 elements, p = 1 | 54.7356 | 0.176901 |
| 216 elements, p = 1 | 54.7356 | -0.0258992 |
| 216 elements, p = 1 | 54.7356 | -0.0258992 |
| 216 elements, p = 1 | 54.7356 | 0.176901 |
| 216 elements, p = 1 | 75.4892 | -0.33682 |
| 216 elements, p = 1 | 75.4892 | -0.377742 |
| 216 elements, p = 1 | 75.4892 | -0.240606 |
| 216 elements, p = 1 | 75.4892 | -0.24047 |
| 216 elements, p = 1 | 75.4892 | -0.240606 |
| 216 elements, p = 1 | 75.4892 | -0.377742 |
| 216 elements, p = 1 | 75.4892 | -0.333883 |
| 216 elements, p = 1 | 75.4892 | -0.436903 |
| 216 elements, p = 1 | 75.4892 | -0.419095 |
| 216 elements, p = 1 | 75.4892 | -0.436903 |
| 216 elements, p = 1 | 75.4892 | -0.24047 |
| 216 elements, p = 1 | 79.2714 | -0.452329 |
| 216 elements, p = 1 | 79.2714 | -0.412708 |
| 216 elements, p = 1 | 79.2714 | -0.412708 |
| 216 elements, p = 1 | 79.2714 | -0.224486 |
| 216 elements, p = 1 | 79.2714 | -0.324408 |
| 216 elements, p = 1 | 100.729 | -0.409164 |
| 216 elements, p = 1 | 100.729 | -0.416741 |
| 216 elements, p = 1 | 100.729 | -0.399977 |
| 216 elements, p = 1 | 100.729 | -0.331837 |
| 216 elements, p = 1 | 100.729 | -0.399977 |
| 216 elements, p = 1 | 100.729 | -0.331837 |
| 216 elements, p = 1 | 104.511 | -0.439554 |
| 216 elements, p = 1 | 104.511 | -0.439554 |
| 216 elements, p = 1 | 104.511 | -0.292011 |
| 216 elements, p = 1 | 104.511 | -0.439554 |
| 216 elements, p = 1 | 104.511 | -0.432061 |
| 216 elements, p = 1 | 104.511 | -0.439554 |
| 216 elements, p = 1 | 104.511 | -0.373116 |
| 216 elements, p = 1 | 104.511 | -0.373116 |
| 216 elements, p = 1 | 104.511 | -0.349712 |
| 216 elements, p = 1 | 104.511 | -0.309794 |
| 216 elements, p = 1 | 125.264 | -0.263292 |
| 216 elements, p = 1 | 125.264 | -0.263292 |
| 216 elements, p = 1 | 125.264 | -0.205508 |
| 216 elements, p = 1 | 125.264 | -0.205508 |
| 216 elements, p = 1 | 134.007 | -0.191101 |
| 216 elements, p = 1 | 134.007 | -0.185956 |
| 216 elements, p = 1 | 134.007 | 0.0423674 |
| 216 elements, p = 1 | 134.007 | 0.119944 |
| 216 elements, p = 1 | 134.007 | 0.0423674 |
| 216 elements, p = 1 | 134.007 | -0.185956 |
| 216 elements, p = 1 | 134.007 | 0.0423674 |
| 216 elements, p = 1 | 134.007 | -0.0838601 |
| 216 elements, p = 1 | 134.007 | -0.144087 |
| 216 elements, p = 1 | 134.007 | -0.0838601 |
| 216 elements, p = 1 | 134.007 | -0.0838601 |
| 216 elements, p = 1 | 159.246 | 0.163967 |
| 216 elements, p = 1 | 159.246 | 0.163967 |
| 216 elements, p = 1 | 159.246 | 0.187782 |
| 216 elements, p = 1 | 159.246 | 0.187782 |
| 216 elements, p = 1 | 159.246 | 0.198649 |
| 216 elements, p = 2 | 0 | 0.820326 |
| 216 elements, p = 2 | 15 | 0.609407 |
| 216 elements, p = 2 | 15 | 0.609407 |
| 216 elements, p = 2 | 20.7536 | 0.563879 |
| 216 elements, p = 2 | 20.7536 | 0.563879 |
| 216 elements, p = 2 | 20.7536 | 0.631756 |
| 216 elements, p = 2 | 20.7536 | 0.614907 |
| 216 elements, p = 2 | 20.7536 | 0.631756 |
| 216 elements, p = 2 | 20.7536 | 0.584709 |
| 216 elements, p = 2 | 30 | 0.353581 |
| 216 elements, p = 2 | 32.4767 | 0.420371 |
| 216 elements, p = 2 | 32.4767 | 0.214507 |
| 216 elements, p = 2 | 32.4767 | 0.393891 |
| 216 elements, p = 2 | 32.4767 | 0.214507 |
| 216 elements, p = 2 | 32.4767 | 0.420371 |
| 216 elements, p = 2 | 39.2315 | 0.0808225 |
| 216 elements, p = 2 | 39.2315 | 0.0808225 |
| 216 elements, p = 2 | 45 | -0.00724636 |
| 216 elements, p = 2 | 45 | -0.269144 |
| 216 elements, p = 2 | 45.993 | -0.0817129 |
| 216 elements, p = 2 | 45.993 | -0.189428 |
| 216 elements, p = 2 | 45.993 | -0.103884 |
| 216 elements, p = 2 | 45.993 | -0.058147 |
| 216 elements, p = 2 | 45.993 | -0.063614 |
| 216 elements, p = 2 | 45.993 | -0.128417 |
| 216 elements, p = 2 | 45.993 | -0.063614 |
| 216 elements, p = 2 | 45.993 | -0.058147 |
| 216 elements, p = 2 | 45.993 | -0.125177 |
| 216 elements, p = 2 | 45.993 | -0.103884 |
| 216 elements, p = 2 | 45.993 | -0.218752 |
| 216 elements, p = 2 | 49.1066 | -0.244009 |
| 216 elements, p = 2 | 49.1066 | -0.29067 |
| 216 elements, p = 2 | 49.1066 | -0.29067 |
| 216 elements, p = 2 | 49.1066 | -0.29067 |
| 216 elements, p = 2 | 49.1066 | -0.244009 |
| 216 elements, p = 2 | 54.7356 | -0.374845 |
| 216 elements, p = 2 | 54.7356 | -0.374845 |
| 216 elements, p = 2 | 54.7356 | -0.437705 |
| 216 elements, p = 2 | 54.7356 | -0.437705 |
| 216 elements, p = 2 | 60 | -0.607262 |
| 216 elements, p = 2 | 60 | -0.628451 |
| 216 elements, p = 2 | 60.8526 | -0.529438 |
| 216 elements, p = 2 | 60.8526 | -0.529438 |
| 216 elements, p = 2 | 60.8526 | -0.696705 |
| 216 elements, p = 2 | 60.8526 | -0.696705 |
| 216 elements, p = 2 | 60.8526 | -0.628424 |
| 216 elements, p = 2 | 63.4349 | -0.680998 |
| 216 elements, p = 2 | 63.4349 | -0.680998 |
| 216 elements, p = 2 | 63.4349 | -0.680998 |
| 216 elements, p = 2 | 67.7923 | -0.791392 |
| 216 elements, p = 2 | 67.7923 | -0.791392 |
| 216 elements, p = 2 | 75 | -0.958512 |
| 216 elements, p = 2 | 75 | -0.846831 |
| 216 elements, p = 2 | 75 | -0.958512 |
| 216 elements, p = 2 | 75.4892 | -0.979732 |
| 216 elements, p = 2 | 75.4892 | -0.992878 |
| 216 elements, p = 2 | 75.4892 | -0.991058 |
| 216 elements, p = 2 | 75.4892 | -0.979732 |
| 216 elements, p = 2 | 75.4892 | -1.00543 |
| 216 elements, p = 2 | 75.4892 | -0.992878 |
| 216 elements, p = 2 | 75.4892 | -0.854683 |
| 216 elements, p = 2 | 75.4892 | -0.952146 |
| 216 elements, p = 2 | 75.4892 | -0.952146 |
| 216 elements, p = 2 | 75.4892 | -1.00543 |
| 216 elements, p = 2 | 75.4892 | -0.854683 |
| 216 elements, p = 2 | 76.9357 | -0.965279 |
| 216 elements, p = 2 | 76.9357 | -0.986213 |
| 216 elements, p = 2 | 76.9357 | -0.986213 |
| 216 elements, p = 2 | 76.9357 | -0.965279 |
| 216 elements, p = 2 | 76.9357 | -0.991234 |
| 216 elements, p = 2 | 79.2714 | -1.00873 |
| 216 elements, p = 2 | 79.2714 | -1.00308 |
| 216 elements, p = 2 | 79.2714 | -1.01714 |
| 216 elements, p = 2 | 79.2714 | -1.01714 |
| 216 elements, p = 2 | 79.2714 | -1.00873 |
| 216 elements, p = 2 | 90 | -1.03661 |
| 216 elements, p = 2 | 90 | -1.07586 |
| 216 elements, p = 2 | 90 | -1.03661 |
| 216 elements, p = 2 | 90 | -1.12637 |
| 216 elements, p = 2 | 90 | -1.05828 |
| 216 elements, p = 2 | 90 | -1.12637 |
| 216 elements, p = 2 | 90 | -1.03738 |
| 216 elements, p = 2 | 90 | -1.06982 |
| 216 elements, p = 2 | 90 | -1.03661 |
| 216 elements, p = 2 | 90 | -1.12637 |
| 216 elements, p = 2 | 90 | -1.05828 |
| 216 elements, p = 2 | 90 | -1.03738 |
| 216 elements, p = 2 | 100.729 | -1.04958 |
| 216 elements, p = 2 | 100.729 | -1.01026 |
| 216 elements, p = 2 | 100.729 | -1.04958 |
| 216 elements, p = 2 | 100.729 | -0.998486 |
| 216 elements, p = 2 | 100.729 | -0.990356 |
| 216 elements, p = 2 | 100.729 | -0.990356 |
| 216 elements, p = 2 | 103.064 | -1.01573 |
| 216 elements, p = 2 | 103.064 | -0.957973 |
| 216 elements, p = 2 | 103.064 | -0.970614 |
| 216 elements, p = 2 | 103.064 | -0.957973 |
| 216 elements, p = 2 | 103.064 | -1.01573 |
| 216 elements, p = 2 | 104.511 | -0.948757 |
| 216 elements, p = 2 | 104.511 | -0.991527 |
| 216 elements, p = 2 | 104.511 | -0.991527 |
| 216 elements, p = 2 | 104.511 | -0.948757 |
| 216 elements, p = 2 | 104.511 | -0.991527 |
| 216 elements, p = 2 | 104.511 | -1.06135 |
| 216 elements, p = 2 | 104.511 | -0.990936 |
| 216 elements, p = 2 | 104.511 | -0.990936 |
| 216 elements, p = 2 | 104.511 | -0.94629 |
| 216 elements, p = 2 | 104.511 | -0.990936 |
| 216 elements, p = 2 | 104.511 | -0.95083 |
| 216 elements, p = 2 | 105 | -0.860174 |
| 216 elements, p = 2 | 105 | -0.91046 |
| 216 elements, p = 2 | 112.208 | -0.666276 |
| 216 elements, p = 2 | 112.208 | -0.744746 |
| 216 elements, p = 2 | 112.208 | -0.744746 |
| 216 elements, p = 2 | 116.565 | -0.629712 |
| 216 elements, p = 2 | 116.565 | -0.609181 |
| 216 elements, p = 2 | 116.565 | -0.629712 |
| 216 elements, p = 2 | 119.147 | -0.470296 |
| 216 elements, p = 2 | 119.147 | -0.565484 |
| 216 elements, p = 2 | 119.147 | -0.565484 |
| 216 elements, p = 2 | 119.147 | -0.621522 |
| 216 elements, p = 2 | 119.147 | -0.565484 |
| 216 elements, p = 2 | 120 | -0.505544 |
| 216 elements, p = 2 | 125.264 | -0.334741 |
| 216 elements, p = 2 | 125.264 | -0.292487 |
| 216 elements, p = 2 | 125.264 | -0.428347 |
| 216 elements, p = 2 | 125.264 | -0.428347 |
| 216 elements, p = 2 | 130.893 | -0.202003 |
First 200 of 1154 rows; the study JSON holds all of them.
gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build
| elements | p | DOF | Newton steps | residual reduction | entropy error | cd | cp L2 diff. (Janzen–Rayleigh) | cp L2 diff. (incompressible speed) | cp L2 diff. (incompressible) | cp max diff. | largest |cl, cs, cm| | solve time (s) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 216 | 1 | 8640 | 11 | 4.9310e-11 | 2.5017e-05 | 0.123133 | 0.605749 | 0.586555 | 0.593691 | 0.997252 | 4.2407e-15 | 43.7913 |
| 216 | 2 | 29160 | 12 | 6.0815e-12 | 1.0030e-05 | 0.0585389 | 0.196404 | 0.182213 | 0.186304 | 0.751574 | 1.1084e-13 | 54.2957 |
| 216 | 3 | 69120 | 13 | 1.4683e-12 | 2.3377e-06 | 0.0144415 | 0.0612559 | 0.0550651 | 0.055083 | 0.320863 | 1.4419e-14 | 39.5968 |
| 216 | 4 | 135000 | 13 | 3.5167e-11 | 5.9278e-07 | 0.00329403 | 0.01099 | 0.0192673 | 0.0117749 | 0.0532136 | 6.3655e-14 | 111.039 |
gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build
Subsonic inviscid flow past a sphere is isentropic, has no drag (d’Alembert’s paradox) and, by symmetry, no lift, side force or moment. Every one of these is a number the computation should reproduce, and none needs a reference solution. The surface pressure is compared with the Janzen–Rayleigh expansion of the compressible potential flow, which is exact up to terms of order ; its first correction is derived in closed form in the study and checked numerically there.
The mesh is a cubed sphere: six blocks of curved hexahedra, three meeting at each of the eight cube corners, with the local axes of the blocks deliberately rotated against each other. The flow solve therefore passes through all eight relative face orientations, which a structured block never produces.
| orientation code | faces |
|---|---|
| 0 | 924 |
| 1 | 24 |
| 2 | 24 |
| 3 | 24 |
| 4 | 48 |
| 5 | 48 |
| 6 | 48 |
| 7 | 48 |
gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build
Data table
| degrees of freedom | entropy error | |cd| | cp L2 difference |
|---|---|---|---|
| 8640 | 2.5017e-05 | 0.123133 | 0.605749 |
| 29160 | 1.0030e-05 | 0.0585389 | 0.196404 |
| 69120 | 2.3377e-06 | 0.0144415 | 0.0612559 |
| 135000 | 5.9278e-07 | 0.00329403 | 0.01099 |
gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build
Entropy error, spurious drag and the pressure difference fall with every increase of the polynomial degree on a fixed mesh of 216 elements. Four degrees on one mesh show convergence; they do not establish an asymptotic order, and the thresholds of the checks are bounds observed with margin on this mesh. The lift, side force and moments are zero to round-off at every degree, because the discretization preserves the symmetry of the mesh.
Laminar sphere, Re = 100#
Steady three-dimensional Navier–Stokes solve: sphere of diameter 1, Re = 100 on the diameter, M = 0.2, adiabatic no-slip wall, far field at 10 diameters; cubed-sphere mesh of 576 curved hexahedra (geometry degree 3) with mixed block orientations, BR2 viscous fluxes, Newton–Krylov with p-multigrid. At this Reynolds number the flow is steady and axisymmetric with a closed recirculation bubble. References: drag coefficient 1.09 (standard drag curve of Clift, Grace & Weber 1978; Johnson & Patel, JFM 378, 1999, compute 1.08–1.10) and a bubble length of about 0.87 diameters (Johnson & Patel 1999; Taneda 1956). Both references are for incompressible flow in an unbounded domain; at M = 0.2 with the boundary at 10 diameters a difference of the order of one per cent is expected, which the tolerance on the drag covers. Drag is referred to the frontal area π/4.
- all solves converged to a steady stateyesexpected truepass
- drag coefficient, highest order: |cd − 1.09| / 1.090.01409expected < 0.03pass
- wake is axisymmetric: lift, side force and moments (largest |coefficient|)1.77e-15expected < 1e-7pass
- a closed recirculation bubble exists; length in diameters, highest order0.9501expected within 15 % of 0.87pass
- adiabatic wall: integrated heat flux0expected < 1e-10pass
Run notes The mesh has the symmetry of the cube, so the vanishing lift and side force show that the solver preserves a symmetric solution; they do not test the stability of the axisymmetric wake (which is stable below Re of about 210). The bubble length is read from the solution nodes on the wake axis by linear interpolation between the two nodes where the velocity changes sign.
gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build
| p | elements | DOF | Newton steps | residual reduction | cd | bubble length / D | first cell height / D | largest |cl, cs, cm| | solve time (s) |
|---|---|---|---|---|---|---|---|---|---|
| 2 | 576 | 77760 | 14 | 1.3330e-11 | 1.10536 | 0.950129 | 0.185684 | 1.7681e-15 | 162.798 |
gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build
Data table
| x (diameters, sphere centre at 0) | p = 2 |
|---|---|
| 0.5 | 0.0146961 |
| 0.592842 | -0.0445917 |
| 0.685684 | -0.107759 |
| 0.862085 | -0.138962 |
| 1.03848 | -0.114034 |
| 1.37364 | -0.025023 |
| 1.70881 | 0.0846301 |
| 2.34561 | 0.264487 |
| 2.98241 | 0.396439 |
gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build
At a Reynolds number of 100 the flow past a sphere is steady and axisymmetric with a closed recirculation bubble. The drag coefficient is compared with the standard drag curve and with the computations and measurements of Johnson and Patel, the length of the bubble with the same sources (bibliography). The Mach number of 0.2 leaves a compressibility effect of the order of a per cent in the drag, which is why the tolerance is three per cent and not tighter. The chart shows the streamwise velocity on the wake axis: the bubble ends where it changes sign.
Adjoint derivatives in 3-D#
An ellipsoid with three different semi-axes (0.5, 0.35, 0.6) at 4 degrees angle of attack and 3 degrees sideslip, M = 0.3, on a mixed-orientation cubed-sphere mesh: nothing is symmetric, so all six wind-axis force and moment coefficients (drag, lift, side force, roll, yaw, pitch about an offset reference point) and all their derivatives are non-zero. Total derivatives from one adjoint solve per output are compared with central finite differences of re-converged solves with respect to the angle of attack, the sideslip angle, the Mach number (and the Reynolds number for the viscous case), and, as a directional derivative, with respect to a smooth three-dimensional displacement of the surface nodes (the shape input x_surface, propagated into the volume by the mesh deformation). The finite differences are accurate to about 1e-7 in absolute terms (step 1e-5, solves converged 12 orders), so errors are relative to the reference value or, for a derivative that is small through cancellation, to 1 % of the largest derivative with respect to the same input (and at least 1e-3).
- adjoint vs central differences, d/dalpha: largest relative error3.28e-06expected < 1e-5pass
- adjoint vs central differences, d/dbeta: largest relative error1.46e-06expected < 1e-5pass
- adjoint vs central differences, d/dmach: largest relative error2.33e-06expected < 1e-5pass
- adjoint vs central differences, d/dx_surface: largest relative error1.97e-06expected < 1e-4pass
- adjoint linear solves reached their tolerance (largest reduction)9.99e-11expected < 1e-9pass
- the flow responds to the sideslip angle (free stream turned by beta)yesexpected truepass
gyre 0.4.0 · 39979fcf90 · · cpu · quick suite · record (JSON)Same code as this build
| case | output | input | adjoint | finite difference | relative error |
|---|---|---|---|---|---|
| inviscid ellipsoid, p = 2 | cd | alpha | 0.43361 | 0.43361 | 7.3819e-07 |
| inviscid ellipsoid, p = 2 | cl | alpha | 2.33525 | 2.33525 | 3.5024e-07 |
| inviscid ellipsoid, p = 2 | cs | alpha | -0.173265 | -0.173265 | 2.2887e-06 |
| inviscid ellipsoid, p = 2 | cmx | alpha | -0.00796038 | -0.0079603 | 3.2793e-06 |
| inviscid ellipsoid, p = 2 | cmy | alpha | 0.0429865 | 0.0429866 | 1.4651e-06 |
| inviscid ellipsoid, p = 2 | cmz | alpha | 0.50961 | 0.50961 | 4.4519e-08 |
| inviscid ellipsoid, p = 2 | cd | beta | 0.051034 | 0.051034 | 1.0742e-06 |
| inviscid ellipsoid, p = 2 | cl | beta | -0.471577 | -0.471577 | 2.2216e-07 |
| inviscid ellipsoid, p = 2 | cs | beta | -0.539389 | -0.539389 | 4.4874e-07 |
| inviscid ellipsoid, p = 2 | cmx | beta | 0.0455927 | 0.0455927 | 1.4592e-06 |
| inviscid ellipsoid, p = 2 | cmy | beta | 0.196756 | 0.196756 | 1.9583e-07 |
| inviscid ellipsoid, p = 2 | cmz | beta | -0.0172066 | -0.0172066 | 7.9000e-08 |
| inviscid ellipsoid, p = 2 | cd | mach | -0.0167098 | -0.0167097 | 2.3326e-06 |
| inviscid ellipsoid, p = 2 | cl | mach | -0.714292 | -0.714292 | 2.3132e-07 |
| inviscid ellipsoid, p = 2 | cs | mach | -0.26575 | -0.26575 | 2.0726e-08 |
| inviscid ellipsoid, p = 2 | cmx | mach | 0.0190407 | 0.0190407 | 2.7440e-07 |
| inviscid ellipsoid, p = 2 | cmy | mach | 0.0335359 | 0.0335359 | 8.4426e-08 |
| inviscid ellipsoid, p = 2 | cmz | mach | -0.0145547 | -0.0145546 | 4.4813e-07 |
| inviscid ellipsoid, p = 2 | cd | x_surface (directional) | -0.00211058 | -0.00211059 | 1.9694e-06 |
| inviscid ellipsoid, p = 2 | cl | x_surface (directional) | -0.0617161 | -0.0617161 | 1.4978e-07 |
| inviscid ellipsoid, p = 2 | cs | x_surface (directional) | -0.0438045 | -0.0438045 | 9.6410e-08 |
| inviscid ellipsoid, p = 2 | cmx | x_surface (directional) | 0.00296326 | 0.00296326 | 1.0509e-07 |
| inviscid ellipsoid, p = 2 | cmy | x_surface (directional) | 0.0163957 | 0.0163957 | 1.5919e-08 |
| inviscid ellipsoid, p = 2 | cmz | x_surface (directional) | -9.4583e-04 | -9.4583e-04 | 3.6248e-08 |
gyre 0.4.0 · 39979fcf90 · · cpu · quick suite · record (JSON)Same code as this build
An ellipsoid with three different semi-axes at an angle of attack and a sideslip angle, with the moment reference off the centre, so that none of the six coefficients and none of their derivatives vanishes by symmetry. Adjoint totals of drag, lift, side force and the three moments with respect to angle of attack, sideslip, Mach number and a displacement of the surface are compared with central differences of re-converged flows.
Largest solve on one device#
Inviscid flow (M = 0.3) past a sphere on a cubed-sphere mesh of 7680 curved hexahedra (geometry degree 2, mixed block orientations) at p = 2: 1,036,800 degrees of freedom, solved on the GPU (NVIDIA GeForce RTX 3060 Ti) with the standard pseudo-transient Newton–Krylov solver and p-multigrid [2, 1, 0]: residual, Jacobian products and Krylov vectors in double precision, the blocks of the smoother in single precision (solver.precond_precision). Solved to a residual reduction of 1e-8, followed by one discrete adjoint solve for the drag coefficient (derivatives with respect to angle of attack, sideslip, Mach number and the position of each of the 6,146 surface nodes). Wall-clock times include just-in-time compilation unless stated; they depend on what else the machine was doing, which is recorded below. The configuration depends on level and device: quick/CPU 4x4x4 blocks, quick/GPU and full/GPU 16x16x5 (1,036,800 unknowns, single-precision blocks), full/CPU 8x8x5. On the GPU the same solve is first tried with double-precision blocks in a process of its own; what happened is in the table of sizes and is not checked, because it depends on the memory of the device.
- steady solve convergedyesexpected truepass
- residual reduction (orders of magnitude)9.375expected >= 8pass
- adjoint linear solve converged (residual reduction)9.97e-09expected < 1e-7pass
- spurious drag of the inviscid sphere0.01716expected < 0.1pass
- lift and side force vanish1.82e-14expected < 1e-7pass
- shape derivative of the drag for every surface node: finite, and its net transverse component vanishes by symmetry (largest |sum|, relative to the largest entry)1.28e-10expected < 1e-6pass
- degrees of freedom1036800expected >= 0pass
Run notes The timings were taken on a busy machine (other processes used 87 % of the capacity of the 8 CPUs while the study ran; the GPU was 15 % utilized when the study started). What limits the size on this device: the element-block inverses of the block-Jacobi smoother are dense (block size squared per element and level, in double precision) and their construction holds several copies at once; the Krylov basis is small in comparison. The mesh-deformation operator behind the shape derivative is a dense (volume nodes x surface nodes) matrix; above 2e7 entries it is applied matrix-free, with its transpose written out chunk by chunk, and is not stored.
gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build
| quantity | value |
|---|---|
| elements | 7680 |
| polynomial degree | 2 |
| degrees of freedom | 1036800 |
| block size | 135 |
| geometry nodes | 67606 |
| surface nodes (shape inputs: three coordinates each) | 6146 |
| mesh deformation applied matrix-free | yes |
| a stored deformation matrix would take (GB) | 3.32405 |
| precision of the smoother's blocks | single |
| element-block inverses, all levels (GB) | 0.609792 |
| the same blocks in double precision would take (GB) | 1.21958 |
| the same solve with double-precision blocks on this device | out of device memory |
| peak device memory after the solve (GB) | 3.5992 |
| peak device memory after the adjoint (GB) | 3.5992 |
| smallest scaled Jacobian | 0.267033 |
gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build
| phase | seconds |
|---|---|
| mesh generation, discretization and discipline set-up | 15.2393 |
| face connectivity (build_connectivity) alone | 0.114721 |
| steady solve, including compilation | 194.389 |
| adjoint total derivatives of cd, first call (with compilation) | 82.4142 |
| adjoint total derivatives of cd, second call | 26.6624 |
| VTU output (file size in MB: 30) | 3.74941 |
| surface payload (1536 wall faces) | 16.5098 |
gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build
| quantity | value |
|---|---|
| Newton steps | 15 |
| Krylov iterations | 256 |
| residual reduction | 4.2146e-10 |
| adjoint Krylov iterations | 153 |
| adjoint residual reduction | 9.9657e-09 |
| cd | 0.0171553 |
| entropy error | 8.9133e-06 |
| d cd / d alpha | -2.4909e-10 |
| d cd / d mach | 0.0115206 |
| largest |d cd / d x_surface| over the surface nodes | 3.6251e-04 |
| net transverse shape derivative (largest |sum|) | 4.6532e-14 |
gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build
The record states the largest steady 3-D solve that was run on the device named in its
provenance, with one adjoint solve that returns the derivative of the drag with respect to
the flow parameters and to the position of every surface node, and what it cost in memory
and wall time. The sphere is symmetric about the flow axis, so the net shape derivative
transverse to the flow must vanish: that is the check on the shape derivative at this size
(agreement with finite differences is checked on a smaller case above). It is a
measurement of this implementation on that machine, with the load of the machine recorded
alongside; it is not a scaling study. Problem size in 3-D is bounded by the memory of one
device: the block-Jacobi inverses hold numbers per element, and
their assembly is batched to a fixed memory budget
(performance). On the GPU the blocks of this solve are kept
in single precision (solver.precond_precision: single,
what that changes and what it does not); the table
also states what happened when the same solve was first tried with double-precision
blocks, in a process of its own on the same device. That outcome depends on the memory of
the device and is reported, not checked.
Data table
| Newton step | residual |
|---|---|
| 0 | 0.657193 |
| 1 | 0.597128 |
| 2 | 0.496439 |
| 3 | 0.521744 |
| 4 | 0.523412 |
| 5 | 0.304756 |
| 6 | 0.274656 |
| 7 | 0.200124 |
| 8 | 0.11194 |
| 9 | 0.0370063 |
| 10 | 0.00690108 |
| 11 | 0.00150272 |
| 12 | 1.8669e-04 |
| 13 | 3.1098e-06 |
| 14 | 3.3461e-08 |
| 15 | 2.7698e-10 |
gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build
The line smoother for meshes with thin layers at the wall is measured on a sphere as well: line smoothing in three dimensions.
Consistency with two dimensions#
The inviscid NACA 0012 case is solved in 2-D and on a spanwise-periodic extrusion of the same section into curved hexahedra. A correct 3-D implementation — metrics in conservative-curl form, neighbour coupling across hexahedral faces, the Newton–Krylov solver with p-multigrid, force integration and the discrete adjoint — must reproduce the 2-D outputs and derivatives per unit span, with no spanwise flow. A structured extrusion only contains faces whose two sides use the same local axes, so this study cannot detect an error in the face-orientation tables; those are exercised by the imported-mesh study and by unit tests on randomly re-oriented meshes.
- both solves convergedyesexpected truepass
- cl: |3-D − 2-D| / |2-D|3.45e-13expected < 1e-08pass
- cd: |3-D − 2-D| / |2-D|1.64e-13expected < 1e-08pass
- cm: |3-D − 2-D| / |2-D|4.18e-12expected < 1e-08pass
- dcl_dalpha: |3-D − 2-D| / |2-D|1.02e-11expected < 1e-06pass
- dcl_dmach: |3-D − 2-D| / |2-D|4.42e-09expected < 1e-06pass
- spanwise momentum (max |ρw|)7.35e-14expected < 1e-10pass
- spanwise variation of the state6.05e-14expected < 1e-10pass
gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build
| quantity | 2-D | 3-D (per unit span) | relative difference |
|---|---|---|---|
| cl | 0.268485 | 0.268485 | 3.4549e-13 |
| cd | 0.00558541 | 0.00558541 | 1.6399e-13 |
| cm | -0.00179499 | -0.00179499 | 4.1762e-12 |
| dcl_dalpha | 7.51815 | 7.51815 | 1.0186e-11 |
| dcl_dmach | 0.186709 | 0.186709 | 4.4154e-09 |
gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build
A spanwise-periodic extrusion of the aerofoil case into curved hexahedra must reproduce the two-dimensional solution, its forces and its adjoint derivatives. An error in the 3-D metric terms, the face coupling, the larger blocks or the surface integration would break the agreement or produce a spanwise flow.
| case | dim | elements | DOF | Newton steps |
|---|---|---|---|---|
| 2-D | 2 | 64 | 2304 | 15 |
| 3-D extruded | 3 | 192 | 25920 | 24 |
gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build
The flow is two-dimensional by construction and a structured extrusion only produces the identity relative face orientation. Both gaps are what the sphere studies above close; the discrete invariants on warped periodic hexahedral meshes are tested separately in Discrete invariants, and unstructured meshes read from files in Imported meshes.