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
7291c461
Commit
7291c461
authored
2 years ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[ff][onep] Enable auxiliary flux to add stabilization term in the problem
parent
6da02609
No related branches found
No related tags found
1 merge request
!3350
[test][stokes] Add stabilized Box-Box donea test
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/freeflow/navierstokes/mass/1p/localresidual.hh
+21
-2
21 additions, 2 deletions
dumux/freeflow/navierstokes/mass/1p/localresidual.hh
with
21 additions
and
2 deletions
dumux/freeflow/navierstokes/mass/1p/localresidual.hh
+
21
−
2
View file @
7291c461
...
...
@@ -24,11 +24,23 @@
#ifndef DUMUX_FREEFLOW_NAVIERSTOKES_MASS_1P_LOCAL_RESIDUAL_HH
#define DUMUX_FREEFLOW_NAVIERSTOKES_MASS_1P_LOCAL_RESIDUAL_HH
#include
<type_traits>
#include
<dumux/common/numeqvector.hh>
#include
<dumux/common/properties.hh>
namespace
Dumux
{
/*!
* \ingroup NavierStokesModel
* \brief Traits class to be specialized for problems to add auxiliary fluxes
* \note This can be used, for example, to implement flux stabilization terms
*/
template
<
class
Problem
>
struct
ImplementsAuxiliaryFluxNavierStokesMassOneP
:
public
std
::
false_type
{};
/*!
* \ingroup NavierStokesModel
* \brief Element-wise calculation of the Navier-Stokes residual for single-phase flow.
...
...
@@ -79,7 +91,7 @@ public:
}
/*!
* \brief Evaluate
x
the mass flux over a face of a sub control volume.
* \brief Evaluate the mass flux over a face of a sub control volume.
*
* \param problem The problem
* \param element The element
...
...
@@ -97,7 +109,14 @@ public:
{
FluxVariables
fluxVars
;
fluxVars
.
init
(
problem
,
element
,
fvGeometry
,
elemVolVars
,
scvf
,
elemFluxVarsCache
);
return
fluxVars
.
flux
(
0
);
auto
flux
=
fluxVars
.
flux
(
0
);
// the auxiliary flux is enabled if the trait is specialized for the problem
// this can be used, for example, to implement flux stabilization terms
if
constexpr
(
ImplementsAuxiliaryFluxNavierStokesMassOneP
<
Problem
>::
value
)
flux
+=
problem
.
auxiliaryFlux
(
element
,
fvGeometry
,
elemVolVars
,
elemFluxVarsCache
,
scvf
);
return
flux
;
}
};
...
...
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