Commit 14eea49b authored by Melanie Haag's avatar Melanie Haag
Browse files

[flachwasser] update bumpproblem

parent 9beb2ab1
......@@ -185,20 +185,22 @@ public:
void boundaryTypesAtPos(BoundaryTypes &values,
const GlobalPosition &globalPos) const
{
/*
if (globalPos[0] < eps_)
{
values.setNeumann(headIdx);
values.setDirichlet(flowRateXIdx);
//values.setNeumann(velocityYIdx);
}
else
{
values.setDirichlet(headIdx);
values.setNeumann(flowRateXIdx);
values.setNeumann(velocityYIdx);
//values.setNeumann(velocityYIdx);
}
else
*/
//if (globalPos[0] < eps_)
values.setAllDirichlet();
//else
// values.setAllNeumann();
//values.setAllDirichlet();
// values.setAllNeumann();
}
/*!
......@@ -214,20 +216,7 @@ public:
const GlobalPosition &globalPos) const
{
values[headIdx] = 2.0;
values[flowRateXIdx] = 2.0 * 0.0;
/*
if (globalPos[0] < eps_)
{
values[headIdx] = 0.25;
values[flowRateXIdx] = 1.95;
//values[velocityYIdx] = 0.;
} else
{
values[headIdx] = 0.15;
values[flowRateXIdx] = 1.33;
//values[velocityYIdx] = 0.;
}
*/
values[flowRateXIdx] = 4.42;
}
/* \brief Evaluate the boundary conditions for a neumann
......@@ -239,20 +228,16 @@ public:
* For this method, the \a values parameter stores the mass flux
* in normal direction of each phase. Negative values mean influx.
*/
/*
void neumannAtPos(PrimaryVariables &values,
const GlobalPosition &globalPos) const
{
//if (globalPos[0] < eps_)
//{
//values[flowRateXIdx] = -1.0;
//values[velocityYIdx] = 0.0;
//}
//else values = 0.;
values = 0.;
values[headIdx] = 4.42;
values[flowRateXIdx] = 0.0;
//values[velocityYIdx] = 0.0;
}
*/
/*
void solDependentNeumann(PrimaryVariables &values,
const Element &element,
const FVElementGeometry &fvGeometry,
......@@ -290,6 +275,7 @@ public:
values[flowRateXIdx] = -0.001;
}
}
*/
/*!
* \brief Evaluate the initial value for a control volume.
......@@ -303,7 +289,6 @@ public:
void initialAtPos(PrimaryVariables &values,
const GlobalPosition &globalPos) const
{
//initialWaterDepth_ = dirichletWaterDepth_ - this->spatialParams().I0(element, fvGeometry, scvIdx);
Scalar initialWaterDepth_ = 2.0 - this->spatialParams().initializeElevation(globalPos[0]);
Scalar initialVelocity_ = 0.0;
......@@ -331,6 +316,25 @@ public:
return false;
}
void addOutputVtkFields()
{
typedef Dune::BlockVector<Dune::FieldVector<double, 1> > ScalarField;
unsigned numElements = this->gridView().size(0);
ScalarField *bottomElevation = this->resultWriter().allocateManagedBuffer(numElements);
for (const auto& element : elements(this->gridView()))
{
GlobalPosition globalPos = element.geometry().center();
int eIdx = this->elementMapper().index(element);
(*bottomElevation)[eIdx] = this->spatialParams().initializeElevation(globalPos[0]);
}
//pass the scalar fields to the vtkwriter
this->resultWriter().attachDofData(*bottomElevation, "bottomElevation", false); //element data
}
SpatialParams &spatialParams()
{ return *spatialParams_; }
......@@ -339,16 +343,7 @@ public:
*/
const SpatialParams &spatialParams() const
{ return *spatialParams_; }
/*
Scalar hmaxInitial() const
{ return hmaxInitial_; }
Scalar hInitial() const
{ return hInitial_; }
Scalar x0() const
{ return x0_; }
*/
private:
/*!
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment