51
Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems The DuMu x Simulation Software and its Applicability to CO 2 Reservoir Simulation Bernd Flemisch Holger Class, Melanie Darcis, Rainer Helmig, Johannes Hommel, Alexander Kissinger, Lena Walter PANACEA – Third consortium meeting Paris, September 17, 2013

The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Embed Size (px)

Citation preview

Page 1: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

The DuMux Simulation Software and its Applicability to CO2 Reservoir

Simulation

Bernd FlemischHolger Class, Melanie Darcis, Rainer Helmig,

Johannes Hommel, Alexander Kissinger, Lena Walter

PANACEA – Third consortium meetingParis, September 17, 2013

Page 2: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Requirements on Modelling Tools for CO2 Storage

• hydraulic• compositional• thermal• geomechanical• geochemical

Complex processes: Different time scales:

Different length scales

Sco2 [-]

Δp [bar]

F. Schäfer & L. Walter, 2011

IPCC, 2007

Page 3: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Outline

MotivationOverview of DuMux

ApplicationsSetting up an application

Page 4: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

DuMux: DUNE for Multi-{Phase, Component, Scale, Physics, ...} Flow and Transport in Porous Media

Goals and Features• Sustainable and consistent framework for the implementation and

application of model concepts and constitutive relations• Free and open source• Modular structure

Developed by more than 15 PhD students and post docs at LH2• 1/2007: development starts• 17/1/2013: SVN revision 10,000• More than 500 “real'' release downloads dumux.org

Page 5: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Some Example Applications

Page 6: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Modular Design of DuMux

Page 7: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

DUNE: Distributed and Unified Numerics Environment

• Developed by groups in Heidelberg (P. Bastian), Freiburg (D. Kröner), Aachen (O. Sander), Boulder (R. Klöfkorn), Münster (M. Ohlberger), Warwick (A. Dedner)

• Separation of data structures and algorithms by abstract interfaces• Efficient implementation using generic programming techniques• Reuse of existing FE packages with a large body of functionality• Current stable release: 2.2 (June 2012)

Core Modules• dune-common: basic classes• dune-geometry: geometrical entities• dune-grid: abstract grid/mesh interface• dune-istl: iterative solver template library• dune-localfunctions: finite element shape functions

Page 8: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

DUNE: Distributed and Unified Numerics Environment

dune-istl: iterative solver template library

Direct solvers:

– SuperLU– Pardiso

Iterative solvers:

– BiCGSTAB– AMG– and many more see dune-project.org

Page 9: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Modular Design of DuMux

Page 10: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Available Models

Page 11: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Mass balances for brine and CO2 component:

Optional: energy balance:

Primary variables:

We assume local mechanical, thermal and chemical equilibrium

Mathematical Model co2 and co2ni

Page 12: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Modular Design of DuMux

Page 13: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Numerical scheme for fully implicit models

Temporal discretization:Fully implicit backward Euler method

Spatial discretization:BOX method – node centred finite volume method on a finite

element grid (Helmig, 1997)Applicable for structured and unstructured grids (tetrahedron)Requires conforming grid

Cell centred finite volume methodApplicable for structured gridCurrently requires conforming grid

Solution method for non-linear PDEs:Newton Raphson method

Page 14: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Modular Design of DuMux

Page 15: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Simulation Control

For the fully-implicit models, the time-step size is based on the number of Newton iterations

Maximum time-step size can be set

Definition of episodes is possible

Choice of different direct and iterative linear solvers

Default settings for linear and non-linear solver can be changed at the application level

Page 16: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Modular Design of DuMux

Page 17: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Material System

Material System

Fluid SystemInterface for components

Fluid StateContainer for primary and secondary variables

Compn

Fluid – Matrix interactionsRelative perm., cap. Pressure etc.

Application

SpatialParameterse.g. Porosity, permeability etc

Comp1

Model Concept

Constraint SolverCalculates phase composition

Page 18: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Material System

Material System

Application Model Concept

Fluid SystemInterface for components

Fluid StateContainer for primary and secondary variables

Compn

