Loading...
Searching...
No Matches
discretefracturemodel.hh
Go to the documentation of this file.
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
Consult the COPYING file in the top-level source directory of this
module for the precise wording of the license and the list of
copyright holders.
*/
#ifndef EWOMS_DISCRETE_FRACTURE_MODEL_HH
#define EWOMS_DISCRETE_FRACTURE_MODEL_HH
#include <opm/material/densead/Math.hpp>
#include <opm/models/discretefracture/discretefractureextensivequantities.hh>
#include <opm/models/discretefracture/discretefractureintensivequantities.hh>
#include <opm/models/discretefracture//discretefracturelocalresidual.hh>
#include <opm/models/discretefracture/discretefractureprimaryvariables.hh>
#include <opm/models/discretefracture/discretefractureproblem.hh>
#include <opm/models/discretefracture/discretefractureproperties.hh>
#include <opm/models/immiscible/immisciblemodel.hh>
#include <opm/models/io/vtkdiscretefracturemodule.hpp>
#include <memory>
#include <stdexcept>
#include <string>
#include <tuple>
namespace Opm {
template <class TypeTag>
class DiscreteFractureModel;
}
namespace Opm::Properties {
// Create new type tags
namespace TTag {
struct DiscreteFractureModel
{ using InheritsFrom = std::tuple<ImmiscibleTwoPhaseModel>; };
} // end namespace TTag
template<class TypeTag>
struct Model<TypeTag, TTag::DiscreteFractureModel>
{ using type = Opm::DiscreteFractureModel<TypeTag>; };
template<class TypeTag>
struct BaseProblem<TypeTag, TTag::DiscreteFractureModel>
{ using type = Opm::DiscreteFractureProblem<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!?
// template<class TypeTag>
// struct BaseProblem<TypeTag, TTag::DiscreteFractureModel>
// { using type = DiscreteFractureBaseProblem<TypeTag>; };
template<class TypeTag>
struct PrimaryVariables<TypeTag, TTag::DiscreteFractureModel>
{ using type = Opm::DiscreteFracturePrimaryVariables<TypeTag>; };
template<class TypeTag>
struct IntensiveQuantities<TypeTag, TTag::DiscreteFractureModel>
{ using type = Opm::DiscreteFractureIntensiveQuantities<TypeTag>; };
template<class TypeTag>
struct ExtensiveQuantities<TypeTag, TTag::DiscreteFractureModel>
{ using type = Opm::DiscreteFractureExtensiveQuantities<TypeTag>; };
template<class TypeTag>
struct UseTwoPointGradients<TypeTag, TTag::DiscreteFractureModel>
{ static constexpr bool value = true; };
} // namespace Opm::Properties
namespace Opm {
template <class TypeTag>
class DiscreteFractureModel : public ImmiscibleModel<TypeTag>
{
using ParentType = ImmiscibleModel<TypeTag>;
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
public:
explicit DiscreteFractureModel(Simulator& simulator)
: ParentType(simulator)
{
if (Parameters::Get<Parameters::EnableIntensiveQuantityCache>()) {
throw std::runtime_error("The discrete fracture model does not work in conjunction "
"with intensive quantities caching");
}
}
static void registerParameters()
{
ParentType::registerParameters();
// register runtime parameters of the VTK output modules
VtkDiscreteFractureModule<TypeTag>::registerParameters();
// 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...
Parameters::SetDefault<Parameters::EnableIntensiveQuantityCache>(false);
}
static std::string name()
{ return "discretefracture"; }
void registerOutputModules_()
{
ParentType::registerOutputModules_();
this->addOutputModule(std::make_unique<VtkDiscreteFractureModule<TypeTag>>(this->simulator_));
}
};
} // namespace Opm
#endif
Opm::DiscreteFractureExtensiveQuantities
This class expresses all intensive quantities of the discrete fracture model.
Definition discretefractureextensivequantities.hh:49
Opm::DiscreteFractureIntensiveQuantities
Contains the quantities which are are constant within a finite volume in the discret fracture immisci...
Definition discretefractureintensivequantities.hh:50
Opm::DiscreteFractureLocalResidual
Calculates the local residual of the discrete fracture immiscible multi-phase model.
Definition discretefracturelocalresidual.hh:43
Opm::DiscreteFractureModel
A fully-implicit multi-phase flow model which assumes immiscibility of the phases and is able to incl...
Definition discretefracturemodel.hh:128
Opm::DiscreteFractureModel::name
static std::string name()
Definition discretefracturemodel.hh:163
Opm::DiscreteFractureModel::registerParameters
static void registerParameters()
Register all run-time parameters for the immiscible model.
Definition discretefracturemodel.hh:145
Opm::DiscreteFracturePrimaryVariables
Represents the primary variables used by the discrete fracture multi-phase model.
Definition discretefractureprimaryvariables.hh:48
Opm::DiscreteFractureProblem
The base class for the problems of ECFV discretizations which deal with a multi-phase flow through a ...
Definition discretefractureproblem.hh:50
Opm::ImmiscibleModel::registerParameters
static void registerParameters()
Register all run-time parameters for the immiscible model.
Definition immisciblemodel.hh:236
Opm::VtkDiscreteFractureModule
VTK output module for quantities which make sense for all models which deal with discrete fractures i...
Definition vtkdiscretefracturemodule.hpp:66
Opm::VtkDiscreteFractureModule::registerParameters
static void registerParameters()
Register all run-time parameters for the multi-phase VTK output module.
Definition vtkdiscretefracturemodule.hpp:101
discretefractureextensivequantities.hh
This class expresses all intensive quantities of the discrete fracture model.
discretefractureintensivequantities.hh
Contains the quantities which are are constant within a finite volume in the discret fracture immisci...
discretefracturelocalresidual.hh
Calculates the local residual of the discrete fracture immiscible multi-phase model.
discretefractureprimaryvariables.hh
Represents the primary variables used by the discrete fracture multi-phase model.
discretefractureproblem.hh
The base class for the problems of ECFV discretizations which deal with a multi-phase flow through a ...
discretefractureproperties.hh
Defines the properties required for the immiscible multi-phase model which considers discrete fractur...
immisciblemodel.hh
A fully-implicit multi-phase flow model which assumes immiscibility of the phases.
Opm::Properties::TTag
The generic type tag for problems using the immiscible multi-phase model.
Definition blackoilmodel.hh:81
Opm
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:43
Opm::GetPropType
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition propertysystem.hh:233
Opm::Parameters::SetDefault
void SetDefault(decltype(Param::value) new_value)
Set a runtime parameter.
Definition parametersystem.hpp:212
Opm::Parameters::Get
auto Get(bool errorIfNotRegistered=true)
Retrieve a runtime parameter.
Definition parametersystem.hpp:187
Opm::Properties::BaseProblem
The type of the base class for all problems which use this model.
Definition fvbaseproperties.hh:84
Opm::Properties::ExtensiveQuantities
Data required to calculate a flux over a face.
Definition fvbaseproperties.hh:149
Opm::Properties::IntensiveQuantities
The secondary variables within a sub-control volume.
Definition fvbaseproperties.hh:133
Opm::Properties::LocalResidual
The type of the local residual function.
Definition fvbaseproperties.hh:94
Opm::Properties::Model
The type of the model.
Definition basicproperties.hh:88
Opm::Properties::PrimaryVariables
A vector of primary variables within a sub-control volume.
Definition fvbaseproperties.hh:130
Opm::Properties::TTag::DiscreteFractureModel
The generic type tag for problems using the immiscible multi-phase model.
Definition discretefracturemodel.hh:59
Opm::Properties::UseTwoPointGradients
Definition discretefractureproperties.hh:38
vtkdiscretefracturemodule.hpp
VTK output module for quantities which make sense for all models which deal with discrete fractures i...