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
063ff566
Commit
063ff566
authored
Dec 19, 2018
by
Simon Scholz
Committed by
Timo Koch
Dec 21, 2018
Browse files
[biomin] free simplebiominreactions from TypeTag
parent
2a81724d
Changes
5
Hide whitespace changes
Inline
Side-by-side
exercises/exercise-biomineralization/README.md
View file @
063ff566
...
...
@@ -75,7 +75,7 @@ To enable your newly created chemical equation, the chemistry file has to be inc
Additionally the TypeTag of your chemistry file needs to be set in the problem file (line 125):
```
c++
using
Chemistry
=
typename
Dumux
::
SimpleBiominReactions
<
TypeTag
>
;
using
Chemistry
=
typename
Dumux
::
SimpleBiominReactions
<
NumEqVector
,
VolumeVariables
>
;
```
__Task__
...
...
exercises/exercise-biomineralization/biominproblem.hh
View file @
063ff566
...
...
@@ -50,8 +50,7 @@ namespace Dumux {
template
<
class
TypeTag
>
class
ExerciseFourBioMinProblem
;
namespace
Properties
{
namespace
Properties
{
//! Create new type tag for the problem
// Create new type tags
namespace
TTag
{
...
...
@@ -104,7 +103,6 @@ struct EnableGridFluxVariablesCache<TypeTag, TTag::ExerciseFourBioMin> { static
}
// end namespace properties
/*!
*
* \brief Problem biomineralization (MICP) in an experimental setup.
*/
template
<
class
TypeTag
>
...
...
exercises/exercise-biomineralization/chemistry/simplebiominreactions.hh
View file @
063ff566
...
...
@@ -30,15 +30,12 @@ namespace Dumux {
* \ingroup Chemistry
* \brief The source and sink terms due to reactions are calculated in this class.
*/
template
<
class
TypeTag
>
template
<
class
NumEqVector
,
class
VolumeVariables
>
class
SimpleBiominReactions
{
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
FluidSystem
=
GetPropType
<
TypeTag
,
Properties
::
FluidSystem
>
;
using
SolidSystem
=
GetPropType
<
TypeTag
,
Properties
::
SolidSystem
>
;
using
VolumeVariables
=
GetPropType
<
TypeTag
,
Properties
::
VolumeVariables
>
;
using
ThisType
=
SimpleBiominReactions
<
TypeTag
>
;
using
Sources
=
GetPropType
<
TypeTag
,
Properties
::
NumEqVector
>
;
using
SolidSystem
=
typename
VolumeVariables
::
SolidSystem
;
using
FluidSystem
=
typename
VolumeVariables
::
FluidSystem
;
using
Scalar
=
typename
FluidSystem
::
Scalar
;
public:
...
...
@@ -81,7 +78,7 @@ public:
* \param Source The source
* \param volVars The volume variables
*/
void
reactionSource
(
Sources
&
q
,
const
VolumeVariables
&
volVars
)
void
reactionSource
(
NumEqVector
&
q
,
const
VolumeVariables
&
volVars
)
{
// define and compute some parameters for convenience:
Scalar
xwCa
=
volVars
.
moleFraction
(
liquidPhaseIdx
,
CaIdx
);
...
...
@@ -91,6 +88,7 @@ public:
if
(
volFracBiofilm
<
0
)
volFracBiofilm
=
0
;
// TODO: dumux-course-task
// implement mass of biofilm
...
...
@@ -120,7 +118,7 @@ public:
q
[
BiofilmIdx
]
+=
0
;
q
[
CalciteIdx
]
+=
0
;
}
private:
// urease parameters
Scalar
kub_
;
...
...
exercises/solution/exercise-biomineralization/biominproblem.hh
View file @
063ff566
...
...
@@ -36,7 +36,7 @@
#include "fluidsystems/biomin.hh" // The biomineralization fluid system
// TODO: dumux-course-task
// include chemistry file here
#include "chemistry/simplebiominreactions.hh"
// chemical reactions
#include "chemistry/simplebiominreactions.hh" // chemical reactions
#include "biominspatialparams.hh" // Spatially dependent parameters
namespace
Dumux
{
...
...
@@ -51,8 +51,7 @@ namespace Dumux {
template
<
class
TypeTag
>
class
ExerciseFourBioMinProblem
;
namespace
Properties
{
namespace
Properties
{
//! Create new type tag for the problem
// Create new type tags
namespace
TTag
{
...
...
@@ -139,7 +138,7 @@ class ExerciseFourBioMinProblem : public PorousMediumFlowProblem<TypeTag>
using
SubControlVolume
=
typename
FVElementGeometry
::
SubControlVolume
;
// TODO: dumux-course-task
// set the chemistry TypeTag
using
Chemistry
=
typename
Dumux
::
SimpleBiominReactions
<
TypeTag
>
;
using
Chemistry
=
typename
Dumux
::
SimpleBiominReactions
<
NumEqVector
,
VolumeVariables
>
;
enum
{
...
...
@@ -381,7 +380,6 @@ public:
return
source
;
}
const
std
::
vector
<
Scalar
>&
getKxx
()
{
return
Kxx_
;
...
...
exercises/solution/exercise-biomineralization/chemistry/simplebiominreactions.hh
View file @
063ff566
...
...
@@ -30,15 +30,12 @@ namespace Dumux {
* \ingroup Chemistry
* \brief The source and sink terms due to reactions are calculated in this class.
*/
template
<
class
TypeTag
>
template
<
class
NumEqVector
,
class
VolumeVariables
>
class
SimpleBiominReactions
{
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
FluidSystem
=
GetPropType
<
TypeTag
,
Properties
::
FluidSystem
>
;
using
SolidSystem
=
GetPropType
<
TypeTag
,
Properties
::
SolidSystem
>
;
using
VolumeVariables
=
GetPropType
<
TypeTag
,
Properties
::
VolumeVariables
>
;
using
ThisType
=
SimpleBiominReactions
<
TypeTag
>
;
using
Sources
=
GetPropType
<
TypeTag
,
Properties
::
NumEqVector
>
;
using
SolidSystem
=
typename
VolumeVariables
::
SolidSystem
;
using
FluidSystem
=
typename
VolumeVariables
::
FluidSystem
;
using
Scalar
=
typename
FluidSystem
::
Scalar
;
public:
...
...
@@ -81,7 +78,7 @@ public:
* \param Source The source
* \param volVars The volume variables
*/
void
reactionSource
(
Sources
&
q
,
const
VolumeVariables
&
volVars
)
void
reactionSource
(
NumEqVector
&
q
,
const
VolumeVariables
&
volVars
)
{
// define and compute some parameters for convenience:
Scalar
xwCa
=
volVars
.
moleFraction
(
liquidPhaseIdx
,
CaIdx
);
...
...
@@ -91,7 +88,7 @@ public:
if
(
volFracBiofilm
<
0
)
volFracBiofilm
=
0
;
// TODO: dumux-course-task
// implement mass of biofilm
Scalar
massBiofilm
=
densityBiofilm
*
volFracBiofilm
;
...
...
@@ -124,7 +121,6 @@ public:
q
[
BiofilmIdx
]
+=
0
;
q
[
CalciteIdx
]
+=
rprec
;
}
private:
// urease parameters
...
...
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