Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux-course
Commits
761ce13a
Commit
761ce13a
authored
Apr 03, 2020
by
Ned Coltman
Browse files
Merge branch 'feature/propertiesheader_ex-biomin' into 'master'
Biomin exercise with separate properties header See merge request
!93
parents
7b9ce78b
09b15069
Pipeline
#1816
passed with stage
in 34 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
exercises/exercise-biomineralization/README.md
View file @
761ce13a
...
...
@@ -22,6 +22,7 @@ Locate all the files you will need for this exercise
*
The __main file__ :
`main.cc`
*
The __input file__:
`params.input`
*
The __problem file__ :
`biominproblem.hh`
*
The __properties file__:
`properties.hh`
*
The __spatial parameters file__:
`biominspatialparams.hh`
Furthermore you will find the following folders:
...
...
exercises/exercise-biomineralization/biominproblem.hh
View file @
761ce13a
...
...
@@ -24,84 +24,14 @@
#ifndef DUMUX_EXERCISE_FOUR_PROBLEM_HH
#define DUMUX_EXERCISE_FOUR_PROBLEM_HH
#include <dune/grid/yaspgrid.hh>
#include <dumux/discretization/cctpfa.hh>
#include <dumux/porousmediumflow/2pncmin/model.hh>
#include <dumux/common/properties.hh>
#include <dumux/porousmediumflow/problem.hh>
#include "solidsystems/biominsolidphase.hh" // The biomineralization solid system
#include <dumux/material/components/co2tablereader.hh>
#include "fluidsystems/biomin.hh" // The biomineralization fluid system
// TODO: dumux-course-task
// include chemistry file here
#include "biominspatialparams.hh" // Spatially dependent parameters
namespace
Dumux
{
/*!
* \brief Tutorial problem for a fully coupled TwoPNCMineralization CC Tpfa model.
*/
//! Provides the precalculated tabulated values of CO2 density and enthalpy.
#include <dumux/material/components/co2tables.inc>
template
<
class
TypeTag
>
class
BioMinProblem
;
namespace
Properties
{
//! Create new type tag for the problem
// Create new type tags
namespace
TTag
{
struct
ExerciseFourBioMin
{
using
InheritsFrom
=
std
::
tuple
<
TwoPNCMin
>
;
};
struct
ExerciseFourBioMinCCTpfa
{
using
InheritsFrom
=
std
::
tuple
<
ExerciseFourBioMin
,
CCTpfaModel
>
;
};
}
// end namespace TTag
//! Set the problem property
template
<
class
TypeTag
>
struct
Problem
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
using
type
=
BioMinProblem
<
TypeTag
>
;
};
//! Set grid and the grid creator to be used
template
<
class
TypeTag
>
struct
Grid
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
using
type
=
Dune
::
YaspGrid
<
2
>
;
};
//! Set the fluid system type
template
<
class
TypeTag
>
struct
FluidSystem
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
private:
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
CO2Tables
=
Dumux
::
CO2Tables
;
using
H2OType
=
Components
::
TabulatedComponent
<
Components
::
H2O
<
Scalar
>>
;
public:
using
type
=
FluidSystems
::
BioMin
<
Scalar
,
CO2Tables
,
H2OType
>
;
};
template
<
class
TypeTag
>
struct
SolidSystem
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
type
=
SolidSystems
::
BiominSolidPhase
<
Scalar
>
;
};
// Set the spatial parameters
template
<
class
TypeTag
>
struct
SpatialParams
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
using
MT
=
GetPropType
<
TypeTag
,
ModelTraits
>
;
static
constexpr
int
numFluidComps
=
MT
::
numFluidComponents
();
static
constexpr
int
numActiveSolidComps
=
MT
::
numSolidComps
()
-
MT
::
numInertSolidComps
();
using
type
=
BioMinSpatialparams
<
GetPropType
<
TypeTag
,
GridGeometry
>
,
GetPropType
<
TypeTag
,
Scalar
>
,
numFluidComps
,
numActiveSolidComps
>
;
};
template
<
class
TypeTag
>
struct
EnableGridGeometryCache
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
static
constexpr
bool
value
=
true
;
};
template
<
class
TypeTag
>
struct
EnableGridVolumeVariablesCache
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
static
constexpr
bool
value
=
true
;
};
template
<
class
TypeTag
>
struct
EnableGridFluxVariablesCache
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
static
constexpr
bool
value
=
true
;
};
}
// end namespace properties
/*!
* \brief Problem biomineralization (MICP) in an experimental setup.
*/
...
...
exercises/exercise-biomineralization/main.cc
View file @
761ce13a
...
...
@@ -50,7 +50,7 @@
#include <dumux/io/vtkoutputmodule.hh>
#include <dumux/io/grid/gridmanager.hh>
#include "
biominproblem
.hh"
#include "
properties
.hh"
////////////////////////
// the main function
...
...
exercises/exercise-biomineralization/properties.hh
0 → 100644
View file @
761ce13a
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* 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 The two-phase porousmediumflow properties file for exercise biomin
*/
#ifndef DUMUX_EXERCISE_FOUR_PROPERTIES_HH
#define DUMUX_EXERCISE_FOUR_PROPERTIES_HH
#include <dune/grid/yaspgrid.hh>
#include <dumux/discretization/cctpfa.hh>
#include <dumux/porousmediumflow/2pncmin/model.hh>
#include <dumux/porousmediumflow/problem.hh>
#include "solidsystems/biominsolidphase.hh" // The biomineralization solid system
#include <dumux/material/components/co2tablereader.hh>
#include "fluidsystems/biomin.hh" // The biomineralization fluid system
#include "biominspatialparams.hh" // Spatially dependent parameters
#include "biominproblem.hh"
namespace
Dumux
{
//! Provides the precalculated tabulated values of CO2 density and enthalpy.
#include <dumux/material/components/co2tables.inc>
namespace
Properties
{
//! Create new type tag for the problem
// Create new type tags
namespace
TTag
{
struct
ExerciseFourBioMin
{
using
InheritsFrom
=
std
::
tuple
<
TwoPNCMin
>
;
};
struct
ExerciseFourBioMinCCTpfa
{
using
InheritsFrom
=
std
::
tuple
<
ExerciseFourBioMin
,
CCTpfaModel
>
;
};
}
// end namespace TTag
//! Set the problem property
template
<
class
TypeTag
>
struct
Problem
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
using
type
=
BioMinProblem
<
TypeTag
>
;
};
//! Set grid and the grid creator to be used
template
<
class
TypeTag
>
struct
Grid
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
using
type
=
Dune
::
YaspGrid
<
2
>
;
};
//! Set the fluid system type
template
<
class
TypeTag
>
struct
FluidSystem
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
private:
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
CO2Tables
=
Dumux
::
CO2Tables
;
using
H2OType
=
Components
::
TabulatedComponent
<
Components
::
H2O
<
Scalar
>>
;
public:
using
type
=
FluidSystems
::
BioMin
<
Scalar
,
CO2Tables
,
H2OType
>
;
};
template
<
class
TypeTag
>
struct
SolidSystem
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
type
=
SolidSystems
::
BiominSolidPhase
<
Scalar
>
;
};
// Set the spatial parameters
template
<
class
TypeTag
>
struct
SpatialParams
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
using
MT
=
GetPropType
<
TypeTag
,
ModelTraits
>
;
static
constexpr
int
numFluidComps
=
MT
::
numFluidComponents
();
static
constexpr
int
numActiveSolidComps
=
MT
::
numSolidComps
()
-
MT
::
numInertSolidComps
();
using
type
=
BioMinSpatialparams
<
GetPropType
<
TypeTag
,
GridGeometry
>
,
GetPropType
<
TypeTag
,
Scalar
>
,
numFluidComps
,
numActiveSolidComps
>
;
};
template
<
class
TypeTag
>
struct
EnableGridGeometryCache
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
static
constexpr
bool
value
=
true
;
};
template
<
class
TypeTag
>
struct
EnableGridVolumeVariablesCache
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
static
constexpr
bool
value
=
true
;
};
template
<
class
TypeTag
>
struct
EnableGridFluxVariablesCache
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
static
constexpr
bool
value
=
true
;
};
}
// end namespace properties
}
// end namespace Dumux
#endif
exercises/solution/exercise-biomineralization/biominproblem.hh
View file @
761ce13a
...
...
@@ -24,85 +24,15 @@
#ifndef DUMUX_EXERCISE_FOUR_PROBLEM_HH
#define DUMUX_EXERCISE_FOUR_PROBLEM_HH
#include <dune/grid/yaspgrid.hh>
#include <dumux/discretization/cctpfa.hh>
#include <dumux/porousmediumflow/2pncmin/model.hh>
#include <dumux/common/properties.hh>
#include <dumux/porousmediumflow/problem.hh>
#include "solidsystems/biominsolidphase.hh" // The biomineralization solid system
#include <dumux/material/components/co2tablereader.hh>
#include "fluidsystems/biomin.hh" // The biomineralization fluid system
// TODO: dumux-course-task
// include chemistry file here
#include "chemistry/simplebiominreactions.hh" // chemical reactions
#include "biominspatialparams.hh" // Spatially dependent parameters
namespace
Dumux
{
/*!
* \brief Tutorial problem for a fully coupled TwoPNCMineralization CC Tpfa model.
*/
//! Provides the precalculated tabulated values of CO2 density and enthalpy.
#include <dumux/material/components/co2tables.inc>
template
<
class
TypeTag
>
class
BioMinProblem
;
namespace
Properties
{
//! Create new type tag for the problem
// Create new type tags
namespace
TTag
{
struct
ExerciseFourBioMin
{
using
InheritsFrom
=
std
::
tuple
<
TwoPNCMin
>
;
};
struct
ExerciseFourBioMinCCTpfa
{
using
InheritsFrom
=
std
::
tuple
<
ExerciseFourBioMin
,
CCTpfaModel
>
;
};
}
// end namespace TTag
//! Set the problem property
template
<
class
TypeTag
>
struct
Problem
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
using
type
=
BioMinProblem
<
TypeTag
>
;
};
//! Set grid and the grid creator to be used
template
<
class
TypeTag
>
struct
Grid
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
using
type
=
Dune
::
YaspGrid
<
2
>
;
};
//! Set the fluid system type
template
<
class
TypeTag
>
struct
FluidSystem
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
private:
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
CO2Tables
=
Dumux
::
CO2Tables
;
using
H2OType
=
Components
::
TabulatedComponent
<
Components
::
H2O
<
Scalar
>>
;
public:
using
type
=
FluidSystems
::
BioMin
<
Scalar
,
CO2Tables
,
H2OType
>
;
};
template
<
class
TypeTag
>
struct
SolidSystem
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
type
=
SolidSystems
::
BiominSolidPhase
<
Scalar
>
;
};
// Set the spatial parameters
template
<
class
TypeTag
>
struct
SpatialParams
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
using
MT
=
GetPropType
<
TypeTag
,
ModelTraits
>
;
static
constexpr
int
numFluidComps
=
MT
::
numFluidComponents
();
static
constexpr
int
numActiveSolidComps
=
MT
::
numSolidComps
()
-
MT
::
numInertSolidComps
();
using
type
=
BioMinSpatialparams
<
GetPropType
<
TypeTag
,
GridGeometry
>
,
GetPropType
<
TypeTag
,
Scalar
>
,
numFluidComps
,
numActiveSolidComps
>
;
};
template
<
class
TypeTag
>
struct
EnableGridGeometryCache
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
static
constexpr
bool
value
=
true
;
};
template
<
class
TypeTag
>
struct
EnableGridVolumeVariablesCache
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
static
constexpr
bool
value
=
true
;
};
template
<
class
TypeTag
>
struct
EnableGridFluxVariablesCache
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
static
constexpr
bool
value
=
true
;
};
}
// end namespace properties
/*!
*
* \brief Problem biomineralization (MICP) in an experimental setup.
...
...
exercises/solution/exercise-biomineralization/main.cc
View file @
761ce13a
...
...
@@ -50,7 +50,7 @@
#include <dumux/io/vtkoutputmodule.hh>
#include <dumux/io/grid/gridmanager.hh>
#include "
biominproblem
.hh"
#include "
properties
.hh"
////////////////////////
// the main function
...
...
exercises/solution/exercise-biomineralization/properties.hh
0 → 100644
View file @
761ce13a
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* 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 The two-phase porousmediumflow properties file for exercise biomin
*/
#ifndef DUMUX_EXERCISE_FOUR_PROPERTIES_HH
#define DUMUX_EXERCISE_FOUR_PROPERTIES_HH
#include <dune/grid/yaspgrid.hh>
#include <dumux/discretization/cctpfa.hh>
#include <dumux/porousmediumflow/2pncmin/model.hh>
#include <dumux/porousmediumflow/problem.hh>
#include "solidsystems/biominsolidphase.hh" // The biomineralization solid system
#include <dumux/material/components/co2tablereader.hh>
#include "fluidsystems/biomin.hh" // The biomineralization fluid system
#include "biominspatialparams.hh" // Spatially dependent parameters
#include "biominproblem.hh"
namespace
Dumux
{
//! Provides the precalculated tabulated values of CO2 density and enthalpy.
#include <dumux/material/components/co2tables.inc>
namespace
Properties
{
//! Create new type tag for the problem
// Create new type tags
namespace
TTag
{
struct
ExerciseFourBioMin
{
using
InheritsFrom
=
std
::
tuple
<
TwoPNCMin
>
;
};
struct
ExerciseFourBioMinCCTpfa
{
using
InheritsFrom
=
std
::
tuple
<
ExerciseFourBioMin
,
CCTpfaModel
>
;
};
}
// end namespace TTag
//! Set the problem property
template
<
class
TypeTag
>
struct
Problem
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
using
type
=
BioMinProblem
<
TypeTag
>
;
};
//! Set grid and the grid creator to be used
template
<
class
TypeTag
>
struct
Grid
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
using
type
=
Dune
::
YaspGrid
<
2
>
;
};
//! Set the fluid system type
template
<
class
TypeTag
>
struct
FluidSystem
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
private:
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
CO2Tables
=
Dumux
::
CO2Tables
;
using
H2OType
=
Components
::
TabulatedComponent
<
Components
::
H2O
<
Scalar
>>
;
public:
using
type
=
FluidSystems
::
BioMin
<
Scalar
,
CO2Tables
,
H2OType
>
;
};
template
<
class
TypeTag
>
struct
SolidSystem
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
type
=
SolidSystems
::
BiominSolidPhase
<
Scalar
>
;
};
// Set the spatial parameters
template
<
class
TypeTag
>
struct
SpatialParams
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
using
MT
=
GetPropType
<
TypeTag
,
ModelTraits
>
;
static
constexpr
int
numFluidComps
=
MT
::
numFluidComponents
();
static
constexpr
int
numActiveSolidComps
=
MT
::
numSolidComps
()
-
MT
::
numInertSolidComps
();
using
type
=
BioMinSpatialparams
<
GetPropType
<
TypeTag
,
GridGeometry
>
,
GetPropType
<
TypeTag
,
Scalar
>
,
numFluidComps
,
numActiveSolidComps
>
;
};
template
<
class
TypeTag
>
struct
EnableGridGeometryCache
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
static
constexpr
bool
value
=
true
;
};
template
<
class
TypeTag
>
struct
EnableGridVolumeVariablesCache
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
static
constexpr
bool
value
=
true
;
};
template
<
class
TypeTag
>
struct
EnableGridFluxVariablesCache
<
TypeTag
,
TTag
::
ExerciseFourBioMin
>
{
static
constexpr
bool
value
=
true
;
};
}
// end namespace properties
}
// end namespace Dumux
#endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment