diff --git a/exercises/exercise-biomineralization/README.md b/exercises/exercise-biomineralization/README.md index dfd4c1b145e4d0433ce2a177bcdf782ff10981b4..90a6886f036fbd47064be85056f27f441640b149 100644 --- a/exercises/exercise-biomineralization/README.md +++ b/exercises/exercise-biomineralization/README.md @@ -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__ diff --git a/exercises/exercise-biomineralization/biominproblem.hh b/exercises/exercise-biomineralization/biominproblem.hh index 1ed4ccec8a1288002cf9d0940ad78df18aad349e..c72dff46d07ba52592034ce45ce1ae7090f2222f 100644 --- a/exercises/exercise-biomineralization/biominproblem.hh +++ b/exercises/exercise-biomineralization/biominproblem.hh @@ -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> diff --git a/exercises/exercise-biomineralization/chemistry/simplebiominreactions.hh b/exercises/exercise-biomineralization/chemistry/simplebiominreactions.hh index bc0e0f0a9a086aa4c51f7688ba0581abee0d0ef4..8a18560dfdde8739bd4475d21599d1acd6528f05 100644 --- a/exercises/exercise-biomineralization/chemistry/simplebiominreactions.hh +++ b/exercises/exercise-biomineralization/chemistry/simplebiominreactions.hh @@ -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_; diff --git a/exercises/solution/exercise-biomineralization/biominproblem.hh b/exercises/solution/exercise-biomineralization/biominproblem.hh index 9a75f3cc9e0c3288ec37af45ea72ae223057a5ce..2c41e437d1bcbffcb7acd4aa6770ab7b1b5b09a7 100644 --- a/exercises/solution/exercise-biomineralization/biominproblem.hh +++ b/exercises/solution/exercise-biomineralization/biominproblem.hh @@ -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_; diff --git a/exercises/solution/exercise-biomineralization/chemistry/simplebiominreactions.hh b/exercises/solution/exercise-biomineralization/chemistry/simplebiominreactions.hh index 02eec51ab98100461212e3b90043a703b992f4d7..66331ec460cc2bdd61ddd63afae2994b8c6d80d7 100644 --- a/exercises/solution/exercise-biomineralization/chemistry/simplebiominreactions.hh +++ b/exercises/solution/exercise-biomineralization/chemistry/simplebiominreactions.hh @@ -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