12#ifndef DUMUX_NAVIERSTOKES_MASS_1PNC_IO_FIELDS_HH
13#define DUMUX_NAVIERSTOKES_MASS_1PNC_IO_FIELDS_HH
24template<
class BaseOutputFields,
bool turbulenceModel = false>
28 template <
class OutputModule>
31 BaseOutputFields::initOutputModule(out);
36 using FluidSystem =
typename OutputModule::VolumeVariables::FluidSystem;
37 for (
int j = 0; j < FluidSystem::numComponents; ++j)
39 out.addVolumeVariable([j](
const auto& v){
return v.massFraction(j); }, IOName::massFraction<FluidSystem>(0, j));
40 out.addVolumeVariable([j](
const auto& v){
return v.moleFraction(j); }, IOName::moleFraction<FluidSystem>(0, j));
42 if (j != FluidSystem::getMainComponent(0))
44 out.addVolumeVariable([j](
const auto& v){
return v.diffusionCoefficient(0,0, j); },
"D^" + FluidSystem::componentName(j) +
"_" + FluidSystem::phaseName(0));
48 out.addVolumeVariable([j](
const auto& v){
return getEffectiveDiffusionCoefficient_(v, 0, j) - v.diffusionCoefficient(0,0, j); },
"D_t^" + FluidSystem::componentName(j) +
"_" + FluidSystem::phaseName(0));
54 template <
class ModelTraits,
class Flu
idSystem>
58 if (pvIdx > ModelTraits::dim() && pvIdx < ModelTraits::dim() + ModelTraits::numFluidComponents())
59 return ModelTraits::useMoles() ? IOName::moleFraction<FluidSystem>(0, pvIdx - ModelTraits::dim())
60 : IOName::massFraction<FluidSystem>(0, pvIdx - ModelTraits::dim());
62 return BaseOutputFields::template primaryVariableName<ModelTraits, FluidSystem>(pvIdx, state);
66 template<
class VolumeVariables>
69 return volVars.effectiveDiffusionCoefficient(phaseIdx, VolumeVariables::FluidSystem::getMainComponent(phaseIdx), compIdx);
A collection of input/output field names for common physical quantities.
std::string molarDensity(int phaseIdx) noexcept
I/O name of molar density for multiphase systems.
Definition: name.hh:71
Adds I/O fields specific to the FreeflowNC model.
Definition: freeflow/navierstokes/mass/1pnc/iofields.hh:26
static void initOutputModule(OutputModule &out)
Initialize the FreeflowNC specific output fields.
Definition: freeflow/navierstokes/mass/1pnc/iofields.hh:29
static std::string primaryVariableName(int pvIdx=0, int state=0)
return the names of the primary variables
Definition: freeflow/navierstokes/mass/1pnc/iofields.hh:55
static double getEffectiveDiffusionCoefficient_(const VolumeVariables &volVars, const int phaseIdx, const int compIdx)
Definition: freeflow/navierstokes/mass/1pnc/iofields.hh:67