diff --git a/dumux/material/solidstates/inertsolidstate.hh b/dumux/material/solidstates/inertsolidstate.hh index fb86c49c7ce820e77d0d79e3994187ca0d8d2a01..17c45028f39a6842c863fafcdaec00a35ffe11c8 100644 --- a/dumux/material/solidstates/inertsolidstate.hh +++ b/dumux/material/solidstates/inertsolidstate.hh @@ -45,6 +45,10 @@ public: numInertComponents = SolidSystem::numInertComponents, }; + /*! + * \brief Allows compile-time evaluation of if the solid system + * is inert or takes part in any kind of reactions. + */ static constexpr bool isInert() { static_assert(SolidSystem::isInert(), "Only inert solid systems are allowed with the InertSolidState"); @@ -72,19 +76,20 @@ public: return porosity; } - /*! - * \brief The mass density \f$\rho_\alpha\f$ of the fluid phase - * \f$\alpha\f$ in \f$\mathrm{[kg/m^3]}\f$ - */ - Scalar density() const - { return density_; } + //! The mass density of the solid phase in \f$\mathrm{[kg/m^3]}\f$ + Scalar density() const { return density_; } + + //! The heat capacity of the solid phase in \f$\mathrm{[J/(kg*K)}\f$ + Scalar heatCapacity() const { return heatCapacity_; } - Scalar heatCapacity() const - { return heatCapacity_; } + //! The thermal conductivity of the solid phase in \f$\mathrm{[[W/(m*K)]}\f$ + Scalar thermalConductivity() const { return thermalConducivity_; } - Scalar thermalConductivity() const - { return thermalConducivity_; } + //! The temperature of the solid phase in \f$\mathrm{[K]}\f$ + Scalar temperature() const { return temperature_; } + //! The volume fraction of a solid component within the solid phase + Scalar volumeFraction(const int compIdx) const { return volumeFraction_[compIdx]; } /*! * \brief The molar density \f$\rho_{mol,\alpha}\f$ @@ -97,15 +102,6 @@ public: Scalar molarDensity() const { return density_/averageMolarMass(); } - /*! - * \brief The temperature within the domain \f$\mathrm{[K]}\f$ - */ - Scalar temperature() const - { return temperature_; } - - Scalar volumeFraction(const int compIdx) const - { return volumeFraction_[compIdx]; } - /***************************************************** * Setter methods. Note that these are not part of the * generic InertSolidState interface but specific for each @@ -156,6 +152,9 @@ public: void setHeatCapacity(Scalar value) { heatCapacity_ = value; } + /*! + * \brief Set the volume fraction of a solid component + */ void setVolumeFraction(const int compIdx, Scalar value) { volumeFraction_[compIdx] = value; } diff --git a/dumux/material/solidstates/updatesolidvolumefractions.hh b/dumux/material/solidstates/updatesolidvolumefractions.hh index e7447654390ee512cb0f68d2c2e1821eb2da4799..807903e559e6e38757baf3422e176c55ee23730a 100644 --- a/dumux/material/solidstates/updatesolidvolumefractions.hh +++ b/dumux/material/solidstates/updatesolidvolumefractions.hh @@ -33,10 +33,10 @@ namespace Dumux { * \note gets the non-inert components from the primary variables */ template<class ElemSol, class Problem, class Element, class Scv, class SolidState> -void updateSolidVolumeFractions(const ElemSol &elemSol, - const Problem &problem, - const Element &element, - const Scv &scv, +void updateSolidVolumeFractions(const ElemSol& elemSol, + const Problem& problem, + const Element& element, + const Scv& scv, SolidState& solidState, const int solidVolFracOffset) { diff --git a/dumux/porousmediumflow/1p/volumevariables.hh b/dumux/porousmediumflow/1p/volumevariables.hh index e242bce44bb1654f83a0fd6147b78d03045bd268..6a397957631d9e2f1417666ac05763525e09c9c6 100644 --- a/dumux/porousmediumflow/1p/volumevariables.hh +++ b/dumux/porousmediumflow/1p/volumevariables.hh @@ -58,6 +58,7 @@ public: using FluidState = typename Traits::FluidState; //! export type of solid state using SolidState = typename Traits::SolidState; + //! export type of solid system using SolidSystem = typename Traits::SolidSystem; /*! @@ -70,9 +71,9 @@ public: * \param scv The sub-control volume */ template<class ElemSol, class Problem, class Element, class Scv> - void update(const ElemSol &elemSol, - const Problem &problem, - const Element &element, + void update(const ElemSol& elemSol, + const Problem& problem, + const Element& element, const Scv& scv) { ParentType::update(elemSol, problem, element, scv); @@ -97,7 +98,7 @@ public: * \param fluidState A container with the current (physical) state of the fluid */ template<class ElemSol, class Problem, class Element, class Scv> - void completeFluidState(const ElemSol &elemSol, + void completeFluidState(const ElemSol& elemSol, const Problem& problem, const Element& element, const Scv& scv, @@ -188,7 +189,7 @@ public: * \brief Return the average porosity \f$\mathrm{[-]}\f$ within the control volume. */ Scalar porosity() const - { return solidState_.porosity(); } + { return solidState_.porosity(); } /*! * \brief Returns the permeability within the control volume in \f$[m^2]\f$. diff --git a/dumux/porousmediumflow/nonisothermal/volumevariables.hh b/dumux/porousmediumflow/nonisothermal/volumevariables.hh index 75845b4ff291fccf69c392ebb117435ab653056d..a10e8c6bae7a8aa2e32d2c1bd643f9d2715f2846 100644 --- a/dumux/porousmediumflow/nonisothermal/volumevariables.hh +++ b/dumux/porousmediumflow/nonisothermal/volumevariables.hh @@ -58,12 +58,12 @@ public: //! The temperature is obtained from the problem as a constant for isothermal models template<class ElemSol, class Problem, class Element, class Scv> - void updateTemperature(const ElemSol &elemSol, + void updateTemperature(const ElemSol& elemSol, const Problem& problem, - const Element &element, - const Scv &scv, + const Element& element, + const Scv& scv, FluidState& fluidState, - SolidState & solidState) + SolidState& solidState) { // retrieve temperature from solution vector, all phases have the same temperature Scalar T = problem.temperatureAtPos(scv.dofPosition()); @@ -115,12 +115,12 @@ public: //! The temperature is obtained from the problem as a constant for isothermal models template<class ElemSol, class Problem, class Element, class Scv> - void updateTemperature(const ElemSol &elemSol, + void updateTemperature(const ElemSol& elemSol, const Problem& problem, - const Element &element, - const Scv &scv, + const Element& element, + const Scv& scv, FluidState& fluidState, - SolidState & solidState) + SolidState& solidState) { if (numEnergyEq == 1) { @@ -128,7 +128,7 @@ public: const Scalar T = ParentType::extractDofPriVars(elemSol, scv)[temperatureIdx]; for(int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx) { - fluidState.setTemperature(phaseIdx, T); + fluidState.setTemperature(phaseIdx, T); } solidState.setTemperature(T); } diff --git a/dumux/porousmediumflow/velocityoutput.hh b/dumux/porousmediumflow/velocityoutput.hh index a80fbcb5a5cabf2e9f063aeb512ff7d3a9f9b71e..d6d5cb71ecdf67aafcd9e70e412cc051aa24cbfb 100644 --- a/dumux/porousmediumflow/velocityoutput.hh +++ b/dumux/porousmediumflow/velocityoutput.hh @@ -104,16 +104,14 @@ public: } } - bool enableOutput() - { return velocityOutput_; } + //! returns whether or not velocity output is enabled + bool enableOutput() { return velocityOutput_; } - // returns the name of the phase for a given index - static std::string phaseName(int phaseIdx) - { return FluidSystem::phaseName(phaseIdx); } + //! returns the name of the phase for a given index + static std::string phaseName(int phaseIdx) { return FluidSystem::phaseName(phaseIdx); } - // returns the number of phase velocities computed by this class - static constexpr int numPhaseVelocities() - { return GET_PROP_TYPE(TypeTag, ModelTraits)::numPhases(); } + //! returns the number of phase velocities computed by this class + static constexpr int numPhaseVelocities() { return GET_PROP_TYPE(TypeTag, ModelTraits)::numPhases(); } // The following SFINAE enable_if usage allows compilation, even if only a // diff --git a/dumux/porousmediumflow/volumevariables.hh b/dumux/porousmediumflow/volumevariables.hh index 1dcbcea81072f3c0b0db4e2fa8ee743d49a87b17..ad3a50dbb09e4939bb61f8ae22cdb89094e76ecc 100644 --- a/dumux/porousmediumflow/volumevariables.hh +++ b/dumux/porousmediumflow/volumevariables.hh @@ -60,10 +60,10 @@ public: * \param scv The sub-control volume */ template<class ElemSol, class Problem, class Element, class Scv> - void update(const ElemSol &elemSol, - const Problem &problem, - const Element &element, - const Scv &scv) + void update(const ElemSol& elemSol, + const Problem& problem, + const Element& element, + const Scv& scv) { priVars_ = extractDofPriVars(elemSol, scv); extrusionFactor_ = problem.extrusionFactor(element, scv, elemSol); diff --git a/test/porousmediumflow/2pncmin/implicit/dissolutionspatialparams.hh b/test/porousmediumflow/2pncmin/implicit/dissolutionspatialparams.hh index 2c0d469f79a93332553d6ad278fb191ed2862ed7..8098722211fd665eb96d4fa52016e673c3867d97 100644 --- a/test/porousmediumflow/2pncmin/implicit/dissolutionspatialparams.hh +++ b/test/porousmediumflow/2pncmin/implicit/dissolutionspatialparams.hh @@ -98,13 +98,11 @@ public: /*! * \brief Define the volume fraction of the inert component * - * \param element The finite element - * \param scv The sub-control volume - * \param elemSol The element solution + * \param globalPos The global position in the domain + * \param compIdx The index of the inert solid component */ template<class SolidSystem> - Scalar inertVolumeFractionAtPos(const GlobalPosition& globalPos, - int compIdx) const + Scalar inertVolumeFractionAtPos(const GlobalPosition& globalPos, int compIdx) const { return 1.0-referencePorosity_; } /*!