Fluid – Matrix interactionsRelative perm., cap. Pressure etc.

SpatialParameterse.g. Porosity, permeability etc

Comp1

Constraint SolverCalculates phase composition

Page 19: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

The Material System: Fluid System

Interface for the constitutive relationships for a mixture of components

TwoPImmiscible

H2OAir

BrineCO2

H2OAirMesitylene

Spe5: gas, oil and water phase with seven components water, Methane(C1), Propane (C3), Pentane (C5), Heptane (C7), Decane (C10), Pentadecane (C15) and Icosane (C20)

Selected Available Implementations

Page 20: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

The CO2 – Brine Fluid System

Binary diffusion: diffusion of water in the CO2 phaseBin Xu et al., Diffusion of Water in Liquid and Supercritical Carbon DioxideNMR Study, 2002

Phase composition: depending on temperature and pressureSpycher and Pruess 2005, Duan and Sun 2003, Spycher, Pruess and Ennis-King 2003

Phase density, viscosity, … depending on temperature, pressure, and phase composition called from the components.

Page 21: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Material System

Fluid SystemInterface for components

Fluid StateContainer for primary and secondary variables

Compn

Fluid – Matrix interactionsRelative perm., cap. Pressure etc.

SpatialParameterse.g. Porosity, permeability etc

Comp1

Constraint SolverCalculates phase composition

Material System

Application Model Concept

Page 22: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

The Material System: Component

Thermodynamic relations of a single chemical species or a fixed mixture of speciesProvide a convenient way to access these quantities from fluid systems Not supposed to be used by models directly

H20

Brine

CO2

Air, CH4, DNAPL, H2, LNAPL, Mesitylene, N2, O2, Xylene

Selected Available Implementations

Page 23: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

The Component CO2

Vapor pressure depending on temperature, density and enthalpydepending on temperature and pressureR. Span and W. Wagner, 1996

Viscosity depending on temperature and pressureVesovic et al. 1990, and Fenhour et al. 1998.

Density, enthalpy and viscosity can be calculated for the gaseous, liquid and supercritical state of CO2 but the phase change across the vapor pressure line is not accounted forNegligence mobility issues in the three phase zone

Page 24: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

The Component Brine

Based on a component H2O: different choices possible, most accurate IAPWS: Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam

Globally fixed salinity value, to be chosen dependend on the problem

Liquid density and viscosity depending on temperature and pressureBatzle and Wang 1992, cited by: Adams and Bachu in Geofluids, 2002

Liquid enthalpy depending on temperature and pressurePalliser and McKibbin 1997, Michaelides 1981, Daubert and Danner 1989

Page 25: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Material System

Fluid SystemInterface for components

Fluid StateContainer for primary and secondary variables

Compn

Fluid – Matrix interactionsRelative perm., cap. Pressure etc.

SpatialParameterse.g. Porosity, permeability etc

Comp1

Constraint SolverCalculates phase composition

Material System

Application Model Concept

Page 26: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

The Material System: Constraint Solver

Calculates the phase composition

Connects the thermodynamic relations expressed by fluid systems with the thermodynamic quantities stored by fluid states

Takes all component fugacities, the temperature and pressure of a phase as input and calculates the phase composition. Thermodynamic constraints are:

Fugacity/activity coefficients for the CO2/Brine system calculated according to Spycher and Pruess 2005

Selected Available Implementations

Page 27: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Material System

Fluid SystemInterface for components

Fluid StateContainer for primary and secondary variables

Compn

Fluid – Matrix interactionsRelative perm., cap. Pressure etc.

SpatialParameterse.g. Porosity, permeability etc

Comp1

Constraint SolverCalculates phase composition

Material System

Application Model Concept

Page 28: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

The Material System: Fluid State

Stores the complete thermodynamic configuration of a system at a given spatial and temporal position.

Provides access methods to all thermodynamic quantities

CompositionalFluidState: assumes thermodynamic equilibrium, only a single temperature needs to be stored

Selected Available Implementations

Page 29: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Material System

Fluid SystemInterface for components

