Skip to content
Snippets Groups Projects
Commit dda32e5d authored by Katharina Heck's avatar Katharina Heck
Browse files

[2pnc] make permeability output problem specific

parent cb3499dd
No related branches found
No related tags found
Loading
...@@ -61,12 +61,6 @@ public: ...@@ -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([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.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: ...@@ -166,6 +166,8 @@ public:
currentDensity_.resize(fvGridGeometry->gridView().size(dofCodim)); currentDensity_.resize(fvGridGeometry->gridView().size(dofCodim));
reactionSourceH2O_.resize(fvGridGeometry->gridView().size(dofCodim)); reactionSourceH2O_.resize(fvGridGeometry->gridView().size(dofCodim));
reactionSourceO2_.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: ...@@ -284,6 +286,15 @@ public:
return reactionSourceO2_; return reactionSourceO2_;
} }
const std::vector<Scalar>& getKxx()
{
return Kxx_;
}
const std::vector<Scalar>& getKyy()
{
return Kyy_;
}
void updateVtkOutput(const SolutionVector& curSol) void updateVtkOutput(const SolutionVector& curSol)
{ {
...@@ -320,6 +331,8 @@ public: ...@@ -320,6 +331,8 @@ public:
reactionSourceO2_[dofIdxGlobal] = 0.0; reactionSourceO2_[dofIdxGlobal] = 0.0;
currentDensity_[dofIdxGlobal] = 0.0; currentDensity_[dofIdxGlobal] = 0.0;
} }
Kxx_[dofIdxGlobal] = volVars.permeability()[0][0];
Kyy_[dofIdxGlobal] = volVars.permeability()[1][1];
} }
} }
} }
...@@ -367,6 +380,8 @@ private: ...@@ -367,6 +380,8 @@ private:
std::vector<double> currentDensity_; std::vector<double> currentDensity_;
std::vector<double> reactionSourceH2O_; std::vector<double> reactionSourceH2O_;
std::vector<double> reactionSourceO2_; std::vector<double> reactionSourceO2_;
std::vector<double> Kxx_;
std::vector<double> Kyy_;
}; };
} //end namespace Dumux } //end namespace Dumux
......
...@@ -144,6 +144,8 @@ int main(int argc, char** argv) try ...@@ -144,6 +144,8 @@ int main(int argc, char** argv) try
vtkWriter.addField(problem->getCurrentDensity(), "currentDensity [A/cm^2]"); vtkWriter.addField(problem->getCurrentDensity(), "currentDensity [A/cm^2]");
vtkWriter.addField(problem->getReactionSourceH2O(), "reactionSourceH2O [mol/(sm^2)]"); vtkWriter.addField(problem->getReactionSourceH2O(), "reactionSourceH2O [mol/(sm^2)]");
vtkWriter.addField(problem->getReactionSourceO2(), "reactionSourceO2 [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); vtkWriter.write(0.0);
// instantiate time loop // instantiate time loop
......
...@@ -143,6 +143,8 @@ int main(int argc, char** argv) try ...@@ -143,6 +143,8 @@ int main(int argc, char** argv) try
vtkWriter.addField(problem->getCurrentDensity(), "currentDensity [A/cm^2]"); vtkWriter.addField(problem->getCurrentDensity(), "currentDensity [A/cm^2]");
vtkWriter.addField(problem->getReactionSourceH2O(), "reactionSourceH2O [mol/(sm^2)]"); vtkWriter.addField(problem->getReactionSourceH2O(), "reactionSourceH2O [mol/(sm^2)]");
vtkWriter.addField(problem->getReactionSourceO2(), "reactionSourceO2 [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); vtkWriter.write(0.0);
// instantiate time loop // 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