diff --git a/dumux/porousmediumflow/1pnc/implicit/properties.hh b/dumux/porousmediumflow/1pnc/implicit/properties.hh index 519c324ab77f6d0e858bbe36113130ab30fbed35..f6295977c08be5b78a6e91ec964c772b4bebb3d8 100644 --- a/dumux/porousmediumflow/1pnc/implicit/properties.hh +++ b/dumux/porousmediumflow/1pnc/implicit/properties.hh @@ -34,13 +34,14 @@ #include <dumux/material/components/nullcomponent.hh> #include <dumux/material/fluidmatrixinteractions/1p/thermalconductivityaverage.hh> -#include <dumux/material/fluidstates/immiscible.hh> +#include <dumux/material/fluidstates/compositional.hh> #include <dumux/material/fluidsystems/liquidphase.hh> #include <dumux/material/fluidsystems/1p.hh> #include <dumux/porousmediumflow/properties.hh> -#include <dumux/porousmediumflow/immiscible/localresidual.hh> +#include <dumux/porousmediumflow/compositional/localresidual.hh> #include <dumux/porousmediumflow/nonisothermal/implicit/properties.hh> +#include <dumux/material/fluidmatrixinteractions/diffusivitymillingtonquirk.hh> #include "indices.hh" #include "volumevariables.hh" @@ -112,7 +113,13 @@ SET_PROP(OnePNC, FluidState){ using type = Dumux::CompositionalFluidState<Scalar, FluidSystem>; }; +//! Use the model after Millington (1961) for the effective diffusivity +SET_TYPE_PROP(OnePNC, EffectiveDiffusivityModel, + DiffusivityMillingtonQuirk<typename GET_PROP_TYPE(TypeTag, Scalar)>); + +SET_INT_PROP(OnePNC, NumPhases, 1); //! The number of phases in the 1pnc model is 1 +SET_INT_PROP(OnePNC, PhaseIdx, 0); //! The default phase index SET_TYPE_PROP(OnePNC, LocalResidual, CompositionalLocalResidual<TypeTag>); //! The local residual function SET_TYPE_PROP(OnePNC, VolumeVariables, OnePNCVolumeVariables<TypeTag>); //! the VolumeVariables property SET_BOOL_PROP(OnePNC, EnableAdvection, true); //! The one-phase model considers advection diff --git a/dumux/porousmediumflow/1pnc/implicit/volumevariables.hh b/dumux/porousmediumflow/1pnc/implicit/volumevariables.hh index 14ebb93cd513e9dd43b8ccfabbba2e8cb7675ed1..5d0509de2084f62380aa7682116adbf2c0658605 100644 --- a/dumux/porousmediumflow/1pnc/implicit/volumevariables.hh +++ b/dumux/porousmediumflow/1pnc/implicit/volumevariables.hh @@ -34,11 +34,6 @@ namespace Dumux { -namespace Properties -{ -NEW_PROP_TAG(IsothermalVolumeVariables); -} - /*! * \ingroup OnePNCModel * \ingroup ImplicitVolumeVariables diff --git a/dumux/porousmediumflow/1pnc/implicit/vtkoutputfields.hh b/dumux/porousmediumflow/1pnc/implicit/vtkoutputfields.hh index b9e0dd765b700b0cfd30fa0c78150017b6ef174a..ea203c3f0cd35f4e5e208d73b8a198e1c3685c13 100644 --- a/dumux/porousmediumflow/1pnc/implicit/vtkoutputfields.hh +++ b/dumux/porousmediumflow/1pnc/implicit/vtkoutputfields.hh @@ -34,6 +34,7 @@ template<class TypeTag> class OnePNCVtkOutputFields { using Indices = typename GET_PROP_TYPE(TypeTag, Indices); + using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); static constexpr int numComponents = GET_PROP_VALUE(TypeTag, NumComponents); static constexpr int phaseIdx = GET_PROP_VALUE(TypeTag, PhaseIdx); diff --git a/test/porousmediumflow/1pnc/implicit/1pnctestproblem.hh b/test/porousmediumflow/1pnc/implicit/1pnctestproblem.hh index dd5d954dc9c1f030c51e5736f0ed2d031db4f148..6ce4c1397609c0a6dbe89ccc1856d9caa87a8f1d 100644 --- a/test/porousmediumflow/1pnc/implicit/1pnctestproblem.hh +++ b/test/porousmediumflow/1pnc/implicit/1pnctestproblem.hh @@ -24,11 +24,11 @@ #ifndef DUMUX_1PNC_TEST_PROBLEM_HH #define DUMUX_1PNC_TEST_PROBLEM_HH -#include <dumux/implicit/box/properties.hh> -#include <dumux/implicit/cellcentered/tpfa/properties.hh> -#include <dumux/implicit/cellcentered/mpfa/properties.hh> +#include <dumux/discretization/cellcentered/tpfa/properties.hh> +#include <dumux/discretization/cellcentered/mpfa/properties.hh> +#include <dumux/discretization/box/properties.hh> #include <dumux/porousmediumflow/1pnc/implicit/model.hh> -#include <dumux/porousmediumflow/implicit/problem.hh> +#include <dumux/porousmediumflow/problem.hh> #include <dumux/material/fluidsystems/h2on2.hh> #include "1pnctestspatialparams.hh" @@ -74,12 +74,6 @@ SET_TYPE_PROP(OnePNCTestProblem, SpatialParams, OnePNCTestSpatialParams<TypeTag> // Define whether mole(true) or mass (false) fractions are used SET_BOOL_PROP(OnePNCTestProblem, UseMoles, true); - -// Enable velocity output -SET_BOOL_PROP(OnePNCTestProblem, VtkAddVelocity, true); - -// Disable gravity -SET_BOOL_PROP(OnePNCTestProblem, ProblemEnableGravity, false); } @@ -110,17 +104,17 @@ SET_BOOL_PROP(OnePNCTestProblem, ProblemEnableGravity, false); * <tt>./test_cc1pnc -parameterFile ./test_cc1pnc.input</tt> */ template <class TypeTag> -class OnePNCTestProblem : public ImplicitPorousMediaProblem<TypeTag> +class OnePNCTestProblem : public PorousMediumFlowProblem<TypeTag> { - using ParentType = ImplicitPorousMediaProblem<TypeTag>; + using ParentType = PorousMediumFlowProblem<TypeTag>; using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); using Indices = typename GET_PROP_TYPE(TypeTag, Indices); using GridView = typename GET_PROP_TYPE(TypeTag, GridView); using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); + using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); // copy some indices for convenience enum @@ -147,14 +141,12 @@ class OnePNCTestProblem : public ImplicitPorousMediaProblem<TypeTag> using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; public: - OnePNCTestProblem(TimeManager &timeManager, const GridView &gridView) - : ParentType(timeManager, gridView) + OnePNCTestProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry) + : ParentType(fvGridGeometry) { //initialize fluid system FluidSystem::init(); - name_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Problem, Name); - // stating in the console whether mole or mass fractions are used if(useMoles) std::cout<<"problem uses mole fractions"<<std::endl; @@ -167,16 +159,6 @@ public: */ // \{ - /*! - * \brief The problem name. - * - * This is used as a prefix for files generated by the simulation. - */ - const std::string& name() const - { - return name_; - } - #if !NONISOTHERMAL /*! * \brief Returns the temperature within the domain [K]. @@ -205,7 +187,7 @@ public: { BoundaryTypes values; - if(globalPos[0] < eps_ || globalPos[0] > this->bBoxMax()[0] - eps_) + if(globalPos[0] < eps_ || globalPos[0] > this->fvGridGeometry().bBoxMax()[0] - eps_) values.setAllDirichlet(); else values.setAllNeumann(); diff --git a/test/porousmediumflow/1pnc/implicit/1pnctestspatialparams.hh b/test/porousmediumflow/1pnc/implicit/1pnctestspatialparams.hh index 40fd7f4fccb62eed26163661433d518b0cdd6b68..f07615368c73f6eb1e72bb397645bda33ac2183f 100644 --- a/test/porousmediumflow/1pnc/implicit/1pnctestspatialparams.hh +++ b/test/porousmediumflow/1pnc/implicit/1pnctestspatialparams.hh @@ -55,8 +55,8 @@ public: // export permeability type using PermeabilityType = Scalar; - OnePNCTestSpatialParams(const Problem& problem, const GridView &gridView) - : ParentType(problem, gridView) + OnePNCTestSpatialParams(const Problem& problem) + : ParentType(problem) { permeability_ = 1e-10; porosity_ = 0.4; diff --git a/test/porousmediumflow/1pnc/implicit/CMakeLists.txt b/test/porousmediumflow/1pnc/implicit/CMakeLists.txt index 5247963569375c7818633caa684c14d041233459..9414d0ace4c8b187cb98a59b54e6b32c64b5291b 100644 --- a/test/porousmediumflow/1pnc/implicit/CMakeLists.txt +++ b/test/porousmediumflow/1pnc/implicit/CMakeLists.txt @@ -2,7 +2,7 @@ add_input_file_links() dune_add_test(NAME test_1pnc_box SOURCES test_1pnc.cc - COMPILE_DEFINITIONS TYPETAG=OnePNCBox + COMPILE_DEFINITIONS TYPETAG=OnePNCTestBoxProblem COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/1ptestcc-reference.vtu diff --git a/test/porousmediumflow/1pnc/implicit/test_box1pnc.input b/test/porousmediumflow/1pnc/implicit/test_box1pnc.input index 56c07d20438a6e9f047d541d460ac1bc72dd5f01..da81d0709316f2bea7d129faad18037a197e01f0 100644 --- a/test/porousmediumflow/1pnc/implicit/test_box1pnc.input +++ b/test/porousmediumflow/1pnc/implicit/test_box1pnc.input @@ -1,4 +1,4 @@ -[TimeManager] +[TimeLoop] DtInitial = 1 # [s] TEnd = 100 # [s]