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
a33d0230
Commit
a33d0230
authored
6 years ago
by
Dennis Gläser
Committed by
Timo Koch
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[porodeformation] Provide new overload with global position
parent
c2c97098
No related branches found
No related tags found
1 merge request
!1077
[porodeformation] Provide new overload with global position
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/material/fluidmatrixinteractions/porositydeformation.hh
+43
-18
43 additions, 18 deletions
...x/material/fluidmatrixinteractions/porositydeformation.hh
with
43 additions
and
18 deletions
dumux/material/fluidmatrixinteractions/porositydeformation.hh
+
43
−
18
View file @
a33d0230
...
...
@@ -21,8 +21,8 @@
* \ingroup Fluidmatrixinteractions
* \brief A relationship for the porosity of a porous medium under mechanical deformation.
*/
#ifndef DUMUX_POROSITY_DEFORMATION_HH
#define DUMUX_POROSITY_DEFORMATION_HH
#ifndef DUMUX_
MATERIAL_
POROSITY_DEFORMATION_HH
#define DUMUX_
MATERIAL_
POROSITY_DEFORMATION_HH
#include
<dumux/discretization/evalgradients.hh>
...
...
@@ -39,37 +39,62 @@ class PorosityDeformation
{
public:
/*!
* \brief Calculates the porosity in a sub-control volume
* \note This assumes the primary variables to be organized
* such that the displacements in the different grid
* directions are stored in the first entries of the
* primary variable vector.
* \brief Calculates the porosity at a position inside an element
* \note This assumes the primary variables to be organized such that
* the displacements in the different grid directions are stored
* in the first entries of the primary variable vector.
*
*
* \param fvGridGeometry The finite volume grid geometry
* \param element element
* \param elemSol
t
he element solution
* \param
scv sub control volume
* \param element
The finite
element
* \param elemSol
T
he element solution
* \param
globalPos The global position (in the element)
* \param refPoro The solid matrix porosity without deformation
* \param minPoro A minimum porosity value
*/
template
<
class
FVGridGeom
,
class
ElemSol
>
Scalar
evaluatePorosity
(
const
FVGridGeom
&
fvGridGeometry
,
const
typename
FVGridGeom
::
GridView
::
template
Codim
<
0
>
::
Entity
&
element
,
const
typename
FVGridGeom
::
SubControlVolume
&
scv
,
const
ElemSol
&
elemSol
,
Scalar
refPoro
,
Scalar
minPoro
=
0.0
)
const
static
Scalar
evaluatePorosity
(
const
FVGridGeom
&
fvGridGeometry
,
const
typename
FVGridGeom
::
GridView
::
template
Codim
<
0
>
::
Entity
&
element
,
const
typename
FVGridGeom
::
GridView
::
template
Codim
<
0
>
::
Entity
::
Geometry
::
GlobalCoordinate
&
globalPos
,
const
ElemSol
&
elemSol
,
Scalar
refPoro
,
Scalar
minPoro
=
0.0
)
{
// compute divergence of diplacement
for this scv
// compute divergence of diplacement
at the given position
Scalar
divU
=
0.0
;
const
auto
gradU
=
evalGradients
(
element
,
element
.
geometry
(),
fvGridGeometry
,
elemSol
,
scv
.
center
()
);
const
auto
gradU
=
evalGradients
(
element
,
element
.
geometry
(),
fvGridGeometry
,
elemSol
,
globalPos
);
for
(
int
dir
=
0
;
dir
<
FVGridGeom
::
GridView
::
dimension
;
++
dir
)
divU
+=
gradU
[
dir
][
dir
];
using
std
::
max
;
return
max
(
minPoro
,
refPoro
*
(
1.0
+
divU
));
}
/*!
* \brief Calculates the porosity at a position inside an element
* \note This assumes the primary variables to be organized such that
* the displacements in the different grid directions are stored
* in the first entries of the primary variable vector.
*
*
* \param fvGridGeometry The finite volume grid geometry
* \param element The finite element
* \param elemSol The element solution
* \param scv The sub-control volume
* \param refPoro The solid matrix porosity without deformation
* \param minPoro A minimum porosity value
*/
template
<
class
FVGridGeom
,
class
ElemSol
>
static
Scalar
evaluatePorosity
(
const
FVGridGeom
&
fvGridGeometry
,
const
typename
FVGridGeom
::
GridView
::
template
Codim
<
0
>
::
Entity
&
element
,
const
typename
FVGridGeom
::
SubControlVolume
&
scv
,
const
ElemSol
&
elemSol
,
Scalar
refPoro
,
Scalar
minPoro
=
0.0
)
{
// evaluate the porosity at the scv center
return
evaluatePorosity
(
fvGridGeometry
,
element
,
scv
.
center
(),
elemSol
,
refPoro
,
minPoro
);
}
};
}
// namespace Dumux
...
...
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