Homopolar dynamo model 4D (Ch 17, page 246)

Clear["Global`*"]
Off[General::spell1]

<<VectorFieldPlots`;

System

Parameters

α=60;β=9.6;λ=1.2;μ=0.5;ρ=16;κ=1;

{(Subscript[x, min]),(Subscript[x, max])}={-2.5,2.5};
{(Subscript[y, min]),(Subscript[y, max])}={-3,3};
{(Subscript[z, min]),(Subscript[z, max])}={30,80};

f[x_,y_,z_,u_]:=ρ(y - x)

g[x_,y_,z_,u_]:=(μ + (α/κ))x- ( 1 + μ)y - x z - β u

h[x_,y_,z_,u_]:=α x((1 + μ)y - μ x) - κ z

i[x_,y_,z_,u_]:=-λ u + (1 + μ)y - μ x

Vector field

V={f[x,y,z,u],g[x,y,z,u],h[x,y,z,u],i[x,y,z,u]}

Fixed Points

fp=Solve[{f[(Subscript[x, 1]),(Subscript[y, 1]),(Subscript[z, 1]),(Subscript[u, 1])]==0,g[(Subscript[x, 1]),(Subscript[y, 1]),(Subscript[z, 1]),(Subscript[u, 1])]==0,h[(Subscript[x, 1]),(Subscript[y, 1]),(Subscript[z, 1]),(Subscript[u, 1])]==0,i[(Subscript[x, 1]),(Subscript[y, 1]),(Subscript[z, 1]),(Subscript[u, 1])]==0},{(Subscript[x, 1]),(Subscript[y, 1]),(Subscript[z, 1]),(Subscript[u, 1])}]

fp1=Sort[fp[[1]]];fp2=Sort[fp[[2]]];fp3=Sort[fp[[3]]];

{(Subscript[x, 1]),(Subscript[y, 1]),(Subscript[z, 1])}={-0.9219544457292888`,-0.9219544457292888`,51};
fixedpoint1=Show[Graphics3D[{PointSize[0.025],Hue[0.33],Point[{(Subscript[x, 1]),(Subscript[y, 1]),(Subscript[z, 1])}]},PlotRange->{{(Subscript[x, min]),(Subscript[x, max])},{(Subscript[y, min]),(Subscript[y, max])},{(Subscript[z, min]),(Subscript[z, max])}}]];

{(Subscript[x, 2]),(Subscript[y, 2]),(Subscript[z, 2])}={0,0,0};
fixedpoint2=Show[Graphics3D[{PointSize[0.025],Hue[0.33],Point[{(Subscript[x, 2]),(Subscript[y, 2]),(Subscript[z, 2])}]},PlotRange->{{(Subscript[x, min]),(Subscript[x, max])},{(Subscript[y, min]),(Subscript[y, max])},{(Subscript[z, min]),(Subscript[z, max])}}]];

{(Subscript[x, 3]),(Subscript[y, 3]),(Subscript[z, 3])}={0.9219544457292888`,0.9219544457292888`,51};
fixedpoint3=Show[Graphics3D[{PointSize[0.025],Hue[0.33],Point[{(Subscript[x, 3]),(Subscript[y, 3]),(Subscript[z, 3])}]},PlotRange->{{(Subscript[x, min]),(Subscript[x, max])},{(Subscript[y, min]),(Subscript[y, max])},{(Subscript[z, min]),(Subscript[z, max])}}]];

Jacobian

a11=Simplify[D[f[x,y,z,u],x]]

a12=Simplify[D[f[x,y,z,u],y]]

a13=Simplify[D[f[x,y,z,u],z]]

a14=Simplify[D[f[x,y,z,u],u]]

a21=Simplify[D[g[x,y,z,u],x]]

a22=Simplify[D[g[x,y,z,u],y]]

a23=Simplify[D[g[x,y,z,u],z]]

a24=Simplify[D[g[x,y,z,u],u]]

a31=Simplify[D[h[x,y,z,u],x]]

a32=Simplify[D[h[x,y,z,u],y]]

a33=Simplify[D[h[x,y,z,u],z]]

a34=Simplify[D[h[x,y,z,u],u]]

a41=Simplify[D[i[x,y,z,u],x]]

a42=Simplify[D[i[x,y,z,u],y]]

a43=Simplify[D[i[x,y,z,u],z]]

a44=Simplify[D[i[x,y,z,u],u]]

J={{a11,a12,a13,a14},{a21,a22,a23,a24},{a31,a32,a33,a34},{a41,a42,a43,a44}}

MatrixForm[J]

Fixed Points Stability - Eigenvalues

Eigenvalues[J]/.{x-> (Subscript[x, 1]),y->(Subscript[y, 1]),z->(Subscript[z, 1]),u->(Subscript[u, 1])}//N

Eigenvalues[J]/.{x-> (Subscript[x, 2]),y->(Subscript[y, 2]),z->(Subscript[z, 2]),u->(Subscript[u, 2])}//N

Eigenvalues[J]/.{x-> (Subscript[x, 3]),y->(Subscript[y, 3]),z->(Subscript[z, 3]),u->(Subscript[u, 3])}//N

Phase Portrait

solution=NDSolve[{x'[t]==f[x[t],y[t],z[t],u[t]],x[0]==.1,

y'[t]==g[x[t],y[t],z[t],u[t]],y[0]==.1,

z'[t]==h[x[t],y[t],z[t],u[t]],z[0]==.1,

u'[t]==i[x[t],y[t],z[t],u[t]] ,u[0]==.1},{x,y,z,u},

{t,0,1000},Method->"ExplicitRungeKutta",MaxSteps->Infinity,StartingStepSize->0.0001];phaseplot=ParametricPlot3D[Evaluate[{x[t],y[t],z[t]}/.solution],{t,970,1000},PlotPoints->5000,PlotRange->All,PlotStyle->{RGBColor[1,0,0]},ImageSize->{400,400},BoxRatios->{1,1,1},AxesLabel->{"X","Y","Z"}]

phaseplotXY=ParametricPlot[Evaluate[{x[t],z[t]}/.solution],{t,970,1000},PlotPoints->5000,PlotRange->All,PlotStyle->{RGBColor[1,0,0]},ImageSize->{400,400},AspectRatio->1,AxesLabel->{"X","Y"}]

plotX=Plot[Evaluate[x[t]/.solution],{t,970,1000},PlotRange->{(Subscript[x, min]),(Subscript[x, max])},PlotStyle->{RGBColor[0,0,1]}]

plotY=Plot[Evaluate[y[t]/.solution],{t,970,1000},PlotRange->{(Subscript[y, min]),(Subscript[y, max])},PlotStyle->{RGBColor[0,1,0]}]

plotZ=Plot[Evaluate[z[t]/.solution],{t,970,1000},PlotRange->{(Subscript[z, min]),(Subscript[z, max])},PlotStyle->{RGBColor[1,0,0]}]

plotU=Plot[Evaluate[u[t]/.solution],{t,970,1000},PlotRange->{-1,1},PlotStyle->{Cyan,Thickness[0.005]}]

Show[plotX,plotY,plotZ,plotU]

Show[phaseplot,fixedpoint1,fixedpoint3]

Flow Curvature Manifold

V1={f[x,y,z,u],g[x,y,z,u],h[x,y,z,u],i[x,y,z,u]}

V2=Dt[V1]/.{Dt[x]->f[x,y,z,u],Dt[y]->g[x,y,z,u], Dt[z]->h[x,y,z,u],Dt[u]->i[x,y,z,u]};

V3=Dt[V2]/.{Dt[x]->f[x,y,z,u],Dt[y]->g[x,y,z,u], Dt[z]->h[x,y,z,u],Dt[u]->i[x,y,z,u]};

V4=Dt[V3]/.{Dt[x]->f[x,y,z,u],Dt[y]->g[x,y,z,u], Dt[z]->h[x,y,z,u],Dt[u]->i[x,y,z,u]};

K={V1,V2,V3,V4};

ϕ=Factor[Det[K]/.{u->0}];

flowmanifold=ContourPlot3D[ϕ==0,{x,(Subscript[x, min]),(Subscript[x, max])},{y,(Subscript[y, min]),(Subscript[y, max])},{z,(Subscript[z, min]),(Subscript[z, max])},PlotPoints->{10,10,10},Mesh->None,ContourStyle->Directive[Cyan,Opacity[0.4],Specularity[White,30]],Axes->True,AxesLabel->{"x","y","z"},BoxRatios->{1,1,1}]

Show[phaseplot,flowmanifold,fixedpoint1,fixedpoint2,fixedpoint3,BoxRatios->{1,1,0.5},Boxed->False,Axes->False,ImageSize->{600,600}]