27 #ifndef EWOMS_VTK_BLACK_OIL_SOLVENT_MODULE_HH
28 #define EWOMS_VTK_BLACK_OIL_SOLVENT_MODULE_HH
30 #include <opm/material/densead/Math.hpp>
39 #include <dune/common/fvector.hh>
44 namespace Properties {
57 SET_BOOL_PROP(VtkBlackOilSolvent, VtkWriteSolventSaturation,
true);
58 SET_BOOL_PROP(VtkBlackOilSolvent, VtkWriteSolventDensity,
true);
59 SET_BOOL_PROP(VtkBlackOilSolvent, VtkWriteSolventViscosity,
true);
60 SET_BOOL_PROP(VtkBlackOilSolvent, VtkWriteSolventMobility,
true);
70 template <
class TypeTag>
76 typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
77 typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
78 typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
79 typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
81 static const int vtkFormat =
GET_PROP_VALUE(TypeTag, VtkOutputFormat);
86 typedef typename ParentType::ScalarBuffer ScalarBuffer;
103 "Include the \"saturation\" of the solvent component "
104 "in the VTK output files");
106 "Include the \"density\" of the solvent component "
107 "in the VTK output files");
109 "Include the \"viscosity\" of the solvent component "
110 "in the VTK output files");
112 "Include the \"mobility\" of the solvent component "
113 "in the VTK output files");
128 if (solventSaturationOutput_())
130 if (solventDensityOutput_())
132 if (solventViscosityOutput_())
134 if (solventMobilityOutput_())
150 typedef Opm::MathToolbox<Evaluation> Toolbox;
151 for (
unsigned dofIdx = 0; dofIdx < elemCtx.numPrimaryDof(0); ++dofIdx) {
152 const auto& intQuants = elemCtx.intensiveQuantities(dofIdx, 0);
153 unsigned globalDofIdx = elemCtx.globalSpaceIndex(dofIdx, 0);
155 if (solventSaturationOutput_())
156 solventSaturation_[globalDofIdx] =
157 Toolbox::scalarValue(intQuants.solventSaturation());
159 if (solventDensityOutput_())
160 solventDensity_[globalDofIdx] =
161 Toolbox::scalarValue(intQuants.solventDensity());
163 if (solventViscosityOutput_())
164 solventViscosity_[globalDofIdx] =
165 Toolbox::scalarValue(intQuants.solventViscosity());
167 if (solventMobilityOutput_())
168 solventMobility_[globalDofIdx] =
169 Toolbox::scalarValue(intQuants.solventMobility());
185 if (solventSaturationOutput_())
188 if (solventDensityOutput_())
191 if (solventViscosityOutput_())
194 if (solventMobilityOutput_())
199 static bool solventSaturationOutput_()
202 static bool solventDensityOutput_()
205 static bool solventViscosityOutput_()
208 static bool solventMobilityOutput_()
211 ScalarBuffer solventSaturation_;
212 ScalarBuffer solventDensity_;
213 ScalarBuffer solventViscosity_;
214 ScalarBuffer solventMobility_;
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 multi-phase VTK output module.
Definition: vtkblackoilsolventmodule.hh:97
void allocBuffers()
Allocate memory for the scalar fields we would like to write to the VTK file.
Definition: vtkblackoilsolventmodule.hh:120
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
VTK output module for the black oil model's solvent related quantities.
Definition: vtkblackoilsolventmodule.hh:71
void commitBuffers(BaseOutputWriter &baseWriter)
Add all buffers to the VTK output writer.
Definition: vtkblackoilsolventmodule.hh:176
#define EWOMS_REGISTER_PARAM(TypeTag, ParamType, ParamName, Description)
Register a run-time parameter.
Definition: parametersystem.hh:68
Declares the properties required by the black oil model.
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 quantities relevant for an element...
Definition: vtkblackoilsolventmodule.hh:142
#define EWOMS_GET_PARAM(TypeTag, ParamType, ParamName)
Retrieve a runtime parameter.
Definition: parametersystem.hh:99
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.
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