Introduction
In one dimension, the finite volume method consists in subdividing the spatial domain
into intervals, "finite volumes" (or cells), and approximate the integral of the function q over each
of these volumes at each time step.
Denote the i-th finite volume by
Then the approximation to the average of q in the cell Ci at time
t, which we denote with Qit, is
Remains the question of how to find this approximation. If we
think about conservation law, we note that the average within the
cell can only changes due to the fluxes at the boundaries
(if we assume that no source or sink is present in the cell).
The integral form of conservation law is
If we integrate this expression in time from t to t+Delta_t,
we obtain
and dividing by Delta_x we reach the form
which gives us an explicit time marching algorithm. This is more
clearly seen if we rewrite the expression using the notation we
introduced above:
where Fi-1/2t approximates the average flux along the
interface xi-1/2:
As can be seen from the equation (??), in order to find the average
at the next time step we need to find the fluxes at the
interfaces. The flux at the interface xi-1/2 for example,
depends on q(xi-1/2, t), which changes with time along the interface and for
which we do not know the analytical solution. For this reason we need to find
some approximation to
these fluxes in order to calculate the averages at the next
time step. Let us now see some simple flux approximations.
Examples of fluxes:
Advection equation
Consider the advection equation qt + uqx = 0,
where u is the fluid velocity. We have seen in the
previous chapters, that the flux of
the contaminant at some point x, at some time t, could be written as uq(x, t).
Consider now the flux through the interface xi-1/2.
Inserting it into the average update rule, we obtain the finite volume method for
the advection equation:
Diffusion equation
In the advection equation, the flux depends on q: f(q) =
uq. The flux in the diffusion equation depends on
the derivative of q:
where beta is the conductivity. If beta is space dependent
then the flux will depend on space too (f(x, qx) = -beta(x)
qx). In the following we will assume for simplicity
that beta is constant.
Now remains the question of how to approximate numerically the
diffusion flux. One possibility were:
By inserting this flux approximation into the average update rule
(??), we obtain:
It is interesting to note, that after some algebraic
manipulations, we can write the average update rule
in the form
which is equivalent to the finite difference discretization
of the conservation law equation qt + f(q)x = 0.
As said in (LeVeque): Many methods can be equally well viewed as
finite difference approximations to this equation or as
finite volume methods.
Another form of the average update rule is
which give us an ODE for each average cell. This form is more
suitable for the implementation in Dymola and all Finite Volume
Method blocks are based on this form of update rule.
Release Notes: