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
bdb7b01c
Commit
bdb7b01c
authored
9 years ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[fluxes] Use average density as face density approximation
parent
fafd5f79
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!617
[WIP] Next
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dumux/porousmediumflow/implicit/cellcentered/tpfa/darcyslaw.hh
+12
-8
12 additions, 8 deletions
.../porousmediumflow/implicit/cellcentered/tpfa/darcyslaw.hh
dumux/porousmediumflow/implicit/cellcentered/tpfa/fickslaw.hh
+3
-3
3 additions, 3 deletions
...x/porousmediumflow/implicit/cellcentered/tpfa/fickslaw.hh
with
15 additions
and
11 deletions
dumux/porousmediumflow/implicit/cellcentered/tpfa/darcyslaw.hh
+
12
−
8
View file @
bdb7b01c
...
...
@@ -124,20 +124,24 @@ public:
if
(
enableGravity_
)
{
// do averaging for the density
const
auto
rhoInside
=
insideVolVars
->
density
(
phaseIdx
);
const
auto
rhoOutide
=
outsideVolVars
->
density
(
phaseIdx
);
const
auto
rho
=
(
rhoInside
+
rhoOutide
)
*
0.5
;
// ask for the gravitational acceleration in the inside neighbor
const
auto
xInside
=
insideScv
.
center
();
const
auto
gInside
=
problem_
().
gravityAtPos
(
xInside
);
const
auto
rhoInside
=
insideVolVars
->
density
(
phaseIdx
);
hInside
-=
rho
Inside
*
(
gInside
*
xInside
);
hInside
-=
rho
*
(
gInside
*
xInside
);
// and the outside neighbor
auto
rhoOutside
=
outsideVolVars
->
density
(
phaseIdx
);
if
(
scvFace_
().
boundary
())
{
const
auto
xOutside
=
scvFace_
().
center
();
const
auto
gOutside
=
problem_
().
gravityAtPos
(
xOutside
);
hOutside
-=
rho
Outside
*
(
gOutside
*
xOutside
);
hOutside
-=
rho
*
(
gOutside
*
xOutside
);
}
else
{
...
...
@@ -145,7 +149,7 @@ public:
const
auto
&
outsideScv
=
problem_
().
model
().
fvGeometries
().
subControlVolume
(
outsideScvIdx
);
const
auto
xOutside
=
outsideScv
.
center
();
const
auto
gOutside
=
problem_
().
gravityAtPos
(
xOutside
);
hOutside
-=
rho
Outside
*
(
gOutside
*
xOutside
);
hOutside
-=
rho
*
(
gOutside
*
xOutside
);
}
}
...
...
@@ -180,7 +184,7 @@ public:
return
kGradPNormal_
[
phaseIdx
]
*
upwindFunction
(
upVolVars
(
phaseIdx
),
dnVolVars
(
phaseIdx
));
}
std
::
set
<
IndexType
>
stencil
()
const
const
std
::
set
<
IndexType
>
&
stencil
()
const
{
return
stencil_
;
}
...
...
@@ -234,10 +238,10 @@ private:
{
// fill the stencil
if
(
!
scvFace_
().
boundary
())
stencil_
=
{
scvFace_
().
insideScvIdx
(),
scvFace_
().
outsideScvIdx
()};
stencil_
.
insert
(
{
scvFace_
().
insideScvIdx
(),
scvFace_
().
outsideScvIdx
()}
)
;
else
// fill the stencil
stencil_
=
{
scvFace_
().
insideScvIdx
()
}
;
stencil_
.
insert
(
scvFace_
().
insideScvIdx
()
)
;
}
Scalar
calculateOmega_
(
const
DimWorldMatrix
&
K
,
const
SubControlVolume
&
scv
)
const
...
...
This diff is collapsed.
Click to expand it.
dumux/porousmediumflow/implicit/cellcentered/tpfa/fickslaw.hh
+
3
−
3
View file @
bdb7b01c
...
...
@@ -119,9 +119,9 @@ public:
}
// compute the diffusive flux
auto
xInside
=
insideVolVars
->
moleFraction
(
phaseIdx_
,
compIdx_
);
auto
xOutside
=
outsideVolVars
->
moleFraction
(
phaseIdx_
,
compIdx_
);
auto
rho
=
0.5
*
(
insideVolVars
->
molarDensity
(
phaseIdx_
)
+
outsideVolVars
->
molarDensity
(
phaseIdx_
));
const
auto
xInside
=
insideVolVars
->
moleFraction
(
phaseIdx_
,
compIdx_
);
const
auto
xOutside
=
outsideVolVars
->
moleFraction
(
phaseIdx_
,
compIdx_
);
const
auto
rho
=
0.5
*
(
insideVolVars
->
molarDensity
(
phaseIdx_
)
+
outsideVolVars
->
molarDensity
(
phaseIdx_
));
rhoDGradXNormal_
=
rho
*
tij_
*
(
xInside
-
xOutside
);
}
...
...
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