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
22550fba
Commit
22550fba
authored
7 years ago
by
Kilian Weishaupt
Browse files
Options
Downloads
Patches
Plain Diff
[staggered][test] Adapt channel test for NI
* so additional clean-up
parent
8db3e352
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!617
[WIP] Next
,
!507
Cleanup/staggered energy
,
!483
Feature/staggered energy
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/freeflow/staggered/CMakeLists.txt
+15
-0
15 additions, 0 deletions
test/freeflow/staggered/CMakeLists.txt
test/freeflow/staggered/channeltestproblem.hh
+41
-23
41 additions, 23 deletions
test/freeflow/staggered/channeltestproblem.hh
with
56 additions
and
23 deletions
test/freeflow/staggered/CMakeLists.txt
+
15
−
0
View file @
22550fba
...
...
@@ -22,6 +22,21 @@ add_dumux_test(test_channel_stokes test_channel_stokes test_channel.cc
${
CMAKE_CURRENT_BINARY_DIR
}
/test_channel_stokes-00002.vtu
--command
"
${
CMAKE_CURRENT_BINARY_DIR
}
/test_channel_stokes"
)
add_dumux_test
(
test_channel_stokesni_convection test_channel_stokesni test_channel.cc
python
${
CMAKE_SOURCE_DIR
}
/bin/testing/runtest.py
--script fuzzy
--files
${
CMAKE_SOURCE_DIR
}
/test/references/channel-stokes.vtu
${
CMAKE_CURRENT_BINARY_DIR
}
/test_channel_stokes-00002.vtu
--command
"
${
CMAKE_CURRENT_BINARY_DIR
}
/test_channel_stokesni test_channel_stokesni_convection.input"
)
target_compile_definitions
(
test_channel_stokesni PUBLIC
"NONISOTHERMAL=1"
)
add_dumux_test
(
test_channel_stokesni_conduction test_channel_stokesni test_channel.cc
python
${
CMAKE_SOURCE_DIR
}
/bin/testing/runtest.py
--script fuzzy
--files
${
CMAKE_SOURCE_DIR
}
/test/references/channel-stokes.vtu
${
CMAKE_CURRENT_BINARY_DIR
}
/test_channel_stokes-00002.vtu
--command
"
${
CMAKE_CURRENT_BINARY_DIR
}
/test_channel_stokesni test_channel_stokesni_conduction.input"
)
add_dumux_test
(
test_channel_navierstokes test_channel_navierstokes test_channel.cc
python
${
CMAKE_SOURCE_DIR
}
/bin/testing/runtest.py
--script fuzzy
...
...
This diff is collapsed.
Click to expand it.
test/freeflow/staggered/channeltestproblem.hh
+
41
−
23
View file @
22550fba
...
...
@@ -45,14 +45,22 @@ namespace Capabilities
namespace
Properties
{
#if !NONISOTHERMAL
NEW_TYPE_TAG
(
ChannelTestProblem
,
INHERITS_FROM
(
StaggeredModel
,
NavierStokes
));
#else
NEW_TYPE_TAG
(
ChannelTestProblem
,
INHERITS_FROM
(
StaggeredModel
,
NavierStokesNI
));
#endif
SET_PROP
(
ChannelTestProblem
,
Fluid
)
{
private:
typedef
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
)
Scalar
;
using
Scalar
=
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
);
public:
typedef
FluidSystems
::
LiquidPhase
<
Scalar
,
Dumux
::
Constant
<
TypeTag
,
Scalar
>
>
type
;
#if NONISOTHERMAL
using
type
=
FluidSystems
::
LiquidPhase
<
Scalar
,
Dumux
::
SimpleH2O
<
Scalar
>
>
;
#else
using
type
=
FluidSystems
::
LiquidPhase
<
Scalar
,
Dumux
::
Constant
<
TypeTag
,
Scalar
>
>
;
#endif
};
// Set the grid type
...
...
@@ -77,7 +85,7 @@ SET_BOOL_PROP(ChannelTestProblem, EnableInertiaTerms, false);
}
/*!
* \brief Test problem for the one-phase
mod
el:
* \brief Test problem for the one-phase
(Navier-) Stokes problem in a chann
el:
\todo doc me!
*/
template
<
class
TypeTag
>
...
...
@@ -101,20 +109,24 @@ class ChannelTestProblem : public NavierStokesProblem<TypeTag>
momentumXBalanceIdx
=
Indices
::
momentumXBalanceIdx
,
momentumYBalanceIdx
=
Indices
::
momentumYBalanceIdx
,
pressureIdx
=
Indices
::
pressureIdx
,
#if NONISOTHERMAL
temperatureIdx
=
Indices
::
temperatureIdx
,
energyBalanceIdx
=
Indices
::
energyBalanceIdx
,
#endif
velocityXIdx
=
Indices
::
velocityXIdx
,
velocityYIdx
=
Indices
::
velocityYIdx
};
typedef
typename
GET_PROP_TYPE
(
TypeTag
,
BoundaryTypes
)
BoundaryTypes
;
typedef
typename
GET_PROP_TYPE
(
TypeTag
,
TimeManager
)
TimeManager
;
using
BoundaryTypes
=
typename
GET_PROP_TYPE
(
TypeTag
,
BoundaryTypes
);
using
TimeManager
=
typename
GET_PROP_TYPE
(
TypeTag
,
TimeManager
);
typedef
typename
GridView
::
template
Codim
<
0
>
::
Entity
Element
;
typedef
typename
GridView
::
Intersection
Intersection
;
using
Element
=
typename
GridView
::
template
Codim
<
0
>
::
Entity
;
using
Intersection
=
typename
GridView
::
Intersection
;
typedef
typename
GET_PROP_TYPE
(
TypeTag
,
FVElementGeometry
)
FVElementGeometry
;
typedef
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolume
)
SubControlVolume
;
using
FVElementGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVElementGeometry
);
using
SubControlVolume
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolume
);
typedef
Dune
::
FieldVector
<
Scalar
,
dimWorld
>
GlobalPosition
;
using
GlobalPosition
=
Dune
::
FieldVector
<
Scalar
,
dimWorld
>
;
using
CellCenterPrimaryVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
CellCenterPrimaryVariables
);
using
FacePrimaryVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
FacePrimaryVariables
);
...
...
@@ -194,6 +206,13 @@ public:
// set Dirichlet values for the velocity everywhere
values
.
setDirichlet
(
momentumBalanceIdx
);
#if NONISOTHERMAL
if
(
isInlet
(
globalPos
))
values
.
setDirichlet
(
energyBalanceIdx
);
else
values
.
setOutflow
(
energyBalanceIdx
);
#endif
// set a fixed pressure in one cell
if
(
isOutlet
(
globalPos
))
{
...
...
@@ -214,23 +233,18 @@ public:
*/
BoundaryValues
dirichletAtPos
(
const
GlobalPosition
&
globalPos
)
const
{
BoundaryValues
values
;
values
[
pressureIdx
]
=
1.1e+5
;
BoundaryValues
values
=
initialAtPos
(
globalPos
);
if
(
isInlet
(
globalPos
))
{
values
[
velocityXIdx
]
=
inletVelocity_
;
values
[
velocityYIdx
]
=
0.0
;
}
else
if
(
isWall
(
globalPos
))
{
values
[
velocityXIdx
]
=
0.0
;
values
[
velocityYIdx
]
=
0.0
;
}
else
if
(
isOutlet
(
globalPos
))
{
values
[
velocityXIdx
]
=
1.0
;
values
[
velocityYIdx
]
=
0.0
;
#if NONISOTHERMAL
const
Scalar
time
=
this
->
timeManager
().
time
()
+
this
->
timeManager
().
timeStepSize
();
// give the system some time so that the pressure can equilibrate, then start the injection of the hot liquid
if
(
time
>
20.0
)
values
[
temperatureIdx
]
=
293.15
;
#endif
}
return
values
;
...
...
@@ -255,6 +269,10 @@ public:
values
[
velocityXIdx
]
=
0.0
;
values
[
velocityYIdx
]
=
0.0
;
#if NONISOTHERMAL
values
[
temperatureIdx
]
=
283.15
;
#endif
return
values
;
}
...
...
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