Skip to content
Snippets Groups Projects
Commit 95f1139f authored by Simon Emmert's avatar Simon Emmert
Browse files

[2pncmin][next] box-test compiles now, does not pass, cc not yet compiling

parent 8c1f91e4
No related branches found
No related tags found
Loading
......@@ -191,6 +191,7 @@ protected:
Scalar precipitateVolumeFraction_[numSPhases];
Scalar sumPrecipitates_;
FluidState fluidState_;
private:
Implementation &asImp_()
......
......@@ -52,14 +52,11 @@ public:
// use default fields from the 2pnc model
TwoPNCVtkOutputFields<TypeTag>::init(vtk);
//output additional to TwoPNC output:
//output additional to TwoPNCMin output:
for (int i = 0; i < numSPhases; ++i)
{
vtk.addVolumeVariable([i](const VolumeVariables& v){ return v.precipitateVolumeFraction(numPhases + i); },"precipVolFrac_"+ FluidSystem::phaseName(numPhases + i));
vtk.addVolumeVariable([](const VolumeVariables& v){ return this->perm_(v.permeability())[0][0]; }, "Kxx"); //TODO: get correct permeability from where? add perm_ function in private?
if (dim >= 2)
vtk.addVolumeVariable([](const VolumeVariables& v){ return this->perm_(v.permeability())[1][1]; }, "Kyy"); //TODO: get correct permeability from where? add perm_ function in private?
if (dim >= 3)
vtk.addVolumeVariable([](const VolumeVariables& v){ return this->perm_(v.permeability())[2][2]; }, "Kzz"); //TODO: get correct permeability from where? add perm_ function in private?
}
}
};
......
......@@ -113,8 +113,9 @@ int main(int argc, char** argv) try
auto problem = std::make_shared<Problem>(fvGridGeometry);
// the solution vector
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
SolutionVector x(leafGridView.size(0));
SolutionVector x(leafGridView.size(GridView::dimension));
problem->applyInitialSolution(x);
auto xOld = x;
......@@ -140,9 +141,6 @@ int main(int argc, char** argv) try
VtkOutputModule<TypeTag> vtkWriter(*problem, *fvGridGeometry, *gridVariables, x, problem->name());
VtkOutputFields::init(vtkWriter); //! Add model specific output fields
//add specific output
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);
......@@ -168,6 +166,10 @@ int main(int argc, char** argv) try
// time loop
timeLoop->start(); do
{
// set time for problem for implicit Euler scheme
problem->setTime( timeLoop->time() + timeLoop->timeStepSize() );
problem->setTimeStepSize( timeLoop->timeStepSize() );
// set previous solution for storage evaluations
assembler->setPreviousSolution(xOld);
......
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