Commit 063ff566 authored by Simon Scholz's avatar Simon Scholz Committed by Timo Koch

[biomin] free simplebiominreactions from TypeTag

parent 2a81724d
......@@ -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__
......
......@@ -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>
......
......@@ -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_;
......
......@@ -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_;
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment