diff --git a/CHANGELOG.md b/CHANGELOG.md index a6907a3b8b293089ac8d66184cd8ad7517b44a47..0bae5e80654a04e0f4eb06df0238b26d5b32c11f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ Differences Between DuMuX 2.9 and DuMuX 2.10 * IMPROVEMENTS and ENHANCEMENTS: - Integrated geostatistical tool gstat for generating random fields - multidomain should now work with all compilers (optimzed) without segfaults + - The computation of the tortuosity tau with the Millington Quirk model + was optimized. Tests show an speedup of up to 5% for a 2p2c simulation. * IMMEDIATE INTERFACE CHANGES not allowing/requiring a deprecation period: - The problem class interface needs to provide the method maxTimeStepSize(). @@ -23,8 +25,13 @@ Differences Between DuMuX 2.9 and DuMuX 2.10 compiler will not print any warning if a deprecated property or parameter name is used. However, a run-time warning should appear in the summary lines after the corresponding run. + - The property tau was renamed to TauTortuosity to make the name more telling. + For the models 1p2c, 2p2c, 3p3c it got the default value 0.5. * Deprecated CLASSES/FILES, to be removed after 2.10: + - The class `DiffusivityConstantTau<TypeTag, Scalar>` was renamed to + `DiffusivityConstant<TypeTag>` and is located in a according new header. The + old class, its header and the property `tau` are deprecated. * Deprecated MEMBER FUNCTIONS, to be removed after 2.10: diff --git a/doc/handbook/dumux-handbook.bib b/doc/handbook/dumux-handbook.bib index 96c774ad67a619366d702408a34f3f11d73adec4..0f0cb3089a3923351d191ef686225e9c81b73895 100644 --- a/doc/handbook/dumux-handbook.bib +++ b/doc/handbook/dumux-handbook.bib @@ -193,6 +193,15 @@ year = {2007} } +@BOOK{BEAR1972, + title = {Dynamics of Fluids in Porous Media}, + author = {Bear, Jacob}, + isbn = {9780486656755}, + series = {Dover Civil and Mechanical Engineering Series}, + year = {1972}, + publisher = {Dover} +} + @BOOK{BASTIAN1999, title = {{Numerical Computation of Multiphase Flows in Porous Media}}, publisher = {Habilitationsschrift, University of Kiel}, @@ -339,6 +348,18 @@ publisher = {Springer} } +@ARTICLE{CARMAN1937, + author = {Carman, Philip C.}, + title = {Fluid flow through granular beds}, + journal = {Transactions, Institution of Chemical Engineers}, + year = {1937}, + volume = {15}, + pages = {150--166}, + number = {}, + doi = {10.1016/S0263-8762(97)80003-2}, + note = {reprinted in \emph{Chemical Engineering Research and Design}, 75:S32--S48, 1997} +} + @ARTICLE{Chen2000, author = {Z. Chen and Q. Guan and R. E. Ewing}, title = {{Analysis of a compositional model for fluid flow in porous media}, @@ -347,20 +368,7 @@ volume = {60}, pages = {747-777}, number = {3}, - owner = {faigle}, - review = {3phase model derivation finite element discretizattion Beschreibung - des sequenziellen numerischen L\"osungsschemas verwendete ELLAM methode - - - Trangenstein + pC - - - assumpt: no mass transfer between water and gas/oil (black oil) - - rho_w = const - - s(p, ...) und nicht s(p+pc, ...)}, - timestamp = {2011.11.29} + owner = {faigle} } @BOOK{CLASS2007, @@ -862,6 +870,18 @@ url={https://www.osti.gov/scitech/biblio/6760030} } +@Article{MILLINGTON1961, +author ={Millington, R. J. and Quirk, J. P.}, +title ={Permeability of porous solids}, +journal ={Trans. Faraday Soc.}, +year ={1961}, +volume ={57}, +issue ={0}, +pages ={1200--1207}, +doi ={10.1039/TF9615701200} +} + + @ARTICLE{MUALEM1976, author = {Y. Mualem}, title = {{A new model for predicting the hydraulic conductivity of unsaturated diff --git a/dumux/material/fluidmatrixinteractions/CMakeLists.txt b/dumux/material/fluidmatrixinteractions/CMakeLists.txt index 2454da31dc0025c2780a24c2aa3dbd44a20ccb79..80442427bc50024fcdc3b3dfbdc1f2435edc9acc 100644 --- a/dumux/material/fluidmatrixinteractions/CMakeLists.txt +++ b/dumux/material/fluidmatrixinteractions/CMakeLists.txt @@ -6,6 +6,7 @@ add_subdirectory("mp") #install headers install(FILES +diffusivityconstant.hh diffusivityconstanttau.hh diffusivitymillingtonquirk.hh DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/material/fluidmatrixinteractions) diff --git a/dumux/material/fluidmatrixinteractions/diffusivityconstant.hh b/dumux/material/fluidmatrixinteractions/diffusivityconstant.hh new file mode 100644 index 0000000000000000000000000000000000000000..c3f58a4d9f1249310d0749805ecd07e14ddf69e1 --- /dev/null +++ b/dumux/material/fluidmatrixinteractions/diffusivityconstant.hh @@ -0,0 +1,73 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/***************************************************************************** + * See the file COPYING for full copying permissions. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <http://www.gnu.org/licenses/>. * + *****************************************************************************/ +/*! + * \file + * + * \brief Relation for the saturation-dependent effective diffusion coefficient + */ +#ifndef DIFFUSIVITY_CONSTANT_HH +#define DIFFUSIVITY_CONSTANT_HH + +#include <dumux/common/parameters.hh> +#include <dumux/common/basicproperties.hh> + +namespace Dumux +{ +/*! + * \ingroup fluidmatrixinteractionslaws + * + * \brief Relation for the saturation-dependent effective diffusion coefficient + * + * The material law is: + * \f[ + * D_\text{eff,pm} = \phi * S_w * \tau * D + * \f] + * + * with a constant tau. + * + * The default value is 0.5, empirically obtained in Carman 1937: + * <i>Fluid flow through granular beds</i> \cite carman1937 + * Additionally, Bear 1972 \cite bear1972 mentions values 0.4 and in the + * range of 0.56 to 0.8. + */ +template<class TypeTag> +class DiffusivityConstant +{ + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); +public: + /*! + * \brief Returns the effective diffusion coefficient \f$\mathrm{[m^2/s]}\f$ based + * on a constant tortuosity value + * + * \param porosity The porosity + * \param saturation The saturation of the wetting phase + * \param diffCoeff The diffusion coefficient of the phase in \f$\mathrm{[m^2/s]}\f$ + */ + static Scalar effectiveDiffusivity(const Scalar porosity, + const Scalar saturation, + const Scalar diffCoeff) + + { + Scalar tau = GET_PARAM(TypeTag, Scalar, TauTortuosity); + + return porosity * saturation * tau * diffCoeff; + } +}; +} +#endif // DIFFUSIVITY_CONSTANT_HH diff --git a/dumux/material/fluidmatrixinteractions/diffusivitymillingtonquirk.hh b/dumux/material/fluidmatrixinteractions/diffusivitymillingtonquirk.hh index 805a5a1662826ea1c26423a55c116f4e211b0d66..92204bbad0e0b48c27c111c1504cfb952901e928 100644 --- a/dumux/material/fluidmatrixinteractions/diffusivitymillingtonquirk.hh +++ b/dumux/material/fluidmatrixinteractions/diffusivitymillingtonquirk.hh @@ -44,6 +44,9 @@ namespace Dumux * \tau = \frac{1}{\phi^2} * \left(\phi S_w\right)^{7/3} * \f] * + * after Millington and Quirk 1961: <i>Permeability of porous solids</i> \cite millington1961 + * and Helmig 1997: <i>Multiphase Flow and Transport Processes in the Subsurface: A Contribution + * to the Modeling of Hydrosystems</i>, page 129 \cite helmig1997 */ template<class Scalar> class DiffusivityMillingtonQuirk diff --git a/dumux/porousmediumflow/1p2c/implicit/properties.hh b/dumux/porousmediumflow/1p2c/implicit/properties.hh index 7736c97a54fc17f4885b886193285e41ce30df05..84848a997d26c5f76f1b064593ae5b090eef3fe6 100644 --- a/dumux/porousmediumflow/1p2c/implicit/properties.hh +++ b/dumux/porousmediumflow/1p2c/implicit/properties.hh @@ -72,6 +72,7 @@ NEW_PROP_TAG(ProblemEnableGravity); //!< Returns whether gravity is considered i NEW_PROP_TAG(UseMoles); //!< Defines whether mole (true) or mass (false) fractions are used NEW_PROP_TAG(Scaling); //!< Defines Scaling of the model NEW_PROP_TAG(SpatialParamsForchCoeff); //!< Property for the forchheimer coefficient +NEW_PROP_TAG(TauTortuosity); //!< Tortuosity value (tau) used in macroscopic diffusion NEW_PROP_TAG(VtkAddVelocity); //!< Returns whether velocity vectors are written into the vtk output } diff --git a/dumux/porousmediumflow/1p2c/implicit/propertydefaults.hh b/dumux/porousmediumflow/1p2c/implicit/propertydefaults.hh index 355dbc51ed7cf547c1c9cc862c63a14d578d22ce..3bfa3bc08cc321bd3f35c60f5e599845056b4b66 100644 --- a/dumux/porousmediumflow/1p2c/implicit/propertydefaults.hh +++ b/dumux/porousmediumflow/1p2c/implicit/propertydefaults.hh @@ -120,6 +120,14 @@ SET_BOOL_PROP(OnePTwoC, ProblemEnableGravity, true); // (Nield, Bejan, Convection in porous media, 2006, p. 10) SET_SCALAR_PROP(OnePTwoC, SpatialParamsForchCoeff, 0.55); +/*! + * \brief default value for tortuosity value (tau) used in macroscopic diffusion + * + * Value is 0.5 according to Carman 1937: <i>Fluid flow through granular beds</i> + * \cite carman1937 + */ +SET_SCALAR_PROP(OnePTwoC, TauTortuosity, 0.5); + //! average is used as default model to compute the effective thermal heat conductivity SET_PROP(OnePTwoCNI, ThermalConductivityModel) { private : diff --git a/dumux/porousmediumflow/2p2c/implicit/properties.hh b/dumux/porousmediumflow/2p2c/implicit/properties.hh index 3f8da55d769ff86a09c5e39c27bffaeb87eb5b2d..aa494f5df69d08fc616179888ae60665c5589f39 100644 --- a/dumux/porousmediumflow/2p2c/implicit/properties.hh +++ b/dumux/porousmediumflow/2p2c/implicit/properties.hh @@ -79,6 +79,7 @@ NEW_PROP_TAG(ReplaceCompEqIdx); //!< The index of the total mass balance equatio NEW_PROP_TAG(VtkAddVelocity); //!< Returns whether velocity vectors are written into the VTK output NEW_PROP_TAG(BaseFluxVariables); //!< The base flux variables NEW_PROP_TAG(SpatialParamsForchCoeff); //!< Property for the forchheimer coefficient +NEW_PROP_TAG(TauTortuosity); //!< Tortuosity value (tau) used in macroscopic diffusion } } diff --git a/dumux/porousmediumflow/2p2c/implicit/propertydefaults.hh b/dumux/porousmediumflow/2p2c/implicit/propertydefaults.hh index 032145d8647f9b28492f8078ed6d7f6f04097a42..23653d9a0c0a6436dede94627edb1c2711250906 100644 --- a/dumux/porousmediumflow/2p2c/implicit/propertydefaults.hh +++ b/dumux/porousmediumflow/2p2c/implicit/propertydefaults.hh @@ -184,6 +184,14 @@ SET_BOOL_PROP(TwoPTwoC, UseConstraintSolver, true); // (Nield, Bejan, Convection in porous media, 2006, p. 10) SET_SCALAR_PROP(TwoPTwoC, SpatialParamsForchCoeff, 0.55); +/*! + * \brief default value for tortuosity value (tau) used in macroscopic diffusion + * + * Value is 0.5 according to Carman 1937: <i>Fluid flow through granular beds</i> + * \cite carman1937 + */ +SET_SCALAR_PROP(TwoPTwoC, TauTortuosity, 0.5); + //! Somerton is used as default model to compute the effective thermal heat conductivity SET_PROP(TwoPTwoCNI, ThermalConductivityModel) { diff --git a/dumux/porousmediumflow/3p3c/implicit/properties.hh b/dumux/porousmediumflow/3p3c/implicit/properties.hh index 52a2762e8cc94ecfa98f31174dd919fe722abd56..f4760715f8e0825b0e73a901030aebce57f2fae2 100644 --- a/dumux/porousmediumflow/3p3c/implicit/properties.hh +++ b/dumux/porousmediumflow/3p3c/implicit/properties.hh @@ -75,6 +75,7 @@ NEW_PROP_TAG(ImplicitMobilityUpwindWeight); //!< Weight for the upwind mobility NEW_PROP_TAG(UseConstraintSolver); //!< Determines whether a constraint solver should be used explicitly NEW_PROP_TAG(BaseFluxVariables); //! The base flux variables NEW_PROP_TAG(SpatialParamsForchCoeff); //!< Property for the forchheimer coefficient +NEW_PROP_TAG(TauTortuosity); //!< Tortuosity value (tau) used in macroscopic diffusion NEW_PROP_TAG(VtkAddVelocity); //!< Returns whether velocity vectors are written into the vtk output } } diff --git a/dumux/porousmediumflow/3p3c/implicit/propertydefaults.hh b/dumux/porousmediumflow/3p3c/implicit/propertydefaults.hh index 020072e7800e0c94a057511536a5711536af1597..43b4f098aa1e0ffdb69cca8561d8f8982dbef751 100644 --- a/dumux/porousmediumflow/3p3c/implicit/propertydefaults.hh +++ b/dumux/porousmediumflow/3p3c/implicit/propertydefaults.hh @@ -163,6 +163,14 @@ SET_BOOL_PROP(ThreePThreeC, ProblemEnableGravity, true); // (Nield, Bejan, Convection in porous media, 2006, p. 10) SET_SCALAR_PROP(BoxModel, SpatialParamsForchCoeff, 0.55); +/*! + * \brief default value for tortuosity value (tau) used in macroscopic diffusion + * + * Value is 0.5 according to Carman 1937: <i>Fluid flow through granular beds</i> + * \cite carman1937 + */ +SET_SCALAR_PROP(ThreePThreeC, TauTortuosity, 0.5); + //! Somerton is used as default model to compute the effective thermal heat conductivity SET_PROP(ThreePThreeCNI, ThermalConductivityModel) { diff --git a/test/material/fluidmatrixinteractions/CMakeLists.txt b/test/material/fluidmatrixinteractions/CMakeLists.txt index b8d2e9804ab554c3016c23e2afd84a4d9d6e126f..59815434cd1311c0c63618b7bed02ee2f0bffe36 100644 --- a/test/material/fluidmatrixinteractions/CMakeLists.txt +++ b/test/material/fluidmatrixinteractions/CMakeLists.txt @@ -9,6 +9,13 @@ add_dumux_test(test_effectivediffusivitymillingtonquirk test_effectivediffusivit ${CMAKE_CURRENT_BINARY_DIR}/millingtonquirk_d_eff.dat --command "${CMAKE_CURRENT_BINARY_DIR}/test_effectivediffusivitymillingtonquirk") +add_dumux_test(test_effectivediffusivityconstant test_effectivediffusivityconstant test_effectivediffusivityconstant.cc + python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + --script exact + --files ${CMAKE_SOURCE_DIR}/test/references/effectivediffusivityconstanttau-reference.dat + ${CMAKE_CURRENT_BINARY_DIR}/constant_d_eff.dat + --command "${CMAKE_CURRENT_BINARY_DIR}/test_effectivediffusivityconstant") + add_dumux_test(test_effectivediffusivityconstanttau test_effectivediffusivityconstanttau test_effectivediffusivityconstanttau.cc python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py --script exact diff --git a/test/material/fluidmatrixinteractions/effectivediffusivityconstantproblem.hh b/test/material/fluidmatrixinteractions/effectivediffusivityconstantproblem.hh new file mode 100644 index 0000000000000000000000000000000000000000..d08b43e34a6814400637383bf961b8a9d1813def --- /dev/null +++ b/test/material/fluidmatrixinteractions/effectivediffusivityconstantproblem.hh @@ -0,0 +1,216 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/***************************************************************************** + * See the file COPYING for full copying permissions. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <http://www.gnu.org/licenses/>. * + *****************************************************************************/ +/*! + * \file + * + * \brief Test for the constant tau effective diffusivity model + */ +#ifndef DUMUX_EFFECTIVE_DIFFUSIVITY_CONSTANT_PROBLEM_HH +#define DUMUX_EFFECTIVE_DIFFUSIVITY_CONSTANT_PROBLEM_HH + +#include <dumux/material/fluidsystems/h2on2.hh> + +#include <dumux/porousmediumflow/2p2c/implicit/model.hh> +#include <dumux/porousmediumflow/implicit/problem.hh> +#include <dumux/material/fluidmatrixinteractions/diffusivityconstant.hh> + +#include "effectivediffusivityspatialparams.hh" + +#define ISOTHERMAL 0 + +namespace Dumux +{ +template <class TypeTag> +class EffectiveDiffusivityConstantProblem; + +namespace Properties +{ +NEW_TYPE_TAG(EffectiveDiffusivityConstantProblem, INHERITS_FROM(BoxModel, TwoPTwoCNI, EffectiveDiffusivitySpatialParams)); + +// Set the grid type +SET_TYPE_PROP(EffectiveDiffusivityConstantProblem, Grid, Dune::YaspGrid<2>); + +// Set the problem property +SET_TYPE_PROP(EffectiveDiffusivityConstantProblem, Problem, EffectiveDiffusivityConstantProblem<TypeTag>); + +// Set the wetting phase +SET_TYPE_PROP(EffectiveDiffusivityConstantProblem, FluidSystem, FluidSystems::H2ON2<typename GET_PROP_TYPE(TypeTag, Scalar), false>); + +// Set thermal conductivity law +SET_TYPE_PROP(EffectiveDiffusivityConstantProblem, EffectiveDiffusivityModel, + DiffusivityConstant<TypeTag>); +} + + +/*! + * \ingroup MaterialTestProblems + * + * \brief Test for the constant tau effective diffusivity model + * + * To run the test execute the following line in shell: + * <tt>./test_effectivediffusivityconstant</tt> + * + */ +template <class TypeTag > +class EffectiveDiffusivityConstantProblem : public ImplicitPorousMediaProblem<TypeTag> +{ + typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; + typedef typename GridView::Grid Grid; + + typedef ImplicitPorousMediaProblem<TypeTag> ParentType; + typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + + // copy some indices for convenience + typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; + enum { + pressureIdx = Indices::pressureIdx, + switchIdx = Indices::switchIdx, + temperatureIdx = Indices::temperatureIdx, + + // Phase State + wPhaseOnly = Indices::wPhaseOnly, + + // Grid and world dimension + dim = GridView::dimension, + dimWorld = GridView::dimensionworld + }; + + typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; + typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; + typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; + + typedef typename GridView::template Codim<0>::Entity Element; + typedef typename GridView::template Codim<dim>::Entity Vertex; + typedef typename GridView::Intersection Intersection; + + typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; + + typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; + + //! property that defines whether mole or mass fractions are used + static const bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles); + +public: + /*! + * \brief The constructor. + * + * \param timeManager The time manager + * \param gridView The grid view + */ + EffectiveDiffusivityConstantProblem(TimeManager &timeManager, const GridView &gridView) + : ParentType(timeManager, gridView) + { + FluidSystem::init(); + this->spatialParams().plotMaterialLaw(); + } + + /*! + * \name Problem parameters + */ + // \{ + + /*! + * \brief The problem name. + * + * This is used as a prefix for files generated by the simulation. + */ + const std::string name() const + { return "test_effectivediffusivity_ct"; } + + + //! \copydoc ImplicitProblem::sourceAtPos() + void sourceAtPos(PrimaryVariables &values, + const GlobalPosition &globalPos) const + { + values = 0; + } + + // \} + + /*! + * \name Boundary conditions + */ + // \{ + + + //! \copydoc ImplicitProblem::boundaryTypesAtPos() + void boundaryTypesAtPos(BoundaryTypes &values, + const GlobalPosition &globalPos) const + { + values.setAllDirichlet(); + } + + + //! \copydoc ImplicitProblem::dirichletAtPos() + void dirichletAtPos(PrimaryVariables &values, const GlobalPosition &globalPos) const + { + initial_(values, globalPos); + } + + + //! \copydoc ImplicitProblem::neumann() + void neumann(PrimaryVariables &values, + const Element &element, + const FVElementGeometry &fvGeometry, + const Intersection &intersection, + const int scvIdx, + const int boundaryFaceIdx) const + { + values = 0; + } + + // \} + + /*! + * \name Volume terms + */ + // \{ + + + //! \copydoc ImplicitProblem::initialAtPos() + void initialAtPos(PrimaryVariables &values, const GlobalPosition &globalPos) const + { + initial_(values, globalPos); + } + + + //! \copydoc InjectionProblem::initialPhasePresence() + int initialPhasePresence(const Vertex &vertex, + int &vIdxGlobal, + const GlobalPosition &globalPos) const + { + return wPhaseOnly; + } + +private: + // internal method for the initial condition (reused for the + // dirichlet conditions!) + void initial_(PrimaryVariables &values, + const GlobalPosition &globalPos) const + { + Scalar densityW = 1000.0; + values[pressureIdx] = 1e5 + globalPos[1]*densityW*9.81; + values[switchIdx] = 0.0; + values[temperatureIdx] = 283.0 + globalPos[1]*0.03; + } +}; +} //end namespace + +#endif diff --git a/test/material/fluidmatrixinteractions/test_effectivediffusivityconstant.cc b/test/material/fluidmatrixinteractions/test_effectivediffusivityconstant.cc new file mode 100644 index 0000000000000000000000000000000000000000..c24548f156a5c66dc7951bb2512f2c84e57b1532 --- /dev/null +++ b/test/material/fluidmatrixinteractions/test_effectivediffusivityconstant.cc @@ -0,0 +1,56 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/***************************************************************************** + * See the file COPYING for full copying permissions. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <http://www.gnu.org/licenses/>. * + *****************************************************************************/ +/*! + * \file + * + * \brief Test for the constant tau effective diffusivity model + */ +#include <config.h> +#include "effectivediffusivityconstantproblem.hh" +#include <dumux/common/start.hh> + +/*! + * \brief Provides an interface for customizing error messages associated with + * reading in parameters. + * + * \param progName The name of the program, that was tried to be started. + * \param errorMsg The error message that was issued by the start function. + * Comprises the thing that went wrong and a general help message. + */ +void usage(const char *progName, const std::string &errorMsg) +{ + if (errorMsg.size() > 0) { + std::string errorMessageOut = "\nUsage: "; + errorMessageOut += progName; + errorMessageOut += " [options]\n"; + errorMessageOut += errorMsg; + errorMessageOut += "\n\nThe list of mandatory options for this program is:\n" + "\t-TimeManager.TEnd End of the simulation [s] \n" + "\t-TimeManager.DtInitial Initial timestep size [s] \n" + "\t definition in DGF format\n"; + + std::cout << errorMessageOut + << "\n"; + } +} + +int main(int argc, char** argv) +{ + return Dumux::start<TTAG(EffectiveDiffusivityConstantProblem)>(argc, argv, usage); +} diff --git a/test/material/fluidmatrixinteractions/test_effectivediffusivityconstant.input b/test/material/fluidmatrixinteractions/test_effectivediffusivityconstant.input new file mode 100644 index 0000000000000000000000000000000000000000..92d3655a0496e544dac90d8a1ed1d04476d49eef --- /dev/null +++ b/test/material/fluidmatrixinteractions/test_effectivediffusivityconstant.input @@ -0,0 +1,13 @@ +[TimeManager] +DtInitial = 1 # [s] +TEnd = 2 # [s] + +[Grid] +UpperRight = 6 4 +Cells = 48 32 + +[Diffusivity] +File = constant + +[] +TauTortuosity = 0.3