Time Dependent Solution to the Diffusion Equation in thePlane with a source at the origin.

Note: This notebook will produce some neat animations but they each take some time to compute. And, if you save the notebook with the graphics, it will require 50MB or so of hard disk space.

You should definitely take the time to learn how to make your own animations because the results can be really instructive. You can even save animations in various formats and then import them in separate applications.

<<Graphics`

concentration = Exp[-(x^2 + y^2)/(4Diffusivity t)]/(4 Pi Diffusivity t)

^(-(x^2 + y^2)/(4 Diffusivity t))/(4 Diffusivity π t)

Let the diffusivity be 1 for visualization purposes

Diffusivity = 1

1

<<Graphics`Animation`

MoviePlot3D[concentration, {x, -4, 4}, {y, -4, 4}, {t, 0.01, 2.51, .05}, PlotPoints→40, PlotRange→ {0, 2}, DisplayFunction→Identity]

[Graphics:HTMLFiles/Lecture-11_59.gif]

[Graphics:HTMLFiles/Lecture-11_192.gif]

Flux is a vector that points in the direction of the flow  and is a measure of how much is flowing per unit time

<<Graphics`PlotField`

flux = {-D[concentration, x], -D[concentration, y]}

{(^(-(x^2 + y^2)/(4 t)) x)/(8 π t^2), (^(-(x^2 + y^2)/(4 t)) y)/(8 π t^2)}

This is an example of a time - dependent vector field Overscript[j, →] (x, y, t)

PlotVectorField[flux/.t→0.8, {x, -2, 2}, {y, -2, 2}, PlotPoints→20, ColorFunction→ (Hue[1 - 0.75#] &)]

[Graphics:HTMLFiles/Lecture-11_198.gif]

-Graphics -

[Graphics:HTMLFiles/Lecture-11_201.gif]

-Graphics -

To see animations,use the menu command to group all the graphics cells together, and then animate

[Graphics:HTMLFiles/Lecture-11_324.gif]

flux . {1, 0}

(^(-(x^2 + y^2)/(4 t)) x)/(8 π t^2)

To see animations,use the menu command to group all the graphics cells together, and then animate

[Graphics:HTMLFiles/Lecture-11_460.gif]

To see animations,use the menu command to group all the graphics cells together, and then animate

[Graphics:HTMLFiles/Lecture-11_593.gif]

flux {1, 0}

{(^(-(x^2 + y^2)/(4 t)) x)/(8 π t^2), 0}

To see animations,use the menu command to group all the graphics cells together, and then animate

[Graphics:HTMLFiles/Lecture-11_717.gif]

Cross products:

crossab = Cross[{a_1, a_2, a_3}   , {b_1, b_2, b_3}]

{-a_3 b_2 + a_2 b_3, a_3 b_1 - a_1 b_3, -a_2 b_1 + a_1 b_2}

detab = Det[({{i, j, k}, {a_1, a_2, a_3}, {b_1, b_2, b_3}})]

-k a_2 b_1 + j a_3 b_1 + k a_1 b_2 - i a_3 b_2 - j a_1 b_3 + i a_2 b_3

testcrossab = {Coefficient[detab, i], Coefficient[detab, j], Coefficient[detab, k]}

{-a_3 b_2 + a_2 b_3, a_3 b_1 - a_1 b_3, -a_2 b_1 + a_1 b_2}

testcrossab == crossab

True

Derivatives of Vectors

Clear[TimeVector]

TimeVector = {Cos[4π t], Sin[8 π t], Sin[2π t]}

{Cos[4 π t], Sin[8 π t], Sin[2 π t]}

ParametricPlot3D[TimeVector, {t, 0, 1}]

[Graphics:HTMLFiles/Lecture-11_731.gif]

-Graphics3D -

DeltoidSpiral = {(2 Cos[π t] + Cos[2 π t]), (2 Sin[π t] - Sin[2 π t]), t/3}

{2 Cos[π t] + Cos[2 π t], 2 Sin[π t] - Sin[2 π t], t/3}

pp = ParametricPlot3D[DeltoidSpiral, {t, -3, 3}, AxesLabel→ {"x", "y", "z"}]

[Graphics:HTMLFiles/Lecture-11_736.gif]

-Graphics3D -

Show[{Graphics3D[Thickness[0.01]], Graphics3D[Hue[1]], pp}]

[Graphics:HTMLFiles/Lecture-11_739.gif]

-Graphics3D -

dDSt = D[DeltoidSpiral, t]

{-2 π Sin[π t] - 2 π Sin[2 π t], 2 π Cos[π t] - 2 π Cos[2 π t], 1/3}

ppdt = ParametricPlot3D[dDSt, {t, -3, 3}, AxesLabel→ {"x", "y", "z"}]

[Graphics:HTMLFiles/Lecture-11_744.gif]

-Graphics3D -

Show[{Graphics3D[Thickness[0.01]], Graphics3D[Hue[0.3]], ppdt}]

[Graphics:HTMLFiles/Lecture-11_747.gif]

-Graphics3D -

To see animations,use the menu command to group all the graphics cells together, and then animate

[Graphics:HTMLFiles/Lecture-11_812.gif]


Created by Mathematica  (October 12, 2005) Valid XHTML 1.1!