Fluid StateContainer for primary and secondary variables

Compn

Fluid – Matrix interactionsRelative perm., cap. Pressure etc.

SpatialParameterse.g. Porosity, permeability etc

Comp1

Constraint SolverCalculates phase composition

Material System

Application Model Concept

Page 30: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

The Material System: Fluid-Matrix Interaction

Parameters that depend on fluid properties and the porous medium, i.e. capillarity and relative permeability, heat conductivity

Through modular adapters, regularization schemes can be imposed for extreme values

Uses a set of parameters of type MaterialLawParams, which may depend on the location inside the domain

LinearMaterial

VanGenuchten

BrooksCorey

Selected Available Implementations

Page 31: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Material System

Fluid SystemInterface for components

Fluid StateContainer for primary and secondary variables

Compn

Fluid – Matrix interactionsRelative perm., cap. Pressure etc.

SpatialParameterse.g. Porosity, permeability etc

Comp1

Constraint SolverCalculates phase composition

Material System

Application Model Concept

Page 32: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

The Material System: Spatial Parameters

Collects all parameters that may vary depending on the location within the porous medium

Local assignment of intrinsic properties like porosity, permeability, heat capacity, or material law parameters

Page 33: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Outline

MotivationOverview of DuMux

ApplicationsSetting up an application

Page 34: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Problem Oriented Benchmarks

1. Injection into saline formations including well leakage andlarge-scale computation in a heterogeneous formationNordbotten et al., 2005, Class et al., 2009

2. 3D, reservoir-scale problemsClass et al., 2009

3. Long term problem: furthest updip extent of CO2 plumeNordbotten et al., 2012

Page 35: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Problem 1

Leakage scenario as described in J.M. Nordbotten et al., 2005

Page 36: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Problem 1: Comparison

Results of Simulator comparison, given in Class et al., 2009

Page 37: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Problem 3: Setup Johansen Formation

• Injection of CO2at 15 kg/s for 25 years

• Total simulation time: 50 years

Page 38: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Problem 3: Solution Snapshot

Plume shape after 50 years as given in Class et al., 2009

Page 39: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Geomechanics and CO2 storage

Vertical displacement rate of the term from 2004/7/31 to 2008/5/31 due to CO2 injection at In Salah, Algeria (Onuma and Ohkawa, Energy Procedia, 2008).

CO2 injection causes large overpressures resulting in: • deformations of rock matrix• change of effectiveparameters (porosity,permeability)

• feedback on pressurebuild-up

• enlargement of faults,generation of fractures

Need for geomechanicalmodel

Page 40: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

First Application Example: Wagrien Formation

Subdomain of linear-elastic, fully coupled geomechanicalmodel includes over- and underburden

Outer subdomainrepresenting hydraulic model is restricted to reservoir layer

15 km

3 km

Injection rate: 1 Mt/yVertical extent inner subdomain: 1 kmVertical extent reservoir: 30 m

Page 41: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Results: Application Example

Results after 1.5 years of CO2 injection, shown are vertical cuts through the injection well:

CO2 saturationdisribution

Pressuredisribution

Changes in effective stress σzz Solid displacement uy

Page 42: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Outline

MotivationOverview of DuMux

ApplicationsSetting up an application

Page 43: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Setting up an application: Prerequisites

Download Dumux from dumux.org or use svn repositories

Dumux has been successfully installed on different Linux distributions (SUSE, Ubuntu) and on Mac

Detailed installation instructions as well as the required packages for Dune and Dumux are given in the handbook (download from dumux.org)

Subscribe to the Dumux mailing list to post messages to the community

Page 44: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Setting up an application: Prerequisites

Some basic knowledge of the Linux command line is required

C++ knowledge is indispensable

Get to know the handbook

Perform the tutorial given in the handbook

Each model has a test application, get to know the ones relevant for your problem

They can be modified to fit for your purpose, do not start from scratch!

Page 45: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Setting up an Application

Page 46: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Setting up an Application

The most important files in your application folder are:

yourproblem.hh

