24#ifndef DUMUX_FREEFLOW_NC_IO_FIELDS_HH
25#define DUMUX_FREEFLOW_NC_IO_FIELDS_HH
37template<
class BaseOutputFields,
bool turbulenceModel = false>
41 template <
class OutputModule>
44 BaseOutputFields::initOutputModule(out);
49 using FluidSystem =
typename OutputModule::VolumeVariables::FluidSystem;
50 for (
int j = 0; j < FluidSystem::numComponents; ++j)
52 out.addVolumeVariable([j](
const auto& v){
return v.massFraction(j); }, IOName::massFraction<FluidSystem>(0, j));
53 out.addVolumeVariable([j](
const auto& v){
return v.moleFraction(j); }, IOName::moleFraction<FluidSystem>(0, j));
55 if (j != FluidSystem::getMainComponent(0))
57 out.addVolumeVariable([j](
const auto& v){
return v.diffusionCoefficient(0,0, j); },
"D^" + FluidSystem::componentName(j) +
"_" + FluidSystem::phaseName(0));
61 out.addVolumeVariable([j](
const auto& v){
return getEffectiveDiffusionCoefficient_(v, 0, j) - v.diffusionCoefficient(0,0, j); },
"D_t^" + FluidSystem::componentName(j) +
"_" + FluidSystem::phaseName(0));
67 template <
class ModelTraits,
class Flu
idSystem>
71 if (pvIdx > ModelTraits::dim() && pvIdx < ModelTraits::dim() + ModelTraits::numFluidComponents())
72 return ModelTraits::useMoles() ? IOName::moleFraction<FluidSystem>(0, pvIdx - ModelTraits::dim())
73 : IOName::massFraction<FluidSystem>(0, pvIdx - ModelTraits::dim());
75 return BaseOutputFields::template primaryVariableName<ModelTraits, FluidSystem>(pvIdx, state);
79 template<
class VolumeVariables>
82 if constexpr (Dumux::Deprecated::hasEffDiffCoeff<VolumeVariables>)
83 return volVars.effectiveDiffusionCoefficient(phaseIdx,
84 VolumeVariables::FluidSystem::getMainComponent(phaseIdx), compIdx);
88 return volVars.effectiveDiffusivity(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:83
Adds I/O fields specific to the FreeflowNC model.
Definition: freeflow/compositional/iofields.hh:39
static std::string primaryVariableName(int pvIdx=0, int state=0)
return the names of the primary variables
Definition: freeflow/compositional/iofields.hh:68
static void initOutputModule(OutputModule &out)
Initialize the FreeflowNC specific output fields.
Definition: freeflow/compositional/iofields.hh:42
static double getEffectiveDiffusionCoefficient_(const VolumeVariables &volVars, const int phaseIdx, const int compIdx)
Definition: freeflow/compositional/iofields.hh:80