diff --git a/applications/solvers/multiphase/driftFluxFoam/Make/files b/applications/solvers/multiphase/driftFluxFoam/Make/files index 2a55d1c56166a16eef885ee38dc44d1573a05807..88a3cb1281825867a5a0521e8dc5c639fe293d76 100644 --- a/applications/solvers/multiphase/driftFluxFoam/Make/files +++ b/applications/solvers/multiphase/driftFluxFoam/Make/files @@ -1,4 +1,5 @@ incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.C +compressibleTurbulenceModels.C driftFluxFoam.C EXE = $(FOAM_APPBIN)/driftFluxFoam diff --git a/applications/solvers/multiphase/driftFluxFoam/Make/options b/applications/solvers/multiphase/driftFluxFoam/Make/options index bce4740271c015de28bdabd165ea1f9ff7e08990..af00448417b166afdc16775a268be2ca482f04b4 100644 --- a/applications/solvers/multiphase/driftFluxFoam/Make/options +++ b/applications/solvers/multiphase/driftFluxFoam/Make/options @@ -9,13 +9,17 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I./relativeVelocityModels/lnInclude EXE_LIBS = \ + -ldriftFluxTransportModels \ + -ldriftFluxRelativeVelocityModels \ -lfiniteVolume \ -lmeshTools \ -lsampling \ -lfvOptions \ -lincompressibleTransportModels \ - -ldriftFluxTransportModels \ - -ldriftFluxRelativeVelocityModels + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ No newline at end of file diff --git a/applications/solvers/multiphase/driftFluxFoam/UEqn.H b/applications/solvers/multiphase/driftFluxFoam/UEqn.H index f8cf3a9b91501fe3fbc950684ab6803bb64e0cee..7018d964e5d55882fedb588d84431b98dc8135b7 100644 --- a/applications/solvers/multiphase/driftFluxFoam/UEqn.H +++ b/applications/solvers/multiphase/driftFluxFoam/UEqn.H @@ -5,8 +5,7 @@ fvm::ddt(rho, U) + fvm::div(rhoPhi, U) + fvc::div(UdmModel.tauDm()) - - fvm::laplacian(muEff, U) - - fvc::div(muEff*dev2(T(fvc::grad(U)))) + + turbulence->divDevRhoReff(U) == fvOptions(rho, U) ); diff --git a/applications/solvers/multiphase/driftFluxFoam/alphaEqn.H b/applications/solvers/multiphase/driftFluxFoam/alphaEqn.H index d56b371619548ca7286273f4e7602da44bdc6bfa..daec8efa921b1d10ef100bba8291499bbedf894f 100644 --- a/applications/solvers/multiphase/driftFluxFoam/alphaEqn.H +++ b/applications/solvers/multiphase/driftFluxFoam/alphaEqn.H @@ -27,7 +27,7 @@ mesh, linear<scalar>(mesh), fv::uncorrectedSnGrad<scalar>(mesh) - ).fvmLaplacian(fvc::interpolate(mut/rho), alpha1) + ).fvmLaplacian(fvc::interpolate(turbulence->nut()), alpha1) ); Info<< "Phase-1 volume fraction = " diff --git a/applications/solvers/multiphase/driftFluxFoam/alphaEqnSubCycle.H b/applications/solvers/multiphase/driftFluxFoam/alphaEqnSubCycle.H index 53da0f1f78092c128b456465553eea69ba609238..8ad3234a93a1039a485843eed0553774e077721b 100644 --- a/applications/solvers/multiphase/driftFluxFoam/alphaEqnSubCycle.H +++ b/applications/solvers/multiphase/driftFluxFoam/alphaEqnSubCycle.H @@ -55,7 +55,7 @@ fvScalarMatrix alpha1Eqn ( fvm::ddt(alpha1) - fvc::ddt(alpha1) - - fvm::laplacian(mut/rho, alpha1) + - fvm::laplacian(turbulence->nut(), alpha1) ); alpha1Eqn.solve(mesh.solver("alpha1Diffusion")); @@ -71,5 +71,5 @@ } rhoPhi = phiAlpha*(rho1 - rho2) + phi*rho2; - rho == alpha1*rho1 + alpha2*rho2; + rho = mixture.rho(); } diff --git a/applications/solvers/multiphase/driftFluxFoam/compressibleTurbulenceModels.C b/applications/solvers/multiphase/driftFluxFoam/compressibleTurbulenceModels.C new file mode 100644 index 0000000000000000000000000000000000000000..b636de0f9557a774687b30b478479e79c518235b --- /dev/null +++ b/applications/solvers/multiphase/driftFluxFoam/compressibleTurbulenceModels.C @@ -0,0 +1,73 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "CompressibleTurbulenceModel.H" +#include "incompressibleTwoPhaseInteractingMixture.H" +#include "addToRunTimeSelectionTable.H" +#include "makeTurbulenceModel.H" + +#include "laminar.H" +#include "RASModel.H" +#include "LESModel.H" + +makeBaseTurbulenceModel +( + geometricOneField, + volScalarField, + compressibleTurbulenceModel, + CompressibleTurbulenceModel, + incompressibleTwoPhaseInteractingMixture +); + +#define makeRASModel(Type) \ + makeTemplatedTurbulenceModel \ + ( \ + incompressibleTwoPhaseInteractingMixtureCompressibleTurbulenceModel, \ + RAS, \ + Type \ + ) + +#define makeLESModel(Type) \ + makeTemplatedTurbulenceModel \ + ( \ + incompressibleTwoPhaseInteractingMixtureCompressibleTurbulenceModel, \ + LES, \ + Type \ + ) + +#include "kEpsilon.H" +makeRASModel(kEpsilon); + +#include "buoyantKEpsilon.H" +makeRASModel(buoyantKEpsilon); + +#include "Smagorinsky.H" +makeLESModel(Smagorinsky); + +#include "kEqn.H" +makeLESModel(kEqn); + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/driftFluxFoam/createFields.H b/applications/solvers/multiphase/driftFluxFoam/createFields.H index 3224f44191ed6ad6efd2da8ff66846428ad227dd..2d0ed6ed75da035729b7e89281e425c0d8eee6e0 100644 --- a/applications/solvers/multiphase/driftFluxFoam/createFields.H +++ b/applications/solvers/multiphase/driftFluxFoam/createFields.H @@ -29,17 +29,14 @@ #include "createPhi.H" - // Transport - // ~~~~~~~~~ - Info<< "Reading transportProperties\n" << endl; - incompressibleTwoPhaseInteractingMixture twoPhaseProperties(U, phi); + incompressibleTwoPhaseInteractingMixture mixture(U, phi); - volScalarField& alpha1(twoPhaseProperties.alpha1()); - volScalarField& alpha2(twoPhaseProperties.alpha2()); + volScalarField& alpha1(mixture.alpha1()); + volScalarField& alpha2(mixture.alpha2()); - const dimensionedScalar& rho1 = twoPhaseProperties.rhod(); - const dimensionedScalar& rho2 = twoPhaseProperties.rhoc(); + const dimensionedScalar& rho1 = mixture.rhod(); + const dimensionedScalar& rho2 = mixture.rhoc(); IOdictionary transportProperties ( @@ -64,9 +61,8 @@ IOobject::NO_READ, IOobject::NO_WRITE ), - alpha1*rho1 + alpha2*rho2 + mixture.rho() ); - rho.oldTime(); // Mass flux surfaceScalarField rhoPhi @@ -84,190 +80,28 @@ // Relative Velocity - // ~~~~~~~~~~~~~~~~~ - autoPtr<relativeVelocityModel> UdmModelPtr ( relativeVelocityModel::New ( transportProperties, - twoPhaseProperties + mixture ) ); relativeVelocityModel& UdmModel(UdmModelPtr()); - // Turbulence - // ~~~~~~~~~~ - - IOdictionary RASProperties - ( - IOobject - ( - "RASProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) - ); - - - Switch turbulence(RASProperties.lookup("turbulence")); - - dictionary kEpsilonDict(RASProperties.subDictPtr("kEpsilonCoeffs")); - - dimensionedScalar Cmu - ( - dimensionedScalar::lookupOrAddToDict - ( - "Cmu", - kEpsilonDict, - 0.09 - ) - ); - - dimensionedScalar C1 - ( - dimensionedScalar::lookupOrAddToDict - ( - "C1", - kEpsilonDict, - 1.44 - ) - ); - - dimensionedScalar C2 - ( - dimensionedScalar::lookupOrAddToDict - ( - "C2", - kEpsilonDict, - 1.92 - ) - ); - - dimensionedScalar C3 - ( - dimensionedScalar::lookupOrAddToDict - ( - "C3", - kEpsilonDict, - 0.85 - ) - ); - - dimensionedScalar sigmak - ( - dimensionedScalar::lookupOrAddToDict - ( - "sigmak", - kEpsilonDict, - 1.0 - ) - ); - - dimensionedScalar sigmaEps - ( - dimensionedScalar::lookupOrAddToDict - ( - "sigmaEps", - kEpsilonDict, - 1.3 - ) - ); - - dictionary wallFunctionDict(RASProperties.subDictPtr("wallFunctionCoeffs")); - - dimensionedScalar kappa + // Construct compressible turbulence model + autoPtr + < + CompressibleTurbulenceModel<incompressibleTwoPhaseInteractingMixture> + > turbulence ( - dimensionedScalar::lookupOrAddToDict - ( - "kappa", - wallFunctionDict, - 0.41 - ) + CompressibleTurbulenceModel<incompressibleTwoPhaseInteractingMixture> + ::New(rho, U, rhoPhi, mixture) ); - dimensionedScalar E - ( - dimensionedScalar::lookupOrAddToDict - ( - "E", - wallFunctionDict, - 9.8 - ) - ); - - if (RASProperties.lookupOrDefault("printCoeffs", false)) - { - Info<< "kEpsilonCoeffs" << kEpsilonDict << nl - << "wallFunctionCoeffs" << wallFunctionDict << endl; - } - - nearWallDist y(mesh); - - Info<< "Reading field k\n" << endl; - volScalarField k - ( - IOobject - ( - "k", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - Info<< "Reading field epsilon\n" << endl; - volScalarField epsilon - ( - IOobject - ( - "epsilon", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - Info<< "Calculating field mut\n" << endl; - volScalarField mut - ( - IOobject - ( - "mut", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - Cmu*rho*sqr(k)/epsilon - ); - - Info<< "Calculating field muEff\n" << endl; - volScalarField muEff - ( - IOobject - ( - "muEff", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - mut + twoPhaseProperties.mu() - ); - - - // Pressure - // ~~~~~~~~ - Info<< "Calculating field (g.h)f\n" << endl; volScalarField gh("gh", g & mesh.C()); surfaceScalarField ghf("gh", g & mesh.Cf()); @@ -309,6 +143,4 @@ // MULES Correction - // ~~~~~~~~~~~~~~~~ - tmp<surfaceScalarField> tphiAlphaCorr0; diff --git a/applications/solvers/multiphase/driftFluxFoam/driftFluxFoam.C b/applications/solvers/multiphase/driftFluxFoam/driftFluxFoam.C index 8ab48d7b58b80f92f9b90920f1067dfe3c5a6cb6..7e0661ceb81c512c55c012c2bd187c828da5f6d0 100644 --- a/applications/solvers/multiphase/driftFluxFoam/driftFluxFoam.C +++ b/applications/solvers/multiphase/driftFluxFoam/driftFluxFoam.C @@ -38,10 +38,8 @@ Description #include "subCycle.H" #include "incompressibleTwoPhaseInteractingMixture.H" #include "relativeVelocityModel.H" -#include "nearWallDist.H" -#include "wallFvPatch.H" -#include "bound.H" -#include "Switch.H" +#include "turbulenceModel.H" +#include "CompressibleTurbulenceModel.H" #include "pimpleControl.H" #include "fvIOoptionList.H" #include "fixedFluxPressureFvPatchScalarField.H" @@ -86,7 +84,7 @@ int main(int argc, char *argv[]) #include "alphaEqnSubCycle.H" - twoPhaseProperties.correct(); + mixture.correct(); #include "UEqn.H" @@ -98,7 +96,7 @@ int main(int argc, char *argv[]) if (pimple.turbCorr()) { - #include "kEpsilon.H" + turbulence->correct(); } } diff --git a/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.H b/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.H index d167eaca0de383631ee40638b0da7df12565d962..e22179c87faf8cbcae7f0b1da7e33663a8822284 100644 --- a/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.H +++ b/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.H @@ -133,21 +133,36 @@ public: return mu_; } + //- Return the dynamic mixture viscosity for patch + virtual tmp<scalarField> mu(const label patchi) const + { + return mu_.boundaryField()[patchi]; + } + + //- Return the mixture density + virtual tmp<volScalarField> rho() const + { + return alpha1_*rhod_ + alpha2_*rhoc_; + } + + //- Return the mixture density for patch + virtual tmp<scalarField> rho(const label patchi) const + { + return + alpha1_.boundaryField()[patchi]*rhod_.value() + + alpha2_.boundaryField()[patchi]*rhoc_.value(); + } + //- Return the mixture viscosity virtual tmp<volScalarField> nu() const { - notImplemented("incompressibleTwoPhaseInteractingMixture::nu()"); - return volScalarField::null(); + return mu_/rho(); } //- Return the mixture viscosity for patch virtual tmp<scalarField> nu(const label patchi) const { - notImplemented - ( - "incompressibleTwoPhaseInteractingMixture::nu(const label)" - ); - return scalarField::null(); + return mu_.boundaryField()[patchi]/rho(patchi); } //- Correct the laminar viscosity diff --git a/applications/solvers/multiphase/driftFluxFoam/kEpsilon.H b/applications/solvers/multiphase/driftFluxFoam/kEpsilon.H deleted file mode 100644 index ddcc8cf21067c9fd26262392e06f645d734bca4c..0000000000000000000000000000000000000000 --- a/applications/solvers/multiphase/driftFluxFoam/kEpsilon.H +++ /dev/null @@ -1,82 +0,0 @@ -if (turbulence) -{ - if (mesh.changing()) - { - y.correct(); - } - - dimensionedScalar k0("k0", k.dimensions(), 0); - dimensionedScalar kMin("kMin", k.dimensions(), SMALL); - dimensionedScalar epsilon0("epsilon0", epsilon.dimensions(), 0); - dimensionedScalar epsilonMin("epsilonMin", epsilon.dimensions(), SMALL); - - tmp<volTensorField> tgradU = fvc::grad(U); - volScalarField G(mut*(tgradU() && dev(twoSymm(tgradU())))); - tgradU.clear(); - - volScalarField Gcoef - ( - Cmu*k/sigmak*(g & fvc::grad(rho))/(epsilon + epsilonMin) - ); - - volScalarField mul(twoPhaseProperties.mu()); - - #include "wallFunctions.H" - - // Dissipation equation - fvScalarMatrix epsEqn - ( - fvm::ddt(rho, epsilon) - + fvm::div(rhoPhi, epsilon) - - fvm::laplacian - ( - mut/sigmaEps + mul, epsilon, - "laplacian(DepsilonEff,epsilon)" - ) - == - C1*G*epsilon/(k + kMin) - - fvm::SuSp(C1*(1.0 - C3)*Gcoef, epsilon) - - fvm::Sp(C2*rho*epsilon/(k + kMin), epsilon) - ); - - #include "wallDissipation.H" - - epsEqn.relax(); - epsEqn.solve(); - - bound(epsilon, epsilon0); - - - // Turbulent kinetic energy equation - fvScalarMatrix kEqn - ( - fvm::ddt(rho, k) - + fvm::div(rhoPhi, k) - - fvm::laplacian - ( - mut/sigmak + mul, k, - "laplacian(DkEff,k)" - ) - == - G - - fvm::SuSp(Gcoef, k) - - fvm::Sp(rho*epsilon/(k + kMin), k) - ); - - kEqn.relax(); - kEqn.solve(); - - bound(k, k0); - - - //- Re-calculate viscosity - mut = rho*Cmu*sqr(k)/(epsilon + epsilonMin); - - #include "wallViscosity.H" - - muEff = mut + mul; -} -else -{ - muEff = mut + twoPhaseProperties.mu(); -} diff --git a/applications/solvers/multiphase/driftFluxFoam/wallDissipation.H b/applications/solvers/multiphase/driftFluxFoam/wallDissipation.H deleted file mode 100644 index c8b88597e5cc427b39a6ddea448cbbfdb225a1ec..0000000000000000000000000000000000000000 --- a/applications/solvers/multiphase/driftFluxFoam/wallDissipation.H +++ /dev/null @@ -1,50 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Global - wallDissipation - -Description - Set wall dissipation in the epsilon matrix - -\*---------------------------------------------------------------------------*/ - -{ - const fvPatchList& patches = mesh.boundary(); - - forAll(patches, patchi) - { - const fvPatch& p = patches[patchi]; - - if (isA<wallFvPatch>(p)) - { - epsEqn.setValues - ( - p.faceCells(), - epsilon.boundaryField()[patchi].patchInternalField() - ); - } - } -} - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/driftFluxFoam/wallFunctions.H b/applications/solvers/multiphase/driftFluxFoam/wallFunctions.H deleted file mode 100644 index 2a064b47f1b104f21f6fb30dcf87c309cdd967eb..0000000000000000000000000000000000000000 --- a/applications/solvers/multiphase/driftFluxFoam/wallFunctions.H +++ /dev/null @@ -1,85 +0,0 @@ -{ - labelList cellBoundaryFaceCount(epsilon.size(), 0); - - const scalar Cmu25 = ::pow(Cmu.value(), 0.25); - const scalar Cmu75 = ::pow(Cmu.value(), 0.75); - const scalar kappa_ = kappa.value(); - - const fvPatchList& patches = mesh.boundary(); - - //- Initialise the near-wall P 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; - G[faceCelli] = 0.0; - } - } - } - - //- Accumulate the wall face contributions to epsilon and G - // Increment cellBoundaryFaceCount for each face for averaging - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isA<wallFvPatch>(curPatch)) - { - const scalarField& mutw = mut.boundaryField()[patchi]; - const scalarField& mulw = mul.boundaryField()[patchi]; - - scalarField magFaceGradU - ( - mag(U.boundaryField()[patchi].snGrad()) - ); - - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - // For corner cells (with two boundary or more faces), - // epsilon and G in the near-wall cell are calculated - // as an average - - cellBoundaryFaceCount[faceCelli]++; - - epsilon[faceCelli] += - Cmu75*::pow(k[faceCelli], 1.5) - /(kappa_*y[patchi][facei]); - - G[faceCelli] += - (mutw[facei] + mulw[facei]) - *magFaceGradU[facei] - *Cmu25*::sqrt(k[faceCelli]) - /(kappa_*y[patchi][facei]); - } - } - } - - - // 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]; - G[faceCelli] /= cellBoundaryFaceCount[faceCelli]; - cellBoundaryFaceCount[faceCelli] = 1; - } - } - } -} diff --git a/applications/solvers/multiphase/driftFluxFoam/wallViscosity.H b/applications/solvers/multiphase/driftFluxFoam/wallViscosity.H deleted file mode 100644 index 632432ff8c1d075dc4dbb2348372771eb4bc93a5..0000000000000000000000000000000000000000 --- a/applications/solvers/multiphase/driftFluxFoam/wallViscosity.H +++ /dev/null @@ -1,38 +0,0 @@ -{ - const scalar Cmu25 = ::pow(Cmu.value(), 0.25); - const scalar kappa_ = kappa.value(); - const scalar E_ = E.value(); - - const fvPatchList& patches = mesh.boundary(); - - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isA<wallFvPatch>(curPatch)) - { - scalarField& mutw = mut.boundaryField()[patchi]; - const scalarField& mulw = mul.boundaryField()[patchi]; - const scalarField& rhow = rho.boundaryField()[patchi]; - - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - scalar yPlus = - Cmu25*y[patchi][facei]*::sqrt(k[faceCelli]) - /(mulw[facei]/rhow[facei]); - - if (yPlus > 11.6) - { - mutw[facei] = - mulw[facei]*(yPlus*kappa_/::log(E_*yPlus) - 1); - } - else - { - mutw[facei] = 0.0; - } - } - } - } -} diff --git a/src/TurbulenceModels/compressible/Make/options b/src/TurbulenceModels/compressible/Make/options index 5d1b7bc8c996655e5461f44e62673d20e3ac94f0..55388cb598c30149d14949824d54bf6dc2b4257f 100644 --- a/src/TurbulenceModels/compressible/Make/options +++ b/src/TurbulenceModels/compressible/Make/options @@ -1,5 +1,6 @@ EXE_INC = \ -I../turbulenceModels/lnInclude \ + -IlnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ diff --git a/src/TurbulenceModels/compressible/RAS/buoyantKEpsilon/buoyantKEpsilon.C b/src/TurbulenceModels/compressible/RAS/buoyantKEpsilon/buoyantKEpsilon.C new file mode 100644 index 0000000000000000000000000000000000000000..c2bf9607a44f0b853b0f7e333670592c70cd929d --- /dev/null +++ b/src/TurbulenceModels/compressible/RAS/buoyantKEpsilon/buoyantKEpsilon.C @@ -0,0 +1,136 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "buoyantKEpsilon.H" +#include "addToRunTimeSelectionTable.H" +#include "uniformDimensionedFields.H" +#include "fvcGrad.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace RASModels +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +buoyantKEpsilon<BasicTurbulenceModel>::buoyantKEpsilon +( + const alphaField& alpha, + const rhoField& rho, + const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, + const surfaceScalarField& phi, + const transportModel& transport, + const word& propertiesName, + const word& type +) +: + kEpsilon<BasicTurbulenceModel> + ( + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName, + type + ), + + Cg_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "Cg", + this->coeffDict_, + 0.85 + ) + ) +{ + if (type == typeName) + { + kEpsilon<BasicTurbulenceModel>::correctNut(); + this->printCoeffs(type); + } +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +bool buoyantKEpsilon<BasicTurbulenceModel>::read() +{ + if (kEpsilon<BasicTurbulenceModel>::read()) + { + Cg_.readIfPresent(this->coeffDict()); + + return true; + } + else + { + return false; + } +} + + +template<class BasicTurbulenceModel> +tmp<volScalarField> +buoyantKEpsilon<BasicTurbulenceModel>::Gcoef() const +{ + const uniformDimensionedVectorField& g = + this->mesh_.objectRegistry::template + lookupObject<uniformDimensionedVectorField>("g"); + + return + (this->Cmu_*this->k_/this->sigmak_) + *(g & fvc::grad(this->rho_))/(this->epsilon_ + this->epsilonMin_); +} + + +template<class BasicTurbulenceModel> +tmp<fvScalarMatrix> +buoyantKEpsilon<BasicTurbulenceModel>::kSource() const +{ + return -fvm::SuSp(Gcoef(), this->k_); +} + + +template<class BasicTurbulenceModel> +tmp<fvScalarMatrix> +buoyantKEpsilon<BasicTurbulenceModel>::epsilonSource() const +{ + return -fvm::SuSp(this->C1_*(1.0 - this->Cg_)*Gcoef(), this->epsilon_); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace RASModels +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/TurbulenceModels/compressible/RAS/buoyantKEpsilon/buoyantKEpsilon.H b/src/TurbulenceModels/compressible/RAS/buoyantKEpsilon/buoyantKEpsilon.H new file mode 100644 index 0000000000000000000000000000000000000000..d13f5d5d4fea5800211cc4e65d2197f86040a4d7 --- /dev/null +++ b/src/TurbulenceModels/compressible/RAS/buoyantKEpsilon/buoyantKEpsilon.H @@ -0,0 +1,161 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::RASModels::buoyantKEpsilon + +Group + grpRASTurbulence + +Description + k-epsilon model for the gas-phase in a two-phase system + supporting phase-inversion. + + In the limit that the gas-phase fraction approaches zero a contribution from + the other phase is blended into the k and epsilon equations up to the + phase-fraction of alphaInversion at which point phase-inversion is + considered to have occurred and the model reverts to the pure single-phase + form. + + This model is unpublished and is provided as a stable numerical framework + on which a more physical model may be built. + + The default model coefficients correspond to the following: + \verbatim + buoyantKEpsilonCoeffs + { + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; + Cg 0.85; + sigmak 1.0; + sigmaEps 1.3; + alphaInversion 0.7; + } + \endverbatim + +SourceFiles + buoyantKEpsilon.C + +\*---------------------------------------------------------------------------*/ + +#ifndef buoyantKEpsilon_H +#define buoyantKEpsilon_H + +#include "kEpsilon.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace RASModels +{ + +/*---------------------------------------------------------------------------*\ + Class buoyantKEpsilon Declaration +\*---------------------------------------------------------------------------*/ + +template<class BasicTurbulenceModel> +class buoyantKEpsilon +: + public kEpsilon<BasicTurbulenceModel> +{ + // Private Member Functions + + // Disallow default bitwise copy construct and assignment + buoyantKEpsilon(const buoyantKEpsilon&); + buoyantKEpsilon& operator=(const buoyantKEpsilon&); + + +protected: + + // Protected data + + // Model coefficients + + dimensionedScalar Cg_; + + // Protected Member Functions + + tmp<volScalarField> Gcoef() const; + + virtual tmp<fvScalarMatrix> kSource() const; + virtual tmp<fvScalarMatrix> epsilonSource() const; + + +public: + + typedef typename BasicTurbulenceModel::alphaField alphaField; + typedef typename BasicTurbulenceModel::rhoField rhoField; + typedef typename BasicTurbulenceModel::transportModel transportModel; + + + //- Runtime type information + TypeName("buoyantKEpsilon"); + + + // Constructors + + //- Construct from components + buoyantKEpsilon + ( + const alphaField& alpha, + const rhoField& rho, + const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, + const surfaceScalarField& phi, + const transportModel& transport, + const word& propertiesName = turbulenceModel::propertiesName, + const word& type = typeName + ); + + + //- Destructor + virtual ~buoyantKEpsilon() + {} + + + // Member Functions + + //- Re-read model coefficients if they have changed + virtual bool read(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace RASModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "buoyantKEpsilon.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/TurbulenceModels/compressible/compressibleTurbulenceModels.C b/src/TurbulenceModels/compressible/compressibleTurbulenceModels.C index 8d1542c22a0d5a0ee6e6044e0cb27ab3ba3b6102..81ed6aeafccb134e510b34d9802f6ba0219f43db 100644 --- a/src/TurbulenceModels/compressible/compressibleTurbulenceModels.C +++ b/src/TurbulenceModels/compressible/compressibleTurbulenceModels.C @@ -52,6 +52,9 @@ makeBaseTurbulenceModel #include "kEpsilon.H" makeRASModel(kEpsilon); +#include "buoyantKEpsilon.H" +makeRASModel(buoyantKEpsilon); + #include "Smagorinsky.H" makeLESModel(Smagorinsky); diff --git a/tutorials/multiphase/driftFluxFoam/ras/dahl/0/epsilon b/tutorials/multiphase/driftFluxFoam/ras/dahl/0/epsilon index de83baf1110490d6eb0b547f018a7ded430d9148..279eab757fd95cbd26f9955d7b28ff36498e017e 100644 --- a/tutorials/multiphase/driftFluxFoam/ras/dahl/0/epsilon +++ b/tutorials/multiphase/driftFluxFoam/ras/dahl/0/epsilon @@ -34,17 +34,25 @@ boundaryField bottomWall { - type zeroGradient; + type epsilonWallFunction; + value $internalField; + Cmu 0.09; + kappa 0.41; + E 9.8; } endWall { - type zeroGradient; + type epsilonWallFunction; + value $internalField; + Cmu 0.09; + kappa 0.41; + E 9.8; } top { - type zeroGradient; + type slip; } frontAndBack diff --git a/tutorials/multiphase/driftFluxFoam/ras/dahl/0/k b/tutorials/multiphase/driftFluxFoam/ras/dahl/0/k index 41fcaaaabb57d6e039de1bef06af0f68949c4b97..f0767454b8c88d080c94b57d1c6a40e1f640f88b 100644 --- a/tutorials/multiphase/driftFluxFoam/ras/dahl/0/k +++ b/tutorials/multiphase/driftFluxFoam/ras/dahl/0/k @@ -34,17 +34,19 @@ boundaryField bottomWall { - type zeroGradient; + type kqRWallFunction; + value $internalField; } endWall { - type zeroGradient; + type kqRWallFunction; + value $internalField; } top { - type zeroGradient; + type slip; } frontAndBack diff --git a/tutorials/multiphase/driftFluxFoam/ras/dahl/0/nut b/tutorials/multiphase/driftFluxFoam/ras/dahl/0/nut new file mode 100644 index 0000000000000000000000000000000000000000..b9341e1dec7f4500c6702bc412846b27801f58e3 --- /dev/null +++ b/tutorials/multiphase/driftFluxFoam/ras/dahl/0/nut @@ -0,0 +1,66 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.3.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type calculated; + value $internalField; + } + + outlet + { + type calculated; + value $internalField; + } + + bottomWall + { + type nutkWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + + endWall + { + type nutkWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + + top + { + type slip; + } + + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/driftFluxFoam/ras/tank3D/constant/RASProperties b/tutorials/multiphase/driftFluxFoam/ras/dahl/constant/turbulenceProperties similarity index 80% rename from tutorials/multiphase/driftFluxFoam/ras/tank3D/constant/RASProperties rename to tutorials/multiphase/driftFluxFoam/ras/dahl/constant/turbulenceProperties index d964d3c86279abddc56f08cb6dd09ff387094fa7..21b5cf9ba54a2d3abd3f35c3d5028017237e2b36 100644 --- a/tutorials/multiphase/driftFluxFoam/ras/tank3D/constant/RASProperties +++ b/tutorials/multiphase/driftFluxFoam/ras/dahl/constant/turbulenceProperties @@ -11,15 +11,23 @@ FoamFile format ascii; class dictionary; location "constant"; - object RASProperties; + object turbulenceProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -RASModel kEpsilon; +simulationType RAS; -turbulence on; +RAS +{ + RASModel buoyantKEpsilon; -printCoeffs on; + turbulence on; + printCoeffs on; + buoyantKEpsilonCoeffs + { + Cg 0.85; + } +} // ************************************************************************* // diff --git a/tutorials/multiphase/driftFluxFoam/ras/dahl/system/fvSchemes b/tutorials/multiphase/driftFluxFoam/ras/dahl/system/fvSchemes index 5ac73daf5d7a82cd47d28b02d338725ce8627098..6fab8fdcafdd5fd74199cde30e492224cf3964ed 100644 --- a/tutorials/multiphase/driftFluxFoam/ras/dahl/system/fvSchemes +++ b/tutorials/multiphase/driftFluxFoam/ras/dahl/system/fvSchemes @@ -36,7 +36,7 @@ divSchemes div(rhoPhi,k) Gauss limitedLinear 1; div(rhoPhi,epsilon) Gauss limitedLinear 1; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/0/epsilon b/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/0/epsilon index 60c49b3e08f9d145abfe7c138b7e9d78cea3a493..11750f4dde6e253fe0971fb433fd520ecaae7ff8 100644 --- a/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/0/epsilon +++ b/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/0/epsilon @@ -10,35 +10,42 @@ FoamFile version 2.0; format ascii; class volScalarField; + location "0"; object epsilon; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -3 0 0 0 0]; -internalField uniform 7e-3; +internalField uniform 0.007; boundaryField { rotor { - type zeroGradient; + type epsilonWallFunction; + value $internalField; + Cmu 0.09; + kappa 0.41; + E 9.8; } - stator { - type zeroGradient; + type epsilonWallFunction; + value $internalField; + Cmu 0.09; + kappa 0.41; + E 9.8; } - front { type empty; } - back { type empty; } } + // ************************************************************************* // diff --git a/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/0/k b/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/0/k index 4aae91ee9fea9efb51b4e2d77ab16c4657c95474..07753a7398e2b5e69a40758eb7b2c8730c7904b7 100644 --- a/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/0/k +++ b/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/0/k @@ -10,6 +10,7 @@ FoamFile version 2.0; format ascii; class volScalarField; + location "0"; object k; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -22,23 +23,23 @@ boundaryField { rotor { - type zeroGradient; + type kqRWallFunction; + value $internalField; } - stator { - type zeroGradient; + type kqRWallFunction; + value $internalField; } - front { type empty; } - back { type empty; } } + // ************************************************************************* // diff --git a/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/0/nut b/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/0/nut new file mode 100644 index 0000000000000000000000000000000000000000..1031feb23f8c219d45c239b0a40487dd0fa0721f --- /dev/null +++ b/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/0/nut @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.3.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + rotor + { + type nutkWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + stator + { + type nutkWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + front + { + type empty; + } + back + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/constant/RASProperties b/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/constant/turbulenceProperties similarity index 85% rename from tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/constant/RASProperties rename to tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/constant/turbulenceProperties index d964d3c86279abddc56f08cb6dd09ff387094fa7..02b27e15c453c5bb3b20f45ba07580278621d25e 100644 --- a/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/constant/RASProperties +++ b/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/constant/turbulenceProperties @@ -11,15 +11,18 @@ FoamFile format ascii; class dictionary; location "constant"; - object RASProperties; + object turbulenceProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -RASModel kEpsilon; +simulationType RAS; -turbulence on; - -printCoeffs on; +RAS +{ + RASModel kEpsilon; + turbulence on; + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/system/fvSchemes b/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/system/fvSchemes index 5ac73daf5d7a82cd47d28b02d338725ce8627098..acc6cf1133cc2cb4265009ae3c7e6d38a3d3f846 100644 --- a/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/system/fvSchemes +++ b/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/system/fvSchemes @@ -35,8 +35,10 @@ divSchemes "div\(phirb,alpha.*\)" Gauss linear; div(rhoPhi,k) Gauss limitedLinear 1; div(rhoPhi,epsilon) Gauss limitedLinear 1; + div(phi,k) Gauss limitedLinear 1; + div(phi,epsilon) Gauss limitedLinear 1; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/driftFluxFoam/ras/tank3D/0/alpha.sludge b/tutorials/multiphase/driftFluxFoam/ras/tank3D/0/alpha.sludge index 516eb6c3447ef891d1f918b1c9dbe107d5a8b957..e5b81c81ed67d02f8dd504acc9b0d46d381a5163 100644 --- a/tutorials/multiphase/driftFluxFoam/ras/tank3D/0/alpha.sludge +++ b/tutorials/multiphase/driftFluxFoam/ras/tank3D/0/alpha.sludge @@ -22,7 +22,7 @@ boundaryField { SYMP3 { - type zeroGradient; + type slip; } INLE1 diff --git a/tutorials/multiphase/driftFluxFoam/ras/tank3D/0/epsilon b/tutorials/multiphase/driftFluxFoam/ras/tank3D/0/epsilon index 880cb3a80a20ee9b7daaa1bf39f754ba67b8e13e..cd60e6eebfaa622af7c1abbe937b164ae53d83d6 100644 --- a/tutorials/multiphase/driftFluxFoam/ras/tank3D/0/epsilon +++ b/tutorials/multiphase/driftFluxFoam/ras/tank3D/0/epsilon @@ -22,7 +22,7 @@ boundaryField { SYMP3 { - type zeroGradient; + type slip; } INLE1 @@ -51,69 +51,10 @@ boundaryField type zeroGradient; } - WALL6 - { - type zeroGradient; - } - - WALL8 - { - type zeroGradient; - } - - WALL61 - { - type zeroGradient; - } - - WALL62 - { - type zeroGradient; - } - - WALL63 - { - type zeroGradient; - } - - WALL64 - { - type zeroGradient; - } - - WALL65 + "WALL.*" { - type zeroGradient; - } - - WALL66 - { - type zeroGradient; - } - - WALL67 - { - type zeroGradient; - } - - WALL68 - { - type zeroGradient; - } - - WALL69 - { - type zeroGradient; - } - - WALL7 - { - type zeroGradient; - } - - WALL70 - { - type zeroGradient; + type epsilonWallFunction; + value $internalField; } OUTL15 diff --git a/tutorials/multiphase/driftFluxFoam/ras/tank3D/0/k b/tutorials/multiphase/driftFluxFoam/ras/tank3D/0/k index ae855524f00d9e1efc4bb10529812d5a0ccb96c4..9a8f504344bfe0f3802d80080dcf1a9c96cd1e22 100644 --- a/tutorials/multiphase/driftFluxFoam/ras/tank3D/0/k +++ b/tutorials/multiphase/driftFluxFoam/ras/tank3D/0/k @@ -22,7 +22,7 @@ boundaryField { SYMP3 { - type zeroGradient; + type slip; } INLE1 @@ -51,69 +51,10 @@ boundaryField type zeroGradient; } - WALL6 - { - type zeroGradient; - } - - WALL8 - { - type zeroGradient; - } - - WALL61 - { - type zeroGradient; - } - - WALL62 - { - type zeroGradient; - } - - WALL63 - { - type zeroGradient; - } - - WALL64 - { - type zeroGradient; - } - - WALL65 + "WALL.*" { - type zeroGradient; - } - - WALL66 - { - type zeroGradient; - } - - WALL67 - { - type zeroGradient; - } - - WALL68 - { - type zeroGradient; - } - - WALL69 - { - type zeroGradient; - } - - WALL7 - { - type zeroGradient; - } - - WALL70 - { - type zeroGradient; + type kqRWallFunction; + value $internalField; } OUTL15 diff --git a/tutorials/multiphase/driftFluxFoam/ras/tank3D/0/nut b/tutorials/multiphase/driftFluxFoam/ras/tank3D/0/nut new file mode 100644 index 0000000000000000000000000000000000000000..ca34dfec524e5442880a8c7d69c01eca6f502778 --- /dev/null +++ b/tutorials/multiphase/driftFluxFoam/ras/tank3D/0/nut @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.3.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + SYMP3 + { + type slip; + } + + INLE1 + { + type calculated; + value $internalField; + } + + "OUTL.*" + { + type calculated; + value $internalField; + } + + "WALL.*" + { + type nutkWallFunction; + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/driftFluxFoam/ras/dahl/constant/RASProperties b/tutorials/multiphase/driftFluxFoam/ras/tank3D/constant/turbulenceProperties similarity index 85% rename from tutorials/multiphase/driftFluxFoam/ras/dahl/constant/RASProperties rename to tutorials/multiphase/driftFluxFoam/ras/tank3D/constant/turbulenceProperties index d964d3c86279abddc56f08cb6dd09ff387094fa7..02b27e15c453c5bb3b20f45ba07580278621d25e 100644 --- a/tutorials/multiphase/driftFluxFoam/ras/dahl/constant/RASProperties +++ b/tutorials/multiphase/driftFluxFoam/ras/tank3D/constant/turbulenceProperties @@ -11,15 +11,18 @@ FoamFile format ascii; class dictionary; location "constant"; - object RASProperties; + object turbulenceProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -RASModel kEpsilon; +simulationType RAS; -turbulence on; - -printCoeffs on; +RAS +{ + RASModel kEpsilon; + turbulence on; + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/multiphase/driftFluxFoam/ras/tank3D/system/fvSchemes b/tutorials/multiphase/driftFluxFoam/ras/tank3D/system/fvSchemes index 6942046cda3a19f652b8e161ce28ea2c3364de04..1cece2357f26ae125fe561c1e4df802ff65ffffa 100644 --- a/tutorials/multiphase/driftFluxFoam/ras/tank3D/system/fvSchemes +++ b/tutorials/multiphase/driftFluxFoam/ras/tank3D/system/fvSchemes @@ -36,7 +36,7 @@ divSchemes div(rhoPhi,k) Gauss limitedLinear 1; div(rhoPhi,epsilon) Gauss limitedLinear 1; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes