Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
c166d8cb
Commit
c166d8cb
authored
Apr 26, 2018
by
Dennis Gläser
Committed by
Timo Koch
Apr 27, 2018
Browse files
[2p] add test with oil-wet lens
parent
b85b7c63
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
test/porousmediumflow/2p/implicit/incompressible/CMakeLists.txt
View file @
c166d8cb
...
...
@@ -31,7 +31,20 @@ dune_add_test(NAME test_2p_incompressible_box_ifsolver
${
CMAKE_CURRENT_BINARY_DIR
}
/2p_box_ifsolver-00018.vtu
--command
"
${
CMAKE_CURRENT_BINARY_DIR
}
/test_2p_incompressible_box_ifsolver test_2p.input
-Problem.Name 2p_box_ifsolver
-Box.UseInterfaceSolver true"
)
-Problem.UseNonConformingOutput true"
)
# using tpfa with an oil-wet lens
dune_add_test
(
NAME test_2p_incompressible_tpfa_oilwet
SOURCES test_2p_fv.cc
COMPILE_DEFINITIONS TYPETAG=TwoPIncompressibleTpfa
COMMAND
${
CMAKE_SOURCE_DIR
}
/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files
${
CMAKE_SOURCE_DIR
}
/test/references/lenscc_oilwet-reference.vtu
${
CMAKE_CURRENT_BINARY_DIR
}
/2p_tpfa_oilwet-00009.vtu
--command
"
${
CMAKE_CURRENT_BINARY_DIR
}
/test_2p_incompressible_tpfa_oilwet test_2p.input
-Problem.Name 2p_tpfa_oilwet
-Problem.EnableGravity false
-SpatialParams.LensIsOilWet true"
)
# using mpfa
dune_add_test
(
NAME test_2p_incompressible_mpfa
...
...
test/porousmediumflow/2p/implicit/incompressible/problem.hh
View file @
c166d8cb
...
...
@@ -175,6 +175,11 @@ public:
NumEqVector
values
(
0.0
);
if
(
onInlet_
(
globalPos
))
values
[
contiDNAPLEqIdx
]
=
-
0.04
;
// kg / (m * s)
// in the test with the oil wet lens, use higher injection rate
if
(
this
->
spatialParams
().
lensIsOilWet
())
values
[
contiDNAPLEqIdx
]
*=
10
;
return
values
;
}
...
...
test/porousmediumflow/2p/implicit/incompressible/spatialparams.hh
View file @
c166d8cb
...
...
@@ -82,6 +82,8 @@ public:
TwoPTestSpatialParams
(
std
::
shared_ptr
<
const
FVGridGeometry
>
fvGridGeometry
)
:
ParentType
(
fvGridGeometry
)
{
lensIsOilWet_
=
getParam
<
bool
>
(
"SpatialParams.LensIsOilWet"
,
false
);
lensLowerLeft_
=
getParam
<
GlobalPosition
>
(
"SpatialParams.LensLowerLeft"
);
lensUpperRight_
=
getParam
<
GlobalPosition
>
(
"SpatialParams.LensUpperRight"
);
...
...
@@ -116,7 +118,9 @@ public:
const
SubControlVolume
&
scv
,
const
ElementSolution
&
elemSol
)
const
{
if
(
isInLens_
(
element
.
geometry
().
center
()))
// do not use a less permeable lens in the test with inverted wettability
if
(
isInLens_
(
element
.
geometry
().
center
())
&&
!
lensIsOilWet_
)
return
lensK_
;
return
outerK_
;
}
...
...
@@ -143,7 +147,8 @@ public:
const
SubControlVolume
&
scv
,
const
ElementSolution
&
elemSol
)
const
{
if
(
isInLens_
(
element
.
geometry
().
center
()))
// do not use different parameters in the test with inverted wettability
if
(
isInLens_
(
element
.
geometry
().
center
())
&&
!
lensIsOilWet_
)
return
lensMaterialParams_
;
return
outerMaterialParams_
;
}
...
...
@@ -156,7 +161,11 @@ public:
*/
template
<
class
FluidSystem
>
int
wettingPhaseAtPos
(
const
GlobalPosition
&
globalPos
)
const
{
return
FluidSystem
::
phase0Idx
;
}
{
if
(
isInLens_
(
globalPos
)
&&
lensIsOilWet_
)
return
FluidSystem
::
phase1Idx
;
return
FluidSystem
::
phase0Idx
;
}
//! Updates the map of which material parameters are associated with a nodal dof.
template
<
class
SolutionVector
>
...
...
@@ -170,6 +179,9 @@ public:
const
BoxMaterialInterfaceParams
<
ThisType
>&
materialInterfaceParams
()
const
{
return
materialInterfaceParams_
;
}
//! Returns whether or not the lens is oil wet
bool
lensIsOilWet
()
const
{
return
lensIsOilWet_
;
}
private:
bool
isInLens_
(
const
GlobalPosition
&
globalPos
)
const
{
...
...
@@ -180,6 +192,7 @@ private:
return
true
;
}
bool
lensIsOilWet_
;
GlobalPosition
lensLowerLeft_
;
GlobalPosition
lensUpperRight_
;
...
...
test/porousmediumflow/2p/implicit/incompressible/test_2p_fv.cc
View file @
c166d8cb
...
...
@@ -150,11 +150,9 @@ int main(int argc, char** argv) try
using
VtkOutputFields
=
typename
GET_PROP_TYPE
(
TypeTag
,
VtkOutputFields
);
// use non-conforming output for the test with interface solver
#if ENABLEINTERFACESOLVER
VtkOutputModule
<
TypeTag
>
vtkWriter
(
*
problem
,
*
fvGridGeometry
,
*
gridVariables
,
x
,
problem
->
name
(),
""
,
Dune
::
VTK
::
nonconforming
);
#else
VtkOutputModule
<
TypeTag
>
vtkWriter
(
*
problem
,
*
fvGridGeometry
,
*
gridVariables
,
x
,
problem
->
name
());
#endif
const
auto
ncOutput
=
getParam
<
bool
>
(
"Problem.UseNonConformingOutput"
,
false
);
VtkOutputModule
<
TypeTag
>
vtkWriter
(
*
problem
,
*
fvGridGeometry
,
*
gridVariables
,
x
,
problem
->
name
(),
""
,
(
ncOutput
?
Dune
::
VTK
::
nonconforming
:
Dune
::
VTK
::
conforming
));
VtkOutputFields
::
init
(
vtkWriter
);
//!< Add model specific output fields
vtkWriter
.
write
(
0.0
);
...
...
test/references/lenscc_oilwet-reference.vtu
0 → 100644
View file @
c166d8cb
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment