diff --git a/dumux/boxmodels/2p/2pfluidstate.hh b/dumux/boxmodels/2p/2pfluidstate.hh index 4c1c7d60a1275b5672c877b727a2dcb1ab5bf6e7..20eb57b8f00a27d75a39bb2c3bbec6e0aec43e48 100644 --- a/dumux/boxmodels/2p/2pfluidstate.hh +++ b/dumux/boxmodels/2p/2pfluidstate.hh @@ -16,7 +16,7 @@ /*! * \file * - * \brief Calcultes the fluid state from the primary variables in the + * \brief Calculates the fluid state as a function of the primary variables in the * 2p model. */ #ifndef DUMUX_2P_FLUID_STATE_HH @@ -29,7 +29,7 @@ namespace Dumux { /*! - * \brief Calcultes the fluid state from the primary variables in the + * \brief Calculates the fluid state as a function of the primary variables in the * 2p model. */ template <class TypeTag> @@ -53,6 +53,14 @@ class TwoPFluidState : public FluidState<typename GET_PROP_TYPE(TypeTag, PTAG(Sc public: enum { numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)) }; + /*! + * \brief Update of the fluid state + * + * \param Sn The saturation of the nonwetting phase + * \param pressW The pressure of the wetting phase + * \param pressN The pressure of the nonwetting phase + * \param temperature The temperature + */ void update(Scalar Sn, Scalar pressW, Scalar pressN, Scalar temperature) { Sn_ = Sn; @@ -71,6 +79,8 @@ public: /*! * \brief Returns the saturation of a phase. + * + * \param phaseIdx The index of the fluid phase */ Scalar saturation(int phaseIdx) const { @@ -81,70 +91,35 @@ public: }; /*! - * \brief Returns the mass fraction of a component in a phase. - */ - Scalar massFrac(int phaseIdx, int compIdx) const - { - if (compIdx == phaseIdx) - return 1.0; - return 0; - } - - /*! - * \brief Returns the molar fraction of a component in a fluid phase. - */ - Scalar moleFrac(int phaseIdx, int compIdx) const - { - return massFrac(phaseIdx, compIdx); - } - - /*! - * \brief Returns the total concentration of a phase [mol / m^3]. + * \brief Returns the molar density of a phase [mol / m^3]. * - * This is equivalent to the sum of all component concentrations. + * \param phaseIdx The index of the fluid phase */ Scalar phaseConcentration(int phaseIdx) const { return density_[phaseIdx]/FluidSystem::molarMass(phaseIdx); }; - /*! - * \brief Returns the concentration of a component in a phase [mol / m^3]. - */ - Scalar concentration(int phaseIdx, int compIdx) const - { - if (phaseIdx == compIdx) - return phaseConcentration(phaseIdx); - return 0; - }; - /*! * \brief Returns the density of a phase [kg / m^3]. + * + * \param phaseIdx The index of the fluid phase */ Scalar density(int phaseIdx) const { return density_[phaseIdx]; } /*! - * \brief Returns mean molar mass of a phase [kg / mol]. + * \brief Returns molar mass of a phase [kg / mol]. * - * This is equivalent to the sum of all component molar masses - * weighted by their respective mole fraction. + * \param phaseIdx The index of the fluid phase */ Scalar averageMolarMass(int phaseIdx) const { return FluidSystem::molarMass(phaseIdx); }; - /*! - * \brief Returns the partial pressure of a component in the gas phase [Pa]. - */ - Scalar partialPressure(int compIdx) const - { - if (compIdx == wPhaseIdx) - return 0; - return phasePressure_[nPhaseIdx]; - } - /*! * \brief Returns the pressure of a fluid phase [Pa]. + * + * \param phaseIdx The index of the fluid phase */ Scalar phasePressure(int phaseIdx) const { return phasePressure_[phaseIdx]; } diff --git a/dumux/boxmodels/2p/2pfluxvariables.hh b/dumux/boxmodels/2p/2pfluxvariables.hh index cc3edc8d998c8a22abd761ab09478d4d00fbd089..f1a3c27be4465489587cd48551ba58ab35328bb6 100644 --- a/dumux/boxmodels/2p/2pfluxvariables.hh +++ b/dumux/boxmodels/2p/2pfluxvariables.hh @@ -69,6 +69,15 @@ class TwoPFluxVariables typedef Dune::FieldVector<CoordScalar, dimWorld> Vector; public: + /* + * \brief The constructor + * + * \param problem The problem + * \param element The finite element + * \param elemGeom The finite-volume geometry in the box scheme + * \param faceIdx The local index of the SCV (sub-control-volume) face + * \param elemDat The volume variables of the current element + */ TwoPFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &elemGeom, @@ -95,28 +104,37 @@ public: /*! * \brief Return the pressure potential gradient. + * + * \param phaseIdx The index of the fluid phase */ const Vector &potentialGrad(int phaseIdx) const { return potentialGrad_[phaseIdx]; } /*! - * \brief Given the intrinisc permeability times the pressure - * potential gradient and SCV face normal for a phase, - * return the local index of the downstream control volume - * for a given phase. + * \brief Return the local index of the downstream control volume + * for a given phase as a function of the normal flux. + * + * \param normalFlux The normal flux i.e. the given intrinsic permeability + * times the pressure potential gradient and SCV face normal. + * . */ int downstreamIdx(Scalar normalFlux) const { return (normalFlux >= 0)?face().j:face().i; } /*! - * \brief Given the intrinisc permeability times the pressure - * potential gradient and SCV face normal for a phase, - * return the local index of the upstream control volume - * for a given phase. + * \brief Return the local index of the upstream control volume + * for a given phase as a function of the normal flux. + * + * \param normalFlux The normal flux i.e. the given intrinsic permeability + * times the pressure potential gradient and SCV face normal. + * . */ int upstreamIdx(Scalar normalFlux) const { return (normalFlux > 0)?face().i:face().j; } + /*! + * \brief Return the SCV (sub-control-volume) face + */ const SCVFace &face() const { return fvElemGeom_.subContVolFace[scvfIdx_]; } diff --git a/dumux/boxmodels/2p/2pindices.hh b/dumux/boxmodels/2p/2pindices.hh index c2c57337ee662bda2d6b82cb0f4549cc5f31c966..3e8f22c7eec36cec8c6dc12453c301a5a5b01d3d 100644 --- a/dumux/boxmodels/2p/2pindices.hh +++ b/dumux/boxmodels/2p/2pindices.hh @@ -17,7 +17,7 @@ /*! * \file * - * \brief Defines the indices required for the twophase box model. + * \brief Defines the indices required for the two-phase box model. */ #ifndef DUMUX_BOX_2P_INDICES_HH #define DUMUX_BOX_2P_INDICES_HH @@ -47,6 +47,7 @@ struct TwoPCommonIndices * \brief The indices for the \f$p_w-S_n\f$ formulation of the * isothermal two-phase model. * + * \tparam formulation The formulation, either pwSn or pnSw * \tparam PVOffset The first index in a primary variable vector. */ template <int formulation = TwoPCommonIndices::pwSn, int PVOffset = 0> diff --git a/dumux/boxmodels/2p/2plocalresidual.hh b/dumux/boxmodels/2p/2plocalresidual.hh index 3080de8d92d0ff8862f014fb5c5d8ca02973b301..4a0d9b2321d38ae8778d72e72624bc96bca8d7df 100644 --- a/dumux/boxmodels/2p/2plocalresidual.hh +++ b/dumux/boxmodels/2p/2plocalresidual.hh @@ -86,8 +86,12 @@ protected: public: /*! - * \brief Evaluate the amount all conservation quantites + * \brief Evaluate the amount all conservation quantities * (e.g. phase mass) within a finite sub-control volume. + * + * \param result The phase mass within the sub-control volume + * \param scvIdx The SCV (sub-control-volume) index + * \param usePrevSol Evaluate function with solution of current or previous time step */ void computeStorage(PrimaryVariables &result, int scvIdx, bool usePrevSol) const { @@ -112,6 +116,9 @@ public: /*! * \brief Evaluates the mass flux over a face of a sub-control * volume. + * + * \param flux The flux over the SCV (sub-control-volume) face for each phase + * \param faceIdx The index of the SCV face */ void computeFlux(PrimaryVariables &flux, int faceIdx) const { @@ -128,7 +135,10 @@ public: /*! * \brief Evaluates the advective mass flux of all components over - * a face of a subcontrol volume. + * a face of a sub-control volume. + * + * \param flux The advective flux over the sub-control-volume face for each phase + * \param fluxVars The flux variables at the current SCV * * This method is called by compute flux and is mainly there for * derived models to ease adding equations selectively. @@ -167,7 +177,10 @@ public: /*! * \brief Adds the diffusive flux to the flux vector over * the face of a sub-control volume. - + * + * \param flux The advective flux over the sub-control-volume face for each phase + * \param fluxVars The flux variables at the current SCV + * * It doesn't do anything in two-phase model but is used by the * non-isothermal two-phase models to calculate diffusive heat * fluxes @@ -180,6 +193,10 @@ public: /*! * \brief Calculate the source term of the equation + * + * \param q The source/sink in the SCV for each phase + * \param localVertexIdx The index of the SCV + * */ void computeSource(PrimaryVariables &q, int localVertexIdx) { diff --git a/dumux/boxmodels/2p/2pproblem.hh b/dumux/boxmodels/2p/2pproblem.hh index 3207088685d8a920bd7060c821b1cda1ce368129..0a55f2bc5fb36c6eb0e2a86cc0cf80db543e1345 100644 --- a/dumux/boxmodels/2p/2pproblem.hh +++ b/dumux/boxmodels/2p/2pproblem.hh @@ -15,7 +15,7 @@ *****************************************************************************/ /*! * \file - * \brief Base class for all problems which use the box scheme + * \brief Base class for all problems which use the two-phase box model */ #ifndef DUMUX_2P_PROBLEM_HH #define DUMUX_2P_PROBLEM_HH @@ -29,8 +29,6 @@ namespace Dumux /*! * \ingroup TwoPProblems * \brief Base class for all problems which use the two-phase box model - * - * \todo Please doc me more! */ template<class TypeTag> class TwoPProblem : public BoxProblem<TypeTag> @@ -54,6 +52,13 @@ class TwoPProblem : public BoxProblem<TypeTag> typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; public: +/*! + * \brief The constructor + * + * \param timeManager The time manager + * \param gridView The grid view + * \param verbose Turn verbosity on or off + */ TwoPProblem(TimeManager &timeManager, const GridView &gridView, bool verbose = true) @@ -68,6 +73,14 @@ public: gravity_[dim-1] = -9.81; } + /*! + * \brief The constructor + * + * \param timeManager The time manager + * \param gridView The grid view + * \param spatialParameters The spatial parameters object + * \param verbose Turn verbosity on or off + */ TwoPProblem(TimeManager &timeManager, const GridView &gridView, SpatialParameters &spatialParameters, diff --git a/dumux/boxmodels/2p/2pvolumevariables.hh b/dumux/boxmodels/2p/2pvolumevariables.hh index f7a843b89d5832162f490027905dfc7cbb6340c5..ae458554313f3ec94016e24302aa1d70239b94b2 100644 --- a/dumux/boxmodels/2p/2pvolumevariables.hh +++ b/dumux/boxmodels/2p/2pvolumevariables.hh @@ -17,7 +17,8 @@ /*! * \file * - * \brief Quantities required by the twophase box model defined on a vertex. + * \brief Contains the quantities which are are constant within a + * finite volume in the two-phase model. */ #ifndef DUMUX_2P_VOLUME_VARIABLES_HH #define DUMUX_2P_VOLUME_VARIABLES_HH @@ -75,6 +76,13 @@ class TwoPVolumeVariables : public BoxVolumeVariables<TypeTag> public: /*! * \brief Update all quantities for a given control volume. + * + * \param priVars The local primary variable vector + * \param problem The problem object + * \param element The current element + * \param elemGeom The finite-volume geometry in the box scheme + * \param scvIdx The local index of the SCV (sub-control volume) + * \param isOldSol Evaluate function with solution of current or previous time step */ void update(const PrimaryVariables &priVars, const Problem &problem, @@ -149,6 +157,8 @@ public: /*! * \brief Returns the effective saturation of a given phase within * the control volume. + * + * \param phaseIdx The phase index */ Scalar saturation(int phaseIdx) const { return fluidState_.saturation(phaseIdx); } @@ -156,6 +166,8 @@ public: /*! * \brief Returns the mass density of a given phase within the * control volume. + * + * \param phaseIdx The phase index */ Scalar density(int phaseIdx) const { return fluidState_.density(phaseIdx); } @@ -163,6 +175,8 @@ public: /*! * \brief Returns the effective pressure of a given phase within * the control volume. + * + * \param phaseIdx The phase index */ Scalar pressure(int phaseIdx) const { return fluidState_.phasePressure(phaseIdx); } @@ -180,6 +194,8 @@ public: /*! * \brief Returns the effective mobility of a given phase within * the control volume. + * + * \param phaseIdx The phase index */ Scalar mobility(int phaseIdx) const { return mobility_[phaseIdx]; }