Opm::TemperatureModel< TypeTag, enableTempV > Class Template Reference

A class which handles sequential implicit solution of the energy equation as specified in by TEMP. More...

#include <TemperatureModel.hpp>

Inheritance diagram for Opm::TemperatureModel< TypeTag, enableTempV >:
Inheritance graph

Public Types

using CartesianIndexMapper = Dune::CartesianIndexMapper< GetPropType< TypeTag, Properties::Grid > >
 

Public Member Functions

 TemperatureModel (Simulator &simulator)
 
void init ()
 
void beginTimeStep ()
 
void endTimeStep (WellStateType &wellState)
 Informs the temperature model that a time step has just been finished. More...
 
template<class Restarter >
void serialize (Restarter &)
 This method writes the complete state of all temperature to the hard disk. More...
 
template<class Restarter >
void deserialize (Restarter &)
 This method restores the complete state of the temperature from disk. More...
 
bool doTemp ()
 
const GetPropType< TypeTag, Properties::Scalartemperature (size_t globalIdx) const
 

Static Public Attributes

static constexpr int dimWorld
 

Protected Member Functions

void updateStorageCache ()
 
void advanceTemperatureFields ()
 
void solveAndUpdate ()
 
bool converged (const int iter)
 
template<class LhsEval >
void computeStorageTerm (unsigned globI, LhsEval &storage)
 
template<class RateVector >
void computeFluxTerm (const FluidStateTemp &fsIn, const FluidStateTemp &fsEx, const RateVector &darcyFlux, Evaluation &flux)
 
template<class ResidualNBInfo >
void computeHeatFluxTerm (const IntensiveQuantitiesTemp &intQuantsIn, const IntensiveQuantitiesTemp &intQuantsEx, const ResidualNBInfo &res_nbinfo, Evaluation &heatFlux)
 
void assembleEquations ()
 
template<class Well >
void assembleEquationWell (const Well &well)
 
template<class Well , class SingleWellState >
void computeWellTemperature (const Well &well, SingleWellState &ws)
 
void doInit (std::size_t numGridDof)
 Initialize all internal data structures needed by the temperature module. More...
 
bool linearSolve_ (const EnergyMatrix &M, EnergyVector &x, EnergyVector &b)
 

Protected Attributes

const Simulator & simulator_
 
EnergyVector storage1_
 
std::vector< IntensiveQuantitiesTempintQuants_
 
SparseTable< NeighborInfoCPUneighborInfo_ {}
 
std::vector< MatrixBlockTemp * > diagMatAddress_ {}
 
std::unique_ptr< SpareMatrixEnergyAdapter > energyMatrix_
 
std::vector< int > overlapRows_
 
std::vector< int > interiorRows_
 
Scalar scalingFactor_ {1.0}
 
const GetPropType< TypeTag, Properties::GridView > & gridView_
 
const EclipseState & eclState_
 
const CartesianIndexMappercartMapper_
 
const GetPropType< TypeTag, Properties::DofMapper > & dofMapper_
 
EnergyVector energyVector_
 
std::vector< GetPropType< TypeTag, Properties::Scalar > > temperature_
 
std::vector< GetPropType< TypeTag, Properties::Scalar > > energy_rates_
 
bool doTemp_
 
GetPropType< TypeTag, Properties::ScalarmaxTempChange_
 

Detailed Description

template<class TypeTag, bool enableTempV = getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::SequentialImplicitThermal>
class Opm::TemperatureModel< TypeTag, enableTempV >

A class which handles sequential implicit solution of the energy equation as specified in by TEMP.

Member Typedef Documentation

◆ CartesianIndexMapper

Constructor & Destructor Documentation

◆ TemperatureModel()

template<class TypeTag , bool enableTempV = getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::SequentialImplicitThermal>
Opm::TemperatureModel< TypeTag, enableTempV >::TemperatureModel ( Simulator &  simulator)
inlineexplicit

Member Function Documentation

◆ advanceTemperatureFields()

template<class TypeTag , bool enableTempV = getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::SequentialImplicitThermal>
void Opm::TemperatureModel< TypeTag, enableTempV >::advanceTemperatureFields ( )
inlineprotected

◆ assembleEquations()

◆ assembleEquationWell()

◆ beginTimeStep()

◆ computeFluxTerm()

