25#ifndef DUMUX_THREEPTHREEC_IO_FIELDS_HH
26#define DUMUX_THREEPTHREEC_IO_FIELDS_HH
40 template <
class OutputModule>
43 using VolumeVariables =
typename OutputModule::VolumeVariables;
44 using FluidSystem =
typename VolumeVariables::FluidSystem;
47 for (
int phaseIdx = 0; phaseIdx < VolumeVariables::numFluidPhases(); ++phaseIdx)
49 out.addVolumeVariable( [phaseIdx](
const auto& v){
return v.saturation(phaseIdx); },
50 IOName::saturation<FluidSystem>(phaseIdx));
51 out.addVolumeVariable( [phaseIdx](
const auto& v){
return v.pressure(phaseIdx); },
52 IOName::pressure<FluidSystem>(phaseIdx));
53 out.addVolumeVariable( [phaseIdx](
const auto& v){
return v.density(phaseIdx); },
54 IOName::density<FluidSystem>(phaseIdx));
56 for (
int compIdx = 0; compIdx < VolumeVariables::numFluidComponents(); ++compIdx)
57 out.addVolumeVariable([phaseIdx, compIdx](
const auto& v){
return v.moleFraction(phaseIdx, compIdx); },
58 IOName::moleFraction<FluidSystem>(phaseIdx, compIdx));
61 out.addVolumeVariable( [](
const auto& v){
return v.porosity(); },
63 out.addVolumeVariable( [](
const auto& v){
return v.priVars().state(); },
65 out.addVolumeVariable( [](
const auto& v){
return v.permeability(); },
69 template <
class ModelTraits,
class Flu
idSystem,
class Sol
idSystem =
void>
72 using Indices =
typename ModelTraits::Indices;
73 static constexpr auto numEq = ModelTraits::numEq();
74 using StringVec = std::array<std::string, numEq>;
78 case Indices::threePhases:
80 static const StringVec s1 = {IOName::pressure<FluidSystem>(FluidSystem::gPhaseIdx),
81 IOName::saturation<FluidSystem>(FluidSystem::wPhaseIdx),
82 IOName::saturation<FluidSystem>(FluidSystem::nPhaseIdx)};
85 case Indices::wPhaseOnly:
87 static const StringVec s2 = {IOName::pressure<FluidSystem>(FluidSystem::gPhaseIdx),
88 IOName::moleFraction<FluidSystem>(FluidSystem::wPhaseIdx, FluidSystem::gCompIdx),
89 IOName::moleFraction<FluidSystem>(FluidSystem::wPhaseIdx, FluidSystem::nCompIdx)};
92 case Indices::gnPhaseOnly:
94 static const StringVec s3 = {IOName::pressure<FluidSystem>(FluidSystem::gPhaseIdx),
95 IOName::moleFraction<FluidSystem>(FluidSystem::gPhaseIdx, FluidSystem::wCompIdx),
96 IOName::saturation<FluidSystem>(FluidSystem::nPhaseIdx)};
99 case Indices::wnPhaseOnly:
101 static const StringVec s4 = {IOName::pressure<FluidSystem>(FluidSystem::gPhaseIdx),
102 IOName::moleFraction<FluidSystem>(FluidSystem::wPhaseIdx, FluidSystem::gCompIdx),
103 IOName::saturation<FluidSystem>(FluidSystem::nPhaseIdx)};
106 case Indices::gPhaseOnly:
108 static const StringVec s5 = {IOName::pressure<FluidSystem>(FluidSystem::gPhaseIdx),
109 IOName::moleFraction<FluidSystem>(FluidSystem::gPhaseIdx, FluidSystem::wCompIdx),
110 IOName::moleFraction<FluidSystem>(FluidSystem::gPhaseIdx, FluidSystem::nCompIdx)};
113 case Indices::wgPhaseOnly:
115 static const StringVec s6 = {IOName::pressure<FluidSystem>(FluidSystem::gPhaseIdx),
116 IOName::saturation<FluidSystem>(FluidSystem::wPhaseIdx),
117 IOName::moleFraction<FluidSystem>(FluidSystem::gPhaseIdx, FluidSystem::nCompIdx)};
A collection of input/output field names for common physical quantities.
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
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/3p3c/iofields.hh:38
static std::string primaryVariableName(int pvIdx, int state)
Definition: porousmediumflow/3p3c/iofields.hh:70
static void initOutputModule(OutputModule &out)
Definition: porousmediumflow/3p3c/iofields.hh:41