Professional Documents
Culture Documents
@hD 0, F@hD
2
- G@hD
2
+ H@hD F
@hD - F
@hD 0,
2 F@hD G@hD + H@hD G
@hD - G
@hD 0=
Next we define a list of rules for the initial conditions
ICS = 8G@0D 1, F@0D 0, H@0D 0<
8G@0D 1, F@0D 0, H@0D 0<
Then we use Series to expand the functions F,G, and H in a Taylor series about h=0 . For convenience
we expand up to O Ih
5
M
PowerSeries = Series@8F@hD, G@hD, H@hD<, 8h, 0, 4<D
:F@0D + F
@0D h +
1
2
F
@0D h
2
+
1
6
F
H3L
@0D h
3
+
1
24
F
H4L
@0D h
4
+ O@hD
5
,
G@0D + G
@0D h +
1
2
G
@0D h
2
+
1
6
G
H3L
@0D h
3
+
1
24
G
H4L
@0D h
4
+ O@hD
5
,
H@0D + H
@0D h +
1
2
H
@0D h
2
+
1
6
H
H3L
@0D h
3
+
1
24
H
H4L
@0D h
4
+ O@hD
5
>
The next step is to substitute the power series expansion into the ODEs. Recall PowerSeries is a
special Mathematica object called a SeriesData object: it behaves like a pure function when it comes
to substituting into an ODE. To ensure this step works the RHS of the equations must be zero.
ODESeries = ODES . Thread@8F@hD, G@hD, H@hD< -> PowerSeriesD;
If we inspect the list ODESeries we see that we have generated series solutions for each equation. We
can convert each of these equations into a set of equations involving the coefficients by mapping Logical-
Expand onto each expansion:
FlowRotatingDisk.nb 5
AlgebraicEqns = Map@LogicalExpand@D . ICS &, ODESeriesD
:H
@0D 0 && 2 F
@0D + H
@0D 0 && F
@0D +
1
2
H
H3L
@0D 0 &&
1
3
F
H3L
@0D +
1
6
H
H4L
@0D 0 &&
1
12
F
H4L
@0D +
1
24
H
H5L
@0D 0, -1 - F
@0D 0 && -2 G
@0D + F
@0D H
@0D - F
H3L
@0D 0 &&
F
@0D
2
- G
@0D
2
+ H
@0D F
@0D - G
@0D +
1
2
F
@0D H
@0D -
1
2
F
H4L
@0D 0 &&
F
@0D F
@0D - G
@0D G
@0D +
1
2
F
@0D H
@0D +
1
2
H
@0D F
H3L
@0D -
1
3
G
H3L
@0D +
1
6
F
@0D H
H3L
@0D -
1
6
F
H5L
@0D 0 &&
1
4
F
@0D
2
-
1
4
G
@0D
2
+
1
3
F
@0D F
H3L
@0D +
1
4
H
@0D F
H3L
@0D -
1
3
G
@0D G
H3L
@0D +
1
6
F
@0D H
H3L
@0D +
1
6
H
@0D F
H4L
@0D -
1
12
G
H4L
@0D +
1
24
F
@0D H
H4L
@0D -
1
24
F
H6L
@0D 0,
-G
@0D 0 && 2 F
@0D + G
@0D H
@0D - G
H3L
@0D 0 &&
2 F
@0D G
@0D +
F
@0D
2
+ H
@0D G
@0D +
1
2
G
@0D H
@0D -
1
2
G
H4L
@0D 0 &&
1
2
G
@0D H
@0D + 2
1
2
G
@0D F
@0D +
1
2
F
@0D G
@0D +
1
6
F
H3L
@0D +
1
2
H
@0D G
H3L
@0D +
1
6
G
@0D H
H3L
@0D -
1
6
G
H5L
@0D 0 &&
1
4
H
@0D G
H3L
@0D +
1
6
G
@0D H
H3L
@0D +
2
1
4
F
@0D G
@0D +
1
6
G
@0D F
H3L
@0D +
1
6
F
@0D G
H3L
@0D +
1
24
F
H4L
@0D +
1
6
H
@0D G
H4L
@0D +
1
24
G
@0D H
H4L
@0D -
1
24
G
H6L
@0D 0>
Next we use Solve to determine the relationship between all the coefficients in our series expansions
seriesCoef = First@Solve@AlgebraicEqnsDD
Solve::svars : Equations may not give solutions for all "solve" variables.
9F
H5L
@0D -2 F
@0D, G
H5L
@0D -8 G
@0D, H
H5L
@0D 4 G
@0D
2
, F
H6L
@0D -2 H-1 + 4 F
@0D G
@0DL,
G
H6L
@0D -8 IF
@0D
2
+ 2 G
@0D
2
M, G
H4L
@0D 2 H-1 + F
@0D G
@0DL,
F
H4L
@0D -2 G
@0D
2
, H
H4L
@0D 4 G
@0D, H
H3L
@0D 2, G
H3L
@0D 2 F
@0D,
F
H3L
@0D -2 G
@0D, H
@0D -2 F
@0D, H
@0D 0, G
@0D 0, F
@0D -1=
Finally we substitute these coefficients back into the power series expansion of the ODEs
mySeriesSol = PowerSeries . seriesCoef . ICS
:F
@0D h -
h
2
2
-
1
3
G
@0D h
3
-
1
12
G
@0D
2
h
4
+ O@hD
5
,
1 + G
@0D h +
1
3
F
@0D h
3
+
1
12
H-1 + F
@0D G
@0DL h
4
+ O@hD
5
, -F
@0D h
2
+
h
3
3
+
1
6
G
@0D h
4
+ O@hD
5
>
Thus the power series expansion for the flow over a rotating disk valid for small h is given by
(10)
6 FlowRotatingDisk.nb
(10)
F@hD = F
@0D h -
h
2
2
-
1
3
G
@0D h
3
-
1
12
G
@0D
2
h
4
+ O@hD
5
G@hD = 1 + G
@0D h +
1
3
F
@0D h
3
+
1
12
H-1 + F
@0D G
@0DL h
4
+ O@hD
5
H@hD = -F
@0D h
2
+
h
3
3
+
1
6
G
@0D h
4
+ O@hD
5
Note from the numerical solution we have the values for F'[0], G'[0]
Summary
In this notebook we have shown how Mathematica can be used to solve classic problems in fluid
mechanics. The similarity solution that describes steady swirling flow over a disk rotating in its own
plane, known also as the von Karman viscous pump, is solved by a shooting method. We also showed
how Mathematica can be used to generate power series expansion of the solution valid for small h.
References
These notes build on Mathematica programming methods that are discussed in notebooks;
ShootingMethods.nb and ODESeriesSoln.nb. I also found the following references most helpful.
(1) Frank, M. White, Viscous Fluid Flow, McGraw-Hill, 1974
(2) G.K. Batchelor, An Introduction to Fluid Dynamics,Cambridge University Press,1967
(3) Hermann Schlichting, Boundary-Layer Theory, McGraw-Hill, 6th Edition, 1968
FlowRotatingDisk.nb 7