template<class TypeTag , bool enableTempV = getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::SequentialImplicitThermal>
template<class RateVector >
void Opm::TemperatureModel< TypeTag, enableTempV >::computeFluxTerm ( const FluidStateTemp &  fsIn,
const FluidStateTemp &  fsEx,
const RateVector &  darcyFlux,
Evaluation &  flux 
)
inlineprotected

◆ computeHeatFluxTerm()

template<class TypeTag , bool enableTempV = getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::SequentialImplicitThermal>
template<class ResidualNBInfo >
void Opm::TemperatureModel< TypeTag, enableTempV >::computeHeatFluxTerm ( const IntensiveQuantitiesTemp intQuantsIn,
const IntensiveQuantitiesTemp intQuantsEx,
const ResidualNBInfo &  res_nbinfo,
Evaluation &  heatFlux 
)
inlineprotected

◆ computeStorageTerm()

template<class TypeTag , bool enableTempV = getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::SequentialImplicitThermal>
template<class LhsEval >
void Opm::TemperatureModel< TypeTag, enableTempV >::computeStorageTerm ( unsigned  globI,
LhsEval &  storage 
)
inlineprotected

◆ computeWellTemperature()

template<class TypeTag , bool enableTempV = getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::SequentialImplicitThermal>
template<class Well , class SingleWellState >
void Opm::TemperatureModel< TypeTag, enableTempV >::computeWellTemperature ( const Well &  well,
SingleWellState ws 
)
inlineprotected

◆ converged()

◆ deserialize()

template<class TypeTag , bool enableTempV = getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::SequentialImplicitThermal>
template<class Restarter >
void Opm::TemperatureModel< TypeTag, enableTempV >::deserialize ( Restarter &  )
inline

This method restores the complete state of the temperature from disk.

It is the inverse of the serialize() method.

◆ doInit()

void Opm::GenericTemperatureModel< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::DofMapper > , GetPropType< TypeTag, Properties::Stencil > , GetPropType< TypeTag, Properties::FluidSystem > , GetPropType< TypeTag, Properties::Scalar > >::doInit ( std::size_t  numGridDof)
protectedinherited

Initialize all internal data structures needed by the temperature module.

◆ doTemp()

◆ endTimeStep()

◆ init()

template<class TypeTag , bool enableTempV = getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::SequentialImplicitThermal>
void Opm::TemperatureModel< TypeTag, enableTempV >::init ( )
inline

References Opm::TemperatureModel< TypeTag, enableTempV >::diagMatAddress_, Opm::GenericTemperatureModel< GetPropType< TypeTag, Properties::Grid >, GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::DofMapper >, GetPropType< TypeTag, Properties::Stencil >, GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Scalar > >::dofMapper_, Opm::GenericTemperatureModel< GetPropType< TypeTag, Properties::Grid >, GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::DofMapper >, GetPropType< TypeTag, Properties::Stencil >, GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Scalar > >::doInit(), Opm::GenericTemperatureModel< GetPropType< TypeTag, Properties::Grid >, GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::DofMapper >, GetPropType< TypeTag, Properties::Stencil >, GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Scalar > >::doTemp(), Opm::TemperatureModel< TypeTag, enableTempV >::energyMatrix_, Opm::detail::findOverlapAndInterior(), Opm::GenericTemperatureModel< GetPropType< TypeTag, Properties::Grid >, GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::DofMapper >, GetPropType< TypeTag, Properties::Stencil >, GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Scalar > >::gridView_, Opm::TemperatureModel< TypeTag, enableTempV >::interiorRows_, Opm::TemperatureModel< TypeTag, enableTempV >::intQuants_, Opm::TemperatureModel< TypeTag, enableTempV >::neighborInfo_, Opm::TemperatureModel< TypeTag, enableTempV >::overlapRows_, Opm::TemperatureModel< TypeTag, enableTempV >::scalingFactor_, Opm::TemperatureModel< TypeTag, enableTempV >::simulator_, Opm::TemperatureModel< TypeTag, enableTempV >::storage1_, and Opm::GenericTemperatureModel< GetPropType< TypeTag, Properties::Grid >, GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::DofMapper >, GetPropType< TypeTag, Properties::Stencil >, GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Scalar > >::temperature_.

◆ linearSolve_()

bool Opm::GenericTemperatureModel< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::DofMapper > , GetPropType< TypeTag, Properties::Stencil > , GetPropType< TypeTag, Properties::FluidSystem > , GetPropType< TypeTag, Properties::Scalar > >::linearSolve_ ( const EnergyMatrix M,
EnergyVector x,
EnergyVector b 
)
protectedinherited

