Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
5c0d4151
Commit
5c0d4151
authored
Aug 31, 2018
by
Kilian Weishaupt
Browse files
[io][freeflow] Rename vtkoutputfieds to iofields
parent
7f6afd8a
Changes
33
Hide whitespace changes
Inline
Side-by-side
dumux/freeflow/compositional/CMakeLists.txt
View file @
5c0d4151
...
...
@@ -10,6 +10,6 @@ lowrekepsilonncmodel.hh
navierstokesncmodel.hh
oneeqncmodel.hh
volumevariables.hh
vtkoutput
fields.hh
io
fields.hh
zeroeqncmodel.hh
DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
/dumux/freeflow/compositional
)
dumux/freeflow/compositional/
vtkoutput
fields.hh
→
dumux/freeflow/compositional/
io
fields.hh
View file @
5c0d4151
...
...
@@ -19,52 +19,70 @@
/*!
* \file
* \ingroup FreeflowNCModel
* \copydoc Dumux::FreeflowNC
VtkOutput
Fields
* \copydoc Dumux::FreeflowNC
IO
Fields
*/
#ifndef DUMUX_FREEFLOW_NC_
VTK_OUTPUT
_FIELDS_HH
#define DUMUX_FREEFLOW_NC_
VTK_OUTPUT
_FIELDS_HH
#ifndef DUMUX_FREEFLOW_NC_
IO
_FIELDS_HH
#define DUMUX_FREEFLOW_NC_
IO
_FIELDS_HH
#include
<dumux/freeflow/navierstokes/vtkoutputfields.hh>
#include
<dumux/freeflow/navierstokes/iofields.hh>
#include
<dune/common/deprecated.hh>
namespace
Dumux
{
/*!
* \ingroup FreeflowNCModel
* \brief Adds
vtk output
fields specific to the FreeflowNC model
* \brief Adds
I/O
fields specific to the FreeflowNC model
*/
template
<
class
Base
Vtk
OutputFields
,
class
ModelTraits
,
class
FVGridGeometry
,
class
FluidSystem
>
class
FreeflowNC
VtkOutput
Fields
template
<
class
BaseOutputFields
,
class
ModelTraits
>
class
FreeflowNC
IO
Fields
{
public:
//! Initialize the FreeflowNC specific vtk output fields.
template
<
class
VtkOutputModule
>
static
void
init
(
VtkOutputModule
&
vtk
)
//! Initialize the FreeflowNC specific output fields.
template
<
class
OutputModule
>
DUNE_DEPRECATED_MSG
(
"use initOutputModule instead"
)
static
void
init
(
OutputModule
&
out
)
{
BaseVtkOutputFields
::
init
(
vtk
);
add
(
vtk
);
initOutputModule
(
out
);
}
//!
Add
the FreeflowNC specific
vtk
output fields.
template
<
class
Vtk
OutputModule
>
static
void
add
(
Vtk
OutputModule
&
vtk
)
//!
Initialize
the FreeflowNC specific output fields.
template
<
class
OutputModule
>
static
void
initOutputModule
(
OutputModule
&
out
)
{
BaseOutputFields
::
initOutputModule
(
out
);
using
namespace
IOFieldNames
;
using
FluidSystem
=
typename
OutputModule
::
VolumeVariables
::
FluidSystem
;
for
(
int
j
=
0
;
j
<
FluidSystem
::
numComponents
;
++
j
)
{
vtk
.
addVolumeVariable
([
j
](
const
auto
&
v
){
return
v
.
massFraction
(
j
);
},
"X^"
+
FluidSystem
::
componentName
(
j
)
+
"_"
+
FluidSystem
::
phaseName
(
0
));
vtk
.
addVolumeVariable
([
j
](
const
auto
&
v
){
return
v
.
moleFraction
(
j
);
},
"x^"
+
FluidSystem
::
componentName
(
j
)
+
"_"
+
FluidSystem
::
phaseName
(
0
));
out
.
addVolumeVariable
([
j
](
const
auto
&
v
){
return
v
.
massFraction
(
j
);
},
massFraction
<
FluidSystem
>
(
0
,
j
));
out
.
addVolumeVariable
([
j
](
const
auto
&
v
){
return
v
.
moleFraction
(
j
);
},
moleFraction
<
FluidSystem
>
(
0
,
j
));
if
(
j
!=
FluidSystem
::
getMainComponent
(
0
))
{
vtk
.
addVolumeVariable
([
j
](
const
auto
&
v
){
return
v
.
diffusionCoefficient
(
0
,
j
);
},
"D^"
+
FluidSystem
::
componentName
(
j
)
+
"_"
+
FluidSystem
::
phaseName
(
0
));
out
.
addVolumeVariable
([
j
](
const
auto
&
v
){
return
v
.
diffusionCoefficient
(
0
,
j
);
},
"D^"
+
FluidSystem
::
componentName
(
j
)
+
"_"
+
FluidSystem
::
phaseName
(
0
));
// the eddy diffusivity is recalculated for an arbitrary component which is not the phase component
if
(
ModelTraits
::
usesTurbulenceModel
())
vtk
.
addVolumeVariable
([
j
](
const
auto
&
v
){
return
v
.
effectiveDiffusivity
(
0
,
j
)
-
v
.
diffusionCoefficient
(
0
,
j
);
},
"D_t"
);
out
.
addVolumeVariable
([
j
](
const
auto
&
v
){
return
v
.
effectiveDiffusivity
(
0
,
j
)
-
v
.
diffusionCoefficient
(
0
,
j
);
},
"D_t"
);
}
}
}
//! return the names of the primary variables
template
<
class
FluidSystem
>
static
std
::
string
primaryVariableName
(
int
pvIdx
=
0
,
int
state
=
0
)
{
using
namespace
IOFieldNames
;
if
(
pvIdx
<=
ModelTraits
::
dim
())
return
BaseOutputFields
::
template
primaryVariableName
<
FluidSystem
>(
pvIdx
,
state
);
else
return
ModelTraits
::
useMoles
()
?
moleFraction
<
FluidSystem
>
(
pvIdx
-
ModelTraits
::
dim
())
:
massFraction
<
FluidSystem
>
(
pvIdx
-
ModelTraits
::
dim
());
}
};
}
// end namespace Dumux
...
...
dumux/freeflow/compositional/kepsilonncmodel.hh
View file @
5c0d4151
...
...
@@ -30,10 +30,10 @@
#include
<dumux/common/properties.hh>
#include
<dumux/freeflow/compositional/navierstokesncmodel.hh>
#include
<dumux/freeflow/nonisothermal/
vtkoutput
fields.hh>
#include
<dumux/freeflow/nonisothermal/
io
fields.hh>
#include
<dumux/freeflow/rans/twoeq/kepsilon/model.hh>
#include
"
vtkoutput
fields.hh"
#include
"
io
fields.hh"
namespace
Dumux
{
...
...
@@ -136,16 +136,15 @@ public:
using
type
=
KEpsilonFluxVariables
<
TypeTag
,
BaseFluxVariables
>
;
};
//! The specific
vtk output
fields
SET_PROP
(
KEpsilonNC
,
VtkOutput
Fields
)
//! The specific
I/O
fields
SET_PROP
(
KEpsilonNC
,
IO
Fields
)
{
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
);
using
SinglePhaseVtkOutputFields
=
KEpsilonVtkOutputFields
<
FVGridGeometry
>
;
using
SinglePhaseIOFields
=
KEpsilonIOFields
<
FVGridGeometry
>
;
public:
using
type
=
FreeflowNC
VtkOutput
Fields
<
SinglePhase
VtkOutput
Fields
,
ModelTraits
,
FVGridGeometry
,
FluidSystem
>
;
using
type
=
FreeflowNC
IO
Fields
<
SinglePhase
IO
Fields
,
ModelTraits
>
;
};
//////////////////////////////////////////////////////////////////////////
...
...
@@ -208,17 +207,16 @@ public:
using
type
=
KEpsilonFluxVariables
<
TypeTag
,
BaseFluxVariables
>
;
};
//! The specific
vtk output
fields
SET_PROP
(
KEpsilonNCNI
,
VtkOutput
Fields
)
//! The specific
I/O
fields
SET_PROP
(
KEpsilonNCNI
,
IO
Fields
)
{
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
);
using
BaseVtkOutputFields
=
KEpsilonVtkOutputFields
<
FVGridGeometry
>
;
using
NonIsothermalFields
=
FreeflowNonIsothermalVtkOutputFields
<
BaseVtkOutputFields
,
ModelTraits
>
;
using
BaseIOFields
=
KEpsilonIOFields
<
FVGridGeometry
>
;
using
NonIsothermalFields
=
FreeflowNonIsothermalIOFields
<
BaseIOFields
,
ModelTraits
>
;
public:
using
type
=
FreeflowNC
VtkOutput
Fields
<
NonIsothermalFields
,
ModelTraits
,
FVGridGeometry
,
FluidSystem
>
;
using
type
=
FreeflowNC
IO
Fields
<
NonIsothermalFields
,
ModelTraits
>
;
};
// \}
...
...
dumux/freeflow/compositional/komegancmodel.hh
View file @
5c0d4151
...
...
@@ -30,10 +30,10 @@
#include
<dumux/common/properties.hh>
#include
<dumux/freeflow/compositional/navierstokesncmodel.hh>
#include
<dumux/freeflow/nonisothermal/
vtkoutput
fields.hh>
#include
<dumux/freeflow/nonisothermal/
io
fields.hh>
#include
<dumux/freeflow/rans/twoeq/komega/model.hh>
#include
"
vtkoutput
fields.hh"
#include
"
io
fields.hh"
namespace
Dumux
{
...
...
@@ -141,16 +141,15 @@ public:
using
type
=
KOmegaFluxVariables
<
TypeTag
,
BaseFluxVariables
>
;
};
//! The specific
vtk output
fields
SET_PROP
(
KOmegaNC
,
VtkOutput
Fields
)
//! The specific
I/O
fields
SET_PROP
(
KOmegaNC
,
IO
Fields
)
{
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
);
using
SinglePhaseVtkOutputFields
=
KOmegaVtkOutputFields
<
FVGridGeometry
>
;
using
SinglePhaseIOFields
=
KOmegaIOFields
<
FVGridGeometry
>
;
public:
using
type
=
FreeflowNC
VtkOutput
Fields
<
SinglePhase
VtkOutput
Fields
,
ModelTraits
,
FVGridGeometry
,
FluidSystem
>
;
using
type
=
FreeflowNC
IO
Fields
<
SinglePhase
IO
Fields
,
ModelTraits
>
;
};
//////////////////////////////////////////////////////////////////////////
...
...
@@ -213,17 +212,16 @@ public:
using
type
=
KOmegaFluxVariables
<
TypeTag
,
BaseFluxVariables
>
;
};
//! The specific
vtk output
fields
SET_PROP
(
KOmegaNCNI
,
VtkOutput
Fields
)
//! The specific
I/O
fields
SET_PROP
(
KOmegaNCNI
,
IO
Fields
)
{
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
);
using
BaseVtkOutputFields
=
KOmegaVtkOutputFields
<
FVGridGeometry
>
;
using
NonIsothermalFields
=
FreeflowNonIsothermalVtkOutputFields
<
BaseVtkOutputFields
,
ModelTraits
>
;
using
BaseIOFields
=
KOmegaIOFields
<
FVGridGeometry
>
;
using
NonIsothermalFields
=
FreeflowNonIsothermalIOFields
<
BaseIOFields
,
ModelTraits
>
;
public:
using
type
=
FreeflowNC
VtkOutput
Fields
<
NonIsothermalFields
,
ModelTraits
,
FVGridGeometry
,
FluidSystem
>
;
using
type
=
FreeflowNC
IO
Fields
<
NonIsothermalFields
,
ModelTraits
>
;
};
// \}
...
...
dumux/freeflow/compositional/lowrekepsilonncmodel.hh
View file @
5c0d4151
...
...
@@ -30,10 +30,10 @@
#include
<dumux/common/properties.hh>
#include
<dumux/freeflow/compositional/navierstokesncmodel.hh>
#include
<dumux/freeflow/nonisothermal/
vtkoutput
fields.hh>
#include
<dumux/freeflow/nonisothermal/
io
fields.hh>
#include
<dumux/freeflow/rans/twoeq/lowrekepsilon/model.hh>
#include
"
vtkoutput
fields.hh"
#include
"
io
fields.hh"
namespace
Dumux
{
...
...
@@ -141,16 +141,15 @@ public:
using
type
=
LowReKEpsilonFluxVariables
<
TypeTag
,
BaseFluxVariables
>
;
};
//! The specific
vtk output
fields
SET_PROP
(
LowReKEpsilonNC
,
VtkOutput
Fields
)
//! The specific
I/O
fields
SET_PROP
(
LowReKEpsilonNC
,
IO
Fields
)
{
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
);
using
SinglePhaseVtkOutputFields
=
LowReKEpsilonVtkOutputFields
<
FVGridGeometry
>
;
using
SinglePhaseIOFields
=
LowReKEpsilonIOFields
<
FVGridGeometry
>
;
public:
using
type
=
FreeflowNC
VtkOutput
Fields
<
SinglePhase
VtkOutput
Fields
,
ModelTraits
,
FVGridGeometry
,
FluidSystem
>
;
using
type
=
FreeflowNC
IO
Fields
<
SinglePhase
IO
Fields
,
ModelTraits
>
;
};
//////////////////////////////////////////////////////////////////////////
...
...
@@ -213,17 +212,16 @@ public:
using
type
=
LowReKEpsilonFluxVariables
<
TypeTag
,
BaseFluxVariables
>
;
};
//! The specific
vtk output
fields
SET_PROP
(
LowReKEpsilonNCNI
,
VtkOutput
Fields
)
//! The specific
I/O
fields
SET_PROP
(
LowReKEpsilonNCNI
,
IO
Fields
)
{
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
);
using
BaseVtkOutputFields
=
LowReKEpsilonVtkOutputFields
<
FVGridGeometry
>
;
using
NonIsothermalFields
=
FreeflowNonIsothermalVtkOutputFields
<
BaseVtkOutputFields
,
ModelTraits
>
;
using
BaseIOFields
=
LowReKEpsilonIOFields
<
FVGridGeometry
>
;
using
NonIsothermalFields
=
FreeflowNonIsothermalIOFields
<
BaseIOFields
,
ModelTraits
>
;
public:
using
type
=
FreeflowNC
VtkOutput
Fields
<
NonIsothermalFields
,
ModelTraits
,
FVGridGeometry
,
FluidSystem
>
;
using
type
=
FreeflowNC
IO
Fields
<
NonIsothermalFields
,
ModelTraits
>
;
};
// \}
...
...
dumux/freeflow/compositional/navierstokesncmodel.hh
View file @
5c0d4151
...
...
@@ -55,14 +55,14 @@
#include
<dumux/freeflow/navierstokes/model.hh>
#include
<dumux/freeflow/nonisothermal/model.hh>
#include
<dumux/freeflow/nonisothermal/indices.hh>
#include
<dumux/freeflow/nonisothermal/
vtkoutput
fields.hh>
#include
<dumux/freeflow/nonisothermal/
io
fields.hh>
#include
<dumux/discretization/fickslaw.hh>
#include
<dumux/discretization/fourierslaw.hh>
#include
"volumevariables.hh"
#include
"localresidual.hh"
#include
"fluxvariables.hh"
#include
"
vtkoutput
fields.hh"
#include
"
io
fields.hh"
#include
<dumux/assembly/staggeredlocalresidual.hh>
#include
<dumux/material/fluidsystems/1pgas.hh>
...
...
@@ -182,16 +182,15 @@ SET_TYPE_PROP(NavierStokesNC, FluxVariables, FreeflowNCFluxVariables<TypeTag>);
//! The flux variables cache class, by default the one for free flow
SET_TYPE_PROP
(
NavierStokesNC
,
FluxVariablesCache
,
FreeFlowFluxVariablesCache
<
TypeTag
>
);
//! The specific
vtk output
fields
SET_PROP
(
NavierStokesNC
,
VtkOutput
Fields
)
//! The specific
I/O
fields
SET_PROP
(
NavierStokesNC
,
IO
Fields
)
{
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
);
using
BaseVtkOutputFields
=
NavierStokesVtkOutputFields
<
FVGridGeometry
>
;
using
BaseIOFields
=
NavierStokesIOFields
<
FVGridGeometry
>
;
public:
using
type
=
FreeflowNC
VtkOutput
Fields
<
Base
VtkOutput
Fields
,
ModelTraits
,
FVGridGeometry
,
FluidSystem
>
;
using
type
=
FreeflowNC
IO
Fields
<
Base
IO
Fields
,
ModelTraits
>
;
};
/*!
...
...
@@ -231,17 +230,16 @@ public:
using
type
=
FreeflowNIModelTraits
<
IsothermalModelTraits
>
;
};
//! The non-isothermal
vtk output
fields
SET_PROP
(
NavierStokesNCNI
,
VtkOutput
Fields
)
//! The non-isothermal
I/O
fields
SET_PROP
(
NavierStokesNCNI
,
IO
Fields
)
{
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
);
using
BaseVtkOutputFields
=
NavierStokesVtkOutputFields
<
FVGridGeometry
>
;
using
NonIsothermalFields
=
FreeflowNonIsothermalVtkOutputFields
<
BaseVtkOutputFields
,
ModelTraits
>
;
using
BaseIOFields
=
NavierStokesIOFields
<
FVGridGeometry
>
;
using
NonIsothermalFields
=
FreeflowNonIsothermalIOFields
<
BaseIOFields
,
ModelTraits
>
;
public:
using
type
=
FreeflowNC
VtkOutput
Fields
<
NonIsothermalFields
,
ModelTraits
,
FVGridGeometry
,
FluidSystem
>
;
using
type
=
FreeflowNC
IO
Fields
<
NonIsothermalFields
,
ModelTraits
>
;
};
//! Use Fourier's Law as default heat conduction type
...
...
dumux/freeflow/compositional/oneeqncmodel.hh
View file @
5c0d4151
...
...
@@ -30,10 +30,10 @@
#include
<dumux/common/properties.hh>
#include
<dumux/freeflow/compositional/navierstokesncmodel.hh>
#include
<dumux/freeflow/nonisothermal/
vtkoutput
fields.hh>
#include
<dumux/freeflow/nonisothermal/
io
fields.hh>
#include
<dumux/freeflow/rans/oneeq/model.hh>
#include
"
vtkoutput
fields.hh"
#include
"
io
fields.hh"
namespace
Dumux
{
...
...
@@ -139,16 +139,15 @@ public:
using
type
=
OneEqFluxVariables
<
TypeTag
,
BaseFluxVariables
>
;
};
//! The specific
vtk output
fields
SET_PROP
(
OneEqNC
,
VtkOutput
Fields
)
//! The specific
I/O
fields
SET_PROP
(
OneEqNC
,
IO
Fields
)
{
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
);
using
SinglePhaseVtkOutputFields
=
OneEqVtkOutputFields
<
FVGridGeometry
>
;
using
SinglePhaseIOFields
=
OneEqIOFields
<
FVGridGeometry
>
;
public:
using
type
=
FreeflowNC
VtkOutput
Fields
<
SinglePhase
VtkOutput
Fields
,
ModelTraits
,
FVGridGeometry
,
FluidSystem
>
;
using
type
=
FreeflowNC
IO
Fields
<
SinglePhase
IO
Fields
,
ModelTraits
>
;
};
//////////////////////////////////////////////////////////////////////////
...
...
@@ -211,17 +210,16 @@ public:
using
type
=
OneEqFluxVariables
<
TypeTag
,
BaseFluxVariables
>
;
};
//! The specific
vtk output
fields
SET_PROP
(
OneEqNCNI
,
VtkOutput
Fields
)
//! The specific
I/O
fields
SET_PROP
(
OneEqNCNI
,
IO
Fields
)
{
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
);
using
BaseVtkOutputFields
=
OneEqVtkOutputFields
<
FVGridGeometry
>
;
using
NonIsothermalFields
=
FreeflowNonIsothermalVtkOutputFields
<
BaseVtkOutputFields
,
ModelTraits
>
;
using
BaseIOFields
=
OneEqIOFields
<
FVGridGeometry
>
;
using
NonIsothermalFields
=
FreeflowNonIsothermalIOFields
<
BaseIOFields
,
ModelTraits
>
;
public:
using
type
=
FreeflowNC
VtkOutput
Fields
<
NonIsothermalFields
,
ModelTraits
,
FVGridGeometry
,
FluidSystem
>
;
using
type
=
FreeflowNC
IO
Fields
<
NonIsothermalFields
,
ModelTraits
>
;
};
// \}
...
...
dumux/freeflow/compositional/zeroeqncmodel.hh
View file @
5c0d4151
...
...
@@ -30,10 +30,10 @@
#include
<dumux/common/properties.hh>
#include
<dumux/freeflow/compositional/navierstokesncmodel.hh>
#include
<dumux/freeflow/nonisothermal/
vtkoutput
fields.hh>
#include
<dumux/freeflow/nonisothermal/
io
fields.hh>
#include
<dumux/freeflow/rans/zeroeq/model.hh>
#include
"
vtkoutput
fields.hh"
#include
"
io
fields.hh"
namespace
Dumux
{
...
...
@@ -98,16 +98,15 @@ public:
using
type
=
ZeroEqVolumeVariables
<
Traits
,
CompositionalVolVars
>
;
};
//! The specific
vtk output
fields
SET_PROP
(
ZeroEqNC
,
VtkOutput
Fields
)
//! The specific
I/O
fields
SET_PROP
(
ZeroEqNC
,
IO
Fields
)
{
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
);
using
BaseVtkOutputFields
=
RANSVtkOutputFields
<
FVGridGeometry
>
;
using
BaseIOFields
=
RANSIOFields
<
FVGridGeometry
>
;
public:
using
type
=
FreeflowNC
VtkOutput
Fields
<
Base
VtkOutput
Fields
,
ModelTraits
,
FVGridGeometry
,
FluidSystem
>
;
using
type
=
FreeflowNC
IO
Fields
<
Base
IO
Fields
,
ModelTraits
>
;
};
//////////////////////////////////////////////////////////////////////////
...
...
@@ -152,17 +151,16 @@ public:
using
type
=
ZeroEqVolumeVariables
<
Traits
,
NCVolVars
>
;
};
//! The specific
vtk output
fields
SET_PROP
(
ZeroEqNCNI
,
VtkOutput
Fields
)
//! The specific
I/O
fields
SET_PROP
(
ZeroEqNCNI
,
IO
Fields
)
{
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
);
using
BaseVtkOutputFields
=
RANSVtkOutputFields
<
FVGridGeometry
>
;
using
NonIsothermalFields
=
FreeflowNonIsothermalVtkOutputFields
<
BaseVtkOutputFields
,
ModelTraits
>
;
using
BaseIOFields
=
RANSIOFields
<
FVGridGeometry
>
;
using
NonIsothermalFields
=
FreeflowNonIsothermalIOFields
<
BaseIOFields
,
ModelTraits
>
;
public:
using
type
=
FreeflowNC
VtkOutput
Fields
<
NonIsothermalFields
,
ModelTraits
,
FVGridGeometry
,
FluidSystem
>
;
using
type
=
FreeflowNC
IO
Fields
<
NonIsothermalFields
,
ModelTraits
>
;
};
// \}
...
...
dumux/freeflow/navierstokes/CMakeLists.txt
View file @
5c0d4151
...
...
@@ -8,5 +8,5 @@ localresidual.hh
model.hh
problem.hh
volumevariables.hh
vtkoutput
fields.hh
io
fields.hh
DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
/dumux/freeflow/navierstokes
)
dumux/freeflow/navierstokes/
vtkoutput
fields.hh
→
dumux/freeflow/navierstokes/
io
fields.hh
View file @
5c0d4151
...
...
@@ -19,59 +19,84 @@
/*!
* \file
* \ingroup NavierStokesModel
* \copydoc Dumux::NavierStokes
VtkOutput
Fields
* \copydoc Dumux::NavierStokes
IO
Fields
*/
#ifndef DUMUX_NAVIER_STOKES_
VTK_OUTPUT
_FIELDS_HH
#define DUMUX_NAVIER_STOKES_
VTK_OUTPUT
_FIELDS_HH
#ifndef DUMUX_NAVIER_STOKES_
IO
_FIELDS_HH
#define DUMUX_NAVIER_STOKES_
IO
_FIELDS_HH
#include
<dune/common/fvector.hh>
#include
<dumux/common/parameters.hh>
#include
<dumux/discretization/methods.hh>
#include
<dumux/io/fieldnames.hh>
#include
<dune/common/deprecated.hh>
namespace
Dumux
{
/*!
* \ingroup NavierStokesModel
* \brief Adds
vtk output
fields for the Navier-Stokes model
* \brief Adds
I/O
fields for the Navier-Stokes model
*/
template
<
class
FVGridGeometry
>
class
NavierStokes
VtkOutput
Fields
class
NavierStokes
IO
Fields
{
// Helper type used for tag dispatching (to add discretization-specific fields).
template
<
DiscretizationMethod
discMethod
>
using
discMethodTag
=
std
::
integral_constant
<
DiscretizationMethod
,
discMethod
>
;
public:
//! Initialize the Navier-Stokes specific
vtk
output fields.
template
<
class
Vtk
OutputModule
>
static
void
init
(
Vtk
OutputModule
&
vtk
)
//! Initialize the Navier-Stokes specific output fields.
template
<
class
OutputModule
>
static
void
init
OutputModule
(
OutputModule
&
out
)
{
vtk
.
addVolumeVariable
([](
const
auto
&
v
){
return
v
.
pressure
();
},
"p"
);
vtk
.
addVolumeVariable
([](
const
auto
&
v
){
return
v
.
molarDensity
();
},
"rhoMolar"
);
vtk
.
addVolumeVariable
([](
const
auto
&
v
){
return
v
.
density
();
},
"rho"
);
using
namespace
IOFieldNames
;
using
FluidSystem
=
typename
OutputModule
::
VolumeVariables
::
FluidSystem
;
out
.
addVolumeVariable
([](
const
auto
&
v
){
return
v
.
pressure
();
},
pressure
());
out
.
addVolumeVariable
([](
const
auto
&
v
){
return
v
.
molarDensity
();
},
molarDensity
<
FluidSystem
>
());
out
.
addVolumeVariable
([](
const
auto
&
v
){
return
v
.
density
();
},
density
());
// add discretization-specific fields
additionalOutput_
(
vtk
,
discMethodTag
<
FVGridGeometry
::
discMethod
>
{});
additionalOutput_
(
out
,
discMethodTag
<
FVGridGeometry
::
discMethod
>
{});
}
template
<
class
OutputModule
>
DUNE_DEPRECATED_MSG
(
"use initOutputModule instead"
)
static
void
init
(
OutputModule
&
out
)
{
initOutputModule
(
out
);
}
//! return the names of the primary variables
template
<
class
FluidSystem
=
void
>
static
std
::
string
primaryVariableName
(
int
pvIdx
=
0
,
int
state
=
0
)
{
using
namespace
IOFieldNames
;
const
std
::
array
<
std
::
string
,
3
>
velocities
=
{
"v_x"
,
"v_y"
,
"v_z"
};
if
(
pvIdx
<
FVGridGeometry
::
Grid
::
dimension
)
return
velocities
[
pvIdx
];
else
return
pressure
();
}
private:
//! Adds discretization-specific fields (nothing by default).
template
<
class
Vtk
OutputModule
,
class
AnyMethod
>
static
void
additionalOutput_
(
Vtk
OutputModule
&
vtk
,
AnyMethod
)
template
<
class
OutputModule
,
class
AnyMethod
>
static
void
additionalOutput_
(
OutputModule
&
out
,
AnyMethod
)
{
}
//! Adds discretization-specific fields (velocity vectors on the faces for the staggered discretization).
template
<
class
Vtk
OutputModule
>
static
void
additionalOutput_
(
Vtk
OutputModule
&
vtk
,
discMethodTag
<
DiscretizationMethod
::
staggered
>
)
template
<
class
OutputModule
>
static
void
additionalOutput_
(
OutputModule
&
out
,
discMethodTag
<
DiscretizationMethod
::
staggered
>
)
{
const
bool
writeFaceVars
=
getParamFromGroup
<
bool
>
(
vtk
.
paramGroup
(),
"Vtk.WriteFaceData"
,
false
);
const
bool
writeFaceVars
=
getParamFromGroup
<
bool
>
(
out
.
paramGroup
(),
"Vtk.WriteFaceData"
,
false
);
if
(
writeFaceVars
)
{
auto
faceVelocityVector
=
[](
const
typename
FVGridGeometry
::
SubControlVolumeFace
&
scvf
,
const
auto
&
faceVars
)
{
using
Scalar
=
typename
Vtk
OutputModule
::
VolumeVariables
::
PrimaryVariables
::
value_type
;
using
Scalar
=
typename
OutputModule
::
VolumeVariables
::
PrimaryVariables
::
value_type
;
using
VelocityVector
=
Dune
::
FieldVector
<
Scalar
,
FVGridGeometry
::
GridView
::
dimensionworld
>
;
VelocityVector
velocity
(
0.0
);
...
...
@@ -79,14 +104,14 @@ private:
return
velocity
;
};
vtk
.
addFaceVariable
(
faceVelocityVector
,
"faceVelocity"
);
out
.
addFaceVariable
(
faceVelocityVector
,
"faceVelocity"
);
auto
faceNormalVelocity
=
[](
const
auto
&
faceVars
)
{
return
faceVars
.
velocitySelf
();
};
vtk
.
addFaceVariable
(
faceNormalVelocity
,
"v"
);
out
.
addFaceVariable
(
faceNormalVelocity
,
"v"
);
}
}
};
...
...
dumux/freeflow/navierstokes/model.hh
View file @
5c0d4151
...
...
@@ -52,14 +52,14 @@
#include
<dumux/freeflow/properties.hh>
#include
<dumux/freeflow/nonisothermal/model.hh>
#include
<dumux/freeflow/nonisothermal/indices.hh>
#include
<dumux/freeflow/nonisothermal/
vtkoutput
fields.hh>
#include
<dumux/freeflow/nonisothermal/
io
fields.hh>
#include
"localresidual.hh"
#include
"volumevariables.hh"
#include
"fluxvariables.hh"
#include
"fluxvariablescache.hh"
#include
"indices.hh"
#include
"
vtkoutput
fields.hh"
#include
"
io
fields.hh"
#include
<dumux/material/fluidstates/immiscible.hh>