From 2d45e162919f4db8de66cc451fac139de6b81ef1 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 13 Sep 2022 08:43:35 +0200 Subject: [PATCH 1/3] blackoilmicpmodules: remove unused headers and add missing headers --- opm/models/blackoil/blackoilmicpmodules.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opm/models/blackoil/blackoilmicpmodules.hh b/opm/models/blackoil/blackoilmicpmodules.hh index 5e607491a..b0ec72447 100644 --- a/opm/models/blackoil/blackoilmicpmodules.hh +++ b/opm/models/blackoil/blackoilmicpmodules.hh @@ -30,7 +30,6 @@ #include "blackoilproperties.hh" #include -#include #if HAVE_ECL_INPUT #include @@ -39,6 +38,9 @@ #include +#include +#include +#include #include namespace Opm { From 893502c6b9a837bd8250d7d0012cae2f9cd992ce Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 13 Sep 2022 09:38:15 +0200 Subject: [PATCH 2/3] blackoilmicpmodules: remove MICPpara prefix from variables/methods unnecessary noise --- opm/models/blackoil/blackoilmicpmodules.hh | 234 ++++++++++---------- opm/models/blackoil/blackoilnewtonmethod.hh | 10 +- 2 files changed, 122 insertions(+), 122 deletions(-) diff --git a/opm/models/blackoil/blackoilmicpmodules.hh b/opm/models/blackoil/blackoilmicpmodules.hh index b0ec72447..5a7d04c43 100644 --- a/opm/models/blackoil/blackoilmicpmodules.hh +++ b/opm/models/blackoil/blackoilmicpmodules.hh @@ -139,7 +139,7 @@ public: static void checkCloggingMICP(const Model& model, const Scalar phi, unsigned dofIdx) { const PrimaryVariables& priVars = model.solution(/*timeIdx=*/1)[dofIdx]; - if (phi - priVars[biofilmConcentrationIdx] - priVars[calciteConcentrationIdx] < MICPparaToleranceBeforeClogging()) + if (phi - priVars[biofilmConcentrationIdx] - priVars[calciteConcentrationIdx] < toleranceBeforeClogging()) throw std::logic_error("Clogging has been (almost) reached in at least one cell\n"); } @@ -148,41 +148,41 @@ public: * * The index of specified here must be in range [0, numSatRegions) */ - static void setMICPpara(const Scalar& MICPparaDensityBiofilm, - const Scalar& MICPparaDensityCalcite, - const Scalar& MICPparaDetachmentRate, - const Scalar& MICPparaCriticalPorosity, - const Scalar& MICPparaFittingFactor, - const Scalar& MICPparaHalfVelocityOxygen, - const Scalar& MICPparaHalfVelocityUrea, - const Scalar& MICPparaMaximumGrowthRate, - const Scalar& MICPparaMaximumUreaUtilization, - const Scalar& MICPparaMicrobialAttachmentRate, - const Scalar& MICPparaMicrobialDeathRate, - const Scalar& MICPparaMinimumPermeability, - const Scalar& MICPparaOxygenConsumptionFactor, - const Scalar& MICPparaYieldGrowthCoefficient, - const Scalar& MICPparaMaximumOxygenConcentration, - const Scalar& MICPparaMaximumUreaConcentration, - const Scalar& MICPparaToleranceBeforeClogging) + static void setMICPpara(const Scalar& densityBiofilm, + const Scalar& densityCalcite, + const Scalar& detachmentRate, + const Scalar& criticalPorosity, + const Scalar& fittingFactor, + const Scalar& halfVelocityOxygen, + const Scalar& halfVelocityUrea, + const Scalar& maximumGrowthRate, + const Scalar& maximumUreaUtilization, + const Scalar& microbialAttachmentRate, + const Scalar& microbialDeathRate, + const Scalar& minimumPermeability, + const Scalar& oxygenConsumptionFactor, + const Scalar& yieldGrowthCoefficient, + const Scalar& maximumOxygenConcentration, + const Scalar& maximumUreaConcentration, + const Scalar& toleranceBeforeClogging) { - MICPparaDensityBiofilm_ = MICPparaDensityBiofilm; - MICPparaDensityCalcite_ = MICPparaDensityCalcite; - MICPparaDetachmentRate_ = MICPparaDetachmentRate; - MICPparaCriticalPorosity_ = MICPparaCriticalPorosity; - MICPparaFittingFactor_ = MICPparaFittingFactor; - MICPparaHalfVelocityOxygen_ = MICPparaHalfVelocityOxygen; - MICPparaHalfVelocityUrea_ = MICPparaHalfVelocityUrea; - MICPparaMaximumGrowthRate_ = MICPparaMaximumGrowthRate; - MICPparaMaximumUreaUtilization_ = MICPparaMaximumUreaUtilization; - MICPparaMicrobialAttachmentRate_ = MICPparaMicrobialAttachmentRate; - MICPparaMicrobialDeathRate_ = MICPparaMicrobialDeathRate; - MICPparaMinimumPermeability_ = MICPparaMinimumPermeability; - MICPparaOxygenConsumptionFactor_ = MICPparaOxygenConsumptionFactor; - MICPparaYieldGrowthCoefficient_ = MICPparaYieldGrowthCoefficient; - MICPparaMaximumOxygenConcentration_ = MICPparaMaximumOxygenConcentration; - MICPparaMaximumUreaConcentration_ = MICPparaMaximumUreaConcentration; - MICPparaToleranceBeforeClogging_ = MICPparaToleranceBeforeClogging; + densityBiofilm_ = densityBiofilm; + densityCalcite_ = densityCalcite; + detachmentRate_ = detachmentRate; + criticalPorosity_ = criticalPorosity; + fittingFactor_ = fittingFactor; + halfVelocityOxygen_ = halfVelocityOxygen; + halfVelocityUrea_ = halfVelocityUrea; + maximumGrowthRate_ = maximumGrowthRate; + maximumUreaUtilization_ = maximumUreaUtilization; + microbialAttachmentRate_ = microbialAttachmentRate; + microbialDeathRate_ = microbialDeathRate; + minimumPermeability_ = minimumPermeability; + oxygenConsumptionFactor_ = oxygenConsumptionFactor; + yieldGrowthCoefficient_ = yieldGrowthCoefficient; + maximumOxygenConcentration_ = maximumOxygenConcentration; + maximumUreaConcentration_ = maximumUreaConcentration; + toleranceBeforeClogging_ = toleranceBeforeClogging; } /*! @@ -315,17 +315,17 @@ public: } // get the model parameters - Scalar k_a = MICPparaMicrobialAttachmentRate(); - Scalar k_d = MICPparaMicrobialDeathRate(); - Scalar rho_b = MICPparaDensityBiofilm(); - Scalar rho_c = MICPparaDensityCalcite(); - Scalar k_str = MICPparaDetachmentRate(); - Scalar k_o = MICPparaHalfVelocityOxygen(); - Scalar k_u = MICPparaHalfVelocityUrea() / 10.0;//Dividing by scaling factor 10 (see WellInterface_impl.hpp) - Scalar mu = MICPparaMaximumGrowthRate(); - Scalar mu_u = MICPparaMaximumUreaUtilization() / 10.0;//Dividing by scaling factor 10 (see WellInterface_impl.hpp) - Scalar Y_sb = MICPparaYieldGrowthCoefficient(); - Scalar F = MICPparaOxygenConsumptionFactor(); + Scalar k_a = microbialAttachmentRate(); + Scalar k_d = microbialDeathRate(); + Scalar rho_b = densityBiofilm(); + Scalar rho_c = densityCalcite(); + Scalar k_str = detachmentRate(); + Scalar k_o = halfVelocityOxygen(); + Scalar k_u = halfVelocityUrea() / 10.0;//Dividing by scaling factor 10 (see WellInterface_impl.hpp) + Scalar mu = maximumGrowthRate(); + Scalar mu_u = maximumUreaUtilization() / 10.0;//Dividing by scaling factor 10 (see WellInterface_impl.hpp) + Scalar Y_sb = yieldGrowthCoefficient(); + Scalar F = oxygenConsumptionFactor(); Scalar Y_uc = 1.67 * 10; //Multiplying by scaling factor 10 (see WellInterface_impl.hpp) // compute the processes @@ -346,89 +346,89 @@ public: source[Indices::contiCalciteEqIdx] += (rho_b / rho_c) * intQuants.biofilmConcentration() * Y_uc * mu_u * intQuants.ureaConcentration() / (k_u + intQuants.ureaConcentration()); } - static const Scalar MICPparaDensityBiofilm() + static const Scalar densityBiofilm() { - return MICPparaDensityBiofilm_; + return densityBiofilm_; } - static const Scalar MICPparaDensityCalcite() + static const Scalar densityCalcite() { - return MICPparaDensityCalcite_; + return densityCalcite_; } - static const Scalar MICPparaDetachmentRate() + static const Scalar detachmentRate() { - return MICPparaDetachmentRate_; + return detachmentRate_; } - static const Scalar MICPparaCriticalPorosity() + static const Scalar criticalPorosity() { - return MICPparaCriticalPorosity_; + return criticalPorosity_; } - static const Scalar MICPparaFittingFactor() + static const Scalar fittingFactor() { - return MICPparaFittingFactor_; + return fittingFactor_; } - static const Scalar MICPparaHalfVelocityOxygen() + static const Scalar halfVelocityOxygen() { - return MICPparaHalfVelocityOxygen_; + return halfVelocityOxygen_; } - static const Scalar MICPparaHalfVelocityUrea() + static const Scalar halfVelocityUrea() { - return MICPparaHalfVelocityUrea_; + return halfVelocityUrea_; } - static const Scalar MICPparaMaximumGrowthRate() + static const Scalar maximumGrowthRate() { - return MICPparaMaximumGrowthRate_; + return maximumGrowthRate_; } - static const Scalar MICPparaMaximumOxygenConcentration() + static const Scalar maximumOxygenConcentration() { - return MICPparaMaximumOxygenConcentration_; + return maximumOxygenConcentration_; } - static const Scalar MICPparaMaximumUreaConcentration() + static const Scalar maximumUreaConcentration() { - return MICPparaMaximumUreaConcentration_ / 10.0;//Dividing by scaling factor 10 (see WellInterface_impl.hpp); + return maximumUreaConcentration_ / 10.0;//Dividing by scaling factor 10 (see WellInterface_impl.hpp); } - static const Scalar MICPparaMaximumUreaUtilization() + static const Scalar maximumUreaUtilization() { - return MICPparaMaximumUreaUtilization_; + return maximumUreaUtilization_; } - static const Scalar MICPparaMicrobialAttachmentRate() + static const Scalar microbialAttachmentRate() { - return MICPparaMicrobialAttachmentRate_; + return microbialAttachmentRate_; } - static const Scalar MICPparaMicrobialDeathRate() + static const Scalar microbialDeathRate() { - return MICPparaMicrobialDeathRate_; + return microbialDeathRate_; } - static const Scalar MICPparaMinimumPermeability() + static const Scalar minimumPermeability() { - return MICPparaMinimumPermeability_; + return minimumPermeability_; } - static const Scalar MICPparaOxygenConsumptionFactor() + static const Scalar oxygenConsumptionFactor() { - return MICPparaOxygenConsumptionFactor_; + return oxygenConsumptionFactor_; } - static const Scalar MICPparaToleranceBeforeClogging() + static const Scalar toleranceBeforeClogging() { - return MICPparaToleranceBeforeClogging_; + return toleranceBeforeClogging_; } - static const Scalar MICPparaYieldGrowthCoefficient() + static const Scalar yieldGrowthCoefficient() { - return MICPparaYieldGrowthCoefficient_; + return yieldGrowthCoefficient_; } static const std::vector phi() @@ -437,94 +437,94 @@ public: } private: - static Scalar MICPparaDensityBiofilm_; - static Scalar MICPparaDensityCalcite_; - static Scalar MICPparaDetachmentRate_; - static Scalar MICPparaCriticalPorosity_; - static Scalar MICPparaFittingFactor_; - static Scalar MICPparaHalfVelocityOxygen_; - static Scalar MICPparaHalfVelocityUrea_; - static Scalar MICPparaMaximumGrowthRate_; - static Scalar MICPparaMaximumUreaUtilization_; - static Scalar MICPparaMicrobialAttachmentRate_; - static Scalar MICPparaMicrobialDeathRate_; - static Scalar MICPparaMinimumPermeability_; - static Scalar MICPparaOxygenConsumptionFactor_; - static Scalar MICPparaYieldGrowthCoefficient_; - static Scalar MICPparaMaximumOxygenConcentration_; - static Scalar MICPparaMaximumUreaConcentration_; - static Scalar MICPparaToleranceBeforeClogging_; + static Scalar densityBiofilm_; + static Scalar densityCalcite_; + static Scalar detachmentRate_; + static Scalar criticalPorosity_; + static Scalar fittingFactor_; + static Scalar halfVelocityOxygen_; + static Scalar halfVelocityUrea_; + static Scalar maximumGrowthRate_; + static Scalar maximumUreaUtilization_; + static Scalar microbialAttachmentRate_; + static Scalar microbialDeathRate_; + static Scalar minimumPermeability_; + static Scalar oxygenConsumptionFactor_; + static Scalar yieldGrowthCoefficient_; + static Scalar maximumOxygenConcentration_; + static Scalar maximumUreaConcentration_; + static Scalar toleranceBeforeClogging_; static std::vector phi_; }; template typename BlackOilMICPModule::Scalar -BlackOilMICPModule::MICPparaDensityBiofilm_; +BlackOilMICPModule::densityBiofilm_; template typename BlackOilMICPModule::Scalar -BlackOilMICPModule::MICPparaDensityCalcite_; +BlackOilMICPModule::densityCalcite_; template typename BlackOilMICPModule::Scalar -BlackOilMICPModule::MICPparaDetachmentRate_; +BlackOilMICPModule::detachmentRate_; template typename BlackOilMICPModule::Scalar -BlackOilMICPModule::MICPparaCriticalPorosity_; +BlackOilMICPModule::criticalPorosity_; template typename BlackOilMICPModule::Scalar -BlackOilMICPModule::MICPparaFittingFactor_; +BlackOilMICPModule::fittingFactor_; template typename BlackOilMICPModule::Scalar -BlackOilMICPModule::MICPparaHalfVelocityOxygen_; +BlackOilMICPModule::halfVelocityOxygen_; template typename BlackOilMICPModule::Scalar -BlackOilMICPModule::MICPparaHalfVelocityUrea_; +BlackOilMICPModule::halfVelocityUrea_; template typename BlackOilMICPModule::Scalar -BlackOilMICPModule::MICPparaMaximumGrowthRate_; +BlackOilMICPModule::maximumGrowthRate_; template typename BlackOilMICPModule::Scalar -BlackOilMICPModule::MICPparaMaximumUreaUtilization_; +BlackOilMICPModule::maximumUreaUtilization_; template typename BlackOilMICPModule::Scalar -BlackOilMICPModule::MICPparaMicrobialAttachmentRate_; +BlackOilMICPModule::microbialAttachmentRate_; template typename BlackOilMICPModule::Scalar -BlackOilMICPModule::MICPparaMicrobialDeathRate_; +BlackOilMICPModule::microbialDeathRate_; template typename BlackOilMICPModule::Scalar -BlackOilMICPModule::MICPparaMinimumPermeability_; +BlackOilMICPModule::minimumPermeability_; template typename BlackOilMICPModule::Scalar -BlackOilMICPModule::MICPparaOxygenConsumptionFactor_; +BlackOilMICPModule::oxygenConsumptionFactor_; template typename BlackOilMICPModule::Scalar -BlackOilMICPModule::MICPparaYieldGrowthCoefficient_; +BlackOilMICPModule::yieldGrowthCoefficient_; template typename BlackOilMICPModule::Scalar -BlackOilMICPModule::MICPparaMaximumOxygenConcentration_; +BlackOilMICPModule::maximumOxygenConcentration_; template typename BlackOilMICPModule::Scalar -BlackOilMICPModule::MICPparaMaximumUreaConcentration_; +BlackOilMICPModule::maximumUreaConcentration_; template typename BlackOilMICPModule::Scalar -BlackOilMICPModule::MICPparaToleranceBeforeClogging_; +BlackOilMICPModule::toleranceBeforeClogging_; template std::vector::Scalar> @@ -576,9 +576,9 @@ public: const auto& intQuants = elemCtx.intensiveQuantities(dofIdx, timeIdx); const auto& K = elemCtx.problem().intrinsicPermeability(elemCtx, dofIdx, timeIdx); Scalar referencePorosity_ = elemCtx.problem().porosity(elemCtx, dofIdx, timeIdx); - Scalar eta = MICPModule::MICPparaFittingFactor(); - Scalar k_min = MICPModule::MICPparaMinimumPermeability(); - Scalar phi_crit = MICPModule::MICPparaCriticalPorosity(); + Scalar eta = MICPModule::fittingFactor(); + Scalar k_min = MICPModule::minimumPermeability(); + Scalar phi_crit = MICPModule::criticalPorosity(); microbialConcentration_ = priVars.makeEvaluation(microbialConcentrationIdx, timeIdx, linearizationType); oxygenConcentration_ = priVars.makeEvaluation(oxygenConcentrationIdx, timeIdx, linearizationType); diff --git a/opm/models/blackoil/blackoilnewtonmethod.hh b/opm/models/blackoil/blackoilnewtonmethod.hh index e1325cc37..85c537bf2 100644 --- a/opm/models/blackoil/blackoilnewtonmethod.hh +++ b/opm/models/blackoil/blackoilnewtonmethod.hh @@ -404,15 +404,15 @@ protected: // concentration (the urea concentration has been scaled by 10). For // the biofilm and calcite, we set this value equal to the porosity minus the clogging tolerance. if (enableMICP && pvIdx == Indices::microbialConcentrationIdx) - nextValue[pvIdx] = std::clamp(nextValue[pvIdx], 0.0, MICPModule::MICPparaDensityBiofilm()); + nextValue[pvIdx] = std::clamp(nextValue[pvIdx], 0.0, MICPModule::densityBiofilm()); if (enableMICP && pvIdx == Indices::oxygenConcentrationIdx) - nextValue[pvIdx] = std::clamp(nextValue[pvIdx], 0.0, MICPModule::MICPparaMaximumOxygenConcentration()); + nextValue[pvIdx] = std::clamp(nextValue[pvIdx], 0.0, MICPModule::maximumOxygenConcentration()); if (enableMICP && pvIdx == Indices::ureaConcentrationIdx) - nextValue[pvIdx] = std::clamp(nextValue[pvIdx], 0.0, MICPModule::MICPparaMaximumUreaConcentration()); + nextValue[pvIdx] = std::clamp(nextValue[pvIdx], 0.0, MICPModule::maximumUreaConcentration()); if (enableMICP && pvIdx == Indices::biofilmConcentrationIdx) - nextValue[pvIdx] = std::clamp(nextValue[pvIdx], 0.0, MICPModule::phi()[globalDofIdx] - MICPModule::MICPparaToleranceBeforeClogging()); + nextValue[pvIdx] = std::clamp(nextValue[pvIdx], 0.0, MICPModule::phi()[globalDofIdx] - MICPModule::toleranceBeforeClogging()); if (enableMICP && pvIdx == Indices::calciteConcentrationIdx) - nextValue[pvIdx] = std::clamp(nextValue[pvIdx], 0.0, MICPModule::phi()[globalDofIdx] - MICPModule::MICPparaToleranceBeforeClogging()); + nextValue[pvIdx] = std::clamp(nextValue[pvIdx], 0.0, MICPModule::phi()[globalDofIdx] - MICPModule::toleranceBeforeClogging()); } // switch the new primary variables to something which is physically meaningful. From f96e4490940d8db2dd9b9532b87b19092ba90a82 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 13 Sep 2022 08:51:22 +0200 Subject: [PATCH 3/3] blackoilmicpmodules: put parameters in separate class limits the amount of static variable declarations --- opm/models/blackoil/blackoilmicpmodules.hh | 166 +++++---------------- opm/models/blackoil/blackoilmicpparams.hh | 60 ++++++++ 2 files changed, 101 insertions(+), 125 deletions(-) create mode 100644 opm/models/blackoil/blackoilmicpparams.hh diff --git a/opm/models/blackoil/blackoilmicpmodules.hh b/opm/models/blackoil/blackoilmicpmodules.hh index 5a7d04c43..ac56397fa 100644 --- a/opm/models/blackoil/blackoilmicpmodules.hh +++ b/opm/models/blackoil/blackoilmicpmodules.hh @@ -29,6 +29,8 @@ #define EWOMS_BLACK_OIL_MICP_MODULE_HH #include "blackoilproperties.hh" + +#include #include #if HAVE_ECL_INPUT @@ -125,7 +127,7 @@ public: MICPpara.getMaximumUreaConcentration(), MICPpara.getToleranceBeforeClogging()); // obtain the porosity for the clamp in the blackoilnewtonmethod - phi_ = eclState.fieldProps().get_double("PORO"); + params_.phi_ = eclState.fieldProps().get_double("PORO"); } #endif @@ -166,23 +168,23 @@ public: const Scalar& maximumUreaConcentration, const Scalar& toleranceBeforeClogging) { - densityBiofilm_ = densityBiofilm; - densityCalcite_ = densityCalcite; - detachmentRate_ = detachmentRate; - criticalPorosity_ = criticalPorosity; - fittingFactor_ = fittingFactor; - halfVelocityOxygen_ = halfVelocityOxygen; - halfVelocityUrea_ = halfVelocityUrea; - maximumGrowthRate_ = maximumGrowthRate; - maximumUreaUtilization_ = maximumUreaUtilization; - microbialAttachmentRate_ = microbialAttachmentRate; - microbialDeathRate_ = microbialDeathRate; - minimumPermeability_ = minimumPermeability; - oxygenConsumptionFactor_ = oxygenConsumptionFactor; - yieldGrowthCoefficient_ = yieldGrowthCoefficient; - maximumOxygenConcentration_ = maximumOxygenConcentration; - maximumUreaConcentration_ = maximumUreaConcentration; - toleranceBeforeClogging_ = toleranceBeforeClogging; + params_.densityBiofilm_ = densityBiofilm; + params_.densityCalcite_ = densityCalcite; + params_.detachmentRate_ = detachmentRate; + params_.criticalPorosity_ = criticalPorosity; + params_.fittingFactor_ = fittingFactor; + params_.halfVelocityOxygen_ = halfVelocityOxygen; + params_.halfVelocityUrea_ = halfVelocityUrea; + params_.maximumGrowthRate_ = maximumGrowthRate; + params_.maximumUreaUtilization_ = maximumUreaUtilization; + params_.microbialAttachmentRate_ = microbialAttachmentRate; + params_.microbialDeathRate_ = microbialDeathRate; + params_.minimumPermeability_ = minimumPermeability; + params_.oxygenConsumptionFactor_ = oxygenConsumptionFactor; + params_.yieldGrowthCoefficient_ = yieldGrowthCoefficient; + params_.maximumOxygenConcentration_ = maximumOxygenConcentration; + params_.maximumUreaConcentration_ = maximumUreaConcentration; + params_.toleranceBeforeClogging_ = toleranceBeforeClogging; } /*! @@ -348,188 +350,102 @@ public: static const Scalar densityBiofilm() { - return densityBiofilm_; + return params_.densityBiofilm_; } static const Scalar densityCalcite() { - return densityCalcite_; + return params_.densityCalcite_; } static const Scalar detachmentRate() { - return detachmentRate_; + return params_.detachmentRate_; } static const Scalar criticalPorosity() { - return criticalPorosity_; + return params_.criticalPorosity_; } static const Scalar fittingFactor() { - return fittingFactor_; + return params_.fittingFactor_; } static const Scalar halfVelocityOxygen() { - return halfVelocityOxygen_; + return params_.halfVelocityOxygen_; } static const Scalar halfVelocityUrea() { - return halfVelocityUrea_; + return params_.halfVelocityUrea_; } static const Scalar maximumGrowthRate() { - return maximumGrowthRate_; + return params_.maximumGrowthRate_; } static const Scalar maximumOxygenConcentration() { - return maximumOxygenConcentration_; + return params_.maximumOxygenConcentration_; } static const Scalar maximumUreaConcentration() { - return maximumUreaConcentration_ / 10.0;//Dividing by scaling factor 10 (see WellInterface_impl.hpp); + return params_.maximumUreaConcentration_ / 10.0;//Dividing by scaling factor 10 (see WellInterface_impl.hpp); } static const Scalar maximumUreaUtilization() { - return maximumUreaUtilization_; + return params_.maximumUreaUtilization_; } static const Scalar microbialAttachmentRate() { - return microbialAttachmentRate_; + return params_.microbialAttachmentRate_; } static const Scalar microbialDeathRate() { - return microbialDeathRate_; + return params_.microbialDeathRate_; } static const Scalar minimumPermeability() { - return minimumPermeability_; + return params_.minimumPermeability_; } static const Scalar oxygenConsumptionFactor() { - return oxygenConsumptionFactor_; + return params_.oxygenConsumptionFactor_; } static const Scalar toleranceBeforeClogging() { - return toleranceBeforeClogging_; + return params_.toleranceBeforeClogging_; } static const Scalar yieldGrowthCoefficient() { - return yieldGrowthCoefficient_; + return params_.yieldGrowthCoefficient_; } static const std::vector phi() { - return phi_; + return params_.phi_; } private: - static Scalar densityBiofilm_; - static Scalar densityCalcite_; - static Scalar detachmentRate_; - static Scalar criticalPorosity_; - static Scalar fittingFactor_; - static Scalar halfVelocityOxygen_; - static Scalar halfVelocityUrea_; - static Scalar maximumGrowthRate_; - static Scalar maximumUreaUtilization_; - static Scalar microbialAttachmentRate_; - static Scalar microbialDeathRate_; - static Scalar minimumPermeability_; - static Scalar oxygenConsumptionFactor_; - static Scalar yieldGrowthCoefficient_; - static Scalar maximumOxygenConcentration_; - static Scalar maximumUreaConcentration_; - static Scalar toleranceBeforeClogging_; - static std::vector phi_; + static BlackOilMICPParams params_; }; template -typename BlackOilMICPModule::Scalar -BlackOilMICPModule::densityBiofilm_; - -template -typename BlackOilMICPModule::Scalar -BlackOilMICPModule::densityCalcite_; - -template -typename BlackOilMICPModule::Scalar -BlackOilMICPModule::detachmentRate_; - -template -typename BlackOilMICPModule::Scalar -BlackOilMICPModule::criticalPorosity_; - -template -typename BlackOilMICPModule::Scalar -BlackOilMICPModule::fittingFactor_; - -template -typename BlackOilMICPModule::Scalar -BlackOilMICPModule::halfVelocityOxygen_; - -template -typename BlackOilMICPModule::Scalar -BlackOilMICPModule::halfVelocityUrea_; - -template -typename BlackOilMICPModule::Scalar -BlackOilMICPModule::maximumGrowthRate_; - -template -typename BlackOilMICPModule::Scalar -BlackOilMICPModule::maximumUreaUtilization_; - -template -typename BlackOilMICPModule::Scalar -BlackOilMICPModule::microbialAttachmentRate_; - -template -typename BlackOilMICPModule::Scalar -BlackOilMICPModule::microbialDeathRate_; - -template -typename BlackOilMICPModule::Scalar -BlackOilMICPModule::minimumPermeability_; - -template -typename BlackOilMICPModule::Scalar -BlackOilMICPModule::oxygenConsumptionFactor_; - -template -typename BlackOilMICPModule::Scalar -BlackOilMICPModule::yieldGrowthCoefficient_; - -template -typename BlackOilMICPModule::Scalar -BlackOilMICPModule::maximumOxygenConcentration_; - -template -typename BlackOilMICPModule::Scalar -BlackOilMICPModule::maximumUreaConcentration_; - -template -typename BlackOilMICPModule::Scalar -BlackOilMICPModule::toleranceBeforeClogging_; - -template -std::vector::Scalar> -BlackOilMICPModule::phi_; - +BlackOilMICPParams::Scalar> +BlackOilMICPModule::params_; /*! * \ingroup BlackOil diff --git a/opm/models/blackoil/blackoilmicpparams.hh b/opm/models/blackoil/blackoilmicpparams.hh new file mode 100644 index 000000000..ef25010e0 --- /dev/null +++ b/opm/models/blackoil/blackoilmicpparams.hh @@ -0,0 +1,60 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/* + This file is part of the Open Porous Media project (OPM). + + OPM 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. + + OPM 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 OPM. If not, see . + + Consult the COPYING file in the top-level source directory of this + module for the precise wording of the license and the list of + copyright holders. +*/ +/*! + * \file + * + * \brief Contains the parameters required to extend the black-oil model by MICP. + */ +#ifndef EWOMS_BLACK_OIL_MICP_PARAMS_HH +#define EWOMS_BLACK_OIL_MICP_PARAMS_HH + +#include + +namespace Opm { + +//! \brief Struct holding the parameters for the BlackOilMICPModule class. +template +struct BlackOilMICPParams { + Scalar densityBiofilm_; + Scalar densityCalcite_; + Scalar detachmentRate_; + Scalar criticalPorosity_; + Scalar fittingFactor_; + Scalar halfVelocityOxygen_; + Scalar halfVelocityUrea_; + Scalar maximumGrowthRate_; + Scalar maximumUreaUtilization_; + Scalar microbialAttachmentRate_; + Scalar microbialDeathRate_; + Scalar minimumPermeability_; + Scalar oxygenConsumptionFactor_; + Scalar yieldGrowthCoefficient_; + Scalar maximumOxygenConcentration_; + Scalar maximumUreaConcentration_; + Scalar toleranceBeforeClogging_; + std::vector phi_; +}; + +} // namespace Opm + +#endif