mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
box: fix for dirichlet boundaries
as described in my e-mail from wednesday. Everything in the stable repository compiles. also, some compile fixes for the Mp-Nc model where made to some fluid systems and the 1p2c index structure got an offset template argument like the other models.
This commit is contained in:
committed by
Andreas Lauser
parent
1a2c09a476
commit
b91f7ea58d
@@ -127,14 +127,9 @@ public:
|
||||
|
||||
// Specifies which kind of boundary condition should be used for
|
||||
// which equation on a given boundary segment.
|
||||
void boundaryTypes(BoundaryTypes &BCtype,
|
||||
const Element &element,
|
||||
const FVElementGeometry &fvElemGeom,
|
||||
const Intersection &isIt,
|
||||
int scvIdx,
|
||||
int boundaryFaceIdx) const
|
||||
void boundaryTypes(BoundaryTypes &BCtype, const Vertex &vertex) const
|
||||
{
|
||||
const GlobalPosition &pos = element.geometry().corner(scvIdx);
|
||||
const GlobalPosition &pos = vertex.geometry().center();
|
||||
if (pos[0] < eps_) // dirichlet conditions on left boundary
|
||||
BCtype.setAllDirichlet();
|
||||
else // neuman for the remaining boundaries
|
||||
@@ -145,12 +140,7 @@ public:
|
||||
// Evaluate the boundary conditions for a dirichlet boundary
|
||||
// segment. For this method, the 'values' parameter stores
|
||||
// primary variables.
|
||||
void dirichlet(PrimaryVariables &values,
|
||||
const Element &element,
|
||||
const FVElementGeometry &fvElemGeom,
|
||||
const Intersection &isIt,
|
||||
int scvIdx,
|
||||
int boundaryFaceIdx) const
|
||||
void dirichlet(PrimaryVariables &values, const Vertex &vertex) const
|
||||
{
|
||||
values[Indices::pwIdx] = 200.0e3; // 200 kPa = 2 bar
|
||||
values[Indices::SnIdx] = 0.0; // 0 % oil saturation on left boundary
|
||||
|
||||
Reference in New Issue
Block a user