In[]:=
CurrentValue[$FrontEnd,"NotebookAutoSave"]=True
Out[]=
True
In[]:=
SpiralAround[R0_,r0_,t_,T_,λ_,μ_]:=Block[{r,R,ω={0,0,1},sol},sol=NDSolve[{R'[t]==λCross[ω,R[t]],r'[t]==μCross[Cross[ω,R[t]],r[t]],r[0]==r0,R[0]==R0},{r,R},{t,0,T},Method->"Adams"][[1]];(R[t]+r[t])/.sol];
In[]:=
ss=SpiralAround[{0,1,0},{0,0,0.1},t,2Pi,3,7]
Out[]=
InterpolatingFunction[t]+InterpolatingFunction[t]
In[]:=
ClearAll[SP,BurgersRing];
In[]:=
SP[R_,w_,λ_,μ_]:=Block[{T=2Pi,tbl},tbl=Table[SpiralAround[{0,R,0},{0,0,h},t,T,λ,μ],{h,-w,w,0.1w}];ParametricPlot3D[Evaluate[tbl],{t,0,T},Boxed->False,Axes->False,PlotStyle->{Opacity[1]}]];
In[]:=
BurgersRing[R_,w_,O_]:=Block[{A,B,t1,t2},ParametricPlot3D[A={RCos[θ],RSin[θ],0};B={-RSin[θ],RCos[θ],0};t1=Cross[A,B];t2=Cross[t1,B];A+wCos[α]t1+wSin[α]t2,{θ,0,2Pi},{α,0,2Pi},Mesh->None,Boxed->False,Axes->False,PlotStyle->{Yellow,Opacity[O]}]];
In[]:=
VortexSheet[R_,w_,o_]:=ParametricPlot3D[{tCos[θ],tSin[θ],w},{t,0,R},{θ,0,2Pi},Mesh->None,Boxed->False,Axes->False,PlotStyle->{Green,Opacity[o]}];
In[]:=
Block[{R=1,w=0.15,n=7,m=25,o=0.15},Show[{BurgersRing[R,w,0.2],SP[R,0.8w,n,m],SP[0.1R,0.25w,n,m],SP[0.5R,0.3w,n,m],SP[0.3R,0.5w,n,m],SP[0.7R,0.5w,n,m],VortexSheet[R-w,0.5w,o],VortexSheet[R-w,-0.5w,o]},PlotRange->All]]
Out[]=
In[]:=
MM[x_,w_]=If[(x<w&&x>-w),wSign[x],x];
In[]:=
SmoothClip[x_,w_]:=Sign[x]Sqrt[x^2+w^2];
In[]:=
ClipByX[r_,w_]:={SmoothClip[r[[1]],w],r[[2]],r[[3]]};
In[]:=
ClipByX[{-0.01,2.,3.},0.1]
Out[]=
{-0.100499,2.,3.}
In[]:=
SpiralInverse[R0_,r0_,t_,T_,w_,λ_,μ_]:=Block[{r,R,ω={0,0,1},sol},sol=NDSolve[{R'[t]==λCross[ω,R[t]],r'[t]==μCross[Cross[ω,R[t]],r[t]],r[0]==r0,R[0]==R0},{r,R},{t,0,T},Method->"Adams"][[1]];(R[t]+r[t]1.1(r0.r0)/(r[t].r[t]))/.sol];
In[]:=
ISP[R_,w_,a_,λ_,μ_]:=Block[{T=2Pi,tbl},tbl=Table[SpiralInverse[{0,R,0},{0,0,h},t,T,w,λ,μ],{h,0.1w,w,0.05w}];ParametricPlot3D[Evaluate[tbl],{t,0,T},Boxed->False,Axes->False,RegionFunction->Function[{x,y,z},x^2+y^2>R^2||z^2>a^2],PlotStyle->{Opacity[1]}]];
In[]:=
ISP[1,0.2,0.1,4,16]
Out[]=
|
In[]:=
Block[{R=1,w=0.15,o=1.},Show[{BurgersRing[R,w,o],ISP[R,2w,0,7,25],VortexSheet[R-w,0.5w,o],VortexSheet[R-w,-0.5w,o]},PlotRange->All]]
Out[]=