---
title: Sphere in three dimensions
summary: Flow past a sphere on an unstructured mesh of curved hexahedra, inviscid and at Reynolds number 100. The same commands, outputs and derivatives as in two dimensions, with three force and three moment coefficients and a sideslip angle.
section: examples
order: 5
level: 1
keywords: [sphere, 3-D, hexahedra, cubed sphere, sideslip, side force, example]
---
<!-- gyre docs: expanded Markdown of examples/sphere.md (generated tables, verification numbers and chart data are written out). Base level of this page: L1 Essentials; passages at another level are bracketed by 'begin level N' / 'end level N' comments and start with [LN Name]. Built from revision ceb1f4b0be. -->

Nothing in the workflow changes with the third dimension: a preset, a run, outputs,
gradients. What changes is the size of the problem and the list of outputs.

```bash
gyre run sphere_euler                 # inviscid, 216 curved hexahedra, p = 2
gyre run sphere_re100 -o runs/sphere  # laminar, Re = 100, 576 hexahedra, p = 2
```

**Verification status: Laminar flow past a sphere, Re = 100 (3-D)** (study `sphere_re100`): **PASSED**, 5 of 5 checks passed, 187.8 s.

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.

| Check | Value | Expected | Result |
|---|---|---|---|
| all solves converged to a steady state | yes | true | pass |
| drag coefficient, highest order: \|cd − 1.09\| / 1.09 | 0.0140898 | < 0.03 | pass |
| wake is axisymmetric: lift, side force and moments (largest \|coefficient\|) | 1.7681e-15 | < 1e-7 | pass |
| a closed recirculation bubble exists; length in diameters, highest order | 0.950129 | within 15 % of 0.87 | pass |
| adiabatic wall: integrated heat flux | 0 | < 1e-10 | pass |

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.

Provenance: gyre 0.4.0; revision `39979fcf90` (commit `39979fcf902ad6116eb550b881b4278d4599c8e2`); 2026-11-12T11:14:26-0500; device gpu · NVIDIA GeForce RTX 3060 Ti; quick suite. **Revision check: Same code as this build.** Produced by 39979fcf902ad6116eb550b881b4278d4599c8e2. Every commit between it and the commit this site was built from (ceb1f4b0bed41de53e586df10858079f5a2bcdd8) changes only documentation text, evidence records or bookkeeping: the code is the same. Full record: [sphere_re100.json](../data/verification/sphere_re100.json).

**Table: Sphere at Re = 100** (Laminar flow past a sphere, Re = 100 (3-D))

| 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 |

Provenance: gyre 0.4.0; revision `39979fcf90` (commit `39979fcf902ad6116eb550b881b4278d4599c8e2`); 2026-11-12T11:14:26-0500; device gpu · NVIDIA GeForce RTX 3060 Ti; quick suite. **Revision check: Same code as this build.** Produced by 39979fcf902ad6116eb550b881b4278d4599c8e2. Every commit between it and the commit this site was built from (ceb1f4b0bed41de53e586df10858079f5a2bcdd8) changes only documentation text, evidence records or bookkeeping: the code is the same. Full record: [sphere_re100.json](../data/verification/sphere_re100.json).

**Chart: Streamwise velocity on the wake axis** (Laminar flow past a sphere, Re = 100 (3-D)). Line chart of u / U against x (diameters, sphere centre at 0); 1 series. The table holds the plotted data.

| 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 |

Provenance: gyre 0.4.0; revision `39979fcf90` (commit `39979fcf902ad6116eb550b881b4278d4599c8e2`); 2026-11-12T11:14:26-0500; device gpu · NVIDIA GeForce RTX 3060 Ti; quick suite. **Revision check: Same code as this build.** Produced by 39979fcf902ad6116eb550b881b4278d4599c8e2. Every commit between it and the commit this site was built from (ceb1f4b0bed41de53e586df10858079f5a2bcdd8) changes only documentation text, evidence records or bookkeeping: the code is the same. Full record: [sphere_re100.json](../data/verification/sphere_re100.json).

<!-- begin level 2 (Practice) -->
**[L2 Practice] What to look for**

