27#ifndef OPM_VTK_BLACK_OIL_ENERGY_MODULE_HPP
28#define OPM_VTK_BLACK_OIL_ENERGY_MODULE_HPP
30#include <dune/common/fvector.hh>
32#include <opm/material/densead/Math.hpp>
52template <
class TypeTag>
70 using ScalarBuffer =
typename ParentType::ScalarBuffer;
71 using PhaseBuffer =
typename ParentType::PhaseBuffer;
77 if constexpr (enableEnergy) {
88 if constexpr (enableEnergy) {
99 if constexpr (enableEnergy) {
100 if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
104 if (params_.rockInternalEnergyOutput_) {
107 if (params_.totalThermalConductivityOutput_) {
110 if (params_.fluidInternalEnergiesOutput_) {
113 if (params_.fluidEnthalpiesOutput_) {
125 if constexpr (enableEnergy) {
126 if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
130 for (
unsigned dofIdx = 0; dofIdx < elemCtx.numPrimaryDof(0); ++dofIdx) {
131 const auto& intQuants = elemCtx.intensiveQuantities(dofIdx, 0);
132 unsigned globalDofIdx = elemCtx.globalSpaceIndex(dofIdx, 0);
134 if (params_.rockInternalEnergyOutput_) {
135 rockInternalEnergy_[globalDofIdx] =
136 scalarValue(intQuants.rockInternalEnergy());
139 if (params_.totalThermalConductivityOutput_) {
140 totalThermalConductivity_[globalDofIdx] =
141 scalarValue(intQuants.totalThermalConductivity());
144 for (
int phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx) {
145 if (FluidSystem::phaseIsActive(phaseIdx)) {
146 if (params_.fluidInternalEnergiesOutput_) {
147 fluidInternalEnergies_[phaseIdx][globalDofIdx] =
148 scalarValue(intQuants.fluidState().internalEnergy(phaseIdx));
151 if (params_.fluidEnthalpiesOutput_) {
152 fluidEnthalpies_[phaseIdx][globalDofIdx] =
153 scalarValue(intQuants.fluidState().enthalpy(phaseIdx));
166 if constexpr (enableEnergy) {
172 if (params_.rockInternalEnergyOutput_) {
173 this->
commitScalarBuffer_(baseWriter,
"volumetric internal energy rock", rockInternalEnergy_);
176 if (params_.totalThermalConductivityOutput_) {
177 this->
commitScalarBuffer_(baseWriter,
"total thermal conductivity", totalThermalConductivity_);
180 if (params_.fluidInternalEnergiesOutput_) {
184 if (params_.fluidEnthalpiesOutput_) {
193 ScalarBuffer rockInternalEnergy_{};
194 ScalarBuffer totalThermalConductivity_{};
195 PhaseBuffer fluidInternalEnergies_{};
196 PhaseBuffer fluidEnthalpies_{};
The base class for writer modules.
Declares the properties required by the black oil model.
The base class for writer modules.
Definition baseoutputmodule.hh:67
void commitPhaseBuffer_(BaseOutputWriter &baseWriter, const char *pattern, PhaseBuffer &buffer, BufferType bufferType=DofBuffer)
Add a phase-specific buffer to the result file.
Definition baseoutputmodule.hh:345
void resizePhaseBuffer_(PhaseBuffer &buffer, BufferType bufferType=DofBuffer)
Allocate the space for a buffer storing a phase-specific quantity.
Definition baseoutputmodule.hh:201
void commitScalarBuffer_(BaseOutputWriter &baseWriter, const char *name, ScalarBuffer &buffer, BufferType bufferType=DofBuffer)
Add a buffer containing scalar quantities to the result file.
Definition baseoutputmodule.hh:244
void resizeScalarBuffer_(ScalarBuffer &buffer, BufferType bufferType=DofBuffer)
Allocate the space for a buffer storing a scalar quantity.
Definition baseoutputmodule.hh:156
The base class for all output writers.
Definition baseoutputwriter.hh:44
VTK output module for the black oil model's energy related quantities.
Definition vtkblackoilenergymodule.hpp:54
void allocBuffers()
Allocate memory for the scalar fields we would like to write to the VTK file.
Definition vtkblackoilenergymodule.hpp:97
void commitBuffers(BaseOutputWriter &baseWriter)
Add all buffers to the VTK output writer.
Definition vtkblackoilenergymodule.hpp:164
static void registerParameters()
Register all run-time parameters for the multi-phase VTK output module.
Definition vtkblackoilenergymodule.hpp:86
void processElement(const ElementContext &elemCtx)
Modify the internal buffers according to the intensive quantities relevant for an element.
Definition vtkblackoilenergymodule.hpp:123
Simplifies writing multi-file VTK datasets.
Definition vtkmultiwriter.hh:66
Declare the properties used by the infrastructure code of the finite volume discretizations.
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilboundaryratevector.hh:37
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:235
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242
This file provides the infrastructure to retrieve run-time parameters.
The Opm property system, traits with inheritance.
Struct holding the parameters for VtkBlackoilEnergyOutputModule.
Definition vtkblackoilenergyparams.hpp:46
void read()
Reads the parameter values from the parameter system.
Definition vtkblackoilenergyparams.cpp:45
static void registerParameters()
Registers the parameters in parameter system.
Definition vtkblackoilenergyparams.cpp:31
VTK output module for the black oil model's energy related quantities.
Simplifies writing multi-file VTK datasets.