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 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,
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
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
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: