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
291f4bb2
Commit
291f4bb2
authored
5 years ago
by
Timo Koch
Committed by
Dennis Gläser
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[spatialparams] Add gravity to the pm spatial params
parent
cbdfb1b9
No related branches found
No related tags found
1 merge request
!1573
Feature/move gravity to spatialparams
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/material/spatialparams/fv1p.hh
+19
-0
19 additions, 0 deletions
dumux/material/spatialparams/fv1p.hh
with
19 additions
and
0 deletions
dumux/material/spatialparams/fv1p.hh
+
19
−
0
View file @
291f4bb2
...
@@ -90,7 +90,12 @@ class FVSpatialParamsOneP
...
@@ -90,7 +90,12 @@ class FVSpatialParamsOneP
public
:
public
:
FVSpatialParamsOneP
(
std
::
shared_ptr
<
const
FVGridGeometry
>
fvGridGeometry
)
FVSpatialParamsOneP
(
std
::
shared_ptr
<
const
FVGridGeometry
>
fvGridGeometry
)
:
fvGridGeometry_
(
fvGridGeometry
)
:
fvGridGeometry_
(
fvGridGeometry
)
,
gravity_
(
0.0
)
{
{
const
bool
enableGravity
=
getParam
<
bool
>
(
"Problem.EnableGravity"
);
if
(
enableGravity
)
gravity_
[
dimWorld
-
1
]
=
-
9.81
;
/* \brief default forchheimer coefficient
/* \brief default forchheimer coefficient
* Source: Ward, J.C. 1964 Turbulent flow in porous media. ASCE J. Hydraul. Div 90 \cite ward1964 .
* Source: Ward, J.C. 1964 Turbulent flow in porous media. ASCE J. Hydraul. Div 90 \cite ward1964 .
* Actually the Forchheimer coefficient is also a function of the dimensions of the
* Actually the Forchheimer coefficient is also a function of the dimensions of the
...
@@ -100,6 +105,19 @@ public:
...
@@ -100,6 +105,19 @@ public:
forchCoeffDefault_
=
getParam
<
Scalar
>
(
"SpatialParams.ForchCoeff"
,
0.55
);
forchCoeffDefault_
=
getParam
<
Scalar
>
(
"SpatialParams.ForchCoeff"
,
0.55
);
}
}
/*!
* \brief Returns the acceleration due to gravity \f$\mathrm{[m/s^2]}\f$.
*
* The default behaviour is a constant gravity vector;
* if the <tt>Problem.EnableGravity</tt> parameter is true,
* \f$\boldsymbol{g} = ( 0,\dots,\ -9.81)^T \f$,
* else \f$\boldsymbol{g} = ( 0,\dots, 0)^T \f$.
*
* \param pos the spatial position at which to evaulate the gravity vector
*/
const
GlobalPosition
&
gravity
(
const
GlobalPosition
&
pos
)
const
{
return
gravity_
;
}
/*!
/*!
* \brief Harmonic average of a discontinuous scalar field at discontinuity interface
* \brief Harmonic average of a discontinuous scalar field at discontinuity interface
* (for compatibility reasons with the function below)
* (for compatibility reasons with the function below)
...
@@ -322,6 +340,7 @@ protected:
...
@@ -322,6 +340,7 @@ protected:
private
:
private
:
std
::
shared_ptr
<
const
FVGridGeometry
>
fvGridGeometry_
;
std
::
shared_ptr
<
const
FVGridGeometry
>
fvGridGeometry_
;
GlobalPosition
gravity_
;
//!< The gravity vector
Scalar
forchCoeffDefault_
;
Scalar
forchCoeffDefault_
;
};
};
...
...
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