13#ifndef DUMUX_TRACER_IO_FIELDS_HH
14#define DUMUX_TRACER_IO_FIELDS_HH
29 template <
class OutputModule>
32 using VolumeVariables =
typename OutputModule::VolumeVariables;
33 using FluidSystem =
typename VolumeVariables::FluidSystem;
36 for (
int compIdx = 0; compIdx < VolumeVariables::numFluidComponents(); ++compIdx)
38 out.addVolumeVariable([compIdx](
const auto& v){
return v.moleFraction(0, compIdx); },
39 "x^" + FluidSystem::componentName(compIdx));
40 out.addVolumeVariable([compIdx](
const auto& v){
return v.massFraction(0, compIdx); },
41 "X^" + FluidSystem::componentName(compIdx));
43 out.addVolumeVariable( [](
const auto& v){
return v.density(); },
IOName::density());
46 template <
class ModelTraits,
class Flu
idSystem,
class Sol
idSystem =
void>
49 const std::string xString = ModelTraits::useMoles() ?
"x" :
"X";
50 return xString +
"^" + FluidSystem::componentName(pvIdx);
Adds I/O fields specific to the tracer model.
Definition: porousmediumflow/tracer/iofields.hh:27
static std::string primaryVariableName(int pvIdx, int state=0)
Definition: porousmediumflow/tracer/iofields.hh:47
static void initOutputModule(OutputModule &out)
Definition: porousmediumflow/tracer/iofields.hh:30
A collection of input/output field names for common physical quantities.
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.hh:53