27 #ifndef EWOMS_VTK_ENERGY_MODULE_HH
28 #define EWOMS_VTK_ENERGY_MODULE_HH
36 #include <opm/material/common/MathToolbox.hpp>
39 namespace Properties {
72 template <
class TypeTag>
78 typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
79 typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
80 typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
81 typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
83 typedef typename ParentType::ScalarBuffer ScalarBuffer;
84 typedef typename ParentType::PhaseBuffer PhaseBuffer;
86 static const int vtkFormat =
GET_PROP_VALUE(TypeTag, VtkOutputFormat);
89 typedef typename Opm::MathToolbox<Evaluation> Toolbox;
104 "Include the specific heat capacities of rock "
105 "matrix in the VTK output files");
107 "Include the lumped heat conductivity of the "
108 "medium in the VTK output files");
110 "Include the specific enthalpy of the phases in "
111 "the VTK output files");
113 "Include the specific internal energy of the "
114 "phases in the VTK output files");
123 if (enthalpyOutput_())
125 if (internalEnergyOutput_())
128 if (solidHeatCapacityOutput_())
130 if (heatConductivityOutput_())
143 for (
unsigned i = 0; i < elemCtx.numPrimaryDof(0); ++i) {
144 unsigned I = elemCtx.globalSpaceIndex(i, 0);
145 const auto& intQuants = elemCtx.intensiveQuantities(i, 0);
146 const auto& fs = intQuants.fluidState();
148 if (solidHeatCapacityOutput_())
149 solidHeatCapacity_[I] = Toolbox::value(intQuants.heatCapacitySolid());
150 if (heatConductivityOutput_())
151 heatConductivity_[I] = Toolbox::value(intQuants.heatConductivity());
153 for (
unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
154 if (enthalpyOutput_())
155 enthalpy_[phaseIdx][I] = Toolbox::value(fs.enthalpy(phaseIdx));
156 if (internalEnergyOutput_())
157 internalEnergy_[phaseIdx][I] = Toolbox::value(fs.internalEnergy(phaseIdx));
172 if (solidHeatCapacityOutput_())
174 if (heatConductivityOutput_())
177 if (enthalpyOutput_())
179 if (internalEnergyOutput_())
184 static bool solidHeatCapacityOutput_()
187 static bool heatConductivityOutput_()
190 static bool enthalpyOutput_()
193 static bool internalEnergyOutput_()
196 PhaseBuffer enthalpy_;
197 PhaseBuffer internalEnergy_;
199 ScalarBuffer heatConductivity_;
200 ScalarBuffer solidHeatCapacity_;
The base class for all output writers.
Definition: baseoutputwriter.hh:43
#define SET_BOOL_PROP(EffTypeTagName, PropTagName,...)
Set a property to a simple constant boolean value.
Definition: propertysystem.hh:361
static void registerParameters()
Register all run-time parameters for the Vtk output module.
Definition: vtkenergymodule.hh:101
void commitPhaseBuffer_(BaseOutputWriter &baseWriter, const char *pattern, PhaseBuffer &buffer, BufferType bufferType=DofBuffer)
Add a phase-specific buffer to the result file.
Definition: baseoutputmodule.hh:408
Simplifies writing multi-file VTK datasets.
Definition: vtkmultiwriter.hh:63
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:305
#define GET_PROP_VALUE(TypeTag, PropTagName)
Access the value attribute of a property for a type tag.
Definition: propertysystem.hh:469
The base class for writer modules.
#define NEW_TYPE_TAG(...)
Define a new type tag.
Definition: propertysystem.hh:169
#define EWOMS_REGISTER_PARAM(TypeTag, ParamType, ParamName, Description)
Register a run-time parameter.
Definition: parametersystem.hh:68
This file provides the infrastructure to retrieve run-time parameters.
The base class for writer modules.
Definition: baseoutputmodule.hh:80
void processElement(const ElementContext &elemCtx)
Modify the internal buffers according to the intensive quanties relevant for an element.
Definition: vtkenergymodule.hh:138
void commitBuffers(BaseOutputWriter &baseWriter)
Add all buffers to the VTK output writer.
Definition: vtkenergymodule.hh:165
#define EWOMS_GET_PARAM(TypeTag, ParamType, ParamName)
Retrieve a runtime parameter.
Definition: parametersystem.hh:99
void resizePhaseBuffer_(PhaseBuffer &buffer, BufferType bufferType=DofBuffer)
Allocate the space for a buffer storing a phase-specific quantity.
Definition: baseoutputmodule.hh:235
Provides the magic behind the eWoms property system.
void resizeScalarBuffer_(ScalarBuffer &buffer, BufferType bufferType=DofBuffer)
Allocate the space for a buffer storing a scalar quantity.
Definition: baseoutputmodule.hh:170
Simplifies writing multi-file VTK datasets.
VTK output module for quantities which make sense for models which assume thermal equilibrium...
Definition: vtkenergymodule.hh:73
Manages the initializing and running of time dependent problems.
Definition: simulator.hh:75
#define NEW_PROP_TAG(PTagName)
Define a property tag.
Definition: propertysystem.hh:247
void allocBuffers()
Allocate memory for the scalar fields we would like to write to the VTK file.
Definition: vtkenergymodule.hh:121