From bc31ba8f5c0165cdb978a392fe3d5fdf73ce9bbf Mon Sep 17 00:00:00 2001 From: Daniels Date: Fri, 4 Apr 2025 16:40:01 +0200 Subject: [PATCH 1/7] added kOmegaSST turbulence model --- perpendicular-flap/fluid-openfoam/0/k | 60 ++++++++++++++++++ perpendicular-flap/fluid-openfoam/0/nut | 61 +++++++++++++++++++ perpendicular-flap/fluid-openfoam/0/omega | 60 ++++++++++++++++++ .../constant/transportProperties | 2 +- .../constant/turbulenceProperties | 11 +++- .../fluid-openfoam/system/fvSchemes | 10 +++ .../fluid-openfoam/system/fvSolution | 32 ++++++++++ 7 files changed, 234 insertions(+), 2 deletions(-) create mode 100644 perpendicular-flap/fluid-openfoam/0/k create mode 100644 perpendicular-flap/fluid-openfoam/0/nut create mode 100644 perpendicular-flap/fluid-openfoam/0/omega diff --git a/perpendicular-flap/fluid-openfoam/0/k b/perpendicular-flap/fluid-openfoam/0/k new file mode 100644 index 000000000..f90cd7366 --- /dev/null +++ b/perpendicular-flap/fluid-openfoam/0/k @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ +version 2.0; +format ascii; +class volScalarField; +object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 0 2 -2 0 0 0 0 ]; + +internalField uniform 5; + +boundaryField +{ + +inlet +{ +type fixedValue; +value $internalField; +} + +outlet +{ +type inletOutlet; +inletValue $internalField; +value $internalField; +} + +flap +{ +type kqRWallFunction; +value $internalField; +} + +frontAndBack +{ +type empty; +} + +upperWall +{ +type zeroGradient; +} + +lowerWall +{ +type zeroGradient; +} + +} + +// ************************************************************************* // diff --git a/perpendicular-flap/fluid-openfoam/0/nut b/perpendicular-flap/fluid-openfoam/0/nut new file mode 100644 index 000000000..6b71631e3 --- /dev/null +++ b/perpendicular-flap/fluid-openfoam/0/nut @@ -0,0 +1,61 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ +version 2.0; +format ascii; +class volScalarField; +object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 0 2 -1 0 0 0 0 ]; + +internalField uniform 5; + +boundaryField +{ + +inlet +{ +type calculated; +value uniform 0; +} + +outlet +{ +type calculated; +value uniform 0; +} + +flap +{ +type nutkWallFunction; +value uniform 0; +} + +frontAndBack +{ +type empty; +} + +upperWall +{ +type calculated; +value uniform 0; +} + +lowerWall +{ +type calculated; +value uniform 0; +} + +} + +// ************************************************************************* // diff --git a/perpendicular-flap/fluid-openfoam/0/omega b/perpendicular-flap/fluid-openfoam/0/omega new file mode 100644 index 000000000..3c5572838 --- /dev/null +++ b/perpendicular-flap/fluid-openfoam/0/omega @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ +version 2.0; +format ascii; +class volScalarField; +object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 0 0 -1 0 0 0 0 ]; + +internalField uniform 10; + +boundaryField +{ + +inlet +{ +type fixedValue; +value $internalField; +} + +outlet +{ +type inletOutlet; +inletValue $internalField; +value $internalField; +} + +flap +{ +type omegaWallFunction; +value $internalField; +} + +frontAndBack +{ +type empty; +} + +upperWall +{ +type zeroGradient; +} + +lowerWall +{ +type zeroGradient; +} + +} + +// ************************************************************************* // diff --git a/perpendicular-flap/fluid-openfoam/constant/transportProperties b/perpendicular-flap/fluid-openfoam/constant/transportProperties index 5383adaad..417037381 100644 --- a/perpendicular-flap/fluid-openfoam/constant/transportProperties +++ b/perpendicular-flap/fluid-openfoam/constant/transportProperties @@ -8,4 +8,4 @@ FoamFile transportModel Newtonian; -nu nu [ 0 2 -1 0 0 0 0 ] 1; +nu nu [ 0 2 -1 0 0 0 0 ] 1e-5; diff --git a/perpendicular-flap/fluid-openfoam/constant/turbulenceProperties b/perpendicular-flap/fluid-openfoam/constant/turbulenceProperties index 592f6d52d..9651c65f6 100644 --- a/perpendicular-flap/fluid-openfoam/constant/turbulenceProperties +++ b/perpendicular-flap/fluid-openfoam/constant/turbulenceProperties @@ -6,4 +6,13 @@ FoamFile object turbulenceProperties; } -simulationType laminar; +simulationType RAS; + +RAS +{ + +RASModel kOmegaSST; + +turbulence on; +printCoeffs on; +} diff --git a/perpendicular-flap/fluid-openfoam/system/fvSchemes b/perpendicular-flap/fluid-openfoam/system/fvSchemes index 80c096192..01d7260eb 100644 --- a/perpendicular-flap/fluid-openfoam/system/fvSchemes +++ b/perpendicular-flap/fluid-openfoam/system/fvSchemes @@ -20,6 +20,9 @@ divSchemes { default none; div(phi,U) bounded Gauss upwind; + div(phi,k) bounded Gauss limitedLinear 1; + div(phi,omega) bounded Gauss upwind; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } @@ -37,3 +40,10 @@ snGradSchemes { default corrected; } + +wallDist +{ + method meshWave; // Recommended method +} + +// ************************************************************************* // diff --git a/perpendicular-flap/fluid-openfoam/system/fvSolution b/perpendicular-flap/fluid-openfoam/system/fvSolution index 064d7f372..901f24578 100644 --- a/perpendicular-flap/fluid-openfoam/system/fvSolution +++ b/perpendicular-flap/fluid-openfoam/system/fvSolution @@ -54,6 +54,38 @@ solvers $U; relTol 0; } + +"(U|epsilon|k|omega)" +{ + +solver smoothSolver; +smoother symGaussSeidel; +tolerance 1e-6; +relTol 1e-3; +// minIter 100; +} +"(U|k|epsilon|omega)Final" +{ +$U; +tolerance 1e-6; +relTol 0; +minIter 2; +} + +yPsi +{ +solver PBiCGStab; +preconditioner DILU; +tolerance 1e-5; +relTol 0; +} + +yPsiFinal +{ +$yPsi +relTol 0; +} + } PIMPLE From c1afbc561b5fadfa99b1b24470e3ad64448c1de2 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Mon, 7 Apr 2025 11:03:15 +0200 Subject: [PATCH 2/7] Adjust indentation and remove not needed headers from new files --- perpendicular-flap/fluid-openfoam/0/k | 73 ++++++++++------------ perpendicular-flap/fluid-openfoam/0/nut | 75 ++++++++++------------- perpendicular-flap/fluid-openfoam/0/omega | 73 ++++++++++------------ 3 files changed, 97 insertions(+), 124 deletions(-) diff --git a/perpendicular-flap/fluid-openfoam/0/k b/perpendicular-flap/fluid-openfoam/0/k index f90cd7366..9a86c0eea 100644 --- a/perpendicular-flap/fluid-openfoam/0/k +++ b/perpendicular-flap/fluid-openfoam/0/k @@ -1,18 +1,10 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v1812 | -| \\ / A nd | Web: www.OpenFOAM.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ FoamFile { -version 2.0; -format ascii; -class volScalarField; -object k; + version 2.0; + format ascii; + class volScalarField; + object k; } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [ 0 2 -2 0 0 0 0 ]; @@ -21,40 +13,39 @@ internalField uniform 5; boundaryField { -inlet -{ -type fixedValue; -value $internalField; -} + inlet + { + type fixedValue; + value $internalField; + } -outlet -{ -type inletOutlet; -inletValue $internalField; -value $internalField; -} + outlet + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } -flap -{ -type kqRWallFunction; -value $internalField; -} + flap + { + type kqRWallFunction; + value $internalField; + } -frontAndBack -{ -type empty; -} + frontAndBack + { + type empty; + } -upperWall -{ -type zeroGradient; -} + upperWall + { + type zeroGradient; + } -lowerWall -{ -type zeroGradient; -} + lowerWall + { + type zeroGradient; + } } -// ************************************************************************* // diff --git a/perpendicular-flap/fluid-openfoam/0/nut b/perpendicular-flap/fluid-openfoam/0/nut index 6b71631e3..e6d815a28 100644 --- a/perpendicular-flap/fluid-openfoam/0/nut +++ b/perpendicular-flap/fluid-openfoam/0/nut @@ -1,18 +1,10 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v1812 | -| \\ / A nd | Web: www.OpenFOAM.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ FoamFile { -version 2.0; -format ascii; -class volScalarField; -object k; + version 2.0; + format ascii; + class volScalarField; + object k; } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [ 0 2 -1 0 0 0 0 ]; @@ -21,41 +13,40 @@ internalField uniform 5; boundaryField { -inlet -{ -type calculated; -value uniform 0; -} + inlet + { + type calculated; + value uniform 0; + } -outlet -{ -type calculated; -value uniform 0; -} + outlet + { + type calculated; + value uniform 0; + } -flap -{ -type nutkWallFunction; -value uniform 0; -} + flap + { + type nutkWallFunction; + value uniform 0; + } -frontAndBack -{ -type empty; -} + frontAndBack + { + type empty; + } -upperWall -{ -type calculated; -value uniform 0; -} + upperWall + { + type calculated; + value uniform 0; + } -lowerWall -{ -type calculated; -value uniform 0; -} + lowerWall + { + type calculated; + value uniform 0; + } } -// ************************************************************************* // diff --git a/perpendicular-flap/fluid-openfoam/0/omega b/perpendicular-flap/fluid-openfoam/0/omega index 3c5572838..5ccb17bb7 100644 --- a/perpendicular-flap/fluid-openfoam/0/omega +++ b/perpendicular-flap/fluid-openfoam/0/omega @@ -1,18 +1,10 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v1812 | -| \\ / A nd | Web: www.OpenFOAM.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ FoamFile { -version 2.0; -format ascii; -class volScalarField; -object k; + version 2.0; + format ascii; + class volScalarField; + object k; } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [ 0 0 -1 0 0 0 0 ]; @@ -21,40 +13,39 @@ internalField uniform 10; boundaryField { -inlet -{ -type fixedValue; -value $internalField; -} + inlet + { + type fixedValue; + value $internalField; + } -outlet -{ -type inletOutlet; -inletValue $internalField; -value $internalField; -} + outlet + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } -flap -{ -type omegaWallFunction; -value $internalField; -} + flap + { + type omegaWallFunction; + value $internalField; + } -frontAndBack -{ -type empty; -} + frontAndBack + { + type empty; + } -upperWall -{ -type zeroGradient; -} + upperWall + { + type zeroGradient; + } -lowerWall -{ -type zeroGradient; -} + lowerWall + { + type zeroGradient; + } } -// ************************************************************************* // From 3c77aecd12f478bf1f3b8edd9ce556b6a08fcbc6 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Mon, 7 Apr 2025 11:04:57 +0200 Subject: [PATCH 3/7] Adjust indentation in turbulenceProperties --- .../fluid-openfoam/constant/turbulenceProperties | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/perpendicular-flap/fluid-openfoam/constant/turbulenceProperties b/perpendicular-flap/fluid-openfoam/constant/turbulenceProperties index 9651c65f6..c7daecac4 100644 --- a/perpendicular-flap/fluid-openfoam/constant/turbulenceProperties +++ b/perpendicular-flap/fluid-openfoam/constant/turbulenceProperties @@ -10,9 +10,7 @@ simulationType RAS; RAS { - -RASModel kOmegaSST; - -turbulence on; -printCoeffs on; + RASModel kOmegaSST; + turbulence on; + printCoeffs on; } From aec7dc1bb97063ce7be99d8259d304195c587ac9 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Mon, 7 Apr 2025 11:05:44 +0200 Subject: [PATCH 4/7] Cleanup comments in fvSchemes --- perpendicular-flap/fluid-openfoam/system/fvSchemes | 2 -- 1 file changed, 2 deletions(-) diff --git a/perpendicular-flap/fluid-openfoam/system/fvSchemes b/perpendicular-flap/fluid-openfoam/system/fvSchemes index 01d7260eb..51ebc3714 100644 --- a/perpendicular-flap/fluid-openfoam/system/fvSchemes +++ b/perpendicular-flap/fluid-openfoam/system/fvSchemes @@ -45,5 +45,3 @@ wallDist { method meshWave; // Recommended method } - -// ************************************************************************* // From 3cfd92f25f4792ada65427580725f67e2ec975fb Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Mon, 7 Apr 2025 11:06:30 +0200 Subject: [PATCH 5/7] Fix indentation in fvSolution --- .../fluid-openfoam/system/fvSolution | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/perpendicular-flap/fluid-openfoam/system/fvSolution b/perpendicular-flap/fluid-openfoam/system/fvSolution index 901f24578..540aa0de3 100644 --- a/perpendicular-flap/fluid-openfoam/system/fvSolution +++ b/perpendicular-flap/fluid-openfoam/system/fvSolution @@ -57,33 +57,32 @@ solvers "(U|epsilon|k|omega)" { - -solver smoothSolver; -smoother symGaussSeidel; -tolerance 1e-6; -relTol 1e-3; -// minIter 100; + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-6; + relTol 1e-3; + // minIter 100; } "(U|k|epsilon|omega)Final" { -$U; -tolerance 1e-6; -relTol 0; -minIter 2; + $U; + tolerance 1e-6; + relTol 0; + minIter 2; } yPsi { -solver PBiCGStab; -preconditioner DILU; -tolerance 1e-5; -relTol 0; + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-5; + relTol 0; } yPsiFinal { -$yPsi -relTol 0; + $yPsi + relTol 0; } } From 42cb5c3f55e8c5c888d7a633269ecea824e88a61 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Mon, 7 Apr 2025 11:07:03 +0200 Subject: [PATCH 6/7] Fix (more) indentation in fvSolution --- .../fluid-openfoam/system/fvSolution | 61 +++++++++---------- 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/perpendicular-flap/fluid-openfoam/system/fvSolution b/perpendicular-flap/fluid-openfoam/system/fvSolution index 540aa0de3..a3ef27cc2 100644 --- a/perpendicular-flap/fluid-openfoam/system/fvSolution +++ b/perpendicular-flap/fluid-openfoam/system/fvSolution @@ -54,37 +54,36 @@ solvers $U; relTol 0; } - -"(U|epsilon|k|omega)" -{ - solver smoothSolver; - smoother symGaussSeidel; - tolerance 1e-6; - relTol 1e-3; - // minIter 100; -} -"(U|k|epsilon|omega)Final" -{ - $U; - tolerance 1e-6; - relTol 0; - minIter 2; -} - -yPsi -{ - solver PBiCGStab; - preconditioner DILU; - tolerance 1e-5; - relTol 0; -} - -yPsiFinal -{ - $yPsi - relTol 0; -} - + + "(U|epsilon|k|omega)" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-6; + relTol 1e-3; + // minIter 100; + } + "(U|k|epsilon|omega)Final" + { + $U; + tolerance 1e-6; + relTol 0; + minIter 2; + } + + yPsi + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-5; + relTol 0; + } + + yPsiFinal + { + $yPsi + relTol 0; + } } PIMPLE From db7a45d75517283bd5d7ec622669b5fb13898a2a Mon Sep 17 00:00:00 2001 From: Daniels Vidulejs <36682359+vidulejs@users.noreply.github.com> Date: Tue, 8 Apr 2025 13:07:33 +0200 Subject: [PATCH 7/7] Use Poisson wallDist --- perpendicular-flap/fluid-openfoam/system/fvSchemes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perpendicular-flap/fluid-openfoam/system/fvSchemes b/perpendicular-flap/fluid-openfoam/system/fvSchemes index 51ebc3714..5d636d5d7 100644 --- a/perpendicular-flap/fluid-openfoam/system/fvSchemes +++ b/perpendicular-flap/fluid-openfoam/system/fvSchemes @@ -43,5 +43,5 @@ snGradSchemes wallDist { - method meshWave; // Recommended method + method Poisson; }