mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
working refactoring
This commit is contained in:
parent
abee2f9f81
commit
18b03f3546
@ -478,6 +478,18 @@ opm_add_test(flow_poly
|
||||
$<TARGET_OBJECTS:moduleVersion>)
|
||||
target_compile_definitions(flow_poly PRIVATE USE_POLYHEDRALGRID)
|
||||
|
||||
opm_add_test(flow_blackoil_tpfa
|
||||
ONLY_COMPILE
|
||||
ALWAYS_ENABLE
|
||||
DEFAULT_ENABLE_IF ${FLOW_POLY_ONLY_DEFAULT_ENABLE_IF}
|
||||
DEPENDS opmsimulators
|
||||
LIBRARIES opmsimulators
|
||||
SOURCES
|
||||
flow/flow_blackoil_tpfa.cpp
|
||||
# $<TARGET_OBJECTS:flow_libblackoil_tpfa>
|
||||
$<TARGET_OBJECTS:moduleVersion>)
|
||||
#target_compile_definitions(flow_blackoil_tpfa PRIVATE USE_POLYHEDRALGRID)
|
||||
|
||||
opm_add_test(flow_distribute_z
|
||||
ONLY_COMPILE
|
||||
ALWAYS_ENABLE
|
||||
|
@ -28,8 +28,8 @@
|
||||
* This approach to fluxes is very specific to two-point flux approximation and applies
|
||||
* what the Eclipse Technical Description calls the "NEWTRAN" transmissibility approach.
|
||||
*/
|
||||
#ifndef EWOMS_ECL_FLUX_MODULE_HH
|
||||
#define EWOMS_ECL_FLUX_MODULE_HH
|
||||
#ifndef EWOMS_ECL_FLUX_TPFA_MODULE_HH
|
||||
#define EWOMS_ECL_FLUX_TPFA_MODULE_HH
|
||||
|
||||
#include <opm/models/discretization/common/fvbaseproperties.hh>
|
||||
#include <opm/models/blackoil/blackoilproperties.hh>
|
||||
@ -51,52 +51,52 @@ class EclTransExtensiveQuantities;
|
||||
template <class TypeTag>
|
||||
class EclTransBaseProblem;
|
||||
|
||||
/*!
|
||||
* \ingroup EclBlackOilSimulator
|
||||
* \brief Specifies a flux module which uses ECL transmissibilities.
|
||||
*/
|
||||
template <class TypeTag>
|
||||
struct EclTransFluxModule
|
||||
{
|
||||
typedef EclTransIntensiveQuantities<TypeTag> FluxIntensiveQuantities;
|
||||
typedef EclTransExtensiveQuantities<TypeTag> FluxExtensiveQuantities;
|
||||
typedef EclTransBaseProblem<TypeTag> FluxBaseProblem;
|
||||
// /*!
|
||||
// * \ingroup EclBlackOilSimulator
|
||||
// * \brief Specifies a flux module which uses ECL transmissibilities.
|
||||
// */
|
||||
// template <class TypeTag>
|
||||
// struct EclTransFluxModule
|
||||
// {
|
||||
// typedef EclTransIntensiveQuantities<TypeTag> FluxIntensiveQuantities;
|
||||
// typedef EclTransExtensiveQuantities<TypeTag> FluxExtensiveQuantities;
|
||||
// typedef EclTransBaseProblem<TypeTag> FluxBaseProblem;
|
||||
|
||||
/*!
|
||||
* \brief Register all run-time parameters for the flux module.
|
||||
*/
|
||||
static void registerParameters()
|
||||
{ }
|
||||
};
|
||||
// /*!
|
||||
// * \brief Register all run-time parameters for the flux module.
|
||||
// */
|
||||
// static void registerParameters()
|
||||
// { }
|
||||
// };
|
||||
|
||||
/*!
|
||||
* \ingroup EclBlackOilSimulator
|
||||
* \brief Provides the defaults for the parameters required by the
|
||||
* transmissibility based volume flux calculation.
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class EclTransBaseProblem
|
||||
{ };
|
||||
// /*!
|
||||
// * \ingroup EclBlackOilSimulator
|
||||
// * \brief Provides the defaults for the parameters required by the
|
||||
// * transmissibility based volume flux calculation.
|
||||
// */
|
||||
// template <class TypeTag>
|
||||
// class EclTransBaseProblem
|
||||
// { };
|
||||
|
||||
/*!
|
||||
* \ingroup EclBlackOilSimulator
|
||||
* \brief Provides the intensive quantities for the ECL flux module
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class EclTransIntensiveQuantities
|
||||
{
|
||||
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
protected:
|
||||
void update_(const ElementContext&, unsigned, unsigned)
|
||||
{ }
|
||||
};
|
||||
// /*!
|
||||
// * \ingroup EclBlackOilSimulator
|
||||
// * \brief Provides the intensive quantities for the ECL flux module
|
||||
// */
|
||||
// template <class TypeTag>
|
||||
// class EclTransIntensiveQuantities
|
||||
// {
|
||||
// using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
|
||||
// protected:
|
||||
// void update_(const ElementContext&, unsigned, unsigned)
|
||||
// { }
|
||||
// };
|
||||
|
||||
/*!
|
||||
* \ingroup EclBlackOilSimulator
|
||||
* \brief Provides the ECL flux module
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class EclTransExtensiveQuantities
|
||||
class EclTransExtensiveQuantitiesTPFA
|
||||
{
|
||||
using Implementation = GetPropType<TypeTag, Properties::ExtensiveQuantities>;
|
||||
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
|
||||
|
97
flow/flow_blackoil_tpfa.cpp
Normal file
97
flow/flow_blackoil_tpfa.cpp
Normal file
@ -0,0 +1,97 @@
|
||||
/*
|
||||
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 3 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/>.
|
||||
*/
|
||||
#include "config.h"
|
||||
#include <opm/material/common/ResetLocale.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
// modifications from standard
|
||||
#include <opm/models/blackoil/blackoillocalresidualtpfa.hh>
|
||||
#include <ebos/eclfluxmoduletpfa.hh>
|
||||
namespace Opm {
|
||||
namespace Properties {
|
||||
namespace TTag {
|
||||
struct EclFlowProblemTPFA {
|
||||
using InheritsFrom = std::tuple<EclFlowProblem>;
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
namespace Opm {
|
||||
namespace Properties {
|
||||
template<class TypeTag>
|
||||
struct LocalLinearizerSplice<TypeTag, TTag::EclFlowProblemTPFA> {
|
||||
using type = TTag::AutoDiffLocalLinearizer;
|
||||
};
|
||||
}
|
||||
}
|
||||
namespace Opm {
|
||||
namespace Properties {
|
||||
template<class TypeTag>
|
||||
struct LocalResidual<TypeTag, TTag::EclFlowProblemTPFA> { using type = BlackOilLocalResidualTPFA<TypeTag>; };
|
||||
}
|
||||
}
|
||||
namespace Opm{
|
||||
template <class TypeTag>
|
||||
struct EclTransFluxModuleTPFA
|
||||
{
|
||||
typedef EclTransIntensiveQuantities<TypeTag> FluxIntensiveQuantities;
|
||||
typedef EclTransExtensiveQuantitiesTPFA<TypeTag> FluxExtensiveQuantities;
|
||||
typedef EclTransBaseProblem<TypeTag> FluxBaseProblem;
|
||||
|
||||
/*!
|
||||
* \brief Register all run-time parameters for the flux module.
|
||||
*/
|
||||
static void registerParameters()
|
||||
{ }
|
||||
};
|
||||
}
|
||||
namespace Opm {
|
||||
namespace Properties {
|
||||
|
||||
template<class TypeTag>
|
||||
struct FluxModule<TypeTag, TTag::EclFlowProblemTPFA> {
|
||||
using type = EclTransFluxModuleTPFA<TypeTag>;
|
||||
};
|
||||
}
|
||||
}
|
||||
// namespace Opm {
|
||||
// namespace Properties {
|
||||
// template<class TypeTag>
|
||||
// struct Linearizer<TypeTag, TTag::EclFlowProblemTPFA> {
|
||||
// using type = TTag::AutoDiffLocalLinearizer;
|
||||
// };
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// namespace Opm {
|
||||
// namespace Properties {
|
||||
// template<class TypeTag>
|
||||
// struct FluxModule<TypeTag, TTag::EclFlowProblemTPFA> {
|
||||
// using type = TTag::EclTransFluxMudule;
|
||||
// };
|
||||
// }
|
||||
// }
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
using TypeTag = Opm::Properties::TTag::EclFlowProblemTPFA;
|
||||
auto mainObject = Opm::Main(argc, argv);
|
||||
return mainObject.runStatic<TypeTag>();
|
||||
}
|
Loading…
Reference in New Issue
Block a user