Skip to content
Snippets Groups Projects
Commit cc366999 authored by Sina Ackermann's avatar Sina Ackermann Committed by Kilian Weishaupt
Browse files

[output] Add loops over phases

parent 06baf775
No related branches found
No related tags found
1 merge request!1137Cleanup/fluidsystems phase names
...@@ -40,15 +40,12 @@ public: ...@@ -40,15 +40,12 @@ public:
using FluidSystem = typename VolumeVariables::FluidSystem; using FluidSystem = typename VolumeVariables::FluidSystem;
// register standardized vtk output fields // register standardized vtk output fields
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.saturation(FluidSystem::wPhaseIdx); }, "S_"+FluidSystem::phaseName(FluidSystem::wPhaseIdx)); for (int i = 0; i < VolumeVariables::numPhases(); ++i)
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.saturation(FluidSystem::nPhaseIdx); }, "S_"+FluidSystem::phaseName(FluidSystem::nPhaseIdx)); {
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.saturation(FluidSystem::gPhaseIdx); }, "S_"+FluidSystem::phaseName(FluidSystem::gPhaseIdx)); vtk.addVolumeVariable([i](const auto& v){ return v.saturation(i); }, "S_"+ FluidSystem::phaseName(i));
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.pressure(FluidSystem::wPhaseIdx); }, "p_"+FluidSystem::phaseName(FluidSystem::wPhaseIdx)); vtk.addVolumeVariable([i](const auto& v){ return v.pressure(i); }, "p_"+ FluidSystem::phaseName(i));
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.pressure(FluidSystem::nPhaseIdx); }, "p_"+FluidSystem::phaseName(FluidSystem::nPhaseIdx)); vtk.addVolumeVariable([i](const auto& v){ return v.density(i); }, "rho_"+ FluidSystem::phaseName(i));
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.pressure(FluidSystem::gPhaseIdx); }, "p_"+FluidSystem::phaseName(FluidSystem::gPhaseIdx)); }
vtk.addVolumeVariable([](const auto& v){ return v.density(FluidSystem::wPhaseIdx); }, "rho_"+FluidSystem::phaseName(FluidSystem::wPhaseIdx));
vtk.addVolumeVariable([](const auto& v){ return v.density(FluidSystem::nPhaseIdx); }, "rho_"+FluidSystem::phaseName(FluidSystem::nPhaseIdx));
vtk.addVolumeVariable([](const auto& v){ return v.density(FluidSystem::gPhaseIdx); }, "rho_"+FluidSystem::phaseName(FluidSystem::gPhaseIdx));
vtk.addVolumeVariable( [](const auto& v){ return v.porosity(); },"porosity"); vtk.addVolumeVariable( [](const auto& v){ return v.porosity(); },"porosity");
vtk.addVolumeVariable( [](const auto& v){ return v.permeability(); },"permeability"); vtk.addVolumeVariable( [](const auto& v){ return v.permeability(); },"permeability");
......
...@@ -40,19 +40,15 @@ public: ...@@ -40,19 +40,15 @@ public:
using FluidSystem = typename VolumeVariables::FluidSystem; using FluidSystem = typename VolumeVariables::FluidSystem;
// register standardized vtk output fields // register standardized vtk output fields
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.saturation(FluidSystem::wPhaseIdx); }, "S_"+FluidSystem::phaseName(FluidSystem::wPhaseIdx));
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.saturation(FluidSystem::nPhaseIdx); }, "S_"+FluidSystem::phaseName(FluidSystem::nPhaseIdx));
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.saturation(FluidSystem::gPhaseIdx); }, "S_"+FluidSystem::phaseName(FluidSystem::gPhaseIdx));
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.pressure(FluidSystem::wPhaseIdx); }, "p_"+FluidSystem::phaseName(FluidSystem::wPhaseIdx));
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.pressure(FluidSystem::nPhaseIdx); }, "p_"+FluidSystem::phaseName(FluidSystem::nPhaseIdx));
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.pressure(FluidSystem::gPhaseIdx); }, "p_"+FluidSystem::phaseName(FluidSystem::gPhaseIdx));
vtk.addVolumeVariable([](const auto& v){ return v.density(FluidSystem::wPhaseIdx); }, "rho_"+FluidSystem::phaseName(FluidSystem::wPhaseIdx));
vtk.addVolumeVariable([](const auto& v){ return v.density(FluidSystem::nPhaseIdx); }, "rho_"+FluidSystem::phaseName(FluidSystem::nPhaseIdx));
vtk.addVolumeVariable([](const auto& v){ return v.density(FluidSystem::gPhaseIdx); }, "rho_"+FluidSystem::phaseName(FluidSystem::gPhaseIdx));
for (int i = 0; i < VolumeVariables::numPhases(); ++i) for (int i = 0; i < VolumeVariables::numPhases(); ++i)
{
vtk.addVolumeVariable([i](const auto& v){ return v.saturation(i); }, "S_"+ FluidSystem::phaseName(i));
vtk.addVolumeVariable([i](const auto& v){ return v.pressure(i); }, "p_"+ FluidSystem::phaseName(i));
vtk.addVolumeVariable([i](const auto& v){ return v.density(i); }, "rho_"+ FluidSystem::phaseName(i));
for (int j = 0; j < VolumeVariables::numComponents(); ++j) for (int j = 0; j < VolumeVariables::numComponents(); ++j)
vtk.addVolumeVariable([i,j](const auto& v){ return v.moleFraction(i,j); }, "x^" + FluidSystem::componentName(j) + "_" + FluidSystem::phaseName(i)); vtk.addVolumeVariable([i,j](const auto& v){ return v.moleFraction(i,j); },"x^"+ FluidSystem::componentName(j) + "_" + FluidSystem::phaseName(i));
}
vtk.addVolumeVariable( [](const auto& v){ return v.porosity(); },"porosity"); vtk.addVolumeVariable( [](const auto& v){ return v.porosity(); },"porosity");
vtk.addVolumeVariable( [](const auto& v){ return v.priVars().state(); },"phase presence"); vtk.addVolumeVariable( [](const auto& v){ return v.priVars().state(); },"phase presence");
......
...@@ -41,26 +41,17 @@ public: ...@@ -41,26 +41,17 @@ public:
using FluidSystem = typename VolumeVariables::FluidSystem; using FluidSystem = typename VolumeVariables::FluidSystem;
// register standardized vtk output fields // register standardized vtk output fields
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.saturation(FluidSystem::wPhaseIdx); }, "S_"+FluidSystem::phaseName(FluidSystem::wPhaseIdx));
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.saturation(FluidSystem::nPhaseIdx); }, "S_"+FluidSystem::phaseName(FluidSystem::nPhaseIdx));
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.saturation(FluidSystem::gPhaseIdx); }, "S_"+FluidSystem::phaseName(FluidSystem::gPhaseIdx));
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.pressure(FluidSystem::wPhaseIdx); }, "p_"+FluidSystem::phaseName(FluidSystem::wPhaseIdx));
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.pressure(FluidSystem::nPhaseIdx); }, "p_"+FluidSystem::phaseName(FluidSystem::nPhaseIdx));
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.pressure(FluidSystem::gPhaseIdx); }, "p_"+FluidSystem::phaseName(FluidSystem::gPhaseIdx));
vtk.addVolumeVariable([](const auto& v){ return v.density(FluidSystem::wPhaseIdx); }, "rho_"+FluidSystem::phaseName(FluidSystem::wPhaseIdx));
vtk.addVolumeVariable([](const auto& v){ return v.density(FluidSystem::nPhaseIdx); }, "rho_"+FluidSystem::phaseName(FluidSystem::nPhaseIdx));
vtk.addVolumeVariable([](const auto& v){ return v.density(FluidSystem::gPhaseIdx); }, "rho_"+FluidSystem::phaseName(FluidSystem::gPhaseIdx));
vtk.addVolumeVariable([](const auto& v){ return v.mobility(FluidSystem::wPhaseIdx); },"mob_"+ FluidSystem::phaseName(FluidSystem::wPhaseIdx));
vtk.addVolumeVariable([](const auto& v){ return v.mobility(FluidSystem::nPhaseIdx); },"mob_"+ FluidSystem::phaseName(FluidSystem::nPhaseIdx));
vtk.addVolumeVariable([](const auto& v){ return v.mobility(FluidSystem::gPhaseIdx); },"mob_"+ FluidSystem::phaseName(FluidSystem::gPhaseIdx));
vtk.addVolumeVariable([](const auto& v){ return v.viscosity(FluidSystem::wPhaseIdx); },"viscos_"+ FluidSystem::phaseName(FluidSystem::wPhaseIdx));
vtk.addVolumeVariable([](const auto& v){ return v.viscosity(FluidSystem::nPhaseIdx); },"viscos_"+ FluidSystem::phaseName(FluidSystem::nPhaseIdx));
vtk.addVolumeVariable([](const auto& v){ return v.viscosity(FluidSystem::gPhaseIdx); },"viscos_"+ FluidSystem::phaseName(FluidSystem::gPhaseIdx));
for (int i = 0; i < VolumeVariables::numPhases(); ++i) for (int i = 0; i < VolumeVariables::numPhases(); ++i)
for (int j = 0; j < VolumeVariables::numComponents(); ++j) {
vtk.addVolumeVariable([i,j](const auto& v){ return v.moleFraction(i,j); }, "x^" + FluidSystem::componentName(j) + "_" + FluidSystem::phaseName(i)); vtk.addVolumeVariable([i](const auto& v){ return v.saturation(i); }, "S_"+ FluidSystem::phaseName(i));
vtk.addVolumeVariable([i](const auto& v){ return v.pressure(i); }, "p_"+ FluidSystem::phaseName(i));
vtk.addVolumeVariable([i](const auto& v){ return v.density(i); }, "rho_"+ FluidSystem::phaseName(i));
vtk.addVolumeVariable([i](const auto& v){ return v.mobility(i); },"mob_"+ FluidSystem::phaseName(i));
vtk.addVolumeVariable([i](const auto& v){return v.viscosity(i); }, "mu_"+FluidSystem::phaseName(i));
for (int j = 0; j < VolumeVariables::numComponents(); ++j)
vtk.addVolumeVariable([i,j](const auto& v){ return v.moleFraction(i,j); },"x^"+ FluidSystem::componentName(j) + "_" + FluidSystem::phaseName(i));
}
vtk.addVolumeVariable( [](const auto& v){ return v.porosity(); },"porosity"); vtk.addVolumeVariable( [](const auto& v){ return v.porosity(); },"porosity");
vtk.addVolumeVariable( [](const auto& v){ return v.priVars().state(); },"phase presence"); vtk.addVolumeVariable( [](const auto& v){ return v.priVars().state(); },"phase presence");
vtk.addVolumeVariable( [](const auto& v){ return v.permeability(); },"permeability"); vtk.addVolumeVariable( [](const auto& v){ return v.permeability(); },"permeability");
......
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