Commit cd8b313a authored by Johannes Hommel's avatar Johannes Hommel

Added the initial biomass biomineralisation problem to dumux-pub as used

for the simulations done for the Transport in Porous Media NUPUS special
issue paper.


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux-pub/Hommel2015a@14454 2fb0f335-1f38-0410-981e-8018bf24f1b0
parents
cmake_minimum_required(VERSION 2.8.6)
project(Hommel_2015a CXX)
if(NOT (dune-common_DIR OR dune-common_ROOT OR
"${CMAKE_PREFIX_PATH}" MATCHES ".*dune-common.*"))
string(REPLACE ${CMAKE_PROJECT_NAME} dune-common dune-common_DIR
${PROJECT_BINARY_DIR})
endif()
#find dune-common and set the module path
find_package(dune-common REQUIRED)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules"
${dune-common_MODULE_PATH})
#include the dune macros
include(DuneMacros)
# start a dune project with information from dune.module
dune_project()
add_subdirectory("m4")
add_subdirectory("dumux")
add_subdirectory("appl")
add_subdirectory("doc")
add_subdirectory("cmake/modules")
# finalize the dune project, e.g. generating config.h etc.
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib64
includedir=${prefix}/include
CXX=g++ -std=c++11
CC=gcc
DEPENDENCIES= dune-common dune-geometry dune-grid dune-istl dune-localfunctions dumux
Name: Hommel_2015a
Version: 1
Description: Hommel_2015a module
URL: http://dune-project.org/
Requires: dune-common dune-geometry dune-grid dune-istl dune-localfunctions dumux
Libs: -L${libdir}
Cflags: -I${includedir}
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
CXX=@CXX@
CC=@CC@
DEPENDENCIES=@REQUIRES@
Name: @PACKAGE_NAME@
Version: @VERSION@
Description: Hommel_2015a module
URL: http://dune-project.org/
Requires: dune-common dune-geometry dune-grid dune-istl dune-localfunctions dumux
Libs: -L${libdir}
Cflags: -I${includedir}
This diff is collapsed.
# $Id$
# we need the module file to be able to build via dunecontrol
EXTRA_DIST = dune.module \
CMakeLists.txt \
config.h.cmake
SUBDIRS = m4 appl dumux doc cmake
if BUILD_DOCS
# TODO: set up documentation tree automatically
#SUBDIRS += doc
endif
# don't follow the full GNU-standard
# we need automake 1.9 or newer
AUTOMAKE_OPTIONS = foreign 1.9
# pass most important options when "make distcheck" is used
DISTCHECK_CONFIGURE_FLAGS = --with-dune-common=$(DUNE_COMMON_ROOT) --with-dune-geometry=$(DUNE_GEOMETRY_ROOT) --with-dune-grid=$(DUNE_GRID_ROOT) --with-dune-istl=$(DUNE_ISTL_ROOT) --with-dune-localfunctions=$(DUNE_LOCALFUNCTIONS_ROOT) --with-dumux=$(DUMUX_ROOT) CXX="$(CXX)" CC="$(CC)"
include $(top_srcdir)/am/top-rules
include $(top_srcdir)/am/global-rules
# Generate package configuration files for finding
# installed modules with CMake
include $(top_srcdir)/am/cmake-pkg-config
This diff is collapsed.
Hommel2015a contains a fully working version of the DuMuX code used
for the investigation of the Influence of the initial biomass amount and distribution
and the injection strategy
on the results of MICP as submitted to TiPM.
This module supplies the code necessary to simulate column experiments assuming initial biomass distribution
rather than accounting for inoculation and following attachment of cells.
This can be done by including initialbiofilmcolumnproblem.hh in biomin.cc.
All necessary model files of dumux-devel are given, too.
Additionally, the input files for all injection strategies
(combinations of injection rate: fast, medium, or slow and injection scheme: pulsed or continuous),
For each injection strategy, the initial biofilm distribution can be chosen by commenting in the desired
initBiofilmDistribution = xxx value in the input file.
initBiofilmDistribution = 0 # homogeneous
#initBiofilmDistribution = 1 # 1st order in space
#initBiofilmDistribution = -1 # 1st order in space inverted
#initBiofilmDistribution = 5 # spike
#initBiofilmDistribution = 99 # random
The reference model as published in WRR, Hommel et al 2015 for the reference setup (Experiment D2 from this publication)
can be simulated by including columnproblemgeneral.hh in biomin.cc and using the reference_with_inoc._and_attachment.input input file.
The required DUNE modules are listed at the end of this README.
The Results folder contains the data used to generate the plots (in .vtu and .mat format)
===============================
The content of this DUNE module was extracted from the module dumux-devel.
In particular, the following subfolders of dumux-devel have been extracted:
appl/co2/biomin/,
Additionally, all headers in dumux-devel that are required to build the
executables from the sources
appl/co2/biomin/biomin.cc,
have been extracted. You can build the module just like any other DUNE
module. For building and running the executables, please go to the folders
containing the sources listed above.
===============================
When this module was created, the original module dumux-devel was using
the following list of DUNE modules and third-party libraries.
BEWARE: This does not necessarily mean that the applications in this
extracted module actually depend on all these components.
dumux...................: version 2.7-svn (/temp/hommel/DUMUX_cmake/dumux)
dune-common.............: version 2.3.1 (/temp/hommel/DUMUX_cmake/dune-common)
dune-geometry...........: version 2.3.1 (/temp/hommel/DUMUX_cmake/dune-geometry)
dune-grid...............: version 2.3.1 (/temp/hommel/DUMUX_cmake/dune-grid)
dune-istl...............: version 2.3.1 (/temp/hommel/DUMUX_cmake/dune-istl)
dune-localfunctions.....: version 2.3.1 (/temp/hommel/DUMUX_cmake/dune-localfunctions)
ALBERTA.................: no
ALUGrid.................: version 1.52 (parallel) (/temp/hommel/DUMUX_cmake/external/ALUGrid-1.52)
AmiraMesh...............: no
BLAS....................: yes
GMP.....................: yes
Grape...................: no
METIS...................: no
METIS...................: no
MPI.....................: yes (OpenMPI)
OpenGL..................: yes (add GL_LIBS to LDADD manually, etc.)
ParMETIS................: no
SuperLU-DIST............: no
SuperLU.................: yes (version 4.3 or newer)
UG......................: yes (sequential)
UMFPACK.................: no
psurface................: no
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/temp/hommel/DUMUX_cmake/dune-common/am
\ No newline at end of file
add_subdirectory("co2")
This diff is collapsed.
SUBDIRS = co2
EXTRA_DIST = CMakeLists.txt
include $(top_srcdir)/am/global-rules
This diff is collapsed.
add_subdirectory("biomin")
This diff is collapsed.
SUBDIRS = biomin
EXTRA_DIST = CMakeLists.txt
include $(top_srcdir)/am/global-rules
This diff is collapsed.
This diff is collapsed.
# test: test_biomin
add_dumux_test(test_biomin test_biomin test_biomin.cc
${CMAKE_SOURCE_DIR}/bin/runTest.sh
${CMAKE_SOURCE_DIR}/bin/fuzzycomparevtu.py
${CMAKE_CURRENT_SOURCE_DIR}/test_references/Reference_Biomin-00006.vtu
${CMAKE_CURRENT_BINARY_DIR}/Test_Biomin-00006.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_biomin
-ParameterFile ${CMAKE_CURRENT_SOURCE_DIR}/test_biomin.input
)
add_dune_ug_flags(test_biomin)
# file(COPY grid/coefficient-study-radial.dgf DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/grid)
# file(COPY injections/BikeRim1Inj.dat DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/injections)
\ No newline at end of file
This diff is collapsed.
check_PROGRAMS = biomin
biomin_SOURCES = biomin.cc
biomin_CXXFLAGS =
biomin_LDADD =
# check_PROGRAMS = test_biomin
#
# test_biomin_SOURCES = test_biomin.cc
# test_biomin_CXXFLAGS =
# test_biomin_LDADD =
include $(top_srcdir)/am/global-rules
This diff is collapsed.
/*****************************************************************************
* Copyright (C) 2009-2010 by Melanie Darcis *
* Copyright (C) 2010 by Andreas Lauser *
* Institute for Modelling Hydraulic and Environmental Systems *
* University of Stuttgart, Germany *
* email: <givenname>.<name>@iws.uni-stuttgart.de *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/**
* \file
*
* \brief Provides the class with the tabulated values of CO2 for the
* benchmark3 problem
*/
#ifndef DUMUX_BIOMIN_CO2TABLES_HH
#define DUMUX_BIOMIN_CO2TABLES_HH
//#include <dumux/old_material/tabulatedmaterial2.hh>
//#include <dumux/old_material/tabulatedmaterial2hires.hh>
#include <assert.h>
namespace Dumux
{
namespace BioMin
{
// the real work is done by some external program which provides
// ready-to-use tables.
//#include "dumux/material/components/co2tables.inc"
#include "co2values.inc"
}
}
#endif
// $Id: test_2p2cni.cc 4142 2010-08-24 10:03:55Z bernd $
/*****************************************************************************
* Copyright (C) 2007-2008 by Klaus Mosthaf *
* Copyright (C) 2007-2008 by Melanie Darcis *
* Copyright (C) 2007-2008 by Bernd Flemisch *
* Copyright (C) 2008-2009 by Andreas Lauser *
* Institute of Hydraulic Engineering *
* University of Stuttgart, Germany *
* email: <givenname>.<name>@iws.uni-stuttgart.de *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
#include "config.h"
//#include "calciteproblem.hh"
//#include "biominproblem.hh"
//#include "showbiominproblem.hh"
//#include "decoupledbiominproblem.hh"
//#include "fraccoreproblem.hh"
//#include "decoupledfraccoreproblem.hh"
//OLD:
//#include "column1biominproblem.hh"
//#include "column2biominproblem.hh"
//#include "column3biominproblem.hh"
//#include "column4biominproblem.hh"
//NEW:
// #include "columnproblemgeneral.hh"
#include "initialbiofilmcolumnproblem.hh"
//#include "mainfraccoreproblem.hh"
//#include "flowfraccoreproblem.hh"
//#include "hpcoreproblem.hh"
//#include "decoupledhpcoreproblem.hh"
// #include "2dradialproblem.hh"
//#include "gorgasproblem.hh"
//#include "gorgasproblem_2_28.hh"
//#include "biochemproblem.hh"
#include <dune/grid/io/file/dgfparser.hh>
#include <dune/common/mpihelper.hh>
#include <iostream>
#include <dumux/common/start.hh>
void usage(const char *progName, const std::string &iDontKnowWhatThisIsGoodFor)
{
}
/*!
* \brief Print a usage string for simulations.
*
* \param progname The name of the executable
*/
void printUsage(const char *progName)
{
std::cout << "usage: " << progName
<< " [--restart restartTime] -parameterFile biomin.input\n";
exit(1);
}
template <class TypeTag>
int start_(int argc,
char **argv)
{
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid;
typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem;
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
typedef Dune::GridPtr<Grid> GridPointer;
////////////////////////////////////////////////////////////
// Load the input parameters
////////////////////////////////////////////////////////////
typedef typename GET_PROP(TypeTag, ParameterTree) ParameterTree;
Dune::ParameterTreeParser::readOptions(argc, argv, ParameterTree::tree());
if (ParameterTree::tree().hasKey("parameterFile") or argc==1)
{
// read input file, but do not overwrite options specified
// on the command line, since the latter have precedence.
std::string inputFileName ;
if(argc==1) // if there are no arguments given (and there is a file ./<programname>.input) we use it as input file
{
std::cout<< "\nNo parameter file given. \n"
<< "Defaulting to '"
<< argv[0]
<< ".input' for input file.\n";
inputFileName = argv[0];
inputFileName += ".input";
}
else
inputFileName = GET_RUNTIME_PARAM(TypeTag, std::string, parameterFile); // otherwise we read from the command line
std::ifstream parameterFile;
// check whether the parameter file exists.
parameterFile.open(inputFileName.c_str());
if (not parameterFile.is_open()){
std::cout<< "\n\t -> Could not open file"
<< inputFileName
<< ". <- \n\n\n\n";
printUsage(argv[0]);
return 1;
}
parameterFile.close();
Dune::ParameterTreeParser::readINITree(inputFileName,
ParameterTree::tree(),
/*overwrite=*/false);
}
// deal with the restart stuff
int argIdx = 1;
bool restart = false;
double tStart = 0.0;
if (argc > 1 && std::string("--restart") == argv[argIdx])
{
restart = true;
++argIdx;
std::istringstream(argv[argIdx++]) >> tStart;
}
std::string dgfFileName;
Scalar dt, tEnd;
try
{
dgfFileName = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Grid, File);
dt = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, TimeManager, DtInit);
tEnd = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, TimeManager, TEnd);
}
catch (Dumux::ParameterException &e) {
std::cerr << e << ". Abort!\n";
exit(1) ;
}
catch (...) {
std::cerr << "Unknown exception thrown!\n";
exit(1);
}
// std::cout << "Starting with timestep size = " << dt << "s, simulation end = " << tEnd << "s\n";
//
// // Instantiate the time manager
// TimeManager timeManager;
//
// Dumux::Parameters::print<TypeTag>();
//
//// // run the simulation
//// timeManager.init(problem,
//// tStart, // initial time
//// dt, // initial time step
//// tEnd, // final time
//// restart);
//
// // print all properties
// Dumux::Properties::print<TypeTag>();
//
// timeManager.run();
return 0;
}
/*!
* \ingroup Start
*
* \brief Provides a main function which reads in parameters from the
* command line and a parameter file.
*
* In this function only the differentiation between debugger
* or not is made.
*
* \tparam TypeTag The type tag of the problem which needs to be solved
*
* \param argc The number of command line arguments of the program
* \param argv The contents of the command line arguments of the program
* \param usage Callback function for printing the usage message
*/
template <class TypeTag>
int start(int argc,
char **argv)
{
try {
return start_<TypeTag>(argc, argv);
}
catch (Dumux::ParameterException &e)
{
std::cerr << e << ". Abort!\n";
printUsage(argv[0]);
return 1;
}
catch (Dune::Exception &e) {
std::cerr << "Dune reported error: " << e << std::endl;
return 2;
}
catch (...) {
std::cerr << "Unknown exception thrown!\n";
return 3;
}
}
int main(int argc, char** argv)
{
// typedef TTAG(CalciteProblem) ProblemTypeTag;
// typedef TTAG(BioChemProblem) ProblemTypeTag;
typedef TTAG(BioMinProblem) ProblemTypeTag;
// typedef TTAG(GorgasProblem) ProblemTypeTag;
// typedef TTAG(DecBioMinProblem) ProblemTypeTag;
// typedef TTAG(BioMinFlowProblem) ProblemTypeTag;
return Dumux::start<ProblemTypeTag>(argc, argv, usage);//printUsage
}
This diff is collapsed.
This diff is collapsed.