Skip to content
Snippets Groups Projects
Commit 76da0cd1 authored by Thomas Fetzer's avatar Thomas Fetzer
Browse files

[rans] Change averaging methods for the two-eq models

parent caee9d15
No related branches found
No related tags found
1 merge request!1027Freeflow/komega
...@@ -133,8 +133,9 @@ public: ...@@ -133,8 +133,9 @@ public:
outsideCoeff_e *= outsideVolVars.extrusionFactor(); outsideCoeff_e *= outsideVolVars.extrusionFactor();
// average and distance // average and distance
Scalar coeff_k = (insideCoeff_k + outsideCoeff_k) * 0.5; // is more stable with simple/unweighted arithmetic mean
Scalar coeff_e = (insideCoeff_e + outsideCoeff_e) * 0.5; Scalar coeff_k = arithmeticMean(insideCoeff_k, outsideCoeff_k);
Scalar coeff_e = arithmeticMean(insideCoeff_e, outsideCoeff_e);
Scalar distance = 0.0; Scalar distance = 0.0;
// adapt boundary handling // adapt boundary handling
......
...@@ -127,9 +127,12 @@ public: ...@@ -127,9 +127,12 @@ public:
insideCoeff_w *= insideVolVars.extrusionFactor(); insideCoeff_w *= insideVolVars.extrusionFactor();
outsideCoeff_w *= outsideVolVars.extrusionFactor(); outsideCoeff_w *= outsideVolVars.extrusionFactor();
// average and distance Scalar coeff_k = arithmeticMean(insideCoeff_k, outsideCoeff_k,
Scalar coeff_k = (insideCoeff_k - outsideCoeff_k) * 0.5; (insideScv.dofPosition() - scvf.ipGlobal()).two_norm(),
Scalar coeff_w = (insideCoeff_w - outsideCoeff_w) * 0.5; (outsideScv.dofPosition() - scvf.ipGlobal()).two_norm());
Scalar coeff_w = arithmeticMean(insideCoeff_w, outsideCoeff_w,
(insideScv.dofPosition() - scvf.ipGlobal()).two_norm(),
(outsideScv.dofPosition() - scvf.ipGlobal()).two_norm());
Scalar distance = 0.0; Scalar distance = 0.0;
// adapt boundary handling // adapt boundary handling
......
...@@ -128,8 +128,12 @@ public: ...@@ -128,8 +128,12 @@ public:
outsideCoeff_e *= outsideVolVars.extrusionFactor(); outsideCoeff_e *= outsideVolVars.extrusionFactor();
// average and distance // average and distance
Scalar coeff_k = (insideCoeff_k + outsideCoeff_k) * 0.5; Scalar coeff_k = arithmeticMean(insideCoeff_k, outsideCoeff_k,
Scalar coeff_e = (insideCoeff_e + outsideCoeff_e) * 0.5; (insideScv.dofPosition() - scvf.ipGlobal()).two_norm(),
(outsideScv.dofPosition() - scvf.ipGlobal()).two_norm());
Scalar coeff_e = arithmeticMean(insideCoeff_e, outsideCoeff_e,
(insideScv.dofPosition() - scvf.ipGlobal()).two_norm(),
(outsideScv.dofPosition() - scvf.ipGlobal()).two_norm());
Scalar distance = 0.0; Scalar distance = 0.0;
// adapt boundary handling // adapt boundary handling
......
...@@ -28,7 +28,7 @@ dune_add_test(NAME test_pipe_laufer_lowrekepsilon ...@@ -28,7 +28,7 @@ dune_add_test(NAME test_pipe_laufer_lowrekepsilon
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/pipe_laufer_lowrekepsilon.vtu --files ${CMAKE_SOURCE_DIR}/test/references/pipe_laufer_lowrekepsilon.vtu
${CMAKE_CURRENT_BINARY_DIR}/pipe_laufer_reference-00064.vtu ${CMAKE_CURRENT_BINARY_DIR}/pipe_laufer_reference-00066.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_pipe_laufer_lowrekepsilon test_pipe_laufer_reference.input") --command "${CMAKE_CURRENT_BINARY_DIR}/test_pipe_laufer_lowrekepsilon test_pipe_laufer_reference.input")
target_compile_definitions(test_pipe_laufer_lowrekepsilon PUBLIC "LOWREKEPSILON=1") target_compile_definitions(test_pipe_laufer_lowrekepsilon PUBLIC "LOWREKEPSILON=1")
...@@ -38,7 +38,7 @@ dune_add_test(NAME test_pipe_laufer_komega ...@@ -38,7 +38,7 @@ dune_add_test(NAME test_pipe_laufer_komega
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/pipe_laufer_komega.vtu --files ${CMAKE_SOURCE_DIR}/test/references/pipe_laufer_komega.vtu
${CMAKE_CURRENT_BINARY_DIR}/pipe_laufer_reference-00056.vtu ${CMAKE_CURRENT_BINARY_DIR}/pipe_laufer_reference-00055.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_pipe_laufer_komega test_pipe_laufer_reference.input") --command "${CMAKE_CURRENT_BINARY_DIR}/test_pipe_laufer_komega test_pipe_laufer_reference.input")
target_compile_definitions(test_pipe_laufer_komega PUBLIC "KOMEGA=1") target_compile_definitions(test_pipe_laufer_komega PUBLIC "KOMEGA=1")
......
...@@ -25,7 +25,7 @@ EddyViscosityModel = "baldwinLomax" ...@@ -25,7 +25,7 @@ EddyViscosityModel = "baldwinLomax"
UseStoredEddyViscosity = false UseStoredEddyViscosity = false
[KEpsilon] [KEpsilon]
YPlusThreshold = 30. YPlusThreshold = 40.
[Assembly] [Assembly]
NumericDifferenceMethod = 0 NumericDifferenceMethod = 0
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment