27#ifndef EWOMS_VTK_BLACK_OIL_SOLVENT_MODULE_HH
28#define EWOMS_VTK_BLACK_OIL_SOLVENT_MODULE_HH
30#include <dune/common/fvector.hh>
32#include <opm/material/densead/Math.hpp>
61template <
class TypeTag>
72 static const int vtkFormat = getPropValue<TypeTag, Properties::VtkOutputFormat>();
75 enum { enableSolvent = getPropValue<TypeTag, Properties::EnableSolvent>() };
93 Parameters::Register<Parameters::VtkWriteSolventSaturation>
94 (
"Include the \"saturation\" of the solvent component "
95 "in the VTK output files");
96 Parameters::Register<Parameters::VtkWriteSolventRsw>
97 (
"Include the \"dissolved volume in water\" of the solvent component "
98 "in the VTK output files");
99 Parameters::Register<Parameters::VtkWriteSolventDensity>
100 (
"Include the \"density\" of the solvent component "
101 "in the VTK output files");
102 Parameters::Register<Parameters::VtkWriteSolventViscosity>
103 (
"Include the \"viscosity\" of the solvent component "
104 "in the VTK output files");
105 Parameters::Register<Parameters::VtkWriteSolventMobility>
106 (
"Include the \"mobility\" of the solvent component "
107 "in the VTK output files");
116 if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
123 if (solventSaturationOutput_())
125 if (solventRswOutput_())
127 if (solventDensityOutput_())
129 if (solventViscosityOutput_())
131 if (solventMobilityOutput_())
141 if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
148 using Toolbox = MathToolbox<Evaluation>;
149 for (
unsigned dofIdx = 0; dofIdx < elemCtx.numPrimaryDof(0); ++dofIdx) {
150 const auto& intQuants = elemCtx.intensiveQuantities(dofIdx, 0);
151 unsigned globalDofIdx = elemCtx.globalSpaceIndex(dofIdx, 0);
153 if (solventSaturationOutput_())
154 solventSaturation_[globalDofIdx] =
155 Toolbox::scalarValue(intQuants.solventSaturation());
157 if (solventRswOutput_())
158 solventRsw_[globalDofIdx] =
159 Toolbox::scalarValue(intQuants.rsSolw());
161 if (solventDensityOutput_())
162 solventDensity_[globalDofIdx] =
163 Toolbox::scalarValue(intQuants.solventDensity());
165 if (solventViscosityOutput_())
166 solventViscosity_[globalDofIdx] =
167 Toolbox::scalarValue(intQuants.solventViscosity());
169 if (solventMobilityOutput_())
170 solventMobility_[globalDofIdx] =
171 Toolbox::scalarValue(intQuants.solventMobility());
187 if (solventSaturationOutput_())
190 if (solventRswOutput_())
193 if (solventDensityOutput_())
196 if (solventViscosityOutput_())
199 if (solventMobilityOutput_())
204 static bool solventSaturationOutput_()
206 static bool val = Parameters::Get<Parameters::VtkWriteSolventSaturation>();
210 static bool solventRswOutput_()
212 static bool val = Parameters::Get<Parameters::VtkWriteSolventRsw>();
216 static bool solventDensityOutput_()
218 static bool val = Parameters::Get<Parameters::VtkWriteSolventDensity>();
222 static bool solventViscosityOutput_()
224 static bool val = Parameters::Get<Parameters::VtkWriteSolventViscosity>();
228 static bool solventMobilityOutput_()
230 static bool val = Parameters::Get<Parameters::VtkWriteSolventMobility>();
234 ScalarBuffer solventSaturation_;
235 ScalarBuffer solventRsw_;
236 ScalarBuffer solventDensity_;
237 ScalarBuffer solventViscosity_;
238 ScalarBuffer solventMobility_;
Declares the properties required by the black oil model.
The base class for writer modules.
Definition: baseoutputmodule.hh:67
BaseOutputWriter::ScalarBuffer ScalarBuffer
Definition: baseoutputmodule.hh:85
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 solvent related quantities.
Definition: vtkblackoilsolventmodule.hh:63
void commitBuffers(BaseOutputWriter &baseWriter)
Add all buffers to the VTK output writer.
Definition: vtkblackoilsolventmodule.hh:178
static void registerParameters()
Register all run-time parameters for the multi-phase VTK output module.
Definition: vtkblackoilsolventmodule.hh:88
void processElement(const ElementContext &elemCtx)
Modify the internal buffers according to the intensive quantities relevant for an element.
Definition: vtkblackoilsolventmodule.hh:139
VtkBlackOilSolventModule(const Simulator &simulator)
Definition: vtkblackoilsolventmodule.hh:80
void allocBuffers()
Allocate memory for the scalar fields we would like to write to the VTK file.
Definition: vtkblackoilsolventmodule.hh:114
Simplifies writing multi-file VTK datasets.
Definition: vtkmultiwriter.hh:66
Declare the properties used by the infrastructure code of the finite volume discretizations.
Definition: blackoilnewtonmethodparameters.hh:31
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
This file provides the infrastructure to retrieve run-time parameters.
The Opm property system, traits with inheritance.
Definition: vtkblackoilsolventmodule.hh:49
static constexpr bool value
Definition: vtkblackoilsolventmodule.hh:49
Definition: vtkblackoilsolventmodule.hh:51
static constexpr bool value
Definition: vtkblackoilsolventmodule.hh:51
Definition: vtkblackoilsolventmodule.hh:48
static constexpr bool value
Definition: vtkblackoilsolventmodule.hh:48
Definition: vtkblackoilsolventmodule.hh:47
static constexpr bool value
Definition: vtkblackoilsolventmodule.hh:47
Definition: vtkblackoilsolventmodule.hh:50
static constexpr bool value
Definition: vtkblackoilsolventmodule.hh:50