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

[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 ...@@ -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): Additionally the TypeTag of your chemistry file needs to be set in the problem file (line 125):
```c++ ```c++
using Chemistry = typename Dumux::SimpleBiominReactions<TypeTag>; using Chemistry = typename Dumux::SimpleBiominReactions<NumEqVector, VolumeVariables>;
``` ```
__Task__ __Task__
......
...@@ -50,8 +50,7 @@ namespace Dumux { ...@@ -50,8 +50,7 @@ namespace Dumux {
template <class TypeTag> template <class TypeTag>
class ExerciseFourBioMinProblem; class ExerciseFourBioMinProblem;
namespace Properties namespace Properties {
{
//! Create new type tag for the problem //! Create new type tag for the problem
// Create new type tags // Create new type tags
namespace TTag { namespace TTag {
...@@ -104,7 +103,6 @@ struct EnableGridFluxVariablesCache<TypeTag, TTag::ExerciseFourBioMin> { static ...@@ -104,7 +103,6 @@ struct EnableGridFluxVariablesCache<TypeTag, TTag::ExerciseFourBioMin> { static
} // end namespace properties } // end namespace properties
/*! /*!
*
* \brief Problem biomineralization (MICP) in an experimental setup. * \brief Problem biomineralization (MICP) in an experimental setup.
*/ */
template <class TypeTag> template <class TypeTag>
......
...@@ -30,15 +30,12 @@ namespace Dumux { ...@@ -30,15 +30,12 @@ namespace Dumux {
* \ingroup Chemistry * \ingroup Chemistry
* \brief The source and sink terms due to reactions are calculated in this class. * \brief The source and sink terms due to reactions are calculated in this class.
*/ */
template <class TypeTag> template< class NumEqVector, class VolumeVariables >
class SimpleBiominReactions class SimpleBiominReactions
{ {
using Scalar = GetPropType<TypeTag, Properties::Scalar>; using SolidSystem = typename VolumeVariables::SolidSystem;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; using FluidSystem = typename VolumeVariables::FluidSystem;
using SolidSystem = GetPropType<TypeTag, Properties::SolidSystem>; using Scalar = typename FluidSystem::Scalar;
using VolumeVariables = GetPropType<TypeTag, Properties::VolumeVariables>;
using ThisType = SimpleBiominReactions<TypeTag>;
using Sources = GetPropType<TypeTag, Properties::NumEqVector>;
public: public:
...@@ -81,7 +78,7 @@ public: ...@@ -81,7 +78,7 @@ public:
* \param Source The source * \param Source The source
* \param volVars The volume variables * \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: // define and compute some parameters for convenience:
Scalar xwCa = volVars.moleFraction(liquidPhaseIdx,CaIdx); Scalar xwCa = volVars.moleFraction(liquidPhaseIdx,CaIdx);
...@@ -91,6 +88,7 @@ public: ...@@ -91,6 +88,7 @@ public:
if (volFracBiofilm < 0) if (volFracBiofilm < 0)
volFracBiofilm = 0; volFracBiofilm = 0;
// TODO: dumux-course-task // TODO: dumux-course-task
// implement mass of biofilm // implement mass of biofilm
...@@ -120,7 +118,7 @@ public: ...@@ -120,7 +118,7 @@ public:
q[BiofilmIdx] += 0; q[BiofilmIdx] += 0;
q[CalciteIdx] += 0; q[CalciteIdx] += 0;
} }
private: private:
// urease parameters // urease parameters
Scalar kub_; Scalar kub_;
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include "fluidsystems/biomin.hh" // The biomineralization fluid system #include "fluidsystems/biomin.hh" // The biomineralization fluid system
// TODO: dumux-course-task // TODO: dumux-course-task
// include chemistry file here // include chemistry file here
#include "chemistry/simplebiominreactions.hh" // chemical reactions #include "chemistry/simplebiominreactions.hh" // chemical reactions
#include "biominspatialparams.hh" // Spatially dependent parameters #include "biominspatialparams.hh" // Spatially dependent parameters
namespace Dumux { namespace Dumux {
...@@ -51,8 +51,7 @@ namespace Dumux { ...@@ -51,8 +51,7 @@ namespace Dumux {
template <class TypeTag> template <class TypeTag>
class ExerciseFourBioMinProblem; class ExerciseFourBioMinProblem;
namespace Properties namespace Properties {
{
//! Create new type tag for the problem //! Create new type tag for the problem
// Create new type tags // Create new type tags
namespace TTag { namespace TTag {
...@@ -139,7 +138,7 @@ class ExerciseFourBioMinProblem : public PorousMediumFlowProblem<TypeTag> ...@@ -139,7 +138,7 @@ class ExerciseFourBioMinProblem : public PorousMediumFlowProblem<TypeTag>
using SubControlVolume = typename FVElementGeometry::SubControlVolume; using SubControlVolume = typename FVElementGeometry::SubControlVolume;
// TODO: dumux-course-task // TODO: dumux-course-task
// set the chemistry TypeTag // set the chemistry TypeTag
using Chemistry = typename Dumux::SimpleBiominReactions<TypeTag>; using Chemistry = typename Dumux::SimpleBiominReactions<NumEqVector, VolumeVariables>;
enum enum
{ {
...@@ -381,7 +380,6 @@ public: ...@@ -381,7 +380,6 @@ public:
return source; return source;
} }
const std::vector<Scalar>& getKxx() const std::vector<Scalar>& getKxx()
{ {
return Kxx_; return Kxx_;
......
...@@ -30,15 +30,12 @@ namespace Dumux { ...@@ -30,15 +30,12 @@ namespace Dumux {
* \ingroup Chemistry * \ingroup Chemistry
* \brief The source and sink terms due to reactions are calculated in this class. * \brief The source and sink terms due to reactions are calculated in this class.
*/ */
template <class TypeTag> template< class NumEqVector, class VolumeVariables >
class SimpleBiominReactions class SimpleBiominReactions
{ {
using Scalar = GetPropType<TypeTag, Properties::Scalar>; using SolidSystem = typename VolumeVariables::SolidSystem;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; using FluidSystem = typename VolumeVariables::FluidSystem;
using SolidSystem = GetPropType<TypeTag, Properties::SolidSystem>; using Scalar = typename FluidSystem::Scalar;
using VolumeVariables = GetPropType<TypeTag, Properties::VolumeVariables>;
using ThisType = SimpleBiominReactions<TypeTag>;
using Sources = GetPropType<TypeTag, Properties::NumEqVector>;
public: public:
...@@ -81,7 +78,7 @@ public: ...@@ -81,7 +78,7 @@ public:
* \param Source The source * \param Source The source
* \param volVars The volume variables * \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: // define and compute some parameters for convenience:
Scalar xwCa = volVars.moleFraction(liquidPhaseIdx,CaIdx); Scalar xwCa = volVars.moleFraction(liquidPhaseIdx,CaIdx);
...@@ -91,7 +88,7 @@ public: ...@@ -91,7 +88,7 @@ public:
if (volFracBiofilm < 0) if (volFracBiofilm < 0)
volFracBiofilm = 0; volFracBiofilm = 0;
// TODO: dumux-course-task // TODO: dumux-course-task
// implement mass of biofilm // implement mass of biofilm
Scalar massBiofilm = densityBiofilm * volFracBiofilm; Scalar massBiofilm = densityBiofilm * volFracBiofilm;
...@@ -124,7 +121,6 @@ public: ...@@ -124,7 +121,6 @@ public:
q[BiofilmIdx] += 0; q[BiofilmIdx] += 0;
q[CalciteIdx] += rprec; q[CalciteIdx] += rprec;
} }
private: private:
// urease parameters // urease parameters
......
Supports Markdown
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