From 74d94da59e85ed5976a7d3bfa7ce443b4975ea4b Mon Sep 17 00:00:00 2001 From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de> Date: Thu, 5 Apr 2018 07:49:48 +0200 Subject: [PATCH] [test][3pwateroil] Fix test and clean-up * "old" test expects Neumann BCs set accoring to vertex pos --- .../implicit/3pwateroilsagdproblem.hh | 74 ++++--------------- .../implicit/3pwateroilsagdspatialparams.hh | 4 +- .../implicit/test_box3pwateroil.input | 4 - 3 files changed, 17 insertions(+), 65 deletions(-) diff --git a/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh b/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh index e623cad20e..044c861898 100644 --- a/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh +++ b/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh @@ -111,49 +111,15 @@ class SagdProblem : public PorousMediumFlowProblem<TypeTag> public: - /*! - * \brief The constructor - * - * \param timeManager The time manager - * \param gridView The grid view - */ - SagdProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry) : ParentType(fvGridGeometry), pOut_(4e6) { - maxDepth_ = 400.0; // [m] FluidSystem::init(); - totalMassProducedOil_ =0; - totalMassProducedWater_ =0; - - name_ = getParam<std::string>("Problem.Name"); + totalMassProducedOil_ = 0.0; + totalMassProducedWater_ = 0.0; } - - void episodeEnd() - { - // Start new episode if episode is over - // for first 10 year episode length is 1 year - this->timeManager().startNextEpisode(3600*24*1.); //episode length sent to 1 day - std::cout<<"Episode index is set to: "<<this->timeManager().episodeIndex()<<std::endl; - } - - /*! - * \name Problem parameters - */ - // \{ - - /*! - * \brief The problem name. - * - * This is used as a prefix for files generated by the simulation. - */ - const std::string name() const - { return name_; } - - // \} - /*! * \name Boundary conditions */ @@ -161,10 +127,9 @@ public: /*! * \brief Specifies which kind of boundary condition should be - * used for which equation on a given boundary segment. + * used for which equation on a given boundary control volume. * - * \param bcTypes The boundary types for the conservation equations - * \param globalPos The position for which the bc type should be evaluated + * \param globalPos The position for which the boundary types are evaluated */ BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const { @@ -189,12 +154,9 @@ public: /*! * \brief Evaluate the boundary conditions for a dirichlet - * boundary segment. + * control volume. * - * \param values The dirichlet values for the primary variables - * \param globalPos The position for which the bc type should be evaluated - * - * For this method, the \a values parameter stores primary variables. + * \param globalPos The center of the finite volume which ought to be set. */ PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const { @@ -205,25 +167,23 @@ public: * \brief Evaluate the boundary conditions for a neumann * boundary segment. * - * \param values The neumann values for the conservation equations * \param element The finite element * \param fvGeometry The finite-volume geometry in the box scheme - * \param is The intersection between element and boundary - * \param scvIdx The local vertex index - * \param boundaryFaceIdx The index of the boundary face - * \param elemVolVars Element volume variables + * \param elemVolVars The element volume variables + * \param scvf The sub control volume face * - * For this method, the \a values parameter stores the mass flux - * in normal direction of each phase. Negative values mean influx. + * Negative values mean influx. */ NumEqVector neumann(const Element& element, - const FVElementGeometry& fvGeometry, - const ElementVolumeVariables& elemVolVars, - const SubControlVolumeFace& scvf) const + const FVElementGeometry& fvGeometry, + const ElementVolumeVariables& elemVolVars, + const SubControlVolumeFace& scvf) const { NumEqVector values(0.0); - const auto& globalPos = scvf.ipGlobal(); + const auto& insideScv = fvGeometry.scv(scvf.insideScvIdx()); + const auto& globalPos = insideScv.dofPosition(); + // negative values for injection at injection well if (globalPos[1] > 8.5 - eps_ && globalPos[1] < 9.5 + eps_) { @@ -294,11 +254,7 @@ public: /*! * \brief Evaluate the initial value for a control volume. * - * \param values The initial values for the primary variables * \param globalPos The position for which the initial condition should be evaluated - * - * For this method, the \a values parameter stores primary - * variables. */ PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const { diff --git a/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdspatialparams.hh b/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdspatialparams.hh index 5884e41628..0f1135900a 100644 --- a/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdspatialparams.hh +++ b/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdspatialparams.hh @@ -113,8 +113,8 @@ public: lambdaSolid_ = 2.8; // specific heat capacities - fineHeatCap_ = 850.; - coarseHeatCap_ = 850; + fineHeatCap_ = 850.0; + coarseHeatCap_ = 850.0; // residual saturations fineMaterialParams_.setSwr(0.1); diff --git a/test/porousmediumflow/3pwateroil/implicit/test_box3pwateroil.input b/test/porousmediumflow/3pwateroil/implicit/test_box3pwateroil.input index d1f6789df9..e32430e8b7 100644 --- a/test/porousmediumflow/3pwateroil/implicit/test_box3pwateroil.input +++ b/test/porousmediumflow/3pwateroil/implicit/test_box3pwateroil.input @@ -9,9 +9,5 @@ Cells = 60 40 [Problem] Name = sagd # name passed to the output routines -[Implicit] -MaxTimeStepDivisions = 100 - [Newton] MaxSteps = 8 -WriteConvergence = 0 -- GitLab