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
9416124d
Commit
9416124d
authored
Apr 17, 2018
by
Thomas Fetzer
Browse files
[freeflow] Fix test and cleanup
parent
66d74f32
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
dumux/discretization/staggered/freeflow/fickslaw.hh
View file @
9416124d
...
...
@@ -89,7 +89,6 @@ public:
{
CellCenterPrimaryVariables
flux
(
0.0
);
const
auto
&
insideScv
=
fvGeometry
.
scv
(
scvf
.
insideScvIdx
());
const
auto
&
insideVolVars
=
elemVolVars
[
scvf
.
insideScvIdx
()];
const
auto
&
outsideVolVars
=
elemVolVars
[
scvf
.
outsideScvIdx
()];
...
...
dumux/freeflow/navierstokes/staggered/fluxvariables.hh
View file @
9416124d
...
...
@@ -147,10 +147,8 @@ public:
:
false
;
// Call the generic flux function.
const
Scalar
flux
=
advectiveFluxForCellCenter
(
elemVolVars
,
elemFaceVars
,
scvf
,
upwindTerm
,
isOutflow
);
CellCenterPrimaryVariables
result
(
0.0
);
result
[
Indices
::
conti0EqIdx
-
ModelTraits
::
dim
()]
=
flux
;
result
[
Indices
::
conti0EqIdx
-
ModelTraits
::
dim
()]
=
advectiveFluxForCellCenter
(
elemVolVars
,
elemFaceVars
,
scvf
,
upwindTerm
,
isOutflow
)
;
return
result
;
}
...
...
dumux/freeflow/rans/problem.hh
View file @
9416124d
...
...
@@ -96,6 +96,7 @@ public:
neighborID_
.
resize
(
this
->
fvGridGeometry
().
elementMapper
().
size
());
cellCenter_
.
resize
(
this
->
fvGridGeometry
().
elementMapper
().
size
(),
GlobalPosition
(
0.0
));
velocity_
.
resize
(
this
->
fvGridGeometry
().
elementMapper
().
size
(),
DimVector
(
0.0
));
velocityMaximum_
.
resize
(
this
->
fvGridGeometry
().
elementMapper
().
size
(),
DimVector
(
0.0
));
velocityGradients_
.
resize
(
this
->
fvGridGeometry
().
elementMapper
().
size
(),
DimMatrix
(
0.0
));
stressTensorScalarProduct_
.
resize
(
this
->
fvGridGeometry
().
elementMapper
().
size
(),
0.0
);
flowNormalAxis_
.
resize
(
this
->
fvGridGeometry
().
elementMapper
().
size
(),
0
);
...
...
@@ -229,7 +230,6 @@ public:
// calculate velocities
DimVector
velocityTemp
(
0.0
);
static
constexpr
auto
momentumBalanceIdx
=
0
;
for
(
auto
&&
scvf
:
scvfs
(
fvGeometry
))
{
const
int
dofIdxFace
=
scvf
.
dofIndex
();
...
...
dumux/freeflow/rans/twoeq/lowrekepsilon/model.hh
View file @
9416124d
...
...
@@ -113,19 +113,6 @@ public:
using
type
=
LowReKEpsilonVtkOutputFields
<
FVGridGeometry
>
;
};
//! Set one or different base epsilons for the calculations of the localJacobian's derivatives
SET_PROP
(
LowReKEpsilon
,
BaseEpsilon
)
{
private:
using
Scalar
=
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
);
public:
static
constexpr
auto
getEps
()
{
return
std
::
array
<
std
::
array
<
Scalar
,
2
>
,
2
>
{{{
1e-6
/*dCCdCC*/
,
1e-8
/*dCCdFace*/
},
{
1e-6
/*dFacedCC*/
,
1e-8
/*dFacedFace*/
}}};
}
};
//////////////////////////////////////////////////////////////////
// default property values for the non-isothermal low-Reynolds k-epsilon model
//////////////////////////////////////////////////////////////////
...
...
dumux/freeflow/rans/twoeq/lowrekepsilon/problem.hh
View file @
9416124d
...
...
@@ -107,8 +107,9 @@ public:
for
(
auto
&&
scv
:
scvs
(
fvGeometry
))
{
const
int
dofIdx
=
scv
.
dofIndex
();
CellCenterPrimaryVariables
priVars
(
curSol
[
FVGridGeometry
::
cellCenterIdx
()][
dofIdx
]);
auto
elemSol
=
elementSolution
<
FVElementGeometry
>
(
std
::
move
(
priVars
));
const
auto
&
cellCenterPriVars
=
curSol
[
FVGridGeometry
::
cellCenterIdx
()][
dofIdx
];
PrimaryVariables
priVars
=
makePriVarsFromCellCenterPriVars
<
PrimaryVariables
>
(
cellCenterPriVars
);
auto
elemSol
=
elementSolution
<
typename
FVGridGeometry
::
LocalView
>
(
std
::
move
(
priVars
));
// NOTE: first update the turbulence quantities
storedDissipationTilde_
[
elementID
]
=
elemSol
[
0
][
Indices
::
dissipationEqIdx
];
storedTurbulentKineticEnergy_
[
elementID
]
=
elemSol
[
0
][
Indices
::
turbulentKineticEnergyEqIdx
];
...
...
dumux/freeflow/rans/twoeq/lowrekepsilon/staggered/fluxvariables.hh
View file @
9416124d
...
...
@@ -138,7 +138,7 @@ public:
// average and distance
Scalar
coeff_k
=
(
insideCoeff_k
+
outsideCoeff_k
)
*
0.5
;
Scalar
coeff_e
=
(
insideCoeff_e
+
outsideCoeff_e
)
*
0.5
;
Scalar
distance
=
(
outsideScv
.
dofPosition
()
-
insideScv
.
dofPosition
()).
two_norm
()
;
Scalar
distance
=
0.0
;
// adapt boundary handling
if
(
scvf
.
boundary
())
...
...
@@ -147,6 +147,10 @@ public:
coeff_k
=
insideCoeff_k
;
coeff_e
=
insideCoeff_e
;
}
else
{
distance
=
(
outsideScv
.
dofPosition
()
-
insideScv
.
dofPosition
()).
two_norm
();
}
if
(
!
isOutflowK
)
{
...
...
dumux/freeflow/rans/twoeq/lowrekepsilon/staggered/localresidual.hh
View file @
9416124d
...
...
@@ -55,6 +55,7 @@ class LowReKEpsilonResidualImpl<TypeTag, DiscretizationMethod::staggered>
using
GridFluxVariablesCache
=
typename
GridVariables
::
GridFluxVariablesCache
;
using
ElementFluxVariablesCache
=
typename
GridFluxVariablesCache
::
LocalView
;
using
FluxVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
FluxVariables
);
using
GridFaceVariables
=
typename
GridVariables
::
GridFaceVariables
;
using
ElementFaceVariables
=
typename
GridFaceVariables
::
LocalView
;
...
...
@@ -70,8 +71,6 @@ class LowReKEpsilonResidualImpl<TypeTag, DiscretizationMethod::staggered>
using
BoundaryTypes
=
typename
GET_PROP_TYPE
(
TypeTag
,
BoundaryTypes
);
using
ModelTraits
=
typename
GET_PROP_TYPE
(
TypeTag
,
ModelTraits
);
using
CellCenterResidual
=
typename
GET_PROP_TYPE
(
TypeTag
,
CellCenterPrimaryVariables
);
public:
using
ParentType
::
ParentType
;
...
...
test/freeflow/rans/CMakeLists.txt
View file @
9416124d
...
...
@@ -16,7 +16,7 @@ dune_add_test(NAME test_pipe_laufer_lowrekepsilon
COMMAND
${
CMAKE_SOURCE_DIR
}
/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files
${
CMAKE_SOURCE_DIR
}
/test/references/pipe_laufer_lowrekepsilon.vtu
${
CMAKE_CURRENT_BINARY_DIR
}
/pipe_laufer_reference-000
7
4.vtu
${
CMAKE_CURRENT_BINARY_DIR
}
/pipe_laufer_reference-000
6
4.vtu
--command
"
${
CMAKE_CURRENT_BINARY_DIR
}
/test_pipe_laufer_lowrekepsilon test_pipe_laufer_reference.input"
)
target_compile_definitions
(
test_pipe_laufer_lowrekepsilon PUBLIC
"LOWREKEPSILON=1"
)
...
...
test/freeflow/rans/test_pipe_laufer.input
View file @
9416124d
[TimeLoop]
DtInitial = 1e-
5
# [s]
DtInitial = 1e-
3
# [s]
TEnd = 100 # [s]
[Grid]
...
...
@@ -9,12 +9,6 @@ Positions1 = 0.0 0.12345 0.2469
Cells0 = 25
Cells1 = 25 25
Grading1 = 1.2 -1.2
# Cells0 = 5
# Cells1 = 15 15
# Grading1 = 1.5 -1.5
# Cells0 = 2
# Cells1 = 1 1
# Grading1 = 4.0 -4.0
[Output]
PlotLawOfTheWall = true
...
...
@@ -35,10 +29,8 @@ NumericDifferenceMethod = 0
NumericDifference.BaseEpsilon = 1e-8
[Newton]
MaxSteps = 7
TargetSteps = 6
MaxRelativeShift = 1e-8
UseLineSearch = true
MaxRelativeShift = 1e-5
[Vtk]
AddVelocity = true
...
...
test/references/pipe_laufer_lowrekepsilon.vtu
View file @
9416124d
This diff is collapsed.
Click to expand it.
test/references/test_channel_zeroeq2c.vtu
View file @
9416124d
This diff is collapsed.
Click to expand it.
test/references/test_channel_zeroeq2cni.vtu
View file @
9416124d
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment