Environmental Engineering Reference
In-Depth Information
one may express mass change by volume change (
V), which itself is represented
D
by a change of the 'water'-table.
The derived equation for mass conservation alone is not yet sufficient for a
complete mathematical formulation. There are too many unknown variables,
namely concentration c , and the components of the flux vector j. In order to reduce
the number of unknowns, one has to utilize a formulation, in which the flux terms
are connected with the concentrations. Finally an equation will result, in which c is
the only unknown variable.
The advective flux is simply given by the product of the concentration and the
velocity. In the three-dimensional case the three flux components are determined by
the three velocity components:
j x ¼ v x c y ¼ v y c z ¼ v z c
(2.8)
Independent of the dimension, using the scalar multiplication one may write in
vector notation:
j
¼
v c
or
j
¼ c v
(2.9)
In formulae we mostly omit the multiplication sign. Note that on the right side of
( 2.9 ) there is scalar multiplication: the scalar variable c is multiplied with the vector
variable v, as already outlined in Chap. 1.
2.5 MATLAB
M-files
®
The command window is good for an introduction into MATLAB
. t
demonstrates that operations, which someone used to compute on a scientific
calculator, can be better performed using MATLAB
®
®
. However, MATLAB
®
can
do much more.
In MATLAB
a high level programming language is included. It is often called
'M'. Files, containing 'M' source code, are stored in files with extension '.M'. The
programming work with m-files replaces extensive operating in the command
window. Only for certain tasks, the command window will remain the most direct
and simple way to compute with MATLAB ® . Program writing and editing, not
only with MATLAB@, is done by use of a text editor.
MATLAB has a built-in editor. The editor can be called in different ways. The
easiest way is to use
®
in the command window. Other convenient ways of calling the editor are given in
the next section. Options for the editor are set in the 'Preferences' sub-menu of
'File' (see Fig. 2.5 ). It is also possible to use other than the built-in editors. With the
Search WWH ::




Custom Search