◆ serialize()

template<class TypeTag , bool enableTempV = getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::SequentialImplicitThermal>
template<class Restarter >
void Opm::TemperatureModel< TypeTag, enableTempV >::serialize ( Restarter &  )
inline

This method writes the complete state of all temperature to the hard disk.

◆ solveAndUpdate()

◆ temperature()

const GetPropType< TypeTag, Properties::Scalar > Opm::GenericTemperatureModel< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::DofMapper > , GetPropType< TypeTag, Properties::Stencil > , GetPropType< TypeTag, Properties::FluidSystem > , GetPropType< TypeTag, Properties::Scalar > >::temperature ( size_t  globalIdx) const
inlineinherited

◆ updateStorageCache()

template<class TypeTag , bool enableTempV = getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::SequentialImplicitThermal>
void Opm::TemperatureModel< TypeTag, enableTempV >::updateStorageCache ( )
inlineprotected

Member Data Documentation

◆ cartMapper_

◆ diagMatAddress_

template<class TypeTag , bool enableTempV = getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::SequentialImplicitThermal>
std::vector<MatrixBlockTemp*> Opm::TemperatureModel< TypeTag, enableTempV >::diagMatAddress_ {}
protected

◆ dimWorld

constexpr int Opm::GenericTemperatureModel< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::DofMapper > , GetPropType< TypeTag, Properties::Stencil > , GetPropType< TypeTag, Properties::FluidSystem > , GetPropType< TypeTag, Properties::Scalar > >::dimWorld
staticconstexprinherited

◆ dofMapper_

◆ doTemp_

◆ eclState_

const EclipseState& Opm::GenericTemperatureModel< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::DofMapper > , GetPropType< TypeTag, Properties::Stencil > , GetPropType< TypeTag, Properties::FluidSystem > , GetPropType< TypeTag, Properties::Scalar > >::eclState_
protectedinherited

◆ energy_rates_

std::vector<GetPropType< TypeTag, Properties::Scalar > > Opm::GenericTemperatureModel< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::DofMapper > , GetPropType< TypeTag, Properties::Stencil > , GetPropType< TypeTag, Properties::FluidSystem > , GetPropType< TypeTag, Properties::Scalar > >::energy_rates_
protectedinherited

◆ energyMatrix_

template<class TypeTag , bool enableTempV = getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::SequentialImplicitThermal>
std::unique_ptr<SpareMatrixEnergyAdapter> Opm::TemperatureModel< TypeTag, enableTempV >::energyMatrix_
protected

◆ energyVector_

EnergyVector Opm::GenericTemperatureModel< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::DofMapper > , GetPropType< TypeTag, Properties::Stencil > , GetPropType< TypeTag, Properties::FluidSystem > , GetPropType< TypeTag, Properties::Scalar > >::energyVector_
protectedinherited

◆ gridView_

◆ interiorRows_

template<class TypeTag , bool enableTempV = getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::SequentialImplicitThermal>
std::vector<int> Opm::TemperatureModel< TypeTag, enableTempV >::interiorRows_
protected

◆ intQuants_

◆ maxTempChange_

◆ neighborInfo_

template<class TypeTag , bool enableTempV = getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::SequentialImplicitThermal>
SparseTable<NeighborInfoCPU> Opm::TemperatureModel< TypeTag, enableTempV >::neighborInfo_ {}
protected

◆ overlapRows_

template<class TypeTag , bool enableTempV = getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::SequentialImplicitThermal>
std::vector<int> Opm::TemperatureModel< TypeTag, enableTempV >::overlapRows_
protected

◆ scalingFactor_

◆ simulator_

◆ storage1_

template<class TypeTag , bool enableTempV = getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::SequentialImplicitThermal>
EnergyVector Opm::TemperatureModel< TypeTag, enableTempV >::storage1_
protected

◆ temperature_

std::vector<GetPropType< TypeTag, Properties::Scalar > > Opm::GenericTemperatureModel< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::DofMapper > , GetPropType< TypeTag, Properties::Stencil > , GetPropType< TypeTag, Properties::FluidSystem > , GetPropType< TypeTag, Properties::Scalar > >::temperature_
protectedinherited

The documentation for this class was generated from the following file: