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
b63f85b9
Commit
b63f85b9
authored
5 years ago
by
Kilian Weishaupt
Committed by
Katharina Heck
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[fickslaw][referencesystem] Move convenience functions to referencesys header
parent
c6b6beee
No related branches found
No related tags found
1 merge request
!1730
[fickslaw][referencesystem] Move convenience functions to referencesys header
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dumux/flux/fickslaw.hh
+0
-21
0 additions, 21 deletions
dumux/flux/fickslaw.hh
dumux/flux/referencesystemformulation.hh
+22
-0
22 additions, 0 deletions
dumux/flux/referencesystemformulation.hh
with
22 additions
and
21 deletions
dumux/flux/fickslaw.hh
+
0
−
21
View file @
b63f85b9
...
@@ -43,27 +43,6 @@ class FicksLawImplementation;
...
@@ -43,27 +43,6 @@ class FicksLawImplementation;
template
<
class
TypeTag
,
ReferenceSystemFormulation
referenceSystem
=
ReferenceSystemFormulation
::
massAveraged
>
template
<
class
TypeTag
,
ReferenceSystemFormulation
referenceSystem
=
ReferenceSystemFormulation
::
massAveraged
>
using
FicksLaw
=
FicksLawImplementation
<
TypeTag
,
GetPropType
<
TypeTag
,
Properties
::
FVGridGeometry
>::
discMethod
,
referenceSystem
>
;
using
FicksLaw
=
FicksLawImplementation
<
TypeTag
,
GetPropType
<
TypeTag
,
Properties
::
FVGridGeometry
>::
discMethod
,
referenceSystem
>
;
/*!
* \ingroup Flux
* \brief evaluates the density to be used in Fick's law based on the reference system
*/
template
<
class
VolumeVariables
>
typename
VolumeVariables
::
PrimaryVariables
::
value_type
massOrMolarDensity
(
const
VolumeVariables
&
volVars
,
ReferenceSystemFormulation
referenceSys
,
const
int
phaseIdx
)
{
return
(
referenceSys
==
ReferenceSystemFormulation
::
massAveraged
)
?
volVars
.
density
(
phaseIdx
)
:
volVars
.
molarDensity
(
phaseIdx
);
}
/*!
* \ingroup Flux
* \brief returns the mass or mole fraction to be used in Fick's law based on the reference system
*/
template
<
class
VolumeVariables
>
typename
VolumeVariables
::
PrimaryVariables
::
value_type
massOrMoleFraction
(
const
VolumeVariables
&
volVars
,
ReferenceSystemFormulation
referenceSys
,
const
int
phaseIdx
,
const
int
compIdx
)
{
return
(
referenceSys
==
ReferenceSystemFormulation
::
massAveraged
)
?
volVars
.
massFraction
(
phaseIdx
,
compIdx
)
:
volVars
.
moleFraction
(
phaseIdx
,
compIdx
);
}
}
// end namespace Dumux
}
// end namespace Dumux
#include
<dumux/flux/cctpfa/fickslaw.hh>
#include
<dumux/flux/cctpfa/fickslaw.hh>
...
...
This diff is collapsed.
Click to expand it.
dumux/flux/referencesystemformulation.hh
+
22
−
0
View file @
b63f85b9
...
@@ -46,6 +46,28 @@ enum class ReferenceSystemFormulation
...
@@ -46,6 +46,28 @@ enum class ReferenceSystemFormulation
massAveraged
,
molarAveraged
massAveraged
,
molarAveraged
};
};
/*!
* \ingroup Flux
* \brief evaluates the density to be used in Fick's law based on the reference system
*/
template
<
class
VolumeVariables
>
typename
VolumeVariables
::
PrimaryVariables
::
value_type
massOrMolarDensity
(
const
VolumeVariables
&
volVars
,
ReferenceSystemFormulation
referenceSys
,
const
int
phaseIdx
)
{
return
(
referenceSys
==
ReferenceSystemFormulation
::
massAveraged
)
?
volVars
.
density
(
phaseIdx
)
:
volVars
.
molarDensity
(
phaseIdx
);
}
/*!
* \ingroup Flux
* \brief returns the mass or mole fraction to be used in Fick's law based on the reference system
*/
template
<
class
VolumeVariables
>
typename
VolumeVariables
::
PrimaryVariables
::
value_type
massOrMoleFraction
(
const
VolumeVariables
&
volVars
,
ReferenceSystemFormulation
referenceSys
,
const
int
phaseIdx
,
const
int
compIdx
)
{
return
(
referenceSys
==
ReferenceSystemFormulation
::
massAveraged
)
?
volVars
.
massFraction
(
phaseIdx
,
compIdx
)
:
volVars
.
moleFraction
(
phaseIdx
,
compIdx
);
}
}
// end namespace Dumux
}
// end namespace Dumux
#endif
#endif
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