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
Merge requests
!1028
Freeflow/komegancni
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Freeflow/komegancni
freeflow/komegancni
into
master
Overview
0
Commits
2
Pipelines
0
Changes
5
Merged
Thomas Fetzer
requested to merge
freeflow/komegancni
into
master
6 years ago
Overview
0
Commits
2
Pipelines
0
Changes
5
Expand
Depends on
!1027 (merged)
Edited
6 years ago
by
Thomas Fetzer
0
0
Merge request reports
Compare
master
version 2
b53a1d1d
6 years ago
version 1
b53a1d1d
6 years ago
master (base)
and
latest version
latest version
aa4991e6
2 commits,
6 years ago
version 2
b53a1d1d
2 commits,
6 years ago
version 1
b53a1d1d
15 commits,
6 years ago
5 files
+
1112
−
18
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Some changes are not shown
For a faster browsing experience, some files are collapsed by default.
Expand all files
Files
5
Search (e.g. *.vue) (Ctrl+P)
dumux/freeflow/compositional/komegancmodel.hh
0 → 100644
+
209
−
0
Options
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
* \ingroup FreeflowNCModel
*
* \brief A single-phase, multi-component k-omega model
*
* \copydoc Dumux::FreeflowNCModel
*/
#ifndef DUMUX_KOMEGA_NC_MODEL_HH
#define DUMUX_KOMEGA_NC_MODEL_HH
#include
<dumux/common/properties.hh>
#include
<dumux/freeflow/compositional/navierstokesncmodel.hh>
#include
<dumux/freeflow/nonisothermal/vtkoutputfields.hh>
#include
<dumux/freeflow/rans/twoeq/komega/model.hh>
#include
"vtkoutputfields.hh"
namespace
Dumux
{
///////////////////////////////////////////////////////////////////////////
// properties for the single-phase, multi-component k-omega model
///////////////////////////////////////////////////////////////////////////
namespace
Properties
{
//////////////////////////////////////////////////////////////////
// Type tags
//////////////////////////////////////////////////////////////////
//! The type tags for the single-phase, multi-component isothermal k-omega model
NEW_TYPE_TAG
(
KOmegaNC
,
INHERITS_FROM
(
NavierStokesNC
));
///////////////////////////////////////////////////////////////////////////
// default property values
///////////////////////////////////////////////////////////////////////////
/*!
* \ingroup FreeflowNCModel
* \brief Traits for the low-Reynolds k-epsilon multi-component model
*/
template
<
int
dimension
,
int
nComp
,
int
phaseIdx
,
int
replaceCompEqIdx
,
bool
useMoles
>
struct
KOmegaNCModelTraits
:
NavierStokesNCModelTraits
<
dimension
,
nComp
,
phaseIdx
,
replaceCompEqIdx
,
useMoles
>
{
//! There are as many momentum balance equations as dimensions
//! and as many balance equations as components.
static
constexpr
int
numEq
()
{
return
dimension
+
nComp
+
2
;
}
//! The model does include a turbulence model
static
constexpr
bool
usesTurbulenceModel
()
{
return
true
;
}
//! the indices
using
Indices
=
FreeflowNCIndices
<
dimension
,
numEq
(),
phaseIdx
,
replaceCompEqIdx
,
KOmegaIndices
<
dimension
,
nComp
>>
;
};
//!< states some specifics of the isothermal multi-component low-Reynolds k-epsilon model
SET_PROP
(
KOmegaNC
,
ModelTraits
)
{
private:
using
GridView
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVGridGeometry
)
::
GridView
;
static
constexpr
int
dimension
=
GridView
::
dimension
;
using
FluidSystem
=
typename
GET_PROP_TYPE
(
TypeTag
,
FluidSystem
);
static
constexpr
int
numComponents
=
FluidSystem
::
numComponents
;
static
constexpr
int
phaseIdx
=
GET_PROP_VALUE
(
TypeTag
,
PhaseIdx
);
static
constexpr
int
replaceCompEqIdx
=
GET_PROP_VALUE
(
TypeTag
,
ReplaceCompEqIdx
);
static
constexpr
bool
useMoles
=
GET_PROP_VALUE
(
TypeTag
,
UseMoles
);
public:
using
type
=
KOmegaNCModelTraits
<
dimension
,
numComponents
,
phaseIdx
,
replaceCompEqIdx
,
useMoles
>
;
};
//! Set the volume variables property
SET_PROP
(
KOmegaNC
,
VolumeVariables
)
{
private:
using
PV
=
typename
GET_PROP_TYPE
(
TypeTag
,
PrimaryVariables
);
using
FSY
=
typename
GET_PROP_TYPE
(
TypeTag
,
FluidSystem
);
using
FST
=
typename
GET_PROP_TYPE
(
TypeTag
,
FluidState
);
using
MT
=
typename
GET_PROP_TYPE
(
TypeTag
,
ModelTraits
);
using
Traits
=
NavierStokesVolumeVariablesTraits
<
PV
,
FSY
,
FST
,
MT
>
;
using
NCVolVars
=
FreeflowNCVolumeVariables
<
Traits
>
;
public:
using
type
=
KOmegaVolumeVariables
<
Traits
,
NCVolVars
>
;
};
//! The local residual
SET_PROP
(
KOmegaNC
,
LocalResidual
)
{
private:
using
BaseLocalResidual
=
FreeflowNCResidual
<
TypeTag
>
;
public:
using
type
=
KOmegaResidual
<
TypeTag
,
BaseLocalResidual
>
;
};
//! The flux variables
SET_PROP
(
KOmegaNC
,
FluxVariables
)
{
private:
using
BaseFluxVariables
=
FreeflowNCFluxVariables
<
TypeTag
>
;
public:
using
type
=
KOmegaFluxVariables
<
TypeTag
,
BaseFluxVariables
>
;
};
//! The specific vtk output fields
SET_PROP
(
KOmegaNC
,
VtkOutputFields
)
{
private:
using
ModelTraits
=
typename
GET_PROP_TYPE
(
TypeTag
,
ModelTraits
);
using
FVGridGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVGridGeometry
);
using
FluidSystem
=
typename
GET_PROP_TYPE
(
TypeTag
,
FluidSystem
);
static
constexpr
int
phaseIdx
=
GET_PROP_VALUE
(
TypeTag
,
PhaseIdx
);
using
SinglePhaseVtkOutputFields
=
KOmegaVtkOutputFields
<
FVGridGeometry
>
;
public:
using
type
=
FreeflowNCVtkOutputFields
<
SinglePhaseVtkOutputFields
,
ModelTraits
,
FVGridGeometry
,
FluidSystem
,
phaseIdx
>
;
};
//////////////////////////////////////////////////////////////////////////
// Property values for non-isothermal multi-component k-omega model
//////////////////////////////////////////////////////////////////////////
//! The type tags for the single-phase, multi-component non-isothermal k-omega models
NEW_TYPE_TAG
(
KOmegaNCNI
,
INHERITS_FROM
(
NavierStokesNCNI
));
//! The model traits of the non-isothermal model
SET_PROP
(
KOmegaNCNI
,
ModelTraits
)
{
private:
using
GridView
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVGridGeometry
)
::
GridView
;
static
constexpr
int
dim
=
GridView
::
dimension
;
using
FluidSystem
=
typename
GET_PROP_TYPE
(
TypeTag
,
FluidSystem
);
static
constexpr
int
numComponents
=
FluidSystem
::
numComponents
;
static
constexpr
int
phaseIdx
=
GET_PROP_VALUE
(
TypeTag
,
PhaseIdx
);
static
constexpr
int
replaceCompEqIdx
=
GET_PROP_VALUE
(
TypeTag
,
ReplaceCompEqIdx
);
static
constexpr
bool
useMoles
=
GET_PROP_VALUE
(
TypeTag
,
UseMoles
);
using
IsothermalModelTraits
=
KOmegaNCModelTraits
<
dim
,
numComponents
,
phaseIdx
,
replaceCompEqIdx
,
useMoles
>
;
public:
using
type
=
FreeflowNIModelTraits
<
IsothermalModelTraits
>
;
};
//! Set the volume variables property
SET_PROP
(
KOmegaNCNI
,
VolumeVariables
)
{
private:
using
PV
=
typename
GET_PROP_TYPE
(
TypeTag
,
PrimaryVariables
);
using
FSY
=
typename
GET_PROP_TYPE
(
TypeTag
,
FluidSystem
);
using
FST
=
typename
GET_PROP_TYPE
(
TypeTag
,
FluidState
);
using
MT
=
typename
GET_PROP_TYPE
(
TypeTag
,
ModelTraits
);
using
Traits
=
NavierStokesVolumeVariablesTraits
<
PV
,
FSY
,
FST
,
MT
>
;
using
NCVolVars
=
FreeflowNCVolumeVariables
<
Traits
>
;
public:
using
type
=
KOmegaVolumeVariables
<
Traits
,
NCVolVars
>
;
};
//! The local residual
SET_PROP
(
KOmegaNCNI
,
LocalResidual
)
{
private:
using
BaseLocalResidual
=
FreeflowNCResidual
<
TypeTag
>
;
public:
using
type
=
KOmegaResidual
<
TypeTag
,
BaseLocalResidual
>
;
};
//! The flux variables
SET_PROP
(
KOmegaNCNI
,
FluxVariables
)
{
private:
using
BaseFluxVariables
=
FreeflowNCFluxVariables
<
TypeTag
>
;
public:
using
type
=
KOmegaFluxVariables
<
TypeTag
,
BaseFluxVariables
>
;
};
//! The specific vtk output fields
SET_PROP
(
KOmegaNCNI
,
VtkOutputFields
)
{
private:
using
ModelTraits
=
typename
GET_PROP_TYPE
(
TypeTag
,
ModelTraits
);
using
FVGridGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVGridGeometry
);
using
FluidSystem
=
typename
GET_PROP_TYPE
(
TypeTag
,
FluidSystem
);
static
constexpr
int
phaseIdx
=
GET_PROP_VALUE
(
TypeTag
,
PhaseIdx
);
using
BaseVtkOutputFields
=
KOmegaVtkOutputFields
<
FVGridGeometry
>
;
using
NonIsothermalFields
=
FreeflowNonIsothermalVtkOutputFields
<
BaseVtkOutputFields
,
ModelTraits
>
;
public:
using
type
=
FreeflowNCVtkOutputFields
<
NonIsothermalFields
,
ModelTraits
,
FVGridGeometry
,
FluidSystem
,
phaseIdx
>
;
};
// \}
}
// end namespace Properties
}
// end namespace Dumux
#endif
Loading