From a124bbaa0c38737eae3e8a4a3ceb2c084a0e6e44 Mon Sep 17 00:00:00 2001 From: Henry <Henry> Date: Sat, 28 Feb 2015 16:11:24 +0000 Subject: [PATCH] TurbulenceModels: Update non-linear models to use the new innerSqr function --- .../LienCubicKELowReSetWallDissipation.H | 71 ------------------- .../LienLeschzinerLowReSetWallDissipation.H | 71 ------------------- .../RAS/ShihQuadraticKE/ShihQuadraticKE.C | 4 +- .../pitzDaily/constant/turbulenceProperties | 4 +- 4 files changed, 4 insertions(+), 146 deletions(-) delete mode 100644 src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H delete mode 100644 src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H deleted file mode 100644 index 38aacf37497..00000000000 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H +++ /dev/null @@ -1,71 +0,0 @@ -// Set the dissipation in the near-wall cell to the value prescribed by the -// Lien-Leschziner low-Re model with Wolfstein length-scale prescription - -{ - labelList cellBoundaryFaceCount(epsilon_.size(), 0); - - //- Use constant Cmu for epsilon in the near-wall cell - scalar Cmu75 = pow(CmuWall_.value(), 0.75); - - const fvPatchList& patches = mesh_.boundary(); - - //- Initialise the near-wall epsilon field to zero - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isA<wallFvPatch>(curPatch)) - { - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - epsilon_[faceCelli] = 0.0; - } - } - } - - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isA<wallFvPatch>(curPatch)) - { - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - // For corner cells (with two boundary or more faces), - // epsilon in the near-wall cell are calculated as an average - - cellBoundaryFaceCount[faceCelli]++; - - epsilon_[faceCelli] += - Cmu75*pow(k_[faceCelli], 1.5) - /( - kappa_.value()*y_[faceCelli] - *(1.0 - exp(-Aepsilon_.value()*yStar_[faceCelli])) - ) - *exp(-Amu_.value()*sqr(yStar_[faceCelli])); - - } - } - } - - // perform the averaging - - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isA<wallFvPatch>(curPatch)) - { - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - epsilon_[faceCelli] /= cellBoundaryFaceCount[faceCelli]; - } - } - } -} diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H deleted file mode 100644 index 62481f5c793..00000000000 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H +++ /dev/null @@ -1,71 +0,0 @@ -// Set the dissipation in the near-wall cell to the value prescribed by the -// Lien-Leschziner low-Re model with Wolfstein length-scale prescription - -{ - labelList cellBoundaryFaceCount(epsilon_.size(), 0); - - //- Use constant Cmu for epsilon in the near-wall cell - scalar Cmu75 = pow(Cmu_.value(), 0.75); - - const fvPatchList& patches = mesh_.boundary(); - - //- Initialise the near-wall epsilon field to zero - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isA<wallFvPatch>(curPatch)) - { - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - epsilon_[faceCelli] = 0.0; - } - } - } - - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isA<wallFvPatch>(curPatch)) - { - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - // For corner cells (with two boundary or more faces), - // epsilon in the near-wall cell are calculated as an average - - cellBoundaryFaceCount[faceCelli]++; - - epsilon_[faceCelli] += - Cmu75*pow(k_[faceCelli], 1.5) - /( - kappa_.value()*y_[faceCelli] - *(1.0 - exp(-Aepsilon_.value()*yStar_[faceCelli])) - ) - *exp(-Amu_.value()*sqr(yStar_[faceCelli])); - - } - } - } - - // perform the averaging - - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isA<wallFvPatch>(curPatch)) - { - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - epsilon_[faceCelli] /= cellBoundaryFaceCount[faceCelli]; - } - } - } -} diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/ShihQuadraticKE/ShihQuadraticKE.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/ShihQuadraticKE/ShihQuadraticKE.C index f6466e271db..8ea597cedb7 100644 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/ShihQuadraticKE/ShihQuadraticKE.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/ShihQuadraticKE/ShihQuadraticKE.C @@ -67,8 +67,8 @@ void ShihQuadraticKE::correctNonlinearStress(const volTensorField& gradU) nonlinearStress_ = pow3(k_)/((A1_ + pow3(sBar))*sqr(epsilon_)) *( - beta1_*dev(symm(S&S)) - + beta2_*symm((W&S) - (S&W)) + beta1_*dev(innerSqr(S)) + + beta2_*twoSymm(S&W) + beta3_*dev(symm(W&W)) ); } diff --git a/tutorials/incompressible/simpleFoam/pitzDaily/constant/turbulenceProperties b/tutorials/incompressible/simpleFoam/pitzDaily/constant/turbulenceProperties index 520cb4e3d2d..147c6edaf56 100644 --- a/tutorials/incompressible/simpleFoam/pitzDaily/constant/turbulenceProperties +++ b/tutorials/incompressible/simpleFoam/pitzDaily/constant/turbulenceProperties @@ -19,8 +19,8 @@ simulationType RAS; RAS { - // Tested with ShihQuadraticKE, v2f, kEpsilon, realizableKE, - // kOmega, kOmegaSST; + // Tested with kEpsilon, realizableKE, kOmega, kOmegaSST, v2f, + // ShihQuadraticKE, LienCubicKE. RASModel v2f; turbulence on; -- GitLab