Info

Info

In the following we give a short introduction to the MaFloT functions and how to use the InputFile. For a more detailed description of Finite-Volume discretizations of the Flow and Transport equation and the realization in MaFLoT you can download the following script:

The equations that are solved in the MaFloT function are the mass conservation equation of the fluid using Darcy’s law and the mass conservation equation of the solvent that is transported with the fluid. We assume the fluid to be incompressible, whereas the fluid’s density and viscosity are linear functions of the dissolved substance. The equations are discretized by a standard Finite-Volume scheme. As the two equations are coupled by the concentration, a sequentially implicit scheme is provided for the solution. For the convective terms in the transport equation a first order upwind scheme is used and the accumulation term is discretized by a backward Euler scheme using constant time steps. Both molecular diffusion and dispersion can be assigned. Note, that a higher order TVD scheme as well as an adaptive time step function exist and can be asked for by email.

A 2009 or newer MATLAB version is needed to run the function. The whole package includes the following functions:

MaFloT.m Main function

InputFile.m Set-up the flow problem

Initialize.m Initializes hydraulic conductivities and gravity terms

PresMat.m Creates the linear pressure system

Velocity.m Calculates interface based velocities

Transport.m Sets-up and solves the transport problem

UpMat.m Creates the linear transport upwind system

Diffusion.m Constructs diffusive linear system

Dispersion.m Constructs dispersive linear system

Output.m Function to control the desired output

DisplayVariable.m Displays pressure and saturation profiles

The simulator can be started by entering the command “MaFloT” in the command window of Matlab (the functions need to be placed in the actual directory). MaFloT can be used by only editing the Inputfile that has the following self explanatory form and leaving all other functions untouched:

Units are always given in brackets. The form of the Input file respectively all variables shown here must be preserved to avoid errors. Boundary vectors, initial values, source terms, etc. always have to be initialized in the dimensions shown above. Density effects can be neglected by setting gravity = 0. “tolpS” is the user defined maximum residual for the coupling loop and “maxpS” the maximum number of iterations allowed per time step. Viscosity and density are defined as a two entry vector with the first value referring to concentration zero and the second to max concentration. For a detailed explanation on how to assign boundary conditions see the BOUNDARY page.

So far the pressure as well as the saturation profiles at the last time step are written in ascii format to the folder “results” and the corresponding graphics are displayed through the whole simulation but not saved. Additional variables as velocities can be saved. These manipulations can be done in the main file.