diff --git a/dumux/porousmediumflow/nonisothermal/implicit/localresidual.hh b/dumux/porousmediumflow/nonisothermal/implicit/localresidual.hh index 30f8e53a2b6a1152590bc3cbbbe0c7f1de759d99..9f2d08cce5a646b7348410f6f3ff5be875ae548d 100644 --- a/dumux/porousmediumflow/nonisothermal/implicit/localresidual.hh +++ b/dumux/porousmediumflow/nonisothermal/implicit/localresidual.hh @@ -125,7 +125,7 @@ public: FluxVariables& fluxVars, int phaseIdx) { - auto upwindTerm = [phaseIdx](const VolumeVariables& volVars) + auto upwindTerm = [phaseIdx](const auto& volVars) { return volVars.density(phaseIdx)*volVars.mobility(phaseIdx)*volVars.enthalpy(phaseIdx); }; flux[energyEqIdx] += fluxVars.advectiveFlux(phaseIdx, upwindTerm); diff --git a/test/mixeddimension/facet/1p2c_1p2c/1d2dtestproblem.hh b/test/mixeddimension/facet/1p2c_1p2c/1d2dtestproblem.hh index 18e8312ed39f7e8df8aebeb6e997b2deeb5a53f5..37ce2a4242ff898a64d862dbec6421451ce01d1b 100644 --- a/test/mixeddimension/facet/1p2c_1p2c/1d2dtestproblem.hh +++ b/test/mixeddimension/facet/1p2c_1p2c/1d2dtestproblem.hh @@ -35,45 +35,55 @@ namespace Dumux { template <class TypeTag> -class OnePFacetCouplingProblem; +class OnePTwoCFacetCouplingProblem; namespace Properties { -// Type tag of the global Problem and the two sub problems -NEW_TYPE_TAG(OnePFacetCoupling, INHERITS_FROM(MixedDimension)); +// Type tag of the isothermal and non-isotherman global Problem +NEW_TYPE_TAG(OnePTwoCFacetCoupling, INHERITS_FROM(MixedDimension)); +NEW_TYPE_TAG(OnePTwoCIFacetCoupling, INHERITS_FROM(OnePTwoCFacetCoupling)); +NEW_TYPE_TAG(OnePTwoCNIFacetCoupling, INHERITS_FROM(OnePTwoCFacetCoupling)); // Set the problem property -SET_TYPE_PROP(OnePFacetCoupling, Problem, Dumux::OnePFacetCouplingProblem<TypeTag>); +SET_TYPE_PROP(OnePTwoCFacetCoupling, Problem, Dumux::OnePTwoCFacetCouplingProblem<TypeTag>); // Set the grid creator -SET_TYPE_PROP(OnePFacetCoupling, GridCreator, Dumux::GmshDualFacetGridCreator<TypeTag>); +SET_TYPE_PROP(OnePTwoCFacetCoupling, GridCreator, Dumux::GmshDualFacetGridCreator<TypeTag>); // Set the two sub-problems of the global problem -SET_TYPE_PROP(OnePFacetCoupling, BulkProblemTypeTag, TTAG(OnePCCMpfaMatrixProblem)); -SET_TYPE_PROP(OnePFacetCoupling, LowDimProblemTypeTag, TTAG(OnePCCFractureProblem)); +SET_TYPE_PROP(OnePTwoCIFacetCoupling, BulkProblemTypeTag, TTAG(OnePTwoCICCMpfaMatrixProblem)); +SET_TYPE_PROP(OnePTwoCIFacetCoupling, LowDimProblemTypeTag, TTAG(OnePTwoCICCFractureProblem)); +SET_TYPE_PROP(OnePTwoCNIFacetCoupling, BulkProblemTypeTag, TTAG(OnePTwoCNICCMpfaMatrixProblem)); +SET_TYPE_PROP(OnePTwoCNIFacetCoupling, LowDimProblemTypeTag, TTAG(OnePTwoCNICCFractureProblem)); // The coupling manager -SET_TYPE_PROP(OnePFacetCoupling, CouplingManager, CCMpfaFacetCouplingManager<TypeTag>); +SET_TYPE_PROP(OnePTwoCFacetCoupling, CouplingManager, CCMpfaFacetCouplingManager<TypeTag>); // The linear solver to be used -SET_TYPE_PROP(OnePFacetCoupling, LinearSolver, ILU0BiCGSTABBackend<TypeTag>); +SET_TYPE_PROP(OnePTwoCFacetCoupling, LinearSolver, ILU0BiCGSTABBackend<TypeTag>); // The sub-problems need to know the global problem's type tag -SET_TYPE_PROP(OnePCCMpfaMatrixProblem, GlobalProblemTypeTag, TTAG(OnePFacetCoupling)); -SET_TYPE_PROP(OnePCCFractureProblem, GlobalProblemTypeTag, TTAG(OnePFacetCoupling)); +SET_TYPE_PROP(OnePTwoCICCMpfaMatrixProblem, GlobalProblemTypeTag, TTAG(OnePTwoCIFacetCoupling)); +SET_TYPE_PROP(OnePTwoCICCFractureProblem, GlobalProblemTypeTag, TTAG(OnePTwoCIFacetCoupling)); +SET_TYPE_PROP(OnePTwoCNICCMpfaMatrixProblem, GlobalProblemTypeTag, TTAG(OnePTwoCNIFacetCoupling)); +SET_TYPE_PROP(OnePTwoCNICCFractureProblem, GlobalProblemTypeTag, TTAG(OnePTwoCNIFacetCoupling)); // The subproblems inherit the parameter tree from this problem -SET_PROP(OnePCCMpfaMatrixProblem, ParameterTree) : GET_PROP(TTAG(OnePFacetCoupling), ParameterTree) {}; -SET_PROP(OnePCCFractureProblem, ParameterTree) : GET_PROP(TTAG(OnePFacetCoupling), ParameterTree) {}; +SET_PROP(OnePTwoCICCMpfaMatrixProblem, ParameterTree) : GET_PROP(TTAG(OnePTwoCIFacetCoupling), ParameterTree) {}; +SET_PROP(OnePTwoCICCFractureProblem, ParameterTree) : GET_PROP(TTAG(OnePTwoCIFacetCoupling), ParameterTree) {}; +SET_PROP(OnePTwoCNICCMpfaMatrixProblem, ParameterTree) : GET_PROP(TTAG(OnePTwoCNIFacetCoupling), ParameterTree) {}; +SET_PROP(OnePTwoCNICCFractureProblem, ParameterTree) : GET_PROP(TTAG(OnePTwoCNIFacetCoupling), ParameterTree) {}; // Set the grids for the two sub-problems -SET_TYPE_PROP(OnePCCMpfaMatrixProblem, Grid, Dune::ALUGrid<2, 2, Dune::simplex, Dune::nonconforming>); -SET_TYPE_PROP(OnePCCFractureProblem, Grid, Dune::FoamGrid<1,2>); +SET_TYPE_PROP(OnePTwoCICCMpfaMatrixProblem, Grid, Dune::ALUGrid<2, 2, Dune::simplex, Dune::nonconforming>); +SET_TYPE_PROP(OnePTwoCICCFractureProblem, Grid, Dune::FoamGrid<1,2>); +SET_TYPE_PROP(OnePTwoCNICCMpfaMatrixProblem, Grid, Dune::ALUGrid<2, 2, Dune::simplex, Dune::nonconforming>); +SET_TYPE_PROP(OnePTwoCNICCFractureProblem, Grid, Dune::FoamGrid<1,2>); } template <class TypeTag> -class OnePFacetCouplingProblem : public MixedDimensionProblem<TypeTag> +class OnePTwoCFacetCouplingProblem : public MixedDimensionProblem<TypeTag> { using ParentType = MixedDimensionProblem<TypeTag>; @@ -87,7 +97,7 @@ class OnePFacetCouplingProblem : public MixedDimensionProblem<TypeTag> public: - OnePFacetCouplingProblem(TimeManager &timeManager, const BulkGridView &bulkGridView, const LowDimGridView &lowDimGridView) + OnePTwoCFacetCouplingProblem(TimeManager &timeManager, const BulkGridView &bulkGridView, const LowDimGridView &lowDimGridView) : ParentType(timeManager, bulkGridView, lowDimGridView) {} }; diff --git a/test/mixeddimension/facet/1p2c_1p2c/CMakeLists.txt b/test/mixeddimension/facet/1p2c_1p2c/CMakeLists.txt index 59a6400f7fefb2e3a869e203bbd1bb14bc40982b..8e7d474239fecdc5628bc92dde40556ae0e1e2dc 100644 --- a/test/mixeddimension/facet/1p2c_1p2c/CMakeLists.txt +++ b/test/mixeddimension/facet/1p2c_1p2c/CMakeLists.txt @@ -1,3 +1,4 @@ dune_add_test(SOURCES test_fracture_1p2c_1p2c.cc) -dune_symlink_to_source_files(FILES "grids" "test_fracture_1p2c_1p2c.input") +dune_add_test(SOURCES test_fracture_1p2cni_1p2cni.cc) +dune_symlink_to_source_files(FILES "grids" "test_fracture_1p2c_1p2c.input" "test_fracture_1p2cni_1p2cni.input") set(CMAKE_BUILD_TYPE Release) diff --git a/test/mixeddimension/facet/1p2c_1p2c/fractureproblem.hh b/test/mixeddimension/facet/1p2c_1p2c/fractureproblem.hh index 4f825624487741cbf4ff7b2a1cfe5dc3ad17a79e..7790910a6ea6d486a12cb42c22d14205074cc7ce 100644 --- a/test/mixeddimension/facet/1p2c_1p2c/fractureproblem.hh +++ b/test/mixeddimension/facet/1p2c_1p2c/fractureproblem.hh @@ -42,32 +42,41 @@ class OnePTwoCFractureProblem; namespace Properties { -NEW_TYPE_TAG(OnePTwoCFractureProblem, INHERITS_FROM(OnePTwoC)); -NEW_TYPE_TAG(OnePCCFractureProblem, INHERITS_FROM(CCTpfaModel, OnePTwoCFractureProblem)); +NEW_TYPE_TAG(OnePTwoCIFractureProblem, INHERITS_FROM(OnePTwoC)); +NEW_TYPE_TAG(OnePTwoCNIFractureProblem, INHERITS_FROM(OnePTwoCNI)); +NEW_TYPE_TAG(OnePTwoCICCFractureProblem, INHERITS_FROM(CCTpfaModel, OnePTwoCIFractureProblem)); +NEW_TYPE_TAG(OnePTwoCNICCFractureProblem, INHERITS_FROM(CCTpfaModel, OnePTwoCNIFractureProblem)); // Set fluid configuration -SET_TYPE_PROP(OnePTwoCFractureProblem, - FluidSystem, - FluidSystems::H2ON2<typename GET_PROP_TYPE(TypeTag, Scalar), false>); +SET_TYPE_PROP(OnePTwoCIFractureProblem, FluidSystem, FluidSystems::H2ON2<typename GET_PROP_TYPE(TypeTag, Scalar), false>); +SET_TYPE_PROP(OnePTwoCNIFractureProblem, FluidSystem, FluidSystems::H2ON2<typename GET_PROP_TYPE(TypeTag, Scalar), false>); // Set the problem property -SET_TYPE_PROP(OnePTwoCFractureProblem, Problem, OnePTwoCFractureProblem<TypeTag>); +SET_TYPE_PROP(OnePTwoCIFractureProblem, Problem, OnePTwoCFractureProblem<TypeTag>); +SET_TYPE_PROP(OnePTwoCNIFractureProblem, Problem, OnePTwoCFractureProblem<TypeTag>); // Set the spatial parameters -SET_TYPE_PROP(OnePTwoCFractureProblem, SpatialParams, OnePFractureSpatialParams<TypeTag>); +SET_TYPE_PROP(OnePTwoCIFractureProblem, SpatialParams, OnePFractureSpatialParams<TypeTag>); +SET_TYPE_PROP(OnePTwoCNIFractureProblem, SpatialParams, OnePFractureSpatialParams<TypeTag>); // Define whether mole(true) or mass (false) fractions are used -SET_BOOL_PROP(OnePTwoCFractureProblem, UseMoles, true); +SET_BOOL_PROP(OnePTwoCIFractureProblem, UseMoles, true); +SET_BOOL_PROP(OnePTwoCNIFractureProblem, UseMoles, true); // Linear solver settings -SET_TYPE_PROP(OnePTwoCFractureProblem, LinearSolver, SuperLUBackend<TypeTag>); +SET_TYPE_PROP(OnePTwoCIFractureProblem, LinearSolver, SuperLUBackend<TypeTag>); +SET_TYPE_PROP(OnePTwoCNIFractureProblem, LinearSolver, SuperLUBackend<TypeTag>); // Enable gravity -SET_BOOL_PROP(OnePTwoCFractureProblem, ProblemEnableGravity, false); +SET_BOOL_PROP(OnePTwoCIFractureProblem, ProblemEnableGravity, false); +SET_BOOL_PROP(OnePTwoCNIFractureProblem, ProblemEnableGravity, false); // Solution-independent tensor -SET_BOOL_PROP(OnePTwoCFractureProblem, SolutionDependentAdvection, false); -SET_BOOL_PROP(OnePTwoCFractureProblem, SolutionDependentMolecularDiffusion, false); +// SET_BOOL_PROP(OnePTwoCICCFractureProblem, SolutionDependentAdvection, false); +// SET_BOOL_PROP(OnePTwoCNICCFractureProblem, SolutionDependentMolecularDiffusion, false); +// SET_BOOL_PROP(OnePTwoCICCFractureProblem, SolutionDependentAdvection, false); +// SET_BOOL_PROP(OnePTwoCNICCFractureProblem, SolutionDependentMolecularDiffusion, false); +// SET_BOOL_PROP(OnePTwoCNICCFractureProblem, SolutionDependentHeatConduction, false); } /*! @@ -147,7 +156,7 @@ public: * This problem assumes a temperature of 10 degrees Celsius. */ Scalar temperature() const - { return 273.15 + 10; } // 10C + { return 273.15 + 50; } // 50C /*! * \brief Return how much the domain is extruded at a given sub-control volume. @@ -178,7 +187,7 @@ public: BoundaryTypes boundaryTypesAtPos(const GlobalPosition& globalPos) const { BoundaryTypes values; - if (globalPos[0] < eps_ || globalPos[0] > this->bBoxMax()[0] - eps_) + if (globalPos[0] < eps_ /*|| globalPos[0] > this->bBoxMax()[0] - eps_*/) values.setAllDirichlet(); else values.setAllNeumann(); @@ -191,8 +200,8 @@ public: */ PrimaryVariables dirichletAtPos(const GlobalPosition& globalPos) const { - PrimaryVariables values(0.0); - values[pressureIdx] = 2.0e5 - 1.0e5*globalPos[0]/this->bBoxMax()[0]; + auto values = initialAtPos(globalPos); + // values[pressureIdx] = 2.0e5 - 1.0e5*globalPos[0]/this->bBoxMax()[0]; if (globalPos[0] < eps_) values[massOrMoleFracIdx] = 2.0e-5; return values; @@ -202,17 +211,29 @@ public: { return PrimaryVariables(0.0); } /*! - * \brief Evaluate the initial value for a control volume. - * - * For this method, the \a priVars parameter stores primary - * variables. + * \brief Evaluate the initial value for a control volume (isothermal case) */ - PrimaryVariables initialAtPos(const GlobalPosition& globalPos) const + template<class T = TypeTag> + typename std::enable_if<std::is_same<T, TTAG(OnePTwoCICCFractureProblem)>::value, PrimaryVariables>::type + initialAtPos(const GlobalPosition& globalPos) const { - PrimaryVariables priVars(0.0); - priVars[pressureIdx] = 2.0e5 - 1.0e5*globalPos[0]/this->bBoxMax()[0]; - return priVars; - }; + PrimaryVariables values(0.0); + values[pressureIdx] = 1.0e5; + return values; + } + + /*! + * \brief Evaluate the initial value for a control volume (non-isothermal case) + */ + template<class T = TypeTag> + typename std::enable_if<std::is_same<T, TTAG(OnePTwoCNICCFractureProblem)>::value, PrimaryVariables>::type + initialAtPos(const GlobalPosition& globalPos) const + { + PrimaryVariables values(0.0); + values[pressureIdx] = 1.0e5; + values[Indices::temperatureIdx] = temperature(); + return values; + } //! Set the coupling manager void setCouplingManager(std::shared_ptr<CouplingManager> cm) diff --git a/test/mixeddimension/facet/1p2c_1p2c/fracturespatialparams.hh b/test/mixeddimension/facet/1p2c_1p2c/fracturespatialparams.hh index 870c14052adb29afb7fb4a9d1c9e4d645b7f4320..41e2f25494aa858169e727094d26ddd3cc77c9ac 100644 --- a/test/mixeddimension/facet/1p2c_1p2c/fracturespatialparams.hh +++ b/test/mixeddimension/facet/1p2c_1p2c/fracturespatialparams.hh @@ -84,6 +84,46 @@ public: Scalar porosityAtPos(const GlobalPosition& globalPos) const { return 0.8; } + /*! + * \brief Returns the heat capacity \f$[J / (kg K)]\f$ of the rock matrix. + * + * This is only required for non-isothermal models. + * + * \param element The element + * \param scv The sub control volume + * \param elemSol The element solution vector + */ + Scalar solidHeatCapacity(const Element &element, + const SubControlVolume& scv, + const ElementSolutionVector& elemSol) const + { return 790; /*specific heat capacity of granite [J / (kg K)]*/ } + + /*! + * \brief Returns the mass density \f$[kg / m^3]\f$ of the rock matrix. + * + * This is only required for non-isothermal models. + * + * \param element The element + * \param scv The sub control volume + * \param elemSol The element solution vector + */ + Scalar solidDensity(const Element &element, + const SubControlVolume& scv, + const ElementSolutionVector& elemSol) const + { return 2700; /*density of granite [kg/m^3]*/ } + + /*! + * \brief Returns the thermal conductivity \f$\mathrm{[W/(m K)]}\f$ of the porous material. + * + * \param element The element + * \param scv The sub control volume + * \param elemSol The element solution vector + */ + Scalar solidThermalConductivity(const Element &element, + const SubControlVolume& scv, + const ElementSolutionVector& elemSol) const + { return 2.8; } + private: Scalar permeability_; }; diff --git a/test/mixeddimension/facet/1p2c_1p2c/matrixproblem.hh b/test/mixeddimension/facet/1p2c_1p2c/matrixproblem.hh index d3697a30ad58fdd7f239bd500a024b7d93032229..ad434a0420b1e66d5f80cc972df13304ef61f6c9 100644 --- a/test/mixeddimension/facet/1p2c_1p2c/matrixproblem.hh +++ b/test/mixeddimension/facet/1p2c_1p2c/matrixproblem.hh @@ -41,32 +41,41 @@ class OnePTwoCMpfaMatrixProblem; namespace Properties { -NEW_TYPE_TAG(OnePTwoCMatrixProblem, INHERITS_FROM(OnePTwoC)); -NEW_TYPE_TAG(OnePCCMpfaMatrixProblem, INHERITS_FROM(FacetCouplingBulkMpfaModel, OnePTwoCMatrixProblem)); +NEW_TYPE_TAG(OnePTwoCIMatrixProblem, INHERITS_FROM(OnePTwoC)); +NEW_TYPE_TAG(OnePTwoCNIMatrixProblem, INHERITS_FROM(OnePTwoCNI)); +NEW_TYPE_TAG(OnePTwoCICCMpfaMatrixProblem, INHERITS_FROM(FacetCouplingBulkMpfaModel, OnePTwoCIMatrixProblem)); +NEW_TYPE_TAG(OnePTwoCNICCMpfaMatrixProblem, INHERITS_FROM(FacetCouplingBulkMpfaModel, OnePTwoCNIMatrixProblem)); // Set fluid configuration -SET_TYPE_PROP(OnePTwoCMatrixProblem, - FluidSystem, - FluidSystems::H2ON2<typename GET_PROP_TYPE(TypeTag, Scalar), false>); +SET_TYPE_PROP(OnePTwoCIMatrixProblem, FluidSystem, FluidSystems::H2ON2<typename GET_PROP_TYPE(TypeTag, Scalar), false>); +SET_TYPE_PROP(OnePTwoCNIMatrixProblem, FluidSystem, FluidSystems::H2ON2<typename GET_PROP_TYPE(TypeTag, Scalar), false>); // Set the problem property -SET_TYPE_PROP(OnePTwoCMatrixProblem, Problem, OnePTwoCMpfaMatrixProblem<TypeTag>); +SET_TYPE_PROP(OnePTwoCIMatrixProblem, Problem, OnePTwoCMpfaMatrixProblem<TypeTag>); +SET_TYPE_PROP(OnePTwoCNIMatrixProblem, Problem, OnePTwoCMpfaMatrixProblem<TypeTag>); // Define whether mole(true) or mass (false) fractions are used -SET_BOOL_PROP(OnePTwoCMatrixProblem, UseMoles, true); +SET_BOOL_PROP(OnePTwoCIMatrixProblem, UseMoles, true); +SET_BOOL_PROP(OnePTwoCNIMatrixProblem, UseMoles, true); // Set the spatial parameters -SET_TYPE_PROP(OnePTwoCMatrixProblem, SpatialParams, OnePMatrixSpatialParams<TypeTag>); +SET_TYPE_PROP(OnePTwoCIMatrixProblem, SpatialParams, OnePMatrixSpatialParams<TypeTag>); +SET_TYPE_PROP(OnePTwoCNIMatrixProblem, SpatialParams, OnePMatrixSpatialParams<TypeTag>); // Linear solver settings -SET_TYPE_PROP(OnePTwoCMatrixProblem, LinearSolver, SuperLUBackend<TypeTag>); +SET_TYPE_PROP(OnePTwoCIMatrixProblem, LinearSolver, SuperLUBackend<TypeTag>); +SET_TYPE_PROP(OnePTwoCNIMatrixProblem, LinearSolver, SuperLUBackend<TypeTag>); // Enable gravity -SET_BOOL_PROP(OnePTwoCMatrixProblem, ProblemEnableGravity, false); +SET_BOOL_PROP(OnePTwoCIMatrixProblem, ProblemEnableGravity, false); +SET_BOOL_PROP(OnePTwoCNIMatrixProblem, ProblemEnableGravity, false); // Solution-independent tensor -SET_BOOL_PROP(OnePTwoCMatrixProblem, SolutionDependentAdvection, false); -SET_BOOL_PROP(OnePTwoCMatrixProblem, SolutionDependentMolecularDiffusion, false); +// SET_BOOL_PROP(OnePTwoCICCMpfaMatrixProblem, SolutionDependentAdvection, false); +// SET_BOOL_PROP(OnePTwoCNICCMpfaMatrixProblem, SolutionDependentMolecularDiffusion, false); +// SET_BOOL_PROP(OnePTwoCICCMpfaMatrixProblem, SolutionDependentAdvection, false); +// SET_BOOL_PROP(OnePTwoCNICCMpfaMatrixProblem, SolutionDependentMolecularDiffusion, false); +// SET_BOOL_PROP(OnePTwoCNICCMpfaMatrixProblem, SolutionDependentHeatConduction, false); // change mpfa method //SET_PROP(OnePMatrixProblem, MpfaMethod) { static const MpfaMethods value = MpfaMethods::lMethod; }; @@ -153,7 +162,7 @@ public: * This problem assumes a temperature of 10 degrees Celsius. */ Scalar temperature() const - { return 273.15 + 10; } + { return 273.15 + 40; } /*! * \brief Return the sources within the domain. @@ -171,7 +180,7 @@ public: const auto globalPos = scvf.ipGlobal(); values.setAllNeumann(); - if (globalPos[1] > this->bBoxMax()[1] - eps_) + if (globalPos[1] < eps_ && globalPos[1] > this->bBoxMax()[1] - eps_) values.setAllDirichlet(); if (couplingManager().isInteriorBoundary(element, scvf)) @@ -192,8 +201,7 @@ public: */ PrimaryVariables dirichletAtPos(const GlobalPosition& globalPos) const { - PrimaryVariables values(0.0); - values[pressureIdx] = 1.0 + 0.5*globalPos[1]; + PrimaryVariables values = initialAtPos(globalPos); return values; } @@ -205,12 +213,27 @@ public: { return PrimaryVariables(0.0); } /*! - * \brief Evaluate the initial value for a control volume. + * \brief Evaluate the initial value for a control volume (isothermal case) + */ + template<class T = TypeTag> + typename std::enable_if<std::is_same<T, TTAG(OnePTwoCICCMpfaMatrixProblem)>::value, PrimaryVariables>::type + initialAtPos(const GlobalPosition& globalPos) const + { + PrimaryVariables values(0.0); + values[pressureIdx] = 1.0e5; // + 1.0e5*globalPos[1]/this->bBoxMax()[1]; + return values; + } + + /*! + * \brief Evaluate the initial value for a control volume (non-isothermal case) */ - PrimaryVariables initialAtPos(const GlobalPosition& globalPos) const + template<class T = TypeTag> + typename std::enable_if<std::is_same<T, TTAG(OnePTwoCNICCMpfaMatrixProblem)>::value, PrimaryVariables>::type + initialAtPos(const GlobalPosition& globalPos) const { PrimaryVariables values(0.0); - values[pressureIdx] = 1.0e5 + 1.0e5*globalPos[1]/this->bBoxMax()[1]; + values[pressureIdx] = 1.0e5; // + 1.0e5*globalPos[1]/this->bBoxMax()[1]; + values[Indices::temperatureIdx] = temperature(); return values; } diff --git a/test/mixeddimension/facet/1p2c_1p2c/matrixspatialparams.hh b/test/mixeddimension/facet/1p2c_1p2c/matrixspatialparams.hh index deb803cf7ad31b0f369cc4532b46edd3770bd1a5..e4c0a49d6c65daba98df9eee3a8dff92a945f20b 100644 --- a/test/mixeddimension/facet/1p2c_1p2c/matrixspatialparams.hh +++ b/test/mixeddimension/facet/1p2c_1p2c/matrixspatialparams.hh @@ -91,6 +91,45 @@ public: Scalar porosityAtPos(const GlobalPosition& globalPos) const { return 0.2; } + /*! + * \brief Returns the heat capacity \f$[J / (kg K)]\f$ of the rock matrix. + * + * This is only required for non-isothermal models. + * + * \param element The element + * \param scv The sub control volume + * \param elemSol The element solution vector + */ + Scalar solidHeatCapacity(const Element &element, + const SubControlVolume& scv, + const ElementSolutionVector& elemSol) const + { return 790; /*specific heat capacity of granite [J / (kg K)]*/ } + + /*! + * \brief Returns the mass density \f$[kg / m^3]\f$ of the rock matrix. + * + * This is only required for non-isothermal models. + * + * \param element The element + * \param scv The sub control volume + * \param elemSol The element solution vector + */ + Scalar solidDensity(const Element &element, + const SubControlVolume& scv, + const ElementSolutionVector& elemSol) const + { return 2700; /*density of granite [kg/m^3]*/ } + + /*! + * \brief Returns the thermal conductivity \f$\mathrm{[W/(m K)]}\f$ of the porous material. + * + * \param element The element + * \param scv The sub control volume + * \param elemSol The element solution vector + */ + Scalar solidThermalConductivity(const Element &element, + const SubControlVolume& scv, + const ElementSolutionVector& elemSol) const + { return 2.8; } private: Tensor K_; diff --git a/test/mixeddimension/facet/1p2c_1p2c/test_fracture_1p2c_1p2c.cc b/test/mixeddimension/facet/1p2c_1p2c/test_fracture_1p2c_1p2c.cc index 2aed429e429e8c63542bc0f0e94f1e4d95dab2ea..40bba0e65f42812e9f0216649f725235b9d07d4c 100644 --- a/test/mixeddimension/facet/1p2c_1p2c/test_fracture_1p2c_1p2c.cc +++ b/test/mixeddimension/facet/1p2c_1p2c/test_fracture_1p2c_1p2c.cc @@ -40,6 +40,6 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { - typedef TTAG(OnePFacetCoupling) ProblemTypeTag; + typedef TTAG(OnePTwoCIFacetCoupling) ProblemTypeTag; return Dumux::start<ProblemTypeTag>(argc, argv, usage); } diff --git a/test/mixeddimension/facet/1p2c_1p2c/test_fracture_1p2cni_1p2cni.cc b/test/mixeddimension/facet/1p2c_1p2c/test_fracture_1p2cni_1p2cni.cc new file mode 100644 index 0000000000000000000000000000000000000000..4dac2687e96f895996a21ac04364de8527c6d5ac --- /dev/null +++ b/test/mixeddimension/facet/1p2c_1p2c/test_fracture_1p2cni_1p2cni.cc @@ -0,0 +1,45 @@ +// -*- 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 1d 3d cell-centered coupled model + */ +#include "config.h" +#include "1d2dtestproblem.hh" +#include <dumux/mixeddimension/facet/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) +{ + // TODO +} + +int main(int argc, char** argv) +{ + typedef TTAG(OnePTwoCNIFacetCoupling) ProblemTypeTag; + return Dumux::start<ProblemTypeTag>(argc, argv, usage); +} diff --git a/test/mixeddimension/facet/1p2c_1p2c/test_fracture_1p2cni_1p2cni.input b/test/mixeddimension/facet/1p2c_1p2c/test_fracture_1p2cni_1p2cni.input new file mode 100644 index 0000000000000000000000000000000000000000..afad3955e811cfb1fc608d6251194e03c13fc4e4 --- /dev/null +++ b/test/mixeddimension/facet/1p2c_1p2c/test_fracture_1p2cni_1p2cni.input @@ -0,0 +1,32 @@ +[TimeManager] +DtInitial = 1 # [s] +TEnd = 10000000 # [s] +DtInitialBulkProblem = 1 # [s] +DtInitialLowDimProblem = 1 # [s] +EpisodeTime = 1000 # [s] + +[Grid] +File = ./grids/simplefracture_long.msh + +[Problem] +Name = test_1dfracture_ni + +[MixedDimension] +UseIterativeSolver = False + +[IterativeAlgorithm] +MaxIterations = 100 +Tolerance = 1.0e-8 +Verbose = 1 + +[SpatialParams] +FractureAperture = 1e-1 # [m] +FracturePermeability = 1e-12 # [m^2] +MatrixPermeability = 1e-14 # [m^2] + +[Vtk] +AddVelocity = False + +[Newton] +MaxRelativeShift = 1e-5 +MaxSteps = 20