25#ifndef DUMUX_3P2CNI_IO_FIELDS_HH
26#define DUMUX_3P2CNI_IO_FIELDS_HH
41 template <
class OutputModule>
44 using VolumeVariables =
typename OutputModule::VolumeVariables;
45 using FluidSystem =
typename VolumeVariables::FluidSystem;
48 for (
int phaseIdx = 0; phaseIdx < VolumeVariables::numFluidPhases(); ++phaseIdx)
50 out.addVolumeVariable([phaseIdx](
const auto& v){
return v.saturation(phaseIdx); },
51 IOName::saturation<FluidSystem>(phaseIdx));
52 out.addVolumeVariable([phaseIdx](
const auto& v){
return v.pressure(phaseIdx); },
53 IOName::pressure<FluidSystem>(phaseIdx));
54 out.addVolumeVariable([phaseIdx](
const auto& v){
return v.density(phaseIdx); },
55 IOName::density<FluidSystem>(phaseIdx));
56 out.addVolumeVariable([phaseIdx](
const auto& v){
return v.mobility(phaseIdx); },
57 IOName::mobility<FluidSystem>(phaseIdx));
58 out.addVolumeVariable([phaseIdx](
const auto& v){
return v.viscosity(phaseIdx); },
59 IOName::viscosity<FluidSystem>(phaseIdx));
61 for (
int compIdx = 0; compIdx < VolumeVariables::numFluidComponents(); ++compIdx)
62 out.addVolumeVariable([phaseIdx, compIdx](
const auto& v){
return v.moleFraction(phaseIdx, compIdx); },
63 IOName::moleFraction<FluidSystem>(phaseIdx, compIdx));
66 out.addVolumeVariable([](
const auto& v){
return v.porosity(); },
68 out.addVolumeVariable([](
const auto& v){
return v.priVars().state(); },
70 out.addVolumeVariable([](
const auto& v){
return v.permeability(); },
74 template <
class ModelTraits,
class Flu
idSystem,
class Sol
idSystem =
void>
77 using Indices =
typename ModelTraits::Indices;
78 static constexpr auto numEq = ModelTraits::numEq();
79 using StringVec = std::array<std::string, numEq>;
83 case Indices::threePhases:
85 static const StringVec s1 = {IOName::pressure<FluidSystem>(FluidSystem::gPhaseIdx),
86 IOName::saturation<FluidSystem>(FluidSystem::wPhaseIdx),
87 IOName::saturation<FluidSystem>(FluidSystem::nPhaseIdx)};
90 case Indices::wPhaseOnly:
92 static const StringVec s2 = {IOName::pressure<FluidSystem>(FluidSystem::wPhaseIdx),
94 IOName::moleFraction<FluidSystem>(FluidSystem::wPhaseIdx, FluidSystem::nCompIdx)};
97 case Indices::gnPhaseOnly:
99 static const StringVec s3 = {IOName::pressure<FluidSystem>(FluidSystem::gPhaseIdx),
100 IOName::saturation<FluidSystem>(FluidSystem::nPhaseIdx),
101 IOName::moleFraction<FluidSystem>(FluidSystem::nPhaseIdx, FluidSystem::wCompIdx)};
104 case Indices::wnPhaseOnly:
106 static const StringVec s4 = {IOName::pressure<FluidSystem>(FluidSystem::wPhaseIdx),
108 IOName::saturation<FluidSystem>(FluidSystem::nPhaseIdx)};
111 case Indices::gPhaseOnly:
113 static const StringVec s5 = {IOName::pressure<FluidSystem>(FluidSystem::gPhaseIdx),
115 IOName::moleFraction<FluidSystem>(FluidSystem::gPhaseIdx, FluidSystem::nCompIdx)};
118 case Indices::wgPhaseOnly:
120 static const StringVec s6 = {IOName::pressure<FluidSystem>(FluidSystem::gPhaseIdx),
121 IOName::saturation<FluidSystem>(FluidSystem::wPhaseIdx),
122 IOName::moleFraction<FluidSystem>(FluidSystem::gPhaseIdx, FluidSystem::nCompIdx)};
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:51
std::string phasePresence() noexcept
I/O name of phase presence.
Definition: name.hh:147
std::string permeability() noexcept
I/O name of permeability.
Definition: name.hh:143
std::string porosity() noexcept
I/O name of porosity.
Definition: name.hh:139
Adds I/O fields specific to the three-phase three-component model.
Definition: porousmediumflow/3pwateroil/iofields.hh:38
static void initOutputModule(OutputModule &out)
Definition: porousmediumflow/3pwateroil/iofields.hh:42
static std::string primaryVariableName(int pvIdx, int state)
Definition: porousmediumflow/3pwateroil/iofields.hh:75
Adds I/O fields specific to the three-phase three-component model.