renaming the file names

This commit is contained in:
Kai Bao
2024-04-19 23:16:53 +02:00
parent 68c202eb55
commit d2ce814eae
6 changed files with 32 additions and 33 deletions

View File

@@ -25,8 +25,8 @@
*
* \brief Contains the classes required to extend the black-oil model by energy.
*/
#ifndef OPM_BLACK_OIL_ENERGY_MODULE_TPFA_HH
#define OPM_BLACK_OIL_ENERGY_MODULE_TPFA_HH
#ifndef OPM_BLACK_OIL_ENERGY_MODULE_GLOBAL_INDEX_HH
#define OPM_BLACK_OIL_ENERGY_MODULE_GLOBAL_INDEX_HH
#include <opm/models/blackoil/blackoilenergymodules.hh>
namespace Opm {
@@ -36,7 +36,7 @@ namespace Opm {
* model by energy.
*/
template <class TypeTag, bool enableEnergyV = getPropValue<TypeTag, Properties::EnableEnergy>()>
class BlackOilEnergyIntensiveQuantitiesFV: public BlackOilEnergyIntensiveQuantities<TypeTag,enableEnergyV>
class BlackOilEnergyIntensiveQuantitiesGlobalIndex: public BlackOilEnergyIntensiveQuantities<TypeTag,enableEnergyV>
{
using Parent = BlackOilEnergyIntensiveQuantities<TypeTag, enableEnergyV>;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
@@ -97,7 +97,7 @@ public:
};
template <class TypeTag>
class BlackOilEnergyIntensiveQuantitiesFV<TypeTag, false>: public BlackOilEnergyIntensiveQuantities<TypeTag, false>
class BlackOilEnergyIntensiveQuantitiesGlobalIndex<TypeTag, false>: public BlackOilEnergyIntensiveQuantities<TypeTag, false>
{
using Parent = BlackOilEnergyIntensiveQuantities<TypeTag, false>;
using Problem = GetPropType<TypeTag, Properties::Problem>;

View File

@@ -23,10 +23,10 @@
/*!
* \file
*
* \copydoc Opm::BlackOilIntensiveQuantities
* \copydoc Opm::BlackOilIntensiveQuantitiesGlobalIndex
*/
#ifndef OPM_BLACK_OIL_INTENSIVE_QUANTITIES_SIMPLE_HH
#define OPM_BLACK_OIL_INTENSIVE_QUANTITIES_SIMPLE_HH
#ifndef OPM_BLACK_OIL_INTENSIVE_QUANTITIES_GLOBAL_INDEX_HPP
#define OPM_BLACK_OIL_INTENSIVE_QUANTITIES_GLOBAL_INDEX_HPP
#include <opm/models/blackoil/blackoilproperties.hh>
#include <opm/models/blackoil/blackoilsolventmodules.hh>
#include <opm/models/blackoil/blackoilextbomodules.hh>
@@ -34,7 +34,7 @@
#include <opm/models/blackoil/blackoilfoammodules.hh>
#include <opm/models/blackoil/blackoilbrinemodules.hh>
#include <opm/models/blackoil/blackoilenergymodules.hh>
#include "blackoilenergymodulesfv.hh"
#include "BlackOilEnergyIntensiveQuantitiesGlobalIndex.hpp"
#include <opm/models/blackoil/blackoildiffusionmodule.hh>
#include <opm/models/blackoil/blackoilmicpmodules.hh>
#include <opm/material/fluidstates/BlackOilFluidState.hpp>
@@ -60,7 +60,7 @@ namespace Opm {
* finite volume in the black-oil model.
*/
template <class TypeTag>
class BlackOilIntensiveQuantitiesSimple
class BlackOilIntensiveQuantitiesGlobalIndex
: public GetPropType<TypeTag, Properties::DiscIntensiveQuantities>
, public GetPropType<TypeTag, Properties::FluxModule>::FluxIntensiveQuantities
, public BlackOilDiffusionIntensiveQuantities<TypeTag, getPropValue<TypeTag, Properties::EnableDiffusion>() >
@@ -69,7 +69,7 @@ class BlackOilIntensiveQuantitiesSimple
, public BlackOilPolymerIntensiveQuantities<TypeTag>
, public BlackOilFoamIntensiveQuantities<TypeTag>
, public BlackOilBrineIntensiveQuantities<TypeTag>
, public BlackOilEnergyIntensiveQuantitiesFV<TypeTag>
, public BlackOilEnergyIntensiveQuantitiesGlobalIndex<TypeTag>
, public BlackOilMICPIntensiveQuantities<TypeTag>
{
using ParentType = GetPropType<TypeTag, Properties::DiscIntensiveQuantities>;
@@ -144,7 +144,7 @@ public:
Indices::numPhases>;
using Problem = GetPropType<TypeTag, Properties::Problem>;
BlackOilIntensiveQuantitiesSimple()
BlackOilIntensiveQuantitiesGlobalIndex()
{
if (compositionSwitchEnabled) {
fluidState_.setRs(0.0);
@@ -154,9 +154,9 @@ public:
fluidState_.setRvw(0.0);
}
}
BlackOilIntensiveQuantitiesSimple(const BlackOilIntensiveQuantitiesSimple& other) = default;
BlackOilIntensiveQuantitiesGlobalIndex(const BlackOilIntensiveQuantitiesGlobalIndex& other) = default;
BlackOilIntensiveQuantitiesSimple& operator=(const BlackOilIntensiveQuantitiesSimple& other) = default;
BlackOilIntensiveQuantitiesGlobalIndex& operator=(const BlackOilIntensiveQuantitiesGlobalIndex& other) = default;
/*!
* \copydoc IntensiveQuantities::update
@@ -597,7 +597,7 @@ private:
friend BlackOilSolventIntensiveQuantities<TypeTag>;
friend BlackOilExtboIntensiveQuantities<TypeTag>;
friend BlackOilPolymerIntensiveQuantities<TypeTag>;
friend BlackOilEnergyIntensiveQuantitiesFV<TypeTag>;
friend BlackOilEnergyIntensiveQuantitiesGlobalIndex<TypeTag>;
friend BlackOilFoamIntensiveQuantities<TypeTag>;
friend BlackOilBrineIntensiveQuantities<TypeTag>;
friend BlackOilMICPIntensiveQuantities<TypeTag>;

View File

@@ -1,21 +1,20 @@
#ifndef BLACK_OIL_MODEL_FV_NOCACHE_HPP
#define BLACK_OIL_MODEL_FV_NOCACHE_HPP
#ifndef OPM_FI_BLACK_OIL_MODEL_NOCACHE_HPP
#define OPM_FI_BLACK_OIL_MODEL_NOCACHE_HPP
#include <opm/simulators/flow/FIBlackoilModel.hpp>
namespace Opm{
template<typename TypeTag>
class BlackOilModelFvNoCache: public FIBlackOilModel<TypeTag>{
using Parent = FIBlackOilModel<TypeTag>;
class FIBlackOilModelNoCache: public FIBlackOilModel<TypeTag>{
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
public:
BlackOilModelFvNoCache(Simulator& simulator): FIBlackOilModel<TypeTag>(simulator){
}
explicit FIBlackOilModelNoCache(Simulator& simulator)
:FIBlackOilModel<TypeTag>(simulator)
{ }
IntensiveQuantities intensiveQuantities(unsigned globalIdx, unsigned timeIdx) const{
OPM_TIMEBLOCK_LOCAL(intensiveQuantitiesNoCache);
const auto& primaryVar = this->solution(timeIdx)[globalIdx];
const auto& problem = this->simulator_.problem();
//IntensiveQuantities* intQuants = &(this->intensiveQuantityCache_[timeIdx][globalIdx]);
if (!(this->enableIntensiveQuantityCache_) ||
!(this->intensiveQuantityCacheUpToDate_[timeIdx][globalIdx])){
IntensiveQuantities intQuants;

View File

@@ -74,7 +74,7 @@ struct WellModel<TypeTag, TTag::EbosTypeTag> {
template<class TypeTag>
struct NewtonMethod<TypeTag, TTag::EbosTypeTag> {
using type = EclNewtonMethod<TypeTag>;
using type = FlowNewtonMethod<TypeTag>;
};
// currently, ebos uses the non-multisegment well model by default to avoid

View File

@@ -18,14 +18,14 @@
*/
#include "config.h"
#include <opm/simulators/flow/FlowProblem.hpp>
#include "eclnewtonmethod.hh"
#include "flownewtonmethod.hpp"
#include "flowexp.hpp"
#include <opm/simulators/flow/Main.hpp>
#include <opm/models/blackoil/blackoillocalresidualtpfa.hh>
#include <opm/models/discretization/common/tpfalinearizer.hh>
#include "blackoilintensivequantitiessimple.hh"
#include "BlackOilModelFvNoCache.hpp"
#include "BlackOilIntensiveQuantitiesGlobalIndex.hpp"
#include "FIBlackOilModelNoCache.hpp"
// the current code use eclnewtonmethod adding other conditions to proceed_ should do the trick for KA
// adding linearshe sould be chaning the update_ function in the same class with condition that the error is reduced.
// the trick is to be able to recalculate the residual from here.
@@ -50,11 +50,11 @@ struct EclFlowProblemEbos {
template<class TypeTag>
struct Model<TypeTag, TTag::EclFlowProblemEbos> {
using type = BlackOilModelFvNoCache<TypeTag>;
using type = FIBlackOilModelNoCache<TypeTag>;
};
template<class TypeTag>
struct IntensiveQuantities<TypeTag, TTag::EclFlowProblemEbos> {
using type = BlackOilIntensiveQuantitiesSimple<TypeTag>;
using type = BlackOilIntensiveQuantitiesGlobalIndex<TypeTag>;
};
// Set the problem class
template<class TypeTag>

View File

@@ -23,10 +23,10 @@
/*!
* \file
*
* \copydoc Opm::EclNewtonMethod
* \copydoc Opm::FlowNewtonMethod
*/
#ifndef EWOMS_ECL_NEWTON_METHOD_HH
#define EWOMS_ECL_NEWTON_METHOD_HH
#ifndef OPM_FLOW_NEWTON_METHOD_HPP
#define OPM_FLOW_NEWTON_METHOD_HPP
#include <opm/common/Exceptions.hpp>
#include <opm/common/OpmLog/OpmLog.hpp>
@@ -62,10 +62,10 @@ struct EclNewtonRelaxedTolerance {
namespace Opm {
/*!
* \brief A newton solver which is ebos specific.
* \brief A newton solver.
*/
template <class TypeTag>
class EclNewtonMethod : public BlackOilNewtonMethod<TypeTag>
class FlowNewtonMethod : public BlackOilNewtonMethod<TypeTag>
{
using ParentType = BlackOilNewtonMethod<TypeTag>;
using DiscNewtonMethod = GetPropType<TypeTag, Properties::DiscNewtonMethod>;
@@ -92,7 +92,7 @@ class EclNewtonMethod : public BlackOilNewtonMethod<TypeTag>
friend ParentType;
public:
EclNewtonMethod(Simulator& simulator) : ParentType(simulator)
explicit FlowNewtonMethod(Simulator& simulator) : ParentType(simulator)
{
errorPvFraction_ = 1.0;
relaxedMaxPvFraction_ = Parameters::get<TypeTag, Properties::EclNewtonRelaxedVolumeFraction>();