diff --git a/examples/tutorialproblem_coupled.hh b/examples/tutorialproblem_coupled.hh index 83fcb9093..5439a4894 100644 --- a/examples/tutorialproblem_coupled.hh +++ b/examples/tutorialproblem_coupled.hh @@ -114,8 +114,6 @@ public: const GridView &gridView) : ParentType(timeManager, gridView) { - // initialize the tables of the fluid system - GET_PROP_TYPE(TypeTag, PTAG(FluidSystem))::init(); } // Specified the problem name. This is used as a prefix for files @@ -123,6 +121,24 @@ public: const char *name() const { return "tutorial_coupled"; } + //! Returns true if a restart file should be written. + /* The default behaviour is to write no restart file. + */ + bool shouldWriteRestartFile() const /*@\label{tutorial-coupled:restart}@*/ + { + return false; + } + + //! Returns true if the current solution should be written to disk (i.e. as a VTK file) + /*! The default behaviour is to write out the solution for + * every time step. Else, change divisor. + */ + bool shouldWriteOutput() const /*@\label{tutorial-coupled:output}@*/ + { + return this->timeManager().timeStepIndex() > 0 && + (this->timeManager().timeStepIndex() % 1 == 0); + } + // Return the temperature within a finite volume. We use constant // 10 degrees Celsius. Scalar temperature(const Element &element, @@ -164,7 +180,8 @@ public: const GlobalPosition &pos = fvElemGeom.boundaryFace[boundaryFaceIdx].ipGlobal; Scalar right = this->bboxMax()[0]; - if (pos[0] > right - eps_) { + // extraction of oil on the right boundary for approx. 1.e6 seconds + if (pos[0] > right - eps_ && this->timeManager().time() <= 1.e6) { // oil outflux of 0.3 g/(m * s) on the right boundary. values[Indices::contiWEqIdx] = 0; values[Indices::contiNEqIdx] = 3e-4;