Acceleration of Particles in a Wave Obeying the Korteweg-de Vries Equation
Acceleration of Particles in a Wave Obeying the Korteweg-de Vries Equation
ManipulateKdV[i,choice,ImageSize{300,300}],{{i,50,"time steps"},1,50,1,Appearance"Labeled",ImageSizeTiny},Delimiter,{{choice,1,"function choice"},{1,2},ControlType"RadioButton"},ControlPlacementTop,SaveDefinitionsTrue,InitializationKdV[i_,choice_,opts___]:=QuietModule{tStart,tEnd,xR,xL,xP,dt,intervall,dpAll,pathAll,points,colors,vPlot,qPlot,aPlot,uPlot,para},para=p;tStart=0;tEnd=5;xR=16;xL=-16;u[x_,t_]=6x(1+36t),/.para;v[x_,t_]=,/.para;a[x_,t_]=-,0;qp[x_,t_]=0,-1+/.para;xP=0;sol=DSolve[{x'[t]v[x[t],t][[choice]],x[0]x0},x[t],t]//Flatten;(*Print"Proof that acceleration is equal to a=u+3u:"D[x[t]/.sol[[1]],t,t]==-u[x,t][[choice]]+3u[x,t][[choice]]^2/.x->x[t]/.sol[[1]]//FullSimplify*)xAnalytic[t_]:=Tablex[t]/.sol[[1]]/.x0xP+dx,dx,-,,;xPosition[t_,l1_Integer]:=xAnalytic[t][[l1]];intervall=50;dt=(tEnd-tStart)(intervall);colors=Table[Blend[{Red,Blue},x],{x,0,1,0.2}];dpAll=ContourPlot[u[x,t][[choice]],{x,xL,xR},{t,tStart,tEnd},MeshFalse,PlotRangeAll,ColorFunction"BlueGreenYellow",ContourStyleNone,PerformanceGoal"Quality",MaxRecursionControlActive[0,Automatic],PlotPointsControlActive[40,50]];pathAll=Table[ParametricPlot[{xPosition[t,l1],t},{t,tStart,idt+tStart},PlotStyle{colors[[l1]],Thick},PerformanceGoal"Speed"],{l1,1,Length[xAnalytic[t]],1}];points=Table[Graphics[{AbsolutePointSize[8],colors[[j]],Point[{xPosition[t,j]/.t(tStart+dti),-0.1}//Flatten]}],{j,1,Length[xAnalytic[t]]}];vPlot=PlotEvaluatev[x,tStart+dti][[choice]],{x,xL,xR},PlotRange{-1.5,1.5},PlotStyle{Green,Thick},PerformanceGoal"Speed";qPlot=Plot[Evaluate[qp[x,tStart+dti]][[choice]],{x,xL,xR},PlotRange{-1.5,1.5},PlotStyle{Red,Thick},PerformanceGoal"Speed"];aPlot=Plot[Evaluate[a[x,tStart+dti]][[choice]],{x,xL,xR},PlotRange{-1.5,1.5},PlotStyle{Blue,Thick},PerformanceGoal"Speed"];uPlot=Plot[u[x,tStart+dti][[choice]],{x,xL,xR},PlotRange{-1.5,1.5},PlotStyle{Black,Thick},PerformanceGoal"Speed"];Grid[{{Show[{(*vPlot,*)qPlot,uPlot,aPlot,points},opts,AxesFalse,AspectRatio2/2,FrameTicksNone,FrameTrue,BackgroundWhite],Show[{dpAll,pathAll},opts,AxesFalse,AspectRatio2/2,FrameTicksNone,FrameTrue,PlotRangeAll]}}]
1
1
1
2
2
p
2
Sech(t-px)
1
2
3
p
18x
1+36t
2
p
324x
2
(1+36t)
2
p
3
1+Cosh[t-px]
3
p
1
2
∂
∂x
∂
xx
u
2
)\),
1
2
∂
x
∂
x,x
u[x,t][[choice]]
15
15
15
15
6
15
1
20
CAPTION
CAPTION
DETAILS
DETAILS
THIS NOTEBOOK IS THE SOURCE CODE FROM
A full-function Wolfram Mathematica system is required to edit this notebook.GET WOLFRAM MATHEMATICA »