Skip to content
Snippets Groups Projects
Commit 66e11283 authored by Timo Koch's avatar Timo Koch
Browse files

Merge branch 'fix/2pnc-vtkoutputfields' into 'cleanup/next'

[2pnc] make permeability output problem specific

See merge request !597
parents ff75718c dda32e5d
No related branches found
No related tags found
3 merge requests!617[WIP] Next,!597[2pnc] make permeability output problem specific,!571Cleanup/next
......@@ -61,12 +61,6 @@ public:
vtk.addVolumeVariable([j](const VolumeVariables& v){ return v.molarity(Indices::wPhaseIdx,j); },"m_"+ FluidSystem::phaseName(Indices::wPhaseIdx) + "^" + FluidSystem::componentName(j));
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.priVars().state(); }, "phasePresence");
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.permeability()[0][0];},"Kxx");
if (dim >= 2)
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.permeability()[1][1]; },"Kyy");
if (dim >= 3)
vtk.addVolumeVariable([](const VolumeVariables& v){ return v.permeability()[2][2]; },"Kzz");
}
};
......
......@@ -166,6 +166,8 @@ public:
currentDensity_.resize(fvGridGeometry->gridView().size(dofCodim));
reactionSourceH2O_.resize(fvGridGeometry->gridView().size(dofCodim));
reactionSourceO2_.resize(fvGridGeometry->gridView().size(dofCodim));
Kxx_.resize(fvGridGeometry->gridView().size(dofCodim));
Kyy_.resize(fvGridGeometry->gridView().size(dofCodim));
}
/*!
......@@ -284,6 +286,15 @@ public:
return reactionSourceO2_;
}
const std::vector<Scalar>& getKxx()
{
return Kxx_;
}
const std::vector<Scalar>& getKyy()
{
return Kyy_;
}
void updateVtkOutput(const SolutionVector& curSol)
{
......@@ -320,6 +331,8 @@ public:
reactionSourceO2_[dofIdxGlobal] = 0.0;
currentDensity_[dofIdxGlobal] = 0.0;
}
Kxx_[dofIdxGlobal] = volVars.permeability()[0][0];
Kyy_[dofIdxGlobal] = volVars.permeability()[1][1];
}
}
}
......@@ -367,6 +380,8 @@ private:
std::vector<double> currentDensity_;
std::vector<double> reactionSourceH2O_;
std::vector<double> reactionSourceO2_;
std::vector<double> Kxx_;
std::vector<double> Kyy_;
};
} //end namespace Dumux
......
......@@ -144,6 +144,8 @@ int main(int argc, char** argv) try
vtkWriter.addField(problem->getCurrentDensity(), "currentDensity [A/cm^2]");
vtkWriter.addField(problem->getReactionSourceH2O(), "reactionSourceH2O [mol/(sm^2)]");
vtkWriter.addField(problem->getReactionSourceO2(), "reactionSourceO2 [mol/(sm^2)]");
vtkWriter.addField(problem->getKxx(), "Kxx");
vtkWriter.addField(problem->getKyy(), "Kyy");
vtkWriter.write(0.0);
// instantiate time loop
......
......@@ -143,6 +143,8 @@ int main(int argc, char** argv) try
vtkWriter.addField(problem->getCurrentDensity(), "currentDensity [A/cm^2]");
vtkWriter.addField(problem->getReactionSourceH2O(), "reactionSourceH2O [mol/(sm^2)]");
vtkWriter.addField(problem->getReactionSourceO2(), "reactionSourceO2 [mol/(sm^2)]");
vtkWriter.addField(problem->getKxx(), "Kxx");
vtkWriter.addField(problem->getKyy(), "Kyy");
vtkWriter.write(0.0);
// instantiate time loop
......
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