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
a1c2c41d
Commit
a1c2c41d
authored
5 years ago
by
Kilian Weishaupt
Browse files
Options
Downloads
Patches
Plain Diff
[3p3c][localresidual] Clean-up
parent
a49c08d4
No related branches found
No related tags found
1 merge request
!1696
Feature/diffusion laws mass refvelocity
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/porousmediumflow/3p3c/localresidual.hh
+14
-35
14 additions, 35 deletions
dumux/porousmediumflow/3p3c/localresidual.hh
with
14 additions
and
35 deletions
dumux/porousmediumflow/3p3c/localresidual.hh
+
14
−
35
View file @
a1c2c41d
...
@@ -34,8 +34,6 @@ namespace Dumux
...
@@ -34,8 +34,6 @@ namespace Dumux
* \ingroup ThreePThreeCModel
* \ingroup ThreePThreeCModel
* \brief Element-wise calculation of the Jacobian matrix for problems
* \brief Element-wise calculation of the Jacobian matrix for problems
* using the three-phase three-component fully implicit model.
* using the three-phase three-component fully implicit model.
*
* This class is used to fill the gaps in BoxLocalResidual for the 3P3C flow.
*/
*/
template
<
class
TypeTag
>
template
<
class
TypeTag
>
class
ThreePThreeCLocalResidual
:
public
GetPropType
<
TypeTag
,
Properties
::
BaseLocalResidual
>
class
ThreePThreeCLocalResidual
:
public
GetPropType
<
TypeTag
,
Properties
::
BaseLocalResidual
>
...
@@ -162,54 +160,35 @@ public:
...
@@ -162,54 +160,35 @@ public:
// Add diffusive energy fluxes. For isothermal model the contribution is zero.
// Add diffusive energy fluxes. For isothermal model the contribution is zero.
EnergyLocalResidual
::
heatConductionFlux
(
flux
,
fluxVars
);
EnergyLocalResidual
::
heatConductionFlux
(
flux
,
fluxVars
);
const
auto
diffusionFluxesWPhase
=
fluxVars
.
molecularDiffusionFlux
(
wPhaseIdx
);
// diffusive fluxes
// diffusive fluxes
Scalar
jGW
=
0.0
;
const
auto
diffusionFluxesWPhase
=
fluxVars
.
molecularDiffusionFlux
(
wPhaseIdx
)
;
Scalar
j
N
W
=
0.0
;
Scalar
j
G
W
=
diffusionFluxesWPhase
[
gCompIdx
]
;
Scalar
j
W
W
=
0.0
;
Scalar
j
N
W
=
diffusionFluxesWPhase
[
nCompIdx
]
;
//check for the reference system and adapt units of the diffusive flux accordingly.
//check for the reference system and adapt units of the diffusive flux accordingly.
if
(
referenceSystemFormulation
==
ReferenceSystemFormulation
::
massAveraged
)
if
(
referenceSystemFormulation
==
ReferenceSystemFormulation
::
massAveraged
)
{
{
jGW
+
=
diffusionFluxesWPhase
[
gCompIdx
]
/
FluidSystem
::
molarMass
(
gCompIdx
);
jGW
/
=
FluidSystem
::
molarMass
(
gCompIdx
);
jNW
+
=
diffusionFluxesWPhase
[
nCompIdx
]
/
FluidSystem
::
molarMass
(
nCompIdx
);
jNW
/
=
FluidSystem
::
molarMass
(
nCompIdx
);
}
}
else
if
(
referenceSystemFormulation
==
ReferenceSystemFormulation
::
molarAveraged
)
const
Scalar
jWW
=
-
(
jGW
+
jNW
);
{
jGW
+=
diffusionFluxesWPhase
[
gCompIdx
];
jNW
+=
diffusionFluxesWPhase
[
nCompIdx
];
}
else
DUNE_THROW
(
Dune
::
NotImplemented
,
"other reference systems than mass and molar averaged are not implemented"
);
jWW
+=
-
(
jGW
+
jNW
);
const
auto
diffusionFluxesGPhase
=
fluxVars
.
molecularDiffusionFlux
(
gPhaseIdx
);
const
auto
diffusionFluxesGPhase
=
fluxVars
.
molecularDiffusionFlux
(
gPhaseIdx
);
Scalar
jWG
=
diffusionFluxesGPhase
[
wCompIdx
];
Scalar
jWG
=
0.0
;
Scalar
jNG
=
diffusionFluxesGPhase
[
nCompIdx
];
Scalar
jNG
=
0.0
;
Scalar
jGG
=
0.0
;
//check for the reference system and adapt units of the diffusive flux accordingly.
//check for the reference system and adapt units of the diffusive flux accordingly.
if
(
referenceSystemFormulation
==
ReferenceSystemFormulation
::
massAveraged
)
if
(
referenceSystemFormulation
==
ReferenceSystemFormulation
::
massAveraged
)
{
{
jWG
+
=
diffusionFluxesGPhase
[
wCompIdx
]
/
FluidSystem
::
molarMass
(
wCompIdx
);
jWG
/
=
FluidSystem
::
molarMass
(
wCompIdx
);
jNG
+
=
diffusionFluxesGPhase
[
nCompIdx
]
/
FluidSystem
::
molarMass
(
nCompIdx
);
jNG
/
=
FluidSystem
::
molarMass
(
nCompIdx
);
}
}
else
const
Scalar
jGG
=
-
(
jWG
+
jNG
);
{
jWG
+=
diffusionFluxesGPhase
[
wCompIdx
];
jNG
+=
diffusionFluxesGPhase
[
nCompIdx
];
}
jGG
+=
-
(
jWG
+
jNG
);
// At the moment we do not consider diffusion in the NAPL phase
// At the moment we do not consider diffusion in the NAPL phase
Scalar
jWN
=
0.0
;
const
Scalar
jWN
=
0.0
;
Scalar
jGN
=
0.0
;
const
Scalar
jGN
=
0.0
;
Scalar
jNN
=
0.0
;
const
Scalar
jNN
=
0.0
;
flux
[
contiWEqIdx
]
+=
jWW
+
jWG
+
jWN
;
flux
[
contiWEqIdx
]
+=
jWW
+
jWG
+
jWN
;
flux
[
contiNEqIdx
]
+=
jNW
+
jNG
+
jNN
;
flux
[
contiNEqIdx
]
+=
jNW
+
jNG
+
jNN
;
...
...
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