Skip to content
Snippets Groups Projects
Commit 6f801baf authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

[freeflow][iofields] Add pVNames

parent 480583d8
No related branches found
No related tags found
1 merge request!1212Feature/iofields
......@@ -74,7 +74,7 @@ public:
}
//! return the names of the primary variables
template <class FluidSystem>
template <class ModelTraits, class FluidSystem>
static std::string primaryVariableName(int pvIdx = 0, int state = 0)
{
// priVars: v_0, ..., v_dim-1, p, x_0, ..., x_numComp-1, otherPv ..., T
......@@ -82,7 +82,7 @@ public:
return ModelTraits::useMoles() ? IOName::moleFraction<FluidSystem>(0, pvIdx - ModelTraits::dim())
: IOName::massFraction<FluidSystem>(0, pvIdx - ModelTraits::dim());
else
return BaseOutputFields::template primaryVariableName<FluidSystem>(pvIdx, state);
return BaseOutputFields::template primaryVariableName<ModelTraits, FluidSystem>(pvIdx, state);
}
};
......
......@@ -67,13 +67,11 @@ public:
}
//! return the names of the primary variables
template <class FluidSystem = void>
template <class ModelTraits, class FluidSystem = void>
static std::string primaryVariableName(int pvIdx = 0, int state = 0)
{
const std::array<std::string, 3> velocities = {"v_x", "v_y", "v_z"};
if (pvIdx < FVGridGeometry::Grid::dimension)
return velocities[pvIdx];
if (pvIdx < ModelTraits::dim())
return "v";
else
return IOName::pressure();
}
......
......@@ -62,11 +62,11 @@ public:
}
//! return the names of the primary variables
template <class FluidSystem = void>
template<class ModelTraits, class FluidSystem = void>
static std::string primaryVariableName(int pvIdx, int state = 0)
{
if (pvIdx < ModelTraits::numEq() - 1)
return IsothermalIOFields::template primaryVariableName<FluidSystem>(pvIdx, state);
return IsothermalIOFields::template primaryVariableName<ModelTraits, FluidSystem>(pvIdx, state);
else
return IOName::temperature();
}
......
......@@ -67,6 +67,13 @@ public:
out.addVolumeVariable([](const auto& v){ return v.yPlus(); }, "y^+");
out.addVolumeVariable([](const auto& v){ return v.uPlus(); }, "u^+");
}
//! return the names of the primary variables
template <class ModelTraits, class FluidSystem>
static std::string primaryVariableName(int pvIdx = 0, int state = 0)
{
return NavierStokesIOFields::template primaryVariableName<ModelTraits, FluidSystem>(pvIdx, state);
}
};
} // end namespace Dumux
......
......@@ -53,6 +53,16 @@ public:
RANSIOFields<FVGridGeometry>::initOutputModule(out);
out.addVolumeVariable([](const auto& v){ return v.viscosityTilde(); }, "nu_tilde");
}
//! return the names of the primary variables
template <class ModelTraits, class FluidSystem>
static std::string primaryVariableName(int pvIdx = 0, int state = 0)
{
if (pvIdx < ModelTraits::dim() + 1)
return RANSIOFields::template primaryVariableName<ModelTraits, FluidSystem>(pvIdx, state);
else
return "nu_tilde";
}
};
} // end namespace Dumux
......
......@@ -61,6 +61,19 @@ public:
out.addVolumeVariable([](const auto& v){ return v.inNearWallRegion(); }, "inNearWallRegion");
out.addVolumeVariable([](const auto& v){ return v.isMatchingPoint(); }, "isMatchingPoint");
}
//! return the names of the primary variables
template <class ModelTraits, class FluidSystem>
static std::string primaryVariableName(int pvIdx = 0, int state = 0)
{
std::cout << "kepsi called with " << pvIdx << std::endl;
if (pvIdx < ModelTraits::dim() + ModelTraits::numComponents())
return RANSIOFields::template primaryVariableName<ModelTraits, FluidSystem>(pvIdx, state);
else if (pvIdx == ModelTraits::dim() + ModelTraits::numComponents())
return "k";
else
return "epsilon";
}
};
} // end namespace Dumux
......
......@@ -57,6 +57,18 @@ public:
out.addVolumeVariable([](const auto& v){ return v.turbulentKineticEnergy(); }, "k");
out.addVolumeVariable([](const auto& v){ return v.dissipation(); }, "omega");
}
//! return the names of the primary variables
template <class ModelTraits, class FluidSystem>
static std::string primaryVariableName(int pvIdx = 0, int state = 0)
{
if (pvIdx < ModelTraits::dim() + ModelTraits::numComponents())
return RANSIOFields::template primaryVariableName<ModelTraits, FluidSystem>(pvIdx, state);
else if (pvIdx == ModelTraits::dim() + ModelTraits::numComponents())
return "k";
else
return "omega";
}
};
} // end namespace Dumux
......
......@@ -56,6 +56,18 @@ public:
out.addVolumeVariable([](const auto& v){ return v.turbulentKineticEnergy(); }, "k");
out.addVolumeVariable([](const auto& v){ return v.dissipationTilde(); }, "epsilon");
}
//! return the names of the primary variables
template <class ModelTraits, class FluidSystem>
static std::string primaryVariableName(int pvIdx = 0, int state = 0)
{
if (pvIdx < ModelTraits::dim() + ModelTraits::numComponents())
return RANSIOFields::template primaryVariableName<ModelTraits, FluidSystem>(pvIdx, state);
else if (pvIdx == ModelTraits::dim() + ModelTraits::numComponents())
return "k";
else
return "epsilon";
}
};
} // end namespace Dumux
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment