This notebook solves the Jeffery orbit equations [1] and provides helpful visualizations of the motion of ellipsoids of various aspect ratio and orbit constant. The solutions to these equations define the orientational dynamics of an axisymmetric ellipsoid placed in a steady shear flow. The ellipsoid tumbles end over end in an orbit which is set by the initial orientation of the particle with respect to the vorticity axis.

Preliminaries

We import MaTeX, which allows us to format our labels using a
L
A
T
E
X
interpreter directly in the notebook. We also define a large tMax, which will be the maximum value to which we evaluate our integral and define a color list that will be used for plotting.
In[]:=
ResourceFunction["MaTeXInstall"][]
In[]:=
<<MaTeX`​​tMax=1000;​​colors={"#64CC33","#33BACC","#FF405E"};

Jeffery Equations

We define the Jeffrey equations and use Parametric NDSolve to generate solution families parameterized by aspect ratio ϵ and initial orientation angles θ0. We non-dimensionalize time by the shear rate γ. Without loss of generality we will take ψ0 = 0 as this angle does not affect the dynamics of an axisymmetric ellipse and ϕ0 = 0 as this just sets the initial starting point of the ellipse on the orbit.
In[]:=
jefferyEquations[ϵ_,θ0_]:=Withα=
1-
2
ϵ
2(1+
2
ϵ
)
,θ'[t]-2αSin[θ[t]]Cos[θ[t]]Sin[ϕ[t]]Cos[ϕ[t]],ϕ'[t]
1
2
-αCos[2ϕ[t]],ϕ'[t]Cos[θ[t]]+ψ'[t]
1
2
Cos[θ[t]],ϕ[0]0,θ[0]θ0,ψ[0]0;​​jefferySolutions=ParametricNDSolve[jefferyEquations[ϵ,θ0],{ϕ,θ,ψ},{t,0,tMax},{ϵ,θ0}];

Plotting directrix path

To understand the affects of the non-dimensional parameters ϵ and θ0 on the shape of Jeffrey orbits it is helpful to visualize the path traced out by the directrix of the ellipsoid for various values of the parameter. This image is inspired by Figure 5.5 of [2].
We first define a list of initial orientation angles θ0 that we are interested in visualizing. The equivalent Jeffrey orbit constant is found by evaluating Tan[θ0].
In[]:=
initialAngles={5Pi/12,Pi/4,Pi/12};​​orbitConstants=Tan[#]&/@initialAngles;​​aspectRatios={1.0001,5,50};
We next define a function that generates plots of the path traced out by the directrix of the ellipsoid for a given aspect ratio. We also
In[]:=
directrixPathPlot[ϵ_]:=With[{solutions=Table[EulerMatrix[Flatten[{ϕ[ϵ,θ0][ts],θ[ϵ,θ0][ts],ψ[ϵ,θ0][ts]}/.jefferySolutions]],{θ0,initialAngles}]},​​MapThread[ParametricPlot3D[(#1/.{ts->t}).{0,0,1},{t,0,tMax},PlotStyle->{Directive[RGBColor[#2],Thickness[.015]]}]&,{solutions,colors}]];
Add gradient indicator, half sphere, latitude lines, and legend to improve visualization.
In[]:=
latitudeLines=Table[ParametricPlot3D[FromSphericalCoordinates[{1,π-x,α}],{α,-π,π},PlotStyle->Directive[GrayLevel[.5],Opacity[1],Dashing[{.03,.05}]]],{x,3Pi/6,5Pi/6,Pi/6}];​​gradient=With[{​​arrows=​​Table[Graphics3D[{GrayLevel[.7],Arrowheads[.04],Thickness[.01],Arrow[{{i/2,0,-0.1},{i/2,(i/2),-0.1}}]}],{i,.5,2,.5}],​​lines=Graphics3D[{GrayLevel[.7],Thickness[0.01],Line[{{{0,0,-0.1},{1,0,-0.1},{1,1,-0.1},{0,0,-0.1}}}]}],​​axes=Graphics3D[{GrayLevel[.5],Thickness[0.01],Dashing[{.03,.05}],Line[{{{0,-1,-0.1},{0,1,-0.1}}}]}]},​​Show[arrows,lines,axes]];​​halfSpherePlot=ParametricPlot3D[{Cos[u]Sin[v],Sin[u]Sin[v],Cos[v]},{u,0,π},{v,-π/2,π/2},​​PlotRange->{{-1.6,1.1},{-1.1,1.1},{-0.1,1.1}},​​ImagePadding->{{-20,0},{-30,-20}},​​Mesh->None,Boxed->False,Axes->False,​​PlotStyle->Directive[{White,Opacity[.4],FaceForm[White],EdgeForm[None],Lighting->"Neutral"}],​​ViewVertical->{1,0,0},​​ViewPoint->{3,5,4}];​​legendColors=RGBColor[#]&/@colors;​​legendValues=N[orbitConstants,2];​​legendLabels=MaTeX["C="<>ToString[#]]&/@legendValues;​​legend=LineLegend[legendColors,legendLabels];​​textLabels=Graphics3D[Text[MaTeX["\\varepsilon = "<>ToString[#],FontSize->18],{-1.6,0,0}]]&/@aspectRatios;
In[]:=
directrixPathPlotList=Table[Show[directrixPathPlot[ϵ]],{ϵ,aspectRatios}];​​directrixCompletePlots=MapThread[Show[halfSpherePlot,#1,#2,gradient,latitudeLines]&,{directrixPathPlotList,textLabels}];
In[]:=
finalGraphic=GraphicsGrid[{Join[directrixCompletePlots,{legend}]},ImageSize->600,Spacings->-70]​​finalGraphicRaster=Rasterize[finalGraphic,RasterSize->800];
Out[]=

Ellipsoid animation

We next generate an animation of an ellipsoid undergoing a Jeffery orbit, including a trajectory line tracing out the path of the directrix to complete the analogy with the previous figure.
In[]:=
animationAspectRatio=5;​​animationInitialAngle=Pi/4;​​animationRotationMatrix[t_]:=EulerMatrix[Flatten[{ϕ[animationAspectRatio,animationInitialAngle][t],θ[animationAspectRatio,animationInitialAngle][t],ψ[animationAspectRatio,animationInitialAngle][t]}/.jefferySolutions]]
In[]:=
gradAnimation=With[{​​arrows=​​Table[Graphics3D[{GrayLevel[.5],Arrowheads[.04],Thickness[.01],Arrow[{{i/2,0,-1.1},{i/2,(i/2),-1.1}}]}],{i,.5,2,.5}],​​lines=Graphics3D[{GrayLevel[.5],Thickness[0.01],Line[{{{0,0,-1.1},{1,0,-1.1},{1,1,-1.1},{0,0,-1.1}}}]}],​​axes=Graphics3D[{​​{GrayLevel[.5],Thickness[0.01],Line[{{{0,-1.5,-1.1},{0,1.5,-1.1}}}]},​​{GrayLevel[.5],Thickness[0.01],Dashing[{.03,.05}],Line[{{{0,0,-2.1},{0,0,-0.1}}}]},​​{GrayLevel[.5],Thickness[0.01],Dashing[{.03,.05}],Line[{{{-1,0,-1.1},{0,0,-1.1}}}]}​​}]},​​Show[arrows,lines,axes]];
In[]:=
directrixTrajectory[tCurrent_]:=ParametricPlot3D[1.1*animationRotationMatrix[t].{0,0,1},{t,Max[0,tCurrent-15],Max[tCurrent,.01]},PlotStyle->{Directive[RGBColor[legendColors[[2]]],Thickness[.015]]}];
In[]:=
animationFrame[t_]:=Show[​​Graphics3D[​​Rotate[{​​{GrayLevel[.6],FaceForm[GrayLevel[.6]],Lighting->"Neutral",EdgeForm[None],Ellipsoid[{0,0,0},{1/5,1/5,1}]},​​{Thickness[.01],Black,CapForm["Round"],Line[{{0,0,-1.1},{0,0,1.1}}]}​​},​​{{0,0,1},animationRotationMatrix[t].{0,0,1}}​​],​​PlotRange->{{-1.2,1.2},{-1.2,1.2},{-1.2,1.2}},​​Boxed->False,Axes->False,ImageSize->{800,800},​​ViewVertical->{1,0,0},​​ViewPoint->{3,5,4}],​​directrixTrajectory[t],gradAnimation]
In[]:=
Parallelize@AnimationVideo[animationFrame[t],{t,0,100},DefaultDuration->10]
Out[]=

References

[1] G. B. Jeffery, “The Motion of Ellipsoidal Particles Immersed in a Viscous Fluid,” Proceedings of the Royal Society Series A, 102(715), 1922 pp. 161–179.
[2] S. Kim and S. J. Karrila, Microhydrodynamics: Principles and Selected Applications. Boston: Butterworth-Heinemann, 1991.

CITE THIS NOTEBOOK

Jeffery's orbits dynamics: ellipsoid tumbling in shear flow via aspect ratio and initial orientation​
by James Roggeveen​
Wolfram Community, STAFF PICKS, March 24, 2025
​https://community.wolfram.com/groups/-/m/t/3431314