10
2 Motivation
2.2.7 Condition of Consistency
The exact analytical solution of the decay problem (2.1) for an initial concentration
of C o is given by:
C(t) = C o exp(−κ · t)
(2.8)
where “exp” is the exponential function. A numerical model is said to be consistent
if its finite-di ference solution converges toward the solution of the governing differential equation when the numerical time step (or grid size) is made vanishingly
small. This implies that the concentration predicted by our model should get the
closer to the true solution for a decrease of the time step Δt.
2.2.8 Condition of Accuracy
A certain error referred to as truncation error is made when using finit differences.
Round-off errors are another source of error, being related to the fact that computers
can represent numbers only with a finit number of digits. Both errors should stay
reasonably small over the duration of a simulation.
2.2.9 Condition of Eff ciency
Large programs may require substantial computer space for data output and storage,
and completion of model runs may take a long time. Hence, model codes have to
be written in an efficien manner such that the task is completed within a reasonable
time span and without “stuffin up” the computer with enormous amounts of data.
2.2.10 How Model Codes Work
The compiler translates the FORTRAN 95 code line by line and from top to bottom.
This implies that parameters must be declared and specifie before they can be
manipulated. Declaration means specificatio of the type of the parameter. There
are integers, real numbers, arrays, characters and logical parameters.
Specificatio means allocation of values to parameters. In principle, each line of a
computer code can only have a single unknown on the left-hand side of an equation,
such as “x = b + c”, where b and c have to be declared and assigned values farther
up in the code, and x has to be at least declared.
2 Motivation
2.2.7 Condition of Consistency
The exact analytical solution of the decay problem (2.1) for an initial concentration
of C o is given by:
C(t) = C o exp(−κ · t)
(2.8)
where “exp” is the exponential function. A numerical model is said to be consistent
if its finite-di ference solution converges toward the solution of the governing differential equation when the numerical time step (or grid size) is made vanishingly
small. This implies that the concentration predicted by our model should get the
closer to the true solution for a decrease of the time step Δt.
2.2.8 Condition of Accuracy
A certain error referred to as truncation error is made when using finit differences.
Round-off errors are another source of error, being related to the fact that computers
can represent numbers only with a finit number of digits. Both errors should stay
reasonably small over the duration of a simulation.
2.2.9 Condition of Eff ciency
Large programs may require substantial computer space for data output and storage,
and completion of model runs may take a long time. Hence, model codes have to
be written in an efficien manner such that the task is completed within a reasonable
time span and without “stuffin up” the computer with enormous amounts of data.
2.2.10 How Model Codes Work
The compiler translates the FORTRAN 95 code line by line and from top to bottom.
This implies that parameters must be declared and specifie before they can be
manipulated. Declaration means specificatio of the type of the parameter. There
are integers, real numbers, arrays, characters and logical parameters.
Specificatio means allocation of values to parameters. In principle, each line of a
computer code can only have a single unknown on the left-hand side of an equation,
such as “x = b + c”, where b and c have to be declared and assigned values farther
up in the code, and x has to be at least declared.
