: User manual for Iode
: Fourier series
: Installing Iode
Partial differential equations
This module computes and plots solutions of the wave equation
and the heat (or diffusion) equation
Solutions are found on an interval
, for times
. The method is separation of variables.
When you select Partial differential equations from the Iode main menu, the
Partial differential equations window opens up, showing two graphs. The top graph shows a 3D
plot
of a solution of either the wave or heat equation. Try rotating this
3D plot, by dragging the mouse across the graph...
The equation, boundary conditions and initial conditions are written
above the top graph.
The bottom graph is a cross-section of the 3D solution graph: either a t-snapshot, which shows the solution as a function of
at some time
, or else a x-section, which shows the
solution as a function of
at some position
. Try stepping
through these snapshots and sections with the ``arrow'' buttons, or else enter a coordinate value into the box.
You can rotate the 3D plot (the top graph), by dragging the mouse across
it.
The following control buttons relate to the bottom graph only.
- Plot t-snapshots: these are graphs of the solution as a
function of
, at various computed times
. The computed times are
determined by the resolution (see Options below).
- Plot x-sections: these are graphs of the solution as a
function of
, at various computed positions
. The computed times are determined by the resolution (see Options below).
- Current coordinate: You can step through the
snapshots and sections using the ``arrow'' buttons, or else you can
enter a
coordinate value inside the box (Iode will round your input to the
nearest
computed value of the coordinate).
- Enter equation and boundary conditions. First you choose
the type
of differential equation: Wave, Heat or Other. The
Other option lets you call on user-created modules for handling other differential equations. You can create such modules by copying and modifying the files wave.m or heat.m in your Iode directory.
Next you choose the boundary conditions:
- Dirichlet:
and
for all
,
- Neumann:
and
) for all
,
- Periodic:
and
for all
, or
- Other e.g., you might create a module for mixed boundary
conditions. To create such a boundary conditions module, just copy and
suitably modify the file dirichlet.m.
- Enter parameters and initial data: this will prompt you for
the wavespeed
(if you are working with the wave equation) or the
thermal diffusivity
(if you are working with the heat equation). Then it
prompts you for the length
of the interval
on which you are solving the equation, and for the duration
of the time interval
on which you want to examine the solution.
Finally you are
asked to enter the intial data, which consists of the initial
displacement
and the initial velocity
(if working with the wave equation) or the initial temperature/concentration function
(if working with the heat/diffusion equation). As always, functions must be entered using valid Matlab syntax (such as sin(x) for
).
Iode has some built-in functions that make for interesting initial
data: hat, triangle and bump. See
Appendix C for details.
Remark 5.1
Iode computes its approximate solutions by separation of variables. For
example, for the heat equation with Dirichlet boundary conditions Iode
will use
where

is the value of
top harmonic (which can be changed
using the
Options below), and where the

are the Fourier
sine coefficients of the initial temperature

. For the wave equation
with Dirichlet boundary conditions the approximate solution is
where the

are the Fourier sine coefficients of the initial
displacement

and the

are the Fourier sine coefficients of
the initial velocity

.
- Change resolution. You can enter the number of points to
be plotted in each coordinate direction. This is a merely a
question of ``display resolution''. Note that this number is the number
of points in the interval
(resp.
).
The remaining option is more important
mathematically, for it lets you change the top harmonic (i.e., the
number of terms) used in computing the
approximate series solution. Increasing top harmonic will yield a more
accurate solution, though at some computational cost.
: User manual for Iode
: Fourier series
: Installing Iode
平成16年11月7日