Skip to content
Snippets Groups Projects
Commit 74d94da5 authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

[test][3pwateroil] Fix test and clean-up

* "old" test expects Neumann BCs set accoring to vertex pos
parent 0f8a0e16
No related branches found
No related tags found
1 merge request!885Fix/3pwateroil
...@@ -111,49 +111,15 @@ class SagdProblem : public PorousMediumFlowProblem<TypeTag> ...@@ -111,49 +111,15 @@ class SagdProblem : public PorousMediumFlowProblem<TypeTag>
public: public:
/*!
* \brief The constructor
*
* \param timeManager The time manager
* \param gridView The grid view
*/
SagdProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry) SagdProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
: ParentType(fvGridGeometry), pOut_(4e6) : ParentType(fvGridGeometry), pOut_(4e6)
{ {
maxDepth_ = 400.0; // [m] maxDepth_ = 400.0; // [m]
FluidSystem::init(); FluidSystem::init();
totalMassProducedOil_ =0; totalMassProducedOil_ = 0.0;
totalMassProducedWater_ =0; totalMassProducedWater_ = 0.0;
name_ = getParam<std::string>("Problem.Name");
} }
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 * \name Boundary conditions
*/ */
...@@ -161,10 +127,9 @@ public: ...@@ -161,10 +127,9 @@ public:
/*! /*!
* \brief Specifies which kind of boundary condition should be * \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 boundary types are evaluated
* \param globalPos The position for which the bc type should be evaluated
*/ */
BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const
{ {
...@@ -189,12 +154,9 @@ public: ...@@ -189,12 +154,9 @@ public:
/*! /*!
* \brief Evaluate the boundary conditions for a dirichlet * \brief Evaluate the boundary conditions for a dirichlet
* boundary segment. * control volume.
* *
* \param values The dirichlet values for the primary variables * \param globalPos The center of the finite volume which ought to be set.
* \param globalPos The position for which the bc type should be evaluated
*
* For this method, the \a values parameter stores primary variables.
*/ */
PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const
{ {
...@@ -205,25 +167,23 @@ public: ...@@ -205,25 +167,23 @@ public:
* \brief Evaluate the boundary conditions for a neumann * \brief Evaluate the boundary conditions for a neumann
* boundary segment. * boundary segment.
* *
* \param values The neumann values for the conservation equations
* \param element The finite element * \param element The finite element
* \param fvGeometry The finite-volume geometry in the box scheme * \param fvGeometry The finite-volume geometry in the box scheme
* \param is The intersection between element and boundary * \param elemVolVars The element volume variables
* \param scvIdx The local vertex index * \param scvf The sub control volume face
* \param boundaryFaceIdx The index of the boundary face
* \param elemVolVars Element volume variables
* *
* For this method, the \a values parameter stores the mass flux * Negative values mean influx.
* in normal direction of each phase. Negative values mean influx.
*/ */
NumEqVector neumann(const Element& element, NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry, const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars, const ElementVolumeVariables& elemVolVars,
const SubControlVolumeFace& scvf) const const SubControlVolumeFace& scvf) const
{ {
NumEqVector values(0.0); 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 // negative values for injection at injection well
if (globalPos[1] > 8.5 - eps_ && globalPos[1] < 9.5 + eps_) if (globalPos[1] > 8.5 - eps_ && globalPos[1] < 9.5 + eps_)
{ {
...@@ -294,11 +254,7 @@ public: ...@@ -294,11 +254,7 @@ public:
/*! /*!
* \brief Evaluate the initial value for a control volume. * \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 * \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 PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const
{ {
......
...@@ -113,8 +113,8 @@ public: ...@@ -113,8 +113,8 @@ public:
lambdaSolid_ = 2.8; lambdaSolid_ = 2.8;
// specific heat capacities // specific heat capacities
fineHeatCap_ = 850.; fineHeatCap_ = 850.0;
coarseHeatCap_ = 850; coarseHeatCap_ = 850.0;
// residual saturations // residual saturations
fineMaterialParams_.setSwr(0.1); fineMaterialParams_.setSwr(0.1);
......
...@@ -9,9 +9,5 @@ Cells = 60 40 ...@@ -9,9 +9,5 @@ Cells = 60 40
[Problem] [Problem]
Name = sagd # name passed to the output routines Name = sagd # name passed to the output routines
[Implicit]
MaxTimeStepDivisions = 100
[Newton] [Newton]
MaxSteps = 8 MaxSteps = 8
WriteConvergence = 0
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