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
c719d074
"README.md" did not exist on "26eee736ebfcae36b97a8015be2ed8524694bfd5"
Commit
c719d074
authored
7 years ago
by
Sina Ackermann
Committed by
Kilian Weishaupt
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[staggeredGrid] Revise Fourier's law
* correct distance computation for gradient
parent
4b201a7f
No related branches found
No related tags found
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/discretization/staggered/freeflow/fourierslaw.hh
+14
-18
14 additions, 18 deletions
dumux/discretization/staggered/freeflow/fourierslaw.hh
with
14 additions
and
18 deletions
dumux/discretization/staggered/freeflow/fourierslaw.hh
+
14
−
18
View file @
c719d074
...
@@ -51,6 +51,7 @@ class FouriersLawImplementation<TypeTag, DiscretizationMethods::Staggered >
...
@@ -51,6 +51,7 @@ class FouriersLawImplementation<TypeTag, DiscretizationMethods::Staggered >
{
{
using
Scalar
=
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
);
using
Scalar
=
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
);
using
Problem
=
typename
GET_PROP_TYPE
(
TypeTag
,
Problem
);
using
Problem
=
typename
GET_PROP_TYPE
(
TypeTag
,
Problem
);
using
SubControlVolume
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolume
);
using
SubControlVolumeFace
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolumeFace
);
using
SubControlVolumeFace
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolumeFace
);
using
GridView
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
);
using
GridView
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
);
using
FVElementGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVElementGeometry
);
using
FVElementGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVElementGeometry
);
...
@@ -64,7 +65,9 @@ class FouriersLawImplementation<TypeTag, DiscretizationMethods::Staggered >
...
@@ -64,7 +65,9 @@ class FouriersLawImplementation<TypeTag, DiscretizationMethods::Staggered >
static
const
int
dimWorld
=
GridView
::
dimensionworld
;
static
const
int
dimWorld
=
GridView
::
dimensionworld
;
enum
{
enum
{
energyBalanceIdx
=
Indices
::
energyBalanceIdx
massBalanceIdx
=
Indices
::
massBalanceIdx
,
energyBalanceIdx
=
Indices
::
energyBalanceIdx
,
phaseIdx
=
Indices
::
phaseIdx
};
};
public
:
public
:
...
@@ -98,35 +101,28 @@ public:
...
@@ -98,35 +101,28 @@ public:
outsideLambda
*=
outsideVolVars
.
extrusionFactor
();
outsideLambda
*=
outsideVolVars
.
extrusionFactor
();
// the resulting averaged conductivity tensor
// the resulting averaged conductivity tensor
// const auto lambda = problem.spatialParams().harmonicMean(insideLambda, outsideLambda, scvf.unitOuterNormal());
const
auto
lambda
=
harmonicMean
(
insideLambda
,
outsideLambda
);
const
auto
lambda
=
harmonicMean
(
insideLambda
,
outsideLambda
);
// TODO unitOuterNormal?!
const
Scalar
insideTemp
=
insideVolVars
.
temperature
();
const
Scalar
insideTemp
=
insideVolVars
.
temperature
();
Scalar
distance
(
0.0
),
outsideTemp
(
insideTemp
);
const
Scalar
outsideTemp
=
scvf
.
boundary
()
?
problem
.
dirichletAtPos
(
scvf
.
center
())[
energyBalanceIdx
]
:
outsideVolVars
.
temperature
();
const
Scalar
distance
=
scvf
.
boundary
()
?
(
insideScv
.
dofPosition
()
-
scvf
.
ipGlobal
()).
two_norm
()
:
(
outsideScv
.
dofPosition
()
-
scvf
.
ipGlobal
()).
two_norm
();
if
(
scvf
.
boundary
())
if
(
scvf
.
boundary
())
{
{
const
auto
bcTypes
=
problem
.
boundaryTypesAtPos
(
scvf
.
center
());
const
auto
bcTypes
=
problem
.
boundaryTypesAtPos
(
scvf
.
center
());
if
(
bcTypes
.
isOutflow
(
energyBalanceIdx
))
if
(
bcTypes
.
isOutflow
(
energyBalanceIdx
)
||
bcTypes
.
isNeumann
(
energyBalanceIdx
))
return
flux
;
// TODO flux = 0??
return
flux
;
else
if
(
bcTypes
.
isNeumann
(
energyBalanceIdx
))
return
flux
;
// TODO: implement neumann
else
{
distance
=
(
insideScv
.
dofPosition
()
-
scvf
.
ipGlobal
()).
two_norm
();
outsideTemp
=
problem
.
dirichletAtPos
(
scvf
.
center
())[
energyBalanceIdx
];
}
}
else
{
distance
=
(
insideScv
.
dofPosition
()
-
outsideScv
.
dofPosition
()).
two_norm
();
outsideTemp
=
outsideVolVars
.
temperature
();
}
}
flux
[
energyBalanceIdx
]
=
-
1.0
*
(
insideTemp
-
outsideTemp
);
flux
[
energyBalanceIdx
]
=
-
1.0
*
(
insideTemp
-
outsideTemp
);
flux
[
energyBalanceIdx
]
*=
lambda
/
distance
;
flux
[
energyBalanceIdx
]
*=
lambda
/
distance
;
flux
*=
scvf
.
area
()
*
sign
(
scvf
.
outerNormalScalar
());
return
flux
;
return
flux
;
}
}
};
};
}
// end namespace
}
// end namespace
...
...
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