From dbfb7cf250a364ed0972ee525c0521074fca370c Mon Sep 17 00:00:00 2001 From: Henry Weller <http://cfd.direct> Date: Wed, 19 Aug 2015 16:30:51 +0100 Subject: [PATCH] SchaefferFrictionalStress: Updated with alphaMinFriction Resolved bug-report http://openfoam.org/mantisbt/view.php?id=1831 --- .../JohnsonJackson/JohnsonJacksonFrictionalStress.C | 1 + .../JohnsonJackson/JohnsonJacksonFrictionalStress.H | 1 + .../Schaeffer/SchaefferFrictionalStress.C | 5 +++-- .../Schaeffer/SchaefferFrictionalStress.H | 1 + .../frictionalStressModel/frictionalStressModel.H | 1 + .../kineticTheoryModel/kineticTheoryModel.C | 1 + .../JohnsonJackson/JohnsonJacksonFrictionalStress.C | 1 + .../JohnsonJackson/JohnsonJacksonFrictionalStress.H | 1 + .../Schaeffer/SchaefferFrictionalStress.C | 5 +++-- .../Schaeffer/SchaefferFrictionalStress.H | 3 ++- .../frictionalStressModel/frictionalStressModel.H | 3 ++- .../kineticTheoryModel/kineticTheoryModel.C | 1 + 12 files changed, 18 insertions(+), 6 deletions(-) diff --git a/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C b/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C index 2180c0bd2e2..ab5fb531ea5 100644 --- a/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C +++ b/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C @@ -115,6 +115,7 @@ Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::nu ( const volScalarField& alpha1, + const dimensionedScalar& alphaMinFriction, const dimensionedScalar& alphaMax, const volScalarField& pf, const volSymmTensorField& D diff --git a/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.H b/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.H index cc5a9dc5ea1..1fe92e7d0ea 100644 --- a/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.H +++ b/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.H @@ -108,6 +108,7 @@ public: virtual tmp<volScalarField> nu ( const volScalarField& alpha1, + const dimensionedScalar& alphaMinFriction, const dimensionedScalar& alphaMax, const volScalarField& pf, const volSymmTensorField& D diff --git a/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C b/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C index 55e7b9f2cd2..4a0d2290d13 100644 --- a/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C +++ b/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C @@ -104,6 +104,7 @@ Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::nu ( const volScalarField& alpha1, + const dimensionedScalar& alphaMinFriction, const dimensionedScalar& alphaMax, const volScalarField& pf, const volSymmTensorField& D @@ -133,9 +134,9 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::nu volScalarField& nuf = tnu(); - forAll (D, celli) + forAll(D, celli) { - if (alpha1[celli] > alphaMax.value() - 5e-2) + if (alpha1[celli] > alphaMinFriction.value()) { nuf[celli] = 0.5*pf[celli]*sin(phi_.value()) diff --git a/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.H b/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.H index 7ff4862348a..d4a304eb40c 100644 --- a/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.H +++ b/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.H @@ -96,6 +96,7 @@ public: virtual tmp<volScalarField> nu ( const volScalarField& alpha1, + const dimensionedScalar& alphaMinFriction, const dimensionedScalar& alphaMax, const volScalarField& pf, const volSymmTensorField& D diff --git a/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H b/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H index 0e08f7ec8c8..923a1fce3f7 100644 --- a/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H +++ b/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H @@ -122,6 +122,7 @@ public: virtual tmp<volScalarField> nu ( const volScalarField& alpha1, + const dimensionedScalar& alphaMinFriction, const dimensionedScalar& alphaMax, const volScalarField& pf, const volSymmTensorField& D diff --git a/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C index 11d09d1118f..9d502f7dd48 100644 --- a/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C +++ b/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C @@ -519,6 +519,7 @@ void Foam::RASModels::kineticTheoryModel::correct() nut_ += frictionalStressModel_->nu ( alpha, + alphaMinFriction_, alphaMax_, pf/rho, D diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C index 2180c0bd2e2..ab5fb531ea5 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C @@ -115,6 +115,7 @@ Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::nu ( const volScalarField& alpha1, + const dimensionedScalar& alphaMinFriction, const dimensionedScalar& alphaMax, const volScalarField& pf, const volSymmTensorField& D diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.H index cc5a9dc5ea1..1fe92e7d0ea 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.H @@ -108,6 +108,7 @@ public: virtual tmp<volScalarField> nu ( const volScalarField& alpha1, + const dimensionedScalar& alphaMinFriction, const dimensionedScalar& alphaMax, const volScalarField& pf, const volSymmTensorField& D diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C index 55e7b9f2cd2..4a0d2290d13 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C @@ -104,6 +104,7 @@ Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::nu ( const volScalarField& alpha1, + const dimensionedScalar& alphaMinFriction, const dimensionedScalar& alphaMax, const volScalarField& pf, const volSymmTensorField& D @@ -133,9 +134,9 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::nu volScalarField& nuf = tnu(); - forAll (D, celli) + forAll(D, celli) { - if (alpha1[celli] > alphaMax.value() - 5e-2) + if (alpha1[celli] > alphaMinFriction.value()) { nuf[celli] = 0.5*pf[celli]*sin(phi_.value()) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.H index 3f56759e2ad..d4a304eb40c 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -96,6 +96,7 @@ public: virtual tmp<volScalarField> nu ( const volScalarField& alpha1, + const dimensionedScalar& alphaMinFriction, const dimensionedScalar& alphaMax, const volScalarField& pf, const volSymmTensorField& D diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H index 28dc1ab1f08..923a1fce3f7 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -122,6 +122,7 @@ public: virtual tmp<volScalarField> nu ( const volScalarField& alpha1, + const dimensionedScalar& alphaMinFriction, const dimensionedScalar& alphaMax, const volScalarField& pf, const volSymmTensorField& D diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C index 30254f3891b..31a58c7abda 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C @@ -515,6 +515,7 @@ void Foam::RASModels::kineticTheoryModel::correct() nut_ += frictionalStressModel_->nu ( alpha, + alphaMinFriction_, alphaMax_, pf/rho, D -- GitLab