diff --git a/dumux/freeflow/stokesnc/stokesncvolumevariables.hh b/dumux/freeflow/stokesnc/stokesncvolumevariables.hh index a99a9cb7fc9b107194783226afb92ec05d90698e..a367c92993d1ace37b7dd5f7c7a6620be0526302 100644 --- a/dumux/freeflow/stokesnc/stokesncvolumevariables.hh +++ b/dumux/freeflow/stokesnc/stokesncvolumevariables.hh @@ -72,7 +72,7 @@ class StokesncVolumeVariables : public StokesVolumeVariables<TypeTag> public: /*! - * \copydoc BoxVolumeVariables::update() + * \copydoc ImplicitVolumeVariables::update() */ void update(const PrimaryVariables &priVars, const Problem &problem, @@ -198,6 +198,8 @@ public: /*! * \brief Returns the binary (mass) diffusion coefficient + * + * \param compIdx The component index */ Scalar diffusionCoeff(int compIdx) const { return diffCoeff_[compIdx]; } diff --git a/dumux/multidomain/2cstokes2p2c/2cstokes2p2clocaloperator.hh b/dumux/multidomain/2cstokes2p2c/2cstokes2p2clocaloperator.hh index 147239ff067cedc7088506b96859732ba18cc425..4a27349c026992069a31a1aaf8d903d196f68256 100644 --- a/dumux/multidomain/2cstokes2p2c/2cstokes2p2clocaloperator.hh +++ b/dumux/multidomain/2cstokes2p2c/2cstokes2p2clocaloperator.hh @@ -404,7 +404,7 @@ class TwoCStokesTwoPTwoCLocalOperator : const Scalar massTransferCoeff = massTransferCoefficient(cParams, sdElement1, sdElement2, globalPos1, vertInElem1, vertInElem2); if (massTransferCoeff > 1.0 || massTransferCoeff < 0.0) - std::cout << "MTC out of bounds! >>> " << massTransferCoeff << std::endl; + std::cout << "MTC out of bounds, should be in between 0.0 and 1.0! >>> " << massTransferCoeff << std::endl; if (globalProblem_.sdProblem1().isCornerPoint(globalPos1)) diff --git a/dumux/multidomain/common/multidomainassembler.hh b/dumux/multidomain/common/multidomainassembler.hh index c9adbb3386fe8ef396d309d4cf3acd507a77cafc..2682ae3a945ae9aca3139f6803d3913add7ae922 100644 --- a/dumux/multidomain/common/multidomainassembler.hh +++ b/dumux/multidomain/common/multidomainassembler.hh @@ -104,7 +104,7 @@ public: ~MultiDomainAssembler() { } - //! \copydoc Dumux::ImplicitModel::init() + //! \copydoc ImplicitAssembler::init() void init(Problem& problem) { globalProblem_ = &problem; @@ -168,7 +168,7 @@ public: residual_.resize(matrix_->N()); } - //! \copydoc Dumux::ImplicitModel::assemble() + //! \copydoc ImplicitAssembler::assemble() void assemble() { // std::cerr << __FILE__ << ":" << __LINE__ << "\n"; @@ -186,11 +186,11 @@ public: // printvector(std::cout, residual_, "residual", "row", 200, 1, 3); } - //! \copydoc Dumux::ImplicitModel::reassembleAll() + //! \copydoc ImplicitAssembler::reassembleAll() void reassembleAll() { } - //! \copydoc Dumux::ImplicitModel::matrix() + //! \copydoc ImplicitAssembler::matrix() const JacobianMatrix &matrix() const { return *matrix_; } @@ -203,7 +203,7 @@ public: JacobianMatrix &matrix() { return *matrix_; } - //! \copydoc Dumux::ImplicitModel::residual() + //! \copydoc ImplicitAssembler::residual() const SolutionVector &residual() const { return residual_; } SolutionVector &residual() diff --git a/dumux/multidomain/common/multidomainmodel.hh b/dumux/multidomain/common/multidomainmodel.hh index bd334a7530f08d8243236cb84ba0f4d1b26502d2..da236f8b502fda124d715bfe2ad1e6a9b4810798 100644 --- a/dumux/multidomain/common/multidomainmodel.hh +++ b/dumux/multidomain/common/multidomainmodel.hh @@ -321,7 +321,11 @@ public: SplitAndMerge::mergeSolVectors(sdModel1().curSol(), sdModel2().curSol(), uCur_); }; - //! \copydoc Dumux::ImplicitModel::updateFailedTry() + /*! + * \brief Called by the update() method if a try was + * unsuccessful. This is primary a hook which the + * actual model can overload. + */ void updateFailedTry() { sdModel1().updateFailedTry(); diff --git a/dumux/multidomain/common/multidomainproblem.hh b/dumux/multidomain/common/multidomainproblem.hh index 2e4d5ec9724886f4a9c5a3e3e3a3dc2d99402f33..18fce3d5f05f35c3a817b860217284b35364076c 100644 --- a/dumux/multidomain/common/multidomainproblem.hh +++ b/dumux/multidomain/common/multidomainproblem.hh @@ -165,10 +165,15 @@ public: */ // \{ - //! \copydoc Dumux::ImplicitProblem::simulate() + /*! + * \brief Set the initial time step and the time where the simulation ends + * and starts simulation + * + * \param dtInitial Initial time step + * \param tEnd Time, when simulation ends + */ bool simulate(Scalar dtInitial, Scalar tEnd) { - // set the initial time step and the time where the simulation ends timeManager_.setEndTime(tEnd); timeManager_.setTimeStepSize(dtInitial); timeManager_.runSimulation(asImp_()); diff --git a/test/freeflow/stokes2c/stokes2ctestproblem.hh b/test/freeflow/stokes2c/stokes2ctestproblem.hh index 9516bad33f25b7b6e8b6cbb74b1c922a0af489d6..b5e13a51549073ba330b47fea9ba41163e0aa1b9 100644 --- a/test/freeflow/stokes2c/stokes2ctestproblem.hh +++ b/test/freeflow/stokes2c/stokes2ctestproblem.hh @@ -83,7 +83,7 @@ SET_BOOL_PROP(Stokes2cTestProblem, ProblemEnableGravity, false); * of the momentum balance equations in case of Dirichlet bcs for the momentum balance. * In the middle of the lower boundary one vertex receives Dirichlet bcs, to set the pressure level. * - * This problem uses the \ref BoxStokesncModel. + * This problem uses the \ref StokesncModel. * To run the simulation execute the following line in a shell: * <tt>./test_stokes2c -parameterFile ./test_stokes2c.input</tt> */ diff --git a/test/freeflow/stokes2cni/stokes2cnitestproblem.hh b/test/freeflow/stokes2cni/stokes2cnitestproblem.hh index 9dabb7cd9e9702ad295bca232425d657fc5c2934..559af6d3a7620f24a68d92754699835bed2c963a 100644 --- a/test/freeflow/stokes2cni/stokes2cnitestproblem.hh +++ b/test/freeflow/stokes2cni/stokes2cnitestproblem.hh @@ -86,7 +86,7 @@ SET_BOOL_PROP(Stokes2cniTestProblem, ProblemEnableGravity, true); * On the upper boundary a Dirichlet condition is set for the mass balance to fix the pressure. * Gravity is on in this example. * - * This problem uses the \ref BoxStokesncniModel. + * This problem uses the \ref StokesncniModel. * To run the simulation execute the following line in shell: * <tt>./test_stokes2cni -parameterFile ./test_stokes2cni.input</tt> */ diff --git a/test/multidomain/2cnistokes2p2cni/2cnistokes2p2cniproblem.hh b/test/multidomain/2cnistokes2p2cni/2cnistokes2p2cniproblem.hh index ae8dbe65745ecd4a5294531123541a620d56266c..932b65263989ff8baec56df595dfa52a3238ae93 100644 --- a/test/multidomain/2cnistokes2p2cni/2cnistokes2p2cniproblem.hh +++ b/test/multidomain/2cnistokes2p2cni/2cnistokes2p2cniproblem.hh @@ -16,11 +16,21 @@ * You should have received a copy of the GNU General Public License * * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ -/** - * @file - * \ingroup docme - * @brief docme +/*! + * \file + * \ingroup StokesniProblems + * \ingroup 2p2cniProblems + * \brief The problem class for the coupling of a non-isothermal two-component Stokes + * and a non-isothermal two-phase two-component Darcy model. + * + * The problem class for the coupling of a non-isothermal two-component Stokes (stokes2cn) + * and a non-isothermal two-phase two-component Darcy model (2p2cni). + * It uses the 2p2cniCoupling model and the Stokes2cnicoupling model and provides + * the problem specifications for common parameters of the two submodels. + * The initial and boundary conditions of the submodels are specified in the two subproblems, + * 2p2cnisubproblem.hh and stokes2cnisubproblem.hh, which are accessible via the coupled problem. */ + #ifndef DUMUX_2CNISTOKES2P2CNIPROBLEM_HH #define DUMUX_2CNISTOKES2P2CNIPROBLEM_HH @@ -133,15 +143,17 @@ SET_BOOL_PROP(TwoCNIStokesTwoPTwoCNIProblem, NewtonWriteConvergence, false); } /*! - * \brief The problem class for the coupling of a non-isothermal two-component Stokes (stokes2cni) - * and a non-isothermal two-phase two-component Darcy model (2p2cni). + * \ingroup StokesniProblems + * \ingroup 2p2cniProblems + * \brief The problem class for the coupling of a non-isothermal two-component Stokes + * and a non-isothermal two-phase two-component Darcy model. * - * The problem class for the coupling of a non-isothermal two-component Stokes (stokes2cni) - * and a non-isothermal two-phase two-component Darcy model (2p2cni). - * It uses the 2p2cniCoupling model and the Stokes2cnicoupling model and provides - * the problem specifications for common parameters of the two submodels. - * The initial and boundary conditions of the submodels are specified in the two subproblems, - * 2p2cnisubproblem.hh and stokes2cnisubproblem.hh, which are accessible via the coupled problem. + * The problem class for the coupling of a non-isothermal two-component Stokes (stokes2cn) + * and a non-isothermal two-phase two-component Darcy model (2p2cni). + * It uses the 2p2cniCoupling model and the Stokes2cnicoupling model and provides + * the problem specifications for common parameters of the two submodels. + * The initial and boundary conditions of the submodels are specified in the two subproblems, + * 2p2cnisubproblem.hh and stokes2cnisubproblem.hh, which are accessible via the coupled problem. */ template <class TypeTag = TTAG(TwoCNIStokesTwoPTwoCNIProblem) > class TwoCNIStokesTwoPTwoCNIProblem : public MultiDomainProblem<TypeTag> @@ -235,14 +247,13 @@ class TwoCNIStokesTwoPTwoCNIProblem : public MultiDomainProblem<TypeTag> typedef typename MDGrid::template Codim<0>::LeafIterator ElementIterator; typedef typename MDGrid::LeafSubDomainInterfaceIterator SDInterfaceIterator; +public: /*! - * \brief docme - * - * \param hostGrid docme - * \param timeManager The TimeManager which is used by the simulation + * \brief The problem for the coupling of Stokes and Darcy flow * + * \param mdGrid The multidomain grid + * \param timeManager The time manager */ -public: TwoCNIStokesTwoPTwoCNIProblem(MDGrid &mdGrid, TimeManager &timeManager) : ParentType(mdGrid, timeManager) @@ -286,12 +297,21 @@ public: this->timeManager().startNextEpisode(episodeLength_); } + /*! + * \brief The destructor + */ ~TwoCNIStokesTwoPTwoCNIProblem() { fluxFile_.close(); }; - //! \copydoc Dumux::CoupledProblem::init() + /*! + * \brief Called by the Dumux::TimeManager in order to + * initialize the problem. + * + * If you overload this method don't forget to call + * ParentType::init() + */ void init() { ParentType::init(); @@ -312,7 +332,10 @@ public: } /*! - * \brief docme + * \brief Initialization of the grids + * + * This function splits the multidomain grid in the two + * individual subdomain grids and takes care of parallelization. */ void initializeGrid() { @@ -345,7 +368,10 @@ public: gridinfo(this->sdGrid2()); } - //! \copydoc Dumux::CoupledProblem::postTimeStep() + /*! + * \brief Called by the time manager after the time integration to + * do some post processing on the solution. + */ void postTimeStep() { // call the postTimeStep function of the subproblems @@ -361,7 +387,11 @@ public: } } - //! \copydoc Dumux::CoupledProblem::episodeEnd() + /*! + * \brief Called when the end of an simulation episode is reached. + * + * Typically a new episode should be started in this method. + */ void episodeEnd() { this->timeManager().startNextEpisode(episodeLength_); @@ -372,9 +402,12 @@ public: } } - /* - * \brief Calculates fluxes and coupling terms at the interface for the Stokes model. - * Flux output files are created and the summarized flux is written to a file. + /*! + * \brief Calculates fluxes and coupling terms at the interface + * for the Stokes model. + * + * Flux output files are created and the summarized flux is + * written to a file. */ void calculateFirstInterfaceFluxes() { @@ -506,9 +539,12 @@ public: << sumEnergyFluxes << "; "; } - /* - * \brief Calculates fluxes and coupling terms at the interface for the Darcy model. - * Flux output files are created and the summarized flux is written to a file. + /*! + * \brief Calculates fluxes and coupling terms at the interface + * for the Darcy model. + * + * Flux output files are created and the summarized flux is written + * to a file. */ void calculateSecondInterfaceFluxes() { @@ -634,6 +670,15 @@ public: } } + /*! + * \brief Returns the advective vapor fluxes + * + * The phaseIdx and transportCompIdx1 are predefined + * + * \param elemVolVars1 All volume variables for the element + * \param boundaryVars1 Flux variables (\todo violates naming convention) + * \param vertInElem1 Vertex index for the inside element + */ Scalar computeAdvectiveVaporFluxes1(const ElementVolumeVariables1& elemVolVars1, const BoundaryVariables1& boundaryVars1, int vertInElem1) @@ -644,6 +689,15 @@ public: return advFlux; } + /*! + * \brief Returns the diffusive vapor fluxes + * + * The transportCompIdx1 is predefined + * + * \param elemVolVars1 All volume variables for the element + * \param boundaryVars1 Flux variables (\todo violates naming convention) + * \param vertInElem1 Vertex index for the inside elements + */ Scalar computeDiffusiveVaporFluxes1(const ElementVolumeVariables1& elemVolVars1, const BoundaryVariables1& boundaryVars1, int vertInElem1) @@ -656,7 +710,14 @@ public: return diffFlux; } - //! \copydoc Dumux::CoupledProblem::shouldWriteRestartFile() + /*! + * \brief Returns true if a restart file should be written to + * disk. + * + * The default behavior is to write one restart file every 5 time + * steps. This file is intended to be overwritten by the + * implementation. + */ bool shouldWriteRestartFile() const { if ((this->timeManager().timeStepIndex() > 0 && @@ -668,7 +729,14 @@ public: } - //! \copydoc Dumux::CoupledProblem::shouldWriteOutput() + /*! + * \brief Returns true if the current solution should be written to + * disk (i.e. as a VTK file) + * + * The default behavior is to write out the solution for + * every time step. This function is intended to be overwritten by the + * implementation. + */ bool shouldWriteOutput() const { if (this->timeManager().timeStepIndex() % freqOutput_ == 0 @@ -679,7 +747,8 @@ public: /*! * \brief Returns true if a file with the fluxes across the - * free-flow -- porous-medium interface should be written. + * free-flow -- porous-medium interface should be + * written to disk. */ bool shouldWriteFluxFile() const { @@ -704,11 +773,17 @@ public: } + /*! + * \brief Returns a pointer to the Stokes problem + */ Stokes2cniSubProblem& stokes2cniProblem() { return this->sdProblem1(); } const Stokes2cniSubProblem& stokes2cniProblem() const { return this->sdProblem1(); } + /*! + * \brief Returns a pointer to the Darcy problem + */ TwoPTwoCNISubProblem& twoPtwoCNIProblem() { return this->sdProblem2(); } const TwoPTwoCNISubProblem& twoPtwoCNIProblem() const @@ -755,4 +830,4 @@ private: } //end namespace -#endif +#endif // DUMUX_2CNISTOKES2P2CNIPROBLEM_HH diff --git a/test/multidomain/2cnistokes2p2cni/2cnistokes2p2cnispatialparams.hh b/test/multidomain/2cnistokes2p2cni/2cnistokes2p2cnispatialparams.hh index 3c1973350beec6a67cae703fbc11da6acf2ad9f6..0d9367fe19668a98efd0fffd17952164731ca626 100644 --- a/test/multidomain/2cnistokes2p2cni/2cnistokes2p2cnispatialparams.hh +++ b/test/multidomain/2cnistokes2p2cni/2cnistokes2p2cnispatialparams.hh @@ -16,6 +16,14 @@ * You should have received a copy of the GNU General Public License * * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ +/*! + * \file + * + * \brief Spatial parameters for the + * coupling of an non-isothermal two-component Stokes + * and an non-isothermal two-phase two-component Darcy model. + */ + #ifndef DUMUX_TWOCNISTOKES2P2CNISPATIALPARAMS_HH #define DUMUX_TWOCNISTOKES2P2CNISPATIALPARAMS_HH @@ -59,7 +67,12 @@ public: /*! - * \brief docme + * \ingroup TwoPTwoCNiModel + * \ingroup StokesniModel + * \ingroup ImplicitTestProblems + * \brief Definition of the spatial parameters for + * the coupling of an non-isothermal two-component Stokes + * and an non-isothermal two-phase two-component Darcy model. */ template<class TypeTag> class TwoCNIStokesTwoPTwoCNISpatialParams : public ImplicitSpatialParams<TypeTag> @@ -96,10 +109,11 @@ public: typedef std::vector<MaterialLawParams> MaterialLawParamsVector; /*! - * \brief docme - * - * \param gridView The GridView which is used by the problem. + * \brief Spatial parameters for the + * coupling of an isothermal two-component Stokes + * and an isothermal two-phase two-component Darcy model. * + * \param gridView The GridView which is used by the problem */ TwoCNIStokesTwoPTwoCNISpatialParams(const GridView& gridView) : ParentType(gridView), @@ -156,17 +170,18 @@ public: } } + /*! + * \brief The destructor + */ ~TwoCNIStokesTwoPTwoCNISpatialParams() { } /*! - * \brief Apply the intrinsic permeability tensor to a pressure - * potential gradient. + * \brief Returns the intrinsic permeability tensor \f$[m^2]\f$ * - * \param element The current finite element - * \param fvGeometry The current finite volume geometry of the element - * \param scvIdx The index sub-control volume face where the - * intrinsic velocity ought to be calculated. + * \param element The finite element + * \param fvGeometry The finite volume geometry of the element + * \param scvIdx The local index of the sub-control volume */ const Scalar intrinsicPermeability(const Element &element, const FVElementGeometry &fvGeometry, @@ -186,7 +201,13 @@ public: return mediumPermeability_; } - //! \copydoc Dumux::ImplicitSpatialParamsOneP::porosity() + /*! + * \brief Returns the porosity \f$[-]\f$ + * + * \param element The finite element + * \param fvGeometry The finite volume geometry of the element + * \param scvIdx The local index of the sub-control volume + */ Scalar porosity(const Element &element, const FVElementGeometry &fvGeometry, const int scvIdx) const @@ -204,7 +225,13 @@ public: } - //! \copydoc Dumux::ImplicitSpatialParams::materialLawParams() + /*! + * \brief Returns the parameter object for the material law + * + * \param element The finite element + * \param fvGeometry The finite volume geometry of the element + * \param scvIdx The local index of the sub-control volume + */ const MaterialLawParams& materialLawParams(const Element &element, const FVElementGeometry &fvGeometry, const int scvIdx) const @@ -224,14 +251,15 @@ public: /*! - * \brief Returns the heat capacity \f$[J/m^3 K]\f$ of the rock matrix. + * \brief Returns the effective heat capacity \f$[J/m^3 K]\f$ * - * This is only required for non-isothermal models. + * This is only required for non-isothermal models. This function does not + * return the specific heat capacity, but an effective heat capacity, which is + * \f$c_\textrm{p,eff,s} = c_\textrm{p,s} \varrho_\textrm{s} \left(1 - \phi\right)\f$ * * \param element The finite element - * \param fvGeometry The finite volume geometry - * \param scvIdx The local index of the sub-control volume where - * the heat capacity needs to be defined + * \param fvGeometry The finite volume geometry of the element + * \param scvIdx The local index of the sub-control volume */ Scalar heatCapacity(const Element &element, const FVElementGeometry &fvGeometry, @@ -245,12 +273,13 @@ public: } /*! - * \brief docme + * \brief Returns the thermal conductivity \f$[W/m^2]\f$ of the solid * - * \param element The finite element - * \param fvGeometry The finite-volume geometry - * \param scvIdx The local subcontrolvolume index + * This is only required for non-isothermal models. * + * \param element The finite element + * \param fvGeometry The finite volume geometry of the element + * \param scvIdx The local index of the sub-control volume */ Scalar thermalConductivitySolid(const Element &element, const FVElementGeometry &fvGeometry, @@ -269,26 +298,27 @@ public: } /*! - * \brief docme + * \brief Returns the index of the used soil type * - * \param pos The position of the boundary face's integration point in global coordinates + * The soil, can be chosen as runtime parameter: + * 1: coarse, + * 2: medium, + * 3: fine, + * 4: LeverettJ (x < xMaterialInterface) * + * \param pos The global position */ const unsigned checkSoilType(const GlobalPosition &pos) const { - -// one soil, which can be chosen as runtime parameter: -// 1: coarse -// 2: medium -// 3: fine -// 4: LeverettJ (x < xMaterialInterface) return soilType_; } - // this is called from the coupled problem - // and creates a gnuplot output of the Pc-Sw curve /*! - * \brief docme + * \brief This is called from the coupled problem and creates + * a gnuplot output of the Pc-Sw curve + * + * If this function should be used, uncomment the lines between + * the curly brackets. */ void plotMaterialLaw() { @@ -367,5 +397,5 @@ private: }; } // end namespace -#endif +#endif // DUMUX_TWOCNISTOKES2P2CNISPATIALPARAMS_HH diff --git a/test/multidomain/2cnistokes2p2cni/2p2cnisubproblem.hh b/test/multidomain/2cnistokes2p2cni/2p2cnisubproblem.hh index 772e1988c893fa308215273cb9009d661eeb676a..39fae90660dfd3ec0805e859d90b7755f9e7fd4e 100644 --- a/test/multidomain/2cnistokes2p2cni/2p2cnisubproblem.hh +++ b/test/multidomain/2cnistokes2p2cni/2p2cnisubproblem.hh @@ -18,8 +18,9 @@ *****************************************************************************/ /*! * \file - * - * \brief Porous-medium subproblem with coupling at the top boundary. + * \ingroup 2p2cniProblems + * \brief Non-isothermal two-phase two-component porous-medium subproblem + * with coupling at the top boundary. */ #ifndef DUMUX_2P2CNISUB_PROBLEM_HH #define DUMUX_2P2CNISUB_PROBLEM_HH @@ -122,7 +123,18 @@ SET_BOOL_PROP(TwoPTwoCNISubProblem, VtkAddVelocity, true); SET_BOOL_PROP(TwoPTwoCNISubProblem, ProblemEnableGravity, true); } - +/*! + * \ingroup 2p2cniProblems + * \brief Non-isothermal two-phase two-component porous-medium subproblem + * with coupling at the top boundary. + * + * The Darcy subdomain is sized 0.25m times 0.25m. All BCs for the balance + * equations are set to Neumann no-flow, except for the top, where couplingInflow + * conditions are applied. + * + * This sub problem uses the \ref TwoPTwoCNIModel. It is part of the 2p2cni model and + * is combined with the stokes2cnisubproblem for the free flow domain. + */ template <class TypeTag = TTAG(TwoPTwoCNISubProblem) > class TwoPTwoCNISubProblem : public ImplicitPorousMediaProblem<TypeTag> { @@ -192,11 +204,10 @@ class TwoPTwoCNISubProblem : public ImplicitPorousMediaProblem<TypeTag> typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; /*! - * \brief docme + * \brief The sub-problem for the porous-medium subdomain * * \param timeManager The TimeManager which is used by the simulation * \param gridView The simulation's idea about physical space - * */ public: TwoPTwoCNISubProblem(TimeManager &timeManager, const GridView &gridView) @@ -252,11 +263,21 @@ public: */ // \{ - //! \copydoc Dumux::ImplicitProblem::name() + /*! + * \brief Returns the problem name + * + * This is used as a prefix for files generated by the simulation. + */ const std::string &name() const { return GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Vtk, NamePM); } - //! \copydoc Dumux::ImplicitProblem::init() + /*! + * \brief Called by the Dumux::TimeManager in order to + * initialize the problem. + * + * If you overload this method don't forget to call + * ParentType::init() + */ void init() { // set the initial condition of the model @@ -275,7 +296,13 @@ public: */ // \{ - //! \copydoc Dumux::ImplicitProblem::boundaryTypes() + /*! + * \brief Specifies which kind of boundary condition should be + * used for which equation on a given vertex + * + * \param values Stores the value of the boundary type + * \param vertex The vertex + */ void boundaryTypes(BoundaryTypes &values, const Vertex &vertex) const { const GlobalPosition globalPos = vertex.geometry().center(); @@ -309,7 +336,15 @@ public: } } - //! \copydoc Dumux::ImplicitProblem::dirichlet() + /*! + * \brief Evaluate the boundary conditions for a dirichlet + * control volume. + * + * \param values The Dirichlet values for the primary variables + * \param vertex The vertex representing the "half volume on the boundary" + * + * For this method, the \a values parameter stores primary variables. + */ void dirichlet(PrimaryVariables &values, const Vertex &vertex) const { const GlobalPosition globalPos = vertex.geometry().center(); @@ -317,7 +352,21 @@ public: initial_(values, globalPos); } - //! \copydoc Dumux::ImplicitProblem::neumann() + /*! + * \brief Evaluate the boundary conditions for a Neumann + * boundary segment. + * + * \param values The Neumann values for the conservation equations in units of + * \f$ [ \textnormal{unit of conserved quantity} / (m^{\textrm{dim}-1} \cdot s )] \f$ + * \param element The finite element + * \param fvGeometry The finite-volume geometry + * \param is The intersection between element and boundary + * \param scvIdx The local subcontrolvolume index + * \param boundaryFaceIdx The index of the boundary face + * + * For this method, the \a values parameter stores the mass flux + * in normal direction of each phase. Negative values mean influx. + */ void neumann(PrimaryVariables &values, const Element &element, const FVElementGeometry &fvGeometry, @@ -334,12 +383,31 @@ public: * \name Volume terms */ // \{ - //! \copydoc Dumux::ImplicitProblem::solDependentSource() + + /*! + * \brief Evaluate the source term for all phases within a given + * sub-control-volume. + * + * This is the method for the case where the source term is + * potentially solution dependent and requires some quantities that + * are specific to the fully-implicit method. + * + * \param values The source and sink values for the conservation equations in units of + * \f$ [ \textnormal{unit of conserved quantity} / (m^\textrm{dim} \cdot s )] \f$ + * \param element The finite element + * \param fvGeometry The finite-volume geometry + * \param scvIdx The local subcontrolvolume index + * \param elemVolVars All volume variables for the element + * + * For this method, the \a values parameter stores the rate mass + * generated or annihilate per volume unit. Positive values mean + * that mass is created, negative ones mean that it vanishes. + */ void solDependentSource(PrimaryVariables &values, - const Element &element, - const FVElementGeometry &fvGeometry, - const int scvIdx, - const ElementVolumeVariables &elemVolVars) const + const Element &element, + const FVElementGeometry &fvGeometry, + const int scvIdx, + const ElementVolumeVariables &elemVolVars) const { values = 0; // const Scalar time = this->timeManager().time(); @@ -368,7 +436,17 @@ public: } - //! \copydoc Dumux::ImplicitProblem::initial() + /*! + * \brief Evaluate the initial value for a control volume. + * + * \param values The initial values for the primary variables + * \param element The finite element + * \param fvGeometry The finite-volume geometry + * \param scvIdx The local subcontrolvolume index + * + * For this method, the \a values parameter stores primary + * variables. + */ void initial(PrimaryVariables &values, const Element &element, const FVElementGeometry &fvGeometry, @@ -441,7 +519,10 @@ public: // return source; // } - //! \copydoc Dumux::ImplicitProblem::postTimeStep() + /*! + * \brief Called by the time manager after the time integration to + * do some post processing on the solution. + */ void postTimeStep() { // Calculate masses @@ -485,10 +566,9 @@ public: } /*! - * \brief Determine if we are on a corner of the grid + * \brief Determines if globalPos is a corner of the grid * * \param globalPos The global position - * */ bool isCornerPoint(const GlobalPosition &globalPos) { @@ -498,13 +578,12 @@ public: (onRightBoundary_(globalPos) && onUpperBoundary_(globalPos))); } - // required in case of mortar coupling - // otherwise it should return false /*! - * \brief docme + * \brief Returns whether the position is an interface corner point * - * \param global Pos The global position + * This function is required in case of mortar coupling otherwise it should return false * + * \param globalPos The global position */ bool isInterfaceCornerPoint(const GlobalPosition &globalPos) const { return false; } @@ -512,9 +591,10 @@ public: // \} private: - // internal method for the initial condition (reused for the - // dirichlet conditions!) - + /*! + * \brief Internal method for the initial condition + * (reused for the dirichlet conditions!) + */ void initial_(PrimaryVariables &values, const GlobalPosition &globalPos) const { diff --git a/test/multidomain/2cnistokes2p2cni/stokes2cnisubproblem.hh b/test/multidomain/2cnistokes2p2cni/stokes2cnisubproblem.hh index 3602c2837ed023ea2750f8e8b3fe698fae448bfb..eefdf7ba7712da1f6109398df4302159205465e3 100644 --- a/test/multidomain/2cnistokes2p2cni/stokes2cnisubproblem.hh +++ b/test/multidomain/2cnistokes2p2cni/stokes2cnisubproblem.hh @@ -17,10 +17,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ /** - * @file + * \file * \ingroup Stokes2cniProblems - * @brief Definition of a non-isothermal compositional Stokes problem - * @author Klaus Mosthaf + * \brief Non-isothermal two-component stokes subproblem with air flowing + * from the left to the right and coupling at the bottom. */ #ifndef DUMUX_STOKES2CNI_SUBPROBLEM_HH #define DUMUX_STOKES2CNI_SUBPROBLEM_HH @@ -105,19 +105,21 @@ SET_BOOL_PROP(Stokes2cniSubProblem, EnableNavierStokes, false); } /*! - * \ingroup Stokes2cniBoxProblems - * \brief Stokes2cni problem with air flowing - * from the left to the right. + * \ingroup BoxStokesncniModel + * \ingroup ImplicitTestProblems + * \brief Non-isothermal two-component stokes subproblem with air flowing + * from the left to the right and coupling at the bottom. * - * The stokes subdomain is sized 1m times 1m. The boundary conditions for the momentum balances - * are all set to Dirichlet. The mass balance receives - * outflow bcs, which are replaced in the localresidual by the sum + * The Stokes subdomain is sized 0.25m times 0.25m. The boundary conditions + * for the momentum balances are all set to Dirichlet, except on the right + * boundary, where outflow conditions are set. The mass balance receives + * outflow BCs, which are replaced in the localresidual by the sum * of the two momentum balances. In the middle of the right boundary, - * one vertex receives Dirichlet bcs, to set the pressure level. - * - * This sub problem uses the \ref Stokes2cniModel. It is part of the 2cnistokes2p2cni model and - * is combined with the 2p2cnisubproblem for the Darcy domain. + * one vertex receives Dirichlet BCs, to set the pressure level. * + * This sub problem uses the \ref StokesncniModel. It is part of the + * 2cnistokes2p2cni model and is combined with the 2p2cnisubproblem for + * the Darcy domain. */ template <class TypeTag> class Stokes2cniSubProblem : public StokesProblem<TypeTag> @@ -177,7 +179,10 @@ class Stokes2cniSubProblem : public StokesProblem<TypeTag> typedef Dune::FieldVector<CoordScalar, dim> GlobalPosition; /*! - * \brief docme + * \brief The sub-problem for the Stokes subdomain + * + * \param timeManager The TimeManager which is used by the simulation + * \param gridView The simulation's idea about physical space */ public: Stokes2cniSubProblem(TimeManager &timeManager, const GridView &gridView) @@ -223,7 +228,11 @@ public: */ // \{ - //! \copydoc Dumux::ImplicitProblem::name() + /*! + * \brief Returns the problem name + * + * This is used as a prefix for files generated by the simulation. + */ const std::string &name() const { return GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Vtk, NameFF); } @@ -234,7 +243,13 @@ public: */ // \{ - //! \copydoc Dumux::ImplicitProblem::boundaryTypes() + /*! + * \brief Specifies which kind of boundary condition should be + * used for which equation on a given vertex + * + * \param values Stores the value of the boundary type + * \param vertex The vertex + */ void boundaryTypes(BoundaryTypes &values, const Vertex &vertex) const { const GlobalPosition &globalPos = vertex.geometry().center(); @@ -299,7 +314,13 @@ public: } } - //! \copydoc Dumux::ImplicitProblem::dirichlet() + /*! + * \brief Evaluates the boundary conditions for a Dirichlet vertex + * + * \param values Stores the Dirichlet values for the conservation equations in + * \f$ [ \textnormal{unit of primary variable} ] \f$ + * \param vertex The vertex + */ void dirichlet(PrimaryVariables &values, const Vertex &vertex) const { const GlobalPosition globalPos = vertex.geometry().center(); @@ -321,7 +342,19 @@ public: values[temperatureIdx] = refTemperature(); } - //! \copydoc Dumux::ImplicitProblem::neumann() + /*! + * \brief Evaluates the boundary conditions for a Neumann intersection + * + * \param values Stores the Neumann values for the conservation equations in + * \f$ [ \textnormal{unit of conserved quantity} / (m^(dim-1) \cdot s )] \f$ + * \param element The finite element + * \param fvGeometry The finite volume geometry of the element + * \param is The intersection between element and boundary + * \param scvIdx The local index of the sub-control volume + * \param boundaryFaceIdx The index of the boundary face + * + * Negative values indicate an inflow. + */ void neumann(PrimaryVariables &values, const Element &element, const FVElementGeometry &fvGeometry, @@ -379,14 +412,11 @@ public: } /*! - * \brief Evaluate the intrinsic permeability - * at the corner of a given element + * \brief Returns the intrinsic permeability tensor \f$[m^2]\f$ * * \param element The finite element - * \param fvGeometry The finite-volume geometry - * \param scvIdx The local subcontrolvolume index - * - * \return permeability in x-direction + * \param fvGeometry The finite volume geometry of the element + * \param scvIdx The local index of the sub-control volume */ Scalar permeability(const Element &element, const FVElementGeometry &fvGeometry, @@ -399,7 +429,20 @@ public: // \} - //! \copydoc Dumux::ImplicitProblem::source() + /*! + * \brief Evaluate the source term for all phases within a given + * sub-control-volume. + * + * \param values The source and sink values for the conservation equations in units of + * \f$ [ \textnormal{unit of conserved quantity} / (m^\textrm{dim} \cdot s )] \f$ + * \param element The finite element + * \param fvGeometry The finite-volume geometry + * \param scvIdx The local subcontrolvolume index + * + * For this method, the \a values parameter stores the rate mass + * generated or annihilate per volume unit. Positive values mean + * that mass is created, negative ones mean that it vanishes. + */ void source(PrimaryVariables &values, const Element &element, const FVElementGeometry &fvGeometry, @@ -410,7 +453,17 @@ public: values = Scalar(0); } - //! \copydoc Dumux::ImplicitProblem::initial() + /*! + * \brief Evaluate the initial value for a control volume. + * + * \param values The initial values for the primary variables + * \param element The finite element + * \param fvGeometry The finite-volume geometry + * \param scvIdx The local subcontrolvolume index + * + * For this method, the \a values parameter stores primary + * variables. + */ void initial(PrimaryVariables &values, const Element &element, const FVElementGeometry &fvGeometry, @@ -424,10 +477,9 @@ public: // \} /*! - * \brief Determine if we are on a corner of the grid - * - * \param global Pos The global position + * \brief Determines if globalPos is a corner of the grid * + * \param globalPos The global position */ bool isCornerPoint(const GlobalPosition &globalPos) { @@ -440,13 +492,11 @@ public: return false; } - // required in case of mortar coupling - // otherwise it should return false /*! - * \brief docme - * - * \param global Pos The global position + * \brief Auxiliary function used for the mortar coupling, if mortar coupling, + * this should return true * + * \param globalPos The global position */ bool isInterfaceCornerPoint(const GlobalPosition &globalPos) const { return false; } @@ -459,20 +509,23 @@ public: const SpatialParams &spatialParams() const { return spatialParams_; } + //! \brief Returns the reference pressure. + const Scalar refPressure() const + { return refPressure_ + diurnalVariation_(sinusPVar_); } + + //! \brief Returns the reference temperature. const Scalar refTemperature() const { return refTemperature_+ diurnalVariation_(sinusTVar_); } + //! \brief Returns the reference mass fraction. const Scalar refMassfrac() const { return refMassfrac_ + diurnalVariation_(sinusXVar_); } - const Scalar refPressure() const - { return refPressure_ + diurnalVariation_(sinusPVar_); } - private: - // internal method for the initial condition (reused for the - // dirichlet conditions!) - - + /*! + * \brief Internal method for the initial condition + * (reused for the dirichlet conditions!) + */ void initial_(PrimaryVariables &values, const GlobalPosition &globalPos) const { @@ -491,7 +544,7 @@ private: values[temperatureIdx] = refTemperature(); } - + //! \brief set the profile of the inflow velocity (horizontal direction) const Scalar xVelocity_(const GlobalPosition &globalPos) const { const Scalar vmax = vxMax_ + hourlyVariation_(sinusVelVar_); @@ -507,7 +560,7 @@ private: // return 0.1*vmax*log((relativeHeight+1e-3)/1e-3) + bjSlipVel_; } - + //! \brief updates the fluid state to obtain required quantities for IC/BC void updateFluidStateForBC_(FluidState& fluidState) const { fluidState.setTemperature(refTemperature()); @@ -589,4 +642,4 @@ private: }; } //end namespace -#endif +#endif // DUMUX_STOKES2CNI_SUBPROBLEM_HH diff --git a/test/multidomain/2cnistokes2p2cni/test_2cnistokes2p2cni.cc b/test/multidomain/2cnistokes2p2cni/test_2cnistokes2p2cni.cc index 5230301847ca3bdbb119e18234d22008d6241108..72b5ca793c6f43ac0f3d67ad700fcae2356b27d2 100644 --- a/test/multidomain/2cnistokes2p2cni/test_2cnistokes2p2cni.cc +++ b/test/multidomain/2cnistokes2p2cni/test_2cnistokes2p2cni.cc @@ -19,8 +19,10 @@ /*! * \file * - * \brief test for the coupled 2cni-Stokes and 2p2cni-Darcy model + * \brief Test for the coupled non-isothermal two-component Stokes and + * non-isothermal two-phase two-component Darcy model */ + #include "config.h" #include <iostream> #include <boost/format.hpp> @@ -41,7 +43,7 @@ /*! * \brief Print a usage string for simulations. * - * \param progname The name of the executable + * \param progName The name of the executable */ void printUsage(const char *progName) { @@ -208,19 +210,16 @@ int start_(int argc, } /*! - * \ingroup Start - * * \brief Provides a main function which reads in parameters from the * command line and a parameter file. * - * In this function only the differentiation between debugger - * or not is made. + * In this function only the differentiation between debugger + * or not is made. * * \tparam TypeTag The type tag of the problem which needs to be solved * * \param argc The number of command line arguments of the program * \param argv The contents of the command line arguments of the program - * \param usage Callback function for printing the usage message */ template <class TypeTag> int start(int argc, @@ -246,7 +245,7 @@ int start(int argc, } // -///*! +//*! // * \brief Print a usage string for simulations using // * Dumux::startFromDGF() as their main() function. // * diff --git a/test/multidomain/2cnistokes2p2cni/test_2cnistokes2p2cni.input b/test/multidomain/2cnistokes2p2cni/test_2cnistokes2p2cni.input index 7b736ca11443f3370036ddbfa20ba8fc541d999b..e23bcbb1a225bc9f37cdb64695ce2e7e60ac9d11 100644 --- a/test/multidomain/2cnistokes2p2cni/test_2cnistokes2p2cni.input +++ b/test/multidomain/2cnistokes2p2cni/test_2cnistokes2p2cni.input @@ -2,17 +2,13 @@ #Configuration file for test_2cnistokes2p2cni ############################################################# -############################################################# -#General conditions: Problem, TimeManager, Vtk, Grid -############################################################# - ############################################################# [Problem] ############################################################# #First part of the interface, where it is not coupled; #set to zero or negative if not desired -RunUpDistanceX = 0.0 # 0.06, has to be larger than NoDarcyX !? -NoDarcyX = 0.0 # 0.05 +RunUpDistanceX = 0.0 +NoDarcyX = 0.0 ############################################################# [TimeManager] @@ -27,7 +23,7 @@ InitTime = 864 #Simulation end TEnd = 0.864e6 - + #Define the length of an episode (for output) EpisodeLength = 43200 @@ -46,17 +42,16 @@ UseInterfaceMeshCreator = true #Name of the dgf file (grid) File = grids/interfacedomain.dgf -#File = grids/test_2cnistokes2p2cni.dgf Refinement = 0 #Number of elements in x-, y-, z-direction CellsX = 30 CellsY = 62 CellsZ = 1 -#Grading and refinement of the mesh +#Grading and refinement of the mesh in y direction Grading = 1.13 -#Extend of entire domain +#Extend of the entire domain XMin = 0.0 XMax = 0.25 YMin = 0.0 @@ -88,16 +83,16 @@ RefTemperature = 298.15 RefMassfrac = 0.008 VxMax = 3.5 BeaversJosephSlipVel = 0.00134 -ExponentMTC = 0.0 # 1./6., Mass transfer coefficient for S^MTC -UseBoundaryLayerModel = 0 # integer, 0 for no boundary layer model, 1 for Blasius, 2 for turbulent BL, 9 for constant thickness -BoundaryLayerOffset = 0.00 # For BL model like Blasius, determines a virtual run-up distance for the flow -ConstThickness = 0.0016 # for a constant BL thickness, use BL model 3 -MassTransferModel = 0 # 0 for none, 1 for power law, 2 for Schluender model +ExponentMTC = 0.0 # 1./6., Mass transfer coefficient for S^MTC +UseBoundaryLayerModel = 0 # 0 for no boundary layer model, 1 for Blasius, 2 and 3 for turbulent BL, 9 for constant thickness +BoundaryLayerOffset = 0.0 # for BL model like Blasius, determines a virtual run-up distance for the flow +ConstThickness = 0.0016 # for a constant BL thickness, use BL model 9 +MassTransferModel = 0 # 0 for none, 1 for power law, 2 for Schluender model -SinusVelVar = 0.0 # hourly velocity variation -SinusPVar = 0.0 # diurnal pressure variation -SinusTVar = 0.0 # diurnal temperature variation -SinusXVar = 0.0 # diurnal variation of the vapor concentration (massfraction) +SinusVelVar = 0.0 # hourly velocity variation +SinusPVar = 0.0 # diurnal pressure variation +SinusTVar = 0.0 # diurnal temperature variation +SinusXVar = 0.0 # diurnal variation of the vapor concentration (massfraction) ############################################################# [PorousMedium] @@ -106,7 +101,7 @@ RefPressurePM = 1e5 RefTemperaturePM = 298.15 InitialSw1 = 0.98 InitialSw2 = 0.98 -CharPoreRadius = 1e-4 +CharPoreRadius = 1e-4 # for Schluender mass-transfer model PlotFluidProperties = false ############################################################# @@ -117,8 +112,7 @@ AlphaBJ = 1.0 # for homogeneous setups (0 for heterogeneous): SoilType = 2 -# threshold of the linearization of the capillary pressure curve -RegularizationThreshold = 1e-2 +RegularizationThreshold = 1e-2 # linearization threshold for pc-Sw # GStat stuff, only required for SoilType=0 GenerateNewPermeability = true @@ -181,7 +175,7 @@ RelTolerance = 1e-5 TargetSteps = 8 MaxSteps = 12 WriteConvergence = false -MaxTimeStepDivisions = 20 # should be in group Implicit +MaxTimeStepDivisions = 20 ############################################################# [LinearSolver] diff --git a/test/multidomain/2cstokes2p2c/2cstokes2p2cproblem.hh b/test/multidomain/2cstokes2p2c/2cstokes2p2cproblem.hh index 21ceb0cf0b1511c0e9fb9b8ac14a41343b5a2032..c54e0018d0759e94470bc102b241d4fa625d3194 100644 --- a/test/multidomain/2cstokes2p2c/2cstokes2p2cproblem.hh +++ b/test/multidomain/2cstokes2p2c/2cstokes2p2cproblem.hh @@ -16,6 +16,21 @@ * You should have received a copy of the GNU General Public License * * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ +/*! + * \file + * \ingroup StokesProblems + * \ingroup 2p2cProblems + * \brief The problem class for the coupling of an isothermal two-component Stokes + * and an isothermal two-phase two-component Darcy model. + * + * The problem class for the coupling of an isothermal two-component Stokes (stokes2c) + * and an isothermal two-phase two-component Darcy model (2p2c). + * It uses the 2p2cCoupling model and the Stokes2ccoupling model and provides + * the problem specifications for common parameters of the two submodels. + * The initial and boundary conditions of the submodels are specified in the two subproblems, + * 2p2csubproblem.hh and stokes2csubproblem.hh, which are accessible via the coupled problem. + */ + #ifndef DUMUX_2CSTOKES2P2CPROBLEM_HH #define DUMUX_2CSTOKES2P2CPROBLEM_HH @@ -121,15 +136,17 @@ SET_BOOL_PROP(TwoCStokesTwoPTwoCProblem, NewtonWriteConvergence, false); } /*! + * \ingroup StokesProblems + * \ingroup 2p2cProblems * \brief The problem class for the coupling of an isothermal two-component Stokes * and an isothermal two-phase two-component Darcy model. * - * The problem class for the coupling of an isothermal two-component Stokes (stokes2c) - * and an isothermal two-phase two-component Darcy model (2p2c). - * It uses the 2p2cCoupling model and the Stokes2ccoupling model and provides - * the problem specifications for common parameters of the two submodels. - * The initial and boundary conditions of the submodels are specified in the two subproblems, - * 2p2csubproblem.hh and stokes2csubproblem.hh, which are accessible via the coupled problem. + * The problem class for the coupling of an isothermal two-component Stokes (stokes2c) + * and an isothermal two-phase two-component Darcy model (2p2c). + * It uses the 2p2cCoupling model and the Stokes2ccoupling model and provides + * the problem specifications for common parameters of the two submodels. + * The initial and boundary conditions of the submodels are specified in the two subproblems, + * 2p2csubproblem.hh and stokes2csubproblem.hh, which are accessible via the coupled problem. */ template <class TypeTag = TTAG(TwoCStokesTwoPTwoCProblem) > class TwoCStokesTwoPTwoCProblem : public MultiDomainProblem<TypeTag> @@ -220,11 +237,10 @@ class TwoCStokesTwoPTwoCProblem : public MultiDomainProblem<TypeTag> public: /*! - * \brief docme + * \brief The problem for the coupling of Stokes and Darcy flow * - * \param hostGrid docme + * \param mdGrid The multidomain grid * \param timeManager The time manager - * */ TwoCStokesTwoPTwoCProblem(MDGrid &mdGrid, TimeManager &timeManager) @@ -268,12 +284,21 @@ public: this->timeManager().startNextEpisode(episodeLength_); } + /*! + * \brief The destructor + */ ~TwoCStokesTwoPTwoCProblem() { fluxFile_.close(); }; - //! \copydoc Dumux::CoupledProblem::init() + /*! + * \brief Called by the Dumux::TimeManager in order to + * initialize the problem. + * + * If you overload this method don't forget to call + * ParentType::init() + */ void init() { ParentType::init(); @@ -293,7 +318,10 @@ public: } /*! - * \brief docme + * \brief Initialization of the grids + * + * This function splits the multidomain grid in the two + * individual subdomain grids and takes care of parallelization. */ void initializeGrid() { @@ -329,7 +357,10 @@ public: this->sdProblem2().spatialParams().loadIntrinsicPermeability(this->sdGridView2()); } - //! \copydoc Dumux::CoupledProblem::postTimeStep() + /*! + * \brief Called by the time manager after the time integration to + * do some post processing on the solution. + */ void postTimeStep() { // call the postTimeStep function of the subproblems @@ -345,13 +376,20 @@ public: } } - //! \copydoc Dumux::CoupledProblem::episodeEnd() + /*! + * \brief Called when the end of an simulation episode is reached. + * + * Typically a new episode should be started in this method. + */ void episodeEnd() { this->timeManager().startNextEpisode(episodeLength_); } - /* - * \brief Calculates fluxes and coupling terms at the interface for the Stokes model. - * Flux output files are created and the summarized flux is written to a file. + /*! + * \brief Calculates fluxes and coupling terms at the interface + * for the Stokes model. + * + * Flux output files are created and the summarized flux is + * written to a file. */ void calculateFirstInterfaceFluxes() { @@ -478,9 +516,12 @@ public: << advectiveVaporFlux-diffusiveVaporFlux << "; "; } - /* - * \brief Calculates fluxes and coupling terms at the interface for the Darcy model. - * Flux output files are created and the summarized flux is written to a file. + /*! + * \brief Calculates fluxes and coupling terms at the interface + * for the Darcy model. + * + * Flux output files are created and the summarized flux is written + * to a file. */ void calculateSecondInterfaceFluxes() { @@ -600,12 +641,13 @@ public: } /*! - * \brief docme + * \brief Returns the advective vapor fluxes * - * \param elemVolVars1 docme - * \param boundaryVars1 docme - * \param vertInElem1 docme + * The phaseIdx and transportCompIdx1 are predefined * + * \param elemVolVars1 All volume variables for the element + * \param boundaryVars1 Flux variables (\todo violates naming convention) + * \param vertInElem1 Vertex index for the inside element */ Scalar computeAdvectiveVaporFluxes1(const ElementVolumeVariables1& elemVolVars1, const BoundaryVariables1& boundaryVars1, @@ -618,12 +660,13 @@ public: } /*! - * \brief docme + * \brief Returns the diffusive vapor fluxes * - * \param elemVolVars1 docme - * \param boundaryVars1 docme - * \param vertInElem1 docme + * The transportCompIdx1 is predefined * + * \param elemVolVars1 All volume variables for the element + * \param boundaryVars1 Flux variables (\todo violates naming convention) + * \param vertInElem1 Vertex index for the inside elements */ Scalar computeDiffusiveVaporFluxes1(const ElementVolumeVariables1& elemVolVars1, const BoundaryVariables1& boundaryVars1, @@ -637,7 +680,14 @@ public: return diffFlux; } - //! \copydoc Dumux::CoupledProblem::shouldWriteRestartFile() + /*! + * \brief Returns true if a restart file should be written to + * disk. + * + * The default behavior is to write one restart file every 5 time + * steps. This file is intended to be overwritten by the + * implementation. + */ bool shouldWriteRestartFile() const { if ((this->timeManager().timeStepIndex() > 0 && @@ -648,8 +698,14 @@ public: return false; } - - //! \copydoc Dumux::CoupledProblem::shouldWriteOutput() + /*! + * \brief Returns true if the current solution should be written to + * disk (i.e. as a VTK file) + * + * The default behavior is to write out the solution for + * every time step. This function is intended to be overwritten by the + * implementation. + */ bool shouldWriteOutput() const { if (this->timeManager().timeStepIndex() % freqOutput_ == 0 @@ -660,7 +716,8 @@ public: /*! * \brief Returns true if a file with the fluxes across the - * free-flow -- porous-medium interface should be written. + * free-flow -- porous-medium interface should be + * written to disk. */ bool shouldWriteFluxFile() const { @@ -685,11 +742,17 @@ public: } + /*! + * \brief Returns a pointer to the Stokes problem + */ Stokes2cSubProblem& stokes2cProblem() { return this->sdProblem1(); } const Stokes2cSubProblem& stokes2cProblem() const { return this->sdProblem1(); } + /*! + * \brief Returns a pointer to the Darcy problem + */ TwoPTwoCSubProblem& twoPtwoCProblem() { return this->sdProblem2(); } const TwoPTwoCSubProblem& twoPtwoCProblem() const @@ -733,6 +796,6 @@ private: std::ofstream fluxFile_; }; -} //end namespace +} // namespace Dumux -#endif +#endif // DUMUX_2CSTOKES2P2CPROBLEM_HH diff --git a/test/multidomain/2cstokes2p2c/2cstokes2p2cspatialparams.hh b/test/multidomain/2cstokes2p2c/2cstokes2p2cspatialparams.hh index 2707b898e9cea069d7ed6e9285784de772dea5ba..d74f846eb4e5b4bfdcbec56f466cc233f54bd9d9 100644 --- a/test/multidomain/2cstokes2p2c/2cstokes2p2cspatialparams.hh +++ b/test/multidomain/2cstokes2p2c/2cstokes2p2cspatialparams.hh @@ -16,6 +16,14 @@ * You should have received a copy of the GNU General Public License * * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ +/*! + * \file + * + * \brief Spatial parameters for the + * coupling of an isothermal two-component Stokes + * and an isothermal two-phase two-component Darcy model. + */ + #ifndef DUMUX_TWOCSTOKES_2P2C_SPATIALPARAMS_HH #define DUMUX_TWOCSTOKES_2P2C_SPATIALPARAMS_HH @@ -53,8 +61,8 @@ private: // define the material law which is parameterized by effective // saturations typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -// typedef RegularizedBrooksCorey<Scalar> EffMaterialLaw; -// typedef RegularizedVanGenuchten<Scalar, LinearizedRegVanGenuchtenParams<Scalar, TypeTag> > EffMaterialLaw; + // typedef RegularizedBrooksCorey<Scalar> EffMaterialLaw; + // typedef RegularizedVanGenuchten<Scalar, LinearizedRegVanGenuchtenParams<Scalar, TypeTag> > EffMaterialLaw; typedef RegularizedVanGenuchten<Scalar> EffMaterialLaw; public: // define the material law parameterized by absolute saturations @@ -63,7 +71,14 @@ public: } -/** \todo Please doc me! */ +/*! + * \ingroup TwoPTwoCModel + * \ingroup StokesModel + * \ingroup ImplicitTestProblems + * \brief Definition of the spatial parameters for + * the coupling of an isothermal two-component Stokes + * and an isothermal two-phase two-component Darcy model. + */ template<class TypeTag> class TwoCStokesTwoPTwoCSpatialParams : public ImplicitSpatialParams<TypeTag> { @@ -104,7 +119,9 @@ public: typedef std::vector<MaterialLawParams> MaterialLawParamsVector; /*! - * \brief Spatial parameters for the coupled 2cstokes and 2p2c test + * \brief Spatial parameters for the + * coupling of an isothermal two-component Stokes + * and an isothermal two-phase two-component Darcy model. * * \param gridView The GridView which is used by the problem */ @@ -162,19 +179,21 @@ public: } } + /*! + * \brief The destructor + */ ~TwoCStokesTwoPTwoCSpatialParams() {} /*! - * \brief The intrinsic permeability of the porous medium. + * \brief Returns the intrinsic permeability tensor \f$[m^2]\f$ * - * \param element The current finite element - * \param fvGeometry The current finite volume geometry of the element - * \param scvIdx The index sub-control volume face where the - * intrinsic velocity ought to be calculated. + * \param element The finite element + * \param fvGeometry The finite volume geometry of the element + * \param scvIdx The local index of the sub-control volume */ const Scalar intrinsicPermeability(const Element &element, - const FVElementGeometry &fvGeometry, + const FVElementGeometry &fvGeometry, const int scvIdx) const { // // heterogeneous parameter field computed with GSTAT @@ -195,7 +214,13 @@ public: // } } - //! \copydoc Dumux::ImplicitSpatialParamsOneP::porosity() + /*! + * \brief Returns the porosity \f$[-]\f$ + * + * \param element The finite element + * \param fvGeometry The finite volume geometry of the element + * \param scvIdx The local index of the sub-control volume + */ Scalar porosity(const Element &element, const FVElementGeometry &fvGeometry, const int scvIdx) const @@ -211,7 +236,13 @@ public: } - //! \copydoc Dumux::ImplicitSpatialParams::materialLawParams() + /*! + * \brief Returns the parameter object for the material law + * + * \param element The finite element + * \param fvGeometry The finite volume geometry of the element + * \param scvIdx The local index of the sub-control volume + */ const MaterialLawParams& materialLawParams(const Element &element, const FVElementGeometry &fvGeometry, const int scvIdx) const @@ -233,14 +264,15 @@ public: /*! - * \brief Returns the heat capacity \f$[J/m^3 K]\f$ of the rock matrix. + * \brief Returns the effective heat capacity \f$[J/m^3 K]\f$ * - * This is only required for non-isothermal models. + * This is only required for non-isothermal models. This function does not + * return the specific heat capacity, but an effective heat capacity, which is + * \f$c_\textrm{p,eff,s} = c_\textrm{p,s} \varrho_\textrm{s} \left(1 - \phi\right)\f$ * * \param element The finite element - * \param fvGeometry The finite volume geometry - * \param scvIdx The local index of the sub-control volume where - * the heat capacity needs to be defined + * \param fvGeometry The finite volume geometry of the element + * \param scvIdx The local index of the sub-control volume */ Scalar heatCapacity(const Element &element, const FVElementGeometry &fvGeometry, @@ -253,13 +285,14 @@ public: } /*! - * \brief docme - * - * \param element The finite element - * \param fvGeometry The finite-volume geometry - * \param scvIdx The local subcontrolvolume index - * - */ + * \brief Returns the thermal conductivity \f$[W/m^2]\f$ of the solid + * + * This is only required for non-isothermal models. + * + * \param element The finite element + * \param fvGeometry The finite volume geometry of the element + * \param scvIdx The local index of the sub-control volume + */ Scalar thermalConductivitySolid(const Element &element, const FVElementGeometry &fvGeometry, const int scvIdx) const @@ -275,26 +308,30 @@ public: } /*! - * \brief docme + * \brief Returns the index of the used soil type * - * \param global Pos The global position + * The soil, can be chosen as runtime parameter: + * 1: coarse, + * 2: medium, + * 3: fine * + * \param globalPos The global position */ const unsigned checkSoilType(const GlobalPosition &globalPos) const { - // one soil, which can be chosen as runtime parameter: - // 1: coarse - // 2: medium - // 3: fine return soilType_; } /*! - * \brief This method allows the generation of a statistical field for the soil parameters - * using GStat + * \brief This method allows the generation of a statistical field + * for the intrinsic permeability using GStat * - * \param gridView The GridView which is used by the problem + * Because gstat is not open source and has to be installed manually, + * the content of this function is deactivated (commented) by + * default. If you have gstat installed, please uncomment + * the lines between the curly brackets. * + * \param gridView The GridView which is used by the problem */ void loadIntrinsicPermeability(const GridView& gridView) { @@ -424,10 +461,12 @@ public: // vtkwriter.write("permeability", Dune::VTK::OutputType::ascii); } - // /*! - * \brief This is called from the coupled problem - * and creates a gnuplot output of the Pc-Sw curve -- currently commented + * \brief This is called from the coupled problem and creates + * a gnuplot output of the Pc-Sw curve + * + * If this function should be used, uncomment the lines between + * the curly brackets. */ void plotMaterialLaw() { @@ -484,6 +523,6 @@ private: MaterialLawParams fineParams_; }; -} // end namespace +} // end namespace Dumux #endif // DUMUX_TWOCSTOKES_2P2C_SPATIALPARAMS_HH diff --git a/test/multidomain/2cstokes2p2c/2p2csubproblem.hh b/test/multidomain/2cstokes2p2c/2p2csubproblem.hh index 05d40955f9b2368de85e6a92551f6ab32e6fc964..dc245c6e951e7e60b05548d68f8769b2f45d92f6 100644 --- a/test/multidomain/2cstokes2p2c/2p2csubproblem.hh +++ b/test/multidomain/2cstokes2p2c/2p2csubproblem.hh @@ -18,8 +18,9 @@ *****************************************************************************/ /*! * \file - * - * \brief Porous-medium subproblem with coupling at the top boundary. + * \ingroup 2p2cProblems + * \brief Isothermal two-phase two-component porous-medium subproblem + * with coupling at the top boundary. */ #ifndef DUMUX_2P2C_SUBPROBLEM_HH #define DUMUX_2P2C_SUBPROBLEM_HH @@ -104,19 +105,16 @@ SET_BOOL_PROP(TwoPTwoCSubProblem, ProblemEnableGravity, true); } /*! - * \ingroup Stokes2cBoxProblems - * \brief Stokes2c problem with air flowing - * from the left to the right. - * - * The stokes subdomain is sized 1m times 1m. The boundary conditions for the momentum balances - * are all set to Dirichlet. The mass balance receives - * outflow bcs, which are replaced in the localresidual by the sum - * of the two momentum balances. In the middle of the right boundary, - * one vertex receives Dirichlet bcs, to set the pressure level. + * \ingroup 2p2cProblems + * \brief Isothermal two-phase two-component porous-medium subproblem + * with coupling at the top boundary. * - * This sub problem uses the \ref Stokes2cModel. It is part of the 2cstokes2p2c model and - * is combined with the 2p2csubproblem for the Darcy domain. + * The Darcy subdomain is sized 0.25m times 0.25m. All BCs for the balance + * equations are set to Neumann no-flow, except for the top, where couplingInflow + * conditions are applied. * + * This sub problem uses the \ref TwoPTwoCModel. It is part of the 2p2c model and + * is combined with the stokes2csubproblem for the free flow domain. */ template <class TypeTag = TTAG(TwoPTwoCSubProblem) > class TwoPTwoCSubProblem : public ImplicitPorousMediaProblem<TypeTag> @@ -166,14 +164,13 @@ class TwoPTwoCSubProblem : public ImplicitPorousMediaProblem<TypeTag> typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; +public: /*! - * \brief docme + * \brief The sub-problem for the porous-medium subdomain * * \param timeManager The TimeManager which is used by the simulation * \param gridView The simulation's idea about physical space - * */ -public: TwoPTwoCSubProblem(TimeManager &timeManager, const GridView gridView) : ParentType(timeManager, gridView) { @@ -226,11 +223,21 @@ public: */ // \{ - //! \copydoc Dumux::ImplicitProblem::name() + /*! + * \brief Returns the problem name + * + * This is used as a prefix for files generated by the simulation. + */ const std::string &name() const { return GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Vtk, NamePM); } - //! \copydoc Dumux::ImplicitProblem::init() + /*! + * \brief Called by the Dumux::TimeManager in order to + * initialize the problem. + * + * If you overload this method don't forget to call + * ParentType::init() + */ void init() { // set the initial condition of the model @@ -242,7 +249,11 @@ public: std::cout << "Using boundary layer model " << blModel << std::endl; } - //! \copydoc Dumux::ImplicitPorousMediaProblem::temperatureAtPos() + /*! + * \brief Returns the temperature \f$ K \f$ + * + * \param globalPos The global position + */ Scalar temperatureAtPos(const GlobalPosition &globalPos) const { return refTemperature_; @@ -250,7 +261,13 @@ public: // \} - //! \copydoc Dumux::ImplicitProblem::boundaryTypes() + /*! + * \brief Specifies which kind of boundary condition should be + * used for which equation on a given vertex + * + * \param values Stores the value of the boundary type + * \param vertex The vertex + */ void boundaryTypes(BoundaryTypes &values, const Vertex &vertex) const { const GlobalPosition globalPos = vertex.geometry().center(); @@ -275,7 +292,15 @@ public: } } - //! \copydoc Dumux::ImplicitProblem::dirichlet() + /*! + * \brief Evaluate the boundary conditions for a dirichlet + * control volume. + * + * \param values The Dirichlet values for the primary variables + * \param vertex The vertex representing the "half volume on the boundary" + * + * For this method, the \a values parameter stores primary variables. + */ void dirichlet(PrimaryVariables &values, const Vertex &vertex) const { const GlobalPosition globalPos = vertex.geometry().center(); @@ -283,7 +308,21 @@ public: initial_(values, globalPos); } - //! \copydoc Dumux::ImplicitProblem::neumann() + /*! + * \brief Evaluate the boundary conditions for a Neumann + * boundary segment. + * + * \param values The Neumann values for the conservation equations in units of + * \f$ [ \textnormal{unit of conserved quantity} / (m^{\textrm{dim}-1} \cdot s )] \f$ + * \param element The finite element + * \param fvGeometry The finite-volume geometry + * \param is The intersection between element and boundary + * \param scvIdx The local subcontrolvolume index + * \param boundaryFaceIdx The index of the boundary face + * + * For this method, the \a values parameter stores the mass flux + * in normal direction of each phase. Negative values mean influx. + */ void neumann(PrimaryVariables &values, const Element &element, const FVElementGeometry &fvGeometry, @@ -301,7 +340,20 @@ public: */ // \{ - //! \copydoc Dumux::ImplicitProblem::source() + /*! + * \brief Evaluate the source term for all phases within a given + * sub-control-volume. + * + * \param values The source and sink values for the conservation equations in units of + * \f$ [ \textnormal{unit of conserved quantity} / (m^\textrm{dim} \cdot s )] \f$ + * \param element The finite element + * \param fvGeometry The finite-volume geometry + * \param scvIdx The local subcontrolvolume index + * + * For this method, the \a values parameter stores the rate mass + * generated or annihilate per volume unit. Positive values mean + * that mass is created, negative ones mean that it vanishes. + */ void source(PrimaryVariables &values, const Element &element, const FVElementGeometry &fvGeometry, @@ -310,7 +362,17 @@ public: values = Scalar(0); } - //! \copydoc Dumux::ImplicitProblem::initial() + /*! + * \brief Evaluate the initial value for a control volume. + * + * \param values The initial values for the primary variables + * \param element The finite element + * \param fvGeometry The finite-volume geometry + * \param scvIdx The local subcontrolvolume index + * + * For this method, the \a values parameter stores primary + * variables. + */ void initial(PrimaryVariables &values, const Element &element, const FVElementGeometry &fvGeometry, @@ -337,7 +399,10 @@ public: return bothPhases; } - //! \copydoc Dumux::ImplicitProblem::postTimeStep() + /*! + * \brief Called by the time manager after the time integration to + * do some post processing on the solution. + */ void postTimeStep() { // Calculate masses @@ -379,10 +444,9 @@ public: /*! - * \brief Determine if we are on a corner of the grid + * \brief Determines if globalPos is a corner of the grid * * \param globalPos The global position - * */ bool isCornerPoint(const GlobalPosition &globalPos) { @@ -392,22 +456,23 @@ public: (onRightBoundary_(globalPos) && onUpperBoundary_(globalPos))); } - // required in case of mortar coupling - // otherwise it should return false + /*! - * \brief docme + * \brief Returns whether the position is an interface corner point * - * \param globalPos The global position + * This function is required in case of mortar coupling otherwise it should return false * + * \param globalPos The global position */ bool isInterfaceCornerPoint(const GlobalPosition &globalPos) const { return false; } // \} private: - // internal method for the initial condition (reused for the - // dirichlet conditions!) - + /*! + * \brief Internal method for the initial condition + * (reused for the dirichlet conditions!) + */ void initial_(PrimaryVariables &values, const GlobalPosition &globalPos) const { @@ -468,6 +533,6 @@ private: Scalar initializationTime_; std::ofstream outfile; }; -} //end namespace +} //end namespace Dumux #endif // DUMUX_2P2C_SUBPROBLEM_HH diff --git a/test/multidomain/2cstokes2p2c/stokes2csubproblem.hh b/test/multidomain/2cstokes2p2c/stokes2csubproblem.hh index 6d0ac58c63cbd5ab50b85227fe7ebd6012ccb797..c1c50f4442dc476a0282672db9616fe447e1a31c 100644 --- a/test/multidomain/2cstokes2p2c/stokes2csubproblem.hh +++ b/test/multidomain/2cstokes2p2c/stokes2csubproblem.hh @@ -19,7 +19,8 @@ /** * \file * \ingroup Stokes2cProblems - * \brief Isothermal compositional Stokes subproblem with coupling at the bottom boundary. + * \brief Isothermal two-component stokes subproblem with air flowing + * from the left to the right and coupling at the bottom. */ #ifndef DUMUX_STOKES2C_SUBPROBLEM_HH #define DUMUX_STOKES2C_SUBPROBLEM_HH @@ -45,10 +46,7 @@ NEW_TYPE_TAG(Stokes2cSubProblem, // Set the problem property SET_TYPE_PROP(Stokes2cSubProblem, Problem, Dumux::Stokes2cSubProblem<TypeTag>); -/*! - * \brief Set the property for the material parameters by extracting - * it from the material law. - */ +// Set the property for the material parameters by extracting it from the material law. SET_PROP(Stokes2cSubProblem, MaterialLawParams) { private: @@ -57,7 +55,7 @@ SET_PROP(Stokes2cSubProblem, MaterialLawParams) typedef typename MaterialLaw::Params type; }; -//! Use the Stokes2cCouplingLocalResidual for the computation of the local residual in the Stokes domain +// Use the Stokes2cCouplingLocalResidual for the computation of the local residual in the Stokes domain SET_TYPE_PROP(Stokes2cSubProblem, LocalResidual, StokesncCouplingLocalResidual<TypeTag>); @@ -92,7 +90,7 @@ public: typedef FluidSystem type; }; -//! Set Scalar to type long double for higher accuracy +// Set Scalar to type long double for higher accuracy SET_TYPE_PROP(BoxStokes, Scalar, double); //SET_TYPE_PROP(BoxStokes, Scalar, long double); @@ -109,18 +107,19 @@ SET_BOOL_PROP(Stokes2cSubProblem, EnableNavierStokes, false); /*! * \ingroup BoxStokesncModel * \ingroup ImplicitTestProblems - * \brief Stokes2c subproblem with air flowing - * from the left to the right. + * \brief Isothermal two-component stokes subproblem with air flowing + * from the left to the right and coupling at the bottom. * - * The stokes subdomain is sized 0.25m times 0.25m. The boundary conditions + * The Stokes subdomain is sized 0.25m times 0.25m. The boundary conditions * for the momentum balances are all set to Dirichlet, except on the right * boundary, where outflow conditions are set. The mass balance receives - * outflow bcs, which are replaced in the localresidual by the sum - * of the two momentum balances. On the right boundary Dirichlet bcs are + * outflow BCs, which are replaced in the localresidual by the sum + * of the two momentum balances. On the right boundary Dirichlet BCs are * set for the pressure. * - * This sub problem uses the \ref Stokes2cModel. It is part of the 2cstokes2p2c model and - * is combined with the 2p2csubproblem for the Darcy domain. + * This sub problem uses the \ref StokesncModel. It is part of the + * 2cstokes2p2c model and is combined with the 2p2csubproblem for + * the Darcy domain. */ template <class TypeTag> class Stokes2cSubProblem : public StokesProblem<TypeTag> @@ -183,11 +182,10 @@ class Stokes2cSubProblem : public StokesProblem<TypeTag> public: /*! - * \brief The sub-problem for the free-flow compartment - * - * \param timeManager The time manager - * \param gridView The grid view + * \brief The sub-problem for the Stokes subdomain * + * \param timeManager The TimeManager which is used by the simulation + * \param gridView The simulation's idea about physical space */ Stokes2cSubProblem(TimeManager &timeManager, const GridView gridView) : ParentType(timeManager, gridView), @@ -228,7 +226,11 @@ public: */ // \{ - //! \copydoc Dumux::ImplicitProblem::name() + /*! + * \brief Returns the problem name + * + * This is used as a prefix for files generated by the simulation. + */ const std::string &name() const { return GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Vtk, NameFF); } @@ -250,7 +252,13 @@ public: */ // \{ - //! \copydoc Dumux::ImplicitProblem::boundaryTypes() + /*! + * \brief Specifies which kind of boundary condition should be + * used for which equation on a given vertex + * + * \param values Stores the value of the boundary type + * \param vertex The vertex + */ void boundaryTypes(BoundaryTypes &values, const Vertex &vertex) const { const GlobalPosition &globalPos = @@ -305,7 +313,13 @@ public: } } - //! \copydoc Dumux::ImplicitProblem::dirichlet() + /*! + * \brief Evaluates the boundary conditions for a Dirichlet vertex + * + * \param values Stores the Dirichlet values for the conservation equations in + * \f$ [ \textnormal{unit of primary variable} ] \f$ + * \param vertex The vertex + */ void dirichlet(PrimaryVariables &values, const Vertex &vertex) const { @@ -325,7 +339,19 @@ public: values[massOrMoleFracIdx] = refMassfrac_; } - //! \copydoc Dumux::ImplicitProblem::neumann() + /*! + * \brief Evaluates the boundary conditions for a Neumann intersection + * + * \param values Stores the Neumann values for the conservation equations in + * \f$ [ \textnormal{unit of conserved quantity} / (m^(dim-1) \cdot s )] \f$ + * \param element The finite element + * \param fvGeometry The finite volume geometry of the element + * \param is The intersection between element and boundary + * \param scvIdx The local index of the sub-control volume + * \param boundaryFaceIdx The index of the boundary face + * + * Negative values indicate an inflow. + */ void neumann(PrimaryVariables &values, const Element &element, const FVElementGeometry &fvGeometry, @@ -381,15 +407,11 @@ public: } /*! - * \brief Evaluate the intrinsic permeability - * at the corner of a given element + * \brief Returns the intrinsic permeability tensor \f$[m^2]\f$ * * \param element The finite element - * \param fvGeometry The finite-volume geometry - * \param scvIdx The local subcontrolvolume index - * - * - * \return permeability in x-direction + * \param fvGeometry The finite volume geometry of the element + * \param scvIdx The local index of the sub-control volume */ Scalar permeability(const Element &element, const FVElementGeometry &fvGeometry, @@ -406,7 +428,20 @@ public: */ // \{ - //! \copydoc Dumux::ImplicitProblem::source() + /*! + * \brief Evaluate the source term for all phases within a given + * sub-control-volume. + * + * \param values The source and sink values for the conservation equations in units of + * \f$ [ \textnormal{unit of conserved quantity} / (m^\textrm{dim} \cdot s )] \f$ + * \param element The finite element + * \param fvGeometry The finite-volume geometry + * \param scvIdx The local subcontrolvolume index + * + * For this method, the \a values parameter stores the rate mass + * generated or annihilate per volume unit. Positive values mean + * that mass is created, negative ones mean that it vanishes. + */ void source(PrimaryVariables &values, const Element &element, const FVElementGeometry &fvGeometry, @@ -417,7 +452,17 @@ public: values = Scalar(0); } - //! \copydoc Dumux::ImplicitProblem::initial() + /*! + * \brief Evaluate the initial value for a control volume. + * + * \param values The initial values for the primary variables + * \param element The finite element + * \param fvGeometry The finite-volume geometry + * \param scvIdx The local subcontrolvolume index + * + * For this method, the \a values parameter stores primary + * variables. + */ void initial(PrimaryVariables &values, const Element &element, const FVElementGeometry &fvGeometry, @@ -431,10 +476,9 @@ public: // \} /*! - * \brief Determine if we are on a corner of the grid + * \brief Determines if globalPos is a corner of the grid * * \param globalPos The global position - * */ bool isCornerPoint(const GlobalPosition &globalPos) { @@ -447,13 +491,11 @@ public: return false; } - // required in case of mortar coupling - // otherwise it should return false /*! - * \brief Auxiliary function used for the mortar coupling + * \brief Auxiliary function used for the mortar coupling, if mortar coupling, + * this should return true * * \param globalPos The global position - * */ bool isInterfaceCornerPoint(const GlobalPosition &globalPos) const { return false; } @@ -466,20 +508,23 @@ public: const SpatialParams &spatialParams() const { return spatialParams_; } - /*! - * \brief Returns the reference pressure. - */ + //! \brief Returns the reference pressure. const Scalar refPressure() const { return refPressure_; } + //! \brief Returns the reference temperature. const Scalar refTemperature() const { return refTemperature_; } + //! \brief Returns the reference mass fraction. const Scalar refMassfrac() const { return refMassfrac_; } + private: - // internal method for the initial condition (reused for the - // dirichlet conditions!) + /*! + * \brief Internal method for the initial condition + * (reused for the dirichlet conditions!) + */ void initial_(PrimaryVariables &values, const GlobalPosition &globalPos) const { @@ -497,7 +542,7 @@ private: values[massOrMoleFracIdx] = refMassfrac_; } - // set the profile of the inflow velocity (horizontal direction) + //! \brief set the profile of the inflow velocity (horizontal direction) const Scalar xVelocity_(const GlobalPosition &globalPos) const { const Scalar vmax = vxMax_ + hourlyVariation_(sinusVelVar_); @@ -516,7 +561,7 @@ private: // return 0.1*vmax*log((relativeHeight+1e-3)/1e-3) + bjSlipVel_; } - // updates the fluid state to obtain required quantities for IC/BC + //! \brief updates the fluid state to obtain required quantities for IC/BC void updateFluidStateForBC_(FluidState& fluidState) const { fluidState.setTemperature(refTemperature()); @@ -592,6 +637,6 @@ private: Scalar runUpDistanceX_; Scalar initializationTime_; }; -} //end namespace +} //end namespace Dumux #endif // DUMUX_STOKES2C_SUBPROBLEM_HH diff --git a/test/multidomain/2cstokes2p2c/test_2cstokes2p2c.cc b/test/multidomain/2cstokes2p2c/test_2cstokes2p2c.cc index 03bb70683931a7ba51031e81259de312157755ab..a9c863a64bfebed5f59a82dffc854a0cf0729877 100644 --- a/test/multidomain/2cstokes2p2c/test_2cstokes2p2c.cc +++ b/test/multidomain/2cstokes2p2c/test_2cstokes2p2c.cc @@ -19,7 +19,8 @@ /*! * \file * - * \brief test for the coupled 2c-Stokes and 2p2c-Darcy model + * \brief Test for the coupled isothermal two-component Stokes and + * isothermal two-phase two-component Darcy model */ #include "config.h" @@ -40,7 +41,7 @@ /*! * \brief Print a usage string for simulations. * - * \param progname The name of the executable + * \param progName The name of the executable */ void printUsage(const char *progName) { @@ -208,19 +209,16 @@ int start_(int argc, } /*! - * \ingroup Start - * * \brief Provides a main function which reads in parameters from the * command line and a parameter file. * - * In this function only the differentiation between debugger - * or not is made. + * In this function only the differentiation between debugger + * or not is made. * * \tparam TypeTag The type tag of the problem which needs to be solved * * \param argc The number of command line arguments of the program * \param argv The contents of the command line arguments of the program - * \param usage Callback function for printing the usage message */ template <class TypeTag> int start(int argc, diff --git a/test/multidomain/2cstokes2p2c/test_2cstokes2p2c.input b/test/multidomain/2cstokes2p2c/test_2cstokes2p2c.input index 6e0ca401eb5ce4d45e5832c94dee1087ba29854b..c3bf32f3005b39499f2904e752637ee9533153e3 100644 --- a/test/multidomain/2cstokes2p2c/test_2cstokes2p2c.input +++ b/test/multidomain/2cstokes2p2c/test_2cstokes2p2c.input @@ -2,17 +2,13 @@ #Configuration file for test_2cstokes2p2c ############################################################# -############################################################# -#General conditions: Problem, TimeManager, Vtk, Grid -############################################################# - ############################################################# [Problem] ############################################################# #First part of the interface, where it is not coupled; #set to zero or negative if not desired -RunUpDistanceX = 0.0 # 0.06, has to be larger than NoDarcyX !? -NoDarcyX = 0.0 # 0.05 +RunUpDistanceX = 0.0 +NoDarcyX = 0.0 ############################################################# [TimeManager] @@ -37,7 +33,7 @@ EpisodeLength = 43200 #Names for VTK output NameFF = stokes2c NamePM = 2p2c -AddVelocity = 1 +AddVelocity = 1 ############################################################# [Grid] @@ -52,10 +48,10 @@ Refinement = 0 CellsX = 30 CellsY = 62 CellsZ = 1 -#Grading and refinement of the mesh +#Grading and refinement of the mesh in y direction Grading = 1.13 -#Extend of entire domain +#Extend of the entire domain XMin = 0.0 XMax = 0.25 YMin = 0.0 @@ -88,11 +84,11 @@ RefMassfrac = 0.008 VxMax = 3.5 BeaversJosephSlipVel = 0.00134 SinusVelVar = 0.0 -ExponentMTC = 0.0 # 1./6., Mass transfer coefficient for S^MTC -UseBoundaryLayerModel = 0 # integer, 0 for no boundary layer model, 1 for Blasius, 2 for turbulent BL, 3 for constant thickness -BoundaryLayerOffset = 0.0 # For BL model like Blasius, determines a virtual run-up distance for the flow -ConstThickness = 0.0016 # for a constant BL thickness, use BL model 3 -MassTransferModel = 0 # 0 for none, 1 for power law, 2 for Schluender model +ExponentMTC = 0.0 # 1./6., Mass transfer coefficient for S^MTC +UseBoundaryLayerModel = 0 # 0 for no boundary layer model, 1 for Blasius, 2 and 3 for turbulent BL, 9 for constant thickness +BoundaryLayerOffset = 0.0 # for BL model like Blasius, determines a virtual run-up distance for the flow +ConstThickness = 0.0016 # for a constant BL thickness, use BL model 9 +MassTransferModel = 0 # 0 for none, 1 for power law, 2 for Schluender model ############################################################# [PorousMedium] @@ -101,7 +97,7 @@ RefPressurePM = 1e5 RefTemperaturePM = 298.15 InitialSw1 = 0.98 InitialSw2 = 0.98 -CharPoreDiameter = 1e-4 # for Schluender mass-transfer model +CharPoreDiameter = 1e-4 # for Schluender mass-transfer model ############################################################# [SpatialParams] @@ -166,4 +162,4 @@ MaxTimeStepDivisions = 20 ############################################################# ResidualReduction = 1e-10 Verbosity = 0 -MaxIterations = 200 \ No newline at end of file +MaxIterations = 200