– Choose the model you use– Choose the FluidSystem and components– Set global properties (e.g. gravity, Newton thresholds,

2d/3d, linear solver to use, etc.)– Set initial and boundary conditions– Set output file frequency– etc.

Page 47: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Setting up an Application

yourspatialparameters.hh

– Set the spatial distribution of permeability and porosity– For multi-phase flow set fluid-matrix interaction relationship

like Van Genuchten or Brooks and Corey relationship

yourparameterfile.input

– Set run-time parameters like start and end time, the grid file to use, the name of your output files

– You can make most parameters used in yourproblem.hhor in yourspatialparameters.hh into a run-time parameter

– Advantage: changing run-time parameters does not require recompilation of your problem!

Page 48: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Setting up an Application

yourgrid.dgf

– Grids for Dumux require the DUNE Grid Format (*.dgf), see dune-project.org

– For simple grids (structured) the cubegridcreator.hh or simplexgridcreator.hh can be used which do not require an extra grid file (see tutorial)

– For complex geological models node- or element-specific parameters can be imported from the dgf gridfile

– Cornerpoint grids can be imported but they require the installation of additional modules and without manual effort they will fail if the grid is non-conforming

No “easy” interface, best to convert grid into dgf format

Page 49: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Output

Output files are binary or Ascii in the *.vtu format

vtu-files can be visualised using Paraview, see http://www.paraview.org/

Number of output files and parameters therein can be specified in yourproblemfile.hh or yourinputfile.input

Page 50: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

Thank youfor your attention!

dumux.org

Page 51: The DuMux Simulation Software and - uni-stuttgart.de · Simulation Software and its Applicability to CO 2 Reservoir Simulation ... Johannes Hommel, Alexander Kissinger, Lena Walter

Universität Stuttgart Department of Hydromechanics and Modelling of Hydrosystems

References

Baber, K., Mosthaf, K., Flemsich, B., Helmig, R., Müthing, Wohlmuth, B.I., 2011, Numerical scheme for coupling two-phase compositional porous-media flow and one-phase compositional free flow. Accepted in IMA Juarnal of Applied Mathematics.

M. Batzle and Z. Wang. Seismic properties of pore fluids. Geophysics, 57(11):1396–1408, 1992.Class, H., Ebigbo, A., Helmig, R., Dahle, H.K., Nordbotten, J.M., Celia, M.A., Audigane, P.,

Darcis, M., Ennis-King, J., Fan, Y., Flemisch, B., Gasda, S.E., Jin, M., Krug, S., Labregere, D., Naderi Beni, A., Pawar, R.J., Sbai, A., Thomas, S.G., Trenty, L. and L. Wie: A benchmarkstudy on problems related to CO2 storage in geologic formations: Summary and discussion of theresults. Computational Geosciences 13,4 (2009) 409-434.

A. Fenghour, W. A. Wakeham, and V. Vesovic. The viscosity of carbon dioxide. Journal of Physical and Chemical Reference Data Reprints , 27:31–44, 1998.

B. Flemisch, M. Darcis, K. Erbertseder, B. Faigle, A. Lauser K. Mosthaf, S. Müthing, P. Nuske, A. Tatomir, M. Wolf, and R. Helmig. Dumux: Dune for multi-phase, component, scale, physics,... flow and transport in porous media. Advances in Water Resources, 2010.

R. Span and W. Wagner: A New Equation of State for Carbon Dioxide Covering the Fluid Region from the Triple‐Point Temperature to 1100 K at Pressures up to 800 MPa. Journal of Physical and Chemical Reference Data, 25 (6), pp. 1509-1596, 1996.

N. Spycher and K. Pruess. Co2-h2o mixtures in the geological sequestration of co2. ii. partitioning in chloride brines at 12-100c and up to 600 bar. Geochimica et Cosmochimica Acta, 69(13):3309 –3320, 2005

B. Xu, K. Nagashima, J.M. DeSimone, and C.S. Johnson Jr. Diffusion of water in liquid and supercritical carbon dioxide: An nmr study. The Journal of Physical Chemistry A, 107(1):1–3, 2003