* The drag coefficient, referred to the frontal area $\pi D^2/4$, against the accepted
  value of about 1.09 at this Reynolds number.
* The streamwise velocity on the wake axis is negative behind the sphere and changes sign
  where the recirculation bubble closes, a little under one diameter downstream.
* Lift, side force and all three moments vanish to round-off: the flow is axisymmetric and
  the discretization keeps the symmetry of the mesh.

<!-- end level 2 -->

<!-- begin level 2 (Practice) -->
**[L2 Practice] The mesh**

`sphere_shell` builds a cubed sphere: six blocks of `n` × `n` × `n_r` curved hexahedra
between the body and a spherical far-field boundary, three blocks meeting at each of the
eight corners of the cube. The body can be an ellipsoid (`axes`), and the radial spacing
grows geometrically from the wall (`ratio`):

```bash
gyre run sphere_re100 --set mesh.params.n=6 --set mesh.params.n_r=8      # finer
gyre run sphere_euler --set 'mesh.params.axes=[1.0, 0.7, 1.2]' \
     --set flow.alpha_deg=4 --set flow.beta_deg=3                         # ellipsoid at incidence and sideslip
```

The second command gives a case in which none of the six coefficients vanishes; it is the
configuration of the [3-D adjoint study](../verification/three-dimensional.md#adjoint-derivatives-in-3-d).

<!-- end level 2 -->

<!-- begin level 2 (Practice) -->
**[L2 Practice] Outputs and inputs in 3-D**

| Output | Meaning |
|---|---|
| `cd`, `cl`, `cs` | drag, lift and side force coefficients in wind axes |
| `cmx`, `cmy`, `cmz` | moment coefficients about `reference.moment_center` |
| `heat`, `entropy_error`, … | as in two dimensions |

`flow.beta_deg` is the sideslip angle; as a differentiable input of the discipline it is
`beta` (radians). The definitions are under
[Outputs and functionals](../theory/outputs-and-functionals.md).

```bash
gyre run sphere_euler --set 'mesh.params.axes=[1.0, 0.7, 1.2]' --set flow.alpha_deg=4 \
     --set flow.beta_deg=3 --gradients --of cl,cs,cmz --wrt alpha,beta,mach
```

<!-- end level 2 -->

**Chart: Surface pressure coefficient** (Inviscid flow past a sphere (3-D)). Line chart of cp against polar angle from the front stagnation point (degrees); 6 series. The table holds the plotted data.

| 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 full record holds all of them.

Provenance: gyre 0.4.0; revision `39979fcf90` (commit `39979fcf902ad6116eb550b881b4278d4599c8e2`); 2026-11-12T11:11:04-0500; device gpu · NVIDIA GeForce RTX 3060 Ti; quick suite. **Revision check: Same code as this build.** Produced by 39979fcf902ad6116eb550b881b4278d4599c8e2. Every commit between it and the commit this site was built from (ceb1f4b0bed41de53e586df10858079f5a2bcdd8) changes only documentation text, evidence records or bookkeeping: the code is the same. Full record: [sphere_inviscid.json](../data/verification/sphere_inviscid.json).

<!-- begin level 3 (Mechanics) -->
**[L3 Mechanics] The inviscid case as a check on the 3-D discretization**

The chart shows the surface pressure of the inviscid preset at polynomial degrees one to
four against the compressible potential-flow solution. The exact flow has no drag and no
entropy rise, so both are error measures; the
[verification page](../verification/three-dimensional.md) tabulates them.

<!-- end level 3 -->

<!-- begin level 3 (Mechanics) -->
**[L3 Mechanics] Size and cost**

Element blocks in three dimensions are large: $5(p+1)^3$ unknowns per element, 135 at
$p = 2$ and 625 at $p = 4$, and the preconditioner stores their inverses. The largest solve
recorded on the development machine, with its memory and wall times, is under
[Largest solve on one device](../verification/three-dimensional.md#largest-solve-on-one-device).
The service sends cases above 60 000 unknowns to the GPU when one is present.

<!-- end level 3 -->
