mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #617 from OPM/replace-property-macro-calls
Replace property macro calls
This commit is contained in:
commit
4e189a28df
@ -50,8 +50,8 @@ namespace Ewoms {
|
||||
std::ostream& dgfFile,
|
||||
const unsigned precision = 16 )
|
||||
{
|
||||
typedef double Scalar;
|
||||
typedef Dune::FieldVector< Scalar, 2 > GlobalPosition;
|
||||
using Scalar = double;
|
||||
using GlobalPosition = Dune::FieldVector< Scalar, 2 >;
|
||||
enum ParseMode { Vertex, Edge, Element, Finished };
|
||||
std::vector< std::pair<GlobalPosition, unsigned> > vertexPos;
|
||||
std::vector<std::pair<unsigned, unsigned> > edges;
|
||||
|
@ -38,37 +38,49 @@
|
||||
#include "problems/co2injectionflash.hh"
|
||||
#include "problems/co2injectionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionFlashEcfvProblem, INHERITS_FROM(FlashModel, Co2InjectionBaseProblem));
|
||||
SET_TAG_PROP(Co2InjectionFlashEcfvProblem, SpatialDiscretizationSplice, EcfvDiscretization);
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct Co2InjectionFlashEcfvProblem { using InheritsFrom = std::tuple<Co2InjectionBaseProblem, FlashModel>; };
|
||||
} // end namespace TTag
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Co2InjectionFlashEcfvProblem> { using type = TTag::EcfvDiscretization; };
|
||||
|
||||
// use automatic differentiation for this simulator
|
||||
SET_TAG_PROP(Co2InjectionFlashEcfvProblem, LocalLinearizerSplice, AutoDiffLocalLinearizer);
|
||||
template<class TypeTag>
|
||||
struct LocalLinearizerSplice<TypeTag, TTag::Co2InjectionFlashEcfvProblem> { using type = TTag::AutoDiffLocalLinearizer; };
|
||||
|
||||
// use the flash solver adapted to the CO2 injection problem
|
||||
SET_TYPE_PROP(
|
||||
Co2InjectionFlashEcfvProblem, FlashSolver,
|
||||
Opm::Co2InjectionFlash<typename GET_PROP_TYPE(TypeTag, Scalar),
|
||||
typename GET_PROP_TYPE(TypeTag, FluidSystem)>);
|
||||
template<class TypeTag>
|
||||
struct FlashSolver<TypeTag, TTag::Co2InjectionFlashEcfvProblem>
|
||||
{ using type = Opm::Co2InjectionFlash<GetPropType<TypeTag, Properties::Scalar>,
|
||||
GetPropType<TypeTag, Properties::FluidSystem>>; };
|
||||
|
||||
// the flash model has serious problems with the numerical
|
||||
// precision. if quadruple precision math is available, we use it,
|
||||
// else we increase the tolerance of the Newton solver
|
||||
#if HAVE_QUAD
|
||||
SET_TYPE_PROP(Co2InjectionFlashEcfvProblem, Scalar, quad);
|
||||
template<class TypeTag>
|
||||
struct Scalar<TypeTag, TTag::Co2InjectionFlashEcfvProblem> { using type = quad; };
|
||||
|
||||
// the default linear solver used for this problem (-> AMG) cannot be used with quadruple
|
||||
// precision scalars... (this seems to only apply to Dune >= 2.4)
|
||||
SET_TAG_PROP(Co2InjectionFlashEcfvProblem, LinearSolverSplice, ParallelBiCGStabLinearSolver);
|
||||
template<class TypeTag>
|
||||
struct LinearSolverSplice<TypeTag, TTag::Co2InjectionFlashEcfvProblem> { using type = TTag::ParallelBiCGStabLinearSolver; };
|
||||
#else
|
||||
SET_SCALAR_PROP(Co2InjectionFlashEcfvProblem, NewtonTolerance, 1e-5);
|
||||
template<class TypeTag>
|
||||
struct NewtonTolerance<TypeTag, TTag::Co2InjectionFlashEcfvProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1e-5;
|
||||
};
|
||||
#endif
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(Co2InjectionFlashEcfvProblem) EcfvProblemTypeTag;
|
||||
using EcfvProblemTypeTag = Opm::Properties::TTag::Co2InjectionFlashEcfvProblem;
|
||||
return Opm::start<EcfvProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -35,39 +35,52 @@
|
||||
#include "problems/co2injectionflash.hh"
|
||||
#include "problems/co2injectionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionFlashNiEcfvProblem, INHERITS_FROM(FlashModel, Co2InjectionBaseProblem));
|
||||
SET_TAG_PROP(Co2InjectionFlashNiEcfvProblem, SpatialDiscretizationSplice, EcfvDiscretization);
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct Co2InjectionFlashNiEcfvProblem { using InheritsFrom = std::tuple<Co2InjectionBaseProblem, FlashModel>; };
|
||||
} // end namespace TTag
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Co2InjectionFlashNiEcfvProblem> { using type = TTag::EcfvDiscretization; };
|
||||
|
||||
SET_BOOL_PROP(Co2InjectionFlashNiEcfvProblem, EnableEnergy, true);
|
||||
template<class TypeTag>
|
||||
struct EnableEnergy<TypeTag, TTag::Co2InjectionFlashNiEcfvProblem> { static constexpr bool value = true; };
|
||||
|
||||
//! Use automatic differentiation to linearize the system of PDEs
|
||||
SET_TAG_PROP(Co2InjectionFlashNiEcfvProblem, LocalLinearizerSplice, AutoDiffLocalLinearizer);
|
||||
template<class TypeTag>
|
||||
struct LocalLinearizerSplice<TypeTag, TTag::Co2InjectionFlashNiEcfvProblem> { using type = TTag::AutoDiffLocalLinearizer; };
|
||||
|
||||
// use the CO2 injection problem adapted flash solver
|
||||
SET_TYPE_PROP(
|
||||
Co2InjectionFlashNiEcfvProblem, FlashSolver,
|
||||
Opm::Co2InjectionFlash<typename GET_PROP_TYPE(TypeTag, Scalar),
|
||||
typename GET_PROP_TYPE(TypeTag, FluidSystem)>);
|
||||
template<class TypeTag>
|
||||
struct FlashSolver<TypeTag, TTag::Co2InjectionFlashNiEcfvProblem>
|
||||
{ using type = Opm::Co2InjectionFlash<GetPropType<TypeTag, Properties::Scalar>,
|
||||
GetPropType<TypeTag, Properties::FluidSystem>>; };
|
||||
|
||||
// the flash model has serious problems with the numerical
|
||||
// precision. if quadruple precision math is available, we use it,
|
||||
// else we increase the tolerance of the Newton solver
|
||||
#if HAVE_QUAD
|
||||
SET_TYPE_PROP(Co2InjectionFlashNiEcfvProblem, Scalar, quad);
|
||||
template<class TypeTag>
|
||||
struct Scalar<TypeTag, TTag::Co2InjectionFlashNiEcfvProblem> { using type = quad; };
|
||||
|
||||
// the default linear solver used for this problem (-> AMG) cannot be used with quadruple
|
||||
// precision scalars... (this seems to only apply to Dune >= 2.4)
|
||||
SET_TAG_PROP(Co2InjectionFlashNiEcfvProblem, LinearSolverSplice, ParallelBiCGStabLinearSolver);
|
||||
template<class TypeTag>
|
||||
struct LinearSolverSplice<TypeTag, TTag::Co2InjectionFlashNiEcfvProblem> { using type = TTag::ParallelBiCGStabLinearSolver; };
|
||||
#else
|
||||
SET_SCALAR_PROP(Co2InjectionFlashNiEcfvProblem, NewtonTolerance, 1e-5);
|
||||
template<class TypeTag>
|
||||
struct NewtonTolerance<TypeTag, TTag::Co2InjectionFlashNiEcfvProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1e-5;
|
||||
};
|
||||
#endif
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(Co2InjectionFlashNiEcfvProblem) EcfvProblemTypeTag;
|
||||
using EcfvProblemTypeTag = Opm::Properties::TTag::Co2InjectionFlashNiEcfvProblem;
|
||||
return Opm::start<EcfvProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -35,36 +35,48 @@
|
||||
#include "problems/co2injectionflash.hh"
|
||||
#include "problems/co2injectionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionFlashNiVcfvProblem, INHERITS_FROM(FlashModel, Co2InjectionBaseProblem));
|
||||
SET_TAG_PROP(Co2InjectionFlashNiVcfvProblem, SpatialDiscretizationSplice, VcfvDiscretization);
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct Co2InjectionFlashNiVcfvProblem { using InheritsFrom = std::tuple<Co2InjectionBaseProblem, FlashModel>; };
|
||||
} // end namespace TTag
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Co2InjectionFlashNiVcfvProblem> { using type = TTag::VcfvDiscretization; };
|
||||
|
||||
SET_BOOL_PROP(Co2InjectionFlashNiVcfvProblem, EnableEnergy, true);
|
||||
template<class TypeTag>
|
||||
struct EnableEnergy<TypeTag, TTag::Co2InjectionFlashNiVcfvProblem> { static constexpr bool value = true; };
|
||||
|
||||
// use the CO2 injection problem adapted flash solver
|
||||
SET_TYPE_PROP(
|
||||
Co2InjectionFlashNiVcfvProblem, FlashSolver,
|
||||
Opm::Co2InjectionFlash<typename GET_PROP_TYPE(TypeTag, Scalar),
|
||||
typename GET_PROP_TYPE(TypeTag, FluidSystem)>);
|
||||
template<class TypeTag>
|
||||
struct FlashSolver<TypeTag, TTag::Co2InjectionFlashNiVcfvProblem>
|
||||
{ using type = Opm::Co2InjectionFlash<GetPropType<TypeTag, Properties::Scalar>,
|
||||
GetPropType<TypeTag, Properties::FluidSystem>>; };
|
||||
|
||||
// the flash model has serious problems with the numerical
|
||||
// precision. if quadruple precision math is available, we use it,
|
||||
// else we increase the tolerance of the Newton solver
|
||||
#if HAVE_QUAD
|
||||
SET_TYPE_PROP(Co2InjectionFlashNiVcfvProblem, Scalar, quad);
|
||||
template<class TypeTag>
|
||||
struct Scalar<TypeTag, TTag::Co2InjectionFlashNiVcfvProblem> { using type = quad; };
|
||||
|
||||
// the default linear solver used for this problem (-> AMG) cannot be used with quadruple
|
||||
// precision scalars... (this seems to only apply to Dune >= 2.4)
|
||||
SET_TAG_PROP(Co2InjectionFlashNiVcfvProblem, LinearSolverSplice, ParallelBiCGStabLinearSolver);
|
||||
template<class TypeTag>
|
||||
struct LinearSolverSplice<TypeTag, TTag::Co2InjectionFlashNiVcfvProblem> { using type = TTag::ParallelBiCGStabLinearSolver; };
|
||||
#else
|
||||
SET_SCALAR_PROP(Co2InjectionFlashNiVcfvProblem, NewtonTolerance, 1e-5);
|
||||
template<class TypeTag>
|
||||
struct NewtonTolerance<TypeTag, TTag::Co2InjectionFlashNiVcfvProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1e-5;
|
||||
};
|
||||
#endif
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(Co2InjectionFlashNiVcfvProblem) VcfvProblemTypeTag;
|
||||
using VcfvProblemTypeTag = Opm::Properties::TTag::Co2InjectionFlashNiVcfvProblem;
|
||||
return Opm::start<VcfvProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -38,34 +38,45 @@
|
||||
#include "problems/co2injectionflash.hh"
|
||||
#include "problems/co2injectionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionFlashVcfvProblem, INHERITS_FROM(FlashModel, Co2InjectionBaseProblem));
|
||||
SET_TAG_PROP(Co2InjectionFlashVcfvProblem, SpatialDiscretizationSplice, VcfvDiscretization);
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct Co2InjectionFlashVcfvProblem { using InheritsFrom = std::tuple<Co2InjectionBaseProblem, FlashModel>; };
|
||||
} // end namespace TTag
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Co2InjectionFlashVcfvProblem> { using type = TTag::VcfvDiscretization; };
|
||||
|
||||
// use the flash solver adapted to the CO2 injection problem
|
||||
SET_TYPE_PROP(
|
||||
Co2InjectionFlashVcfvProblem, FlashSolver,
|
||||
Opm::Co2InjectionFlash<typename GET_PROP_TYPE(TypeTag, Scalar),
|
||||
typename GET_PROP_TYPE(TypeTag, FluidSystem)>);
|
||||
template<class TypeTag>
|
||||
struct FlashSolver<TypeTag, TTag::Co2InjectionFlashVcfvProblem>
|
||||
{ using type = Opm::Co2InjectionFlash<GetPropType<TypeTag, Properties::Scalar>,
|
||||
GetPropType<TypeTag, Properties::FluidSystem>>; };
|
||||
|
||||
// the flash model has serious problems with the numerical
|
||||
// precision. if quadruple precision math is available, we use it,
|
||||
// else we increase the tolerance of the Newton solver
|
||||
#if HAVE_QUAD
|
||||
SET_TYPE_PROP(Co2InjectionFlashVcfvProblem, Scalar, quad);
|
||||
template<class TypeTag>
|
||||
struct Scalar<TypeTag, TTag::Co2InjectionFlashVcfvProblem> { using type = quad; };
|
||||
|
||||
// the default linear solver used for this problem (-> AMG) cannot be used with quadruple
|
||||
// precision scalars... (this seems to only apply to Dune >= 2.4)
|
||||
SET_TAG_PROP(Co2InjectionFlashVcfvProblem, LinearSolverSplice, ParallelBiCGStabLinearSolver);
|
||||
template<class TypeTag>
|
||||
struct LinearSolverSplice<TypeTag, TTag::Co2InjectionFlashVcfvProblem> { using type = TTag::ParallelBiCGStabLinearSolver; };
|
||||
#else
|
||||
SET_SCALAR_PROP(Co2InjectionFlashVcfvProblem, NewtonTolerance, 1e-5);
|
||||
template<class TypeTag>
|
||||
struct NewtonTolerance<TypeTag, TTag::Co2InjectionFlashVcfvProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1e-5;
|
||||
};
|
||||
#endif
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(Co2InjectionFlashVcfvProblem) VcfvProblemTypeTag;
|
||||
using VcfvProblemTypeTag = Opm::Properties::TTag::Co2InjectionFlashVcfvProblem;
|
||||
return Opm::start<VcfvProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -34,21 +34,26 @@
|
||||
|
||||
#include "problems/co2injectionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionImmiscibleEcfvProblem,
|
||||
INHERITS_FROM(ImmiscibleModel,
|
||||
Co2InjectionBaseProblem));
|
||||
SET_TAG_PROP(Co2InjectionImmiscibleEcfvProblem, SpatialDiscretizationSplice,
|
||||
EcfvDiscretization);
|
||||
namespace TTag {
|
||||
|
||||
END_PROPERTIES
|
||||
struct Co2InjectionImmiscibleEcfvProblem
|
||||
{ using InheritsFrom = std::tuple<Co2InjectionBaseProblem, ImmiscibleModel>; };
|
||||
|
||||
} // end namespace TTag
|
||||
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Co2InjectionImmiscibleEcfvProblem>
|
||||
{ using type = TTag::EcfvDiscretization; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
////////////////////////
|
||||
// the main function
|
||||
////////////////////////
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(Co2InjectionImmiscibleEcfvProblem) EcfvProblemTypeTag;
|
||||
using EcfvProblemTypeTag = Opm::Properties::TTag::Co2InjectionImmiscibleEcfvProblem;
|
||||
return Opm::start<EcfvProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -33,25 +33,31 @@
|
||||
#include <opm/models/discretization/ecfv/ecfvdiscretization.hh>
|
||||
#include "problems/co2injectionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionImmiscibleNiEcfvProblem, INHERITS_FROM(ImmiscibleModel,
|
||||
Co2InjectionBaseProblem));
|
||||
SET_TAG_PROP(Co2InjectionImmiscibleNiEcfvProblem, SpatialDiscretizationSplice,
|
||||
EcfvDiscretization);
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct Co2InjectionImmiscibleNiEcfvProblem { using InheritsFrom = std::tuple<Co2InjectionBaseProblem, ImmiscibleModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
SET_BOOL_PROP(Co2InjectionImmiscibleNiEcfvProblem, EnableEnergy, true);
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Co2InjectionImmiscibleNiEcfvProblem>
|
||||
{ using type = TTag::EcfvDiscretization; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct EnableEnergy<TypeTag, TTag::Co2InjectionImmiscibleNiEcfvProblem> { static constexpr bool value = true; };
|
||||
|
||||
//! Use automatic differentiation to linearize the system of PDEs
|
||||
SET_TAG_PROP(Co2InjectionImmiscibleNiEcfvProblem, LocalLinearizerSplice, AutoDiffLocalLinearizer);
|
||||
template<class TypeTag>
|
||||
struct LocalLinearizerSplice<TypeTag, TTag::Co2InjectionImmiscibleNiEcfvProblem> { using type = TTag::AutoDiffLocalLinearizer; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
////////////////////////
|
||||
// the main function
|
||||
////////////////////////
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(Co2InjectionImmiscibleNiEcfvProblem) EcfvProblemTypeTag;
|
||||
using EcfvProblemTypeTag = Opm::Properties::TTag::Co2InjectionImmiscibleNiEcfvProblem;
|
||||
return Opm::start<EcfvProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -33,21 +33,28 @@
|
||||
#include <opm/models/discretization/vcfv/vcfvdiscretization.hh>
|
||||
#include "problems/co2injectionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionImmiscibleNiVcfvProblem, INHERITS_FROM(ImmiscibleModel,
|
||||
Co2InjectionBaseProblem));
|
||||
SET_TAG_PROP(Co2InjectionImmiscibleNiVcfvProblem, SpatialDiscretizationSplice, VcfvDiscretization);
|
||||
namespace TTag {
|
||||
|
||||
SET_BOOL_PROP(Co2InjectionImmiscibleNiVcfvProblem, EnableEnergy, true);
|
||||
struct Co2InjectionImmiscibleNiVcfvProblem
|
||||
{ using InheritsFrom = std::tuple<Co2InjectionBaseProblem, ImmiscibleModel>; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace TTag
|
||||
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Co2InjectionImmiscibleNiVcfvProblem> { using type = TTag::VcfvDiscretization; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct EnableEnergy<TypeTag, TTag::Co2InjectionImmiscibleNiVcfvProblem> { static constexpr bool value = true; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
////////////////////////
|
||||
// the main function
|
||||
////////////////////////
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(Co2InjectionImmiscibleNiVcfvProblem) VcfvProblemTypeTag;
|
||||
using VcfvProblemTypeTag = Opm::Properties::TTag::Co2InjectionImmiscibleNiVcfvProblem;
|
||||
return Opm::start<VcfvProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -34,19 +34,25 @@
|
||||
|
||||
#include "problems/co2injectionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionImmiscibleVcfvProblem, INHERITS_FROM(ImmiscibleModel,
|
||||
Co2InjectionBaseProblem));
|
||||
SET_TAG_PROP(Co2InjectionImmiscibleVcfvProblem, SpatialDiscretizationSplice, VcfvDiscretization);
|
||||
namespace TTag {
|
||||
|
||||
END_PROPERTIES
|
||||
struct Co2InjectionImmiscibleVcfvProblem
|
||||
{ using InheritsFrom = std::tuple<Co2InjectionBaseProblem, ImmiscibleModel>; };
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Co2InjectionImmiscibleVcfvProblem> { using type = TTag::VcfvDiscretization; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
////////////////////////
|
||||
// the main function
|
||||
////////////////////////
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(Co2InjectionImmiscibleVcfvProblem) VcfvProblemTypeTag;
|
||||
using VcfvProblemTypeTag = Opm::Properties::TTag::Co2InjectionImmiscibleVcfvProblem;
|
||||
return Opm::start<VcfvProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -33,15 +33,19 @@
|
||||
#include <opm/models/discretization/ecfv/ecfvdiscretization.hh>
|
||||
#include "problems/co2injectionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionNcpEcfvProblem, INHERITS_FROM(NcpModel, Co2InjectionBaseProblem));
|
||||
SET_TAG_PROP(Co2InjectionNcpEcfvProblem, SpatialDiscretizationSplice, EcfvDiscretization);
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct Co2InjectionNcpEcfvProblem { using InheritsFrom = std::tuple<Co2InjectionBaseProblem, NcpModel>; };
|
||||
} // end namespace TTag
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Co2InjectionNcpEcfvProblem> { using type = TTag::EcfvDiscretization; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(Co2InjectionNcpEcfvProblem) EcfvProblemTypeTag;
|
||||
using EcfvProblemTypeTag = Opm::Properties::TTag::Co2InjectionNcpEcfvProblem;
|
||||
return Opm::start<EcfvProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -33,19 +33,25 @@
|
||||
#include <opm/models/discretization/ecfv/ecfvdiscretization.hh>
|
||||
#include "problems/co2injectionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionNcpNiEcfvProblem, INHERITS_FROM(NcpModel, Co2InjectionBaseProblem));
|
||||
SET_TAG_PROP(Co2InjectionNcpNiEcfvProblem, SpatialDiscretizationSplice, EcfvDiscretization);
|
||||
SET_BOOL_PROP(Co2InjectionNcpNiEcfvProblem, EnableEnergy, true);
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct Co2InjectionNcpNiEcfvProblem { using InheritsFrom = std::tuple<Co2InjectionBaseProblem, NcpModel>; };
|
||||
} // end namespace TTag
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Co2InjectionNcpNiEcfvProblem> { using type = TTag::EcfvDiscretization; };
|
||||
template<class TypeTag>
|
||||
struct EnableEnergy<TypeTag, TTag::Co2InjectionNcpNiEcfvProblem> { static constexpr bool value = true; };
|
||||
|
||||
//! Use automatic differentiation to linearize the system of PDEs
|
||||
SET_TAG_PROP(Co2InjectionNcpNiEcfvProblem, LocalLinearizerSplice, AutoDiffLocalLinearizer);
|
||||
template<class TypeTag>
|
||||
struct LocalLinearizerSplice<TypeTag, TTag::Co2InjectionNcpNiEcfvProblem> { using type = TTag::AutoDiffLocalLinearizer; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(Co2InjectionNcpNiEcfvProblem) EcfvProblemTypeTag;
|
||||
using EcfvProblemTypeTag = Opm::Properties::TTag::Co2InjectionNcpNiEcfvProblem;
|
||||
return Opm::start<EcfvProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -33,16 +33,21 @@
|
||||
#include <opm/models/discretization/vcfv/vcfvdiscretization.hh>
|
||||
#include "problems/co2injectionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionNcpNiVcfvProblem, INHERITS_FROM(NcpModel, Co2InjectionBaseProblem));
|
||||
SET_TAG_PROP(Co2InjectionNcpNiVcfvProblem, SpatialDiscretizationSplice, VcfvDiscretization);
|
||||
SET_BOOL_PROP(Co2InjectionNcpNiVcfvProblem, EnableEnergy, true);
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct Co2InjectionNcpNiVcfvProblem { using InheritsFrom = std::tuple<Co2InjectionBaseProblem, NcpModel>; };
|
||||
} // end namespace TTag
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Co2InjectionNcpNiVcfvProblem> { using type = TTag::VcfvDiscretization; };
|
||||
template<class TypeTag>
|
||||
struct EnableEnergy<TypeTag, TTag::Co2InjectionNcpNiVcfvProblem> { static constexpr bool value = true; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(Co2InjectionNcpNiVcfvProblem) VcfvProblemTypeTag;
|
||||
using VcfvProblemTypeTag = Opm::Properties::TTag::Co2InjectionNcpNiVcfvProblem;
|
||||
return Opm::start<VcfvProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -34,15 +34,19 @@
|
||||
|
||||
#include "problems/co2injectionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionNcpVcfvProblem, INHERITS_FROM(NcpModel, Co2InjectionBaseProblem));
|
||||
SET_TAG_PROP(Co2InjectionNcpVcfvProblem, SpatialDiscretizationSplice, VcfvDiscretization);
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct Co2InjectionNcpVcfvProblem { using InheritsFrom = std::tuple<Co2InjectionBaseProblem, NcpModel>; };
|
||||
} // end namespace TTag
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Co2InjectionNcpVcfvProblem> { using type = TTag::VcfvDiscretization; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(Co2InjectionNcpVcfvProblem) VcfvProblemTypeTag;
|
||||
using VcfvProblemTypeTag = Opm::Properties::TTag::Co2InjectionNcpVcfvProblem;
|
||||
return Opm::start<VcfvProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -33,15 +33,19 @@
|
||||
#include <opm/models/discretization/ecfv/ecfvdiscretization.hh>
|
||||
#include "problems/co2injectionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionPvsEcfvProblem, INHERITS_FROM(PvsModel, Co2InjectionBaseProblem));
|
||||
SET_TAG_PROP(Co2InjectionPvsEcfvProblem, SpatialDiscretizationSplice, EcfvDiscretization);
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct Co2InjectionPvsEcfvProblem { using InheritsFrom = std::tuple<Co2InjectionBaseProblem, PvsModel>; };
|
||||
} // end namespace TTag
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Co2InjectionPvsEcfvProblem> { using type = TTag::EcfvDiscretization; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(Co2InjectionPvsEcfvProblem) EcfvProblemTypeTag;
|
||||
using EcfvProblemTypeTag = Opm::Properties::TTag::Co2InjectionPvsEcfvProblem;
|
||||
return Opm::start<EcfvProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -33,20 +33,26 @@
|
||||
#include <opm/models/discretization/ecfv/ecfvdiscretization.hh>
|
||||
#include "problems/co2injectionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionPvsNiEcfvProblem, INHERITS_FROM(PvsModel, Co2InjectionBaseProblem));
|
||||
SET_TAG_PROP(Co2InjectionPvsNiEcfvProblem, SpatialDiscretizationSplice, EcfvDiscretization);
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct Co2InjectionPvsNiEcfvProblem { using InheritsFrom = std::tuple<Co2InjectionBaseProblem, PvsModel>; };
|
||||
} // end namespace TTag
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Co2InjectionPvsNiEcfvProblem> { using type = TTag::EcfvDiscretization; };
|
||||
|
||||
SET_BOOL_PROP(Co2InjectionPvsNiEcfvProblem, EnableEnergy, true);
|
||||
template<class TypeTag>
|
||||
struct EnableEnergy<TypeTag, TTag::Co2InjectionPvsNiEcfvProblem> { static constexpr bool value = true; };
|
||||
|
||||
//! Use automatic differentiation to linearize the system of PDEs
|
||||
SET_TAG_PROP(Co2InjectionPvsNiEcfvProblem, LocalLinearizerSplice, AutoDiffLocalLinearizer);
|
||||
template<class TypeTag>
|
||||
struct LocalLinearizerSplice<TypeTag, TTag::Co2InjectionPvsNiEcfvProblem> { using type = TTag::AutoDiffLocalLinearizer; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(Co2InjectionPvsNiEcfvProblem) EcfvProblemTypeTag;
|
||||
using EcfvProblemTypeTag = Opm::Properties::TTag::Co2InjectionPvsNiEcfvProblem;
|
||||
return Opm::start<EcfvProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -33,17 +33,22 @@
|
||||
#include <opm/models/discretization/vcfv/vcfvdiscretization.hh>
|
||||
#include "problems/co2injectionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionPvsNiVcfvProblem, INHERITS_FROM(PvsModel, Co2InjectionBaseProblem));
|
||||
SET_TAG_PROP(Co2InjectionPvsNiVcfvProblem, SpatialDiscretizationSplice, VcfvDiscretization);
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct Co2InjectionPvsNiVcfvProblem { using InheritsFrom = std::tuple<Co2InjectionBaseProblem, PvsModel>; };
|
||||
} // end namespace TTag
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Co2InjectionPvsNiVcfvProblem> { using type = TTag::VcfvDiscretization; };
|
||||
|
||||
SET_BOOL_PROP(Co2InjectionPvsNiVcfvProblem, EnableEnergy, true);
|
||||
template<class TypeTag>
|
||||
struct EnableEnergy<TypeTag, TTag::Co2InjectionPvsNiVcfvProblem> { static constexpr bool value = true; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(Co2InjectionPvsNiVcfvProblem) VcfvProblemTypeTag;
|
||||
using VcfvProblemTypeTag = Opm::Properties::TTag::Co2InjectionPvsNiVcfvProblem;
|
||||
return Opm::start<VcfvProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -34,15 +34,19 @@
|
||||
|
||||
#include "problems/co2injectionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionPvsVcfvProblem, INHERITS_FROM(PvsModel, Co2InjectionBaseProblem));
|
||||
SET_TAG_PROP(Co2InjectionPvsVcfvProblem, SpatialDiscretizationSplice, VcfvDiscretization);
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct Co2InjectionPvsVcfvProblem { using InheritsFrom = std::tuple<Co2InjectionBaseProblem, PvsModel>; };
|
||||
} // end namespace TTag
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Co2InjectionPvsVcfvProblem> { using type = TTag::VcfvDiscretization; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(Co2InjectionPvsVcfvProblem) VcfvProblemTypeTag;
|
||||
using VcfvProblemTypeTag = Opm::Properties::TTag::Co2InjectionPvsVcfvProblem;
|
||||
return Opm::start<VcfvProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -31,14 +31,17 @@
|
||||
#include <opm/models/pvs/pvsmodel.hh>
|
||||
#include "problems/cuvetteproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(CuvetteProblem, INHERITS_FROM(PvsModel, CuvetteBaseProblem));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct CuvetteProblem { using InheritsFrom = std::tuple<CuvetteBaseProblem, PvsModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(CuvetteProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::CuvetteProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -31,14 +31,17 @@
|
||||
#include <opm/models/flash/flashmodel.hh>
|
||||
#include "problems/diffusionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(DiffusionProblem, INHERITS_FROM(FlashModel, DiffusionBaseProblem));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct DiffusionProblem { using InheritsFrom = std::tuple<DiffusionBaseProblem, FlashModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(DiffusionProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::DiffusionProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -31,14 +31,17 @@
|
||||
#include <opm/models/ncp/ncpmodel.hh>
|
||||
#include "problems/diffusionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(DiffusionProblem, INHERITS_FROM(NcpModel, DiffusionBaseProblem));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct DiffusionProblem { using InheritsFrom = std::tuple<DiffusionBaseProblem, NcpModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(DiffusionProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::DiffusionProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -31,14 +31,17 @@
|
||||
#include <opm/models/pvs/pvsmodel.hh>
|
||||
#include "problems/diffusionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(DiffusionProblem, INHERITS_FROM(PvsModel, DiffusionBaseProblem));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct DiffusionProblem { using InheritsFrom = std::tuple<DiffusionBaseProblem, PvsModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(DiffusionProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::DiffusionProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -32,15 +32,19 @@
|
||||
#include <opm/models/discretization/ecfv/ecfvdiscretization.hh>
|
||||
#include "problems/fingerproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(FingerProblemEcfv, INHERITS_FROM(ImmiscibleTwoPhaseModel, FingerBaseProblem));
|
||||
SET_TAG_PROP(FingerProblemEcfv, SpatialDiscretizationSplice, EcfvDiscretization);
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct FingerProblemEcfv { using InheritsFrom = std::tuple<FingerBaseProblem, ImmiscibleTwoPhaseModel>; };
|
||||
} // end namespace TTag
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::FingerProblemEcfv> { using type = TTag::EcfvDiscretization; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(FingerProblemEcfv) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::FingerProblemEcfv;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -32,15 +32,19 @@
|
||||
#include <opm/models/discretization/vcfv/vcfvdiscretization.hh>
|
||||
#include "problems/fingerproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(FingerProblemVcfv, INHERITS_FROM(ImmiscibleTwoPhaseModel, FingerBaseProblem));
|
||||
SET_TAG_PROP(FingerProblemVcfv, SpatialDiscretizationSplice, VcfvDiscretization);
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct FingerProblemVcfv { using InheritsFrom = std::tuple<FingerBaseProblem, ImmiscibleTwoPhaseModel>; };
|
||||
} // end namespace TTag
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::FingerProblemVcfv> { using type = TTag::VcfvDiscretization; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(FingerProblemVcfv) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::FingerProblemVcfv;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -32,6 +32,6 @@
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(FractureProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::FractureProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -31,14 +31,17 @@
|
||||
#include <opm/models/immiscible/immisciblemodel.hh>
|
||||
#include "problems/groundwaterproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(GroundWaterProblem, INHERITS_FROM(ImmiscibleSinglePhaseModel, GroundWaterBaseProblem));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct GroundWaterProblem { using InheritsFrom = std::tuple<GroundWaterBaseProblem, ImmiscibleSinglePhaseModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(GroundWaterProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::GroundWaterProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -31,14 +31,17 @@
|
||||
#include <opm/models/pvs/pvsmodel.hh>
|
||||
#include "problems/infiltrationproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(InfiltrationProblem, INHERITS_FROM(PvsModel, InfiltrationBaseProblem));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct InfiltrationProblem { using InheritsFrom = std::tuple<InfiltrationBaseProblem, PvsModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(InfiltrationProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::InfiltrationProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -34,6 +34,6 @@
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(LensProblemEcfvAd) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::LensProblemEcfvAd;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -33,19 +33,25 @@
|
||||
#include <opm/models/discretization/ecfv/ecfvdiscretization.hh>
|
||||
#include "problems/lensproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(LensProblemEcfvAd, INHERITS_FROM(ImmiscibleTwoPhaseModel, LensBaseProblem));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct LensProblemEcfvAd { using InheritsFrom = std::tuple<LensBaseProblem, ImmiscibleTwoPhaseModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
// use the element centered finite volume spatial discretization
|
||||
SET_TAG_PROP(LensProblemEcfvAd, SpatialDiscretizationSplice, EcfvDiscretization);
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::LensProblemEcfvAd> { using type = TTag::EcfvDiscretization; };
|
||||
|
||||
// use automatic differentiation for this simulator
|
||||
SET_TAG_PROP(LensProblemEcfvAd, LocalLinearizerSplice, AutoDiffLocalLinearizer);
|
||||
template<class TypeTag>
|
||||
struct LocalLinearizerSplice<TypeTag, TTag::LensProblemEcfvAd> { using type = TTag::AutoDiffLocalLinearizer; };
|
||||
|
||||
// this problem works fine if the linear solver uses single precision scalars
|
||||
SET_TYPE_PROP(LensProblemEcfvAd, LinearSolverScalar, float);
|
||||
template<class TypeTag>
|
||||
struct LinearSolverScalar<TypeTag, TTag::LensProblemEcfvAd> { using type = float; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
#endif // EWOMS_LENS_IMMISCIBLE_ECFV_AD_HH
|
||||
|
@ -33,22 +33,23 @@
|
||||
#include <dune/grid/geometrygrid.hh>
|
||||
#include <dune/grid/io/file/dgfparser/dgfgeogrid.hh>
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
// Use Dune-grid's GeometryGrid< YaspGrid >
|
||||
SET_PROP(LensProblemEcfvAd, Grid )
|
||||
template<class TypeTag>
|
||||
struct Grid <TypeTag, TTag::LensProblemEcfvAd>
|
||||
{
|
||||
template< class ctype, unsigned int dim, unsigned int dimworld >
|
||||
class IdentityCoordFct
|
||||
: public Dune::AnalyticalCoordFunction
|
||||
< ctype, dim, dimworld, IdentityCoordFct< ctype, dim, dimworld > >
|
||||
{
|
||||
typedef IdentityCoordFct< ctype, dim, dimworld > This;
|
||||
typedef Dune::AnalyticalCoordFunction< ctype, dim, dimworld, This > Base;
|
||||
using This = IdentityCoordFct< ctype, dim, dimworld >;
|
||||
using Base = Dune::AnalyticalCoordFunction< ctype, dim, dimworld, This >;
|
||||
|
||||
public:
|
||||
typedef typename Base :: DomainVector DomainVector;
|
||||
typedef typename Base :: RangeVector RangeVector;
|
||||
using DomainVector = typename Base :: DomainVector;
|
||||
using RangeVector = typename Base :: RangeVector ;
|
||||
|
||||
template< typename... Args >
|
||||
IdentityCoordFct( Args&... )
|
||||
@ -70,22 +71,21 @@ SET_PROP(LensProblemEcfvAd, Grid )
|
||||
|
||||
};
|
||||
|
||||
typedef Dune::YaspGrid< 2 > MyYaspGrid;
|
||||
using MyYaspGrid = Dune::YaspGrid< 2 >;
|
||||
|
||||
public:
|
||||
//typedef MyYaspGrid type;
|
||||
typedef Dune::GeometryGrid< MyYaspGrid,
|
||||
IdentityCoordFct< typename MyYaspGrid::ctype,
|
||||
MyYaspGrid::dimension,
|
||||
MyYaspGrid::dimensionworld+1> > type;
|
||||
using type = Dune::GeometryGrid< MyYaspGrid,
|
||||
IdentityCoordFct< typename MyYaspGrid::ctype,
|
||||
MyYaspGrid::dimension,
|
||||
MyYaspGrid::dimensionworld+1> >;
|
||||
};
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
#include <opm/models/utils/start.hh>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(LensProblemEcfvAd) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::LensProblemEcfvAd;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -43,6 +43,6 @@ int mainCU1(int argc, char **argv);
|
||||
|
||||
int mainCU1(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(LensProblemEcfvAd) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::LensProblemEcfvAd;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -43,6 +43,6 @@ int mainCU2(int argc, char **argv);
|
||||
|
||||
int mainCU2(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(LensProblemEcfvAd) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::LensProblemEcfvAd;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -32,22 +32,27 @@
|
||||
#include <opm/models/immiscible/immisciblemodel.hh>
|
||||
#include "problems/lensproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(LensProblemVcfvAd, INHERITS_FROM(ImmiscibleTwoPhaseModel, LensBaseProblem));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct LensProblemVcfvAd { using InheritsFrom = std::tuple<LensBaseProblem, ImmiscibleTwoPhaseModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
// use automatic differentiation for this simulator
|
||||
SET_TAG_PROP(LensProblemVcfvAd, LocalLinearizerSplice, AutoDiffLocalLinearizer);
|
||||
template<class TypeTag>
|
||||
struct LocalLinearizerSplice<TypeTag, TTag::LensProblemVcfvAd> { using type = TTag::AutoDiffLocalLinearizer; };
|
||||
|
||||
// use linear finite element gradients if dune-localfunctions is available
|
||||
#if HAVE_DUNE_LOCALFUNCTIONS
|
||||
SET_BOOL_PROP(LensProblemVcfvAd, UseP1FiniteElementGradients, true);
|
||||
template<class TypeTag>
|
||||
struct UseP1FiniteElementGradients<TypeTag, TTag::LensProblemVcfvAd> { static constexpr bool value = true; };
|
||||
#endif
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(LensProblemVcfvAd) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::LensProblemVcfvAd;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -32,22 +32,27 @@
|
||||
#include <opm/models/immiscible/immisciblemodel.hh>
|
||||
#include "problems/lensproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(LensProblemVcfvFd, INHERITS_FROM(ImmiscibleTwoPhaseModel, LensBaseProblem));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct LensProblemVcfvFd { using InheritsFrom = std::tuple<LensBaseProblem, ImmiscibleTwoPhaseModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
// use the finite difference methodfor this simulator
|
||||
SET_TAG_PROP(LensProblemVcfvFd, LocalLinearizerSplice, FiniteDifferenceLocalLinearizer);
|
||||
template<class TypeTag>
|
||||
struct LocalLinearizerSplice<TypeTag, TTag::LensProblemVcfvFd> { using type = TTag::FiniteDifferenceLocalLinearizer; };
|
||||
|
||||
// use linear finite element gradients if dune-localfunctions is available
|
||||
#if HAVE_DUNE_LOCALFUNCTIONS
|
||||
SET_BOOL_PROP(LensProblemVcfvFd, UseP1FiniteElementGradients, true);
|
||||
template<class TypeTag>
|
||||
struct UseP1FiniteElementGradients<TypeTag, TTag::LensProblemVcfvFd> { static constexpr bool value = true; };
|
||||
#endif
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(LensProblemVcfvFd) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::LensProblemVcfvFd;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -32,18 +32,23 @@
|
||||
|
||||
#include "problems/richardslensproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(RichardsLensEcfvProblem, INHERITS_FROM(RichardsLensProblem));
|
||||
SET_TAG_PROP(RichardsLensEcfvProblem, SpatialDiscretizationSplice, EcfvDiscretization);
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct RichardsLensEcfvProblem { using InheritsFrom = std::tuple<RichardsLensProblem>; };
|
||||
} // end namespace TTag
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::RichardsLensEcfvProblem> { using type = TTag::EcfvDiscretization; };
|
||||
|
||||
//! Use automatic differentiation to linearize the system of PDEs
|
||||
SET_TAG_PROP(RichardsLensEcfvProblem, LocalLinearizerSplice, AutoDiffLocalLinearizer);
|
||||
template<class TypeTag>
|
||||
struct LocalLinearizerSplice<TypeTag, TTag::RichardsLensEcfvProblem> { using type = TTag::AutoDiffLocalLinearizer; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(RichardsLensEcfvProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::RichardsLensEcfvProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -32,15 +32,19 @@
|
||||
|
||||
#include "problems/richardslensproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(RichardsLensVcfvProblem, INHERITS_FROM(RichardsLensProblem));
|
||||
SET_TAG_PROP(RichardsLensVcfvProblem, SpatialDiscretizationSplice, VcfvDiscretization);
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct RichardsLensVcfvProblem { using InheritsFrom = std::tuple<RichardsLensProblem>; };
|
||||
} // end namespace TTag
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::RichardsLensVcfvProblem> { using type = TTag::VcfvDiscretization; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(RichardsLensVcfvProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::RichardsLensVcfvProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -32,14 +32,17 @@
|
||||
#include <opm/models/immiscible/immisciblemodel.hh>
|
||||
#include "problems/obstacleproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(ObstacleProblem, INHERITS_FROM(ImmiscibleModel, ObstacleBaseProblem));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct ObstacleProblem { using InheritsFrom = std::tuple<ObstacleBaseProblem, ImmiscibleModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(ObstacleProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::ObstacleProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -32,14 +32,17 @@
|
||||
|
||||
#include "problems/obstacleproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(ObstacleProblem, INHERITS_FROM(NcpModel, ObstacleBaseProblem));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct ObstacleProblem { using InheritsFrom = std::tuple<ObstacleBaseProblem, NcpModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(ObstacleProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::ObstacleProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -33,17 +33,21 @@
|
||||
#include <opm/models/pvs/pvsmodel.hh>
|
||||
#include "problems/obstacleproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(ObstacleProblem, INHERITS_FROM(PvsModel, ObstacleBaseProblem));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct ObstacleProblem { using InheritsFrom = std::tuple<ObstacleBaseProblem, PvsModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
// Verbosity of the PVS model (0=silent, 1=medium, 2=chatty)
|
||||
SET_INT_PROP(ObstacleProblem, PvsVerbosity, 1);
|
||||
template<class TypeTag>
|
||||
struct PvsVerbosity<TypeTag, TTag::ObstacleProblem> { static constexpr int value = 1; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(ObstacleProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::ObstacleProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -31,17 +31,21 @@
|
||||
#include <opm/models/pvs/pvsmodel.hh>
|
||||
#include "problems/outflowproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(OutflowProblem, INHERITS_FROM(PvsModel, OutflowBaseProblem));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct OutflowProblem { using InheritsFrom = std::tuple<OutflowBaseProblem, PvsModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
// Verbosity of the PVS model (0=silent, 1=medium, 2=chatty)
|
||||
SET_INT_PROP(OutflowProblem, PvsVerbosity, 1);
|
||||
template<class TypeTag>
|
||||
struct PvsVerbosity<TypeTag, TTag::OutflowProblem> { static constexpr int value = 1; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(OutflowProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::OutflowProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -31,19 +31,24 @@
|
||||
#include <opm/models/immiscible/immisciblemodel.hh>
|
||||
#include "problems/powerinjectionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(PowerInjectionDarcyAdProblem,
|
||||
INHERITS_FROM(ImmiscibleTwoPhaseModel,
|
||||
PowerInjectionBaseProblem));
|
||||
namespace TTag {
|
||||
|
||||
SET_TYPE_PROP(PowerInjectionDarcyAdProblem, FluxModule, Opm::DarcyFluxModule<TypeTag>);
|
||||
SET_TAG_PROP(PowerInjectionDarcyAdProblem, LocalLinearizerSplice, AutoDiffLocalLinearizer);
|
||||
struct PowerInjectionDarcyAdProblem
|
||||
{ using InheritsFrom = std::tuple<PowerInjectionBaseProblem, ImmiscibleTwoPhaseModel>; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace TTag
|
||||
|
||||
template<class TypeTag>
|
||||
struct FluxModule<TypeTag, TTag::PowerInjectionDarcyAdProblem> { using type = Opm::DarcyFluxModule<TypeTag>; };
|
||||
template<class TypeTag>
|
||||
struct LocalLinearizerSplice<TypeTag, TTag::PowerInjectionDarcyAdProblem> { using type = TTag::AutoDiffLocalLinearizer; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(PowerInjectionDarcyAdProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::PowerInjectionDarcyAdProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -31,19 +31,24 @@
|
||||
#include <opm/models/immiscible/immisciblemodel.hh>
|
||||
#include "problems/powerinjectionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(PowerInjectionDarcyFdProblem,
|
||||
INHERITS_FROM(ImmiscibleTwoPhaseModel,
|
||||
PowerInjectionBaseProblem));
|
||||
namespace TTag {
|
||||
|
||||
SET_TYPE_PROP(PowerInjectionDarcyFdProblem, FluxModule, Opm::DarcyFluxModule<TypeTag>);
|
||||
SET_TAG_PROP(PowerInjectionDarcyFdProblem, LocalLinearizerSplice, FiniteDifferenceLocalLinearizer);
|
||||
struct PowerInjectionDarcyFdProblem
|
||||
{ using InheritsFrom = std::tuple<PowerInjectionBaseProblem, ImmiscibleTwoPhaseModel>; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace TTag
|
||||
|
||||
template<class TypeTag>
|
||||
struct FluxModule<TypeTag, TTag::PowerInjectionDarcyFdProblem> { using type = Opm::DarcyFluxModule<TypeTag>; };
|
||||
template<class TypeTag>
|
||||
struct LocalLinearizerSplice<TypeTag, TTag::PowerInjectionDarcyFdProblem> { using type = TTag::FiniteDifferenceLocalLinearizer; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(PowerInjectionDarcyFdProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::PowerInjectionDarcyFdProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -31,19 +31,24 @@
|
||||
#include <opm/models/immiscible/immisciblemodel.hh>
|
||||
#include "problems/powerinjectionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(PowerInjectionForchheimerAdProblem,
|
||||
INHERITS_FROM(ImmiscibleTwoPhaseModel,
|
||||
PowerInjectionBaseProblem));
|
||||
namespace TTag {
|
||||
|
||||
SET_TYPE_PROP(PowerInjectionForchheimerAdProblem, FluxModule, Opm::ForchheimerFluxModule<TypeTag>);
|
||||
SET_TAG_PROP(PowerInjectionForchheimerAdProblem, LocalLinearizerSplice, AutoDiffLocalLinearizer);
|
||||
struct PowerInjectionForchheimerAdProblem
|
||||
{ using InheritsFrom = std::tuple<PowerInjectionBaseProblem, ImmiscibleTwoPhaseModel>; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace TTag
|
||||
|
||||
template<class TypeTag>
|
||||
struct FluxModule<TypeTag, TTag::PowerInjectionForchheimerAdProblem> { using type = Opm::ForchheimerFluxModule<TypeTag>; };
|
||||
template<class TypeTag>
|
||||
struct LocalLinearizerSplice<TypeTag, TTag::PowerInjectionForchheimerAdProblem> { using type = TTag::AutoDiffLocalLinearizer; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(PowerInjectionForchheimerAdProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::PowerInjectionForchheimerAdProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -31,19 +31,24 @@
|
||||
#include <opm/models/immiscible/immisciblemodel.hh>
|
||||
#include "problems/powerinjectionproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(PowerInjectionForchheimerFdProblem,
|
||||
INHERITS_FROM(ImmiscibleTwoPhaseModel,
|
||||
PowerInjectionBaseProblem));
|
||||
namespace TTag {
|
||||
|
||||
SET_TYPE_PROP(PowerInjectionForchheimerFdProblem, FluxModule, Opm::ForchheimerFluxModule<TypeTag>);
|
||||
SET_TAG_PROP(PowerInjectionForchheimerFdProblem, LocalLinearizerSplice, FiniteDifferenceLocalLinearizer);
|
||||
struct PowerInjectionForchheimerFdProblem
|
||||
{ using InheritsFrom = std::tuple<PowerInjectionBaseProblem, ImmiscibleTwoPhaseModel>; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace TTag
|
||||
|
||||
template<class TypeTag>
|
||||
struct FluxModule<TypeTag, TTag::PowerInjectionForchheimerFdProblem> { using type = Opm::ForchheimerFluxModule<TypeTag>; };
|
||||
template<class TypeTag>
|
||||
struct LocalLinearizerSplice<TypeTag, TTag::PowerInjectionForchheimerFdProblem> { using type = TTag::FiniteDifferenceLocalLinearizer; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(PowerInjectionForchheimerFdProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::PowerInjectionForchheimerFdProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ namespace Opm {
|
||||
template <class Scalar, class FluidSystem>
|
||||
class Co2InjectionFlash : public Opm::NcpFlash<Scalar, FluidSystem>
|
||||
{
|
||||
typedef Opm::NcpFlash<Scalar, FluidSystem> ParentType;
|
||||
using ParentType = Opm::NcpFlash<Scalar, FluidSystem>;
|
||||
|
||||
enum { numPhases = FluidSystem::numPhases };
|
||||
|
||||
|
@ -68,110 +68,174 @@ namespace Co2Injection {
|
||||
//! \endcond
|
||||
}
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionBaseProblem);
|
||||
namespace TTag {
|
||||
struct Co2InjectionBaseProblem {};
|
||||
}
|
||||
|
||||
// declare the CO2 injection problem specific property tags
|
||||
NEW_PROP_TAG(FluidSystemPressureLow);
|
||||
NEW_PROP_TAG(FluidSystemPressureHigh);
|
||||
NEW_PROP_TAG(FluidSystemNumPressure);
|
||||
NEW_PROP_TAG(FluidSystemTemperatureLow);
|
||||
NEW_PROP_TAG(FluidSystemTemperatureHigh);
|
||||
NEW_PROP_TAG(FluidSystemNumTemperature);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct FluidSystemPressureLow { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct FluidSystemPressureHigh { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct FluidSystemNumPressure { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct FluidSystemTemperatureLow { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct FluidSystemTemperatureHigh { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct FluidSystemNumTemperature { using type = UndefinedProperty; };
|
||||
|
||||
NEW_PROP_TAG(MaxDepth);
|
||||
NEW_PROP_TAG(Temperature);
|
||||
NEW_PROP_TAG(SimulationName);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct MaxDepth { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct Temperature { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct SimulationName { using type = UndefinedProperty; };
|
||||
|
||||
// Set the grid type
|
||||
SET_TYPE_PROP(Co2InjectionBaseProblem, Grid, Dune::YaspGrid<2>);
|
||||
template<class TypeTag>
|
||||
struct Grid<TypeTag, TTag::Co2InjectionBaseProblem> { using type = Dune::YaspGrid<2>; };
|
||||
|
||||
// Set the problem property
|
||||
SET_TYPE_PROP(Co2InjectionBaseProblem, Problem,
|
||||
Opm::Co2InjectionProblem<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::Co2InjectionBaseProblem>
|
||||
{ using type = Opm::Co2InjectionProblem<TypeTag>; };
|
||||
|
||||
// Set fluid configuration
|
||||
SET_PROP(Co2InjectionBaseProblem, FluidSystem)
|
||||
template<class TypeTag>
|
||||
struct FluidSystem<TypeTag, TTag::Co2InjectionBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef Opm::Co2Injection::CO2Tables CO2Tables;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using CO2Tables = Opm::Co2Injection::CO2Tables;
|
||||
|
||||
public:
|
||||
typedef Opm::BrineCO2FluidSystem<Scalar, CO2Tables> type;
|
||||
//typedef Opm::H2ON2FluidSystem<Scalar, /*useComplexRelations=*/false> type;
|
||||
using type = Opm::BrineCO2FluidSystem<Scalar, CO2Tables>;
|
||||
//using type = Opm::H2ON2FluidSystem<Scalar, /*useComplexRelations=*/false>;
|
||||
};
|
||||
|
||||
// Set the material Law
|
||||
SET_PROP(Co2InjectionBaseProblem, MaterialLaw)
|
||||
template<class TypeTag>
|
||||
struct MaterialLaw<TypeTag, TTag::Co2InjectionBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
enum { liquidPhaseIdx = FluidSystem::liquidPhaseIdx };
|
||||
enum { gasPhaseIdx = FluidSystem::gasPhaseIdx };
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::liquidPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::gasPhaseIdx> Traits;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Traits = Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::liquidPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::gasPhaseIdx>;
|
||||
|
||||
// define the material law which is parameterized by effective
|
||||
// saturations
|
||||
typedef Opm::RegularizedBrooksCorey<Traits> EffMaterialLaw;
|
||||
using EffMaterialLaw = Opm::RegularizedBrooksCorey<Traits>;
|
||||
|
||||
public:
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::EffToAbsLaw<EffMaterialLaw> type;
|
||||
using type = Opm::EffToAbsLaw<EffMaterialLaw>;
|
||||
};
|
||||
|
||||
// Set the thermal conduction law
|
||||
SET_PROP(Co2InjectionBaseProblem, ThermalConductionLaw)
|
||||
template<class TypeTag>
|
||||
struct ThermalConductionLaw<TypeTag, TTag::Co2InjectionBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::SomertonThermalConductionLaw<FluidSystem, Scalar> type;
|
||||
using type = Opm::SomertonThermalConductionLaw<FluidSystem, Scalar>;
|
||||
};
|
||||
|
||||
// set the energy storage law for the solid phase
|
||||
SET_TYPE_PROP(Co2InjectionBaseProblem, SolidEnergyLaw,
|
||||
Opm::ConstantSolidHeatCapLaw<typename GET_PROP_TYPE(TypeTag, Scalar)>);
|
||||
template<class TypeTag>
|
||||
struct SolidEnergyLaw<TypeTag, TTag::Co2InjectionBaseProblem>
|
||||
{ using type = Opm::ConstantSolidHeatCapLaw<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
// Use the algebraic multi-grid linear solver for this problem
|
||||
SET_TAG_PROP(Co2InjectionBaseProblem, LinearSolverSplice, ParallelAmgLinearSolver);
|
||||
template<class TypeTag>
|
||||
struct LinearSolverSplice<TypeTag, TTag::Co2InjectionBaseProblem> { using type = TTag::ParallelAmgLinearSolver; };
|
||||
|
||||
// Write the Newton convergence behavior to disk?
|
||||
SET_BOOL_PROP(Co2InjectionBaseProblem, NewtonWriteConvergence, false);
|
||||
template<class TypeTag>
|
||||
struct NewtonWriteConvergence<TypeTag, TTag::Co2InjectionBaseProblem> { static constexpr bool value = false; };
|
||||
|
||||
// Enable gravity
|
||||
SET_BOOL_PROP(Co2InjectionBaseProblem, EnableGravity, true);
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::Co2InjectionBaseProblem> { static constexpr bool value = true; };
|
||||
|
||||
// set the defaults for the problem specific properties
|
||||
SET_SCALAR_PROP(Co2InjectionBaseProblem, FluidSystemPressureLow, 3e7);
|
||||
SET_SCALAR_PROP(Co2InjectionBaseProblem, FluidSystemPressureHigh, 4e7);
|
||||
SET_INT_PROP(Co2InjectionBaseProblem, FluidSystemNumPressure, 100);
|
||||
SET_SCALAR_PROP(Co2InjectionBaseProblem, FluidSystemTemperatureLow, 290);
|
||||
SET_SCALAR_PROP(Co2InjectionBaseProblem, FluidSystemTemperatureHigh, 500);
|
||||
SET_INT_PROP(Co2InjectionBaseProblem, FluidSystemNumTemperature, 100);
|
||||
template<class TypeTag>
|
||||
struct FluidSystemPressureLow<TypeTag, TTag::Co2InjectionBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 3e7;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct FluidSystemPressureHigh<TypeTag, TTag::Co2InjectionBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 4e7;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct FluidSystemNumPressure<TypeTag, TTag::Co2InjectionBaseProblem> { static constexpr int value = 100; };
|
||||
template<class TypeTag>
|
||||
struct FluidSystemTemperatureLow<TypeTag, TTag::Co2InjectionBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 290;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct FluidSystemTemperatureHigh<TypeTag, TTag::Co2InjectionBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 500;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct FluidSystemNumTemperature<TypeTag, TTag::Co2InjectionBaseProblem> { static constexpr int value = 100; };
|
||||
|
||||
SET_SCALAR_PROP(Co2InjectionBaseProblem, MaxDepth, 2500);
|
||||
SET_SCALAR_PROP(Co2InjectionBaseProblem, Temperature, 293.15);
|
||||
SET_STRING_PROP(Co2InjectionBaseProblem, SimulationName, "co2injection");
|
||||
template<class TypeTag>
|
||||
struct MaxDepth<TypeTag, TTag::Co2InjectionBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 2500;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct Temperature<TypeTag, TTag::Co2InjectionBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 293.15;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct SimulationName<TypeTag, TTag::Co2InjectionBaseProblem> { static constexpr auto value = "co2injection"; };
|
||||
|
||||
// The default for the end time of the simulation
|
||||
SET_SCALAR_PROP(Co2InjectionBaseProblem, EndTime, 1e4);
|
||||
template<class TypeTag>
|
||||
struct EndTime<TypeTag, TTag::Co2InjectionBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1e4;
|
||||
};
|
||||
|
||||
// The default for the initial time step size of the simulation
|
||||
SET_SCALAR_PROP(Co2InjectionBaseProblem, InitialTimeStepSize, 250);
|
||||
template<class TypeTag>
|
||||
struct InitialTimeStepSize<TypeTag, TTag::Co2InjectionBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 250;
|
||||
};
|
||||
|
||||
// The default DGF file to load
|
||||
SET_STRING_PROP(Co2InjectionBaseProblem, GridFile, "data/co2injection.dgf");
|
||||
template<class TypeTag>
|
||||
struct GridFile<TypeTag, TTag::Co2InjectionBaseProblem> { static constexpr auto value = "data/co2injection.dgf"; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
/*!
|
||||
@ -197,20 +261,20 @@ namespace Opm {
|
||||
* hydrostatic pressure is assumed.
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class Co2InjectionProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
class Co2InjectionProblem : public GetPropType<TypeTag, Properties::BaseProblem>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BaseProblem) ParentType;
|
||||
using ParentType = GetPropType<TypeTag, Properties::BaseProblem>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
enum { dim = GridView::dimension };
|
||||
enum { dimWorld = GridView::dimensionworld };
|
||||
|
||||
// copy some indices for convenience
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
enum { numPhases = FluidSystem::numPhases };
|
||||
enum { gasPhaseIdx = FluidSystem::gasPhaseIdx };
|
||||
enum { liquidPhaseIdx = FluidSystem::liquidPhaseIdx };
|
||||
@ -219,21 +283,21 @@ class Co2InjectionProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
enum { conti0EqIdx = Indices::conti0EqIdx };
|
||||
enum { contiCO2EqIdx = conti0EqIdx + CO2Idx };
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ThermalConductionLaw) ThermalConductionLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, SolidEnergyLawParams) SolidEnergyLawParams;
|
||||
typedef typename ThermalConductionLaw::Params ThermalConductionLawParams;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using BoundaryRateVector = GetPropType<TypeTag, Properties::BoundaryRateVector>;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using Model = GetPropType<TypeTag, Properties::Model>;
|
||||
using MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>;
|
||||
using ThermalConductionLaw = GetPropType<TypeTag, Properties::ThermalConductionLaw>;
|
||||
using SolidEnergyLawParams = GetPropType<TypeTag, Properties::SolidEnergyLawParams>;
|
||||
using ThermalConductionLawParams = typename ThermalConductionLaw::Params;
|
||||
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
typedef typename GridView::ctype CoordScalar;
|
||||
typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
using CoordScalar = typename GridView::ctype;
|
||||
using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@ -356,7 +420,7 @@ public:
|
||||
std::ostringstream oss;
|
||||
oss << EWOMS_GET_PARAM(TypeTag, std::string, SimulationName)
|
||||
<< "_" << Model::name();
|
||||
if (GET_PROP_VALUE(TypeTag, EnableEnergy))
|
||||
if (getPropValue<TypeTag, Properties::EnableEnergy>())
|
||||
oss << "_ni";
|
||||
oss << "_" << Model::discretizationName();
|
||||
return oss.str();
|
||||
@ -488,7 +552,7 @@ public:
|
||||
RateVector massRate(0.0);
|
||||
massRate[contiCO2EqIdx] = -1e-3; // [kg/(m^3 s)]
|
||||
|
||||
typedef Opm::ImmiscibleFluidState<Scalar, FluidSystem> FluidState;
|
||||
using FluidState = Opm::ImmiscibleFluidState<Scalar, FluidSystem>;
|
||||
FluidState fs;
|
||||
fs.setSaturation(gasPhaseIdx, 1.0);
|
||||
const auto& pg =
|
||||
@ -589,7 +653,7 @@ private:
|
||||
1.0 - fs.moleFraction(liquidPhaseIdx, CO2Idx));
|
||||
|
||||
typename FluidSystem::template ParameterCache<Scalar> paramCache;
|
||||
typedef Opm::ComputeFromReferencePhase<Scalar, FluidSystem> CFRP;
|
||||
using CFRP = Opm::ComputeFromReferencePhase<Scalar, FluidSystem>;
|
||||
CFRP::solve(fs, paramCache,
|
||||
/*refPhaseIdx=*/liquidPhaseIdx,
|
||||
/*setViscosity=*/true,
|
||||
|
@ -56,72 +56,96 @@ template <class TypeTag>
|
||||
class CuvetteProblem;
|
||||
}
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
|
||||
// create a new type tag for the cuvette steam injection problem
|
||||
NEW_TYPE_TAG(CuvetteBaseProblem);
|
||||
namespace TTag {
|
||||
struct CuvetteBaseProblem {};
|
||||
}
|
||||
|
||||
// Set the grid type
|
||||
SET_TYPE_PROP(CuvetteBaseProblem, Grid, Dune::YaspGrid<2>);
|
||||
template<class TypeTag>
|
||||
struct Grid<TypeTag, TTag::CuvetteBaseProblem> { using type = Dune::YaspGrid<2>; };
|
||||
|
||||
// Set the problem property
|
||||
SET_TYPE_PROP(CuvetteBaseProblem, Problem, Opm::CuvetteProblem<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::CuvetteBaseProblem> { using type = Opm::CuvetteProblem<TypeTag>; };
|
||||
|
||||
// Set the fluid system
|
||||
SET_TYPE_PROP(
|
||||
CuvetteBaseProblem, FluidSystem,
|
||||
Opm::H2OAirMesityleneFluidSystem<typename GET_PROP_TYPE(TypeTag, Scalar)>);
|
||||
template<class TypeTag>
|
||||
struct FluidSystem<TypeTag, TTag::CuvetteBaseProblem>
|
||||
{ using type = Opm::H2OAirMesityleneFluidSystem<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
// Enable gravity
|
||||
SET_BOOL_PROP(CuvetteBaseProblem, EnableGravity, true);
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::CuvetteBaseProblem> { static constexpr bool value = true; };
|
||||
|
||||
// Set the maximum time step
|
||||
SET_SCALAR_PROP(CuvetteBaseProblem, MaxTimeStepSize, 600.);
|
||||
template<class TypeTag>
|
||||
struct MaxTimeStepSize<TypeTag, TTag::CuvetteBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 600.;
|
||||
};
|
||||
|
||||
// Set the material Law
|
||||
SET_PROP(CuvetteBaseProblem, MaterialLaw)
|
||||
template<class TypeTag>
|
||||
struct MaterialLaw<TypeTag, TTag::CuvetteBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
typedef Opm::ThreePhaseMaterialTraits<
|
||||
using Traits = Opm::ThreePhaseMaterialTraits<
|
||||
Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::waterPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::naplPhaseIdx,
|
||||
/*gasPhaseIdx=*/FluidSystem::gasPhaseIdx> Traits;
|
||||
/*gasPhaseIdx=*/FluidSystem::gasPhaseIdx>;
|
||||
|
||||
public:
|
||||
typedef Opm::ThreePhaseParkerVanGenuchten<Traits> type;
|
||||
using type = Opm::ThreePhaseParkerVanGenuchten<Traits>;
|
||||
};
|
||||
|
||||
// set the energy storage law for the solid phase
|
||||
SET_TYPE_PROP(CuvetteBaseProblem, SolidEnergyLaw,
|
||||
Opm::ConstantSolidHeatCapLaw<typename GET_PROP_TYPE(TypeTag, Scalar)>);
|
||||
template<class TypeTag>
|
||||
struct SolidEnergyLaw<TypeTag, TTag::CuvetteBaseProblem>
|
||||
{ using type = Opm::ConstantSolidHeatCapLaw<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
// Set the thermal conduction law
|
||||
SET_PROP(CuvetteBaseProblem, ThermalConductionLaw)
|
||||
template<class TypeTag>
|
||||
struct ThermalConductionLaw<TypeTag, TTag::CuvetteBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::SomertonThermalConductionLaw<FluidSystem, Scalar> type;
|
||||
using type = Opm::SomertonThermalConductionLaw<FluidSystem, Scalar>;
|
||||
};
|
||||
|
||||
// The default for the end time of the simulation
|
||||
SET_SCALAR_PROP(CuvetteBaseProblem, EndTime, 180);
|
||||
template<class TypeTag>
|
||||
struct EndTime<TypeTag, TTag::CuvetteBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 180;
|
||||
};
|
||||
|
||||
// The default for the initial time step size of the simulation
|
||||
SET_SCALAR_PROP(CuvetteBaseProblem, InitialTimeStepSize, 1);
|
||||
template<class TypeTag>
|
||||
struct InitialTimeStepSize<TypeTag, TTag::CuvetteBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1;
|
||||
};
|
||||
|
||||
// The default DGF file to load
|
||||
SET_STRING_PROP(CuvetteBaseProblem, GridFile, "./data/cuvette_11x4.dgf");
|
||||
template<class TypeTag>
|
||||
struct GridFile<TypeTag, TTag::CuvetteBaseProblem> { static constexpr auto value = "./data/cuvette_11x4.dgf"; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
/*!
|
||||
@ -152,26 +176,26 @@ namespace Opm {
|
||||
* of the domain requires much longer (about 10 days simulated time).
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class CuvetteProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
class CuvetteProblem : public GetPropType<TypeTag, Properties::BaseProblem>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BaseProblem) ParentType;
|
||||
using ParentType = GetPropType<TypeTag, Properties::BaseProblem>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ThermalConductionLawParams) ThermalConductionLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, SolidEnergyLawParams) SolidEnergyLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
using MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>;
|
||||
using ThermalConductionLawParams = GetPropType<TypeTag, Properties::ThermalConductionLawParams>;
|
||||
using SolidEnergyLawParams = GetPropType<TypeTag, Properties::SolidEnergyLawParams>;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using BoundaryRateVector = GetPropType<TypeTag, Properties::BoundaryRateVector>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using Model = GetPropType<TypeTag, Properties::Model>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
// copy some indices for convenience
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
enum { numPhases = FluidSystem::numPhases };
|
||||
enum { numComponents = FluidSystem::numComponents };
|
||||
enum { waterPhaseIdx = FluidSystem::waterPhaseIdx };
|
||||
@ -185,9 +209,9 @@ class CuvetteProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
// Grid and world dimension
|
||||
enum { dimWorld = GridView::dimensionworld };
|
||||
|
||||
typedef typename GridView::ctype CoordScalar;
|
||||
typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
using CoordScalar = typename GridView::ctype;
|
||||
using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@ -522,7 +546,7 @@ private:
|
||||
fs.setPressure(phaseIdx, pw + (pc[phaseIdx] - pc[waterPhaseIdx]));
|
||||
|
||||
// compute the phase compositions
|
||||
typedef Opm::MiscibleMultiPhaseComposition<Scalar, FluidSystem> MMPC;
|
||||
using MMPC = Opm::MiscibleMultiPhaseComposition<Scalar, FluidSystem>;
|
||||
typename FluidSystem::template ParameterCache<Scalar> paramCache;
|
||||
MMPC::solve(fs, paramCache, /*setViscosity=*/true, /*setEnthalpy=*/true);
|
||||
}
|
||||
@ -539,7 +563,7 @@ private:
|
||||
fs.setPressure(phaseIdx, pw + (pc[phaseIdx] - pc[waterPhaseIdx]));
|
||||
|
||||
// compute the phase compositions
|
||||
typedef Opm::MiscibleMultiPhaseComposition<Scalar, FluidSystem> MMPC;
|
||||
using MMPC = Opm::MiscibleMultiPhaseComposition<Scalar, FluidSystem>;
|
||||
typename FluidSystem::template ParameterCache<Scalar> paramCache;
|
||||
MMPC::solve(fs, paramCache, /*setViscosity=*/true, /*setEnthalpy=*/true);
|
||||
|
||||
|
@ -52,70 +52,109 @@ template <class TypeTag>
|
||||
class DiffusionProblem;
|
||||
}
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(DiffusionBaseProblem);
|
||||
namespace TTag {
|
||||
|
||||
struct DiffusionBaseProblem {};
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
// Set the grid implementation to be used
|
||||
SET_TYPE_PROP(DiffusionBaseProblem, Grid, Dune::YaspGrid</*dim=*/1>);
|
||||
template<class TypeTag>
|
||||
struct Grid<TypeTag, TTag::DiffusionBaseProblem> { using type = Dune::YaspGrid</*dim=*/1>; };
|
||||
|
||||
// set the Vanguard property
|
||||
SET_TYPE_PROP(DiffusionBaseProblem, Vanguard, Opm::CubeGridVanguard<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Vanguard<TypeTag, TTag::DiffusionBaseProblem> { using type = Opm::CubeGridVanguard<TypeTag>; };
|
||||
|
||||
// Set the problem property
|
||||
SET_TYPE_PROP(DiffusionBaseProblem, Problem, Opm::DiffusionProblem<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::DiffusionBaseProblem> { using type = Opm::DiffusionProblem<TypeTag>; };
|
||||
|
||||
// Set the fluid system
|
||||
SET_PROP(DiffusionBaseProblem, FluidSystem)
|
||||
template<class TypeTag>
|
||||
struct FluidSystem<TypeTag, TTag::DiffusionBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
public:
|
||||
typedef Opm::H2ON2FluidSystem<Scalar> type;
|
||||
using type = Opm::H2ON2FluidSystem<Scalar>;
|
||||
};
|
||||
|
||||
// Set the material Law
|
||||
SET_PROP(DiffusionBaseProblem, MaterialLaw)
|
||||
template<class TypeTag>
|
||||
struct MaterialLaw<TypeTag, TTag::DiffusionBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
static_assert(FluidSystem::numPhases == 2,
|
||||
"A fluid system with two phases is required "
|
||||
"for this problem!");
|
||||
|
||||
typedef Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::liquidPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::gasPhaseIdx> Traits;
|
||||
using Traits = Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::liquidPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::gasPhaseIdx>;
|
||||
|
||||
public:
|
||||
typedef Opm::LinearMaterial<Traits> type;
|
||||
using type = Opm::LinearMaterial<Traits>;
|
||||
};
|
||||
|
||||
// Enable molecular diffusion for this problem
|
||||
SET_BOOL_PROP(DiffusionBaseProblem, EnableDiffusion, true);
|
||||
template<class TypeTag>
|
||||
struct EnableDiffusion<TypeTag, TTag::DiffusionBaseProblem> { static constexpr bool value = true; };
|
||||
|
||||
// Disable gravity
|
||||
SET_BOOL_PROP(DiffusionBaseProblem, EnableGravity, false);
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::DiffusionBaseProblem> { static constexpr bool value = false; };
|
||||
|
||||
// define the properties specific for the diffusion problem
|
||||
SET_SCALAR_PROP(DiffusionBaseProblem, DomainSizeX, 1.0);
|
||||
SET_SCALAR_PROP(DiffusionBaseProblem, DomainSizeY, 1.0);
|
||||
SET_SCALAR_PROP(DiffusionBaseProblem, DomainSizeZ, 1.0);
|
||||
template<class TypeTag>
|
||||
struct DomainSizeX<TypeTag, TTag::DiffusionBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1.0;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct DomainSizeY<TypeTag, TTag::DiffusionBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1.0;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct DomainSizeZ<TypeTag, TTag::DiffusionBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1.0;
|
||||
};
|
||||
|
||||
SET_INT_PROP(DiffusionBaseProblem, CellsX, 250);
|
||||
SET_INT_PROP(DiffusionBaseProblem, CellsY, 1);
|
||||
SET_INT_PROP(DiffusionBaseProblem, CellsZ, 1);
|
||||
template<class TypeTag>
|
||||
struct CellsX<TypeTag, TTag::DiffusionBaseProblem> { static constexpr int value = 250; };
|
||||
template<class TypeTag>
|
||||
struct CellsY<TypeTag, TTag::DiffusionBaseProblem> { static constexpr int value = 1; };
|
||||
template<class TypeTag>
|
||||
struct CellsZ<TypeTag, TTag::DiffusionBaseProblem> { static constexpr int value = 1; };
|
||||
|
||||
// The default for the end time of the simulation
|
||||
SET_SCALAR_PROP(DiffusionBaseProblem, EndTime, 1e6);
|
||||
template<class TypeTag>
|
||||
struct EndTime<TypeTag, TTag::DiffusionBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1e6;
|
||||
};
|
||||
|
||||
// The default for the initial time step size of the simulation
|
||||
SET_SCALAR_PROP(DiffusionBaseProblem, InitialTimeStepSize, 1000);
|
||||
template<class TypeTag>
|
||||
struct InitialTimeStepSize<TypeTag, TTag::DiffusionBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1000;
|
||||
};
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
/*!
|
||||
@ -129,16 +168,16 @@ namespace Opm {
|
||||
* diffusion.
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class DiffusionProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
class DiffusionProblem : public GetPropType<TypeTag, Properties::BaseProblem>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BaseProblem) ParentType;
|
||||
using ParentType = GetPropType<TypeTag, Properties::BaseProblem>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using Model = GetPropType<TypeTag, Properties::Model>;
|
||||
|
||||
enum {
|
||||
// number of phases
|
||||
@ -157,17 +196,17 @@ class DiffusionProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
dimWorld = GridView::dimensionworld
|
||||
};
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using BoundaryRateVector = GetPropType<TypeTag, Properties::BoundaryRateVector>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
using MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>;
|
||||
|
||||
typedef typename GridView::ctype CoordScalar;
|
||||
typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
|
||||
using CoordScalar = typename GridView::ctype;
|
||||
using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>;
|
||||
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@ -347,7 +386,7 @@ private:
|
||||
leftInitialFluidState_.setMoleFraction(gasPhaseIdx, H2OIdx, xH2O);
|
||||
leftInitialFluidState_.setMoleFraction(gasPhaseIdx, N2Idx, 1 - xH2O);
|
||||
|
||||
typedef Opm::ComputeFromReferencePhase<Scalar, FluidSystem> CFRP;
|
||||
using CFRP = Opm::ComputeFromReferencePhase<Scalar, FluidSystem>;
|
||||
typename FluidSystem::template ParameterCache<Scalar> paramCache;
|
||||
CFRP::solve(leftInitialFluidState_, paramCache, gasPhaseIdx,
|
||||
/*setViscosity=*/false, /*setEnthalpy=*/false);
|
||||
|
@ -62,90 +62,135 @@ class FingerProblem;
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(FingerBaseProblem, INHERITS_FROM(StructuredGridVanguard));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct FingerBaseProblem { using InheritsFrom = std::tuple<StructuredGridVanguard>; };
|
||||
} // end namespace TTag
|
||||
|
||||
#if HAVE_DUNE_ALUGRID
|
||||
// use dune-alugrid if available
|
||||
SET_TYPE_PROP(FingerBaseProblem,
|
||||
Grid,
|
||||
Dune::ALUGrid</*dim=*/2,
|
||||
/*dimWorld=*/2,
|
||||
Dune::cube,
|
||||
Dune::nonconforming>);
|
||||
template<class TypeTag>
|
||||
struct Grid<TypeTag, TTag::FingerBaseProblem>
|
||||
{ using type = Dune::ALUGrid</*dim=*/2,
|
||||
/*dimWorld=*/2,
|
||||
Dune::cube,
|
||||
Dune::nonconforming>; };
|
||||
#endif
|
||||
|
||||
// declare the properties used by the finger problem
|
||||
NEW_PROP_TAG(InitialWaterSaturation);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct InitialWaterSaturation { using type = UndefinedProperty; };
|
||||
|
||||
// Set the problem property
|
||||
SET_TYPE_PROP(FingerBaseProblem, Problem, Opm::FingerProblem<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::FingerBaseProblem> { using type = Opm::FingerProblem<TypeTag>; };
|
||||
|
||||
// Set the wetting phase
|
||||
SET_PROP(FingerBaseProblem, WettingPhase)
|
||||
template<class TypeTag>
|
||||
struct WettingPhase<TypeTag, TTag::FingerBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
public:
|
||||
typedef Opm::LiquidPhase<Scalar, Opm::SimpleH2O<Scalar> > type;
|
||||
using type = Opm::LiquidPhase<Scalar, Opm::SimpleH2O<Scalar> >;
|
||||
};
|
||||
|
||||
// Set the non-wetting phase
|
||||
SET_PROP(FingerBaseProblem, NonwettingPhase)
|
||||
template<class TypeTag>
|
||||
struct NonwettingPhase<TypeTag, TTag::FingerBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
public:
|
||||
typedef Opm::GasPhase<Scalar, Opm::Air<Scalar> > type;
|
||||
using type = Opm::GasPhase<Scalar, Opm::Air<Scalar> >;
|
||||
};
|
||||
|
||||
// Set the material Law
|
||||
SET_PROP(FingerBaseProblem, MaterialLaw)
|
||||
template<class TypeTag>
|
||||
struct MaterialLaw<TypeTag, TTag::FingerBaseProblem>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::wettingPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::nonWettingPhaseIdx> Traits;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using Traits = Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::wettingPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::nonWettingPhaseIdx>;
|
||||
|
||||
// use the parker-lenhard hysteresis law
|
||||
typedef Opm::ParkerLenhard<Traits> ParkerLenhard;
|
||||
typedef ParkerLenhard type;
|
||||
using ParkerLenhard = Opm::ParkerLenhard<Traits>;
|
||||
using type = ParkerLenhard;
|
||||
};
|
||||
|
||||
// Write the solutions of individual newton iterations?
|
||||
SET_BOOL_PROP(FingerBaseProblem, NewtonWriteConvergence, false);
|
||||
template<class TypeTag>
|
||||
struct NewtonWriteConvergence<TypeTag, TTag::FingerBaseProblem> { static constexpr bool value = false; };
|
||||
|
||||
// Use forward differences instead of central differences
|
||||
SET_INT_PROP(FingerBaseProblem, NumericDifferenceMethod, +1);
|
||||
template<class TypeTag>
|
||||
struct NumericDifferenceMethod<TypeTag, TTag::FingerBaseProblem> { static constexpr int value = +1; };
|
||||
|
||||
// Enable constraints
|
||||
SET_INT_PROP(FingerBaseProblem, EnableConstraints, true);
|
||||
template<class TypeTag>
|
||||
struct EnableConstraints<TypeTag, TTag::FingerBaseProblem> { static constexpr int value = true; };
|
||||
|
||||
// Enable gravity
|
||||
SET_BOOL_PROP(FingerBaseProblem, EnableGravity, true);
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::FingerBaseProblem> { static constexpr bool value = true; };
|
||||
|
||||
// define the properties specific for the finger problem
|
||||
SET_SCALAR_PROP(FingerBaseProblem, DomainSizeX, 0.1);
|
||||
SET_SCALAR_PROP(FingerBaseProblem, DomainSizeY, 0.3);
|
||||
SET_SCALAR_PROP(FingerBaseProblem, DomainSizeZ, 0.1);
|
||||
template<class TypeTag>
|
||||
struct DomainSizeX<TypeTag, TTag::FingerBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 0.1;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct DomainSizeY<TypeTag, TTag::FingerBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 0.3;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct DomainSizeZ<TypeTag, TTag::FingerBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 0.1;
|
||||
};
|
||||
|
||||
SET_SCALAR_PROP(FingerBaseProblem, InitialWaterSaturation, 0.01);
|
||||
template<class TypeTag>
|
||||
struct InitialWaterSaturation<TypeTag, TTag::FingerBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 0.01;
|
||||
};
|
||||
|
||||
SET_INT_PROP(FingerBaseProblem, CellsX, 20);
|
||||
SET_INT_PROP(FingerBaseProblem, CellsY, 70);
|
||||
SET_INT_PROP(FingerBaseProblem, CellsZ, 1);
|
||||
template<class TypeTag>
|
||||
struct CellsX<TypeTag, TTag::FingerBaseProblem> { static constexpr int value = 20; };
|
||||
template<class TypeTag>
|
||||
struct CellsY<TypeTag, TTag::FingerBaseProblem> { static constexpr int value = 70; };
|
||||
template<class TypeTag>
|
||||
struct CellsZ<TypeTag, TTag::FingerBaseProblem> { static constexpr int value = 1; };
|
||||
|
||||
// The default for the end time of the simulation
|
||||
SET_SCALAR_PROP(FingerBaseProblem, EndTime, 215);
|
||||
template<class TypeTag>
|
||||
struct EndTime<TypeTag, TTag::FingerBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 215;
|
||||
};
|
||||
|
||||
// The default for the initial time step size of the simulation
|
||||
SET_SCALAR_PROP(FingerBaseProblem, InitialTimeStepSize, 10);
|
||||
template<class TypeTag>
|
||||
struct InitialTimeStepSize<TypeTag, TTag::FingerBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 10;
|
||||
};
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@ -165,21 +210,21 @@ namespace Opm {
|
||||
* discretization is fine enough.
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class FingerProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
class FingerProblem : public GetPropType<TypeTag, Properties::BaseProblem>
|
||||
{
|
||||
//!\cond SKIP_THIS
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BaseProblem) ParentType;
|
||||
using ParentType = GetPropType<TypeTag, Properties::BaseProblem>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, WettingPhase) WettingPhase;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, NonwettingPhase) NonwettingPhase;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Constraints) Constraints;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using WettingPhase = GetPropType<TypeTag, Properties::WettingPhase>;
|
||||
using NonwettingPhase = GetPropType<TypeTag, Properties::NonwettingPhase>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using Constraints = GetPropType<TypeTag, Properties::Constraints>;
|
||||
using Model = GetPropType<TypeTag, Properties::Model>;
|
||||
|
||||
enum {
|
||||
// number of phases
|
||||
@ -197,28 +242,28 @@ class FingerProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
dimWorld = GridView::dimensionworld
|
||||
};
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Stencil) Stencil;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using Stencil = GetPropType<TypeTag, Properties::Stencil> ;
|
||||
enum { codim = Stencil::Entity::codimension };
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using BoundaryRateVector = GetPropType<TypeTag, Properties::BoundaryRateVector>;
|
||||
|
||||
typedef typename GET_PROP(TypeTag, MaterialLaw)::ParkerLenhard ParkerLenhard;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
|
||||
using ParkerLenhard = typename GetProp<TypeTag, Properties::MaterialLaw>::ParkerLenhard;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
using MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>;
|
||||
|
||||
typedef typename GridView::ctype CoordScalar;
|
||||
typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
using CoordScalar = typename GridView::ctype;
|
||||
using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
|
||||
typedef typename GridView :: Grid Grid;
|
||||
using Grid = typename GridView :: Grid;
|
||||
|
||||
typedef Dune::PersistentContainer< Grid, std::shared_ptr< MaterialLawParams > > MaterialLawParamsContainer;
|
||||
using MaterialLawParamsContainer = Dune::PersistentContainer< Grid, std::shared_ptr< MaterialLawParams > > ;
|
||||
//!\endcond
|
||||
|
||||
public:
|
||||
typedef CopyRestrictProlong< Grid, MaterialLawParamsContainer > RestrictProlongOperator;
|
||||
using RestrictProlongOperator = CopyRestrictProlong< Grid, MaterialLawParamsContainer >;
|
||||
|
||||
/*!
|
||||
* \copydoc Doxygen::defaultProblemConstructor
|
||||
|
@ -65,100 +65,123 @@ template <class TypeTag>
|
||||
class FractureProblem;
|
||||
}
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
// Create a type tag for the problem
|
||||
NEW_TYPE_TAG(FractureProblem, INHERITS_FROM(DiscreteFractureModel));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct FractureProblem { using InheritsFrom = std::tuple<DiscreteFractureModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
// Set the grid type
|
||||
SET_TYPE_PROP(
|
||||
FractureProblem, Grid,
|
||||
Dune::ALUGrid</*dim=*/2, /*dimWorld=*/2, Dune::simplex, Dune::nonconforming>);
|
||||
template<class TypeTag>
|
||||
struct Grid<TypeTag, TTag::FractureProblem>
|
||||
{ using type = Dune::ALUGrid</*dim=*/2, /*dimWorld=*/2, Dune::simplex, Dune::nonconforming>; };
|
||||
|
||||
// Set the Vanguard property
|
||||
SET_TYPE_PROP(FractureProblem, Vanguard, Opm::DgfVanguard<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Vanguard<TypeTag, TTag::FractureProblem> { using type = Opm::DgfVanguard<TypeTag>; };
|
||||
|
||||
// Set the problem property
|
||||
SET_TYPE_PROP(FractureProblem, Problem, Opm::FractureProblem<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::FractureProblem> { using type = Opm::FractureProblem<TypeTag>; };
|
||||
|
||||
// Set the wetting phase
|
||||
SET_PROP(FractureProblem, WettingPhase)
|
||||
template<class TypeTag>
|
||||
struct WettingPhase<TypeTag, TTag::FractureProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
public:
|
||||
typedef Opm::LiquidPhase<Scalar, Opm::SimpleH2O<Scalar> > type;
|
||||
using type = Opm::LiquidPhase<Scalar, Opm::SimpleH2O<Scalar> >;
|
||||
};
|
||||
|
||||
// Set the non-wetting phase
|
||||
SET_PROP(FractureProblem, NonwettingPhase)
|
||||
template<class TypeTag>
|
||||
struct NonwettingPhase<TypeTag, TTag::FractureProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
public:
|
||||
typedef Opm::LiquidPhase<Scalar, Opm::DNAPL<Scalar> > type;
|
||||
using type = Opm::LiquidPhase<Scalar, Opm::DNAPL<Scalar> >;
|
||||
};
|
||||
|
||||
// Set the material Law
|
||||
SET_PROP(FractureProblem, MaterialLaw)
|
||||
template<class TypeTag>
|
||||
struct MaterialLaw<TypeTag, TTag::FractureProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
enum { wettingPhaseIdx = FluidSystem::wettingPhaseIdx };
|
||||
enum { nonWettingPhaseIdx = FluidSystem::nonWettingPhaseIdx };
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::wettingPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::nonWettingPhaseIdx>
|
||||
Traits;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Traits = Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::wettingPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::nonWettingPhaseIdx>;
|
||||
|
||||
// define the material law which is parameterized by effective
|
||||
// saturations
|
||||
typedef Opm::RegularizedBrooksCorey<Traits> EffectiveLaw;
|
||||
// typedef RegularizedVanGenuchten<Traits> EffectiveLaw;
|
||||
// typedef LinearMaterial<Traits> EffectiveLaw;
|
||||
using EffectiveLaw = Opm::RegularizedBrooksCorey<Traits>;
|
||||
// using EffectiveLaw = RegularizedVanGenuchten<Traits>;
|
||||
// using EffectiveLaw = LinearMaterial<Traits>;
|
||||
public:
|
||||
typedef Opm::EffToAbsLaw<EffectiveLaw> type;
|
||||
using type = Opm::EffToAbsLaw<EffectiveLaw>;
|
||||
};
|
||||
|
||||
// Enable the energy equation
|
||||
SET_BOOL_PROP(FractureProblem, EnableEnergy, true);
|
||||
template<class TypeTag>
|
||||
struct EnableEnergy<TypeTag, TTag::FractureProblem> { static constexpr bool value = true; };
|
||||
|
||||
// Set the thermal conduction law
|
||||
SET_PROP(FractureProblem, ThermalConductionLaw)
|
||||
template<class TypeTag>
|
||||
struct ThermalConductionLaw<TypeTag, TTag::FractureProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::SomertonThermalConductionLaw<FluidSystem, Scalar> type;
|
||||
using type = Opm::SomertonThermalConductionLaw<FluidSystem, Scalar>;
|
||||
};
|
||||
|
||||
// set the energy storage law for the solid phase
|
||||
SET_TYPE_PROP(FractureProblem, SolidEnergyLaw,
|
||||
Opm::ConstantSolidHeatCapLaw<typename GET_PROP_TYPE(TypeTag, Scalar)>);
|
||||
template<class TypeTag>
|
||||
struct SolidEnergyLaw<TypeTag, TTag::FractureProblem>
|
||||
{ using type = Opm::ConstantSolidHeatCapLaw<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
// Disable gravity
|
||||
SET_BOOL_PROP(FractureProblem, EnableGravity, false);
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::FractureProblem> { static constexpr bool value = false; };
|
||||
|
||||
// For this problem, we use constraints to specify the left boundary
|
||||
SET_BOOL_PROP(FractureProblem, EnableConstraints, true);
|
||||
template<class TypeTag>
|
||||
struct EnableConstraints<TypeTag, TTag::FractureProblem> { static constexpr bool value = true; };
|
||||
|
||||
// Set the default value for the file name of the grid
|
||||
SET_STRING_PROP(FractureProblem, GridFile, "data/fracture.art.dgf");
|
||||
template<class TypeTag>
|
||||
struct GridFile<TypeTag, TTag::FractureProblem> { static constexpr auto value = "data/fracture.art.dgf"; };
|
||||
|
||||
// Set the default value for the end time
|
||||
SET_SCALAR_PROP(FractureProblem, EndTime, 3e3);
|
||||
template<class TypeTag>
|
||||
struct EndTime<TypeTag, TTag::FractureProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 3e3;
|
||||
};
|
||||
|
||||
// Set the default value for the initial time step size
|
||||
SET_SCALAR_PROP(FractureProblem, InitialTimeStepSize, 100);
|
||||
template<class TypeTag>
|
||||
struct InitialTimeStepSize<TypeTag, TTag::FractureProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 100;
|
||||
};
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
/*!
|
||||
@ -174,25 +197,25 @@ namespace Opm {
|
||||
* where the pressure is kept constant.
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class FractureProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
class FractureProblem : public GetPropType<TypeTag, Properties::BaseProblem>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BaseProblem) ParentType;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, WettingPhase) WettingPhase;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, NonwettingPhase) NonwettingPhase;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Constraints) Constraints;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ThermalConductionLawParams) ThermalConductionLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, SolidEnergyLawParams) SolidEnergyLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
using ParentType = GetPropType<TypeTag, Properties::BaseProblem>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using WettingPhase = GetPropType<TypeTag, Properties::WettingPhase>;
|
||||
using NonwettingPhase = GetPropType<TypeTag, Properties::NonwettingPhase>;
|
||||
using Constraints = GetPropType<TypeTag, Properties::Constraints>;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using BoundaryRateVector = GetPropType<TypeTag, Properties::BoundaryRateVector>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
using MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>;
|
||||
using ThermalConductionLawParams = GetPropType<TypeTag, Properties::ThermalConductionLawParams>;
|
||||
using SolidEnergyLawParams = GetPropType<TypeTag, Properties::SolidEnergyLawParams>;
|
||||
using Model = GetPropType<TypeTag, Properties::Model>;
|
||||
|
||||
enum {
|
||||
// phase indices
|
||||
@ -207,10 +230,10 @@ class FractureProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
dimWorld = GridView::dimensionworld
|
||||
};
|
||||
|
||||
typedef Opm::ImmiscibleFluidState<Scalar, FluidSystem> FluidState;
|
||||
using FluidState = Opm::ImmiscibleFluidState<Scalar, FluidSystem>;
|
||||
|
||||
typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
|
||||
template <int dim>
|
||||
struct FaceLayout
|
||||
@ -218,9 +241,9 @@ class FractureProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
bool contains(Dune::GeometryType gt)
|
||||
{ return gt.dim() == dim - 1; }
|
||||
};
|
||||
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, FaceLayout> FaceMapper;
|
||||
using FaceMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, FaceLayout>;
|
||||
|
||||
typedef Opm::FractureMapper<TypeTag> FractureMapper;
|
||||
using FractureMapper = Opm::FractureMapper<TypeTag>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
|
@ -51,63 +51,131 @@ template <class TypeTag>
|
||||
class GroundWaterProblem;
|
||||
}
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(GroundWaterBaseProblem);
|
||||
namespace TTag {
|
||||
struct GroundWaterBaseProblem {};
|
||||
}
|
||||
|
||||
NEW_PROP_TAG(LensLowerLeftX);
|
||||
NEW_PROP_TAG(LensLowerLeftY);
|
||||
NEW_PROP_TAG(LensLowerLeftZ);
|
||||
NEW_PROP_TAG(LensUpperRightX);
|
||||
NEW_PROP_TAG(LensUpperRightY);
|
||||
NEW_PROP_TAG(LensUpperRightZ);
|
||||
NEW_PROP_TAG(Permeability);
|
||||
NEW_PROP_TAG(PermeabilityLens);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct LensLowerLeftX { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct LensLowerLeftY { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct LensLowerLeftZ { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct LensUpperRightX { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct LensUpperRightY { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct LensUpperRightZ { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct Permeability { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct PermeabilityLens { using type = UndefinedProperty; };
|
||||
|
||||
SET_PROP(GroundWaterBaseProblem, Fluid)
|
||||
template<class TypeTag>
|
||||
struct Fluid<TypeTag, TTag::GroundWaterBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
public:
|
||||
typedef Opm::LiquidPhase<Scalar, Opm::SimpleH2O<Scalar> > type;
|
||||
using type = Opm::LiquidPhase<Scalar, Opm::SimpleH2O<Scalar> >;
|
||||
};
|
||||
|
||||
// Set the grid type
|
||||
SET_TYPE_PROP(GroundWaterBaseProblem, Grid, Dune::YaspGrid<2>);
|
||||
// SET_TYPE_PROP(GroundWaterBaseProblem, Grid, Dune::SGrid<2, 2>);
|
||||
template<class TypeTag>
|
||||
struct Grid<TypeTag, TTag::GroundWaterBaseProblem> { using type = Dune::YaspGrid<2>; };
|
||||
// struct Grid<TypeTag, TTag::GroundWaterBaseProblem> { using type = Dune::SGrid<2, 2>; };
|
||||
|
||||
SET_TYPE_PROP(GroundWaterBaseProblem, Problem,
|
||||
Opm::GroundWaterProblem<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::GroundWaterBaseProblem>
|
||||
{ using type = Opm::GroundWaterProblem<TypeTag>; };
|
||||
|
||||
SET_SCALAR_PROP(GroundWaterBaseProblem, LensLowerLeftX, 0.25);
|
||||
SET_SCALAR_PROP(GroundWaterBaseProblem, LensLowerLeftY, 0.25);
|
||||
SET_SCALAR_PROP(GroundWaterBaseProblem, LensLowerLeftZ, 0.25);
|
||||
SET_SCALAR_PROP(GroundWaterBaseProblem, LensUpperRightX, 0.75);
|
||||
SET_SCALAR_PROP(GroundWaterBaseProblem, LensUpperRightY, 0.75);
|
||||
SET_SCALAR_PROP(GroundWaterBaseProblem, LensUpperRightZ, 0.75);
|
||||
SET_SCALAR_PROP(GroundWaterBaseProblem, Permeability, 1e-10);
|
||||
SET_SCALAR_PROP(GroundWaterBaseProblem, PermeabilityLens, 1e-12);
|
||||
template<class TypeTag>
|
||||
struct LensLowerLeftX<TypeTag, TTag::GroundWaterBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 0.25;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct LensLowerLeftY<TypeTag, TTag::GroundWaterBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 0.25;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct LensLowerLeftZ<TypeTag, TTag::GroundWaterBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 0.25;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct LensUpperRightX<TypeTag, TTag::GroundWaterBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 0.75;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct LensUpperRightY<TypeTag, TTag::GroundWaterBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 0.75;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct LensUpperRightZ<TypeTag, TTag::GroundWaterBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 0.75;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct Permeability<TypeTag, TTag::GroundWaterBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1e-10;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct PermeabilityLens<TypeTag, TTag::GroundWaterBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1e-12;
|
||||
};
|
||||
|
||||
// Enable gravity
|
||||
SET_BOOL_PROP(GroundWaterBaseProblem, EnableGravity, true);
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::GroundWaterBaseProblem> { static constexpr bool value = true; };
|
||||
|
||||
// The default for the end time of the simulation
|
||||
SET_SCALAR_PROP(GroundWaterBaseProblem, EndTime, 1);
|
||||
template<class TypeTag>
|
||||
struct EndTime<TypeTag, TTag::GroundWaterBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1;
|
||||
};
|
||||
|
||||
// The default for the initial time step size of the simulation
|
||||
SET_SCALAR_PROP(GroundWaterBaseProblem, InitialTimeStepSize, 1);
|
||||
template<class TypeTag>
|
||||
struct InitialTimeStepSize<TypeTag, TTag::GroundWaterBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1;
|
||||
};
|
||||
|
||||
// The default DGF file to load
|
||||
SET_STRING_PROP(GroundWaterBaseProblem, GridFile, "./data/groundwater_2d.dgf");
|
||||
template<class TypeTag>
|
||||
struct GridFile<TypeTag, TTag::GroundWaterBaseProblem> { static constexpr auto value = "./data/groundwater_2d.dgf"; };
|
||||
|
||||
// Use the conjugated gradient linear solver with the default preconditioner (i.e.,
|
||||
// ILU-0) from dune-istl
|
||||
SET_TAG_PROP(GroundWaterBaseProblem, LinearSolverSplice, ParallelIstlLinearSolver);
|
||||
SET_TYPE_PROP(GroundWaterBaseProblem, LinearSolverWrapper,
|
||||
Opm::Linear::SolverWrapperConjugatedGradients<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct LinearSolverSplice<TypeTag, TTag::GroundWaterBaseProblem> { using type = TTag::ParallelIstlLinearSolver; };
|
||||
|
||||
END_PROPERTIES
|
||||
template<class TypeTag>
|
||||
struct LinearSolverWrapper<TypeTag, TTag::GroundWaterBaseProblem>
|
||||
{ using type = Opm::Linear::SolverWrapperConjugatedGradients<TypeTag>; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
/*!
|
||||
@ -123,16 +191,16 @@ namespace Opm {
|
||||
* occupied by a rectangular lens of lower permeability.
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class GroundWaterProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
class GroundWaterProblem : public GetPropType<TypeTag, Properties::BaseProblem>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BaseProblem) ParentType;
|
||||
using ParentType = GetPropType<TypeTag, Properties::BaseProblem>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
// copy some indices for convenience
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
enum {
|
||||
numPhases = FluidSystem::numPhases,
|
||||
|
||||
@ -144,17 +212,17 @@ class GroundWaterProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
pressure0Idx = Indices::pressure0Idx
|
||||
};
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using BoundaryRateVector = GetPropType<TypeTag, Properties::BoundaryRateVector>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using Model = GetPropType<TypeTag, Properties::Model>;
|
||||
|
||||
typedef typename GridView::ctype CoordScalar;
|
||||
typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
|
||||
using CoordScalar = typename GridView::ctype;
|
||||
using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>;
|
||||
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
|
@ -52,59 +52,77 @@ template <class TypeTag>
|
||||
class InfiltrationProblem;
|
||||
}
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(InfiltrationBaseProblem);
|
||||
namespace TTag {
|
||||
struct InfiltrationBaseProblem {};
|
||||
}
|
||||
|
||||
// Set the grid type
|
||||
SET_TYPE_PROP(InfiltrationBaseProblem, Grid, Dune::YaspGrid<2>);
|
||||
template<class TypeTag>
|
||||
struct Grid<TypeTag, TTag::InfiltrationBaseProblem> { using type = Dune::YaspGrid<2>; };
|
||||
|
||||
// Set the problem property
|
||||
SET_TYPE_PROP(InfiltrationBaseProblem, Problem,
|
||||
Opm::InfiltrationProblem<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::InfiltrationBaseProblem> { using type = Opm::InfiltrationProblem<TypeTag>; };
|
||||
|
||||
// Set the fluid system
|
||||
SET_TYPE_PROP(
|
||||
InfiltrationBaseProblem, FluidSystem,
|
||||
Opm::H2OAirMesityleneFluidSystem<typename GET_PROP_TYPE(TypeTag, Scalar)>);
|
||||
template<class TypeTag>
|
||||
struct FluidSystem<TypeTag, TTag::InfiltrationBaseProblem>
|
||||
{ using type = Opm::H2OAirMesityleneFluidSystem<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
// Enable gravity?
|
||||
SET_BOOL_PROP(InfiltrationBaseProblem, EnableGravity, true);
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::InfiltrationBaseProblem> { static constexpr bool value = true; };
|
||||
|
||||
// Write newton convergence?
|
||||
SET_BOOL_PROP(InfiltrationBaseProblem, NewtonWriteConvergence, false);
|
||||
template<class TypeTag>
|
||||
struct NewtonWriteConvergence<TypeTag, TTag::InfiltrationBaseProblem> { static constexpr bool value = false; };
|
||||
|
||||
// -1 backward differences, 0: central differences, +1: forward differences
|
||||
SET_INT_PROP(InfiltrationBaseProblem, NumericDifferenceMethod, 1);
|
||||
template<class TypeTag>
|
||||
struct NumericDifferenceMethod<TypeTag, TTag::InfiltrationBaseProblem> { static constexpr int value = 1; };
|
||||
|
||||
// Set the material Law
|
||||
SET_PROP(InfiltrationBaseProblem, MaterialLaw)
|
||||
template<class TypeTag>
|
||||
struct MaterialLaw<TypeTag, TTag::InfiltrationBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
typedef Opm::ThreePhaseMaterialTraits<
|
||||
using Traits= Opm::ThreePhaseMaterialTraits<
|
||||
Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::waterPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::naplPhaseIdx,
|
||||
/*gasPhaseIdx=*/FluidSystem::gasPhaseIdx> Traits;
|
||||
/*gasPhaseIdx=*/FluidSystem::gasPhaseIdx>;
|
||||
|
||||
public:
|
||||
typedef Opm::ThreePhaseParkerVanGenuchten<Traits> type;
|
||||
using type = Opm::ThreePhaseParkerVanGenuchten<Traits>;
|
||||
};
|
||||
|
||||
// The default for the end time of the simulation
|
||||
SET_SCALAR_PROP(InfiltrationBaseProblem, EndTime, 6e3);
|
||||
template<class TypeTag>
|
||||
struct EndTime<TypeTag, TTag::InfiltrationBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 6e3;
|
||||
};
|
||||
|
||||
// The default for the initial time step size of the simulation
|
||||
SET_SCALAR_PROP(InfiltrationBaseProblem, InitialTimeStepSize, 60);
|
||||
template<class TypeTag>
|
||||
struct InitialTimeStepSize<TypeTag, TTag::InfiltrationBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 60;
|
||||
};
|
||||
|
||||
// The default DGF file to load
|
||||
SET_STRING_PROP(InfiltrationBaseProblem, GridFile,
|
||||
"./data/infiltration_50x3.dgf");
|
||||
template<class TypeTag>
|
||||
struct GridFile<TypeTag, TTag::InfiltrationBaseProblem>
|
||||
{ static constexpr auto value = "./data/infiltration_50x3.dgf"; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
/*!
|
||||
@ -130,24 +148,24 @@ namespace Opm {
|
||||
* except for the small infiltration zone in the upper left part.
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class InfiltrationProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
class InfiltrationProblem : public GetPropType<TypeTag, Properties::BaseProblem>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BaseProblem) ParentType;
|
||||
using ParentType = GetPropType<TypeTag, Properties::BaseProblem>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
using MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using BoundaryRateVector = GetPropType<TypeTag, Properties::BoundaryRateVector>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using Model = GetPropType<TypeTag, Properties::Model>;
|
||||
|
||||
// copy some indices for convenience
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
enum {
|
||||
// equation indices
|
||||
conti0EqIdx = Indices::conti0EqIdx,
|
||||
@ -170,9 +188,9 @@ class InfiltrationProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
dimWorld = GridView::dimensionworld
|
||||
};
|
||||
|
||||
typedef typename GridView::ctype CoordScalar;
|
||||
typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
using CoordScalar = typename GridView::ctype;
|
||||
using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@ -446,7 +464,7 @@ private:
|
||||
1 - fs.moleFraction(gasPhaseIdx, H2OIdx));
|
||||
fs.setMoleFraction(gasPhaseIdx, NAPLIdx, 0);
|
||||
|
||||
typedef Opm::ComputeFromReferencePhase<Scalar, FluidSystem> CFRP;
|
||||
using CFRP = Opm::ComputeFromReferencePhase<Scalar, FluidSystem>;
|
||||
typename FluidSystem::template ParameterCache<Scalar> paramCache;
|
||||
CFRP::solve(fs, paramCache, gasPhaseIdx,
|
||||
/*setViscosity=*/true,
|
||||
|
@ -56,107 +56,185 @@ template <class TypeTag>
|
||||
class LensProblem;
|
||||
}
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(LensBaseProblem, INHERITS_FROM(StructuredGridVanguard));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct LensBaseProblem { using InheritsFrom = std::tuple<StructuredGridVanguard>; };
|
||||
} // end namespace TTag
|
||||
|
||||
// declare the properties specific for the lens problem
|
||||
NEW_PROP_TAG(LensLowerLeftX);
|
||||
NEW_PROP_TAG(LensLowerLeftY);
|
||||
NEW_PROP_TAG(LensLowerLeftZ);
|
||||
NEW_PROP_TAG(LensUpperRightX);
|
||||
NEW_PROP_TAG(LensUpperRightY);
|
||||
NEW_PROP_TAG(LensUpperRightZ);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct LensLowerLeftX { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct LensLowerLeftY { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct LensLowerLeftZ { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct LensUpperRightX { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct LensUpperRightY { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct LensUpperRightZ { using type = UndefinedProperty; };
|
||||
|
||||
// Set the problem property
|
||||
SET_TYPE_PROP(LensBaseProblem, Problem, Opm::LensProblem<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::LensBaseProblem> { using type = Opm::LensProblem<TypeTag>; };
|
||||
|
||||
// Use Dune-grid's YaspGrid
|
||||
SET_TYPE_PROP(LensBaseProblem, Grid, Dune::YaspGrid<2>);
|
||||
template<class TypeTag>
|
||||
struct Grid<TypeTag, TTag::LensBaseProblem> { using type = Dune::YaspGrid<2>; };
|
||||
|
||||
// Set the wetting phase
|
||||
SET_PROP(LensBaseProblem, WettingPhase)
|
||||
template<class TypeTag>
|
||||
struct WettingPhase<TypeTag, TTag::LensBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
public:
|
||||
typedef Opm::LiquidPhase<Scalar, Opm::SimpleH2O<Scalar> > type;
|
||||
using type = Opm::LiquidPhase<Scalar, Opm::SimpleH2O<Scalar> >;
|
||||
};
|
||||
|
||||
// Set the non-wetting phase
|
||||
SET_PROP(LensBaseProblem, NonwettingPhase)
|
||||
template<class TypeTag>
|
||||
struct NonwettingPhase<TypeTag, TTag::LensBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
public:
|
||||
typedef Opm::LiquidPhase<Scalar, Opm::DNAPL<Scalar> > type;
|
||||
using type = Opm::LiquidPhase<Scalar, Opm::DNAPL<Scalar> >;
|
||||
};
|
||||
|
||||
// Set the material Law
|
||||
SET_PROP(LensBaseProblem, MaterialLaw)
|
||||
template<class TypeTag>
|
||||
struct MaterialLaw<TypeTag, TTag::LensBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
enum { wettingPhaseIdx = FluidSystem::wettingPhaseIdx };
|
||||
enum { nonWettingPhaseIdx = FluidSystem::nonWettingPhaseIdx };
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::wettingPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::nonWettingPhaseIdx> Traits;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Traits = Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::wettingPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::nonWettingPhaseIdx>;
|
||||
|
||||
// define the material law which is parameterized by effective
|
||||
// saturations
|
||||
typedef Opm::RegularizedVanGenuchten<Traits> EffectiveLaw;
|
||||
using EffectiveLaw = Opm::RegularizedVanGenuchten<Traits>;
|
||||
|
||||
public:
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::EffToAbsLaw<EffectiveLaw> type;
|
||||
using type = Opm::EffToAbsLaw<EffectiveLaw>;
|
||||
};
|
||||
|
||||
// Write the solutions of individual newton iterations?
|
||||
SET_BOOL_PROP(LensBaseProblem, NewtonWriteConvergence, false);
|
||||
template<class TypeTag>
|
||||
struct NewtonWriteConvergence<TypeTag, TTag::LensBaseProblem> { static constexpr bool value = false; };
|
||||
|
||||
// Use forward differences instead of central differences
|
||||
SET_INT_PROP(LensBaseProblem, NumericDifferenceMethod, +1);
|
||||
template<class TypeTag>
|
||||
struct NumericDifferenceMethod<TypeTag, TTag::LensBaseProblem> { static constexpr int value = +1; };
|
||||
|
||||
// Enable gravity
|
||||
SET_BOOL_PROP(LensBaseProblem, EnableGravity, true);
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::LensBaseProblem> { static constexpr bool value = true; };
|
||||
|
||||
// define the properties specific for the lens problem
|
||||
SET_SCALAR_PROP(LensBaseProblem, LensLowerLeftX, 1.0);
|
||||
SET_SCALAR_PROP(LensBaseProblem, LensLowerLeftY, 2.0);
|
||||
SET_SCALAR_PROP(LensBaseProblem, LensLowerLeftZ, 0.0);
|
||||
SET_SCALAR_PROP(LensBaseProblem, LensUpperRightX, 4.0);
|
||||
SET_SCALAR_PROP(LensBaseProblem, LensUpperRightY, 3.0);
|
||||
SET_SCALAR_PROP(LensBaseProblem, LensUpperRightZ, 1.0);
|
||||
template<class TypeTag>
|
||||
struct LensLowerLeftX<TypeTag, TTag::LensBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1.0;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct LensLowerLeftY<TypeTag, TTag::LensBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 2.0;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct LensLowerLeftZ<TypeTag, TTag::LensBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 0.0;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct LensUpperRightX<TypeTag, TTag::LensBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 4.0;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct LensUpperRightY<TypeTag, TTag::LensBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 3.0;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct LensUpperRightZ<TypeTag, TTag::LensBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1.0;
|
||||
};
|
||||
|
||||
SET_SCALAR_PROP(LensBaseProblem, DomainSizeX, 6.0);
|
||||
SET_SCALAR_PROP(LensBaseProblem, DomainSizeY, 4.0);
|
||||
SET_SCALAR_PROP(LensBaseProblem, DomainSizeZ, 1.0);
|
||||
template<class TypeTag>
|
||||
struct DomainSizeX<TypeTag, TTag::LensBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 6.0;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct DomainSizeY<TypeTag, TTag::LensBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 4.0;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct DomainSizeZ<TypeTag, TTag::LensBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1.0;
|
||||
};
|
||||
|
||||
SET_INT_PROP(LensBaseProblem, CellsX, 48);
|
||||
SET_INT_PROP(LensBaseProblem, CellsY, 32);
|
||||
SET_INT_PROP(LensBaseProblem, CellsZ, 16);
|
||||
template<class TypeTag>
|
||||
struct CellsX<TypeTag, TTag::LensBaseProblem> { static constexpr int value = 48; };
|
||||
template<class TypeTag>
|
||||
struct CellsY<TypeTag, TTag::LensBaseProblem> { static constexpr int value = 32; };
|
||||
template<class TypeTag>
|
||||
struct CellsZ<TypeTag, TTag::LensBaseProblem> { static constexpr int value = 16; };
|
||||
|
||||
// The default for the end time of the simulation
|
||||
SET_SCALAR_PROP(LensBaseProblem, EndTime, 30e3);
|
||||
template<class TypeTag>
|
||||
struct EndTime<TypeTag, TTag::LensBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 30e3;
|
||||
};
|
||||
|
||||
// The default for the initial time step size of the simulation
|
||||
SET_SCALAR_PROP(LensBaseProblem, InitialTimeStepSize, 250);
|
||||
template<class TypeTag>
|
||||
struct InitialTimeStepSize<TypeTag, TTag::LensBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 250;
|
||||
};
|
||||
|
||||
// By default, include the intrinsic permeability tensor to the VTK output files
|
||||
SET_BOOL_PROP(LensBaseProblem, VtkWriteIntrinsicPermeabilities, true);
|
||||
template<class TypeTag>
|
||||
struct VtkWriteIntrinsicPermeabilities<TypeTag, TTag::LensBaseProblem> { static constexpr bool value = true; };
|
||||
|
||||
// enable the storage cache by default for this problem
|
||||
SET_BOOL_PROP(LensBaseProblem, EnableStorageCache, true);
|
||||
template<class TypeTag>
|
||||
struct EnableStorageCache<TypeTag, TTag::LensBaseProblem> { static constexpr bool value = true; };
|
||||
|
||||
// enable the cache for intensive quantities by default for this problem
|
||||
SET_BOOL_PROP(LensBaseProblem, EnableIntensiveQuantityCache, true);
|
||||
template<class TypeTag>
|
||||
struct EnableIntensiveQuantityCache<TypeTag, TTag::LensBaseProblem> { static constexpr bool value = true; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@ -184,19 +262,19 @@ namespace Opm {
|
||||
* saturation on both sides is zero.
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class LensProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
class LensProblem : public GetPropType<TypeTag, Properties::BaseProblem>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BaseProblem) ParentType;
|
||||
using ParentType = GetPropType<TypeTag, Properties::BaseProblem>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, WettingPhase) WettingPhase;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, NonwettingPhase) NonwettingPhase;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using WettingPhase = GetPropType<TypeTag, Properties::WettingPhase>;
|
||||
using NonwettingPhase = GetPropType<TypeTag, Properties::NonwettingPhase>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using Model = GetPropType<TypeTag, Properties::Model>;
|
||||
|
||||
enum {
|
||||
// number of phases
|
||||
@ -214,16 +292,16 @@ class LensProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
dimWorld = GridView::dimensionworld
|
||||
};
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using BoundaryRateVector = GetPropType<TypeTag, Properties::BoundaryRateVector>;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
using MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>;
|
||||
|
||||
typedef typename GridView::ctype CoordScalar;
|
||||
typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
|
||||
using CoordScalar = typename GridView::ctype;
|
||||
using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>;
|
||||
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@ -314,18 +392,18 @@ public:
|
||||
static std::string briefDescription()
|
||||
{
|
||||
std::string thermal = "isothermal";
|
||||
bool enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy);
|
||||
bool enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>();
|
||||
if (enableEnergy)
|
||||
thermal = "non-isothermal";
|
||||
|
||||
std::string deriv = "finite difference";
|
||||
typedef typename GET_PROP_TYPE(TypeTag, LocalLinearizerSplice) LLS;
|
||||
bool useAutoDiff = std::is_same<LLS, TTAG(AutoDiffLocalLinearizer)>::value;
|
||||
using LLS = GetPropType<TypeTag, Properties::LocalLinearizerSplice>;
|
||||
bool useAutoDiff = std::is_same<LLS, Properties::TTag::AutoDiffLocalLinearizer>::value;
|
||||
if (useAutoDiff)
|
||||
deriv = "automatic differentiation";
|
||||
|
||||
std::string disc = "vertex centered finite volume";
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Discretization) D;
|
||||
using D = GetPropType<TypeTag, Properties::Discretization>;
|
||||
bool useEcfv = std::is_same<D, Opm::EcfvDiscretization<TypeTag>>::value;
|
||||
if (useEcfv)
|
||||
disc = "element centered finite volume";
|
||||
@ -400,9 +478,9 @@ public:
|
||||
*/
|
||||
std::string name() const
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, LocalLinearizerSplice) LLS;
|
||||
using LLS = GetPropType<TypeTag, Properties::LocalLinearizerSplice>;
|
||||
|
||||
bool useAutoDiff = std::is_same<LLS, TTAG(AutoDiffLocalLinearizer)>::value;
|
||||
bool useAutoDiff = std::is_same<LLS, Properties::TTag::AutoDiffLocalLinearizer>::value;
|
||||
|
||||
std::ostringstream oss;
|
||||
oss << "lens_" << Model::name()
|
||||
|
@ -57,67 +57,86 @@ template <class TypeTag>
|
||||
class ObstacleProblem;
|
||||
}
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(ObstacleBaseProblem);
|
||||
namespace TTag {
|
||||
struct ObstacleBaseProblem {};
|
||||
}
|
||||
|
||||
// Set the grid type
|
||||
SET_TYPE_PROP(ObstacleBaseProblem, Grid, Dune::YaspGrid<2>);
|
||||
template<class TypeTag>
|
||||
struct Grid<TypeTag, TTag::ObstacleBaseProblem> { using type = Dune::YaspGrid<2>; };
|
||||
|
||||
// Set the problem property
|
||||
SET_TYPE_PROP(ObstacleBaseProblem, Problem, Opm::ObstacleProblem<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::ObstacleBaseProblem> { using type = Opm::ObstacleProblem<TypeTag>; };
|
||||
|
||||
// Set fluid configuration
|
||||
SET_TYPE_PROP(ObstacleBaseProblem, FluidSystem,
|
||||
Opm::H2ON2FluidSystem<typename GET_PROP_TYPE(TypeTag, Scalar)>);
|
||||
template<class TypeTag>
|
||||
struct FluidSystem<TypeTag, TTag::ObstacleBaseProblem>
|
||||
{ using type = Opm::H2ON2FluidSystem<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
// Set the material Law
|
||||
SET_PROP(ObstacleBaseProblem, MaterialLaw)
|
||||
template<class TypeTag>
|
||||
struct MaterialLaw<TypeTag, TTag::ObstacleBaseProblem>
|
||||
{
|
||||
private:
|
||||
// define the material law
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::liquidPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::gasPhaseIdx>
|
||||
MaterialTraits;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using MaterialTraits = Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::liquidPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::gasPhaseIdx>;
|
||||
|
||||
typedef Opm::LinearMaterial<MaterialTraits> EffMaterialLaw;
|
||||
using EffMaterialLaw = Opm::LinearMaterial<MaterialTraits>;
|
||||
|
||||
public:
|
||||
typedef Opm::EffToAbsLaw<EffMaterialLaw> type;
|
||||
using type = Opm::EffToAbsLaw<EffMaterialLaw>;
|
||||
};
|
||||
|
||||
// Set the thermal conduction law
|
||||
SET_PROP(ObstacleBaseProblem, ThermalConductionLaw)
|
||||
template<class TypeTag>
|
||||
struct ThermalConductionLaw<TypeTag, TTag::ObstacleBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::SomertonThermalConductionLaw<FluidSystem, Scalar> type;
|
||||
using type = Opm::SomertonThermalConductionLaw<FluidSystem, Scalar>;
|
||||
};
|
||||
|
||||
// set the energy storage law for the solid phase
|
||||
SET_TYPE_PROP(ObstacleBaseProblem, SolidEnergyLaw,
|
||||
Opm::ConstantSolidHeatCapLaw<typename GET_PROP_TYPE(TypeTag, Scalar)>);
|
||||
template<class TypeTag>
|
||||
struct SolidEnergyLaw<TypeTag, TTag::ObstacleBaseProblem>
|
||||
{ using type = Opm::ConstantSolidHeatCapLaw<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
// Enable gravity
|
||||
SET_BOOL_PROP(ObstacleBaseProblem, EnableGravity, true);
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::ObstacleBaseProblem> { static constexpr bool value = true; };
|
||||
|
||||
// The default for the end time of the simulation
|
||||
SET_SCALAR_PROP(ObstacleBaseProblem, EndTime, 1e4);
|
||||
template<class TypeTag>
|
||||
struct EndTime<TypeTag, TTag::ObstacleBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1e4;
|
||||
};
|
||||
|
||||
// The default for the initial time step size of the simulation
|
||||
SET_SCALAR_PROP(ObstacleBaseProblem, InitialTimeStepSize, 250);
|
||||
template<class TypeTag>
|
||||
struct InitialTimeStepSize<TypeTag, TTag::ObstacleBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 250;
|
||||
};
|
||||
|
||||
// The default DGF file to load
|
||||
SET_STRING_PROP(ObstacleBaseProblem, GridFile, "./data/obstacle_24x16.dgf");
|
||||
template<class TypeTag>
|
||||
struct GridFile<TypeTag, TTag::ObstacleBaseProblem> { static constexpr auto value = "./data/obstacle_24x16.dgf"; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
/*!
|
||||
@ -147,38 +166,38 @@ namespace Opm {
|
||||
* and the right boundary where a free flow condition is assumed.
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class ObstacleProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
class ObstacleProblem : public GetPropType<TypeTag, Properties::BaseProblem>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BaseProblem) ParentType;
|
||||
using ParentType = GetPropType<TypeTag, Properties::BaseProblem>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ThermalConductionLawParams) ThermalConductionLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, SolidEnergyLawParams) SolidEnergyLawParams;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using BoundaryRateVector = GetPropType<TypeTag, Properties::BoundaryRateVector>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
using MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>;
|
||||
using ThermalConductionLawParams = GetPropType<TypeTag, Properties::ThermalConductionLawParams>;
|
||||
using SolidEnergyLawParams = GetPropType<TypeTag, Properties::SolidEnergyLawParams>;
|
||||
|
||||
enum {
|
||||
// Grid and world dimension
|
||||
dim = GridView::dimension,
|
||||
dimWorld = GridView::dimensionworld,
|
||||
numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
|
||||
numPhases = getPropValue<TypeTag, Properties::NumPhases>(),
|
||||
gasPhaseIdx = FluidSystem::gasPhaseIdx,
|
||||
liquidPhaseIdx = FluidSystem::liquidPhaseIdx,
|
||||
H2OIdx = FluidSystem::H2OIdx,
|
||||
N2Idx = FluidSystem::N2Idx
|
||||
};
|
||||
|
||||
typedef Dune::FieldVector<typename GridView::ctype, dimWorld> GlobalPosition;
|
||||
typedef Dune::FieldVector<Scalar, numPhases> PhaseVector;
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
using GlobalPosition = Dune::FieldVector<typename GridView::ctype, dimWorld>;
|
||||
using PhaseVector = Dune::FieldVector<Scalar, numPhases>;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using Model = GetPropType<TypeTag, Properties::Model>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@ -528,7 +547,7 @@ private:
|
||||
|
||||
// make the fluid state consistent with local thermodynamic
|
||||
// equilibrium
|
||||
typedef Opm::ComputeFromReferencePhase<Scalar, FluidSystem> ComputeFromReferencePhase;
|
||||
using ComputeFromReferencePhase = Opm::ComputeFromReferencePhase<Scalar, FluidSystem>;
|
||||
|
||||
typename FluidSystem::template ParameterCache<Scalar> paramCache;
|
||||
ComputeFromReferencePhase::solve(fs, paramCache, refPhaseIdx,
|
||||
|
@ -45,43 +45,63 @@ template <class TypeTag>
|
||||
class OutflowProblem;
|
||||
}
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(OutflowBaseProblem);
|
||||
namespace TTag {
|
||||
|
||||
struct OutflowBaseProblem {};
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
// Set the grid type
|
||||
SET_TYPE_PROP(OutflowBaseProblem, Grid, Dune::YaspGrid<2>);
|
||||
template<class TypeTag>
|
||||
struct Grid<TypeTag, TTag::OutflowBaseProblem> { using type = Dune::YaspGrid<2>; };
|
||||
|
||||
// Set the problem property
|
||||
SET_TYPE_PROP(OutflowBaseProblem, Problem, Opm::OutflowProblem<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::OutflowBaseProblem> { using type = Opm::OutflowProblem<TypeTag>; };
|
||||
|
||||
// Set fluid system
|
||||
SET_PROP(OutflowBaseProblem, FluidSystem)
|
||||
template<class TypeTag>
|
||||
struct FluidSystem<TypeTag, TTag::OutflowBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
public:
|
||||
// Two-component single phase fluid system
|
||||
typedef Opm::H2ON2LiquidPhaseFluidSystem<Scalar> type;
|
||||
using type = Opm::H2ON2LiquidPhaseFluidSystem<Scalar>;
|
||||
};
|
||||
|
||||
// Disable gravity
|
||||
SET_BOOL_PROP(OutflowBaseProblem, EnableGravity, false);
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::OutflowBaseProblem> { static constexpr bool value = false; };
|
||||
|
||||
// Also write mass fractions to the output
|
||||
SET_BOOL_PROP(OutflowBaseProblem, VtkWriteMassFractions, true);
|
||||
template<class TypeTag>
|
||||
struct VtkWriteMassFractions<TypeTag, TTag::OutflowBaseProblem> { static constexpr bool value = true; };
|
||||
|
||||
// The default for the end time of the simulation
|
||||
SET_SCALAR_PROP(OutflowBaseProblem, EndTime, 100);
|
||||
template<class TypeTag>
|
||||
struct EndTime<TypeTag, TTag::OutflowBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 100;
|
||||
};
|
||||
|
||||
// The default for the initial time step size of the simulation
|
||||
SET_SCALAR_PROP(OutflowBaseProblem, InitialTimeStepSize, 1);
|
||||
template<class TypeTag>
|
||||
struct InitialTimeStepSize<TypeTag, TTag::OutflowBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1;
|
||||
};
|
||||
|
||||
// The default DGF file to load
|
||||
SET_STRING_PROP(OutflowBaseProblem, GridFile, "./data/outflow.dgf");
|
||||
template<class TypeTag>
|
||||
struct GridFile<TypeTag, TTag::OutflowBaseProblem> { static constexpr auto value = "./data/outflow.dgf"; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
/*!
|
||||
@ -102,19 +122,19 @@ namespace Opm {
|
||||
* used.
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class OutflowProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
class OutflowProblem : public GetPropType<TypeTag, Properties::BaseProblem>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BaseProblem) ParentType;
|
||||
using ParentType = GetPropType<TypeTag, Properties::BaseProblem>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using BoundaryRateVector = GetPropType<TypeTag, Properties::BoundaryRateVector>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>;
|
||||
|
||||
// copy some indices for convenience
|
||||
enum {
|
||||
@ -129,10 +149,10 @@ class OutflowProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
N2Idx = FluidSystem::N2Idx
|
||||
};
|
||||
|
||||
typedef typename GridView::ctype CoordScalar;
|
||||
typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
|
||||
using CoordScalar = typename GridView::ctype;
|
||||
using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>;
|
||||
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
|
@ -57,86 +57,121 @@ template <class TypeTag>
|
||||
class PowerInjectionProblem;
|
||||
}
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(PowerInjectionBaseProblem);
|
||||
namespace TTag {
|
||||
struct PowerInjectionBaseProblem {};
|
||||
}
|
||||
|
||||
// Set the grid implementation to be used
|
||||
SET_TYPE_PROP(PowerInjectionBaseProblem, Grid, Dune::YaspGrid</*dim=*/1>);
|
||||
template<class TypeTag>
|
||||
struct Grid<TypeTag, TTag::PowerInjectionBaseProblem> { using type = Dune::YaspGrid</*dim=*/1>; };
|
||||
|
||||
// set the Vanguard property
|
||||
SET_TYPE_PROP(PowerInjectionBaseProblem, Vanguard,
|
||||
Opm::CubeGridVanguard<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Vanguard<TypeTag, TTag::PowerInjectionBaseProblem> { using type = Opm::CubeGridVanguard<TypeTag>; };
|
||||
|
||||
// Set the problem property
|
||||
SET_TYPE_PROP(PowerInjectionBaseProblem, Problem,
|
||||
Opm::PowerInjectionProblem<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::PowerInjectionBaseProblem> { using type = Opm::PowerInjectionProblem<TypeTag>; };
|
||||
|
||||
// Set the wetting phase
|
||||
SET_PROP(PowerInjectionBaseProblem, WettingPhase)
|
||||
template<class TypeTag>
|
||||
struct WettingPhase<TypeTag, TTag::PowerInjectionBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
public:
|
||||
typedef Opm::LiquidPhase<Scalar, Opm::SimpleH2O<Scalar> > type;
|
||||
using type = Opm::LiquidPhase<Scalar, Opm::SimpleH2O<Scalar> >;
|
||||
};
|
||||
|
||||
// Set the non-wetting phase
|
||||
SET_PROP(PowerInjectionBaseProblem, NonwettingPhase)
|
||||
template<class TypeTag>
|
||||
struct NonwettingPhase<TypeTag, TTag::PowerInjectionBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
public:
|
||||
typedef Opm::GasPhase<Scalar, Opm::Air<Scalar> > type;
|
||||
using type = Opm::GasPhase<Scalar, Opm::Air<Scalar> >;
|
||||
};
|
||||
|
||||
// Set the material Law
|
||||
SET_PROP(PowerInjectionBaseProblem, MaterialLaw)
|
||||
template<class TypeTag>
|
||||
struct MaterialLaw<TypeTag, TTag::PowerInjectionBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
enum { wettingPhaseIdx = FluidSystem::wettingPhaseIdx };
|
||||
enum { nonWettingPhaseIdx = FluidSystem::nonWettingPhaseIdx };
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::wettingPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::nonWettingPhaseIdx>
|
||||
Traits;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Traits = Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::wettingPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::nonWettingPhaseIdx>;
|
||||
|
||||
// define the material law which is parameterized by effective
|
||||
// saturations
|
||||
typedef Opm::RegularizedVanGenuchten<Traits> EffectiveLaw;
|
||||
using EffectiveLaw = Opm::RegularizedVanGenuchten<Traits>;
|
||||
|
||||
public:
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::EffToAbsLaw<EffectiveLaw> type;
|
||||
using type = Opm::EffToAbsLaw<EffectiveLaw>;
|
||||
};
|
||||
|
||||
// Write out the filter velocities for this problem
|
||||
SET_BOOL_PROP(PowerInjectionBaseProblem, VtkWriteFilterVelocities, true);
|
||||
template<class TypeTag>
|
||||
struct VtkWriteFilterVelocities<TypeTag, TTag::PowerInjectionBaseProblem> { static constexpr bool value = true; };
|
||||
|
||||
// Disable gravity
|
||||
SET_BOOL_PROP(PowerInjectionBaseProblem, EnableGravity, false);
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::PowerInjectionBaseProblem> { static constexpr bool value = false; };
|
||||
|
||||
// define the properties specific for the power injection problem
|
||||
SET_SCALAR_PROP(PowerInjectionBaseProblem, DomainSizeX, 100.0);
|
||||
SET_SCALAR_PROP(PowerInjectionBaseProblem, DomainSizeY, 1.0);
|
||||
SET_SCALAR_PROP(PowerInjectionBaseProblem, DomainSizeZ, 1.0);
|
||||
template<class TypeTag>
|
||||
struct DomainSizeX<TypeTag, TTag::PowerInjectionBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 100.0;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct DomainSizeY<TypeTag, TTag::PowerInjectionBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1.0;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct DomainSizeZ<TypeTag, TTag::PowerInjectionBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1.0;
|
||||
};
|
||||
|
||||
SET_INT_PROP(PowerInjectionBaseProblem, CellsX, 250);
|
||||
SET_INT_PROP(PowerInjectionBaseProblem, CellsY, 1);
|
||||
SET_INT_PROP(PowerInjectionBaseProblem, CellsZ, 1);
|
||||
template<class TypeTag>
|
||||
struct CellsX<TypeTag, TTag::PowerInjectionBaseProblem> { static constexpr int value = 250; };
|
||||
template<class TypeTag>
|
||||
struct CellsY<TypeTag, TTag::PowerInjectionBaseProblem> { static constexpr int value = 1; };
|
||||
template<class TypeTag>
|
||||
struct CellsZ<TypeTag, TTag::PowerInjectionBaseProblem> { static constexpr int value = 1; };
|
||||
|
||||
// The default for the end time of the simulation
|
||||
SET_SCALAR_PROP(PowerInjectionBaseProblem, EndTime, 100);
|
||||
template<class TypeTag>
|
||||
struct EndTime<TypeTag, TTag::PowerInjectionBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 100;
|
||||
};
|
||||
|
||||
// The default for the initial time step size of the simulation
|
||||
SET_SCALAR_PROP(PowerInjectionBaseProblem, InitialTimeStepSize, 1e-3);
|
||||
template<class TypeTag>
|
||||
struct InitialTimeStepSize<TypeTag, TTag::PowerInjectionBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1e-3;
|
||||
};
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
/*!
|
||||
@ -152,21 +187,21 @@ namespace Opm {
|
||||
* Systems, University of Stuttgart, 2011
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class PowerInjectionProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
class PowerInjectionProblem : public GetPropType<TypeTag, Properties::BaseProblem>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BaseProblem) ParentType;
|
||||
using ParentType = GetPropType<TypeTag, Properties::BaseProblem>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, WettingPhase) WettingPhase;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, NonwettingPhase) NonwettingPhase;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using WettingPhase = GetPropType<TypeTag, Properties::WettingPhase>;
|
||||
using NonwettingPhase = GetPropType<TypeTag, Properties::NonwettingPhase>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using BoundaryRateVector = GetPropType<TypeTag, Properties::BoundaryRateVector>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
|
||||
enum {
|
||||
// number of phases
|
||||
@ -184,13 +219,13 @@ class PowerInjectionProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
dimWorld = GridView::dimensionworld
|
||||
};
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
using MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>;
|
||||
|
||||
typedef typename GridView::ctype CoordScalar;
|
||||
typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
|
||||
using CoordScalar = typename GridView::ctype;
|
||||
using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>;
|
||||
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@ -235,14 +270,14 @@ public:
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "powerinjection_";
|
||||
if (std::is_same<typename GET_PROP_TYPE(TypeTag, FluxModule),
|
||||
if (std::is_same<GetPropType<TypeTag, Properties::FluxModule>,
|
||||
Opm::DarcyFluxModule<TypeTag> >::value)
|
||||
oss << "darcy";
|
||||
else
|
||||
oss << "forchheimer";
|
||||
|
||||
if (std::is_same<typename GET_PROP_TYPE(TypeTag, LocalLinearizerSplice),
|
||||
TTAG(AutoDiffLocalLinearizer)>::value)
|
||||
if (std::is_same<GetPropType<TypeTag, Properties::LocalLinearizerSplice>,
|
||||
Properties::TTag::AutoDiffLocalLinearizer>::value)
|
||||
oss << "_" << "ad";
|
||||
else
|
||||
oss << "_" << "fd";
|
||||
|
@ -56,65 +56,103 @@ class ReservoirProblem;
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
|
||||
NEW_TYPE_TAG(ReservoirBaseProblem);
|
||||
namespace TTag {
|
||||
|
||||
struct ReservoirBaseProblem {};
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
// Maximum depth of the reservoir
|
||||
NEW_PROP_TAG(MaxDepth);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct MaxDepth { using type = UndefinedProperty; };
|
||||
// The temperature inside the reservoir
|
||||
NEW_PROP_TAG(Temperature);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct Temperature { using type = UndefinedProperty; };
|
||||
// The width of producer/injector wells as a fraction of the width of the spatial domain
|
||||
NEW_PROP_TAG(WellWidth);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct WellWidth { using type = UndefinedProperty; };
|
||||
|
||||
// Set the grid type
|
||||
SET_TYPE_PROP(ReservoirBaseProblem, Grid, Dune::YaspGrid<2>);
|
||||
template<class TypeTag>
|
||||
struct Grid<TypeTag, TTag::ReservoirBaseProblem> { using type = Dune::YaspGrid<2>; };
|
||||
|
||||
// Set the problem property
|
||||
SET_TYPE_PROP(ReservoirBaseProblem, Problem, Opm::ReservoirProblem<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::ReservoirBaseProblem> { using type = Opm::ReservoirProblem<TypeTag>; };
|
||||
|
||||
// Set the material Law
|
||||
SET_PROP(ReservoirBaseProblem, MaterialLaw)
|
||||
template<class TypeTag>
|
||||
struct MaterialLaw<TypeTag, TTag::ReservoirBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
typedef Opm::
|
||||
using Traits = Opm::
|
||||
ThreePhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::waterPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::oilPhaseIdx,
|
||||
/*gasPhaseIdx=*/FluidSystem::gasPhaseIdx> Traits;
|
||||
/*gasPhaseIdx=*/FluidSystem::gasPhaseIdx>;
|
||||
|
||||
public:
|
||||
typedef Opm::LinearMaterial<Traits> type;
|
||||
using type = Opm::LinearMaterial<Traits>;
|
||||
};
|
||||
|
||||
// Write the Newton convergence behavior to disk?
|
||||
SET_BOOL_PROP(ReservoirBaseProblem, NewtonWriteConvergence, false);
|
||||
template<class TypeTag>
|
||||
struct NewtonWriteConvergence<TypeTag, TTag::ReservoirBaseProblem> { static constexpr bool value = false; };
|
||||
|
||||
// Enable gravity
|
||||
SET_BOOL_PROP(ReservoirBaseProblem, EnableGravity, true);
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::ReservoirBaseProblem> { static constexpr bool value = true; };
|
||||
|
||||
// Enable constraint DOFs?
|
||||
SET_BOOL_PROP(ReservoirBaseProblem, EnableConstraints, true);
|
||||
template<class TypeTag>
|
||||
struct EnableConstraints<TypeTag, TTag::ReservoirBaseProblem> { static constexpr bool value = true; };
|
||||
|
||||
// set the defaults for some problem specific properties
|
||||
SET_SCALAR_PROP(ReservoirBaseProblem, MaxDepth, 2500);
|
||||
SET_SCALAR_PROP(ReservoirBaseProblem, Temperature, 293.15);
|
||||
template<class TypeTag>
|
||||
struct MaxDepth<TypeTag, TTag::ReservoirBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 2500;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct Temperature<TypeTag, TTag::ReservoirBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 293.15;
|
||||
};
|
||||
|
||||
//! The default for the end time of the simulation [s].
|
||||
//!
|
||||
//! By default this problem spans 1000 days (100 "settle down" days and 900 days of
|
||||
//! production)
|
||||
SET_SCALAR_PROP(ReservoirBaseProblem, EndTime, 1000.0*24*60*60);
|
||||
template<class TypeTag>
|
||||
struct EndTime<TypeTag, TTag::ReservoirBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1000.0*24*60*60;
|
||||
};
|
||||
|
||||
// The default for the initial time step size of the simulation [s]
|
||||
SET_SCALAR_PROP(ReservoirBaseProblem, InitialTimeStepSize, 100e3);
|
||||
template<class TypeTag>
|
||||
struct InitialTimeStepSize<TypeTag, TTag::ReservoirBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 100e3;
|
||||
};
|
||||
|
||||
// The width of producer/injector wells as a fraction of the width of the spatial domain
|
||||
SET_SCALAR_PROP(ReservoirBaseProblem, WellWidth, 0.01);
|
||||
template<class TypeTag>
|
||||
struct WellWidth<TypeTag, TTag::ReservoirBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 0.01;
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Explicitly set the fluid system to the black-oil fluid system
|
||||
@ -124,22 +162,29 @@ SET_SCALAR_PROP(ReservoirBaseProblem, WellWidth, 0.01);
|
||||
* though because other models are more generic and thus do not assume a particular fluid
|
||||
* system.
|
||||
*/
|
||||
SET_PROP(ReservoirBaseProblem, FluidSystem)
|
||||
template<class TypeTag>
|
||||
struct FluidSystem<TypeTag, TTag::ReservoirBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
public:
|
||||
typedef Opm::BlackOilFluidSystem<Scalar> type;
|
||||
using type = Opm::BlackOilFluidSystem<Scalar>;
|
||||
};
|
||||
|
||||
// The default DGF file to load
|
||||
SET_STRING_PROP(ReservoirBaseProblem, GridFile, "data/reservoir.dgf");
|
||||
template<class TypeTag>
|
||||
struct GridFile<TypeTag, TTag::ReservoirBaseProblem> { static constexpr auto value = "data/reservoir.dgf"; };
|
||||
|
||||
// increase the tolerance for this problem to get larger time steps
|
||||
SET_SCALAR_PROP(ReservoirBaseProblem, NewtonTolerance, 1e-6);
|
||||
template<class TypeTag>
|
||||
struct NewtonTolerance<TypeTag, TTag::ReservoirBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1e-6;
|
||||
};
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@ -160,14 +205,14 @@ namespace Opm {
|
||||
* the injector wells use a pressure which is 50% above the reservoir pressure.
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class ReservoirProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
class ReservoirProblem : public GetPropType<TypeTag, Properties::BaseProblem>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BaseProblem) ParentType;
|
||||
using ParentType = GetPropType<TypeTag, Properties::BaseProblem>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
// Grid and world dimension
|
||||
enum { dim = GridView::dimension };
|
||||
@ -183,25 +228,25 @@ class ReservoirProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
enum { oilCompIdx = FluidSystem::oilCompIdx };
|
||||
enum { waterCompIdx = FluidSystem::waterCompIdx };
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Constraints) Constraints;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
|
||||
using Model = GetPropType<TypeTag, Properties::Model>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using BoundaryRateVector = GetPropType<TypeTag, Properties::BoundaryRateVector>;
|
||||
using Constraints = GetPropType<TypeTag, Properties::Constraints>;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>;
|
||||
|
||||
typedef typename GridView::ctype CoordScalar;
|
||||
typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
typedef Dune::FieldVector<Scalar, numPhases> PhaseVector;
|
||||
using CoordScalar = typename GridView::ctype;
|
||||
using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
using PhaseVector = Dune::FieldVector<Scalar, numPhases>;
|
||||
|
||||
typedef Opm::CompositionalFluidState<Scalar,
|
||||
FluidSystem,
|
||||
/*enableEnthalpy=*/true> InitialFluidState;
|
||||
using InitialFluidState = Opm::CompositionalFluidState<Scalar,
|
||||
FluidSystem,
|
||||
/*enableEnthalpy=*/true>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@ -317,13 +362,13 @@ public:
|
||||
oilPvt->initEnd();
|
||||
waterPvt->initEnd();
|
||||
|
||||
typedef std::shared_ptr<Opm::GasPvtMultiplexer<Scalar> > GasPvtSharedPtr;
|
||||
using GasPvtSharedPtr = std::shared_ptr<Opm::GasPvtMultiplexer<Scalar> >;
|
||||
FluidSystem::setGasPvt(GasPvtSharedPtr(gasPvt));
|
||||
|
||||
typedef std::shared_ptr<Opm::OilPvtMultiplexer<Scalar> > OilPvtSharedPtr;
|
||||
using OilPvtSharedPtr = std::shared_ptr<Opm::OilPvtMultiplexer<Scalar> >;
|
||||
FluidSystem::setOilPvt(OilPvtSharedPtr(oilPvt));
|
||||
|
||||
typedef std::shared_ptr<Opm::WaterPvtMultiplexer<Scalar> > WaterPvtSharedPtr;
|
||||
using WaterPvtSharedPtr = std::shared_ptr<Opm::WaterPvtMultiplexer<Scalar> >;
|
||||
FluidSystem::setWaterPvt(WaterPvtSharedPtr(waterPvt));
|
||||
|
||||
FluidSystem::initEnd();
|
||||
@ -639,7 +684,7 @@ private:
|
||||
fs.setMoleFraction(oilPhaseIdx, gasCompIdx, xoG);
|
||||
fs.setMoleFraction(oilPhaseIdx, oilCompIdx, xoO);
|
||||
|
||||
typedef Opm::ComputeFromReferencePhase<Scalar, FluidSystem> CFRP;
|
||||
using CFRP = Opm::ComputeFromReferencePhase<Scalar, FluidSystem>;
|
||||
typename FluidSystem::template ParameterCache<Scalar> paramCache;
|
||||
CFRP::solve(fs,
|
||||
paramCache,
|
||||
|
@ -51,74 +51,96 @@ class RichardsLensProblem;
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(RichardsLensProblem, INHERITS_FROM(Richards));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct RichardsLensProblem { using InheritsFrom = std::tuple<Richards>; };
|
||||
} // end namespace TTag
|
||||
|
||||
// Use 2d YaspGrid
|
||||
SET_TYPE_PROP(RichardsLensProblem, Grid, Dune::YaspGrid<2>);
|
||||
template<class TypeTag>
|
||||
struct Grid<TypeTag, TTag::RichardsLensProblem> { using type = Dune::YaspGrid<2>; };
|
||||
|
||||
// Set the physical problem to be solved
|
||||
SET_TYPE_PROP(RichardsLensProblem, Problem, Opm::RichardsLensProblem<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::RichardsLensProblem> { using type = Opm::RichardsLensProblem<TypeTag>; };
|
||||
|
||||
// Set the wetting phase
|
||||
SET_PROP(RichardsLensProblem, WettingFluid)
|
||||
template<class TypeTag>
|
||||
struct WettingFluid<TypeTag, TTag::RichardsLensProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
public:
|
||||
typedef Opm::LiquidPhase<Scalar, Opm::SimpleH2O<Scalar> > type;
|
||||
using type = Opm::LiquidPhase<Scalar, Opm::SimpleH2O<Scalar> >;
|
||||
};
|
||||
|
||||
// Set the material Law
|
||||
SET_PROP(RichardsLensProblem, MaterialLaw)
|
||||
template<class TypeTag>
|
||||
struct MaterialLaw<TypeTag, TTag::RichardsLensProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
enum { wettingPhaseIdx = FluidSystem::wettingPhaseIdx };
|
||||
enum { nonWettingPhaseIdx = FluidSystem::nonWettingPhaseIdx };
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::wettingPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::nonWettingPhaseIdx>
|
||||
Traits;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Traits = Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::wettingPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::nonWettingPhaseIdx>;
|
||||
|
||||
// define the material law which is parameterized by effective
|
||||
// saturations
|
||||
typedef Opm::RegularizedVanGenuchten<Traits> EffectiveLaw;
|
||||
using EffectiveLaw = Opm::RegularizedVanGenuchten<Traits>;
|
||||
|
||||
public:
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::EffToAbsLaw<EffectiveLaw> type;
|
||||
using type = Opm::EffToAbsLaw<EffectiveLaw>;
|
||||
};
|
||||
|
||||
// Enable gravitational acceleration
|
||||
SET_BOOL_PROP(RichardsLensProblem, EnableGravity, true);
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::RichardsLensProblem> { static constexpr bool value = true; };
|
||||
|
||||
// Use central differences to approximate the Jacobian matrix
|
||||
SET_INT_PROP(RichardsLensProblem, NumericDifferenceMethod, 0);
|
||||
template<class TypeTag>
|
||||
struct NumericDifferenceMethod<TypeTag, TTag::RichardsLensProblem> { static constexpr int value = 0; };
|
||||
|
||||
// Set the maximum number of newton iterations of a time step
|
||||
SET_INT_PROP(RichardsLensProblem, NewtonMaxIterations, 28);
|
||||
template<class TypeTag>
|
||||
struct NewtonMaxIterations<TypeTag, TTag::RichardsLensProblem> { static constexpr int value = 28; };
|
||||
|
||||
// Set the "desireable" number of newton iterations of a time step
|
||||
SET_INT_PROP(RichardsLensProblem, NewtonTargetIterations, 18);
|
||||
template<class TypeTag>
|
||||
struct NewtonTargetIterations<TypeTag, TTag::RichardsLensProblem> { static constexpr int value = 18; };
|
||||
|
||||
// Do not write the intermediate results of the newton method
|
||||
SET_BOOL_PROP(RichardsLensProblem, NewtonWriteConvergence, false);
|
||||
template<class TypeTag>
|
||||
struct NewtonWriteConvergence<TypeTag, TTag::RichardsLensProblem> { static constexpr bool value = false; };
|
||||
|
||||
// The default for the end time of the simulation
|
||||
SET_SCALAR_PROP(RichardsLensProblem, EndTime, 3000);
|
||||
template<class TypeTag>
|
||||
struct EndTime<TypeTag, TTag::RichardsLensProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 3000;
|
||||
};
|
||||
|
||||
// The default for the initial time step size of the simulation
|
||||
SET_SCALAR_PROP(RichardsLensProblem, InitialTimeStepSize, 100);
|
||||
template<class TypeTag>
|
||||
struct InitialTimeStepSize<TypeTag, TTag::RichardsLensProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 100;
|
||||
};
|
||||
|
||||
// The default DGF file to load
|
||||
SET_STRING_PROP(RichardsLensProblem, GridFile, "./data/richardslens_24x16.dgf");
|
||||
template<class TypeTag>
|
||||
struct GridFile<TypeTag, TTag::RichardsLensProblem> { static constexpr auto value = "./data/richardslens_24x16.dgf"; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@ -139,22 +161,22 @@ namespace Opm {
|
||||
* instead of a \c DNAPL infiltrates from the top.
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class RichardsLensProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
class RichardsLensProblem : public GetPropType<TypeTag, Properties::BaseProblem>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BaseProblem) ParentType;
|
||||
using ParentType = GetPropType<TypeTag, Properties::BaseProblem>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Stencil) Stencil;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using BoundaryRateVector = GetPropType<TypeTag, Properties::BoundaryRateVector>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using Stencil = GetPropType<TypeTag, Properties::Stencil>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using Model = GetPropType<TypeTag, Properties::Model>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
enum {
|
||||
// copy some indices for convenience
|
||||
pressureWIdx = Indices::pressureWIdx,
|
||||
@ -168,14 +190,14 @@ class RichardsLensProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
};
|
||||
|
||||
// get the material law from the property system
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
//! The parameters of the material law to be used
|
||||
typedef typename MaterialLaw::Params MaterialLawParams;
|
||||
using MaterialLawParams = typename MaterialLaw::Params;
|
||||
|
||||
typedef typename GridView::ctype CoordScalar;
|
||||
typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
|
||||
typedef Dune::FieldVector<Scalar, numPhases> PhaseVector;
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
using CoordScalar = typename GridView::ctype;
|
||||
using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>;
|
||||
using PhaseVector = Dune::FieldVector<Scalar, numPhases>;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
|
@ -58,89 +58,119 @@ template <class TypeTag>
|
||||
class WaterAirProblem;
|
||||
}
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(WaterAirBaseProblem);
|
||||
namespace TTag {
|
||||
struct WaterAirBaseProblem {};
|
||||
}
|
||||
|
||||
// Set the grid type
|
||||
SET_TYPE_PROP(WaterAirBaseProblem, Grid, Dune::YaspGrid<2>);
|
||||
template<class TypeTag>
|
||||
struct Grid<TypeTag, TTag::WaterAirBaseProblem> { using type = Dune::YaspGrid<2>; };
|
||||
|
||||
// Set the problem property
|
||||
SET_TYPE_PROP(WaterAirBaseProblem, Problem, Opm::WaterAirProblem<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::WaterAirBaseProblem> { using type = Opm::WaterAirProblem<TypeTag>; };
|
||||
|
||||
// Set the material Law
|
||||
SET_PROP(WaterAirBaseProblem, MaterialLaw)
|
||||
template<class TypeTag>
|
||||
struct MaterialLaw<TypeTag, TTag::WaterAirBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::liquidPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::gasPhaseIdx> Traits;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using Traits = Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::liquidPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::gasPhaseIdx>;
|
||||
|
||||
// define the material law which is parameterized by effective
|
||||
// saturations
|
||||
typedef Opm::RegularizedBrooksCorey<Traits> EffMaterialLaw;
|
||||
using EffMaterialLaw = Opm::RegularizedBrooksCorey<Traits>;
|
||||
|
||||
public:
|
||||
// define the material law parameterized by absolute saturations
|
||||
// which uses the two-phase API
|
||||
typedef Opm::EffToAbsLaw<EffMaterialLaw> type;
|
||||
using type = Opm::EffToAbsLaw<EffMaterialLaw>;
|
||||
};
|
||||
|
||||
// Set the thermal conduction law
|
||||
SET_PROP(WaterAirBaseProblem, ThermalConductionLaw)
|
||||
template<class TypeTag>
|
||||
struct ThermalConductionLaw<TypeTag, TTag::WaterAirBaseProblem>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::SomertonThermalConductionLaw<FluidSystem, Scalar> type;
|
||||
using type = Opm::SomertonThermalConductionLaw<FluidSystem, Scalar>;
|
||||
};
|
||||
|
||||
// set the energy storage law for the solid phase
|
||||
SET_TYPE_PROP(WaterAirBaseProblem, SolidEnergyLaw,
|
||||
Opm::ConstantSolidHeatCapLaw<typename GET_PROP_TYPE(TypeTag, Scalar)>);
|
||||
template<class TypeTag>
|
||||
struct SolidEnergyLaw<TypeTag, TTag::WaterAirBaseProblem>
|
||||
{ using type = Opm::ConstantSolidHeatCapLaw<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
// Set the fluid system. in this case, we use the one which describes
|
||||
// air and water
|
||||
SET_TYPE_PROP(WaterAirBaseProblem, FluidSystem,
|
||||
Opm::H2OAirFluidSystem<typename GET_PROP_TYPE(TypeTag, Scalar)>);
|
||||
template<class TypeTag>
|
||||
struct FluidSystem<TypeTag, TTag::WaterAirBaseProblem>
|
||||
{ using type = Opm::H2OAirFluidSystem<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
// Enable gravity
|
||||
SET_BOOL_PROP(WaterAirBaseProblem, EnableGravity, true);
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::WaterAirBaseProblem> { static constexpr bool value = true; };
|
||||
|
||||
// Use forward differences instead of central differences
|
||||
SET_INT_PROP(WaterAirBaseProblem, NumericDifferenceMethod, +1);
|
||||
template<class TypeTag>
|
||||
struct NumericDifferenceMethod<TypeTag, TTag::WaterAirBaseProblem> { static constexpr int value = +1; };
|
||||
|
||||
// Write newton convergence
|
||||
SET_BOOL_PROP(WaterAirBaseProblem, NewtonWriteConvergence, false);
|
||||
template<class TypeTag>
|
||||
struct NewtonWriteConvergence<TypeTag, TTag::WaterAirBaseProblem> { static constexpr bool value = false; };
|
||||
|
||||
// The default for the end time of the simulation (1 year)
|
||||
SET_SCALAR_PROP(WaterAirBaseProblem, EndTime, 1.0 * 365 * 24 * 60 * 60);
|
||||
template<class TypeTag>
|
||||
struct EndTime<TypeTag, TTag::WaterAirBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1.0 * 365 * 24 * 60 * 60;
|
||||
};
|
||||
|
||||
// The default for the initial time step size of the simulation
|
||||
SET_SCALAR_PROP(WaterAirBaseProblem, InitialTimeStepSize, 250);
|
||||
template<class TypeTag>
|
||||
struct InitialTimeStepSize<TypeTag, TTag::WaterAirBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 250;
|
||||
};
|
||||
|
||||
// The default DGF file to load
|
||||
SET_STRING_PROP(WaterAirBaseProblem, GridFile, "./data/waterair.dgf");
|
||||
template<class TypeTag>
|
||||
struct GridFile<TypeTag, TTag::WaterAirBaseProblem> { static constexpr auto value = "./data/waterair.dgf"; };
|
||||
|
||||
// Use the restarted GMRES linear solver with the ILU-2 preconditioner from dune-istl
|
||||
SET_TAG_PROP(WaterAirBaseProblem, LinearSolverSplice, ParallelIstlLinearSolver);
|
||||
SET_TYPE_PROP(WaterAirBaseProblem, LinearSolverWrapper,
|
||||
Opm::Linear::SolverWrapperRestartedGMRes<TypeTag>);
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2,7)
|
||||
SET_TYPE_PROP(WaterAirBaseProblem, PreconditionerWrapper,
|
||||
Opm::Linear::PreconditionerWrapperILU<TypeTag>);
|
||||
#else
|
||||
SET_TYPE_PROP(WaterAirBaseProblem, PreconditionerWrapper,
|
||||
Opm::Linear::PreconditionerWrapperILUn<TypeTag>);
|
||||
#endif
|
||||
SET_INT_PROP(WaterAirBaseProblem, PreconditionerOrder, 2);
|
||||
template<class TypeTag>
|
||||
struct LinearSolverSplice<TypeTag, TTag::WaterAirBaseProblem>
|
||||
{ using type = TTag::ParallelIstlLinearSolver; };
|
||||
|
||||
END_PROPERTIES
|
||||
template<class TypeTag>
|
||||
struct LinearSolverWrapper<TypeTag, TTag::WaterAirBaseProblem>
|
||||
{ using type = Opm::Linear::SolverWrapperRestartedGMRes<TypeTag>; };
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2,7)
|
||||
template<class TypeTag>
|
||||
struct PreconditionerWrapper<TypeTag, TTag::WaterAirBaseProblem>
|
||||
{ using type = Opm::Linear::PreconditionerWrapperILU<TypeTag>; };
|
||||
#else
|
||||
template<class TypeTag>
|
||||
struct PreconditionerWrapper<TypeTag, TTag::WaterAirBaseProblem>
|
||||
{ using type = Opm::Linear::PreconditionerWrapperILUn<TypeTag>; };
|
||||
#endif
|
||||
template<class TypeTag>
|
||||
struct PreconditionerOrder<TypeTag, TTag::WaterAirBaseProblem> { static constexpr int value = 2; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
/*!
|
||||
@ -172,16 +202,16 @@ namespace Opm {
|
||||
* K/m.
|
||||
*/
|
||||
template <class TypeTag >
|
||||
class WaterAirProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
class WaterAirProblem : public GetPropType<TypeTag, Properties::BaseProblem>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BaseProblem) ParentType;
|
||||
using ParentType = GetPropType<TypeTag, Properties::BaseProblem>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
|
||||
// copy some indices for convenience
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
enum {
|
||||
numPhases = FluidSystem::numPhases,
|
||||
|
||||
@ -205,24 +235,24 @@ class WaterAirProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
dimWorld = GridView::dimensionworld
|
||||
};
|
||||
|
||||
static const bool enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy);
|
||||
static const bool enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>();
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Constraints) Constraints;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ThermalConductionLawParams) ThermalConductionLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, SolidEnergyLawParams) SolidEnergyLawParams;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using BoundaryRateVector = GetPropType<TypeTag, Properties::BoundaryRateVector>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using Constraints = GetPropType<TypeTag, Properties::Constraints>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using Model = GetPropType<TypeTag, Properties::Model>;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
using MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>;
|
||||
using ThermalConductionLawParams = GetPropType<TypeTag, Properties::ThermalConductionLawParams>;
|
||||
using SolidEnergyLawParams = GetPropType<TypeTag, Properties::SolidEnergyLawParams>;
|
||||
|
||||
typedef typename GridView::ctype CoordScalar;
|
||||
typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
|
||||
using CoordScalar = typename GridView::ctype;
|
||||
using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>;
|
||||
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@ -292,7 +322,7 @@ public:
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "waterair_" << Model::name();
|
||||
if (GET_PROP_VALUE(TypeTag, EnableEnergy))
|
||||
if (getPropValue<TypeTag, Properties::EnableEnergy>())
|
||||
oss << "_ni";
|
||||
|
||||
return oss.str();
|
||||
@ -531,7 +561,7 @@ private:
|
||||
fs.setPressure(gasPhaseIdx, fs.pressure(liquidPhaseIdx) + (pc[gasPhaseIdx] - pc[liquidPhaseIdx]));
|
||||
|
||||
typename FluidSystem::template ParameterCache<Scalar> paramCache;
|
||||
typedef Opm::ComputeFromReferencePhase<Scalar, FluidSystem> CFRP;
|
||||
using CFRP = Opm::ComputeFromReferencePhase<Scalar, FluidSystem>;
|
||||
CFRP::solve(fs, paramCache, liquidPhaseIdx, /*setViscosity=*/true, /*setEnthalpy=*/true);
|
||||
}
|
||||
|
||||
|
@ -33,20 +33,25 @@
|
||||
#include <opm/models/discretization/ecfv/ecfvdiscretization.hh>
|
||||
#include "problems/reservoirproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(ReservoirBlackOilEcfvProblem, INHERITS_FROM(BlackOilModel, ReservoirBaseProblem));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct ReservoirBlackOilEcfvProblem { using InheritsFrom = std::tuple<ReservoirBaseProblem, BlackOilModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
// Select the element centered finite volume method as spatial discretization
|
||||
SET_TAG_PROP(ReservoirBlackOilEcfvProblem, SpatialDiscretizationSplice, EcfvDiscretization);
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::ReservoirBlackOilEcfvProblem> { using type = TTag::EcfvDiscretization; };
|
||||
|
||||
// Use automatic differentiation to linearize the system of PDEs
|
||||
SET_TAG_PROP(ReservoirBlackOilEcfvProblem, LocalLinearizerSplice, AutoDiffLocalLinearizer);
|
||||
template<class TypeTag>
|
||||
struct LocalLinearizerSplice<TypeTag, TTag::ReservoirBlackOilEcfvProblem> { using type = TTag::AutoDiffLocalLinearizer; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(ReservoirBlackOilEcfvProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::ReservoirBlackOilEcfvProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -32,17 +32,21 @@
|
||||
#include <opm/models/discretization/vcfv/vcfvdiscretization.hh>
|
||||
#include "problems/reservoirproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(ReservoirBlackOilVcfvProblem, INHERITS_FROM(BlackOilModel, ReservoirBaseProblem));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct ReservoirBlackOilVcfvProblem { using InheritsFrom = std::tuple<ReservoirBaseProblem, BlackOilModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
// Select the vertex centered finite volume method as spatial discretization
|
||||
SET_TAG_PROP(ReservoirBlackOilVcfvProblem, SpatialDiscretizationSplice, VcfvDiscretization);
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::ReservoirBlackOilVcfvProblem> { using type = TTag::VcfvDiscretization; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(ReservoirBlackOilVcfvProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::ReservoirBlackOilVcfvProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -32,20 +32,25 @@
|
||||
#include <opm/models/discretization/ecfv/ecfvdiscretization.hh>
|
||||
#include "problems/reservoirproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(ReservoirNcpEcfvProblem, INHERITS_FROM(NcpModel, ReservoirBaseProblem));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct ReservoirNcpEcfvProblem { using InheritsFrom = std::tuple<ReservoirBaseProblem, NcpModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
// Select the element centered finite volume method as spatial discretization
|
||||
SET_TAG_PROP(ReservoirNcpEcfvProblem, SpatialDiscretizationSplice, EcfvDiscretization);
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::ReservoirNcpEcfvProblem> { using type = TTag::EcfvDiscretization; };
|
||||
|
||||
//! use automatic differentiation to linearize the system of PDEs
|
||||
SET_TAG_PROP(ReservoirNcpEcfvProblem, LocalLinearizerSplice, AutoDiffLocalLinearizer);
|
||||
template<class TypeTag>
|
||||
struct LocalLinearizerSplice<TypeTag, TTag::ReservoirNcpEcfvProblem> { using type = TTag::AutoDiffLocalLinearizer; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(ReservoirNcpEcfvProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::ReservoirNcpEcfvProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -33,26 +33,36 @@
|
||||
#include <opm/models/discretization/vcfv/vcfvdiscretization.hh>
|
||||
#include "problems/reservoirproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(ReservoirNcpVcfvProblem, INHERITS_FROM(NcpModel, ReservoirBaseProblem));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct ReservoirNcpVcfvProblem { using InheritsFrom = std::tuple<ReservoirBaseProblem, NcpModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
// Select the vertex centered finite volume method as spatial discretization
|
||||
SET_TAG_PROP(ReservoirNcpVcfvProblem, SpatialDiscretizationSplice, VcfvDiscretization);
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::ReservoirNcpVcfvProblem> { using type = TTag::VcfvDiscretization; };
|
||||
|
||||
// enable the storage cache for this problem so that the storage cache receives wider
|
||||
// testing
|
||||
SET_BOOL_PROP(ReservoirNcpVcfvProblem, EnableStorageCache, true);
|
||||
template<class TypeTag>
|
||||
struct EnableStorageCache<TypeTag, TTag::ReservoirNcpVcfvProblem> { static constexpr bool value = true; };
|
||||
|
||||
// reduce the base epsilon for the finite difference method to 10^-11. for some reason
|
||||
// the simulator converges better with this. (TODO: use automatic differentiation?)
|
||||
SET_SCALAR_PROP(ReservoirNcpVcfvProblem, BaseEpsilon, 1e-11);
|
||||
template<class TypeTag>
|
||||
struct BaseEpsilon<TypeTag, TTag::ReservoirNcpVcfvProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1e-11;
|
||||
};
|
||||
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(ReservoirNcpVcfvProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::ReservoirNcpVcfvProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -32,6 +32,6 @@
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(Tutorial1Problem) TypeTag; /*@\label{tutorial1:set-type-tag}@*/
|
||||
using TypeTag = Opm::Properties::TTag::Tutorial1Problem; /*@\label{tutorial1:set-type-tag}@*/
|
||||
return Opm::start<TypeTag>(argc, argv); /*@\label{tutorial1:call-start}@*/
|
||||
}
|
||||
|
@ -57,103 +57,144 @@ template <class TypeTag>
|
||||
class Tutorial1Problem;
|
||||
}
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
// Create a new type tag for the problem
|
||||
NEW_TYPE_TAG(Tutorial1Problem, INHERITS_FROM(ImmiscibleTwoPhaseModel)); /*@\label{tutorial1:create-type-tag}@*/
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct Tutorial1Problem { using InheritsFrom = std::tuple<ImmiscibleTwoPhaseModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
// Select the vertex centered finite volume method as spatial discretization
|
||||
SET_TAG_PROP(Tutorial1Problem, SpatialDiscretizationSplice,
|
||||
VcfvDiscretization); /*@\label{tutorial1:set-spatial-discretization}@*/
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Tutorial1Problem>
|
||||
{ using type = TTag::VcfvDiscretization; }; /*@\label{tutorial1:set-spatial-discretization}@*/
|
||||
|
||||
// Set the "Problem" property
|
||||
SET_TYPE_PROP(Tutorial1Problem, Problem,
|
||||
Opm::Tutorial1Problem<TypeTag>); /*@\label{tutorial1:set-problem}@*/
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::Tutorial1Problem>
|
||||
{ using type = Opm::Tutorial1Problem<TypeTag>; }; /*@\label{tutorial1:set-problem}@*/
|
||||
|
||||
// Set grid and the grid manager to be used
|
||||
SET_TYPE_PROP(Tutorial1Problem, Grid, Dune::YaspGrid</*dim=*/2>); /*@\label{tutorial1:set-grid}@*/
|
||||
SET_TYPE_PROP(Tutorial1Problem, Vanguard, Opm::CubeGridVanguard<TypeTag>); /*@\label{tutorial1:set-grid-manager}@*/
|
||||
template<class TypeTag>
|
||||
struct Grid<TypeTag, TTag::Tutorial1Problem> { using type = Dune::YaspGrid</*dim=*/2>; }; /*@\label{tutorial1:set-grid}@*/
|
||||
template<class TypeTag>
|
||||
struct Vanguard<TypeTag, TTag::Tutorial1Problem> { using type = Opm::CubeGridVanguard<TypeTag>; }; /*@\label{tutorial1:set-grid-manager}@*/
|
||||
|
||||
// Set the wetting phase /*@\label{tutorial1:2p-system-start}@*/
|
||||
SET_TYPE_PROP(Tutorial1Problem,
|
||||
WettingPhase, /*@\label{tutorial1:wettingPhase}@*/
|
||||
Opm::LiquidPhase<typename GET_PROP_TYPE(TypeTag, Scalar),
|
||||
Opm::SimpleH2O<typename GET_PROP_TYPE(TypeTag, Scalar)> >);
|
||||
template<class TypeTag>
|
||||
struct WettingPhase<TypeTag, TTag::Tutorial1Problem> /*@\label{tutorial1:wettingPhase}@*/
|
||||
{
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using type = Opm::LiquidPhase<Scalar, Opm::SimpleH2O<Scalar> >;
|
||||
};
|
||||
|
||||
// Set the non-wetting phase
|
||||
SET_TYPE_PROP(Tutorial1Problem,
|
||||
NonwettingPhase, /*@\label{tutorial1:nonwettingPhase}@*/
|
||||
Opm::LiquidPhase<typename GET_PROP_TYPE(TypeTag, Scalar),
|
||||
Opm::LNAPL<typename GET_PROP_TYPE(TypeTag, Scalar)> >); /*@\label{tutorial1:2p-system-end}@*/
|
||||
template<class TypeTag>
|
||||
struct NonwettingPhase<TypeTag, TTag::Tutorial1Problem> /*@\label{tutorial1:nonwettingPhase}@*/
|
||||
{
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using type = Opm::LiquidPhase<Scalar, Opm::LNAPL<Scalar> >;
|
||||
}; /*@\label{tutorial1:2p-system-end}@*/
|
||||
|
||||
// Set the material law
|
||||
SET_PROP(Tutorial1Problem, MaterialLaw)
|
||||
template<class TypeTag>
|
||||
struct MaterialLaw<TypeTag, TTag::Tutorial1Problem>
|
||||
{
|
||||
private:
|
||||
// create a class holding the necessary information for a
|
||||
// two-phase capillary pressure law
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
enum { wettingPhaseIdx = FluidSystem::wettingPhaseIdx };
|
||||
enum { nonWettingPhaseIdx = FluidSystem::nonWettingPhaseIdx };
|
||||
typedef Opm::TwoPhaseMaterialTraits<Scalar, wettingPhaseIdx, nonWettingPhaseIdx> Traits;
|
||||
using Traits = Opm::TwoPhaseMaterialTraits<Scalar, wettingPhaseIdx, nonWettingPhaseIdx>;
|
||||
|
||||
// define the material law which is parameterized by effective
|
||||
// saturations
|
||||
typedef Opm::RegularizedBrooksCorey<Traits> RawMaterialLaw; /*@\label{tutorial1:rawlaw}@*/
|
||||
using RawMaterialLaw = Opm::RegularizedBrooksCorey<Traits>; /*@\label{tutorial1:rawlaw}@*/
|
||||
|
||||
public:
|
||||
// Convert absolute saturations into effective ones before passing
|
||||
// it to the base capillary pressure law
|
||||
typedef Opm::EffToAbsLaw<RawMaterialLaw> type; /*@\label{tutorial1:eff2abs}@*/
|
||||
using type = Opm::EffToAbsLaw<RawMaterialLaw>; /*@\label{tutorial1:eff2abs}@*/
|
||||
};
|
||||
|
||||
// Disable gravity
|
||||
SET_BOOL_PROP(Tutorial1Problem, EnableGravity, false); /*@\label{tutorial1:gravity}@*/
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::Tutorial1Problem> { static constexpr bool value = false; }; /*@\label{tutorial1:gravity}@*/
|
||||
|
||||
// define how long the simulation should run [s]
|
||||
SET_SCALAR_PROP(Tutorial1Problem, EndTime, 100e3); /*@\label{tutorial1:default-params-begin}@*/
|
||||
template<class TypeTag>
|
||||
struct EndTime<TypeTag, TTag::Tutorial1Problem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 100e3;
|
||||
}; /*@\label{tutorial1:default-params-begin}@*/
|
||||
|
||||
// define the size of the initial time step [s]
|
||||
SET_SCALAR_PROP(Tutorial1Problem, InitialTimeStepSize, 125.0);
|
||||
template<class TypeTag>
|
||||
struct InitialTimeStepSize<TypeTag, TTag::Tutorial1Problem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 125.0;
|
||||
};
|
||||
|
||||
// define the physical size of the problem's domain [m]
|
||||
SET_SCALAR_PROP(Tutorial1Problem, DomainSizeX, 300.0); /*@\label{tutorial1:grid-default-params-begin}@*/
|
||||
SET_SCALAR_PROP(Tutorial1Problem, DomainSizeY, 60.0);
|
||||
SET_SCALAR_PROP(Tutorial1Problem, DomainSizeZ, 0.0);
|
||||
template<class TypeTag>
|
||||
struct DomainSizeX<TypeTag, TTag::Tutorial1Problem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 300.0;
|
||||
}; /*@\label{tutorial1:grid-default-params-begin}@*/
|
||||
template<class TypeTag>
|
||||
struct DomainSizeY<TypeTag, TTag::Tutorial1Problem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 60.0;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct DomainSizeZ<TypeTag, TTag::Tutorial1Problem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 0.0;
|
||||
};
|
||||
|
||||
// // define the number of cells used for discretizing the physical domain
|
||||
SET_INT_PROP(Tutorial1Problem, CellsX, 100);
|
||||
SET_INT_PROP(Tutorial1Problem, CellsY, 1);
|
||||
SET_INT_PROP(Tutorial1Problem, CellsZ, 1); /*@\label{tutorial1:default-params-end}@*/
|
||||
template<class TypeTag>
|
||||
struct CellsX<TypeTag, TTag::Tutorial1Problem> { static constexpr int value = 100; };
|
||||
template<class TypeTag>
|
||||
struct CellsY<TypeTag, TTag::Tutorial1Problem> { static constexpr int value = 1; };
|
||||
template<class TypeTag>
|
||||
struct CellsZ<TypeTag, TTag::Tutorial1Problem> { static constexpr int value = 1; }; /*@\label{tutorial1:default-params-end}@*/
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
//! Tutorial problem using the "immiscible" model.
|
||||
template <class TypeTag>
|
||||
class Tutorial1Problem
|
||||
: public GET_PROP_TYPE(TypeTag, BaseProblem) /*@\label{tutorial1:def-problem}@*/
|
||||
: public GetPropType<TypeTag, Properties::BaseProblem> /*@\label{tutorial1:def-problem}@*/
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BaseProblem) ParentType;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
using ParentType = GetPropType<TypeTag, Properties::BaseProblem>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
|
||||
// Grid dimension
|
||||
enum { dimWorld = GridView::dimensionworld };
|
||||
|
||||
// The type of the intrinsic permeability tensor
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
|
||||
// eWoms specific types are specified via the property system
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams; /*@\label{tutorial1:matLawObjectType}@*/
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using BoundaryRateVector = GetPropType<TypeTag, Properties::BoundaryRateVector>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
using MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>; /*@\label{tutorial1:matLawObjectType}@*/
|
||||
|
||||
// phase indices
|
||||
enum { numPhases = FluidSystem::numPhases };
|
||||
|
@ -31,16 +31,20 @@
|
||||
#include <opm/models/pvs/pvsmodel.hh>
|
||||
#include "problems/waterairproblem.hh"
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(WaterAirProblem, INHERITS_FROM(PvsModel, WaterAirBaseProblem));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct WaterAirProblem { using InheritsFrom = std::tuple<WaterAirBaseProblem, PvsModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
SET_BOOL_PROP(WaterAirProblem, EnableEnergy, true);
|
||||
template<class TypeTag>
|
||||
struct EnableEnergy<TypeTag, TTag::WaterAirProblem> { static constexpr bool value = true; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(WaterAirProblem) ProblemTypeTag;
|
||||
using ProblemTypeTag = Opm::Properties::TTag::WaterAirProblem;
|
||||
return Opm::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
@ -42,30 +42,30 @@ namespace Opm {
|
||||
* \brief Implements a boundary vector for the fully implicit black-oil model.
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class BlackOilBoundaryRateVector : public GET_PROP_TYPE(TypeTag, RateVector)
|
||||
class BlackOilBoundaryRateVector : public GetPropType<TypeTag, Properties::RateVector>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) ParentType;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ExtensiveQuantities) ExtensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, LocalResidual) LocalResidual;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
using ParentType = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using ExtensiveQuantities = GetPropType<TypeTag, Properties::ExtensiveQuantities>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using LocalResidual = GetPropType<TypeTag, Properties::LocalResidual>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
|
||||
enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) };
|
||||
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
|
||||
enum { numComponents = GET_PROP_VALUE(TypeTag, NumComponents) };
|
||||
enum { enableSolvent = GET_PROP_VALUE(TypeTag, EnableSolvent) };
|
||||
enum { enablePolymer = GET_PROP_VALUE(TypeTag, EnablePolymer) };
|
||||
enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) };
|
||||
enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
|
||||
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
|
||||
enum { numComponents = getPropValue<TypeTag, Properties::NumComponents>() };
|
||||
enum { enableSolvent = getPropValue<TypeTag, Properties::EnableSolvent>() };
|
||||
enum { enablePolymer = getPropValue<TypeTag, Properties::EnablePolymer>() };
|
||||
enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
|
||||
enum { conti0EqIdx = Indices::conti0EqIdx };
|
||||
enum { contiEnergyEqIdx = Indices::contiEnergyEqIdx };
|
||||
enum { enableFoam = GET_PROP_VALUE(TypeTag, EnableFoam) };
|
||||
enum { enableFoam = getPropValue<TypeTag, Properties::EnableFoam>() };
|
||||
|
||||
static constexpr bool blackoilConserveSurfaceVolume = GET_PROP_VALUE(TypeTag, BlackoilConserveSurfaceVolume);
|
||||
static constexpr bool blackoilConserveSurfaceVolume = getPropValue<TypeTag, Properties::BlackoilConserveSurfaceVolume>();
|
||||
|
||||
typedef Opm::BlackOilEnergyModule<TypeTag, enableEnergy> EnergyModule;
|
||||
using EnergyModule = Opm::BlackOilEnergyModule<TypeTag, enableEnergy>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@ -120,8 +120,8 @@ public:
|
||||
extQuants,
|
||||
insideIntQuants.fluidState());
|
||||
else if (pBoundary > pInside) {
|
||||
typedef typename std::conditional<std::is_same<typename FluidState::Scalar, Evaluation>::value,
|
||||
Evaluation, Scalar>::type RhsEval;
|
||||
using RhsEval = typename std::conditional<std::is_same<typename FluidState::Scalar, Evaluation>::value,
|
||||
Evaluation, Scalar>::type;
|
||||
// influx
|
||||
LocalResidual::template evalPhaseFluxes_<RhsEval>(tmp,
|
||||
phaseIdx,
|
||||
|
@ -55,26 +55,26 @@ namespace Opm {
|
||||
* \brief Contains the high level supplements required to extend the black oil
|
||||
* model by brine.
|
||||
*/
|
||||
template <class TypeTag, bool enableBrineV = GET_PROP_VALUE(TypeTag, EnableBrine)>
|
||||
template <class TypeTag, bool enableBrineV = getPropValue<TypeTag, Properties::EnableBrine>()>
|
||||
class BlackOilBrineModule
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ExtensiveQuantities) ExtensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
using ExtensiveQuantities = GetPropType<TypeTag, Properties::ExtensiveQuantities>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using Model = GetPropType<TypeTag, Properties::Model>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
|
||||
typedef typename Opm::Tabulated1DFunction<Scalar> TabulatedFunction;
|
||||
typedef typename Opm::IntervalTabulated2DFunction<Scalar> TabulatedTwoDFunction;
|
||||
using TabulatedFunction = typename Opm::Tabulated1DFunction<Scalar>;
|
||||
using TabulatedTwoDFunction = typename Opm::IntervalTabulated2DFunction<Scalar>;
|
||||
|
||||
static constexpr unsigned saltConcentrationIdx = Indices::saltConcentrationIdx;
|
||||
static constexpr unsigned contiBrineEqIdx = Indices::contiBrineEqIdx;
|
||||
@ -82,7 +82,7 @@ class BlackOilBrineModule
|
||||
|
||||
static constexpr unsigned enableBrine = enableBrineV;
|
||||
|
||||
static constexpr unsigned numEq = GET_PROP_VALUE(TypeTag, NumEq);
|
||||
static constexpr unsigned numEq = getPropValue<TypeTag, Properties::NumEq>();
|
||||
static constexpr unsigned numPhases = FluidSystem::numPhases;
|
||||
|
||||
public:
|
||||
@ -337,22 +337,22 @@ BlackOilBrineModule<TypeTag, enableBrineV>::referencePressure_;
|
||||
* \brief Provides the volumetric quantities required for the equations needed by the
|
||||
* brine extension of the black-oil model.
|
||||
*/
|
||||
template <class TypeTag, bool enableBrineV = GET_PROP_VALUE(TypeTag, EnableBrine)>
|
||||
template <class TypeTag, bool enableBrineV = getPropValue<TypeTag, Properties::EnableBrine>()>
|
||||
class BlackOilBrineIntensiveQuantities
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) Implementation;
|
||||
using Implementation = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
|
||||
typedef BlackOilBrineModule<TypeTag> BrineModule;
|
||||
using BrineModule = BlackOilBrineModule<TypeTag>;
|
||||
|
||||
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
|
||||
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
|
||||
static constexpr int saltConcentrationIdx = Indices::saltConcentrationIdx;
|
||||
static constexpr int waterPhaseIdx = FluidSystem::waterPhaseIdx;
|
||||
static constexpr int oilPhaseIdx = FluidSystem::oilPhaseIdx;
|
||||
@ -396,9 +396,9 @@ protected:
|
||||
template <class TypeTag>
|
||||
class BlackOilBrineIntensiveQuantities<TypeTag, false>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
public:
|
||||
void updateSaltConcentration_(const ElementContext& elemCtx OPM_UNUSED,
|
||||
|
@ -47,9 +47,9 @@ class BlackOilDarcyExtensiveQuantities;
|
||||
template <class TypeTag>
|
||||
struct BlackOilDarcyFluxModule
|
||||
{
|
||||
typedef DarcyIntensiveQuantities<TypeTag> FluxIntensiveQuantities;
|
||||
typedef BlackOilDarcyExtensiveQuantities<TypeTag> FluxExtensiveQuantities;
|
||||
typedef DarcyBaseProblem<TypeTag> FluxBaseProblem;
|
||||
using FluxIntensiveQuantities = DarcyIntensiveQuantities<TypeTag>;
|
||||
using FluxExtensiveQuantities = BlackOilDarcyExtensiveQuantities<TypeTag>;
|
||||
using FluxBaseProblem = DarcyBaseProblem<TypeTag>;
|
||||
|
||||
/*!
|
||||
* \brief Register all run-time parameters for the flux module.
|
||||
@ -70,9 +70,9 @@ struct BlackOilDarcyFluxModule
|
||||
template <class TypeTag>
|
||||
class BlackOilDarcyExtensiveQuantities : public DarcyExtensiveQuantities<TypeTag>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ExtensiveQuantities) Implementation;
|
||||
using Implementation = GetPropType<TypeTag, Properties::ExtensiveQuantities>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
|
@ -48,27 +48,27 @@ namespace Opm {
|
||||
* \brief Contains the high level supplements required to extend the black oil
|
||||
* model by energy.
|
||||
*/
|
||||
template <class TypeTag, bool enableEnergyV = GET_PROP_VALUE(TypeTag, EnableEnergy)>
|
||||
template <class TypeTag, bool enableEnergyV = getPropValue<TypeTag, Properties::EnableEnergy>()>
|
||||
class BlackOilEnergyModule
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ExtensiveQuantities) ExtensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
using ExtensiveQuantities = GetPropType<TypeTag, Properties::ExtensiveQuantities>;
|
||||
using Model = GetPropType<TypeTag, Properties::Model>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
|
||||
static constexpr unsigned temperatureIdx = Indices::temperatureIdx;
|
||||
static constexpr unsigned contiEnergyEqIdx = Indices::contiEnergyEqIdx;
|
||||
|
||||
static constexpr unsigned enableEnergy = enableEnergyV;
|
||||
static constexpr unsigned numEq = GET_PROP_VALUE(TypeTag, NumEq);
|
||||
static constexpr unsigned numEq = getPropValue<TypeTag, Properties::NumEq>();
|
||||
static constexpr unsigned numPhases = FluidSystem::numPhases;
|
||||
|
||||
public:
|
||||
@ -170,7 +170,7 @@ public:
|
||||
Scalar refPoro = intQuants.referencePorosity();
|
||||
const auto& uRock = Opm::decay<LhsEval>(intQuants.rockInternalEnergy());
|
||||
storage[contiEnergyEqIdx] += (1.0 - refPoro)*uRock;
|
||||
storage[contiEnergyEqIdx] *= GET_PROP_VALUE(TypeTag, BlackOilEnergyScalingFactor);
|
||||
storage[contiEnergyEqIdx] *= getPropValue<TypeTag, Properties::BlackOilEnergyScalingFactor>();
|
||||
}
|
||||
|
||||
static void computeFlux(RateVector& flux,
|
||||
@ -198,7 +198,7 @@ public:
|
||||
|
||||
// diffusive energy flux
|
||||
flux[contiEnergyEqIdx] += extQuants.energyFlux();
|
||||
flux[contiEnergyEqIdx] *= GET_PROP_VALUE(TypeTag, BlackOilEnergyScalingFactor);
|
||||
flux[contiEnergyEqIdx] *= getPropValue<TypeTag, Properties::BlackOilEnergyScalingFactor>();
|
||||
}
|
||||
|
||||
template <class UpstreamEval>
|
||||
@ -324,23 +324,23 @@ public:
|
||||
* \brief Provides the volumetric quantities required for the equations needed by the
|
||||
* energys extension of the black-oil model.
|
||||
*/
|
||||
template <class TypeTag, bool enableEnergyV = GET_PROP_VALUE(TypeTag, EnableEnergy)>
|
||||
template <class TypeTag, bool enableEnergyV = getPropValue<TypeTag, Properties::EnableEnergy>()>
|
||||
class BlackOilEnergyIntensiveQuantities
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) Implementation;
|
||||
using Implementation = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, SolidEnergyLaw) SolidEnergyLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ThermalConductionLaw) ThermalConductionLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using SolidEnergyLaw = GetPropType<TypeTag, Properties::SolidEnergyLaw>;
|
||||
using ThermalConductionLaw = GetPropType<TypeTag, Properties::ThermalConductionLaw>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
|
||||
typedef BlackOilEnergyModule<TypeTag> EnergyModule;
|
||||
using EnergyModule = BlackOilEnergyModule<TypeTag>;
|
||||
|
||||
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
|
||||
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
|
||||
static constexpr int temperatureIdx = Indices::temperatureIdx;
|
||||
static constexpr int waterPhaseIdx = FluidSystem::waterPhaseIdx;
|
||||
|
||||
@ -407,14 +407,14 @@ protected:
|
||||
template <class TypeTag>
|
||||
class BlackOilEnergyIntensiveQuantities<TypeTag, false>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) Implementation;
|
||||
using Implementation = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
static constexpr bool enableTemperature = GET_PROP_VALUE(TypeTag, EnableTemperature);
|
||||
static constexpr bool enableTemperature = getPropValue<TypeTag, Properties::EnableTemperature>();
|
||||
|
||||
public:
|
||||
void updateTemperature_(const ElementContext& elemCtx,
|
||||
@ -457,26 +457,26 @@ protected:
|
||||
* \brief Provides the energy specific extensive quantities to the generic black-oil
|
||||
* module's extensive quantities.
|
||||
*/
|
||||
template <class TypeTag, bool enableEnergyV = GET_PROP_VALUE(TypeTag, EnableEnergy)>
|
||||
template <class TypeTag, bool enableEnergyV = getPropValue<TypeTag, Properties::EnableEnergy>()>
|
||||
class BlackOilEnergyExtensiveQuantities
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ExtensiveQuantities) Implementation;
|
||||
using Implementation = GetPropType<TypeTag, Properties::ExtensiveQuantities>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ExtensiveQuantities) ExtensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
using ExtensiveQuantities = GetPropType<TypeTag, Properties::ExtensiveQuantities>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
|
||||
typedef BlackOilEnergyModule<TypeTag> EnergyModule;
|
||||
using EnergyModule = BlackOilEnergyModule<TypeTag>;
|
||||
|
||||
static const int dimWorld = GridView::dimensionworld;
|
||||
typedef Dune::FieldVector<Scalar, dimWorld> DimVector;
|
||||
typedef Dune::FieldVector<Evaluation, dimWorld> DimEvalVector;
|
||||
using DimVector = Dune::FieldVector<Scalar, dimWorld>;
|
||||
using DimEvalVector = Dune::FieldVector<Evaluation, dimWorld>;
|
||||
|
||||
public:
|
||||
void updateEnergy(const ElementContext& elemCtx,
|
||||
@ -597,8 +597,8 @@ private:
|
||||
template <class TypeTag>
|
||||
class BlackOilEnergyExtensiveQuantities<TypeTag, false>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
|
||||
public:
|
||||
void updateEnergy(const ElementContext& elemCtx OPM_UNUSED,
|
||||
|
@ -55,11 +55,11 @@ class BlackOilExtensiveQuantities
|
||||
, public BlackOilPolymerExtensiveQuantities<TypeTag>
|
||||
, public BlackOilEnergyExtensiveQuantities<TypeTag>
|
||||
{
|
||||
typedef MultiPhaseBaseExtensiveQuantities<TypeTag> MultiPhaseParent;
|
||||
using MultiPhaseParent = MultiPhaseBaseExtensiveQuantities<TypeTag>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ExtensiveQuantities) Implementation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using Implementation = GetPropType<TypeTag, Properties::ExtensiveQuantities>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
|
@ -57,34 +57,34 @@ namespace Opm {
|
||||
* \brief Contains the high level supplements required to extend the black oil
|
||||
* model to include the effects of foam.
|
||||
*/
|
||||
template <class TypeTag, bool enableFoamV = GET_PROP_VALUE(TypeTag, EnableFoam)>
|
||||
template <class TypeTag, bool enableFoamV = getPropValue<TypeTag, Properties::EnableFoam>()>
|
||||
class BlackOilFoamModule
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ExtensiveQuantities) ExtensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
using ExtensiveQuantities = GetPropType<TypeTag, Properties::ExtensiveQuantities>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using Model = GetPropType<TypeTag, Properties::Model>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
|
||||
typedef typename Opm::Tabulated1DFunction<Scalar> TabulatedFunction;
|
||||
using TabulatedFunction = typename Opm::Tabulated1DFunction<Scalar>;
|
||||
|
||||
static constexpr unsigned foamConcentrationIdx = Indices::foamConcentrationIdx;
|
||||
static constexpr unsigned contiFoamEqIdx = Indices::contiFoamEqIdx;
|
||||
static constexpr unsigned gasPhaseIdx = FluidSystem::gasPhaseIdx;
|
||||
|
||||
static constexpr unsigned enableFoam = enableFoamV;
|
||||
static constexpr bool enableVtkOutput = GET_PROP_VALUE(TypeTag, EnableVtkOutput);
|
||||
static constexpr bool enableVtkOutput = getPropValue<TypeTag, Properties::EnableVtkOutput>();
|
||||
|
||||
static constexpr unsigned numEq = GET_PROP_VALUE(TypeTag, NumEq);
|
||||
static constexpr unsigned numEq = getPropValue<TypeTag, Properties::NumEq>();
|
||||
static constexpr unsigned numPhases = FluidSystem::numPhases;
|
||||
|
||||
public:
|
||||
@ -478,22 +478,22 @@ BlackOilFoamModule<TypeTag, enableFoam>::gasMobilityMultiplierTable_;
|
||||
* \brief Provides the volumetric quantities required for the equations needed by the
|
||||
* polymers extension of the black-oil model.
|
||||
*/
|
||||
template <class TypeTag, bool enableFoam = GET_PROP_VALUE(TypeTag, EnableFoam)>
|
||||
template <class TypeTag, bool enableFoam = getPropValue<TypeTag, Properties::EnableFoam>()>
|
||||
class BlackOilFoamIntensiveQuantities
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) Implementation;
|
||||
using Implementation = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
|
||||
typedef BlackOilFoamModule<TypeTag> FoamModule;
|
||||
using FoamModule = BlackOilFoamModule<TypeTag>;
|
||||
|
||||
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
|
||||
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
|
||||
static constexpr int foamConcentrationIdx = Indices::foamConcentrationIdx;
|
||||
static constexpr unsigned waterPhaseIdx = FluidSystem::waterPhaseIdx;
|
||||
static constexpr unsigned oilPhaseIdx = FluidSystem::oilPhaseIdx;
|
||||
@ -589,9 +589,9 @@ protected:
|
||||
template <class TypeTag>
|
||||
class BlackOilFoamIntensiveQuantities<TypeTag, false>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
public:
|
||||
void foamPropertiesUpdate_(const ElementContext& elemCtx OPM_UNUSED,
|
||||
|
@ -52,36 +52,36 @@ namespace Opm {
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class BlackOilIntensiveQuantities
|
||||
: public GET_PROP_TYPE(TypeTag, DiscIntensiveQuantities)
|
||||
, public GET_PROP_TYPE(TypeTag, FluxModule)::FluxIntensiveQuantities
|
||||
: public GetPropType<TypeTag, Properties::DiscIntensiveQuantities>
|
||||
, public GetPropType<TypeTag, Properties::FluxModule>::FluxIntensiveQuantities
|
||||
, public BlackOilSolventIntensiveQuantities<TypeTag>
|
||||
, public BlackOilPolymerIntensiveQuantities<TypeTag>
|
||||
, public BlackOilFoamIntensiveQuantities<TypeTag>
|
||||
, public BlackOilBrineIntensiveQuantities<TypeTag>
|
||||
, public BlackOilEnergyIntensiveQuantities<TypeTag>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, DiscIntensiveQuantities) ParentType;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) Implementation;
|
||||
using ParentType = GetPropType<TypeTag, Properties::DiscIntensiveQuantities>;
|
||||
using Implementation = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluxModule) FluxModule;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using FluxModule = GetPropType<TypeTag, Properties::FluxModule>;
|
||||
|
||||
enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) };
|
||||
enum { enableSolvent = GET_PROP_VALUE(TypeTag, EnableSolvent) };
|
||||
enum { enablePolymer = GET_PROP_VALUE(TypeTag, EnablePolymer) };
|
||||
enum { enableFoam = GET_PROP_VALUE(TypeTag, EnableFoam) };
|
||||
enum { enableBrine = GET_PROP_VALUE(TypeTag, EnableBrine) };
|
||||
enum { enableTemperature = GET_PROP_VALUE(TypeTag, EnableTemperature) };
|
||||
enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) };
|
||||
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
|
||||
enum { numComponents = GET_PROP_VALUE(TypeTag, NumComponents) };
|
||||
enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
|
||||
enum { enableSolvent = getPropValue<TypeTag, Properties::EnableSolvent>() };
|
||||
enum { enablePolymer = getPropValue<TypeTag, Properties::EnablePolymer>() };
|
||||
enum { enableFoam = getPropValue<TypeTag, Properties::EnableFoam>() };
|
||||
enum { enableBrine = getPropValue<TypeTag, Properties::EnableBrine>() };
|
||||
enum { enableTemperature = getPropValue<TypeTag, Properties::EnableTemperature>() };
|
||||
enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
|
||||
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
|
||||
enum { numComponents = getPropValue<TypeTag, Properties::NumComponents>() };
|
||||
enum { waterCompIdx = FluidSystem::waterCompIdx };
|
||||
enum { oilCompIdx = FluidSystem::oilCompIdx };
|
||||
enum { gasCompIdx = FluidSystem::gasCompIdx };
|
||||
@ -94,10 +94,10 @@ class BlackOilIntensiveQuantities
|
||||
static const bool compositionSwitchEnabled = Indices::gasEnabled;
|
||||
static const bool waterEnabled = Indices::waterEnabled;
|
||||
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
typedef typename FluxModule::FluxIntensiveQuantities FluxIntensiveQuantities;
|
||||
typedef Opm::BlackOilFluidState<Evaluation, FluidSystem, enableTemperature, enableEnergy, compositionSwitchEnabled, enableBrine, Indices::numPhases > FluidState;
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
using FluxIntensiveQuantities = typename FluxModule::FluxIntensiveQuantities;
|
||||
using FluidState = Opm::BlackOilFluidState<Evaluation, FluidSystem, enableTemperature, enableEnergy, compositionSwitchEnabled, enableBrine, Indices::numPhases >;
|
||||
|
||||
public:
|
||||
BlackOilIntensiveQuantities()
|
||||
|
@ -44,22 +44,22 @@ namespace Opm {
|
||||
* \brief Calculates the local residual of the black oil model.
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class BlackOilLocalResidual : public GET_PROP_TYPE(TypeTag, DiscLocalResidual)
|
||||
class BlackOilLocalResidual : public GetPropType<TypeTag, Properties::DiscLocalResidual>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ExtensiveQuantities) ExtensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
using ExtensiveQuantities = GetPropType<TypeTag, Properties::ExtensiveQuantities>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
enum { conti0EqIdx = Indices::conti0EqIdx };
|
||||
enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) };
|
||||
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
|
||||
enum { numComponents = GET_PROP_VALUE(TypeTag, NumComponents) };
|
||||
enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
|
||||
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
|
||||
enum { numComponents = getPropValue<TypeTag, Properties::NumComponents>() };
|
||||
|
||||
enum { gasPhaseIdx = FluidSystem::gasPhaseIdx };
|
||||
enum { oilPhaseIdx = FluidSystem::oilPhaseIdx };
|
||||
@ -75,15 +75,15 @@ class BlackOilLocalResidual : public GET_PROP_TYPE(TypeTag, DiscLocalResidual)
|
||||
static const bool oilEnabled = Indices::oilEnabled;
|
||||
static const bool compositionSwitchEnabled = (compositionSwitchIdx >= 0);
|
||||
|
||||
static constexpr bool blackoilConserveSurfaceVolume = GET_PROP_VALUE(TypeTag, BlackoilConserveSurfaceVolume);
|
||||
static constexpr bool enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy);
|
||||
static constexpr bool blackoilConserveSurfaceVolume = getPropValue<TypeTag, Properties::BlackoilConserveSurfaceVolume>();
|
||||
static constexpr bool enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>();
|
||||
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
typedef BlackOilSolventModule<TypeTag> SolventModule;
|
||||
typedef BlackOilPolymerModule<TypeTag> PolymerModule;
|
||||
typedef BlackOilEnergyModule<TypeTag> EnergyModule;
|
||||
typedef BlackOilFoamModule<TypeTag> FoamModule;
|
||||
typedef BlackOilBrineModule<TypeTag> BrineModule;
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
using SolventModule = BlackOilSolventModule<TypeTag>;
|
||||
using PolymerModule = BlackOilPolymerModule<TypeTag>;
|
||||
using EnergyModule = BlackOilEnergyModule<TypeTag>;
|
||||
using FoamModule = BlackOilFoamModule<TypeTag>;
|
||||
using BrineModule = BlackOilBrineModule<TypeTag>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@ -212,7 +212,7 @@ public:
|
||||
|
||||
// scale the source term of the energy equation
|
||||
if (enableEnergy)
|
||||
source[Indices::contiEnergyEqIdx] *= GET_PROP_VALUE(TypeTag, BlackOilEnergyScalingFactor);
|
||||
source[Indices::contiEnergyEqIdx] *= getPropValue<TypeTag, Properties::BlackOilEnergyScalingFactor>();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -66,78 +66,98 @@ template <class TypeTag>
|
||||
class EclVanguard;
|
||||
}
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
//! The type tag for the black-oil problems
|
||||
NEW_TYPE_TAG(BlackOilModel, INHERITS_FROM(MultiPhaseBaseModel,
|
||||
VtkBlackOil,
|
||||
VtkBlackOilSolvent,
|
||||
VtkBlackOilPolymer,
|
||||
VtkBlackOilEnergy,
|
||||
VtkComposition));
|
||||
struct BlackOilModel { using InheritsFrom = std::tuple<VtkComposition,
|
||||
VtkBlackOilEnergy,
|
||||
VtkBlackOilPolymer,
|
||||
VtkBlackOilSolvent,
|
||||
VtkBlackOil,
|
||||
MultiPhaseBaseModel>; };
|
||||
} // namespace TTag
|
||||
|
||||
//! Set the local residual function
|
||||
SET_TYPE_PROP(BlackOilModel, LocalResidual,
|
||||
Opm::BlackOilLocalResidual<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct LocalResidual<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilLocalResidual<TypeTag>; };
|
||||
|
||||
//! Use the black-oil specific newton method
|
||||
SET_TYPE_PROP(BlackOilModel, NewtonMethod, Opm::BlackOilNewtonMethod<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct NewtonMethod<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilNewtonMethod<TypeTag>; };
|
||||
|
||||
//! The Model property
|
||||
SET_TYPE_PROP(BlackOilModel, Model, Opm::BlackOilModel<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Model<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilModel<TypeTag>; };
|
||||
|
||||
//! The Problem property
|
||||
SET_TYPE_PROP(BlackOilModel, BaseProblem, Opm::BlackOilProblem<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct BaseProblem<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilProblem<TypeTag>; };
|
||||
|
||||
//! the RateVector property
|
||||
SET_TYPE_PROP(BlackOilModel, RateVector, Opm::BlackOilRateVector<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct RateVector<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilRateVector<TypeTag>; };
|
||||
|
||||
//! the BoundaryRateVector property
|
||||
SET_TYPE_PROP(BlackOilModel, BoundaryRateVector, Opm::BlackOilBoundaryRateVector<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct BoundaryRateVector<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilBoundaryRateVector<TypeTag>; };
|
||||
|
||||
//! the PrimaryVariables property
|
||||
SET_TYPE_PROP(BlackOilModel, PrimaryVariables, Opm::BlackOilPrimaryVariables<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct PrimaryVariables<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilPrimaryVariables<TypeTag>; };
|
||||
|
||||
//! the IntensiveQuantities property
|
||||
SET_TYPE_PROP(BlackOilModel, IntensiveQuantities, Opm::BlackOilIntensiveQuantities<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct IntensiveQuantities<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilIntensiveQuantities<TypeTag>; };
|
||||
|
||||
//! the ExtensiveQuantities property
|
||||
SET_TYPE_PROP(BlackOilModel, ExtensiveQuantities, Opm::BlackOilExtensiveQuantities<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct ExtensiveQuantities<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilExtensiveQuantities<TypeTag>; };
|
||||
|
||||
//! Use the the velocity module which is aware of the black-oil specific model extensions
|
||||
//! (i.e., the polymer and solvent extensions)
|
||||
SET_TYPE_PROP(BlackOilModel, FluxModule, Opm::BlackOilDarcyFluxModule<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct FluxModule<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilDarcyFluxModule<TypeTag>; };
|
||||
|
||||
//! The indices required by the model
|
||||
SET_TYPE_PROP(BlackOilModel, Indices,
|
||||
Opm::BlackOilIndices<GET_PROP_VALUE(TypeTag, EnableSolvent),
|
||||
GET_PROP_VALUE(TypeTag, EnablePolymer),
|
||||
GET_PROP_VALUE(TypeTag, EnableEnergy),
|
||||
GET_PROP_VALUE(TypeTag, EnableFoam),
|
||||
GET_PROP_VALUE(TypeTag, EnableBrine),
|
||||
/*PVOffset=*/0>);
|
||||
template<class TypeTag>
|
||||
struct Indices<TypeTag, TTag::BlackOilModel>
|
||||
{ using type = Opm::BlackOilIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
|
||||
getPropValue<TypeTag, Properties::EnablePolymer>(),
|
||||
getPropValue<TypeTag, Properties::EnableEnergy>(),
|
||||
getPropValue<TypeTag, Properties::EnableFoam>(),
|
||||
getPropValue<TypeTag, Properties::EnableBrine>(),
|
||||
/*PVOffset=*/0>; };
|
||||
|
||||
//! Set the fluid system to the black-oil fluid system by default
|
||||
SET_PROP(BlackOilModel, FluidSystem)
|
||||
template<class TypeTag>
|
||||
struct FluidSystem<TypeTag, TTag::BlackOilModel>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
|
||||
public:
|
||||
typedef Opm::BlackOilFluidSystem<Scalar> type;
|
||||
using type = Opm::BlackOilFluidSystem<Scalar>;
|
||||
};
|
||||
|
||||
// by default, all ECL extension modules are disabled
|
||||
SET_BOOL_PROP(BlackOilModel, EnableSolvent, false);
|
||||
SET_BOOL_PROP(BlackOilModel, EnablePolymer, false);
|
||||
SET_BOOL_PROP(BlackOilModel, EnablePolymerMW, false);
|
||||
SET_BOOL_PROP(BlackOilModel, EnableFoam, false);
|
||||
SET_BOOL_PROP(BlackOilModel, EnableBrine, false);
|
||||
template<class TypeTag>
|
||||
struct EnableSolvent<TypeTag, TTag::BlackOilModel> { static constexpr bool value = false; };
|
||||
template<class TypeTag>
|
||||
struct EnablePolymer<TypeTag, TTag::BlackOilModel> { static constexpr bool value = false; };
|
||||
template<class TypeTag>
|
||||
struct EnablePolymerMW<TypeTag, TTag::BlackOilModel> { static constexpr bool value = false; };
|
||||
template<class TypeTag>
|
||||
struct EnableFoam<TypeTag, TTag::BlackOilModel> { static constexpr bool value = false; };
|
||||
template<class TypeTag>
|
||||
struct EnableBrine<TypeTag, TTag::BlackOilModel> { static constexpr bool value = false; };
|
||||
|
||||
//! By default, the blackoil model is isothermal and does not conserve energy
|
||||
SET_BOOL_PROP(BlackOilModel, EnableTemperature, false);
|
||||
SET_BOOL_PROP(BlackOilModel, EnableEnergy, false);
|
||||
template<class TypeTag>
|
||||
struct EnableTemperature<TypeTag, TTag::BlackOilModel> { static constexpr bool value = false; };
|
||||
template<class TypeTag>
|
||||
struct EnableEnergy<TypeTag, TTag::BlackOilModel> { static constexpr bool value = false; };
|
||||
|
||||
//! by default, scale the energy equation by the inverse of the energy required to heat
|
||||
//! up one kg of water by 30 Kelvin. If we conserve surface volumes, this must be divided
|
||||
@ -145,22 +165,24 @@ SET_BOOL_PROP(BlackOilModel, EnableEnergy, false);
|
||||
//! solvers that do not weight the components of the solutions do the right thing.
|
||||
//! by default, don't scale the energy equation, i.e. assume that a reasonable linear
|
||||
//! solver is used. (Not scaling it makes debugging quite a bit easier.)
|
||||
SET_PROP(BlackOilModel, BlackOilEnergyScalingFactor)
|
||||
template<class TypeTag>
|
||||
struct BlackOilEnergyScalingFactor<TypeTag, TTag::BlackOilModel>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
static constexpr Scalar alpha = GET_PROP_VALUE(TypeTag, BlackoilConserveSurfaceVolume) ? 1000.0 : 1.0;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
static constexpr Scalar alpha = getPropValue<TypeTag, Properties::BlackoilConserveSurfaceVolume>() ? 1000.0 : 1.0;
|
||||
|
||||
public:
|
||||
typedef Scalar type;
|
||||
using type = Scalar;
|
||||
static constexpr Scalar value = 1.0/(30.0*4184.0*alpha);
|
||||
};
|
||||
|
||||
// by default, ebos formulates the conservation equations in terms of mass not surface
|
||||
// volumes
|
||||
SET_BOOL_PROP(BlackOilModel, BlackoilConserveSurfaceVolume, false);
|
||||
template<class TypeTag>
|
||||
struct BlackoilConserveSurfaceVolume<TypeTag, TTag::BlackOilModel> { static constexpr bool value = false; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@ -219,7 +241,8 @@ namespace Opm {
|
||||
* \c FluxModule property. For example, the velocity model can by
|
||||
* changed to the Forchheimer approach by
|
||||
* \code
|
||||
* SET_TYPE_PROP(MyProblemTypeTag, FluxModule, Opm::ForchheimerFluxModule<TypeTag>);
|
||||
* template<class TypeTag>
|
||||
struct FluxModule<TypeTag, TTag::MyProblemTypeTag> { using type = Opm::ForchheimerFluxModule<TypeTag>; };
|
||||
* \endcode
|
||||
*
|
||||
* The primary variables used by this model are:
|
||||
@ -230,27 +253,27 @@ template<class TypeTag >
|
||||
class BlackOilModel
|
||||
: public MultiPhaseBaseModel<TypeTag>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Implementation;
|
||||
typedef MultiPhaseBaseModel<TypeTag> ParentType;
|
||||
using Implementation = GetPropType<TypeTag, Properties::Model>;
|
||||
using ParentType = MultiPhaseBaseModel<TypeTag>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Discretization) Discretization;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using Discretization = GetPropType<TypeTag, Properties::Discretization>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
|
||||
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
|
||||
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
|
||||
enum { numComponents = FluidSystem::numComponents };
|
||||
enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) };
|
||||
enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
|
||||
|
||||
static const bool compositionSwitchEnabled = Indices::gasEnabled;
|
||||
static const bool waterEnabled = Indices::waterEnabled;
|
||||
|
||||
typedef BlackOilSolventModule<TypeTag> SolventModule;
|
||||
typedef BlackOilPolymerModule<TypeTag> PolymerModule;
|
||||
typedef BlackOilEnergyModule<TypeTag> EnergyModule;
|
||||
using SolventModule = BlackOilSolventModule<TypeTag>;
|
||||
using PolymerModule = BlackOilPolymerModule<TypeTag>;
|
||||
using EnergyModule = BlackOilEnergyModule<TypeTag>;
|
||||
public:
|
||||
BlackOilModel(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
@ -383,7 +406,7 @@ public:
|
||||
// we do not care much about water, so it gets de-prioritized by a factor of 100
|
||||
static constexpr Scalar waterPriority = 1e-2;
|
||||
|
||||
if (GET_PROP_VALUE(TypeTag, BlackoilConserveSurfaceVolume)) {
|
||||
if (getPropValue<TypeTag, Properties::BlackoilConserveSurfaceVolume>()) {
|
||||
// Roughly convert the surface volume of the fluids from m^3 to kg. (in this
|
||||
// context, it does not really matter if the actual densities are off by a
|
||||
// factor of two or three.)
|
||||
@ -481,7 +504,7 @@ public:
|
||||
PolymerModule::deserializeEntity(*this, instream, dof);
|
||||
EnergyModule::deserializeEntity(*this, instream, dof);
|
||||
|
||||
typedef typename PrimaryVariables::PrimaryVarsMeaning PVM;
|
||||
using PVM = typename PrimaryVariables::PrimaryVarsMeaning;
|
||||
priVars.setPrimaryVarsMeaning(static_cast<PVM>(primaryVarsMeaning));
|
||||
priVars.setPvtRegionIndex(pvtRegionIdx);
|
||||
}
|
||||
|
@ -35,22 +35,42 @@
|
||||
|
||||
#include <opm/material/common/Unused.hpp>
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
template <class TypeTag, class MyTypeTag>
|
||||
struct DiscNewtonMethod;
|
||||
|
||||
NEW_PROP_TAG(DpMaxRel);
|
||||
NEW_PROP_TAG(DsMax);
|
||||
NEW_PROP_TAG(PriVarOscilationThreshold);
|
||||
NEW_PROP_TAG(ProjectSaturations);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct DpMaxRel { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct DsMax { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct PriVarOscilationThreshold { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct ProjectSaturations { using type = UndefinedProperty; };
|
||||
|
||||
SET_SCALAR_PROP(NewtonMethod, DpMaxRel, 0.3);
|
||||
SET_SCALAR_PROP(NewtonMethod, DsMax, 0.2);
|
||||
SET_SCALAR_PROP(NewtonMethod, PriVarOscilationThreshold, 1e-5);
|
||||
SET_BOOL_PROP(NewtonMethod, ProjectSaturations, false);
|
||||
template<class TypeTag>
|
||||
struct DpMaxRel<TypeTag, TTag::NewtonMethod>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 0.3;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct DsMax<TypeTag, TTag::NewtonMethod>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 0.2;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct PriVarOscilationThreshold<TypeTag, TTag::NewtonMethod>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1e-5;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct ProjectSaturations<TypeTag, TTag::NewtonMethod> { static constexpr bool value = false; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@ -60,19 +80,19 @@ namespace Opm {
|
||||
* \brief A newton solver which is specific to the black oil model.
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class BlackOilNewtonMethod : public GET_PROP_TYPE(TypeTag, DiscNewtonMethod)
|
||||
class BlackOilNewtonMethod : public GetPropType<TypeTag, Properties::DiscNewtonMethod>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, DiscNewtonMethod) ParentType;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, SolutionVector) SolutionVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GlobalEqVector) GlobalEqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Linearizer) Linearizer;
|
||||
using ParentType = GetPropType<TypeTag, Properties::DiscNewtonMethod>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>;
|
||||
using GlobalEqVector = GetPropType<TypeTag, Properties::GlobalEqVector>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Linearizer = GetPropType<TypeTag, Properties::Linearizer>;
|
||||
|
||||
static const unsigned numEq = GET_PROP_VALUE(TypeTag, NumEq);
|
||||
static const unsigned numEq = getPropValue<TypeTag, Properties::NumEq>();
|
||||
|
||||
public:
|
||||
BlackOilNewtonMethod(Simulator& simulator) : ParentType(simulator)
|
||||
|
@ -58,26 +58,26 @@ namespace Opm {
|
||||
* \brief Contains the high level supplements required to extend the black oil
|
||||
* model by polymer.
|
||||
*/
|
||||
template <class TypeTag, bool enablePolymerV = GET_PROP_VALUE(TypeTag, EnablePolymer)>
|
||||
template <class TypeTag, bool enablePolymerV = getPropValue<TypeTag, Properties::EnablePolymer>()>
|
||||
class BlackOilPolymerModule
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ExtensiveQuantities) ExtensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
using ExtensiveQuantities = GetPropType<TypeTag, Properties::ExtensiveQuantities>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using Model = GetPropType<TypeTag, Properties::Model>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
|
||||
typedef typename Opm::Tabulated1DFunction<Scalar> TabulatedFunction;
|
||||
typedef typename Opm::IntervalTabulated2DFunction<Scalar> TabulatedTwoDFunction;
|
||||
using TabulatedFunction = typename Opm::Tabulated1DFunction<Scalar>;
|
||||
using TabulatedTwoDFunction = typename Opm::IntervalTabulated2DFunction<Scalar>;
|
||||
|
||||
static constexpr unsigned polymerConcentrationIdx = Indices::polymerConcentrationIdx;
|
||||
static constexpr unsigned polymerMoleWeightIdx = Indices::polymerMoleWeightIdx;
|
||||
@ -87,9 +87,9 @@ class BlackOilPolymerModule
|
||||
|
||||
|
||||
static constexpr unsigned enablePolymer = enablePolymerV;
|
||||
static constexpr bool enablePolymerMolarWeight = GET_PROP_VALUE(TypeTag, EnablePolymerMW);
|
||||
static constexpr bool enablePolymerMolarWeight = getPropValue<TypeTag, Properties::EnablePolymerMW>();
|
||||
|
||||
static constexpr unsigned numEq = GET_PROP_VALUE(TypeTag, NumEq);
|
||||
static constexpr unsigned numEq = getPropValue<TypeTag, Properties::NumEq>();
|
||||
static constexpr unsigned numPhases = FluidSystem::numPhases;
|
||||
|
||||
struct SkprpolyTable {
|
||||
@ -834,7 +834,7 @@ public:
|
||||
unsigned pvtnumRegionIdx,
|
||||
const Evaluation& v0)
|
||||
{
|
||||
typedef Opm::MathToolbox<Evaluation> ToolboxLocal;
|
||||
using ToolboxLocal = Opm::MathToolbox<Evaluation>;
|
||||
|
||||
const auto& viscosityMultiplierTable = plyviscViscosityMultiplierTable_[pvtnumRegionIdx];
|
||||
Scalar viscosityMultiplier = viscosityMultiplierTable.eval(Opm::scalarValue(polymerConcentration), /*extrapolate=*/true);
|
||||
@ -1011,25 +1011,25 @@ BlackOilPolymerModule<TypeTag, enablePolymerV>::skprpolyTables_;
|
||||
* \brief Provides the volumetric quantities required for the equations needed by the
|
||||
* polymers extension of the black-oil model.
|
||||
*/
|
||||
template <class TypeTag, bool enablePolymerV = GET_PROP_VALUE(TypeTag, EnablePolymer)>
|
||||
template <class TypeTag, bool enablePolymerV = getPropValue<TypeTag, Properties::EnablePolymer>()>
|
||||
class BlackOilPolymerIntensiveQuantities
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) Implementation;
|
||||
using Implementation = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
|
||||
typedef BlackOilPolymerModule<TypeTag> PolymerModule;
|
||||
using PolymerModule = BlackOilPolymerModule<TypeTag>;
|
||||
|
||||
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
|
||||
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
|
||||
static constexpr int polymerConcentrationIdx = Indices::polymerConcentrationIdx;
|
||||
static constexpr int waterPhaseIdx = FluidSystem::waterPhaseIdx;
|
||||
static constexpr bool enablePolymerMolarWeight = GET_PROP_VALUE(TypeTag, EnablePolymerMW);
|
||||
static constexpr bool enablePolymerMolarWeight = getPropValue<TypeTag, Properties::EnablePolymerMW>();
|
||||
static constexpr int polymerMoleWeightIdx = Indices::polymerMoleWeightIdx;
|
||||
|
||||
|
||||
@ -1154,9 +1154,9 @@ protected:
|
||||
template <class TypeTag>
|
||||
class BlackOilPolymerIntensiveQuantities<TypeTag, false>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
public:
|
||||
void polymerPropertiesUpdate_(const ElementContext& elemCtx OPM_UNUSED,
|
||||
@ -1194,27 +1194,27 @@ public:
|
||||
* \brief Provides the polymer specific extensive quantities to the generic black-oil
|
||||
* module's extensive quantities.
|
||||
*/
|
||||
template <class TypeTag, bool enablePolymerV = GET_PROP_VALUE(TypeTag, EnablePolymer)>
|
||||
template <class TypeTag, bool enablePolymerV = getPropValue<TypeTag, Properties::EnablePolymer>()>
|
||||
class BlackOilPolymerExtensiveQuantities
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ExtensiveQuantities) Implementation;
|
||||
using Implementation = GetPropType<TypeTag, Properties::ExtensiveQuantities>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ExtensiveQuantities) ExtensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
using ExtensiveQuantities = GetPropType<TypeTag, Properties::ExtensiveQuantities>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
|
||||
static constexpr unsigned gasPhaseIdx = FluidSystem::gasPhaseIdx;
|
||||
static constexpr int dimWorld = GridView::dimensionworld;
|
||||
static constexpr unsigned waterPhaseIdx = FluidSystem::waterPhaseIdx;
|
||||
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
typedef BlackOilPolymerModule<TypeTag> PolymerModule;
|
||||
typedef Dune::FieldVector<Scalar, dimWorld> DimVector;
|
||||
typedef Dune::FieldVector<Evaluation, dimWorld> DimEvalVector;
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
using PolymerModule = BlackOilPolymerModule<TypeTag>;
|
||||
using DimVector = Dune::FieldVector<Scalar, dimWorld>;
|
||||
using DimEvalVector = Dune::FieldVector<Evaluation, dimWorld>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@ -1320,8 +1320,8 @@ private:
|
||||
template <class TypeTag>
|
||||
class BlackOilPolymerExtensiveQuantities<TypeTag, false>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
|
||||
public:
|
||||
void updateShearMultipliers(const ElementContext& elemCtx OPM_UNUSED,
|
||||
|
@ -63,19 +63,19 @@ class BlackOilBrineModule;
|
||||
template <class TypeTag>
|
||||
class BlackOilPrimaryVariables : public FvBasePrimaryVariables<TypeTag>
|
||||
{
|
||||
typedef FvBasePrimaryVariables<TypeTag> ParentType;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) Implementation;
|
||||
using ParentType = FvBasePrimaryVariables<TypeTag>;
|
||||
using Implementation = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
using Problem = GetPropType<TypeTag, Properties::Problem>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
using MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>;
|
||||
|
||||
// number of equations
|
||||
enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) };
|
||||
enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
|
||||
|
||||
// primary variable indices
|
||||
enum { waterSaturationIdx = Indices::waterSaturationIdx };
|
||||
@ -86,29 +86,29 @@ class BlackOilPrimaryVariables : public FvBasePrimaryVariables<TypeTag>
|
||||
static const bool waterEnabled = Indices::waterEnabled;
|
||||
|
||||
// phase indices from the fluid system
|
||||
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
|
||||
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
|
||||
enum { gasPhaseIdx = FluidSystem::gasPhaseIdx };
|
||||
enum { waterPhaseIdx = FluidSystem::waterPhaseIdx };
|
||||
enum { oilPhaseIdx = FluidSystem::oilPhaseIdx };
|
||||
|
||||
// component indices from the fluid system
|
||||
enum { numComponents = GET_PROP_VALUE(TypeTag, NumComponents) };
|
||||
enum { enableSolvent = GET_PROP_VALUE(TypeTag, EnableSolvent) };
|
||||
enum { enablePolymer = GET_PROP_VALUE(TypeTag, EnablePolymer) };
|
||||
enum { enableFoam = GET_PROP_VALUE(TypeTag, EnableFoam) };
|
||||
enum { enableBrine = GET_PROP_VALUE(TypeTag, EnableBrine) };
|
||||
enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) };
|
||||
enum { numComponents = getPropValue<TypeTag, Properties::NumComponents>() };
|
||||
enum { enableSolvent = getPropValue<TypeTag, Properties::EnableSolvent>() };
|
||||
enum { enablePolymer = getPropValue<TypeTag, Properties::EnablePolymer>() };
|
||||
enum { enableFoam = getPropValue<TypeTag, Properties::EnableFoam>() };
|
||||
enum { enableBrine = getPropValue<TypeTag, Properties::EnableBrine>() };
|
||||
enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
|
||||
enum { gasCompIdx = FluidSystem::gasCompIdx };
|
||||
enum { waterCompIdx = FluidSystem::waterCompIdx };
|
||||
enum { oilCompIdx = FluidSystem::oilCompIdx };
|
||||
|
||||
typedef typename Opm::MathToolbox<Evaluation> Toolbox;
|
||||
typedef Dune::FieldVector<Scalar, numComponents> ComponentVector;
|
||||
typedef BlackOilSolventModule<TypeTag, enableSolvent> SolventModule;
|
||||
typedef BlackOilPolymerModule<TypeTag, enablePolymer> PolymerModule;
|
||||
typedef BlackOilEnergyModule<TypeTag, enableEnergy> EnergyModule;
|
||||
typedef BlackOilFoamModule<TypeTag, enableFoam> FoamModule;
|
||||
typedef BlackOilBrineModule<TypeTag, enableBrine> BrineModule;
|
||||
using Toolbox = typename Opm::MathToolbox<Evaluation>;
|
||||
using ComponentVector = Dune::FieldVector<Scalar, numComponents>;
|
||||
using SolventModule = BlackOilSolventModule<TypeTag, enableSolvent>;
|
||||
using PolymerModule = BlackOilPolymerModule<TypeTag, enablePolymer>;
|
||||
using EnergyModule = BlackOilEnergyModule<TypeTag, enableEnergy>;
|
||||
using FoamModule = BlackOilFoamModule<TypeTag, enableFoam>;
|
||||
using BrineModule = BlackOilBrineModule<TypeTag, enableBrine>;
|
||||
|
||||
static_assert(numPhases == 3, "The black-oil model assumes three phases!");
|
||||
static_assert(numComponents == 3, "The black-oil model assumes three components!");
|
||||
@ -182,9 +182,9 @@ public:
|
||||
const MaterialLawParams& matParams,
|
||||
bool isInEquilibrium = false)
|
||||
{
|
||||
typedef typename std::remove_reference<typename FluidState::Scalar>::type ConstEvaluation;
|
||||
typedef typename std::remove_const<ConstEvaluation>::type FsEvaluation;
|
||||
typedef typename Opm::MathToolbox<FsEvaluation> FsToolbox;
|
||||
using ConstEvaluation = typename std::remove_reference<typename FluidState::Scalar>::type;
|
||||
using FsEvaluation = typename std::remove_const<ConstEvaluation>::type;
|
||||
using FsToolbox = typename Opm::MathToolbox<FsEvaluation>;
|
||||
|
||||
#ifndef NDEBUG
|
||||
// make sure the temperature is the same in all fluid phases
|
||||
@ -210,8 +210,8 @@ public:
|
||||
paramCache.setMaxOilSat(FsToolbox::value(fluidState.saturation(oilPhaseIdx)));
|
||||
|
||||
// create a mutable fluid state with well defined densities based on the input
|
||||
typedef Opm::NcpFlash<Scalar, FluidSystem> NcpFlash;
|
||||
typedef Opm::CompositionalFluidState<Scalar, FluidSystem> FlashFluidState;
|
||||
using NcpFlash = Opm::NcpFlash<Scalar, FluidSystem>;
|
||||
using FlashFluidState = Opm::CompositionalFluidState<Scalar, FluidSystem>;
|
||||
FlashFluidState fsFlash;
|
||||
fsFlash.setTemperature(FsToolbox::value(fluidState.temperature(/*phaseIdx=*/0)));
|
||||
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||
@ -258,9 +258,9 @@ public:
|
||||
template <class FluidState>
|
||||
void assignNaive(const FluidState& fluidState)
|
||||
{
|
||||
typedef typename std::remove_reference<typename FluidState::Scalar>::type ConstEvaluation;
|
||||
typedef typename std::remove_const<ConstEvaluation>::type FsEvaluation;
|
||||
typedef typename Opm::MathToolbox<FsEvaluation> FsToolbox;
|
||||
using ConstEvaluation = typename std::remove_reference<typename FluidState::Scalar>::type;
|
||||
using FsEvaluation = typename std::remove_const<ConstEvaluation>::type;
|
||||
using FsToolbox = typename Opm::MathToolbox<FsEvaluation>;
|
||||
|
||||
bool gasPresent = FluidSystem::phaseIsActive(gasPhaseIdx)?(fluidState.saturation(gasPhaseIdx) > 0.0):false;
|
||||
bool oilPresent = FluidSystem::phaseIsActive(oilPhaseIdx)?(fluidState.saturation(oilPhaseIdx) > 0.0):false;
|
||||
@ -725,18 +725,18 @@ private:
|
||||
Scalar Sw,
|
||||
const MaterialLawParams& matParams) const
|
||||
{
|
||||
typedef Opm::SimpleModularFluidState<Scalar,
|
||||
numPhases,
|
||||
numComponents,
|
||||
FluidSystem,
|
||||
/*storePressure=*/false,
|
||||
/*storeTemperature=*/false,
|
||||
/*storeComposition=*/false,
|
||||
/*storeFugacity=*/false,
|
||||
/*storeSaturation=*/true,
|
||||
/*storeDensity=*/false,
|
||||
/*storeViscosity=*/false,
|
||||
/*storeEnthalpy=*/false> SatOnlyFluidState;
|
||||
using SatOnlyFluidState = Opm::SimpleModularFluidState<Scalar,
|
||||
numPhases,
|
||||
numComponents,
|
||||
FluidSystem,
|
||||
/*storePressure=*/false,
|
||||
/*storeTemperature=*/false,
|
||||
/*storeComposition=*/false,
|
||||
/*storeFugacity=*/false,
|
||||
/*storeSaturation=*/true,
|
||||
/*storeDensity=*/false,
|
||||
/*storeViscosity=*/false,
|
||||
/*storeEnthalpy=*/false>;
|
||||
SatOnlyFluidState fluidState;
|
||||
fluidState.setSaturation(waterPhaseIdx, Sw);
|
||||
fluidState.setSaturation(oilPhaseIdx, So);
|
||||
|
@ -44,11 +44,11 @@ template<class TypeTag>
|
||||
class BlackOilProblem : public MultiPhaseBaseProblem<TypeTag>
|
||||
{
|
||||
private:
|
||||
typedef MultiPhaseBaseProblem<TypeTag> ParentType;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Problem) Implementation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
using ParentType = MultiPhaseBaseProblem<TypeTag>;
|
||||
using Implementation = GetPropType<TypeTag, Properties::Problem>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
|
@ -31,28 +31,36 @@
|
||||
|
||||
#include <opm/models/common/multiphasebaseproperties.hh>
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
//! Specifies if the simulation should write output files that are
|
||||
//! compatible with those produced by the commercial Eclipse simulator
|
||||
NEW_PROP_TAG(EnableEclipseOutput);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnableEclipseOutput { using type = UndefinedProperty; };
|
||||
//! Enable the ECL-blackoil extension for solvents. ("Second gas")
|
||||
NEW_PROP_TAG(EnableSolvent);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnableSolvent { using type = UndefinedProperty; };
|
||||
//! Enable the ECL-blackoil extension for polymer.
|
||||
NEW_PROP_TAG(EnablePolymer);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnablePolymer { using type = UndefinedProperty; };
|
||||
//! Enable the tracking polymer molecular weight tracking and related functionalities
|
||||
NEW_PROP_TAG(EnablePolymerMW);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnablePolymerMW { using type = UndefinedProperty; };
|
||||
//! Enable surface volume scaling
|
||||
NEW_PROP_TAG(BlackoilConserveSurfaceVolume);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct BlackoilConserveSurfaceVolume { using type = UndefinedProperty; };
|
||||
//! Enable the ECL-blackoil extension for foam
|
||||
NEW_PROP_TAG(EnableFoam);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnableFoam { using type = UndefinedProperty; };
|
||||
//! Enable the ECL-blackoil extension for salt
|
||||
NEW_PROP_TAG(EnableBrine);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnableBrine { using type = UndefinedProperty; };
|
||||
|
||||
|
||||
//! Allow the spatial and temporal domains to exhibit non-constant temperature
|
||||
//! in the black-oil model
|
||||
NEW_PROP_TAG(EnableTemperature);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnableTemperature { using type = UndefinedProperty; };
|
||||
|
||||
//! The relative weight of the residual of the energy equation compared to the mass
|
||||
//! residuals
|
||||
@ -61,9 +69,10 @@ NEW_PROP_TAG(EnableTemperature);
|
||||
//! of unmodified dune-istl linear solvers cannot weight the individual equations. if the
|
||||
//! energy equation is not scaled, its absolute value is normally several orders of
|
||||
//! magnitude larger than that of the mass balance equations
|
||||
NEW_PROP_TAG(BlackOilEnergyScalingFactor);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct BlackOilEnergyScalingFactor { using type = UndefinedProperty; };
|
||||
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
#endif
|
||||
|
@ -48,32 +48,32 @@ namespace Opm {
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class BlackOilRateVector
|
||||
: public Dune::FieldVector<typename GET_PROP_TYPE(TypeTag, Evaluation),
|
||||
GET_PROP_VALUE(TypeTag, NumEq)>
|
||||
: public Dune::FieldVector<GetPropType<TypeTag, Properties::Evaluation>,
|
||||
getPropValue<TypeTag, Properties::NumEq>()>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
|
||||
typedef BlackOilSolventModule<TypeTag> SolventModule;
|
||||
typedef BlackOilPolymerModule<TypeTag> PolymerModule;
|
||||
typedef BlackOilFoamModule<TypeTag> FoamModule;
|
||||
typedef BlackOilBrineModule<TypeTag> BrineModule;
|
||||
using SolventModule = BlackOilSolventModule<TypeTag>;
|
||||
using PolymerModule = BlackOilPolymerModule<TypeTag>;
|
||||
using FoamModule = BlackOilFoamModule<TypeTag>;
|
||||
using BrineModule = BlackOilBrineModule<TypeTag>;
|
||||
|
||||
enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) };
|
||||
enum { numComponents = GET_PROP_VALUE(TypeTag, NumComponents) };
|
||||
enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
|
||||
enum { numComponents = getPropValue<TypeTag, Properties::NumComponents>() };
|
||||
enum { conti0EqIdx = Indices::conti0EqIdx };
|
||||
enum { contiEnergyEqIdx = Indices::contiEnergyEqIdx };
|
||||
enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) };
|
||||
enum { enableSolvent = GET_PROP_VALUE(TypeTag, EnableSolvent) };
|
||||
enum { enablePolymer = GET_PROP_VALUE(TypeTag, EnablePolymer) };
|
||||
enum { enablePolymerMolarWeight = GET_PROP_VALUE(TypeTag, EnablePolymerMW) };
|
||||
enum { enableFoam = GET_PROP_VALUE(TypeTag, EnableFoam) };
|
||||
enum { enableBrine = GET_PROP_VALUE(TypeTag, EnableBrine) };
|
||||
enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
|
||||
enum { enableSolvent = getPropValue<TypeTag, Properties::EnableSolvent>() };
|
||||
enum { enablePolymer = getPropValue<TypeTag, Properties::EnablePolymer>() };
|
||||
enum { enablePolymerMolarWeight = getPropValue<TypeTag, Properties::EnablePolymerMW>() };
|
||||
enum { enableFoam = getPropValue<TypeTag, Properties::EnableFoam>() };
|
||||
enum { enableBrine = getPropValue<TypeTag, Properties::EnableBrine>() };
|
||||
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
typedef Dune::FieldVector<Evaluation, numEq> ParentType;
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
using ParentType = Dune::FieldVector<Evaluation, numEq>;
|
||||
|
||||
public:
|
||||
BlackOilRateVector() : ParentType()
|
||||
@ -93,7 +93,7 @@ public:
|
||||
ParentType::operator=(value);
|
||||
|
||||
// convert to "surface volume" if requested
|
||||
if (GET_PROP_VALUE(TypeTag, BlackoilConserveSurfaceVolume)) {
|
||||
if (getPropValue<TypeTag, Properties::BlackoilConserveSurfaceVolume>()) {
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
|
||||
(*this)[FluidSystem::gasCompIdx] /=
|
||||
FluidSystem::referenceDensity(FluidSystem::gasPhaseIdx, pvtRegionIdx);
|
||||
@ -146,7 +146,7 @@ public:
|
||||
}
|
||||
|
||||
// convert to "surface volume" if requested
|
||||
if (GET_PROP_VALUE(TypeTag, BlackoilConserveSurfaceVolume)) {
|
||||
if (getPropValue<TypeTag, Properties::BlackoilConserveSurfaceVolume>()) {
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
|
||||
(*this)[FluidSystem::gasCompIdx] /=
|
||||
FluidSystem::referenceDensity(FluidSystem::gasPhaseIdx, pvtRegionIdx);
|
||||
|
@ -62,33 +62,33 @@ namespace Opm {
|
||||
* \brief Contains the high level supplements required to extend the black oil
|
||||
* model by solvents.
|
||||
*/
|
||||
template <class TypeTag, bool enableSolventV = GET_PROP_VALUE(TypeTag, EnableSolvent)>
|
||||
template <class TypeTag, bool enableSolventV = getPropValue<TypeTag, Properties::EnableSolvent>()>
|
||||
class BlackOilSolventModule
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ExtensiveQuantities) ExtensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
using ExtensiveQuantities = GetPropType<TypeTag, Properties::ExtensiveQuantities>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using Model = GetPropType<TypeTag, Properties::Model>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
typedef Opm::SolventPvt<Scalar> SolventPvt;
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
using SolventPvt = Opm::SolventPvt<Scalar>;
|
||||
|
||||
typedef typename Opm::Tabulated1DFunction<Scalar> TabulatedFunction;
|
||||
using TabulatedFunction = typename Opm::Tabulated1DFunction<Scalar>;
|
||||
|
||||
static constexpr unsigned solventSaturationIdx = Indices::solventSaturationIdx;
|
||||
static constexpr unsigned contiSolventEqIdx = Indices::contiSolventEqIdx;
|
||||
static constexpr unsigned enableSolvent = enableSolventV;
|
||||
static constexpr unsigned numEq = GET_PROP_VALUE(TypeTag, NumEq);
|
||||
static constexpr unsigned numEq = getPropValue<TypeTag, Properties::NumEq>();
|
||||
static constexpr unsigned numPhases = FluidSystem::numPhases;
|
||||
static constexpr bool blackoilConserveSurfaceVolume = GET_PROP_VALUE(TypeTag, BlackoilConserveSurfaceVolume);
|
||||
static constexpr bool blackoilConserveSurfaceVolume = getPropValue<TypeTag, Properties::BlackoilConserveSurfaceVolume>();
|
||||
|
||||
|
||||
public:
|
||||
@ -866,22 +866,22 @@ BlackOilSolventModule<TypeTag, enableSolventV>::isMiscible_;
|
||||
* \brief Provides the volumetric quantities required for the equations needed by the
|
||||
* solvents extension of the black-oil model.
|
||||
*/
|
||||
template <class TypeTag, bool enableSolventV = GET_PROP_VALUE(TypeTag, EnableSolvent)>
|
||||
template <class TypeTag, bool enableSolventV = getPropValue<TypeTag, Properties::EnableSolvent>()>
|
||||
class BlackOilSolventIntensiveQuantities
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) Implementation;
|
||||
using Implementation = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
|
||||
typedef BlackOilSolventModule<TypeTag> SolventModule;
|
||||
using SolventModule = BlackOilSolventModule<TypeTag>;
|
||||
|
||||
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
|
||||
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
|
||||
static constexpr int solventSaturationIdx = Indices::solventSaturationIdx;
|
||||
static constexpr int oilPhaseIdx = FluidSystem::oilPhaseIdx;
|
||||
static constexpr int gasPhaseIdx = FluidSystem::gasPhaseIdx;
|
||||
@ -1265,9 +1265,9 @@ protected:
|
||||
template <class TypeTag>
|
||||
class BlackOilSolventIntensiveQuantities<TypeTag, false>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
|
||||
public:
|
||||
@ -1312,26 +1312,26 @@ public:
|
||||
* \brief Provides the solvent specific extensive quantities to the generic black-oil
|
||||
* module's extensive quantities.
|
||||
*/
|
||||
template <class TypeTag, bool enableSolventV = GET_PROP_VALUE(TypeTag, EnableSolvent)>
|
||||
template <class TypeTag, bool enableSolventV = getPropValue<TypeTag, Properties::EnableSolvent>()>
|
||||
class BlackOilSolventExtensiveQuantities
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ExtensiveQuantities) Implementation;
|
||||
using Implementation = GetPropType<TypeTag, Properties::ExtensiveQuantities>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ExtensiveQuantities) ExtensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
using ExtensiveQuantities = GetPropType<TypeTag, Properties::ExtensiveQuantities>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
|
||||
static constexpr unsigned gasPhaseIdx = FluidSystem::gasPhaseIdx;
|
||||
static constexpr int dimWorld = GridView::dimensionworld;
|
||||
|
||||
typedef Dune::FieldVector<Scalar, dimWorld> DimVector;
|
||||
typedef Dune::FieldVector<Evaluation, dimWorld> DimEvalVector;
|
||||
using DimVector = Dune::FieldVector<Scalar, dimWorld>;
|
||||
using DimEvalVector = Dune::FieldVector<Evaluation, dimWorld>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@ -1541,8 +1541,8 @@ private:
|
||||
template <class TypeTag>
|
||||
class BlackOilSolventExtensiveQuantities<TypeTag, false>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
|
||||
public:
|
||||
void updateVolumeFluxPerm(const ElementContext& elemCtx OPM_UNUSED,
|
||||
|
@ -60,9 +60,9 @@ class DarcyBaseProblem;
|
||||
template <class TypeTag>
|
||||
struct DarcyFluxModule
|
||||
{
|
||||
typedef DarcyIntensiveQuantities<TypeTag> FluxIntensiveQuantities;
|
||||
typedef DarcyExtensiveQuantities<TypeTag> FluxExtensiveQuantities;
|
||||
typedef DarcyBaseProblem<TypeTag> FluxBaseProblem;
|
||||
using FluxIntensiveQuantities = DarcyIntensiveQuantities<TypeTag>;
|
||||
using FluxExtensiveQuantities = DarcyExtensiveQuantities<TypeTag>;
|
||||
using FluxBaseProblem = DarcyBaseProblem<TypeTag>;
|
||||
|
||||
/*!
|
||||
* \brief Register all run-time parameters for the flux module.
|
||||
@ -87,7 +87,7 @@ class DarcyBaseProblem
|
||||
template <class TypeTag>
|
||||
class DarcyIntensiveQuantities
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
protected:
|
||||
void update_(const ElementContext& elemCtx OPM_UNUSED,
|
||||
unsigned dofIdx OPM_UNUSED,
|
||||
@ -114,22 +114,22 @@ protected:
|
||||
template <class TypeTag>
|
||||
class DarcyExtensiveQuantities
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ExtensiveQuantities) Implementation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using Implementation = GetPropType<TypeTag, Properties::ExtensiveQuantities>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
|
||||
enum { dimWorld = GridView::dimensionworld };
|
||||
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
|
||||
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
|
||||
|
||||
typedef typename Opm::MathToolbox<Evaluation> Toolbox;
|
||||
typedef typename FluidSystem::template ParameterCache<Evaluation> ParameterCache;
|
||||
typedef Dune::FieldVector<Evaluation, dimWorld> EvalDimVector;
|
||||
typedef Dune::FieldVector<Scalar, dimWorld> DimVector;
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
using Toolbox = typename Opm::MathToolbox<Evaluation>;
|
||||
using ParameterCache = typename FluidSystem::template ParameterCache<Evaluation>;
|
||||
using EvalDimVector = Dune::FieldVector<Evaluation, dimWorld>;
|
||||
using DimVector = Dune::FieldVector<Scalar, dimWorld>;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
|
@ -54,9 +54,9 @@ class DiffusionModule;
|
||||
template <class TypeTag>
|
||||
class DiffusionModule<TypeTag, /*enableDiffusion=*/false>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@ -83,17 +83,17 @@ public:
|
||||
template <class TypeTag>
|
||||
class DiffusionModule<TypeTag, /*enableDiffusion=*/true>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
|
||||
enum { numPhases = FluidSystem::numPhases };
|
||||
enum { numComponents = FluidSystem::numComponents };
|
||||
enum { conti0EqIdx = Indices::conti0EqIdx };
|
||||
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@ -147,9 +147,9 @@ class DiffusionIntensiveQuantities;
|
||||
template <class TypeTag>
|
||||
class DiffusionIntensiveQuantities<TypeTag, /*enableDiffusion=*/false>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@ -202,10 +202,10 @@ protected:
|
||||
template <class TypeTag>
|
||||
class DiffusionIntensiveQuantities<TypeTag, /*enableDiffusion=*/true>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
enum { numPhases = FluidSystem::numPhases };
|
||||
enum { numComponents = FluidSystem::numComponents };
|
||||
@ -244,7 +244,7 @@ protected:
|
||||
unsigned dofIdx,
|
||||
unsigned timeIdx)
|
||||
{
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
|
||||
const auto& intQuants = elemCtx.intensiveQuantities(dofIdx, timeIdx);
|
||||
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||
@ -292,9 +292,9 @@ class DiffusionExtensiveQuantities;
|
||||
template <class TypeTag>
|
||||
class DiffusionExtensiveQuantities<TypeTag, /*enableDiffusion=*/false>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
|
||||
protected:
|
||||
/*!
|
||||
@ -348,17 +348,17 @@ public:
|
||||
template <class TypeTag>
|
||||
class DiffusionExtensiveQuantities<TypeTag, /*enableDiffusion=*/true>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
|
||||
enum { dimWorld = GridView::dimensionworld };
|
||||
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
|
||||
enum { numComponents = GET_PROP_VALUE(TypeTag, NumComponents) };
|
||||
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
|
||||
enum { numComponents = getPropValue<TypeTag, Properties::NumComponents>() };
|
||||
|
||||
typedef Dune::FieldVector<Scalar, dimWorld> DimVector;
|
||||
typedef Dune::FieldVector<Evaluation, dimWorld> DimEvalVector;
|
||||
using DimVector = Dune::FieldVector<Scalar, dimWorld>;
|
||||
using DimEvalVector = Dune::FieldVector<Evaluation, dimWorld>;
|
||||
|
||||
protected:
|
||||
/*!
|
||||
|
@ -55,18 +55,18 @@ class EnergyModule;
|
||||
template <class TypeTag>
|
||||
class EnergyModule<TypeTag, /*enableEnergy=*/false>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ExtensiveQuantities) ExtensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using ExtensiveQuantities = GetPropType<TypeTag, Properties::ExtensiveQuantities>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
using Model = GetPropType<TypeTag, Properties::Model>;
|
||||
|
||||
enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) };
|
||||
enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
|
||||
|
||||
typedef Dune::FieldVector<Evaluation, numEq> EvalEqVector;
|
||||
using EvalEqVector = Dune::FieldVector<Evaluation, numEq>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@ -222,24 +222,24 @@ public:
|
||||
template <class TypeTag>
|
||||
class EnergyModule<TypeTag, /*enableEnergy=*/true>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ExtensiveQuantities) ExtensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
using ExtensiveQuantities = GetPropType<TypeTag, Properties::ExtensiveQuantities>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
using Model = GetPropType<TypeTag, Properties::Model>;
|
||||
|
||||
enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) };
|
||||
enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
|
||||
enum { numPhases = FluidSystem::numPhases };
|
||||
enum { energyEqIdx = Indices::energyEqIdx };
|
||||
enum { temperatureIdx = Indices::temperatureIdx };
|
||||
|
||||
typedef Dune::FieldVector<Evaluation, numEq> EvalEqVector;
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
using EvalEqVector = Dune::FieldVector<Evaluation, numEq>;
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@ -537,12 +537,12 @@ class EnergyIntensiveQuantities;
|
||||
template <class TypeTag>
|
||||
class EnergyIntensiveQuantities<TypeTag, /*enableEnergy=*/false>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@ -596,19 +596,19 @@ protected:
|
||||
template <class TypeTag>
|
||||
class EnergyIntensiveQuantities<TypeTag, /*enableEnergy=*/true>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ThermalConductionLaw) ThermalConductionLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, SolidEnergyLaw) SolidEnergyLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using ThermalConductionLaw = GetPropType<TypeTag, Properties::ThermalConductionLaw>;
|
||||
using SolidEnergyLaw = GetPropType<TypeTag, Properties::SolidEnergyLaw>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
|
||||
enum { numPhases = FluidSystem::numPhases };
|
||||
enum { energyEqIdx = Indices::energyEqIdx };
|
||||
enum { temperatureIdx = Indices::temperatureIdx };
|
||||
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
|
||||
protected:
|
||||
/*!
|
||||
@ -701,8 +701,8 @@ class EnergyExtensiveQuantities;
|
||||
template <class TypeTag>
|
||||
class EnergyExtensiveQuantities<TypeTag, /*enableEnergy=*/false>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
|
||||
protected:
|
||||
/*!
|
||||
@ -747,14 +747,14 @@ public:
|
||||
template <class TypeTag>
|
||||
class EnergyExtensiveQuantities<TypeTag, /*enableEnergy=*/true>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
|
||||
enum { dimWorld = GridView::dimensionworld };
|
||||
typedef Dune::FieldVector<Evaluation, dimWorld> EvalDimVector;
|
||||
typedef Dune::FieldVector<Scalar, dimWorld> DimVector;
|
||||
using EvalDimVector = Dune::FieldVector<Evaluation, dimWorld>;
|
||||
using DimVector = Dune::FieldVector<Scalar, dimWorld>;
|
||||
|
||||
protected:
|
||||
/*!
|
||||
|
@ -60,9 +60,9 @@ class ForchheimerBaseProblem;
|
||||
template <class TypeTag>
|
||||
struct ForchheimerFluxModule
|
||||
{
|
||||
typedef ForchheimerIntensiveQuantities<TypeTag> FluxIntensiveQuantities;
|
||||
typedef ForchheimerExtensiveQuantities<TypeTag> FluxExtensiveQuantities;
|
||||
typedef ForchheimerBaseProblem<TypeTag> FluxBaseProblem;
|
||||
using FluxIntensiveQuantities = ForchheimerIntensiveQuantities<TypeTag>;
|
||||
using FluxExtensiveQuantities = ForchheimerExtensiveQuantities<TypeTag>;
|
||||
using FluxBaseProblem = ForchheimerBaseProblem<TypeTag>;
|
||||
|
||||
/*!
|
||||
* \brief Register all run-time parameters for the flux module.
|
||||
@ -79,8 +79,8 @@ struct ForchheimerFluxModule
|
||||
template <class TypeTag>
|
||||
class ForchheimerBaseProblem
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@ -128,11 +128,11 @@ public:
|
||||
template <class TypeTag>
|
||||
class ForchheimerIntensiveQuantities
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
|
||||
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
|
||||
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
|
||||
|
||||
public:
|
||||
/*!
|
||||
@ -213,24 +213,24 @@ template <class TypeTag>
|
||||
class ForchheimerExtensiveQuantities
|
||||
: public DarcyExtensiveQuantities<TypeTag>
|
||||
{
|
||||
typedef DarcyExtensiveQuantities<TypeTag> DarcyExtQuants;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ExtensiveQuantities) Implementation;
|
||||
using DarcyExtQuants = DarcyExtensiveQuantities<TypeTag>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using Implementation = GetPropType<TypeTag, Properties::ExtensiveQuantities>;
|
||||
|
||||
enum { dimWorld = GridView::dimensionworld };
|
||||
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
|
||||
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
|
||||
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
|
||||
typedef Dune::FieldVector<Scalar, dimWorld> DimVector;
|
||||
typedef Dune::FieldVector<Evaluation, dimWorld> DimEvalVector;
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
typedef Dune::FieldMatrix<Evaluation, dimWorld, dimWorld> DimEvalMatrix;
|
||||
using DimVector = Dune::FieldVector<Scalar, dimWorld>;
|
||||
using DimEvalVector = Dune::FieldVector<Evaluation, dimWorld>;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
using DimEvalMatrix = Dune::FieldMatrix<Evaluation, dimWorld, dimWorld>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
|
@ -48,18 +48,18 @@ namespace Opm {
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class MultiPhaseBaseExtensiveQuantities
|
||||
: public GET_PROP_TYPE(TypeTag, DiscExtensiveQuantities)
|
||||
, public GET_PROP_TYPE(TypeTag, FluxModule)::FluxExtensiveQuantities
|
||||
: public GetPropType<TypeTag, Properties::DiscExtensiveQuantities>
|
||||
, public GetPropType<TypeTag, Properties::FluxModule>::FluxExtensiveQuantities
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, DiscExtensiveQuantities) ParentType;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using ParentType = GetPropType<TypeTag, Properties::DiscExtensiveQuantities>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
|
||||
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluxModule) FluxModule;
|
||||
typedef typename FluxModule::FluxExtensiveQuantities FluxExtensiveQuantities;
|
||||
using FluxModule = GetPropType<TypeTag, Properties::FluxModule>;
|
||||
using FluxExtensiveQuantities = typename FluxModule::FluxExtensiveQuantities;
|
||||
|
||||
public:
|
||||
/*!
|
||||
|
@ -50,82 +50,97 @@ template <class TypeTag>
|
||||
class MultiPhaseBaseModel;
|
||||
}
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
//! The generic type tag for problems using the immiscible multi-phase model
|
||||
NEW_TYPE_TAG(MultiPhaseBaseModel, INHERITS_FROM(VtkMultiPhase, VtkTemperature));
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct MultiPhaseBaseModel { using InheritsFrom = std::tuple<VtkTemperature, VtkMultiPhase>; };
|
||||
} // end namespace TTag
|
||||
|
||||
//! Specify the splices of the MultiPhaseBaseModel type tag
|
||||
SET_SPLICES(MultiPhaseBaseModel, SpatialDiscretizationSplice);
|
||||
template<class TypeTag>
|
||||
struct Splices<TypeTag, TTag::MultiPhaseBaseModel>
|
||||
{
|
||||
using type = std::tuple<GetSplicePropType<TypeTag, TTag::MultiPhaseBaseModel, Properties::SpatialDiscretizationSplice>>;
|
||||
};
|
||||
|
||||
//! Set the default spatial discretization
|
||||
//!
|
||||
//! We use a vertex centered finite volume method by default
|
||||
SET_TAG_PROP(MultiPhaseBaseModel, SpatialDiscretizationSplice, VcfvDiscretization);
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::MultiPhaseBaseModel> { using type = TTag::VcfvDiscretization; };
|
||||
|
||||
//! set the number of equations to the number of phases
|
||||
SET_INT_PROP(MultiPhaseBaseModel, NumEq, GET_PROP_TYPE(TypeTag, Indices)::numEq);
|
||||
template<class TypeTag>
|
||||
struct NumEq<TypeTag, TTag::MultiPhaseBaseModel> { static constexpr int value = GetPropType<TypeTag, Properties::Indices>::numEq; };
|
||||
//! The number of phases is determined by the fluid system
|
||||
SET_INT_PROP(MultiPhaseBaseModel, NumPhases, GET_PROP_TYPE(TypeTag, FluidSystem)::numPhases);
|
||||
template<class TypeTag>
|
||||
struct NumPhases<TypeTag, TTag::MultiPhaseBaseModel> { static constexpr int value = GetPropType<TypeTag, Properties::FluidSystem>::numPhases; };
|
||||
//! Number of chemical species in the system
|
||||
SET_INT_PROP(MultiPhaseBaseModel, NumComponents, GET_PROP_TYPE(TypeTag, FluidSystem)::numComponents);
|
||||
template<class TypeTag>
|
||||
struct NumComponents<TypeTag, TTag::MultiPhaseBaseModel> { static constexpr int value = GetPropType<TypeTag, Properties::FluidSystem>::numComponents; };
|
||||
|
||||
//! The type of the base base class for actual problems
|
||||
SET_TYPE_PROP(MultiPhaseBaseModel, BaseProblem, Opm::MultiPhaseBaseProblem<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct BaseProblem<TypeTag, TTag::MultiPhaseBaseModel> { using type = Opm::MultiPhaseBaseProblem<TypeTag>; };
|
||||
|
||||
//! By default, use the Darcy relation to determine the phase velocity
|
||||
SET_TYPE_PROP(MultiPhaseBaseModel, FluxModule, Opm::DarcyFluxModule<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct FluxModule<TypeTag, TTag::MultiPhaseBaseModel> { using type = Opm::DarcyFluxModule<TypeTag>; };
|
||||
|
||||
/*!
|
||||
* \brief Set the material law to the null law by default.
|
||||
*/
|
||||
SET_PROP(MultiPhaseBaseModel, MaterialLaw)
|
||||
template<class TypeTag>
|
||||
struct MaterialLaw<TypeTag, TTag::MultiPhaseBaseModel>
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef Opm::NullMaterialTraits<Scalar, FluidSystem::numPhases> Traits;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using Traits = Opm::NullMaterialTraits<Scalar, FluidSystem::numPhases>;
|
||||
|
||||
public:
|
||||
typedef Opm::NullMaterial<Traits> type;
|
||||
using type = Opm::NullMaterial<Traits>;
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Set the property for the material parameters by extracting
|
||||
* it from the material law.
|
||||
*/
|
||||
SET_TYPE_PROP(MultiPhaseBaseModel,
|
||||
MaterialLawParams,
|
||||
typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params);
|
||||
template<class TypeTag>
|
||||
struct MaterialLawParams<TypeTag, TTag::MultiPhaseBaseModel>
|
||||
{ using type = typename GetPropType<TypeTag, Properties::MaterialLaw>::Params; };
|
||||
|
||||
//! set the energy storage law for the solid to the one which assumes zero heat capacity
|
||||
//! by default
|
||||
SET_TYPE_PROP(MultiPhaseBaseModel,
|
||||
SolidEnergyLaw,
|
||||
Opm::NullSolidEnergyLaw<typename GET_PROP_TYPE(TypeTag, Scalar)>);
|
||||
template<class TypeTag>
|
||||
struct SolidEnergyLaw<TypeTag, TTag::MultiPhaseBaseModel>
|
||||
{ using type = Opm::NullSolidEnergyLaw<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
//! extract the type of the parameter objects for the solid energy storage law from the
|
||||
//! law itself
|
||||
SET_TYPE_PROP(MultiPhaseBaseModel,
|
||||
SolidEnergyLawParams,
|
||||
typename GET_PROP_TYPE(TypeTag, SolidEnergyLaw)::Params);
|
||||
template<class TypeTag>
|
||||
struct SolidEnergyLawParams<TypeTag, TTag::MultiPhaseBaseModel>
|
||||
{ using type = typename GetPropType<TypeTag, Properties::SolidEnergyLaw>::Params; };
|
||||
|
||||
//! set the thermal conduction law to a dummy one by default
|
||||
SET_TYPE_PROP(MultiPhaseBaseModel,
|
||||
ThermalConductionLaw,
|
||||
Opm::NullThermalConductionLaw<typename GET_PROP_TYPE(TypeTag, Scalar)>);
|
||||
template<class TypeTag>
|
||||
struct ThermalConductionLaw<TypeTag, TTag::MultiPhaseBaseModel>
|
||||
{ using type = Opm::NullThermalConductionLaw<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
//! extract the type of the parameter objects for the thermal conduction law from the law
|
||||
//! itself
|
||||
SET_TYPE_PROP(MultiPhaseBaseModel,
|
||||
ThermalConductionLawParams,
|
||||
typename GET_PROP_TYPE(TypeTag, ThermalConductionLaw)::Params);
|
||||
template<class TypeTag>
|
||||
struct ThermalConductionLawParams<TypeTag, TTag::MultiPhaseBaseModel>
|
||||
{ using type = typename GetPropType<TypeTag, Properties::ThermalConductionLaw>::Params; };
|
||||
|
||||
//! disable gravity by default
|
||||
SET_BOOL_PROP(MultiPhaseBaseModel, EnableGravity, false);
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::MultiPhaseBaseModel> { static constexpr bool value = false; };
|
||||
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@ -135,23 +150,23 @@ namespace Opm {
|
||||
* which assume multiple fluid phases.
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class MultiPhaseBaseModel : public GET_PROP_TYPE(TypeTag, Discretization)
|
||||
class MultiPhaseBaseModel : public GetPropType<TypeTag, Properties::Discretization>
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Discretization) ParentType;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Implementation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ThreadManager) ThreadManager;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
using ParentType = GetPropType<TypeTag, Properties::Discretization>;
|
||||
using Implementation = GetPropType<TypeTag, Properties::Model>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using ThreadManager = GetPropType<TypeTag, Properties::ThreadManager>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
|
||||
typedef typename GridView::template Codim<0>::Iterator ElementIterator;
|
||||
typedef typename GridView::template Codim<0>::Entity Element;
|
||||
using ElementIterator = typename GridView::template Codim<0>::Iterator;
|
||||
using Element = typename GridView::template Codim<0>::Entity;
|
||||
|
||||
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
|
||||
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
|
||||
enum { numComponents = FluidSystem::numComponents };
|
||||
|
||||
public:
|
||||
|
@ -52,25 +52,25 @@ namespace Opm {
|
||||
template<class TypeTag>
|
||||
class MultiPhaseBaseProblem
|
||||
: public FvBaseProblem<TypeTag>
|
||||
, public GET_PROP_TYPE(TypeTag, FluxModule)::FluxBaseProblem
|
||||
, public GetPropType<TypeTag, Properties::FluxModule>::FluxBaseProblem
|
||||
{
|
||||
//! \cond SKIP_THIS
|
||||
typedef Opm::FvBaseProblem<TypeTag> ParentType;
|
||||
using ParentType = Opm::FvBaseProblem<TypeTag>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Problem) Implementation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, SolidEnergyLawParams) SolidEnergyLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ThermalConductionLawParams) ThermalConductionLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params MaterialLawParams;
|
||||
using Implementation = GetPropType<TypeTag, Properties::Problem>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using SolidEnergyLawParams = GetPropType<TypeTag, Properties::SolidEnergyLawParams>;
|
||||
using ThermalConductionLawParams = GetPropType<TypeTag, Properties::ThermalConductionLawParams>;
|
||||
using MaterialLawParams = typename GetPropType<TypeTag, Properties::MaterialLaw>::Params;
|
||||
|
||||
enum { dimWorld = GridView::dimensionworld };
|
||||
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
|
||||
typedef Dune::FieldVector<Scalar, dimWorld> DimVector;
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
|
||||
using DimVector = Dune::FieldVector<Scalar, dimWorld>;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
//! \endcond
|
||||
|
||||
public:
|
||||
@ -306,7 +306,7 @@ public:
|
||||
*/
|
||||
unsigned markForGridAdaptation()
|
||||
{
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
|
||||
unsigned numMarked = 0;
|
||||
ElementContext elemCtx( this->simulator() );
|
||||
|
@ -32,40 +32,55 @@
|
||||
|
||||
#include <opm/models/utils/basicproperties.hh>
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
//! The splice to be used for the spatial discretization
|
||||
NEW_PROP_TAG(SpatialDiscretizationSplice);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct SpatialDiscretizationSplice { using type = UndefinedProperty; };
|
||||
//! Number of fluid phases in the system
|
||||
NEW_PROP_TAG(NumPhases);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct NumPhases { using type = UndefinedProperty; };
|
||||
//! Number of chemical species in the system
|
||||
NEW_PROP_TAG(NumComponents);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct NumComponents { using type = UndefinedProperty; };
|
||||
//! Enumerations used by the model
|
||||
NEW_PROP_TAG(Indices);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct Indices { using type = UndefinedProperty; };
|
||||
//! The material law which ought to be used (extracted from the spatial parameters)
|
||||
NEW_PROP_TAG(MaterialLaw);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct MaterialLaw { using type = UndefinedProperty; };
|
||||
//! The context material law (extracted from the spatial parameters)
|
||||
NEW_PROP_TAG(MaterialLawParams);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct MaterialLawParams { using type = UndefinedProperty; };
|
||||
//! The material law for the energy stored in the solid matrix
|
||||
NEW_PROP_TAG(SolidEnergyLaw);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct SolidEnergyLaw { using type = UndefinedProperty; };
|
||||
//! The parameters of the material law for energy storage of the solid
|
||||
NEW_PROP_TAG(SolidEnergyLawParams);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct SolidEnergyLawParams { using type = UndefinedProperty; };
|
||||
//! The material law for thermal conduction
|
||||
NEW_PROP_TAG(ThermalConductionLaw);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct ThermalConductionLaw { using type = UndefinedProperty; };
|
||||
//! The parameters of the material law for thermal conduction
|
||||
NEW_PROP_TAG(ThermalConductionLawParams);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct ThermalConductionLawParams { using type = UndefinedProperty; };
|
||||
//!The fluid systems including the information about the phases
|
||||
NEW_PROP_TAG(FluidSystem);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct FluidSystem { using type = UndefinedProperty; };
|
||||
//! Specifies the relation used for velocity
|
||||
NEW_PROP_TAG(FluxModule);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct FluxModule { using type = UndefinedProperty; };
|
||||
|
||||
//! Specify whether energy should be considered as a conservation quantity or not
|
||||
NEW_PROP_TAG(EnableEnergy);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnableEnergy { using type = UndefinedProperty; };
|
||||
//! Returns whether gravity is considered in the problem
|
||||
NEW_PROP_TAG(EnableGravity);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnableGravity { using type = UndefinedProperty; };
|
||||
//! Enable diffusive fluxes?
|
||||
NEW_PROP_TAG(EnableDiffusion);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnableDiffusion { using type = UndefinedProperty; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
#endif
|
||||
|
@ -46,15 +46,15 @@ namespace Opm {
|
||||
template <class TypeTag>
|
||||
class TemperatureCallback
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
|
||||
typedef decltype(std::declval<IntensiveQuantities>().fluidState()) IQFluidState;
|
||||
typedef decltype(std::declval<IQFluidState>().temperature(0)) ResultRawType;
|
||||
using IQFluidState = decltype(std::declval<IntensiveQuantities>().fluidState());
|
||||
using ResultRawType = decltype(std::declval<IQFluidState>().temperature(0));
|
||||
|
||||
public:
|
||||
typedef typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type ResultType;
|
||||
typedef typename Opm::MathToolbox<ResultType>::ValueType ResultValueType;
|
||||
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
|
||||
using ResultValueType = typename Opm::MathToolbox<ResultType>::ValueType;
|
||||
|
||||
TemperatureCallback(const ElementContext& elemCtx)
|
||||
: elemCtx_(elemCtx)
|
||||
@ -82,15 +82,15 @@ private:
|
||||
template <class TypeTag>
|
||||
class PressureCallback
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
|
||||
typedef decltype(std::declval<IntensiveQuantities>().fluidState()) IQFluidState;
|
||||
typedef decltype(std::declval<IQFluidState>().pressure(0)) ResultRawType;
|
||||
using IQFluidState = decltype(std::declval<IntensiveQuantities>().fluidState());
|
||||
using ResultRawType = decltype(std::declval<IQFluidState>().pressure(0));
|
||||
|
||||
public:
|
||||
typedef typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type ResultType;
|
||||
typedef typename Opm::MathToolbox<ResultType>::ValueType ResultValueType;
|
||||
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
|
||||
using ResultValueType = typename Opm::MathToolbox<ResultType>::ValueType;
|
||||
|
||||
PressureCallback(const ElementContext& elemCtx)
|
||||
: elemCtx_(elemCtx)
|
||||
@ -131,17 +131,17 @@ private:
|
||||
template <class TypeTag, class FluidState>
|
||||
class BoundaryPressureCallback
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
|
||||
typedef decltype(std::declval<IntensiveQuantities>().fluidState()) IQRawFluidState;
|
||||
typedef typename std::remove_const<typename std::remove_reference<IQRawFluidState>::type>::type IQFluidState;
|
||||
typedef typename IQFluidState::Scalar IQScalar;
|
||||
typedef Opm::MathToolbox<IQScalar> Toolbox;
|
||||
using IQRawFluidState = decltype(std::declval<IntensiveQuantities>().fluidState());
|
||||
using IQFluidState = typename std::remove_const<typename std::remove_reference<IQRawFluidState>::type>::type;
|
||||
using IQScalar = typename IQFluidState::Scalar;
|
||||
using Toolbox = Opm::MathToolbox<IQScalar>;
|
||||
|
||||
public:
|
||||
typedef IQScalar ResultType;
|
||||
using ResultType = IQScalar;
|
||||
|
||||
BoundaryPressureCallback(const ElementContext& elemCtx, const FluidState& boundaryFs)
|
||||
: elemCtx_(elemCtx)
|
||||
@ -193,15 +193,15 @@ private:
|
||||
template <class TypeTag>
|
||||
class DensityCallback
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
|
||||
typedef decltype(std::declval<IntensiveQuantities>().fluidState()) IQFluidState;
|
||||
typedef decltype(std::declval<IQFluidState>().density(0)) ResultRawType;
|
||||
using IQFluidState = decltype(std::declval<IntensiveQuantities>().fluidState());
|
||||
using ResultRawType = decltype(std::declval<IQFluidState>().density(0));
|
||||
|
||||
public:
|
||||
typedef typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type ResultType;
|
||||
typedef typename Opm::MathToolbox<ResultType>::ValueType ResultValueType;
|
||||
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
|
||||
using ResultValueType = typename Opm::MathToolbox<ResultType>::ValueType;
|
||||
|
||||
DensityCallback(const ElementContext& elemCtx)
|
||||
: elemCtx_(elemCtx)
|
||||
@ -242,14 +242,14 @@ private:
|
||||
template <class TypeTag>
|
||||
class MolarDensityCallback
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
|
||||
typedef decltype(std::declval<IntensiveQuantities>().fluidState()) IQFluidState;
|
||||
using IQFluidState = decltype(std::declval<IntensiveQuantities>().fluidState());
|
||||
|
||||
public:
|
||||
typedef decltype(std::declval<IQFluidState>().molarDensity(0)) ResultType;
|
||||
typedef typename Opm::MathToolbox<ResultType>::ValueType ResultValueType;
|
||||
using ResultType = decltype(std::declval<IQFluidState>().molarDensity(0));
|
||||
using ResultValueType = typename Opm::MathToolbox<ResultType>::ValueType;
|
||||
|
||||
MolarDensityCallback(const ElementContext& elemCtx)
|
||||
: elemCtx_(elemCtx)
|
||||
@ -290,15 +290,15 @@ private:
|
||||
template <class TypeTag>
|
||||
class ViscosityCallback
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
|
||||
typedef decltype(std::declval<IntensiveQuantities>().fluidState()) IQFluidState;
|
||||
typedef decltype(std::declval<IQFluidState>().viscosity(0)) ResultRawType;
|
||||
using IQFluidState = decltype(std::declval<IntensiveQuantities>().fluidState());
|
||||
using ResultRawType = decltype(std::declval<IQFluidState>().viscosity(0));
|
||||
|
||||
public:
|
||||
typedef typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type ResultType;
|
||||
typedef typename Opm::MathToolbox<ResultType>::ValueType ResultValueType;
|
||||
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
|
||||
using ResultValueType = typename Opm::MathToolbox<ResultType>::ValueType;
|
||||
|
||||
ViscosityCallback(const ElementContext& elemCtx)
|
||||
: elemCtx_(elemCtx)
|
||||
@ -339,18 +339,18 @@ private:
|
||||
template <class TypeTag>
|
||||
class VelocityCallback
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
|
||||
typedef decltype(IntensiveQuantities().velocityCenter()) ResultRawType;
|
||||
using ResultRawType = decltype(IntensiveQuantities().velocityCenter());
|
||||
|
||||
enum { dim = GridView::dimensionworld };
|
||||
|
||||
public:
|
||||
typedef typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type ResultType;
|
||||
typedef typename ResultType::field_type ResultFieldType;
|
||||
typedef typename Opm::MathToolbox<ResultFieldType>::ValueType ResultFieldValueType;
|
||||
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
|
||||
using ResultFieldType = typename ResultType::field_type;
|
||||
using ResultFieldValueType = typename Opm::MathToolbox<ResultFieldType>::ValueType;
|
||||
|
||||
VelocityCallback(const ElementContext& elemCtx)
|
||||
: elemCtx_(elemCtx)
|
||||
@ -375,14 +375,14 @@ private:
|
||||
template <class TypeTag>
|
||||
class VelocityComponentCallback
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
|
||||
typedef decltype(IntensiveQuantities().velocityCenter()[0]) ResultRawType;
|
||||
using ResultRawType = decltype(IntensiveQuantities().velocityCenter()[0]);
|
||||
|
||||
public:
|
||||
typedef typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type ResultType;
|
||||
typedef typename Opm::MathToolbox<ResultType>::ValueType ResultValueType;
|
||||
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
|
||||
using ResultValueType = typename Opm::MathToolbox<ResultType>::ValueType;
|
||||
|
||||
VelocityComponentCallback(const ElementContext& elemCtx)
|
||||
: elemCtx_(elemCtx)
|
||||
@ -423,15 +423,15 @@ private:
|
||||
template <class TypeTag>
|
||||
class MoleFractionCallback
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
|
||||
typedef decltype(std::declval<IntensiveQuantities>().fluidState()) IQFluidState;
|
||||
typedef decltype(std::declval<IQFluidState>().moleFraction(0, 0)) ResultRawType;
|
||||
using IQFluidState = decltype(std::declval<IntensiveQuantities>().fluidState());
|
||||
using ResultRawType = decltype(std::declval<IQFluidState>().moleFraction(0, 0));
|
||||
|
||||
public:
|
||||
typedef typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type ResultType;
|
||||
typedef typename Opm::MathToolbox<ResultType>::ValueType ResultValueType;
|
||||
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
|
||||
using ResultValueType = typename Opm::MathToolbox<ResultType>::ValueType;
|
||||
|
||||
MoleFractionCallback(const ElementContext& elemCtx)
|
||||
: elemCtx_(elemCtx)
|
||||
|
@ -44,18 +44,18 @@ namespace Opm {
|
||||
template <class TypeTag>
|
||||
class DiscreteFractureExtensiveQuantities : public ImmiscibleExtensiveQuantities<TypeTag>
|
||||
{
|
||||
typedef ImmiscibleExtensiveQuantities<TypeTag> ParentType;
|
||||
using ParentType = ImmiscibleExtensiveQuantities<TypeTag>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
enum { dimWorld = GridView::dimensionworld };
|
||||
enum { numPhases = FluidSystem::numPhases };
|
||||
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
typedef Dune::FieldVector<Scalar, dimWorld> DimVector;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
using DimVector = Dune::FieldVector<Scalar, dimWorld>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
|
@ -47,12 +47,12 @@ namespace Opm {
|
||||
template <class TypeTag>
|
||||
class DiscreteFractureIntensiveQuantities : public ImmiscibleIntensiveQuantities<TypeTag>
|
||||
{
|
||||
typedef ImmiscibleIntensiveQuantities<TypeTag> ParentType;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
using ParentType = ImmiscibleIntensiveQuantities<TypeTag>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
|
||||
enum { numPhases = FluidSystem::numPhases };
|
||||
enum { dimWorld = GridView::dimensionworld };
|
||||
@ -62,12 +62,12 @@ class DiscreteFractureIntensiveQuantities : public ImmiscibleIntensiveQuantities
|
||||
static_assert(numPhases == 2, "The fracture module currently is only "
|
||||
"implemented for two fluid phases!");
|
||||
|
||||
enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) };
|
||||
enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
|
||||
enum { wettingPhaseIdx = MaterialLaw::wettingPhaseIdx };
|
||||
enum { nonWettingPhaseIdx = MaterialLaw::nonWettingPhaseIdx };
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
typedef Opm::ImmiscibleFluidState<Scalar, FluidSystem,
|
||||
/*storeEnthalpy=*/enableEnergy> FluidState;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
using FluidState = Opm::ImmiscibleFluidState<Scalar, FluidSystem,
|
||||
/*storeEnthalpy=*/enableEnergy>;
|
||||
|
||||
public:
|
||||
DiscreteFractureIntensiveQuantities()
|
||||
|
@ -41,19 +41,19 @@ namespace Opm {
|
||||
template <class TypeTag>
|
||||
class DiscreteFractureLocalResidual : public ImmiscibleLocalResidual<TypeTag>
|
||||
{
|
||||
typedef ImmiscibleLocalResidual<TypeTag> ParentType;
|
||||
using ParentType = ImmiscibleLocalResidual<TypeTag>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
enum { conti0EqIdx = Indices::conti0EqIdx };
|
||||
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
|
||||
enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) };
|
||||
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
|
||||
enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
|
||||
|
||||
typedef Opm::EnergyModule<TypeTag, enableEnergy> EnergyModule;
|
||||
using EnergyModule = Opm::EnergyModule<TypeTag, enableEnergy>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
|
@ -49,48 +49,60 @@ template <class TypeTag>
|
||||
class DiscreteFractureModel;
|
||||
}
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
//! The generic type tag for problems using the immiscible multi-phase model
|
||||
NEW_TYPE_TAG(DiscreteFractureModel, INHERITS_FROM(ImmiscibleTwoPhaseModel, VtkDiscreteFracture));
|
||||
struct DiscreteFractureModel { using InheritsFrom = std::tuple<VtkDiscreteFracture, ImmiscibleTwoPhaseModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
//! The class for the model
|
||||
SET_TYPE_PROP(DiscreteFractureModel, Model, Opm::DiscreteFractureModel<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Model<TypeTag, TTag::DiscreteFractureModel> { using type = Opm::DiscreteFractureModel<TypeTag>; };
|
||||
|
||||
//! The class for the model
|
||||
SET_TYPE_PROP(DiscreteFractureModel, BaseProblem, Opm::DiscreteFractureProblem<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct BaseProblem<TypeTag, TTag::DiscreteFractureModel> { using type = Opm::DiscreteFractureProblem<TypeTag>; };
|
||||
|
||||
//! Use the immiscible multi-phase local jacobian operator for the immiscible multi-phase model
|
||||
SET_TYPE_PROP(DiscreteFractureModel, LocalResidual, Opm::DiscreteFractureLocalResidual<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct LocalResidual<TypeTag, TTag::DiscreteFractureModel> { using type = Opm::DiscreteFractureLocalResidual<TypeTag>; };
|
||||
|
||||
// The type of the base base class for actual problems.
|
||||
// TODO!?
|
||||
//SET_TYPE_PROP(DiscreteFractureModel BaseProblem, DiscreteFractureBaseProblem<TypeTag>);
|
||||
// template<class TypeTag>
|
||||
// struct BaseProblem<TypeTag, TTag::DiscreteFractureModel> { using type = DiscreteFractureBaseProblem<TypeTag>; };
|
||||
|
||||
//! the PrimaryVariables property
|
||||
SET_TYPE_PROP(DiscreteFractureModel, PrimaryVariables,
|
||||
Opm::DiscreteFracturePrimaryVariables<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct PrimaryVariables<TypeTag, TTag::DiscreteFractureModel>
|
||||
{ using type = Opm::DiscreteFracturePrimaryVariables<TypeTag>; };
|
||||
|
||||
//! the IntensiveQuantities property
|
||||
SET_TYPE_PROP(DiscreteFractureModel, IntensiveQuantities,
|
||||
Opm::DiscreteFractureIntensiveQuantities<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct IntensiveQuantities<TypeTag, TTag::DiscreteFractureModel>
|
||||
{ using type = Opm::DiscreteFractureIntensiveQuantities<TypeTag>; };
|
||||
|
||||
//! the ExtensiveQuantities property
|
||||
SET_TYPE_PROP(DiscreteFractureModel, ExtensiveQuantities,
|
||||
Opm::DiscreteFractureExtensiveQuantities<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct ExtensiveQuantities<TypeTag, TTag::DiscreteFractureModel>
|
||||
{ using type = Opm::DiscreteFractureExtensiveQuantities<TypeTag>; };
|
||||
|
||||
//! For the discrete fracture model, we need to use two-point flux approximation or it
|
||||
//! will converge very poorly
|
||||
SET_BOOL_PROP(DiscreteFractureModel, UseTwoPointGradients, true);
|
||||
template<class TypeTag>
|
||||
struct UseTwoPointGradients<TypeTag, TTag::DiscreteFractureModel> { static constexpr bool value = true; };
|
||||
|
||||
// The intensive quantity cache cannot be used by the discrete fracture model, because
|
||||
// the intensive quantities of a control degree of freedom are not identical to the
|
||||
// intensive quantities of the other intensive quantities of the same of the same degree
|
||||
// of freedom. This is because the fracture properties (volume, permeability, etc) are
|
||||
// specific for each...
|
||||
SET_BOOL_PROP(DiscreteFractureModel, EnableIntensiveQuantityCache, false);
|
||||
template<class TypeTag>
|
||||
struct EnableIntensiveQuantityCache<TypeTag, TTag::DiscreteFractureModel> { static constexpr bool value = false; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@ -114,8 +126,8 @@ namespace Opm {
|
||||
template <class TypeTag>
|
||||
class DiscreteFractureModel : public ImmiscibleModel<TypeTag>
|
||||
{
|
||||
typedef ImmiscibleModel<TypeTag> ParentType;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
using ParentType = ImmiscibleModel<TypeTag>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
|
||||
public:
|
||||
DiscreteFractureModel(Simulator& simulator)
|
||||
|
@ -43,13 +43,13 @@ template <class TypeTag>
|
||||
class DiscreteFracturePrimaryVariables
|
||||
: public ImmisciblePrimaryVariables<TypeTag>
|
||||
{
|
||||
typedef ImmisciblePrimaryVariables<TypeTag> ParentType;
|
||||
using ParentType = ImmisciblePrimaryVariables<TypeTag>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
|
||||
using MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>;
|
||||
|
||||
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
|
||||
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
|
||||
|
||||
public:
|
||||
/*!
|
||||
|
@ -50,15 +50,15 @@ template<class TypeTag>
|
||||
class DiscreteFractureProblem
|
||||
: public MultiPhaseBaseProblem<TypeTag>
|
||||
{
|
||||
typedef Opm::MultiPhaseBaseProblem<TypeTag> ParentType;
|
||||
using ParentType = Opm::MultiPhaseBaseProblem<TypeTag>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Problem) Implementation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
using Implementation = GetPropType<TypeTag, Properties::Problem>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
|
||||
enum { dimWorld = GridView::dimensionworld };
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
|
@ -34,10 +34,11 @@
|
||||
|
||||
#include <opm/models/io/vtkdiscretefracturemodule.hh>
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_PROP_TAG(UseTwoPointGradients);
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct UseTwoPointGradients { using type = UndefinedProperty; };
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
#endif
|
||||
|
@ -34,11 +34,11 @@
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties::Tag {
|
||||
|
||||
NEW_TYPE_TAG(AuxModule);
|
||||
struct AuxModule {};
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties::TTag
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@ -53,13 +53,13 @@ namespace Opm {
|
||||
template <class TypeTag>
|
||||
class BaseAuxiliaryModule
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GlobalEqVector) GlobalEqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, SparseMatrixAdapter) SparseMatrixAdapter;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using GlobalEqVector = GetPropType<TypeTag, Properties::GlobalEqVector>;
|
||||
using SparseMatrixAdapter = GetPropType<TypeTag, Properties::SparseMatrixAdapter>;
|
||||
|
||||
protected:
|
||||
typedef std::set<unsigned> NeighborSet;
|
||||
using NeighborSet = std::set<unsigned>;
|
||||
|
||||
public:
|
||||
virtual ~BaseAuxiliaryModule()
|
||||
|
@ -46,29 +46,33 @@ template<class TypeTag>
|
||||
class FvBaseAdLocalLinearizer;
|
||||
}
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
namespace Opm::Properties {
|
||||
|
||||
// declare the property tags required for the finite differences local linearizer
|
||||
NEW_TYPE_TAG(AutoDiffLocalLinearizer);
|
||||
|
||||
namespace TTag {
|
||||
struct AutoDiffLocalLinearizer {};
|
||||
} // namespace TTag
|
||||
|
||||
// set the properties to be spliced in
|
||||
SET_TYPE_PROP(AutoDiffLocalLinearizer, LocalLinearizer,
|
||||
Opm::FvBaseAdLocalLinearizer<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct LocalLinearizer<TypeTag, TTag::AutoDiffLocalLinearizer>
|
||||
{ using type = Opm::FvBaseAdLocalLinearizer<TypeTag>; };
|
||||
|
||||
//! Set the function evaluation w.r.t. the primary variables
|
||||
SET_PROP(AutoDiffLocalLinearizer, Evaluation)
|
||||
template<class TypeTag>
|
||||
struct Evaluation<TypeTag, TTag::AutoDiffLocalLinearizer>
|
||||
{
|
||||
private:
|
||||
static const unsigned numEq = GET_PROP_VALUE(TypeTag, NumEq);
|
||||
static const unsigned numEq = getPropValue<TypeTag, Properties::NumEq>();
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
public:
|
||||
typedef Opm::DenseAd::Evaluation<Scalar, numEq> type;
|
||||
using type = Opm::DenseAd::Evaluation<Scalar, numEq>;
|
||||
};
|
||||
|
||||
END_PROPERTIES
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@ -84,25 +88,25 @@ template<class TypeTag>
|
||||
class FvBaseAdLocalLinearizer
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, LocalLinearizer) Implementation;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, LocalResidual) LocalResidual;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GridView::template Codim<0>::Entity Element;
|
||||
using Implementation = GetPropType<TypeTag, Properties::LocalLinearizer>;
|
||||
using LocalResidual = GetPropType<TypeTag, Properties::LocalResidual>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using Problem = GetPropType<TypeTag, Properties::Problem>;
|
||||
using Model = GetPropType<TypeTag, Properties::Model>;
|
||||
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using Element = typename GridView::template Codim<0>::Entity;
|
||||
|
||||
enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) };
|
||||
enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
|
||||
|
||||
typedef Dune::FieldVector<Scalar, numEq> ScalarVectorBlock;
|
||||
using ScalarVectorBlock = Dune::FieldVector<Scalar, numEq>;
|
||||
// extract local matrices from jacobian matrix for consistency
|
||||
typedef typename GET_PROP_TYPE(TypeTag, SparseMatrixAdapter)::MatrixBlock ScalarMatrixBlock;
|
||||
using ScalarMatrixBlock = typename GetPropType<TypeTag, Properties::SparseMatrixAdapter>::MatrixBlock;
|
||||
|
||||
typedef Dune::BlockVector<ScalarVectorBlock> ScalarLocalBlockVector;
|
||||
typedef Dune::Matrix<ScalarMatrixBlock> ScalarLocalBlockMatrix;
|
||||
using ScalarLocalBlockVector = Dune::BlockVector<ScalarVectorBlock>;
|
||||
using ScalarLocalBlockMatrix = Dune::Matrix<ScalarMatrixBlock>;
|
||||
|
||||
public:
|
||||
FvBaseAdLocalLinearizer()
|
||||
|
@ -44,26 +44,26 @@ namespace Opm {
|
||||
template<class TypeTag>
|
||||
class FvBaseBoundaryContext
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Stencil) Stencil;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ExtensiveQuantities) ExtensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GradientCalculator) GradientCalculator;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Problem = GetPropType<TypeTag, Properties::Problem>;
|
||||
using Model = GetPropType<TypeTag, Properties::Model>;
|
||||
using Stencil = GetPropType<TypeTag, Properties::Stencil>;
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
using ExtensiveQuantities = GetPropType<TypeTag, Properties::ExtensiveQuantities>;
|
||||
using GradientCalculator = GetPropType<TypeTag, Properties::GradientCalculator>;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GridView::template Codim<0>::Entity Element;
|
||||
typedef typename GridView::IntersectionIterator IntersectionIterator;
|
||||
typedef typename GridView::Intersection Intersection;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using Element = typename GridView::template Codim<0>::Entity;
|
||||
using IntersectionIterator = typename GridView::IntersectionIterator;
|
||||
using Intersection = typename GridView::Intersection;
|
||||
|
||||
enum { dim = GridView::dimension };
|
||||
enum { dimWorld = GridView::dimensionworld };
|
||||
|
||||
typedef typename GridView::ctype CoordScalar;
|
||||
typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
|
||||
typedef Dune::FieldVector<Scalar, dimWorld> Vector;
|
||||
using CoordScalar = typename GridView::ctype;
|
||||
using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>;
|
||||
using Vector = Dune::FieldVector<Scalar, dimWorld>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user