Initial Functions and Conditions
Initial Functions and Conditions
In[]:=
R[r_]:=2/(5*3)*1/(2*3)!*((2*r)/(5*3))^(2*3)*E^((-2*r)/(5*3))SampleInitialConditions=N[Table[R[r],{r,0,100,4}]];SampleInitialConditionsMatrix=List@N[Table[{r,R[r]},{r,0,100,4}]];ALPHAkWITH=Table[0.002*Mass*Radius,{Mass,1,6},{Radius,1,6}];ALPHAkWITHOUT=Table[0.001*Mass*Radius,{Mass,1,6},{Radius,1,6}];
Strings and Colors for Labels
Strings and Colors for Labels
In[]:=
LabelString=Table[StringForm[" ``",LS],{LS,1,25}];ColorList={Table[{Blend[{Blue,Green,Yellow,Red,Brown},InitialCond]},{InitialCond,1/25,1,1/25}]}//Flatten;
Legends
Legends
In[]:=
LegendWith=SwatchLegend[ColorList,LabelString,LegendLabel"With Photophoresis",LegendFunction"Frame",LegendLayout"Row"];LegendWithout=SwatchLegend[ColorList,LabelString,LegendLabel"Without Photophoresis",LegendFunction"Frame",LegendLayout"Row"];LegendInitialConditions=SwatchLegend[ColorList,LabelString,LegendLabel"Initial Conditions",LegendFunction"Frame",LegendLayout"Row"];
Differential Equations with Photophoresis
Differential Equations with Photophoresis
In[]:=
Do[ToExpression["DiffequaWith│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│",StandardForm,Function[sym, sym=Table[NDSolve[{q[ϕ]+q''[ϕ]==-(ALPHAkWITH[[Mass,Radius]]/(1+q[ϕ]))^2,q[0]==R[r],q'[0]==R[r]},q,{ϕ,0,100}],{r,0,100,4}] ,HoldAll]],{Mass,1,6},{Radius,1,6}]
Differential Equations without Photophoresis
Differential Equations without Photophoresis
In[]:=
Do[ToExpression["DiffequaWithout│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│",StandardForm,Function[sym, sym=Table[NDSolve[{q[ϕ]+q''[ϕ]==-(ALPHAkWITHOUT[[Mass,Radius]]/(1+q[ϕ]))^2,q[0]==R[r],q'[0]==R[r]},q,{ϕ,0,100}],{r,0,100,4}] ,HoldAll]],{Mass,1,6},{Radius,1,6}]
Plotting in the Cartesian Plane
Plotting in the Cartesian Plane
Do[ToExpression["CartesianEvaluateWith│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│",StandardForm,Function[sym,sym=Evaluate[q[ϕ]/.ToExpression["DiffequaWith│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│"]],HoldAll]],{Mass,1,6},{Radius,1,6}] Do[ToExpression["CartesianEvaluateWithout│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│",StandardForm,Function[sym,sym=Evaluate[q[ϕ]/.ToExpression["DiffequaWithout│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│"]],HoldAll]],{Mass,1,6},{Radius,1,6}]Do[ToExpression["CartesianPlotWith│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│",StandardForm,Function[sym,sym=Plot[ToExpression["CartesianEvaluateWith│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│"],{ϕ,0,100},PlotLabelsTable[Callout["With Photohoresis "<>ToString[InitialCond],Above],{InitialCond,1,Length[SampleInitialConditions]}],PlotStyleTable[ColorList[[T]],{T,0,25}],PlotLegendsPlaced[LegendWith,{Top,Left}],ImageSize900],HoldAll]],{Mass,1,6},{Radius,1,6}] Do[ToExpression["CartesianPlotWithout│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│",StandardForm,Function[sym,sym=Plot[ToExpression["CartesianEvaluateWithout│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│"],{ϕ,0,100},PlotLabelsTable[Callout["Without Photophoresis "<>ToString[InitialCond],Below],{InitialCond,1,Length[SampleInitialConditions]}],PlotStyleTable[ColorList[[T]],{T,0,25}],PlotLegendsPlaced[LegendWithout,{Bottom,Right}],ImageSize900],HoldAll]],{Mass,1,6},{Radius,1,6}] Do[ToExpression["CombinedCartesianPlot│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│",StandardForm,Function[sym,sym=Show[ToExpression["CartesianPlotWith│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│"],ToExpression["CartesianPlotWithout│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│"],PlotLabel"Positions of With and Without Photophoresis of a particle with #InsertRadiusHere#",FrameTrue],HoldAll]],{Mass,1,6},{Radius,1,6}]CombinedCartesianPlot│1│§│1│
Plotting in the Parametric Plane
Plotting in the Parametric Plane
Do[ToExpression["ParametricEvaluateWith│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│",StandardForm,Function[sym,sym=Evaluate[{q[ϕ],q'[ϕ]}/.ToExpression["DiffequaWith│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│"]],HoldAll]],{Mass,1,6},{Radius,1,6}] Do[ToExpression["ParametricEvaluateWithout│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│",StandardForm,Function[sym,sym=Evaluate[{q[ϕ],q'[ϕ]}/.ToExpression["DiffequaWithout│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│"]],HoldAll]],{Mass,1,6},{Radius,1,6}]Do[ToExpression["ParametricPlotWith│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│",StandardForm,Function[sym,sym=ParametricPlot[ToExpression["ParametricEvaluateWith│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│"],{ϕ,0,100},PlotLabelsTable[Callout["With Photohoresis "<>ToString[InitialCond],Above],{InitialCond,1,Length[SampleInitialConditions]}],PlotStyleTable[ColorList[[T]],{T,0,25}],PlotLegendsPlaced[LegendWith,{Top,Left}],ImageSize600],HoldAll]],{Mass,1,6},{Radius,1,6}] Do[ToExpression["ParametricPlotWithout│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│",StandardForm,Function[sym,sym=ParametricPlot[ToExpression["ParametricEvaluateWithout│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│"],{ϕ,0,100},PlotLabelsTable[Callout["Without Photophoresis "<>ToString[InitialCond],Below],{InitialCond,1,Length[SampleInitialConditions]}],PlotStyleTable[ColorList[[T]],{T,0,25}],PlotLegendsPlaced[LegendWithout,{Bottom,Right}],ImageSize600],HoldAll]],{Mass,1,6},{Radius,1,6}] Do[ToExpression["CombinedParametricPlot│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│",StandardForm,Function[sym,sym=Show[ToExpression["ParametricPlotWith│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│"],ToExpression["ParametricPlotWithout│"<>ToString[Mass]<>"│§│"<>ToString[Radius]<>"│"],PlotLabel"Positions of With and Without Photophoresis of a particle with #InsertRadiusHere#",FrameTrue],HoldAll]],{Mass,1,6},{Radius,1,6}]CombinedParametricPlot│1│§│1│
Initial Conditions Plot
Initial Conditions Plot
Grouped Plots of Cartesian and Parametric Plots
Grouped Plots of Cartesian and Parametric Plots
Computation and Plotting of the Final Results of Variations
Computation and Plotting of the Final Results of Variations