13#ifndef DUMUX_THREEPTHREEC_IO_FIELDS_HH
14#define DUMUX_THREEPTHREEC_IO_FIELDS_HH
28 template <
class OutputModule>
31 using VolumeVariables =
typename OutputModule::VolumeVariables;
32 using FluidSystem =
typename VolumeVariables::FluidSystem;
35 for (
int phaseIdx = 0; phaseIdx < VolumeVariables::numFluidPhases(); ++phaseIdx)
37 out.addVolumeVariable( [phaseIdx](
const auto& v){
return v.saturation(phaseIdx); },
38 IOName::saturation<FluidSystem>(phaseIdx));
39 out.addVolumeVariable( [phaseIdx](
const auto& v){
return v.pressure(phaseIdx); },
40 IOName::pressure<FluidSystem>(phaseIdx));
41 out.addVolumeVariable( [phaseIdx](
const auto& v){
return v.density(phaseIdx); },
42 IOName::density<FluidSystem>(phaseIdx));
44 for (
int compIdx = 0; compIdx < VolumeVariables::numFluidComponents(); ++compIdx)
45 out.addVolumeVariable([phaseIdx, compIdx](
const auto& v){
return v.moleFraction(phaseIdx, compIdx); },
46 IOName::moleFraction<FluidSystem>(phaseIdx, compIdx));
49 out.addVolumeVariable( [](
const auto& v){
return v.porosity(); },
51 out.addVolumeVariable( [](
const auto& v){
return v.priVars().state(); },
53 out.addVolumeVariable( [](
const auto& v){
return v.permeability(); },
57 template <
class ModelTraits,
class Flu
idSystem,
class Sol
idSystem =
void>
60 using Indices =
typename ModelTraits::Indices;
61 static constexpr auto numEq = ModelTraits::numEq();
62 using StringVec = std::array<std::string, numEq>;
66 case Indices::threePhases:
68 static const StringVec s1 = {IOName::pressure<FluidSystem>(FluidSystem::gPhaseIdx),
69 IOName::saturation<FluidSystem>(FluidSystem::wPhaseIdx),
70 IOName::saturation<FluidSystem>(FluidSystem::nPhaseIdx)};
73 case Indices::wPhaseOnly:
75 static const StringVec s2 = {IOName::pressure<FluidSystem>(FluidSystem::gPhaseIdx),
76 IOName::moleFraction<FluidSystem>(FluidSystem::wPhaseIdx, FluidSystem::gCompIdx),
77 IOName::moleFraction<FluidSystem>(FluidSystem::wPhaseIdx, FluidSystem::nCompIdx)};
80 case Indices::gnPhaseOnly:
82 static const StringVec s3 = {IOName::pressure<FluidSystem>(FluidSystem::gPhaseIdx),
83 IOName::moleFraction<FluidSystem>(FluidSystem::gPhaseIdx, FluidSystem::wCompIdx),
84 IOName::saturation<FluidSystem>(FluidSystem::nPhaseIdx)};
87 case Indices::wnPhaseOnly:
89 static const StringVec s4 = {IOName::pressure<FluidSystem>(FluidSystem::gPhaseIdx),
90 IOName::moleFraction<FluidSystem>(FluidSystem::wPhaseIdx, FluidSystem::gCompIdx),
91 IOName::saturation<FluidSystem>(FluidSystem::nPhaseIdx)};
94 case Indices::gPhaseOnly:
96 static const StringVec s5 = {IOName::pressure<FluidSystem>(FluidSystem::gPhaseIdx),
97 IOName::moleFraction<FluidSystem>(FluidSystem::gPhaseIdx, FluidSystem::wCompIdx),
98 IOName::moleFraction<FluidSystem>(FluidSystem::gPhaseIdx, FluidSystem::nCompIdx)};
101 case Indices::wgPhaseOnly:
103 static const StringVec s6 = {IOName::pressure<FluidSystem>(FluidSystem::gPhaseIdx),
104 IOName::saturation<FluidSystem>(FluidSystem::wPhaseIdx),
105 IOName::moleFraction<FluidSystem>(FluidSystem::gPhaseIdx, FluidSystem::nCompIdx)};
Adds I/O fields specific to the three-phase three-component model.
Definition: porousmediumflow/3p3c/iofields.hh:26
static std::string primaryVariableName(int pvIdx, int state)
Definition: porousmediumflow/3p3c/iofields.hh:58
static void initOutputModule(OutputModule &out)
Definition: porousmediumflow/3p3c/iofields.hh:29
A collection of input/output field names for common physical quantities.
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