27#ifndef OPM_VTK_COMPOSITION_MODULE_HPP
28#define OPM_VTK_COMPOSITION_MODULE_HPP
30#include <opm/material/common/MathToolbox.hpp>
55template <
class TypeTag>
73 using ComponentBuffer =
typename ParentType::ComponentBuffer;
74 using PhaseComponentBuffer =
typename ParentType::PhaseComponentBuffer;
97 if (params_.moleFracOutput_) {
100 if (params_.massFracOutput_) {
103 if (params_.totalMassFracOutput_) {
106 if (params_.totalMoleFracOutput_) {
109 if (params_.molarityOutput_) {
113 if (params_.fugacityOutput_) {
116 if (params_.fugacityCoeffOutput_) {
129 if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
133 for (
unsigned i = 0; i < elemCtx.numPrimaryDof(0); ++i) {
134 unsigned I = elemCtx.globalSpaceIndex(i, 0);
135 const auto& intQuants = elemCtx.intensiveQuantities(i, 0);
136 const auto& fs = intQuants.fluidState();
140 if (params_.moleFracOutput_) {
143 if (params_.massFracOutput_) {
146 if (params_.molarityOutput_) {
150 if (params_.fugacityCoeffOutput_) {
158 if (params_.totalMassFracOutput_) {
164 Toolbox::value(fs.density(
phaseIdx))
165 *Toolbox::value(fs.saturation(
phaseIdx))
170 if (params_.totalMoleFracOutput_) {
175 Toolbox::value(fs.molarDensity(
phaseIdx))
176 *Toolbox::value(fs.saturation(
phaseIdx));
178 Toolbox::value(fs.molarDensity(
phaseIdx))
179 *Toolbox::value(fs.saturation(
phaseIdx))
184 if (params_.fugacityOutput_) {
185 fugacity_[
compIdx][I] = Toolbox::value(intQuants.fluidState().fugacity(0,
compIdx));
201 if (params_.moleFracOutput_) {
204 if (params_.massFracOutput_) {
207 if (params_.molarityOutput_) {
210 if (params_.totalMassFracOutput_) {
213 if (params_.totalMoleFracOutput_) {
217 if (params_.fugacityOutput_) {
220 if (params_.fugacityCoeffOutput_) {
227 PhaseComponentBuffer moleFrac_{};
228 PhaseComponentBuffer massFrac_{};
229 PhaseComponentBuffer molarity_{};
230 ComponentBuffer totalMassFrac_{};
231 ComponentBuffer totalMoleFrac_{};
233 ComponentBuffer fugacity_{};
234 PhaseComponentBuffer fugacityCoeff_{};
The base class for writer modules.
The base class for writer modules.
Definition baseoutputmodule.hh:67
void commitComponentBuffer_(BaseOutputWriter &baseWriter, const char *pattern, ComponentBuffer &buffer, BufferType bufferType=DofBuffer)
Add a component-specific buffer to the result file.
Definition baseoutputmodule.hh:361
void resizeComponentBuffer_(ComponentBuffer &buffer, BufferType bufferType=DofBuffer)
Allocate the space for a buffer storing a component specific quantity.
Definition baseoutputmodule.hh:215
void resizePhaseComponentBuffer_(PhaseComponentBuffer &buffer, BufferType bufferType=DofBuffer)
Allocate the space for a buffer storing a phase and component specific buffer.
Definition baseoutputmodule.hh:229
void commitPhaseComponentBuffer_(BaseOutputWriter &baseWriter, const char *pattern, PhaseComponentBuffer &buffer, BufferType bufferType=DofBuffer)
Add a phase and component specific quantities to the output.
Definition baseoutputmodule.hh:377
The base class for all output writers.
Definition baseoutputwriter.hh:44
VTK output module for the fluid composition.
Definition vtkcompositionmodule.hpp:57
void processElement(const ElementContext &elemCtx) override
Modify the internal buffers according to the intensive quantities relevant for an element.
Definition vtkcompositionmodule.hpp:125
void commitBuffers(BaseOutputWriter &baseWriter) override
Add all buffers to the VTK output writer.
Definition vtkcompositionmodule.hpp:194
void allocBuffers() override
Allocate memory for the scalar fields we would like to write to the VTK file.
Definition vtkcompositionmodule.hpp:95
static void registerParameters()
Register all run-time parameters for the Vtk output module.
Definition vtkcompositionmodule.hpp:86
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
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242
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.
Struct holding the parameters for VtkCompositionModule.
Definition vtkcompositionparams.hpp:49
static void registerParameters()
Registers the parameters in parameter system.
Definition vtkcompositionparams.cpp:31
void read()
Reads the parameter values from the parameter system.
Definition vtkcompositionparams.cpp:49
VTK output module for the fluid composition.
Simplifies writing multi-file VTK datasets.