28 #ifndef OPM_BLACK_OIL_ENERGY_MODULE_GLOBAL_INDEX_HH 29 #define OPM_BLACK_OIL_ENERGY_MODULE_GLOBAL_INDEX_HH 35 template <
class TypeTag, EnergyModules activeModule>
43 template <
class TypeTag>
55 using ParamCache =
typename FluidSystem::template ParameterCache<Evaluation>;
58 static constexpr
unsigned temperatureIdx = Indices::temperatureIdx;
59 static constexpr
unsigned numPhases = FluidSystem::numPhases;
62 OPM_HOST_DEVICE
void updateTemperature_([[maybe_unused]]
const Problem& problem,
63 const PrimaryVariables& priVars,
64 [[maybe_unused]]
unsigned globalSpaceIndex,
67 auto& fs = Parent::asImp_().fluidState_;
69 fs.setTemperature(priVars.makeEvaluation(temperatureIdx, timeIdx));
71 OPM_HOST_DEVICE
void updateEnergyQuantities_(
const Problem& problem,
72 [[maybe_unused]]
const PrimaryVariables& priVars,
73 unsigned globalSpaceIndex,
75 const ParamCache& paramCache)
77 auto& fs = Parent::asImp_().fluidState_;
81 for (
int phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx) {
82 if (!FluidSystem::phaseIsActive(phaseIdx)) {
86 const auto& h = FluidSystem::enthalpy(fs, paramCache, phaseIdx);
87 fs.setEnthalpy(phaseIdx, h);
90 const auto& solidEnergyLawParams = problem().solidEnergyLawParams(globalSpaceIndex, timeIdx);
91 this->rockInternalEnergy_ = SolidEnergyLaw::solidInternalEnergy(solidEnergyLawParams, fs);
93 const auto& thermalConductionLawParams = problem.thermalConductionLawParams(globalSpaceIndex, timeIdx);
94 this->totalThermalConductivity_ = ThermalConductionLaw::thermalConductivity(thermalConductionLawParams, fs);
101 this->rockFraction_ = problem.rockFraction(globalSpaceIndex, timeIdx);
105 template <
class TypeTag>
117 using ParamCache =
typename FluidSystem::template ParameterCache<Evaluation>;
120 static constexpr
unsigned numPhases = FluidSystem::numPhases;
123 OPM_HOST_DEVICE
void updateTemperature_([[maybe_unused]]
const Problem& problem,
124 [[maybe_unused]]
const PrimaryVariables& priVars,
125 [[maybe_unused]]
unsigned globalSpaceIndex,
126 [[maybe_unused]]
unsigned timeIdx)
128 OPM_THROW(std::logic_error,
129 "updateTemperature not implemented " 130 "SequentialImplicitThermal can not be used with" 131 "global intensive quantites yet.");
134 OPM_HOST_DEVICE
void updateEnergyQuantities_([[maybe_unused]]
const Problem& problem,
135 [[maybe_unused]]
const PrimaryVariables& priVars,
136 [[maybe_unused]]
unsigned globalSpaceIndex,
137 [[maybe_unused]]
unsigned timeIdx,
138 [[maybe_unused]]
const ParamCache& paramCache)
140 OPM_THROW(std::logic_error,
141 "updateEnergyQuantities_ not implemented " 142 "SequentialImplicitThermal can not be used with" 143 "global intensive quantites yet.");
148 template <
class TypeTag>
160 OPM_HOST_DEVICE
void updateTemperature_([[maybe_unused]]
const Problem& problem,
161 [[maybe_unused]]
const PrimaryVariables& priVars,
162 [[maybe_unused]]
unsigned globalSpaceIdx,
163 [[maybe_unused]]
unsigned timeIdx)
165 auto& fs = this->asImp_().fluidState_;
166 Scalar T = problem.temperature(globalSpaceIdx, timeIdx);
167 fs.setTemperature(T);
170 OPM_HOST_DEVICE
void updateEnergyQuantities_([[maybe_unused]]
const Problem& problem,
171 [[maybe_unused]]
const PrimaryVariables& priVars,
172 [[maybe_unused]]
unsigned globalSpaceIdx,
173 [[maybe_unused]]
unsigned timeIdx,
174 const typename FluidSystem::template ParameterCache<Evaluation>&)
178 template <
class TypeTag>
190 OPM_HOST_DEVICE
void updateTemperature_([[maybe_unused]]
const Problem& problem,
191 [[maybe_unused]]
const PrimaryVariables& priVars,
192 [[maybe_unused]]
unsigned globalSpaceIdx,
193 [[maybe_unused]]
unsigned timeIdx)
196 OPM_HOST_DEVICE
void updateEnergyQuantities_([[maybe_unused]]
const Problem& problem,
197 [[maybe_unused]]
const PrimaryVariables& priVars,
198 [[maybe_unused]]
unsigned globalSpaceIdx,
199 [[maybe_unused]]
unsigned timeIdx,
200 const typename FluidSystem::template ParameterCache<Evaluation>&)
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
Definition: BlackOilEnergyIntensiveQuantitiesGlobalIndex.hpp:36
Structs needed for tpfalinearizer and its gpuparams struct extracted to be defined in one place that ...
Definition: blackoilbioeffectsmodules.hh:45
Provides the volumetric quantities required for the equations needed by the energys extension of the ...
Definition: blackoilmodules.hpp:67
Contains the classes required to extend the black-oil model by energy.
Definition: blackoilenergymodules.hh:320
Definition: blackoilenergymodules.hh:515
Definition: blackoilenergymodules.hh:450