Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dumux-repositories
dumux
Commits
0ee50b69
There was an error fetching the commit references. Please try again later.
Commit
0ee50b69
authored
8 years ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[test][2p] Port to new spatialparam interface
parent
79a13a17
No related branches found
No related tags found
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/porousmediumflow/2p/implicit/fracturespatialparams.hh
+8
-12
8 additions, 12 deletions
test/porousmediumflow/2p/implicit/fracturespatialparams.hh
test/porousmediumflow/2p/implicit/lensspatialparams.hh
+27
-33
27 additions, 33 deletions
test/porousmediumflow/2p/implicit/lensspatialparams.hh
with
35 additions
and
45 deletions
test/porousmediumflow/2p/implicit/fracturespatialparams.hh
+
8
−
12
View file @
0ee50b69
...
...
@@ -73,24 +73,24 @@ class FractureSpatialParams : public ImplicitSpatialParams<TypeTag>
using
GridView
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
);
using
Scalar
=
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
);
using
Problem
=
typename
GET_PROP_TYPE
(
TypeTag
,
Problem
);
using
CoordScalar
=
typename
GridView
::
Traits
::
Grid
::
ctype
;
enum
{
dim
=
GridView
::
dimension
,
dimWorld
=
GridView
::
dimensionworld
};
using
GlobalPosition
=
Dune
::
FieldVector
<
Coord
Scalar
,
dimWorld
>
;
using
GlobalPosition
=
Dune
::
FieldVector
<
Scalar
,
dimWorld
>
;
using
Element
=
typename
GridView
::
template
Codim
<
0
>
::
Entity
;
using
FVElementGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVElementGeometry
);
using
SubControlVolume
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolume
);
using
VolumeVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
VolumeVariables
);
public
:
//get the material law from the property system
using
MaterialLaw
=
typename
GET_PROP_TYPE
(
TypeTag
,
MaterialLaw
);
using
MaterialLawParams
=
typename
MaterialLaw
::
Params
;
public
:
// export permeability type
using
PermeabilityType
=
Scalar
;
/*!
* \brief The constructor
*
...
...
@@ -112,9 +112,7 @@ public:
/*!
* \brief Returns the scalar intrinsic permeability \f$[m^2]\f$
*
* \param element The finite element
* \param fvGeometry The finite volume geometry of the element
* \param scvIdx The local index of the sub-control volume
* \param globalPos The global position
*/
Scalar
permeabilityAtPos
(
const
GlobalPosition
&
globalPos
)
const
{
...
...
@@ -124,9 +122,7 @@ public:
/*!
* \brief Returns the porosity \f$[-]\f$
*
* \param element The finite element
* \param fvGeometry The finite volume geometry of the element
* \param scvIdx The local index of the sub-control volume
* \param globalPos The global position
*/
Scalar
porosityAtPos
(
const
GlobalPosition
&
globalPos
)
const
{
return
0.4
;
}
...
...
@@ -146,6 +142,6 @@ private:
MaterialLawParams
materialParams_
;
};
}
// end namespace
}
// end namespace
Dumux
#endif
This diff is collapsed.
Click to expand it.
test/porousmediumflow/2p/implicit/lensspatialparams.hh
+
27
−
33
View file @
0ee50b69
...
...
@@ -53,11 +53,11 @@ SET_PROP(LensSpatialParams, MaterialLaw)
private:
// define the material law which is parameterized by effective
// saturations
typedef
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
)
Scalar
;
typedef
RegularizedVanGenuchten
<
Scalar
>
EffectiveLaw
;
using
Scalar
=
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
);
using
EffectiveLaw
=
RegularizedVanGenuchten
<
Scalar
>
;
public:
// define the material law parameterized by absolute saturations
type
def
EffToAbsLaw
<
EffectiveLaw
>
type
;
using
type
=
EffToAbsLaw
<
EffectiveLaw
>
;
};
}
/*!
...
...
@@ -69,30 +69,29 @@ public:
template
<
class
TypeTag
>
class
LensSpatialParams
:
public
ImplicitSpatialParams
<
TypeTag
>
{
typedef
ImplicitSpatialParams
<
TypeTag
>
ParentType
;
typedef
typename
GET_PROP_TYPE
(
TypeTag
,
Grid
)
Grid
;
typedef
typename
GET_PROP_TYPE
(
TypeTag
,
Problem
)
Problem
;
typedef
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
)
GridView
;
typedef
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
)
Scalar
;
typedef
typename
Grid
::
ctype
CoordScalar
;
using
ParentType
=
ImplicitSpatialParams
<
TypeTag
>
;
using
Problem
=
typename
GET_PROP_TYPE
(
TypeTag
,
Problem
);
using
GridView
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
);
using
Scalar
=
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
);
enum
{
dim
=
GridView
::
dimension
,
dimWorld
=
GridView
::
dimensionworld
};
typedef
Dune
::
FieldVector
<
Coord
Scalar
,
dimWorld
>
GlobalPosition
;
typedef
Dune
::
FieldMatrix
<
Coord
Scalar
,
dimWorld
,
dimWorld
>
Tensor
;
using
GlobalPosition
=
Dune
::
FieldVector
<
Scalar
,
dimWorld
>
;
using
Tensor
=
Dune
::
FieldMatrix
<
Scalar
,
dimWorld
,
dimWorld
>
;
typedef
typename
GridView
::
template
Codim
<
0
>
::
Entity
Element
;
typedef
typename
GET_PROP_TYPE
(
TypeTag
,
FVElementGeometry
)
FVElementGeometry
;
typedef
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolume
)
SubControlVolume
;
typedef
typename
GET_PROP_TYPE
(
TypeTag
,
VolumeVariables
)
VolumeVariables
;
using
Element
=
typename
GridView
::
template
Codim
<
0
>
::
Entity
;
using
SubControlVolume
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolume
);
public
:
//get the material law from the property system
typedef
typename
GET_PROP_TYPE
(
TypeTag
,
MaterialLaw
)
MaterialLaw
;
typedef
typename
MaterialLaw
::
Params
MaterialLawParams
;
using
MaterialLaw
=
typename
GET_PROP_TYPE
(
TypeTag
,
MaterialLaw
);
using
MaterialLawParams
=
typename
MaterialLaw
::
Params
;
public
:
// export permeability type
using
PermeabilityType
=
Scalar
;
/*!
* \brief The constructor
...
...
@@ -102,10 +101,8 @@ public:
LensSpatialParams
(
const
Problem
&
problem
,
const
GridView
&
gridView
)
:
ParentType
(
problem
,
gridView
)
{
lensLowerLeft_
[
0
]
=
GET_RUNTIME_PARAM
(
TypeTag
,
GlobalPosition
,
SpatialParams
.
LensLowerLeft
)[
0
];
lensLowerLeft_
[
1
]
=
GET_RUNTIME_PARAM
(
TypeTag
,
GlobalPosition
,
SpatialParams
.
LensLowerLeft
)[
1
];
lensUpperRight_
[
0
]
=
GET_RUNTIME_PARAM
(
TypeTag
,
GlobalPosition
,
SpatialParams
.
LensUpperRight
)[
0
];
lensUpperRight_
[
1
]
=
GET_RUNTIME_PARAM
(
TypeTag
,
GlobalPosition
,
SpatialParams
.
LensUpperRight
)[
1
];
lensLowerLeft_
=
GET_RUNTIME_PARAM
(
TypeTag
,
GlobalPosition
,
SpatialParams
.
LensLowerLeft
);
lensUpperRight_
=
GET_RUNTIME_PARAM
(
TypeTag
,
GlobalPosition
,
SpatialParams
.
LensUpperRight
);
// residual saturations
lensMaterialParams_
.
setSwr
(
0.18
);
...
...
@@ -127,9 +124,7 @@ public:
/*!
* \brief Returns the scalar intrinsic permeability \f$[m^2]\f$
*
* \param element The finite element
* \param fvGeometry The finite volume geometry of the element
* \param scvIdx The local index of the sub-control volume
* \param globalPos The global position
*/
Scalar
permeabilityAtPos
(
const
GlobalPosition
&
globalPos
)
const
{
...
...
@@ -141,9 +136,7 @@ public:
/*!
* \brief Returns the porosity \f$[-]\f$
*
* \param element The finite element
* \param fvGeometry The finite volume geometry of the element
* \param scvIdx The local index of the sub-control volume
* \param globalPos The global position
*/
Scalar
porosityAtPos
(
const
GlobalPosition
&
globalPos
)
const
{
return
0.4
;
}
...
...
@@ -151,9 +144,7 @@ public:
/*!
* \brief Returns the parameter object for the Brooks-Corey material law
*
* \param element The finite element
* \param fvGeometry The finite volume geometry of the element
* \param scvIdx The local index of the sub-control volume
* \param globalPos The global position
*/
const
MaterialLawParams
&
materialLawParamsAtPos
(
const
GlobalPosition
&
globalPos
)
const
{
...
...
@@ -167,7 +158,7 @@ private:
bool
isInLens_
(
const
GlobalPosition
&
globalPos
)
const
{
for
(
int
i
=
0
;
i
<
dimWorld
;
++
i
)
{
if
(
globalPos
[
i
]
<
lensLowerLeft_
[
i
]
||
globalPos
[
i
]
>
lensUpperRight_
[
i
])
if
(
globalPos
[
i
]
<
lensLowerLeft_
[
i
]
+
eps_
||
globalPos
[
i
]
>
lensUpperRight_
[
i
]
-
eps_
)
return
false
;
}
return
true
;
...
...
@@ -180,8 +171,11 @@ private:
Scalar
outerK_
;
MaterialLawParams
lensMaterialParams_
;
MaterialLawParams
outerMaterialParams_
;
static
constexpr
Scalar
eps_
=
1.5e-7
;
};
}
// end namespace
}
// end namespace Dumux
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment