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
316bd308
Commit
316bd308
authored
4 years ago
by
Kilian Weishaupt
Committed by
Timo Koch
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[flux][tpfa][fourierslaw] Add flux overload taking inside/outside volVars explicitly
parent
964f96d0
No related branches found
No related tags found
1 merge request
!2425
[flux][tpfa][fourierslaw] Add flux overload taking inside/outside volVars explicitly
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/flux/cctpfa/fourierslaw.hh
+37
-1
37 additions, 1 deletion
dumux/flux/cctpfa/fourierslaw.hh
with
37 additions
and
1 deletion
dumux/flux/cctpfa/fourierslaw.hh
+
37
−
1
View file @
316bd308
...
@@ -53,6 +53,7 @@ class FouriersLawImplementation<TypeTag, DiscretizationMethod::cctpfa>
...
@@ -53,6 +53,7 @@ class FouriersLawImplementation<TypeTag, DiscretizationMethod::cctpfa>
using
Extrusion
=
Extrusion_t
<
GridGeometry
>
;
using
Extrusion
=
Extrusion_t
<
GridGeometry
>
;
using
GridView
=
typename
GridGeometry
::
GridView
;
using
GridView
=
typename
GridGeometry
::
GridView
;
using
ElementVolumeVariables
=
typename
GetPropType
<
TypeTag
,
Properties
::
GridVolumeVariables
>::
LocalView
;
using
ElementVolumeVariables
=
typename
GetPropType
<
TypeTag
,
Properties
::
GridVolumeVariables
>::
LocalView
;
using
VolumeVariables
=
typename
ElementVolumeVariables
::
VolumeVariables
;
using
Element
=
typename
GridView
::
template
Codim
<
0
>
::
Entity
;
using
Element
=
typename
GridView
::
template
Codim
<
0
>
::
Entity
;
using
ElementFluxVarsCache
=
typename
GetPropType
<
TypeTag
,
Properties
::
GridFluxVariablesCache
>::
LocalView
;
using
ElementFluxVarsCache
=
typename
GetPropType
<
TypeTag
,
Properties
::
GridFluxVariablesCache
>::
LocalView
;
using
FluxVariablesCache
=
GetPropType
<
TypeTag
,
Properties
::
FluxVariablesCache
>
;
using
FluxVariablesCache
=
GetPropType
<
TypeTag
,
Properties
::
FluxVariablesCache
>
;
...
@@ -108,6 +109,39 @@ public:
...
@@ -108,6 +109,39 @@ public:
//! export the type for the corresponding cache
//! export the type for the corresponding cache
using
Cache
=
TpfaFouriersLawCache
;
using
Cache
=
TpfaFouriersLawCache
;
/*!
* \brief Returns the heat flux within the porous medium
* (in J/s) across the given sub-control volume face.
* \note This law assumes thermal equilibrium between the fluid
* and solid phases, and uses an effective thermal conductivity
* for the overall aggregate.
* This overload allows to explicitly specify the inside and outside volume variables
* which can be useful to evaluate conductive fluxes at boundaries with given outside values.
* This only works if scvf.numOutsideScv() == 1.
*
*/
static
Scalar
flux
(
const
Problem
&
problem
,
const
Element
&
element
,
const
FVElementGeometry
&
fvGeometry
,
const
VolumeVariables
&
insideVolVars
,
const
VolumeVariables
&
outsideVolVars
,
const
SubControlVolumeFace
&
scvf
,
const
ElementFluxVarsCache
&
elemFluxVarsCache
)
{
if
constexpr
(
isMixedDimensional_
)
if
(
scvf
.
numOutsideScv
()
!=
1
)
DUNE_THROW
(
Dune
::
Exception
,
"This flux overload requires scvf.numOutsideScv() == 1"
);
// heat conductivities are always solution dependent (?)
Scalar
tij
=
elemFluxVarsCache
[
scvf
].
heatConductionTij
();
// get the inside/outside temperatures
const
auto
tInside
=
insideVolVars
.
temperature
();
const
auto
tOutside
=
outsideVolVars
.
temperature
();
return
tij
*
(
tInside
-
tOutside
);
}
/*!
/*!
* \brief Returns the heat flux within the porous medium
* \brief Returns the heat flux within the porous medium
* (in J/s) across the given sub-control volume face.
* (in J/s) across the given sub-control volume face.
...
@@ -163,7 +197,7 @@ public:
...
@@ -163,7 +197,7 @@ public:
const
auto
outsideLambda
=
outsideVolVars
.
effectiveThermalConductivity
();
const
auto
outsideLambda
=
outsideVolVars
.
effectiveThermalConductivity
();
Scalar
tj
;
Scalar
tj
;
if
(
dim
==
dimWorld
)
if
constexpr
(
dim
==
dimWorld
)
// assume the normal vector from outside is anti parallel so we save flipping a vector
// assume the normal vector from outside is anti parallel so we save flipping a vector
tj
=
-
1.0
*
computeTpfaTransmissibility
(
scvf
,
outsideScv
,
outsideLambda
,
outsideVolVars
.
extrusionFactor
());
tj
=
-
1.0
*
computeTpfaTransmissibility
(
scvf
,
outsideScv
,
outsideLambda
,
outsideVolVars
.
extrusionFactor
());
else
else
...
@@ -207,6 +241,8 @@ private:
...
@@ -207,6 +241,8 @@ private:
}
}
return
sumTempTi
/
sumTi
;
return
sumTempTi
/
sumTi
;
}
}
static
constexpr
bool
isMixedDimensional_
=
static_cast
<
int
>
(
GridView
::
dimension
)
<
static_cast
<
int
>
(
GridView
::
dimensionworld
);
};
};
}
// end namespace Dumux
}
// end 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