13#ifndef DUMUX_3P2CNI_IO_FIELDS_HH
14#define DUMUX_3P2CNI_IO_FIELDS_HH
29 template <
class OutputModule>
32 using VolumeVariables =
typename OutputModule::VolumeVariables;
33 using FluidSystem =
typename VolumeVariables::FluidSystem;
36 for (
int phaseIdx = 0; phaseIdx < VolumeVariables::numFluidPhases(); ++phaseIdx)
38 out.addVolumeVariable([phaseIdx](
const auto& v){
return v.saturation(phaseIdx); },
39 IOName::saturation<FluidSystem>(phaseIdx));
40 out.addVolumeVariable([phaseIdx](
const auto& v){
return v.pressure(phaseIdx); },
41 IOName::pressure<FluidSystem>(phaseIdx));
42 out.addVolumeVariable([phaseIdx](
const auto& v){
return v.density(phaseIdx); },
43 IOName::density<FluidSystem>(phaseIdx));
44 out.addVolumeVariable([phaseIdx](
const auto& v){
return v.mobility(phaseIdx); },
45 IOName::mobility<FluidSystem>(phaseIdx));
46 out.addVolumeVariable([phaseIdx](
const auto& v){
return v.viscosity(phaseIdx); },
47 IOName::viscosity<FluidSystem>(phaseIdx));
49 for (
int compIdx = 0; compIdx < VolumeVariables::numFluidComponents(); ++compIdx)
50 out.addVolumeVariable([phaseIdx, compIdx](
const auto& v){
return v.moleFraction(phaseIdx, compIdx); },
51 IOName::moleFraction<FluidSystem>(phaseIdx, compIdx));
54 out.addVolumeVariable([](
const auto& v){
return v.porosity(); },
56 out.addVolumeVariable([](
const auto& v){
return v.priVars().state(); },
58 out.addVolumeVariable([](
const auto& v){
return v.permeability(); },
62 template <
class ModelTraits,
class Flu
idSystem,
class Sol
idSystem =
void>
65 using Indices =
typename ModelTraits::Indices;
66 static constexpr auto numEq = ModelTraits::numEq();
67 using StringVec = std::array<std::string, numEq>;
71 case Indices::threePhases:
73 static const StringVec s1 = {IOName::pressure<FluidSystem>(FluidSystem::gPhaseIdx),
74 IOName::saturation<FluidSystem>(FluidSystem::wPhaseIdx),
75 IOName::saturation<FluidSystem>(FluidSystem::nPhaseIdx)};
78 case Indices::wPhaseOnly:
80 static const StringVec s2 = {IOName::pressure<FluidSystem>(FluidSystem::wPhaseIdx),
82 IOName::moleFraction<FluidSystem>(FluidSystem::wPhaseIdx, FluidSystem::nCompIdx)};
85 case Indices::gnPhaseOnly:
87 static const StringVec s3 = {IOName::pressure<FluidSystem>(FluidSystem::gPhaseIdx),
88 IOName::saturation<FluidSystem>(FluidSystem::nPhaseIdx),
89 IOName::moleFraction<FluidSystem>(FluidSystem::nPhaseIdx, FluidSystem::wCompIdx)};
92 case Indices::wnPhaseOnly:
94 static const StringVec s4 = {IOName::pressure<FluidSystem>(FluidSystem::wPhaseIdx),
96 IOName::saturation<FluidSystem>(FluidSystem::nPhaseIdx)};
99 case Indices::gPhaseOnly:
101 static const StringVec s5 = {IOName::pressure<FluidSystem>(FluidSystem::gPhaseIdx),
103 IOName::moleFraction<FluidSystem>(FluidSystem::gPhaseIdx, FluidSystem::nCompIdx)};
106 case Indices::wgPhaseOnly:
108 static const StringVec s6 = {IOName::pressure<FluidSystem>(FluidSystem::gPhaseIdx),
109 IOName::saturation<FluidSystem>(FluidSystem::wPhaseIdx),
110 IOName::moleFraction<FluidSystem>(FluidSystem::gPhaseIdx, FluidSystem::nCompIdx)};
Adds I/O fields specific to the three-phase three-component model.
Definition: porousmediumflow/3pwateroil/iofields.hh:26
static void initOutputModule(OutputModule &out)
Definition: porousmediumflow/3pwateroil/iofields.hh:30
static std::string primaryVariableName(int pvIdx, int state)
Definition: porousmediumflow/3pwateroil/iofields.hh:63
A collection of input/output field names for common physical quantities.
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:39
std::string phasePresence() noexcept
I/O name of phase presence.
Definition: name.hh:135
std::string permeability() noexcept
I/O name of permeability.
Definition: name.hh:131
std::string porosity() noexcept
I/O name of porosity.
Definition: name.hh:127
Adds I/O fields specific to the three-phase three-component model.