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
877a753a
Commit
877a753a
authored
5 years ago
by
Dennis Gläser
Committed by
Ned Coltman
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[mpfa][fluxvarscachefiller] do not use tensorlambdafactory anymore
parent
b4be04f8
No related branches found
No related tags found
1 merge request
!1684
Improve effective laws
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/porousmediumflow/fluxvariablescachefiller.hh
+15
-18
15 additions, 18 deletions
dumux/porousmediumflow/fluxvariablescachefiller.hh
with
15 additions
and
18 deletions
dumux/porousmediumflow/fluxvariablescachefiller.hh
+
15
−
18
View file @
877a753a
...
...
@@ -26,10 +26,10 @@
#include
<dumux/common/properties.hh>
#include
<dumux/common/parameters.hh>
#include
<dumux/common/deprecated.hh>
#include
<dumux/discretization/method.hh>
#include
<dumux/flux/referencesystemformulation.hh>
#include
<dumux/discretization/cellcentered/mpfa/tensorlambdafactory.hh>
#include
<dumux/discretization/cellcentered/tpfa/computetransmissibility.hh>
namespace
Dumux
{
...
...
@@ -550,16 +550,17 @@ private:
template
<
class
InteractionVolume
,
class
DataHandle
>
void
prepareAdvectionHandle_
(
InteractionVolume
&
iv
,
DataHandle
&
handle
,
bool
forceUpdateAll
)
{
using
LambdaFactory
=
TensorLambdaFactory
<
DiscretizationMethod
::
ccmpfa
>
;
// get instance of the interaction volume-local assembler
using
Traits
=
typename
InteractionVolume
::
Traits
;
using
IvLocalAssembler
=
typename
Traits
::
template
LocalAssembler
<
Problem
,
FVElementGeometry
,
ElementVolumeVariables
>;
IvLocalAssembler
localAssembler
(
problem
(),
fvGeometry
(),
elemVolVars
());
// lambda to obtain the permeability tensor
auto
getK
=
[]
(
const
auto
&
volVars
)
{
return
volVars
.
permeability
();
};
// Assemble T only if permeability is sol-dependent or if update is forced
if
(
forceUpdateAll
||
advectionIsSolDependent
)
localAssembler
.
assembleMatrices
(
handle
.
advectionHandle
(),
iv
,
LambdaFactory
::
getAdvectionLambda
()
);
localAssembler
.
assembleMatrices
(
handle
.
advectionHandle
(),
iv
,
getK
);
// assemble pressure vectors
for
(
unsigned
int
pIdx
=
0
;
pIdx
<
ModelTraits
::
numFluidPhases
();
++
pIdx
)
...
...
@@ -598,7 +599,6 @@ private:
handle
.
diffusionHandle
().
setPhaseIndex
(
phaseIdx
);
handle
.
diffusionHandle
().
setComponentIndex
(
compIdx
);
using
LambdaFactory
=
TensorLambdaFactory
<
DiscretizationMethod
::
ccmpfa
>
;
using
DiffusionType
=
GetPropType
<
TypeTag
,
Properties
::
MolecularDiffusionType
>
;
using
EffDiffModel
=
GetPropType
<
TypeTag
,
Properties
::
EffectiveDiffusivityModel
>
;
...
...
@@ -607,6 +607,10 @@ private:
using
IvLocalAssembler
=
typename
Traits
::
template
LocalAssembler
<
Problem
,
FVElementGeometry
,
ElementVolumeVariables
>;
IvLocalAssembler
localAssembler
(
problem
(),
fvGeometry
(),
elemVolVars
());
// lambda to obtain diffusion coefficient
auto
getD
=
[
phaseIdx
,
compIdx
]
(
const
auto
&
volVars
)
{
return
Deprecated
::
template
effectiveDiffusionCoefficient
<
EffDiffModel
>(
volVars
,
phaseIdx
,
phaseIdx
,
compIdx
);
};
// maybe (re-)assemble matrices
if
(
forceUpdateAll
||
diffusionIsSolDependent
)
{
...
...
@@ -621,15 +625,10 @@ private:
const
auto
tij
=
computeTpfaTransmissibility
(
scvf
,
scv
,
D
,
vv
.
extrusionFactor
())
*
scvf
.
area
();
// use transmissibility with molecular coefficient for epsilon estimate
localAssembler
.
assembleMatrices
(
handle
.
diffusionHandle
(),
iv
,
LambdaFactory
::
template
getDiffusionLambda
<
EffDiffModel
>(
phaseIdx
,
compIdx
),
tij
*
1e-7
);
localAssembler
.
assembleMatrices
(
handle
.
diffusionHandle
(),
iv
,
getD
,
tij
*
1e-7
);
}
else
localAssembler
.
assembleMatrices
(
handle
.
diffusionHandle
(),
iv
,
LambdaFactory
::
template
getDiffusionLambda
<
EffDiffModel
>(
phaseIdx
,
compIdx
));
localAssembler
.
assembleMatrices
(
handle
.
diffusionHandle
(),
iv
,
getD
);
}
// assemble vector of mole fractions
...
...
@@ -643,19 +642,17 @@ private:
template
<
class
InteractionVolume
,
class
DataHandle
>
void
prepareHeatConductionHandle_
(
InteractionVolume
&
iv
,
DataHandle
&
handle
,
bool
forceUpdateAll
)
{
using
LambdaFactory
=
TensorLambdaFactory
<
DiscretizationMethod
::
ccmpfa
>
;
using
ThermCondModel
=
GetPropType
<
TypeTag
,
Properties
::
ThermalConductivityModel
>
;
// get instance of the interaction volume-local assembler
using
Traits
=
typename
InteractionVolume
::
Traits
;
using
IvLocalAssembler
=
typename
Traits
::
template
LocalAssembler
<
Problem
,
FVElementGeometry
,
ElementVolumeVariables
>;
IvLocalAssembler
localAssembler
(
problem
(),
fvGeometry
(),
elemVolVars
());
// lambda to obtain the effective thermal conductivity
auto
getLambda
=
[]
(
const
auto
&
volVars
)
{
return
volVars
.
effectiveThermalConductivity
();
};
// maybe (re-)assemble matrices
if
(
forceUpdateAll
||
heatConductionIsSolDependent
)
localAssembler
.
assembleMatrices
(
handle
.
heatConductionHandle
(),
iv
,
LambdaFactory
::
template
getHeatConductionLambda
<
ThermCondModel
>());
localAssembler
.
assembleMatrices
(
handle
.
heatConductionHandle
(),
iv
,
getLambda
);
// assemble vector of temperatures
auto
getTemperature
=
[]
(
const
auto
&
volVars
)
{
return
volVars
.
temperature
();
};
...
...
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