diff --git a/applications/solvers/multiphase/cavitatingFoam/createFields.H b/applications/solvers/multiphase/cavitatingFoam/createFields.H index 2c834dc5..3c28de16 100644 --- a/applications/solvers/multiphase/cavitatingFoam/createFields.H +++ b/applications/solvers/multiphase/cavitatingFoam/createFields.H @@ -57,12 +57,12 @@ Info<< "Reading transportProperties\n" << endl; - incompressibleTwoPhaseMixture twoPhaseProperties(U, phi); + incompressibleTwoPhaseMixture mixture(U, phi); - volScalarField& alphav(twoPhaseProperties.alpha1()); + volScalarField& alphav(mixture.alpha1()); alphav.oldTime(); - volScalarField& alphal(twoPhaseProperties.alpha2()); + volScalarField& alphal(mixture.alpha2()); Info<< "Creating compressibilityModel\n" << endl; autoPtr psiModel = @@ -85,5 +85,5 @@ // Create incompressible turbulence model autoPtr turbulence ( - incompressible::turbulenceModel::New(U, phi, twoPhaseProperties) + incompressible::turbulenceModel::New(U, phi, mixture) ); diff --git a/applications/solvers/multiphase/compressibleInterFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/Make/options index 035116d2..54e9f74e 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/Make/options +++ b/applications/solvers/multiphase/compressibleInterFoam/Make/options @@ -1,5 +1,6 @@ EXE_INC = \ -ItwoPhaseMixtureThermo \ + -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ diff --git a/applications/solvers/multiphase/compressibleInterFoam/TEqn.H b/applications/solvers/multiphase/compressibleInterFoam/TEqn.H index d97e8b2a..a02b38a8 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/TEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/TEqn.H @@ -3,19 +3,19 @@ ( fvm::ddt(rho, T) + fvm::div(rhoPhi, T) - - fvm::laplacian(twoPhaseProperties.alphaEff(turbulence->mut()), T) + - fvm::laplacian(mixture.alphaEff(turbulence->mut()), T) + ( fvc::div(fvc::absolute(phi, U), p) + fvc::ddt(rho, K) + fvc::div(rhoPhi, K) ) *( - alpha1/twoPhaseProperties.thermo1().Cv() - + alpha2/twoPhaseProperties.thermo2().Cv() + alpha1/mixture.thermo1().Cv() + + alpha2/mixture.thermo2().Cv() ) ); TEqn.relax(); TEqn.solve(); - twoPhaseProperties.correct(); + mixture.correct(); } diff --git a/applications/solvers/multiphase/compressibleInterFoam/UEqn.H b/applications/solvers/multiphase/compressibleInterFoam/UEqn.H index 8fc397e8..44be32aa 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/UEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/UEqn.H @@ -16,7 +16,7 @@ fvc::reconstruct ( ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) + interface.surfaceTensionForce() - ghf*fvc::snGrad(rho) - fvc::snGrad(p_rgh) ) * mesh.magSf() diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options index cf9a1d85..123645b4 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options @@ -1,6 +1,7 @@ EXE_INC = \ -I.. \ -I../twoPhaseMixtureThermo \ + -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H index e7fd7241..89089fe6 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H @@ -15,7 +15,7 @@ surfaceScalarField phig ( ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) + interface.surfaceTensionForce() - ghf*fvc::snGrad(rho) )*rAUf*mesh.magSf() ); diff --git a/applications/solvers/multiphase/compressibleInterFoam/createFields.H b/applications/solvers/multiphase/compressibleInterFoam/createFields.H index c4edc961..5f7b4ddd 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/createFields.H +++ b/applications/solvers/multiphase/compressibleInterFoam/createFields.H @@ -29,19 +29,19 @@ #include "createPhi.H" Info<< "Constructing twoPhaseMixtureThermo\n" << endl; - twoPhaseMixtureThermo twoPhaseProperties(mesh); + twoPhaseMixtureThermo mixture(mesh); - volScalarField& alpha1(twoPhaseProperties.alpha1()); - volScalarField& alpha2(twoPhaseProperties.alpha2()); + volScalarField& alpha1(mixture.alpha1()); + volScalarField& alpha2(mixture.alpha2()); Info<< "Reading thermophysical properties\n" << endl; - volScalarField& p = twoPhaseProperties.p(); - volScalarField& T = twoPhaseProperties.T(); - volScalarField& rho1 = twoPhaseProperties.thermo1().rho(); - const volScalarField& psi1 = twoPhaseProperties.thermo1().psi(); - volScalarField& rho2 = twoPhaseProperties.thermo2().rho(); - const volScalarField& psi2 = twoPhaseProperties.thermo2().psi(); + volScalarField& p = mixture.p(); + volScalarField& T = mixture.T(); + volScalarField& rho1 = mixture.thermo1().rho(); + const volScalarField& psi1 = mixture.thermo1().psi(); + volScalarField& rho2 = mixture.thermo2().rho(); + const volScalarField& psi2 = mixture.thermo2().psi(); volScalarField rho ( @@ -57,7 +57,7 @@ ); - dimensionedScalar pMin(twoPhaseProperties.lookup("pMin")); + dimensionedScalar pMin(mixture.lookup("pMin")); Info<< "Calculating field g.h\n" << endl; volScalarField gh("gh", g & mesh.C()); @@ -85,12 +85,12 @@ ); // Construct interface from alpha1 distribution - interfaceProperties interface(alpha1, U, twoPhaseProperties); + interfaceProperties interface(alpha1, U, mixture); // Construct compressible turbulence model autoPtr turbulence ( - compressible::turbulenceModel::New(rho, U, rhoPhi, twoPhaseProperties) + compressible::turbulenceModel::New(rho, U, rhoPhi, mixture) ); Info<< "Creating field kinetic energy K\n" << endl; diff --git a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H index dbd859b9..673f1c82 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H @@ -15,7 +15,7 @@ surfaceScalarField phig ( ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) + interface.surfaceTensionForce() - ghf*fvc::snGrad(rho) )*rAUf*mesh.magSf() ); diff --git a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/Make/options b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/Make/options index 8dbf02aa..5c8c8df2 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/Make/options +++ b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/Make/options @@ -1,4 +1,5 @@ EXE_INC = \ + -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Make/options b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Make/options index 0f47e697..af7020f4 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Make/options +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Make/options @@ -1,5 +1,7 @@ EXE_INC = \ + -I../interFoam \ -ImultiphaseMixtureThermo/lnInclude \ + -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/TEqn.H b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/TEqn.H index a7ee3a7b..66274441 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/TEqn.H +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/TEqn.H @@ -2,16 +2,16 @@ fvScalarMatrix TEqn ( fvm::ddt(rho, T) - + fvm::div(multiphaseProperties.rhoPhi(), T) - - fvm::laplacian(multiphaseProperties.alphaEff(turbulence->mut()), T) + + fvm::div(mixture.rhoPhi(), T) + - fvm::laplacian(mixture.alphaEff(turbulence->mut()), T) + ( fvc::div(fvc::absolute(phi, U), p) - + fvc::ddt(rho, K) + fvc::div(multiphaseProperties.rhoPhi(), K) - )*multiphaseProperties.rCv() + + fvc::ddt(rho, K) + fvc::div(mixture.rhoPhi(), K) + )*mixture.rCv() ); TEqn.relax(); TEqn.solve(); - multiphaseProperties.correct(); + mixture.correct(); } diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/UEqn.H b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/UEqn.H index 38cfebde..436b74e8 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/UEqn.H +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/UEqn.H @@ -1,7 +1,7 @@ fvVectorMatrix UEqn ( fvm::ddt(rho, U) - + fvm::div(multiphaseProperties.rhoPhi(), U) + + fvm::div(mixture.rhoPhi(), U) + turbulence->divDevRhoReff(U) ); @@ -16,7 +16,7 @@ fvc::reconstruct ( ( - multiphaseProperties.surfaceTensionForce() + mixture.surfaceTensionForce() - ghf*fvc::snGrad(rho) - fvc::snGrad(p_rgh) ) * mesh.magSf() diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseInterFoam.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseInterFoam.C index 09018b60..5648f2d3 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseInterFoam.C +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseInterFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -76,9 +76,9 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { - multiphaseProperties.solve(); + mixture.solve(); - solve(fvm::ddt(rho) + fvc::div(multiphaseProperties.rhoPhi())); + solve(fvm::ddt(rho) + fvc::div(mixture.rhoPhi())); #include "UEqn.H" #include "TEqn.H" diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/createFields.H b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/createFields.H index 5c7f723a..8ab0a958 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/createFields.H +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/createFields.H @@ -29,10 +29,10 @@ #include "createPhi.H" Info<< "Constructing multiphaseMixtureThermo\n" << endl; - multiphaseMixtureThermo multiphaseProperties(U, phi); + multiphaseMixtureThermo mixture(U, phi); - volScalarField& p = multiphaseProperties.p(); - volScalarField& T = multiphaseProperties.T(); + volScalarField& p = mixture.p(); + volScalarField& T = mixture.T(); volScalarField rho ( @@ -43,12 +43,12 @@ mesh, IOobject::READ_IF_PRESENT ), - multiphaseProperties.rho() + mixture.rho() ); Info<< max(rho) << min(rho); - dimensionedScalar pMin(multiphaseProperties.lookup("pMin")); + dimensionedScalar pMin(mixture.lookup("pMin")); Info<< "Calculating field g.h\n" << endl; @@ -62,8 +62,8 @@ ( rho, U, - multiphaseProperties.rhoPhi(), - multiphaseProperties + mixture.rhoPhi(), + mixture ) ); diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/Make/options b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/Make/options index eab8cce1..3740cf38 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/Make/options +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/Make/options @@ -1,4 +1,5 @@ EXE_INC = \ + -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/pEqn.H b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/pEqn.H index e42a54aa..a8f4bcb9 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/pEqn.H @@ -15,7 +15,7 @@ surfaceScalarField phig ( ( - multiphaseProperties.surfaceTensionForce() + mixture.surfaceTensionForce() - ghf*fvc::snGrad(rho) )*rAUf*mesh.magSf() ); @@ -32,13 +32,13 @@ )/(mesh.magSf().boundaryField()*rAUf.boundaryField()) ); - PtrList p_rghEqnComps(multiphaseProperties.phases().size()); + PtrList p_rghEqnComps(mixture.phases().size()); label phasei = 0; forAllConstIter ( PtrDictionary, - multiphaseProperties.phases(), + mixture.phases(), phase ) { @@ -74,7 +74,7 @@ forAllConstIter ( PtrDictionary, - multiphaseProperties.phases(), + mixture.phases(), phase ) { @@ -105,14 +105,14 @@ if (pimple.finalNonOrthogonalIter()) { - // p = max(p_rgh + multiphaseProperties.rho()*gh, pMin); - // p_rgh = p - multiphaseProperties.rho()*gh; + // p = max(p_rgh + mixture.rho()*gh, pMin); + // p_rgh = p - mixture.rho()*gh; phasei = 0; forAllIter ( PtrDictionary, - multiphaseProperties.phases(), + mixture.phases(), phase ) { @@ -129,11 +129,11 @@ } } - p = max(p_rgh + multiphaseProperties.rho()*gh, pMin); + p = max(p_rgh + mixture.rho()*gh, pMin); // Update densities from change in p_rgh - multiphaseProperties.correctRho(p_rgh - p_rgh_0); - rho = multiphaseProperties.rho(); + mixture.correctRho(p_rgh - p_rgh_0); + rho = mixture.rho(); K = 0.5*magSqr(U); diff --git a/applications/solvers/multiphase/driftFluxFoam/Make/files b/applications/solvers/multiphase/driftFluxFoam/Make/files index 2a55d1c5..88a3cb12 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 bce47402..af004484 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 f8cf3a9b..7018d964 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 d56b3716..1c4aa0a1 100644 --- a/applications/solvers/multiphase/driftFluxFoam/alphaEqn.H +++ b/applications/solvers/multiphase/driftFluxFoam/alphaEqn.H @@ -27,7 +27,7 @@ mesh, linear(mesh), fv::uncorrectedSnGrad(mesh) - ).fvmLaplacian(fvc::interpolate(mut/rho), alpha1) + ).fvmLaplacian(fvc::interpolate(turbulence->nut()), alpha1) ); Info<< "Phase-1 volume fraction = " @@ -43,9 +43,23 @@ { Info<< "Applying the previous iteration correction flux" << endl; #ifdef LTSSOLVE - MULES::LTScorrect(alpha1, phiAlpha, tphiAlphaCorr0(), 1, 0); + MULES::LTScorrect + ( + alpha1, + phiAlpha, + tphiAlphaCorr0(), + mixture.alphaMax(), + 0 + ); #else - MULES::correct(alpha1, phiAlpha, tphiAlphaCorr0(), 1, 0); + MULES::correct + ( + alpha1, + phiAlpha, + tphiAlphaCorr0(), + mixture.alphaMax(), + 0 + ); #endif phiAlpha += tphiAlphaCorr0(); @@ -79,9 +93,23 @@ volScalarField alpha10(alpha1); #ifdef LTSSOLVE - MULES::LTScorrect(alpha1, tphiAlphaUn(), tphiAlphaCorr(), 1, 0); + MULES::LTScorrect + ( + alpha1, + tphiAlphaUn(), + tphiAlphaCorr(), + mixture.alphaMax(), + 0 + ); #else - MULES::correct(alpha1, tphiAlphaUn(), tphiAlphaCorr(), 1, 0); + MULES::correct + ( + alpha1, + tphiAlphaUn(), + tphiAlphaCorr(), + mixture.alphaMax(), + 0 + ); #endif // Under-relax the correction for all but the 1st corrector @@ -100,9 +128,23 @@ phiAlpha = tphiAlphaUn; #ifdef LTSSOLVE - MULES::explicitLTSSolve(alpha1, phi, phiAlpha, 1, 0); + MULES::explicitLTSSolve + ( + alpha1, + phi, + phiAlpha, + mixture.alphaMax(), + 0 + ); #else - MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0); + MULES::explicitSolve + ( + alpha1, + phi, + phiAlpha, + mixture.alphaMax(), + 0 + ); #endif } } diff --git a/applications/solvers/multiphase/driftFluxFoam/alphaEqnSubCycle.H b/applications/solvers/multiphase/driftFluxFoam/alphaEqnSubCycle.H index 53da0f1f..8ad3234a 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 00000000..b636de0f --- /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 . + +\*---------------------------------------------------------------------------*/ + +#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 3224f441..2d0ed6ed 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 UdmModelPtr ( relativeVelocityModel::New ( transportProperties, - twoPhaseProperties + mixture ) ); relativeVelocityModel& UdmModel(UdmModelPtr()); - // Turbulence - // ~~~~~~~~~~ - - IOdictionary RASProperties + // Construct compressible turbulence model + autoPtr + < + CompressibleTurbulenceModel + > turbulence ( - IOobject - ( - "RASProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) + CompressibleTurbulenceModel + ::New(rho, U, rhoPhi, mixture) ); - - 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 - ( - dimensionedScalar::lookupOrAddToDict - ( - "kappa", - wallFunctionDict, - 0.41 - ) - ); - - 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 tphiAlphaCorr0; diff --git a/applications/solvers/multiphase/driftFluxFoam/driftFluxFoam.C b/applications/solvers/multiphase/driftFluxFoam/driftFluxFoam.C index 8ab48d7b..7e0661ce 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.C b/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.C index d656f92b..fded594b 100644 --- a/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.C +++ b/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.C @@ -82,6 +82,13 @@ incompressibleTwoPhaseInteractingMixture rhod_("rho", dimDensity, muModel_->viscosityProperties().lookup("rho")), rhoc_("rho", dimDensity, nucModel_->viscosityProperties().lookup("rho")), + dd_ + ( + "d", + dimLength, + muModel_->viscosityProperties().lookupOrDefault("d", 0.0) + ), + alphaMax_(muModel_->viscosityProperties().lookupOrDefault("alphaMax", 1.0)), U_(U), phi_(phi), @@ -118,6 +125,20 @@ bool Foam::incompressibleTwoPhaseInteractingMixture::read() muModel_->viscosityProperties().lookup("rho") >> rhod_; nucModel_->viscosityProperties().lookup("rho") >> rhoc_; + dd_ = dimensionedScalar + ( + "d", + dimLength, + muModel_->viscosityProperties().lookupOrDefault("d", 0) + ); + + alphaMax_ = + muModel_->viscosityProperties().lookupOrDefault + ( + "alphaMax", + 1.0 + ); + return true; } else diff --git a/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.H b/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.H index d167eaca..8339ce29 100644 --- a/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.H +++ b/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.H @@ -69,6 +69,12 @@ protected: dimensionedScalar rhod_; dimensionedScalar rhoc_; + //- Optional diameter of the dispersed phase particles + dimensionedScalar dd_; + + //- Optional maximum dispersed phase-fraction (e.g. packing limit) + scalar alphaMax_; + const volVectorField& U_; const surfaceScalarField& phi_; @@ -121,6 +127,19 @@ public: return rhoc_; }; + //- Return the diameter of the dispersed-phase particles + const dimensionedScalar& dd() const + { + return dd_; + } + + //- Optional maximum phase-fraction (e.g. packing limit) + // Defaults to 1 + scalar alphaMax() const + { + return alphaMax_; + } + //- Return const-access to the mixture velocity const volVectorField& U() const { @@ -133,21 +152,36 @@ public: return mu_; } + //- Return the dynamic mixture viscosity for patch + virtual tmp mu(const label patchi) const + { + return mu_.boundaryField()[patchi]; + } + + //- Return the mixture density + virtual tmp rho() const + { + return alpha1_*rhod_ + alpha2_*rhoc_; + } + + //- Return the mixture density for patch + virtual tmp rho(const label patchi) const + { + return + alpha1_.boundaryField()[patchi]*rhod_.value() + + alpha2_.boundaryField()[patchi]*rhoc_.value(); + } + //- Return the mixture viscosity virtual tmp nu() const { - notImplemented("incompressibleTwoPhaseInteractingMixture::nu()"); - return volScalarField::null(); + return mu_/rho(); } //- Return the mixture viscosity for patch virtual tmp 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 ddcc8cf2..00000000 --- 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 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/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C index ce184db4..578b23f3 100644 --- a/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C +++ b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C @@ -54,7 +54,9 @@ Foam::relativeVelocityModel::relativeVelocityModel ( "Udm", alphac_.time().timeName(), - alphac_.mesh() + alphac_.mesh(), + IOobject::NO_READ, + IOobject::AUTO_WRITE ), alphac_.mesh(), dimensionedVector("Udm", dimVelocity, vector::zero), diff --git a/applications/solvers/multiphase/driftFluxFoam/wallFunctions.H b/applications/solvers/multiphase/driftFluxFoam/wallFunctions.H deleted file mode 100644 index 2a064b47..00000000 --- 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(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(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(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 632432ff..00000000 --- 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(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/applications/solvers/multiphase/interFoam/Allwclean b/applications/solvers/multiphase/interFoam/Allwclean index 8b080006..d9147269 100755 --- a/applications/solvers/multiphase/interFoam/Allwclean +++ b/applications/solvers/multiphase/interFoam/Allwclean @@ -4,7 +4,6 @@ set -x wclean wclean interDyMFoam -wclean MRFInterFoam wclean porousInterFoam wclean LTSInterFoam wclean interMixingFoam diff --git a/applications/solvers/multiphase/interFoam/Allwmake b/applications/solvers/multiphase/interFoam/Allwmake index cc883614..035b0079 100755 --- a/applications/solvers/multiphase/interFoam/Allwmake +++ b/applications/solvers/multiphase/interFoam/Allwmake @@ -4,7 +4,6 @@ set -x wmake wmake interDyMFoam -wmake MRFInterFoam wmake porousInterFoam wmake LTSInterFoam wmake interMixingFoam diff --git a/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C b/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C index 33d83161..1e870c42 100644 --- a/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C +++ b/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C @@ -40,8 +40,7 @@ Description #include "fvCFD.H" #include "CMULES.H" #include "subCycle.H" -#include "interfaceProperties.H" -#include "incompressibleTwoPhaseMixture.H" +#include "immiscibleIncompressibleTwoPhaseMixture.H" #include "turbulenceModel.H" #include "fvcSmooth.H" #include "pimpleControl.H" @@ -82,12 +81,12 @@ int main(int argc, char *argv[]) { #include "alphaControls.H" - twoPhaseProperties.correct(); - #define LTSSOLVE #include "alphaEqnSubCycle.H" #undef LTSSOLVE + mixture.correct(); + turbulence->correct(); #include "UEqn.H" diff --git a/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options b/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options index 33560b54..14861f2b 100644 --- a/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options @@ -5,16 +5,14 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ - -linterfaceProperties \ - -ltwoPhaseMixture \ - -ltwoPhaseProperties \ - -lincompressibleTransportModels \ + -limmiscibleIncompressibleTwoPhaseMixture \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ -lincompressibleLESModels \ diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/MRFInterFoam.C b/applications/solvers/multiphase/interFoam/MRFInterFoam/MRFInterFoam.C deleted file mode 100644 index f6386bde..00000000 --- a/applications/solvers/multiphase/interFoam/MRFInterFoam/MRFInterFoam.C +++ /dev/null @@ -1,122 +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 . - -Application - MRFInterFoam - -Description - Solver for 2 incompressible, isothermal immiscible fluids using a VOF - (volume of fluid) phase-fraction based interface capturing approach. - The momentum and other fluid properties are of the "mixture" and a single - momentum equation is solved. - - Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. - - For a two-fluid approach see twoPhaseEulerFoam. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "CMULES.H" -#include "subCycle.H" -#include "interfaceProperties.H" -#include "incompressibleTwoPhaseMixture.H" -#include "turbulenceModel.H" -#include "IOMRFZoneList.H" -#include "pimpleControl.H" -#include "fvIOoptionList.H" -#include "fixedFluxPressureFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "setRootCase.H" - #include "createTime.H" - #include "createMesh.H" - #include "initContinuityErrs.H" - #include "createFields.H" - #include "createMRFZones.H" - #include "readTimeControls.H" - - pimpleControl pimple(mesh); - - #include "createPrghCorrTypes.H" - #include "correctPhi.H" - #include "CourantNo.H" - #include "setInitialDeltaT.H" - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { - #include "readTimeControls.H" - #include "CourantNo.H" - #include "alphaCourantNo.H" - #include "setDeltaT.H" - - runTime++; - - Info<< "Time = " << runTime.timeName() << nl << endl; - - // --- Pressure-velocity PIMPLE corrector loop - while (pimple.loop()) - { - #include "alphaControls.H" - - twoPhaseProperties.correct(); - - #include "alphaEqnSubCycle.H" - interface.correct(); - #include "zonePhaseVolumes.H" - - #include "UEqn.H" - - // --- Pressure corrector loop - while (pimple.correct()) - { - #include "pEqn.H" - } - - if (pimple.turbCorr()) - { - turbulence->correct(); - } - } - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/files b/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/files deleted file mode 100644 index 9610e63e..00000000 --- a/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -MRFInterFoam.C - -EXE = $(FOAM_APPBIN)/MRFInterFoam diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/UEqn.H b/applications/solvers/multiphase/interFoam/MRFInterFoam/UEqn.H deleted file mode 100644 index c0a9b615..00000000 --- a/applications/solvers/multiphase/interFoam/MRFInterFoam/UEqn.H +++ /dev/null @@ -1,38 +0,0 @@ - surfaceScalarField muEff - ( - "muEff", - twoPhaseProperties.muf() - + fvc::interpolate(rho*turbulence->nut()) - ); - - fvVectorMatrix UEqn - ( - fvm::ddt(rho, U) - + fvm::div(rhoPhi, U) - - fvm::laplacian(muEff, U) - - (fvc::grad(U) & fvc::grad(muEff)) - //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) - == - fvOptions(rho, U) - ); - - mrfZones.addCoriolis(rho, UEqn); - UEqn.relax(); - fvOptions.constrain(UEqn); - - if (pimple.momentumPredictor()) - { - solve - ( - UEqn - == - fvc::reconstruct - ( - ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - - ghf*fvc::snGrad(rho) - - fvc::snGrad(p_rgh) - ) * mesh.magSf() - ) - ); - } diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/createMRFZones.H b/applications/solvers/multiphase/interFoam/MRFInterFoam/createMRFZones.H deleted file mode 100644 index dba2f7ae..00000000 --- a/applications/solvers/multiphase/interFoam/MRFInterFoam/createMRFZones.H +++ /dev/null @@ -1,2 +0,0 @@ - IOMRFZoneList mrfZones(mesh); - mrfZones.correctBoundaryVelocity(U); diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/pEqn.H b/applications/solvers/multiphase/interFoam/MRFInterFoam/pEqn.H deleted file mode 100644 index 6c315c8e..00000000 --- a/applications/solvers/multiphase/interFoam/MRFInterFoam/pEqn.H +++ /dev/null @@ -1,72 +0,0 @@ -{ - volScalarField rAU("rAU", 1.0/UEqn.A()); - surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU)); - - volVectorField HbyA("HbyA", U); - HbyA = rAU*UEqn.H(); - - surfaceScalarField phiHbyA - ( - "phiHbyA", - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi) - ); - adjustPhi(phiHbyA, U, p_rgh); - mrfZones.makeRelative(phiHbyA); - - surfaceScalarField phig - ( - ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - - ghf*fvc::snGrad(rho) - )*rAUf*mesh.magSf() - ); - - phiHbyA += phig; - - // Update the fixedFluxPressure BCs to ensure flux consistency - setSnGrad - ( - p_rgh.boundaryField(), - ( - phiHbyA.boundaryField() - - mrfZones.relative(mesh.Sf().boundaryField() & U.boundaryField()) - )/(mesh.magSf().boundaryField()*rAUf.boundaryField()) - ); - - while (pimple.correctNonOrthogonal()) - { - fvScalarMatrix p_rghEqn - ( - fvm::laplacian(rAUf, p_rgh) == fvc::div(phiHbyA) - ); - - p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); - - p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter()))); - - if (pimple.finalNonOrthogonalIter()) - { - phi = phiHbyA - p_rghEqn.flux(); - - U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); - U.correctBoundaryConditions(); - fvOptions.correct(U); - } - } - - #include "continuityErrs.H" - - p == p_rgh + rho*gh; - - if (p_rgh.needReference()) - { - p += dimensionedScalar - ( - "p", - p.dimensions(), - pRefValue - getRefCellValue(p, pRefCell) - ); - p_rgh = p - rho*gh; - } -} diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/zonePhaseVolumes.H b/applications/solvers/multiphase/interFoam/MRFInterFoam/zonePhaseVolumes.H deleted file mode 100644 index e0355fe4..00000000 --- a/applications/solvers/multiphase/interFoam/MRFInterFoam/zonePhaseVolumes.H +++ /dev/null @@ -1,21 +0,0 @@ -{ - const scalarField& V = mesh.V(); - - forAll(mesh.cellZones(), czi) - { - const labelList& cellLabels = mesh.cellZones()[czi]; - - scalar phaseVolume = 0; - - forAll(cellLabels, cli) - { - label celli = cellLabels[cli]; - phaseVolume += alpha1[celli]*V[celli]; - } - - reduce(phaseVolume, sumOp()); - - Info<< "Phase volume in zone " << mesh.cellZones()[czi].name() - << " = " << phaseVolume*1e6 << " ml " << endl; - } -} diff --git a/applications/solvers/multiphase/interFoam/Make/options b/applications/solvers/multiphase/interFoam/Make/options index 8811a53d..207a796b 100644 --- a/applications/solvers/multiphase/interFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/Make/options @@ -1,23 +1,21 @@ -EXE_INC = -ggdb3 \ +EXE_INC = \ -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/fvOptions/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ - -ltwoPhaseMixture \ - -linterfaceProperties \ - -ltwoPhaseProperties \ - -lincompressibleTransportModels \ + -limmiscibleIncompressibleTwoPhaseMixture \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ -lincompressibleLESModels \ -lfiniteVolume \ - -lmeshTools \ -lfvOptions \ + -lmeshTools \ -lsampling diff --git a/applications/solvers/multiphase/interFoam/UEqn.H b/applications/solvers/multiphase/interFoam/UEqn.H index 7cc250a6..10bc0fac 100644 --- a/applications/solvers/multiphase/interFoam/UEqn.H +++ b/applications/solvers/multiphase/interFoam/UEqn.H @@ -3,10 +3,14 @@ fvm::ddt(rho, U) + fvm::div(rhoPhi, U) + turbulence->divDevRhoReff(rho, U) + == + fvOptions(rho, U) ); UEqn.relax(); + fvOptions.constrain(UEqn); + if (pimple.momentumPredictor()) { solve @@ -16,10 +20,12 @@ fvc::reconstruct ( ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) + mixture.surfaceTensionForce() - ghf*fvc::snGrad(rho) - fvc::snGrad(p_rgh) ) * mesh.magSf() ) ); + + fvOptions.correct(U); } diff --git a/applications/solvers/multiphase/interFoam/alphaCourantNo.H b/applications/solvers/multiphase/interFoam/alphaCourantNo.H index c1f69ab8..95ad609a 100644 --- a/applications/solvers/multiphase/interFoam/alphaCourantNo.H +++ b/applications/solvers/multiphase/interFoam/alphaCourantNo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -41,7 +41,7 @@ if (mesh.nInternalFaces()) { scalarField sumPhi ( - pos(alpha1 - 0.01)*pos(0.99 - alpha1) + mixture.nearInterface()().internalField() *fvc::surfaceSum(mag(phi))().internalField() ); diff --git a/applications/solvers/multiphase/interFoam/alphaEqn.H b/applications/solvers/multiphase/interFoam/alphaEqn.H index 764d2aee..b25d1251 100644 --- a/applications/solvers/multiphase/interFoam/alphaEqn.H +++ b/applications/solvers/multiphase/interFoam/alphaEqn.H @@ -3,13 +3,13 @@ word alpharScheme("div(phirb,alpha)"); // Standard face-flux compression coefficient - surfaceScalarField phic(interface.cAlpha()*mag(phi/mesh.magSf())); + surfaceScalarField phic(mixture.cAlpha()*mag(phi/mesh.magSf())); // Add the optional isotropic compression contribution if (icAlpha > 0) { phic *= (1.0 - icAlpha); - phic += (interface.cAlpha()*icAlpha)*fvc::interpolate(mag(U)); + phic += (mixture.cAlpha()*icAlpha)*fvc::interpolate(mag(U)); } // Do not compress interface at non-coupled boundary faces @@ -74,12 +74,12 @@ alpha2 = 1.0 - alpha1; - interface.correct(); + mixture.correct(); } for (int aCorr=0; aCorr tphiAlphaUn ( @@ -132,7 +132,7 @@ alpha2 = 1.0 - alpha1; - interface.correct(); + mixture.correct(); } rhoPhi = tphiAlpha()*(rho1 - rho2) + phi*rho2; diff --git a/applications/solvers/multiphase/interFoam/createFields.H b/applications/solvers/multiphase/interFoam/createFields.H index 1c91f280..a87673b0 100644 --- a/applications/solvers/multiphase/interFoam/createFields.H +++ b/applications/solvers/multiphase/interFoam/createFields.H @@ -30,13 +30,13 @@ Info<< "Reading transportProperties\n" << endl; - incompressibleTwoPhaseMixture twoPhaseProperties(U, phi); + immiscibleIncompressibleTwoPhaseMixture mixture(U, phi); - volScalarField& alpha1(twoPhaseProperties.alpha1()); - volScalarField& alpha2(twoPhaseProperties.alpha2()); + volScalarField& alpha1(mixture.alpha1()); + volScalarField& alpha2(mixture.alpha2()); - const dimensionedScalar& rho1 = twoPhaseProperties.rho1(); - const dimensionedScalar& rho2 = twoPhaseProperties.rho2(); + const dimensionedScalar& rho1 = mixture.rho1(); + const dimensionedScalar& rho2 = mixture.rho2(); // Need to store rho for ddt(rho, U) @@ -70,14 +70,10 @@ ); - // Construct interface from alpha1 distribution - interfaceProperties interface(alpha1, U, twoPhaseProperties); - - // Construct incompressible turbulence model autoPtr turbulence ( - incompressible::turbulenceModel::New(U, phi, twoPhaseProperties) + incompressible::turbulenceModel::New(U, phi, mixture) ); #include "readGravitationalAcceleration.H" @@ -131,7 +127,9 @@ p_rgh = p - rho*gh; } + fv::IOoptionList fvOptions(mesh); + // MULES Correction tmp tphiAlphaCorr0; diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options b/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options index 2a5429f7..b9638e61 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options @@ -5,6 +5,7 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ @@ -13,10 +14,7 @@ EXE_INC = \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ - -ltwoPhaseMixture \ - -linterfaceProperties \ - -ltwoPhaseProperties \ - -lincompressibleTransportModels \ + -limmiscibleIncompressibleTwoPhaseMixture \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ -lincompressibleLESModels \ diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C b/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C index 32ee5aee..58d74a62 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C @@ -36,8 +36,7 @@ Description #include "dynamicFvMesh.H" #include "CMULES.H" #include "subCycle.H" -#include "interfaceProperties.H" -#include "incompressibleTwoPhaseMixture.H" +#include "immiscibleIncompressibleTwoPhaseMixture.H" #include "turbulenceModel.H" #include "pimpleControl.H" #include "fvIOoptionList.H" @@ -121,7 +120,7 @@ int main(int argc, char *argv[]) // Make the flux relative to the mesh motion fvc::makeRelative(phi, U); - interface.correct(); + mixture.correct(); } if (mesh.changing() && checkMeshCourantNo) @@ -131,11 +130,9 @@ int main(int argc, char *argv[]) } #include "alphaControls.H" - - twoPhaseProperties.correct(); - #include "alphaEqnSubCycle.H" - interface.correct(); + + mixture.correct(); #include "UEqn.H" diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H b/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H index ec99a638..2ef484b1 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H @@ -22,7 +22,7 @@ surfaceScalarField phig ( ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) + mixture.surfaceTensionForce() - ghf*fvc::snGrad(rho) )*rAUf*mesh.magSf() ); diff --git a/applications/solvers/multiphase/interFoam/interFoam.C b/applications/solvers/multiphase/interFoam/interFoam.C index 8c59d0f9..6b6168bf 100644 --- a/applications/solvers/multiphase/interFoam/interFoam.C +++ b/applications/solvers/multiphase/interFoam/interFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,8 +40,7 @@ Description #include "fvCFD.H" #include "CMULES.H" #include "subCycle.H" -#include "interfaceProperties.H" -#include "incompressibleTwoPhaseMixture.H" +#include "immiscibleIncompressibleTwoPhaseMixture.H" #include "turbulenceModel.H" #include "pimpleControl.H" #include "fvIOoptionList.H" @@ -84,11 +83,9 @@ int main(int argc, char *argv[]) while (pimple.loop()) { #include "alphaControls.H" - - twoPhaseProperties.correct(); - #include "alphaEqnSubCycle.H" - interface.correct(); + + mixture.correct(); #include "UEqn.H" diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/Make/files b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/files index f179f427..92e2916a 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/Make/files +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/files @@ -1,5 +1,6 @@ -incompressibleThreePhaseMixture/threePhaseMixture.C +incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C threePhaseInterfaceProperties/threePhaseInterfaceProperties.C +immiscibleIncompressibleThreePhaseMixture/immiscibleIncompressibleThreePhaseMixture.C interMixingFoam.C EXE = $(FOAM_APPBIN)/interMixingFoam diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options index cc09aeb2..43456c90 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options @@ -1,6 +1,7 @@ EXE_INC = \ -I.. \ -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ + -IimmiscibleIncompressibleThreePhaseMixture \ -IincompressibleThreePhaseMixture \ -IthreePhaseInterfaceProperties \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/alphaCourantNo.H b/applications/solvers/multiphase/interFoam/interMixingFoam/alphaCourantNo.H deleted file mode 100644 index 06e1da1a..00000000 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/alphaCourantNo.H +++ /dev/null @@ -1,60 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 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 . - -Global - CourantNo - -Description - Calculates and outputs the mean and maximum Courant Numbers. - -\*---------------------------------------------------------------------------*/ - -scalar maxAlphaCo -( - readScalar(runTime.controlDict().lookup("maxAlphaCo")) -); - -scalar alphaCoNum = 0.0; -scalar meanAlphaCoNum = 0.0; - -if (mesh.nInternalFaces()) -{ - scalarField sumPhi - ( - max - ( - pos(alpha1 - 0.01)*pos(0.99 - alpha1), - pos(alpha2 - 0.01)*pos(0.99 - alpha2) - )*fvc::surfaceSum(mag(phi))().internalField() - ); - - alphaCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue(); - - meanAlphaCoNum = - 0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue(); -} - -Info<< "Interface Courant Number mean: " << meanAlphaCoNum - << " max: " << alphaCoNum << endl; - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqns.H b/applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqns.H index 970da9fc..a3278090 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqns.H +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqns.H @@ -12,7 +12,7 @@ IOobject::NO_READ, IOobject::NO_WRITE ), - interface.cAlpha()*mag(phi/mesh.magSf())*interface.nHatf() + mixture.cAlpha()*mag(phi/mesh.magSf())*mixture.nHatf() ); for (int gCorr=0; gCorr turbulence ( - incompressible::turbulenceModel::New(U, phi, threePhaseProperties) + incompressible::turbulenceModel::New(U, phi, mixture) ); diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/immiscibleIncompressibleThreePhaseMixture/immiscibleIncompressibleThreePhaseMixture.C b/applications/solvers/multiphase/interFoam/interMixingFoam/immiscibleIncompressibleThreePhaseMixture/immiscibleIncompressibleThreePhaseMixture.C new file mode 100644 index 00000000..2dcc2a09 --- /dev/null +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/immiscibleIncompressibleThreePhaseMixture/immiscibleIncompressibleThreePhaseMixture.C @@ -0,0 +1,46 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +\*---------------------------------------------------------------------------*/ + +#include "immiscibleIncompressibleThreePhaseMixture.H" + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::immiscibleIncompressibleThreePhaseMixture:: +immiscibleIncompressibleThreePhaseMixture +( + const volVectorField& U, + const surfaceScalarField& phi +) +: + incompressibleThreePhaseMixture(U, phi), + threePhaseInterfaceProperties + ( + static_cast(*this) + ) +{} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/immiscibleIncompressibleThreePhaseMixture/immiscibleIncompressibleThreePhaseMixture.H b/applications/solvers/multiphase/interFoam/interMixingFoam/immiscibleIncompressibleThreePhaseMixture/immiscibleIncompressibleThreePhaseMixture.H new file mode 100644 index 00000000..43352753 --- /dev/null +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/immiscibleIncompressibleThreePhaseMixture/immiscibleIncompressibleThreePhaseMixture.H @@ -0,0 +1,92 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +Class + Foam::immiscibleIncompressibleThreePhaseMixture + +Description + An immiscible incompressible two-phase mixture transport model + +SourceFiles + immiscibleIncompressibleThreePhaseMixture.C + +\*---------------------------------------------------------------------------*/ + +#ifndef immiscibleIncompressibleThreePhaseMixture_H +#define immiscibleIncompressibleThreePhaseMixture_H + +#include "incompressibleThreePhaseMixture.H" +#include "threePhaseInterfaceProperties.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class immiscibleIncompressibleThreePhaseMixture Declaration +\*---------------------------------------------------------------------------*/ + +class immiscibleIncompressibleThreePhaseMixture +: + public incompressibleThreePhaseMixture, + public threePhaseInterfaceProperties +{ + +public: + + // Constructors + + //- Construct from components + immiscibleIncompressibleThreePhaseMixture + ( + const volVectorField& U, + const surfaceScalarField& phi + ); + + + //- Destructor + virtual ~immiscibleIncompressibleThreePhaseMixture() + {} + + + // Member Functions + + //- Correct the transport and interface properties + virtual void correct() + { + incompressibleThreePhaseMixture::correct(); + threePhaseInterfaceProperties::correct(); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.C b/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C similarity index 91% rename from applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.C rename to applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C index 50494062..0894f3c6 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "threePhaseMixture.H" +#include "incompressibleThreePhaseMixture.H" #include "addToRunTimeSelectionTable.H" #include "surfaceFields.H" #include "fvc.H" @@ -31,7 +31,7 @@ License // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // //- Calculate and return the laminar viscosity -void Foam::threePhaseMixture::calcNu() +void Foam::incompressibleThreePhaseMixture::calcNu() { nuModel1_->correct(); nuModel2_->correct(); @@ -44,7 +44,7 @@ void Foam::threePhaseMixture::calcNu() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::threePhaseMixture::threePhaseMixture +Foam::incompressibleThreePhaseMixture::incompressibleThreePhaseMixture ( const volVectorField& U, const surfaceScalarField& phi @@ -163,7 +163,8 @@ Foam::threePhaseMixture::threePhaseMixture // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -Foam::tmp Foam::threePhaseMixture::mu() const +Foam::tmp +Foam::incompressibleThreePhaseMixture::mu() const { return tmp ( @@ -178,7 +179,8 @@ Foam::tmp Foam::threePhaseMixture::mu() const } -Foam::tmp Foam::threePhaseMixture::muf() const +Foam::tmp +Foam::incompressibleThreePhaseMixture::muf() const { surfaceScalarField alpha1f(fvc::interpolate(alpha1_)); surfaceScalarField alpha2f(fvc::interpolate(alpha2_)); @@ -197,7 +199,8 @@ Foam::tmp Foam::threePhaseMixture::muf() const } -Foam::tmp Foam::threePhaseMixture::nuf() const +Foam::tmp +Foam::incompressibleThreePhaseMixture::nuf() const { surfaceScalarField alpha1f(fvc::interpolate(alpha1_)); surfaceScalarField alpha2f(fvc::interpolate(alpha2_)); @@ -218,7 +221,7 @@ Foam::tmp Foam::threePhaseMixture::nuf() const } -bool Foam::threePhaseMixture::read() +bool Foam::incompressibleThreePhaseMixture::read() { if (transportModel::read()) { diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.H b/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.H similarity index 93% rename from applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.H rename to applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.H index 16337521..766e0621 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.H +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,17 +22,17 @@ License along with OpenFOAM. If not, see . Class - threePhaseMixture + incompressibleThreePhaseMixture Description SourceFiles - threePhaseMixture.C + incompressibleThreePhaseMixture.C \*---------------------------------------------------------------------------*/ -#ifndef threePhaseMixture_H -#define threePhaseMixture_H +#ifndef incompressibleThreePhaseMixture_H +#define incompressibleThreePhaseMixture_H #include "incompressible/transportModel/transportModel.H" #include "IOdictionary.H" @@ -46,10 +46,10 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class threePhaseMixture Declaration + Class incompressibleThreePhaseMixture Declaration \*---------------------------------------------------------------------------*/ -class threePhaseMixture +class incompressibleThreePhaseMixture : public IOdictionary, public transportModel @@ -89,7 +89,7 @@ public: // Constructors //- Construct from components - threePhaseMixture + incompressibleThreePhaseMixture ( const volVectorField& U, const surfaceScalarField& phi @@ -97,7 +97,7 @@ public: //- Destructor - ~threePhaseMixture() + ~incompressibleThreePhaseMixture() {} diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C b/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C index edeab9ac..09cb7f1c 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C @@ -33,8 +33,7 @@ Description #include "fvCFD.H" #include "CMULES.H" #include "subCycle.H" -#include "threePhaseMixture.H" -#include "threePhaseInterfaceProperties.H" +#include "immiscibleIncompressibleThreePhaseMixture.H" #include "turbulenceModel.H" #include "pimpleControl.H" #include "fvIOoptionList.H" @@ -78,13 +77,9 @@ int main(int argc, char *argv[]) while (pimple.loop()) { #include "alphaControls.H" - - threePhaseProperties.correct(); - #include "alphaEqnsSubCycle.H" - interface.correct(); - #define twoPhaseProperties threePhaseProperties + mixture.correct(); #include "UEqn.H" diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C b/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C index f812b472..486e4429 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,6 +37,7 @@ Description #include "surfaceInterpolate.H" #include "fvcDiv.H" #include "fvcGrad.H" +#include "fvcSnGrad.H" // * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * // @@ -166,7 +167,7 @@ void Foam::threePhaseInterfaceProperties::calculateK() Foam::threePhaseInterfaceProperties::threePhaseInterfaceProperties ( - const threePhaseMixture& mixture + const incompressibleThreePhaseMixture& mixture ) : mixture_(mixture), @@ -212,4 +213,25 @@ Foam::threePhaseInterfaceProperties::threePhaseInterfaceProperties } +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +Foam::tmp +Foam::threePhaseInterfaceProperties::surfaceTensionForce() const +{ + return fvc::interpolate(sigmaK())*fvc::snGrad(mixture_.alpha1()); +} + + +Foam::tmp +Foam::threePhaseInterfaceProperties::nearInterface() const +{ + return max + ( + pos(mixture_.alpha1() - 0.01)*pos(0.99 - mixture_.alpha1()), + pos(mixture_.alpha2() - 0.01)*pos(0.99 - mixture_.alpha2()) + ); +} + + + // ************************************************************************* // diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.H b/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.H index 0653ab0a..266bedb4 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.H +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,7 @@ SourceFiles #ifndef threePhaseInterfaceProperties_H #define threePhaseInterfaceProperties_H -#include "threePhaseMixture.H" +#include "incompressibleThreePhaseMixture.H" #include "surfaceFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -53,7 +53,7 @@ class threePhaseInterfaceProperties { // Private data - const threePhaseMixture& mixture_; + const incompressibleThreePhaseMixture& mixture_; //- Compression coefficient scalar cAlpha_; @@ -98,7 +98,10 @@ public: // Constructors //- Construct from volume fraction field alpha and IOdictionary - threePhaseInterfaceProperties(const threePhaseMixture& mixture); + threePhaseInterfaceProperties + ( + const incompressibleThreePhaseMixture& mixture + ); // Member Functions @@ -138,6 +141,12 @@ public: return sigma()*K_; } + tmp surfaceTensionForce() const; + + //- Indicator of the proximity of the interface + // Field values are 1 near and 0 away for the interface. + tmp nearInterface() const; + void correct() { calculateK(); diff --git a/applications/solvers/multiphase/interFoam/pEqn.H b/applications/solvers/multiphase/interFoam/pEqn.H index 227c075f..81a0391d 100644 --- a/applications/solvers/multiphase/interFoam/pEqn.H +++ b/applications/solvers/multiphase/interFoam/pEqn.H @@ -11,13 +11,13 @@ (fvc::interpolate(HbyA) & mesh.Sf()) + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi) ); - adjustPhi(phiHbyA, U, p_rgh); + fvOptions.makeRelative(phiHbyA); surfaceScalarField phig ( ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) + mixture.surfaceTensionForce() - ghf*fvc::snGrad(rho) )*rAUf*mesh.magSf() ); @@ -30,7 +30,7 @@ p_rgh.boundaryField(), ( phiHbyA.boundaryField() - - (mesh.Sf().boundaryField() & U.boundaryField()) + - fvOptions.relative(mesh.Sf().boundaryField() & U.boundaryField()) )/(mesh.magSf().boundaryField()*rAUf.boundaryField()) ); diff --git a/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options b/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options index db2e1736..fffa41da 100644 --- a/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options @@ -4,6 +4,7 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ + -I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ @@ -11,9 +12,7 @@ EXE_INC = \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ - -ltwoPhaseMixture \ - -linterfaceProperties \ - -ltwoPhaseProperties \ + -limmiscibleIncompressibleTwoPhaseMixture \ -lincompressibleTransportModels \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ diff --git a/applications/solvers/multiphase/interFoam/porousInterFoam/UEqn.H b/applications/solvers/multiphase/interFoam/porousInterFoam/UEqn.H index f8dcecf6..e175dcb9 100644 --- a/applications/solvers/multiphase/interFoam/porousInterFoam/UEqn.H +++ b/applications/solvers/multiphase/interFoam/porousInterFoam/UEqn.H @@ -1,12 +1,12 @@ surfaceScalarField muEff ( "muEff", - twoPhaseProperties.muf() + mixture.muf() + fvc::interpolate(rho*turbulence->nut()) ); // Calculate and cache mu for the porous media - volScalarField mu(twoPhaseProperties.mu()); + volScalarField mu(mixture.mu()); fvVectorMatrix UEqn ( @@ -33,7 +33,7 @@ fvc::reconstruct ( ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) + mixture.surfaceTensionForce() - ghf*fvc::snGrad(rho) - fvc::snGrad(p_rgh) ) * mesh.magSf() diff --git a/applications/solvers/multiphase/interFoam/porousInterFoam/porousInterFoam.C b/applications/solvers/multiphase/interFoam/porousInterFoam/porousInterFoam.C index c3018878..c17847bd 100644 --- a/applications/solvers/multiphase/interFoam/porousInterFoam/porousInterFoam.C +++ b/applications/solvers/multiphase/interFoam/porousInterFoam/porousInterFoam.C @@ -41,8 +41,7 @@ Description #include "fvCFD.H" #include "CMULES.H" #include "subCycle.H" -#include "interfaceProperties.H" -#include "incompressibleTwoPhaseMixture.H" +#include "immiscibleIncompressibleTwoPhaseMixture.H" #include "turbulenceModel.H" #include "IOporosityModelList.H" #include "pimpleControl.H" @@ -87,11 +86,9 @@ int main(int argc, char *argv[]) while (pimple.loop()) { #include "alphaControls.H" - - twoPhaseProperties.correct(); - #include "alphaEqnSubCycle.H" - interface.correct(); + + mixture.correct(); #include "UEqn.H" diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H index 062c5523..1e275972 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H @@ -17,7 +17,7 @@ fvc::reconstruct ( ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) + interface.surfaceTensionForce() - ghf*fvc::snGrad(rho) - fvc::snGrad(p_rgh) ) * mesh.magSf() diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqn.H index 1172cf07..5d915ecc 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqn.H @@ -5,7 +5,7 @@ surfaceScalarField phir("phir", phic*interface.nHatf()); Pair > vDotAlphal = - twoPhaseProperties->vDotAlphal(); + mixture->vDotAlphal(); const volScalarField& vDotcAlphal = vDotAlphal[0](); const volScalarField& vDotvAlphal = vDotAlphal[1](); const volScalarField vDotvmcAlphal(vDotvAlphal - vDotcAlphal); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H b/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H index 0e45fa49..79fc0a14 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H @@ -30,15 +30,15 @@ Info<< "Creating phaseChangeTwoPhaseMixture\n" << endl; - autoPtr twoPhaseProperties = + autoPtr mixture = phaseChangeTwoPhaseMixture::New(U, phi); - volScalarField& alpha1(twoPhaseProperties->alpha1()); - volScalarField& alpha2(twoPhaseProperties->alpha2()); + volScalarField& alpha1(mixture->alpha1()); + volScalarField& alpha2(mixture->alpha2()); - const dimensionedScalar& rho1 = twoPhaseProperties->rho1(); - const dimensionedScalar& rho2 = twoPhaseProperties->rho2(); - const dimensionedScalar& pSat = twoPhaseProperties->pSat(); + const dimensionedScalar& rho1 = mixture->rho1(); + const dimensionedScalar& rho2 = mixture->rho2(); + const dimensionedScalar& pSat = mixture->pSat(); // Need to store rho for ddt(rho, U) @@ -58,12 +58,12 @@ // Construct interface from alpha1 distribution - interfaceProperties interface(alpha1, U, twoPhaseProperties()); + interfaceProperties interface(alpha1, U, mixture()); // Construct incompressible turbulence model autoPtr turbulence ( - incompressible::turbulenceModel::New(U, phi, twoPhaseProperties()) + incompressible::turbulenceModel::New(U, phi, mixture()) ); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C index 86b19912..e336e4a0 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C @@ -154,7 +154,7 @@ int main(int argc, char *argv[]) dimensionedScalar("0", dimMass/dimTime, 0) ); - twoPhaseProperties->correct(); + mixture->correct(); #include "alphaEqnSubCycle.H" interface.correct(); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H index 5915b680..b759081e 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H @@ -22,7 +22,7 @@ surfaceScalarField phig ( ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) + interface.surfaceTensionForce() - ghf*fvc::snGrad(rho) )*rAUf*mesh.magSf() ); @@ -39,7 +39,7 @@ )/(mesh.magSf().boundaryField()*rAUf.boundaryField()) ); - Pair > vDotP = twoPhaseProperties->vDotP(); + Pair > vDotP = mixture->vDotP(); const volScalarField& vDotcP = vDotP[0](); const volScalarField& vDotvP = vDotP[1](); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C index bea114da..3296d0f0 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C @@ -100,7 +100,7 @@ int main(int argc, char *argv[]) dimensionedScalar("0", dimMass/dimTime, 0) ); - twoPhaseProperties->correct(); + mixture->correct(); #include "alphaEqnSubCycle.H" interface.correct(); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H index 6714fce9..4a174eb9 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H @@ -16,7 +16,7 @@ surfaceScalarField phig ( ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) + interface.surfaceTensionForce() - ghf*fvc::snGrad(rho) )*rAUf*mesh.magSf() ); @@ -33,7 +33,7 @@ )/(mesh.magSf().boundaryField()*rAUf.boundaryField()) ); - Pair > vDotP = twoPhaseProperties->vDotP(); + Pair > vDotP = mixture->vDotP(); const volScalarField& vDotcP = vDotP[0](); const volScalarField& vDotvP = vDotP[1](); diff --git a/applications/solvers/multiphase/multiphaseInterFoam/Allwclean b/applications/solvers/multiphase/multiphaseInterFoam/Allwclean index 6f55580c..7edca3f5 100755 --- a/applications/solvers/multiphase/multiphaseInterFoam/Allwclean +++ b/applications/solvers/multiphase/multiphaseInterFoam/Allwclean @@ -2,7 +2,8 @@ cd ${0%/*} || exit 1 # run from this directory set -x +wclean libso multiphaseMixture wclean -wclean MRFMultiphaseInterFoam +wclean multiphaseInterDyMFoam # ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/multiphase/multiphaseInterFoam/Allwmake b/applications/solvers/multiphase/multiphaseInterFoam/Allwmake index 6e47f91d..2a03ac9b 100755 --- a/applications/solvers/multiphase/multiphaseInterFoam/Allwmake +++ b/applications/solvers/multiphase/multiphaseInterFoam/Allwmake @@ -4,6 +4,6 @@ set -x wmake libso multiphaseMixture wmake -wmake MRFMultiphaseInterFoam +wmake multiphaseInterDyMFoam # ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/Make/files b/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/Make/files deleted file mode 100644 index c4ed7d3f..00000000 --- a/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -MRFMultiphaseInterFoam.C - -EXE = $(FOAM_APPBIN)/MRFMultiphaseInterFoam diff --git a/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/Make/options b/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/Make/options deleted file mode 100644 index 11e9aee8..00000000 --- a/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/Make/options +++ /dev/null @@ -1,19 +0,0 @@ -EXE_INC = \ - -I.. \ - -I../../interFoam \ - -I../../interFoam/MRFInterFoam \ - -I../multiphaseMixture/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ - -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -EXE_LIBS = \ - -lmultiphaseInterFoam \ - -linterfaceProperties \ - -lincompressibleTransportModels \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ - -lfiniteVolume diff --git a/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/UEqn.H b/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/UEqn.H deleted file mode 100644 index 3b860b97..00000000 --- a/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/UEqn.H +++ /dev/null @@ -1,35 +0,0 @@ - surfaceScalarField muEff - ( - "muEff", - mixture.muf() - + fvc::interpolate(rho*turbulence->nut()) - ); - - fvVectorMatrix UEqn - ( - fvm::ddt(rho, U) - + fvm::div(mixture.rhoPhi(), U) - - fvm::laplacian(muEff, U) - - (fvc::grad(U) & fvc::grad(muEff)) - //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) - ); - mrfZones.addCoriolis(rho, UEqn); - - UEqn.relax(); - - if (pimple.momentumPredictor()) - { - solve - ( - UEqn - == - fvc::reconstruct - ( - ( - mixture.surfaceTensionForce() - - ghf*fvc::snGrad(rho) - - fvc::snGrad(p_rgh) - ) * mesh.magSf() - ) - ); - } diff --git a/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/pEqn.H b/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/pEqn.H deleted file mode 100644 index 12862266..00000000 --- a/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/pEqn.H +++ /dev/null @@ -1,68 +0,0 @@ -{ - volScalarField rAU("rAU", 1.0/UEqn.A()); - surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU)); - - volVectorField HbyA("HbyA", U); - HbyA = rAU*UEqn.H(); - - surfaceScalarField phiHbyA - ( - "phiHbyA", - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi) - ); - adjustPhi(phiHbyA, U, p_rgh); - mrfZones.makeRelative(phiHbyA); - - surfaceScalarField phig - ( - - ghf*fvc::snGrad(rho)*rAUf*mesh.magSf() - ); - - phiHbyA += phig; - - // Update the fixedFluxPressure BCs to ensure flux consistency - setSnGrad - ( - p_rgh.boundaryField(), - ( - phiHbyA.boundaryField() - - mrfZones.relative(mesh.Sf().boundaryField() & U.boundaryField()) - )/(mesh.magSf().boundaryField()*rAUf.boundaryField()) - ); - - while (pimple.correctNonOrthogonal()) - { - fvScalarMatrix p_rghEqn - ( - fvm::laplacian(rAUf, p_rgh) == fvc::div(phiHbyA) - ); - - p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); - - p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter()))); - - if (pimple.finalNonOrthogonalIter()) - { - phi = phiHbyA - p_rghEqn.flux(); - - U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); - U.correctBoundaryConditions(); - } - } - - #include "continuityErrs.H" - - p == p_rgh + rho*gh; - - if (p_rgh.needReference()) - { - p += dimensionedScalar - ( - "p", - p.dimensions(), - pRefValue - getRefCellValue(p, pRefCell) - ); - p_rgh = p - rho*gh; - } -} diff --git a/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/zonePhaseVolumes.H b/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/zonePhaseVolumes.H deleted file mode 100644 index 0c5d1221..00000000 --- a/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/zonePhaseVolumes.H +++ /dev/null @@ -1,26 +0,0 @@ -{ - const scalarField& V = mesh.V(); - - forAll(mesh.cellZones(), czi) - { - const labelList& cellLabels = mesh.cellZones()[czi]; - - forAllConstIter(PtrDictionary, mixture.phases(), iter) - { - const volScalarField& alpha = iter(); - scalar phaseVolume = 0; - - forAll(cellLabels, cli) - { - label celli = cellLabels[cli]; - phaseVolume += alpha[celli]*V[celli]; - } - - reduce(phaseVolume, sumOp()); - - Info<< alpha.name() - << " phase volume in zone " << mesh.cellZones()[czi].name() - << " = " << phaseVolume*1e6 << " ml " << endl; - } - } -} diff --git a/applications/solvers/multiphase/multiphaseInterFoam/Make/options b/applications/solvers/multiphase/multiphaseInterFoam/Make/options index 022293a5..27f633d6 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/Make/options +++ b/applications/solvers/multiphase/multiphaseInterFoam/Make/options @@ -5,7 +5,10 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ - -I$(LIB_SRC)/finiteVolume/lnInclude + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ -lmultiphaseInterFoam \ @@ -14,4 +17,7 @@ EXE_LIBS = \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ -lincompressibleLESModels \ - -lfiniteVolume + -lfiniteVolume \ + -lfvOptions \ + -lmeshTools \ + -lsampling diff --git a/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H b/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H deleted file mode 100644 index fbcba7db..00000000 --- a/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H +++ /dev/null @@ -1,25 +0,0 @@ - fvVectorMatrix UEqn - ( - fvm::ddt(rho, U) - + fvm::div(mixture.rhoPhi(), U) - + turbulence->divDevRhoReff(rho, U) - ); - - UEqn.relax(); - - if (pimple.momentumPredictor()) - { - solve - ( - UEqn - == - fvc::reconstruct - ( - ( - mixture.surfaceTensionForce() - - ghf*fvc::snGrad(rho) - - fvc::snGrad(p_rgh) - ) * mesh.magSf() - ) - ); - } diff --git a/applications/solvers/multiphase/multiphaseInterFoam/createFields.H b/applications/solvers/multiphase/multiphaseInterFoam/createFields.H index 78fa0ec3..a3550dbd 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/createFields.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/createFields.H @@ -44,6 +44,7 @@ ); rho.oldTime(); + const surfaceScalarField& rhoPhi(mixture.rhoPhi()); // Construct incompressible turbulence model autoPtr turbulence @@ -90,3 +91,5 @@ pRefValue - getRefCellValue(p, pRefCell) ); } + + fv::IOoptionList fvOptions(mesh); diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/Make/files b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/Make/files new file mode 100644 index 00000000..3fb8d024 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/Make/files @@ -0,0 +1,3 @@ +multiphaseInterDyMFoam.C + +EXE = $(FOAM_APPBIN)/multiphaseInterDyMFoam diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/Make/options similarity index 70% rename from applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options rename to applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/Make/options index db2e1736..83653482 100644 --- a/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/Make/options @@ -1,24 +1,30 @@ EXE_INC = \ -I.. \ - -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ + -I../../interFoam/interDyMFoam \ + -I../../interFoam \ + -I../multiphaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/dynamicMesh/lnInclude \ + -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/fvOptions/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ - -ltwoPhaseMixture \ + -lmultiphaseInterFoam \ -linterfaceProperties \ - -ltwoPhaseProperties \ -lincompressibleTransportModels \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ -lincompressibleLESModels \ -lfiniteVolume \ - -lmeshTools \ + -ldynamicMesh \ + -ldynamicFvMesh \ + -ltopoChangerFvMesh \ -lfvOptions \ + -lmeshTools \ -lsampling diff --git a/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/MRFMultiphaseInterFoam.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C similarity index 63% rename from applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/MRFMultiphaseInterFoam.C rename to applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C index 8c73d798..acfa7eb3 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/MRFMultiphaseInterFoam/MRFMultiphaseInterFoam.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Application - MRFMultiphaseInterFoam + multiphaseInterFoam Description Solver for n incompressible fluids which captures the interfaces and @@ -33,10 +33,11 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "dynamicFvMesh.H" #include "multiphaseMixture.H" #include "turbulenceModel.H" -#include "IOMRFZoneList.H" #include "pimpleControl.H" +#include "fvIOoptionList.H" #include "fixedFluxPressureFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -45,16 +46,31 @@ int main(int argc, char *argv[]) { #include "setRootCase.H" #include "createTime.H" - #include "createMesh.H" + #include "createDynamicFvMesh.H" + #include "initContinuityErrs.H" pimpleControl pimple(mesh); - #include "initContinuityErrs.H" #include "createFields.H" - #include "createMRFZones.H" #include "readTimeControls.H" #include "createPrghCorrTypes.H" + + volScalarField rAU + ( + IOobject + ( + "rAU", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("rAUf", dimTime/rho.dimensions(), 1.0) + ); + #include "correctPhi.H" + #include "createUf.H" #include "CourantNo.H" #include "setInitialDeltaT.H" @@ -64,22 +80,57 @@ int main(int argc, char *argv[]) while (runTime.run()) { - #include "readTimeControls.H" + #include "readControls.H" #include "CourantNo.H" #include "alphaCourantNo.H" + #include "setDeltaT.H" runTime++; Info<< "Time = " << runTime.timeName() << nl << endl; - mixture.solve(); - rho = mixture.rho(); - #include "zonePhaseVolumes.H" - // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { + if (pimple.firstIter() || moveMeshOuterCorrectors) + { + scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime(); + + mesh.update(); + + if (mesh.changing()) + { + Info<< "Execution time for mesh.update() = " + << runTime.elapsedCpuTime() - timeBeforeMeshUpdate + << " s" << endl; + + gh = g & mesh.C(); + ghf = g & mesh.Cf(); + } + + if (mesh.changing() && correctPhi) + { + // Calculate absolute flux from the mapped surface velocity + phi = mesh.Sf() & Uf; + + #include "correctPhi.H" + + // Make the flux relative to the mesh motion + fvc::makeRelative(phi, U); + + mixture.correct(); + } + + if (mesh.changing() && checkMeshCourantNo) + { + #include "meshCourantNo.H" + } + } + + mixture.solve(); + rho = mixture.rho(); + #include "UEqn.H" // --- Pressure corrector loop diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C index d2c565b9..fdd93eae 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,6 +36,7 @@ Description #include "multiphaseMixture.H" #include "turbulenceModel.H" #include "pimpleControl.H" +#include "fvIOoptionList.H" #include "fixedFluxPressureFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C index b7ba2bc9..9edc7a78 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C @@ -298,10 +298,7 @@ Foam::multiphaseMixture::surfaceTensionForce() const void Foam::multiphaseMixture::solve() { - forAllIter(PtrDictionary, phases_, iter) - { - iter().correct(); - } + correct(); const Time& runTime = mesh_.time(); @@ -347,7 +344,12 @@ void Foam::multiphaseMixture::solve() void Foam::multiphaseMixture::correct() -{} +{ + forAllIter(PtrDictionary, phases_, iter) + { + iter().correct(); + } +} Foam::tmp Foam::multiphaseMixture::nHatfv diff --git a/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H b/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H deleted file mode 100644 index a40c2be9..00000000 --- a/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H +++ /dev/null @@ -1,70 +0,0 @@ -{ - volScalarField rAU("rAU", 1.0/UEqn.A()); - surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU)); - - volVectorField HbyA("HbyA", U); - HbyA = rAU*UEqn.H(); - - surfaceScalarField phiHbyA - ( - "phiHbyA", - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi) - ); - adjustPhi(phiHbyA, U, p_rgh); - - surfaceScalarField phig - ( - ( - mixture.surfaceTensionForce() - - ghf*fvc::snGrad(rho) - )*rAUf*mesh.magSf() - ); - - phiHbyA += phig; - - // Update the fixedFluxPressure BCs to ensure flux consistency - setSnGrad - ( - p_rgh.boundaryField(), - ( - phiHbyA.boundaryField() - - (mesh.Sf().boundaryField() & U.boundaryField()) - )/(mesh.magSf().boundaryField()*rAUf.boundaryField()) - ); - - while (pimple.correctNonOrthogonal()) - { - fvScalarMatrix p_rghEqn - ( - fvm::laplacian(rAUf, p_rgh) == fvc::div(phiHbyA) - ); - - p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); - - p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter()))); - - if (pimple.finalNonOrthogonalIter()) - { - phi = phiHbyA - p_rghEqn.flux(); - - U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); - U.correctBoundaryConditions(); - } - } - - #include "continuityErrs.H" - - p == p_rgh + rho*gh; - - if (p_rgh.needReference()) - { - p += dimensionedScalar - ( - "p", - p.dimensions(), - pRefValue - getRefCellValue(p, pRefCell) - ); - p_rgh = p - rho*gh; - } -} diff --git a/applications/solvers/multiphase/settlingFoam/Make/files b/applications/solvers/multiphase/settlingFoam/Make/files deleted file mode 100644 index 56beda35..00000000 --- a/applications/solvers/multiphase/settlingFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -settlingFoam.C - -EXE = $(FOAM_APPBIN)/settlingFoam diff --git a/applications/solvers/multiphase/settlingFoam/UEqn.H b/applications/solvers/multiphase/settlingFoam/UEqn.H deleted file mode 100644 index ff6323bc..00000000 --- a/applications/solvers/multiphase/settlingFoam/UEqn.H +++ /dev/null @@ -1,32 +0,0 @@ - // Solve the Momentum equation - - fvVectorMatrix UEqn - ( - fvm::ddt(rho, U) - + fvm::div(phi, U) - + fvc::div - ( - (Alpha/(scalar(1.001) - Alpha))*(sqr(rhoc)/rho)*Vdj*Vdj, - "div(phiVdj,Vdj)" - ) - - fvm::laplacian(muEff, U, "laplacian(muEff,U)") - - (fvc::grad(U) & fvc::grad(muEff)) - ); - - UEqn.relax(); - - if (pimple.momentumPredictor()) - { - solve - ( - UEqn - == - fvc::reconstruct - ( - ( - - ghf*fvc::snGrad(rho) - - fvc::snGrad(p_rgh) - )*mesh.magSf() - ) - ); - } diff --git a/applications/solvers/multiphase/settlingFoam/alphaEqn.H b/applications/solvers/multiphase/settlingFoam/alphaEqn.H deleted file mode 100644 index dccf434d..00000000 --- a/applications/solvers/multiphase/settlingFoam/alphaEqn.H +++ /dev/null @@ -1,34 +0,0 @@ -{ - surfaceScalarField phiAlpha - ( - IOobject - ( - "phiAlpha", - runTime.timeName(), - mesh - ), - phi + rhoc*(mesh.Sf() & fvc::interpolate(Vdj)) - ); - - fvScalarMatrix AlphaEqn - ( - fvm::ddt(rho, Alpha) - + fvm::div(phiAlpha, Alpha) - - fvm::laplacian(mut, Alpha) - ); - - AlphaEqn.relax(); - AlphaEqn.solve(); - - Info<< "Solid phase fraction = " - << Alpha.weightedAverage(mesh.V()).value() - << " Min(Alpha) = " << min(Alpha).value() - << " Max(Alpha) = " << max(Alpha).value() - << endl; - - Alpha.min(1.0); - Alpha.max(0.0); - - rho == rhoc/(scalar(1) + (rhoc/rhod - 1.0)*Alpha); - alpha == rho*Alpha/rhod; -} diff --git a/applications/solvers/multiphase/settlingFoam/calcVdj.H b/applications/solvers/multiphase/settlingFoam/calcVdj.H deleted file mode 100644 index a6d9f505..00000000 --- a/applications/solvers/multiphase/settlingFoam/calcVdj.H +++ /dev/null @@ -1,20 +0,0 @@ -if (VdjModel == "general") -{ - Vdj = V0* - ( - exp(-a*max(alpha - alphaMin, scalar(0))) - - exp(-a1*max(alpha - alphaMin, scalar(0))) - ); -} -else if (VdjModel == "simple") -{ - Vdj = V0*pow(10.0, -a*alpha); -} -else -{ - FatalErrorIn(args.executable()) - << "Unknown VdjModel : " << VdjModel - << abort(FatalError); -} - -Vdj.correctBoundaryConditions(); diff --git a/applications/solvers/multiphase/settlingFoam/compressibleContinuityErrs.H b/applications/solvers/multiphase/settlingFoam/compressibleContinuityErrs.H deleted file mode 100644 index 96e37e95..00000000 --- a/applications/solvers/multiphase/settlingFoam/compressibleContinuityErrs.H +++ /dev/null @@ -1,21 +0,0 @@ - scalar sumLocalContErr = - runTime.deltaTValue()* - mag - ( - fvc::ddt(rho) - + fvc::div(phi) - )().weightedAverage(rho*mesh.V()).value(); - - scalar globalContErr = - runTime.deltaTValue()* - ( - fvc::ddt(rho) - + fvc::div(phi) - )().weightedAverage(rho*mesh.V()).value(); - - cumulativeContErr += globalContErr; - - Info<< "time step continuity errors : sum local = " << sumLocalContErr - << ", global = " << globalContErr - << ", cumulative = " << cumulativeContErr - << endl; diff --git a/applications/solvers/multiphase/settlingFoam/correctViscosity.H b/applications/solvers/multiphase/settlingFoam/correctViscosity.H deleted file mode 100644 index 0bf086a4..00000000 --- a/applications/solvers/multiphase/settlingFoam/correctViscosity.H +++ /dev/null @@ -1,39 +0,0 @@ -{ - mul = muc + - plasticViscosity - ( - plasticViscosityCoeff, - plasticViscosityExponent, - alpha - ); - - if (BinghamPlastic) - { - volScalarField tauy = yieldStress - ( - yieldStressCoeff, - yieldStressExponent, - yieldStressOffset, - alpha - ); - - mul = - tauy/ - ( - mag(fvc::grad(U)) - + 1.0e-4* - ( - tauy - + dimensionedScalar - ( - "deltaTauy", - tauy.dimensions(), - 1.0e-15 - ) - )/mul - ) - + mul; - } - - mul = min(mul, muMax); -} diff --git a/applications/solvers/multiphase/settlingFoam/createFields.H b/applications/solvers/multiphase/settlingFoam/createFields.H deleted file mode 100644 index 9a9fdee2..00000000 --- a/applications/solvers/multiphase/settlingFoam/createFields.H +++ /dev/null @@ -1,383 +0,0 @@ - Info<< "Reading field p_rgh\n" << endl; - volScalarField p_rgh - ( - IOobject - ( - "p_rgh", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - Info<< "Reading field Alpha\n" << endl; - volScalarField Alpha - ( - IOobject - ( - "Alpha", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - Info<< "Reading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - - Info<< "Reading transportProperties\n" << endl; - - IOdictionary transportProperties - ( - IOobject - ( - "transportProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) - ); - - - dimensionedScalar rhoc(transportProperties.lookup("rhoc")); - - dimensionedScalar rhod(transportProperties.lookup("rhod")); - - dimensionedScalar muc(transportProperties.lookup("muc")); - dimensionedScalar muMax(transportProperties.lookup("muMax")); - - dimensionedScalar plasticViscosityCoeff - ( - transportProperties.lookup("plasticViscosityCoeff") - ); - - dimensionedScalar plasticViscosityExponent - ( - transportProperties.lookup("plasticViscosityExponent") - ); - - dimensionedScalar yieldStressCoeff - ( - transportProperties.lookup("yieldStressCoeff") - ); - - dimensionedScalar yieldStressExponent - ( - transportProperties.lookup("yieldStressExponent") - ); - - dimensionedScalar yieldStressOffset - ( - transportProperties.lookup("yieldStressOffset") - ); - - Switch BinghamPlastic(transportProperties.lookup("BinghamPlastic")); - - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - rhoc/(scalar(1) + (rhoc/rhod - 1.0)*Alpha) - ); - - volScalarField alpha - ( - IOobject - ( - "alpha", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - rho*Alpha/rhod - ); - - #include "compressibleCreatePhi.H" - - - Info<< "Calculating field mul\n" << endl; - volScalarField mul - ( - IOobject - ( - "mul", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - muc - + plasticViscosity - ( - plasticViscosityCoeff, - plasticViscosityExponent, - Alpha - ) - ); - - - Info<< "Initialising field Vdj\n" << endl; - volVectorField Vdj - ( - IOobject - ( - "Vdj", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - mesh, - dimensionedVector("0.0", U.dimensions(), vector::zero), - U.boundaryField().types() - ); - - - Info<< "Selecting Drift-Flux model " << endl; - - const word VdjModel(transportProperties.lookup("VdjModel")); - - Info<< tab << VdjModel << " selected\n" << endl; - - const dictionary& VdjModelCoeffs - ( - transportProperties.subDict(VdjModel + "Coeffs") - ); - - dimensionedVector V0(VdjModelCoeffs.lookup("V0")); - - dimensionedScalar a(VdjModelCoeffs.lookup("a")); - - dimensionedScalar a1(VdjModelCoeffs.lookup("a1")); - - dimensionedScalar alphaMin(VdjModelCoeffs.lookup("alphaMin")); - - - 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 - ( - dimensionedScalar::lookupOrAddToDict - ( - "kappa", - wallFunctionDict, - 0.41 - ) - ); - - 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 + mul - ); - - - Info<< "Calculating field (g.h)f\n" << endl; - volScalarField gh("gh", g & mesh.C()); - surfaceScalarField ghf("gh", g & mesh.Cf()); - - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - p_rgh + rho*gh - ); - - label pRefCell = 0; - scalar pRefValue = 0.0; - setRefCell - ( - p, - p_rgh, - mesh.solutionDict().subDict("PIMPLE"), - pRefCell, - pRefValue - ); - - if (p_rgh.needReference()) - { - p += dimensionedScalar - ( - "p", - p.dimensions(), - pRefValue - getRefCellValue(p, pRefCell) - ); - p_rgh = p - rho*gh; - } diff --git a/applications/solvers/multiphase/settlingFoam/kEpsilon.H b/applications/solvers/multiphase/settlingFoam/kEpsilon.H deleted file mode 100644 index d6f983ed..00000000 --- a/applications/solvers/multiphase/settlingFoam/kEpsilon.H +++ /dev/null @@ -1,78 +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); - - volScalarField divU(fvc::div(phi/fvc::interpolate(rho))); - - tmp tgradU = fvc::grad(U); - volScalarField G(2*mut*(tgradU() && dev(symm(tgradU())))); - tgradU.clear(); - - volScalarField Gcoef - ( - Cmu*k/sigmak*(g & fvc::grad(rho))/(epsilon + epsilonMin) - ); - - #include "wallFunctions.H" - - // Dissipation equation - fvScalarMatrix epsEqn - ( - fvm::ddt(rho, epsilon) - + fvm::div(phi, epsilon) - - fvm::laplacian - ( - mut/sigmaEps + muc, epsilon, - "laplacian(DepsilonEff,epsilon)" - ) - == - C1*G*epsilon/(k + kMin) - - fvm::SuSp(C1*(1.0 - C3)*Gcoef + (2.0/3.0*C1)*rho*divU, 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(phi, k) - - fvm::laplacian - ( - mut/sigmak + muc, k, - "laplacian(DkEff,k)" - ) - == - G - - fvm::SuSp(Gcoef + 2.0/3.0*rho*divU, 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; diff --git a/applications/solvers/multiphase/settlingFoam/pEqn.H b/applications/solvers/multiphase/settlingFoam/pEqn.H deleted file mode 100644 index 13c3ddf7..00000000 --- a/applications/solvers/multiphase/settlingFoam/pEqn.H +++ /dev/null @@ -1,70 +0,0 @@ -{ - volScalarField rAU("rAU", 1.0/UEqn.A()); - surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); - - volVectorField HbyA("HbyA", U); - HbyA = rAU*UEqn.H(); - - surfaceScalarField phiHbyA - ( - "phiHbyA", - ( - (fvc::interpolate(rho*HbyA) & mesh.Sf()) - + rhorAUf*fvc::ddtCorr(rho, U, phi) - ) - ); - - surfaceScalarField phig - ( - - ghf*fvc::snGrad(rho)*rhorAUf*mesh.magSf() - ); - - phiHbyA += phig; - - // Update the fixedFluxPressure BCs to ensure flux consistency - setSnGrad - ( - p_rgh.boundaryField(), - ( - phiHbyA.boundaryField() - - (mesh.Sf().boundaryField() & U.boundaryField()) - *rho.boundaryField() - )/(mesh.magSf().boundaryField()*rhorAUf.boundaryField()) - ); - - while (pimple.correctNonOrthogonal()) - { - fvScalarMatrix p_rghEqn - ( - fvm::laplacian(rhorAUf, p_rgh) == fvc::ddt(rho) + fvc::div(phiHbyA) - ); - - p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); - - p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter()))); - - if (pimple.finalNonOrthogonalIter()) - { - phi = phiHbyA - p_rghEqn.flux(); - - U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rhorAUf); - U.correctBoundaryConditions(); - } - } - - p == p_rgh + rho*gh; - - if (p_rgh.needReference()) - { - p += dimensionedScalar - ( - "p", - p.dimensions(), - pRefValue - getRefCellValue(p, pRefCell) - ); - p_rgh = p - rho*gh; - } - - #include "rhoEqn.H" - #include "compressibleContinuityErrs.H" -} diff --git a/applications/solvers/multiphase/settlingFoam/plasticViscosity.H b/applications/solvers/multiphase/settlingFoam/plasticViscosity.H deleted file mode 100644 index 2797205a..00000000 --- a/applications/solvers/multiphase/settlingFoam/plasticViscosity.H +++ /dev/null @@ -1,17 +0,0 @@ -volScalarField plasticViscosity -( - const dimensionedScalar& plasticViscosityCoeff, - const dimensionedScalar& plasticViscosityExponent, - const volScalarField& alpha -) -{ - tmp tfld - ( - plasticViscosityCoeff* - ( - pow(10.0, plasticViscosityExponent*alpha + SMALL) - scalar(1) - ) - ); - - return tfld(); -} diff --git a/applications/solvers/multiphase/settlingFoam/settlingFoam.C b/applications/solvers/multiphase/settlingFoam/settlingFoam.C deleted file mode 100644 index 3b2454c8..00000000 --- a/applications/solvers/multiphase/settlingFoam/settlingFoam.C +++ /dev/null @@ -1,109 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 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 . - -Application - settlingFoam - -Description - Solver for 2 incompressible fluids for simulating the settling of the - dispersed phase. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "nearWallDist.H" -#include "wallFvPatch.H" -#include "bound.H" -#include "Switch.H" -#include "plasticViscosity.H" -#include "yieldStress.H" -#include "pimpleControl.H" -#include "fixedFluxPressureFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "setRootCase.H" - - #include "createTime.H" - #include "createMesh.H" - #include "readGravitationalAcceleration.H" - #include "createFields.H" - #include "initContinuityErrs.H" - - pimpleControl pimple(mesh); - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { - #include "readTimeControls.H" - #include "compressibleCourantNo.H" - #include "setDeltaT.H" - - runTime++; - - Info<< "Time = " << runTime.timeName() << nl << endl; - - #include "rhoEqn.H" - - // --- Pressure-velocity PIMPLE corrector loop - while (pimple.loop()) - { - #include "calcVdj.H" - - #include "UEqn.H" - - #include "alphaEqn.H" - - #include "correctViscosity.H" - - // --- Pressure corrector loop - while (pimple.correct()) - { - #include "pEqn.H" - } - - if (pimple.turbCorr()) - { - #include "kEpsilon.H" - } - } - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/settlingFoam/wallFunctions.H b/applications/solvers/multiphase/settlingFoam/wallFunctions.H deleted file mode 100644 index 149d787c..00000000 --- a/applications/solvers/multiphase/settlingFoam/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 scalar muc_ = muc.value(); - - const fvPatchList& patches = mesh.boundary(); - - //- Initialise the near-wall P field to zero - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isA(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(curPatch)) - { - const scalarField& mutw = mut.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] + muc_) - *magFaceGradU[facei] - *Cmu25*::sqrt(k[faceCelli]) - /(kappa_*y[patchi][facei]); - } - } - } - - - // perform the averaging - - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isA(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/settlingFoam/wallViscosity.H b/applications/solvers/multiphase/settlingFoam/wallViscosity.H deleted file mode 100644 index d63f7e79..00000000 --- a/applications/solvers/multiphase/settlingFoam/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 scalar muc_ = muc.value(); - const scalar nuc_ = muc_/rhoc.value(); - - const fvPatchList& patches = mesh.boundary(); - - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isA(curPatch)) - { - scalarField& mutw = mut.boundaryField()[patchi]; - - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - scalar yPlus = - Cmu25*y[patchi][facei]*::sqrt(k[faceCelli]) - /nuc_; - - if (yPlus > 11.6) - { - mutw[facei] = - muc_*(yPlus*kappa_/::log(E_*yPlus) - 1); - } - else - { - mutw[facei] = 0.0; - } - } - } - } -} diff --git a/applications/solvers/multiphase/settlingFoam/yieldStress.H b/applications/solvers/multiphase/settlingFoam/yieldStress.H deleted file mode 100644 index cb0415c6..00000000 --- a/applications/solvers/multiphase/settlingFoam/yieldStress.H +++ /dev/null @@ -1,19 +0,0 @@ -volScalarField yieldStress -( - const dimensionedScalar& yieldStressCoeff, - const dimensionedScalar& yieldStressExponent, - const dimensionedScalar& yieldStressOffset, - const volScalarField& alpha -) -{ - tmp tfld - ( - yieldStressCoeff* - ( - pow(10.0, yieldStressExponent*(alpha + yieldStressOffset)) - - pow(10.0, yieldStressExponent*yieldStressOffset) - ) - ); - - return tfld(); -} diff --git a/applications/solvers/multiphase/multiphaseInterFoam/alphaCourantNo.H b/applications/solvers/multiphase/twoLiquidMixingFoam/alphaCourantNo.H similarity index 90% rename from applications/solvers/multiphase/multiphaseInterFoam/alphaCourantNo.H rename to applications/solvers/multiphase/twoLiquidMixingFoam/alphaCourantNo.H index 98444a06..6ea204b0 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/alphaCourantNo.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/alphaCourantNo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Global - CourantNo + alphaCourantNo Description Calculates and outputs the mean and maximum Courant Numbers. @@ -41,8 +41,8 @@ if (mesh.nInternalFaces()) { scalarField sumPhi ( - mixture.nearInterface()().internalField() - * fvc::surfaceSum(mag(phi))().internalField() + pos(alpha1 - 0.01)*pos(0.99 - alpha1) + *fvc::surfaceSum(mag(phi))().internalField() ); alphaCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue(); diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H b/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H index 31e1e61d..dc6325d0 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H @@ -29,18 +29,18 @@ #include "createPhi.H" Info<< "Reading transportProperties\n" << endl; - incompressibleTwoPhaseMixture twoPhaseProperties(U, phi); + incompressibleTwoPhaseMixture mixture(U, phi); - volScalarField& alpha1(twoPhaseProperties.alpha1()); - volScalarField& alpha2(twoPhaseProperties.alpha2()); + volScalarField& alpha1(mixture.alpha1()); + volScalarField& alpha2(mixture.alpha2()); - const dimensionedScalar& rho1 = twoPhaseProperties.rho1(); - const dimensionedScalar& rho2 = twoPhaseProperties.rho2(); + const dimensionedScalar& rho1 = mixture.rho1(); + const dimensionedScalar& rho2 = mixture.rho2(); - dimensionedScalar Dab(twoPhaseProperties.lookup("Dab")); + dimensionedScalar Dab(mixture.lookup("Dab")); // Read the reciprocal of the turbulent Schmidt number - dimensionedScalar alphatab(twoPhaseProperties.lookup("alphatab")); + dimensionedScalar alphatab(mixture.lookup("alphatab")); // Need to store rho for ddt(rho, U) volScalarField rho("rho", alpha1*rho1 + alpha2*rho2); @@ -66,7 +66,7 @@ // Construct incompressible turbulence model autoPtr turbulence ( - incompressible::turbulenceModel::New(U, phi, twoPhaseProperties) + incompressible::turbulenceModel::New(U, phi, mixture) ); Info<< "Calculating field g.h\n" << endl; diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C index 247c12a8..7593aeab 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; - twoPhaseProperties.correct(); + mixture.correct(); #include "alphaEqnSubCycle.H" #include "alphaDiffusionEqn.H" diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/Allwclean b/applications/solvers/multiphase/twoPhaseEulerFoam/Allwclean index 8af14024..86633f63 100755 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/Allwclean +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/Allwclean @@ -4,7 +4,7 @@ set -x wclean libso twoPhaseSystem wclean libso interfacialModels -wclean libso phaseIncompressibleTurbulenceModels +wclean libso phaseCompressibleTurbulenceModels wclean # ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake b/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake index 6ba04af7..b01ec94a 100755 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake @@ -5,7 +5,7 @@ set -x wmakeLnInclude interfacialModels wmake libso twoPhaseSystem wmake libso interfacialModels -wmake libso phaseIncompressibleTurbulenceModels +wmake libso phaseCompressibleTurbulenceModels wmake # ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/EEqns.H b/applications/solvers/multiphase/twoPhaseEulerFoam/EEqns.H index c68d0019..5082dad2 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/EEqns.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/EEqns.H @@ -9,48 +9,58 @@ fvScalarMatrix he1Eqn ( - fvm::ddt(alpha1, he1) + fvm::div(alphaPhi1, he1) - + fvc::ddt(alpha1, K1) + fvc::div(alphaPhi1, K1) + fvm::ddt(alpha1, rho1, he1) + fvm::div(alphaRhoPhi1, he1) + - fvm::Sp(fvc::ddt(alpha1, rho1) + fvc::div(alphaRhoPhi1), he1) - // Compressibity correction - - fvm::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), he1) - - (fvc::ddt(alpha1) + fvc::div(alphaPhi1))*K1 + + fvc::ddt(alpha1, rho1, K1) + fvc::div(alphaRhoPhi1, K1) + - (fvc::ddt(alpha1, rho1) + fvc::div(alphaRhoPhi1))*K1 + ( he1.name() == thermo1.phasePropertyName("e") ? fvc::ddt(alpha1)*p + fvc::div(alphaPhi1, p) : -alpha1*dpdt - )/rho1 + ) + + - fvm::laplacian + ( + fvc::interpolate(alpha1) + *fvc::interpolate(thermo1.alphaEff(phase1.turbulence().mut())), + he1 + ) - //***HGW- fvm::laplacian(alpha1*turbulence1->alphaEff(), he1) - - fvm::laplacian(alpha1*phase1.turbulence().nuEff(), he1) == - heatTransferCoeff*(thermo2.T() - thermo1.T())/rho1 - + heatTransferCoeff*he1/Cpv1/rho1 - - fvm::Sp(heatTransferCoeff/Cpv1/rho1, he1) + + heatTransferCoeff*(thermo2.T() - thermo1.T()) + + heatTransferCoeff*he1/Cpv1 + - fvm::Sp(heatTransferCoeff/Cpv1, he1) ); fvScalarMatrix he2Eqn ( - fvm::ddt(alpha2, he2) + fvm::div(alphaPhi2, he2) - + fvc::ddt(alpha2, K2) + fvc::div(alphaPhi2, K2) + fvm::ddt(alpha2, rho2, he2) + fvm::div(alphaRhoPhi2, he2) + - fvm::Sp(fvc::ddt(alpha2, rho2) + fvc::div(alphaRhoPhi2), he2) - // Compressibity correction - - fvm::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), he2) - - (fvc::ddt(alpha2) + fvc::div(alphaPhi2))*K2 + + fvc::ddt(alpha2, rho2, K2) + fvc::div(alphaRhoPhi2, K2) + - (fvc::ddt(alpha2, rho2) + fvc::div(alphaRhoPhi2))*K2 + ( he2.name() == thermo2.phasePropertyName("e") ? fvc::ddt(alpha2)*p + fvc::div(alphaPhi2, p) : -alpha2*dpdt - )/rho2 + ) + + - fvm::laplacian + ( + fvc::interpolate(alpha2) + *fvc::interpolate(thermo2.alphaEff(phase2.turbulence().mut())), + he2 + ) - //***HGW- fvm::laplacian(alpha2*turbulence2->alphaEff(), he2) - - fvm::laplacian(alpha2*phase2.turbulence().nuEff(), he2) == - heatTransferCoeff*(thermo1.T() - thermo2.T())/rho2 - + heatTransferCoeff*he2/Cpv2/rho2 - - fvm::Sp(heatTransferCoeff/Cpv2/rho2, he2) + + heatTransferCoeff*(thermo1.T() - thermo2.T()) + + heatTransferCoeff*he2/Cpv2 + - fvm::Sp(heatTransferCoeff/Cpv2, he2) ); he1Eqn.relax(); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/Make/options b/applications/solvers/multiphase/twoPhaseEulerFoam/Make/options index e1780815..d39d3029 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/Make/options +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/Make/options @@ -1,11 +1,12 @@ EXE_INC = \ + -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude \ - -IphaseIncompressibleTurbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \ + -IphaseCompressibleTurbulenceModels/lnInclude \ -IinterfacialModels/lnInclude \ -ItwoPhaseSystem/lnInclude \ -Iaveraging @@ -14,8 +15,8 @@ EXE_LIBS = \ -lfluidThermophysicalModels \ -lspecie \ -lturbulenceModels \ - -lincompressibleTurbulenceModels \ - -lphaseIncompressibleTurbulenceModels \ + -lcompressibleTurbulenceModels \ + -lphaseCompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lcompressibleTwoPhaseSystem \ -lcompressibleEulerianInterfacialModels \ diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/UEqns.H b/applications/solvers/multiphase/twoPhaseEulerFoam/UEqns.H index 5b0463d1..4537e91b 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/UEqns.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/UEqns.H @@ -2,8 +2,8 @@ mrfZones.correctBoundaryVelocity(U1); mrfZones.correctBoundaryVelocity(U2); mrfZones.correctBoundaryVelocity(U); -fvVectorMatrix U1Eqn(U1, U1.dimensions()*dimVol/dimTime); -fvVectorMatrix U2Eqn(U2, U2.dimensions()*dimVol/dimTime); +fvVectorMatrix U1Eqn(U1, rho1.dimensions()*U1.dimensions()*dimVol/dimTime); +fvVectorMatrix U2Eqn(U2, rho2.dimensions()*U2.dimensions()*dimVol/dimTime); volScalarField dragCoeff(fluid.dragCoeff()); @@ -17,18 +17,18 @@ volScalarField dragCoeff(fluid.dragCoeff()); { U1Eqn = ( - fvm::ddt(alpha1, U1) - + fvm::div(alphaPhi1, U1) - - fvm::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), U1) - + phase1.turbulence().divDevReff(U1) + fvm::ddt(alpha1, rho1, U1) + + fvm::div(alphaRhoPhi1, U1) + - fvm::Sp(fvc::ddt(alpha1, rho1) + fvc::div(alphaRhoPhi1), U1) + + phase1.turbulence().divDevRhoReff(U1) == - - fvm::Sp(dragCoeff/rho1, U1) + - fvm::Sp(dragCoeff, U1) - ( liftForce + wallLubricationForce + turbulentDispersionForce - )/rho1 - - virtualMassCoeff/rho1 + ) + - virtualMassCoeff *( fvm::ddt(U1) + fvm::div(phi1, U1) @@ -36,25 +36,25 @@ volScalarField dragCoeff(fluid.dragCoeff()); - DDtU2 ) ); - mrfZones.addCoriolis(alpha1 + virtualMassCoeff/rho1, U1Eqn); + mrfZones.addCoriolis(alpha1*rho1 + virtualMassCoeff, U1Eqn); U1Eqn.relax(); } { U2Eqn = ( - fvm::ddt(alpha2, U2) - + fvm::div(alphaPhi2, U2) - - fvm::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), U2) - + phase2.turbulence().divDevReff(U2) + fvm::ddt(alpha2, rho2, U2) + + fvm::div(alphaRhoPhi2, U2) + - fvm::Sp(fvc::ddt(alpha2, rho2) + fvc::div(alphaRhoPhi2), U2) + + phase2.turbulence().divDevRhoReff(U2) == - - fvm::Sp(dragCoeff/rho2, U2) + - fvm::Sp(dragCoeff, U2) + ( liftForce + wallLubricationForce + turbulentDispersionForce - )/rho2 - - virtualMassCoeff/rho2 + ) + - virtualMassCoeff *( fvm::ddt(U2) + fvm::div(phi2, U2) @@ -62,7 +62,7 @@ volScalarField dragCoeff(fluid.dragCoeff()); - DDtU1 ) ); - mrfZones.addCoriolis(alpha2 + virtualMassCoeff/rho2, U2Eqn); + mrfZones.addCoriolis(alpha2*rho2 + virtualMassCoeff, U2Eqn); U2Eqn.relax(); } } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/createFields.H b/applications/solvers/multiphase/twoPhaseEulerFoam/createFields.H index f2e81b03..0fb7e3a5 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/createFields.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/createFields.H @@ -10,11 +10,13 @@ volVectorField& U1 = phase1.U(); surfaceScalarField& phi1 = phase1.phi(); - surfaceScalarField& alphaPhi1 = phase1.phiAlpha(); + surfaceScalarField& alphaPhi1 = phase1.alphaPhi(); + surfaceScalarField& alphaRhoPhi1 = phase1.alphaRhoPhi(); volVectorField& U2 = phase2.U(); surfaceScalarField& phi2 = phase2.phi(); - surfaceScalarField& alphaPhi2 = phase2.phiAlpha(); + surfaceScalarField& alphaPhi2 = phase2.alphaPhi(); + surfaceScalarField& alphaRhoPhi2 = phase2.alphaRhoPhi(); surfaceScalarField& phi = fluid.phi(); @@ -49,19 +51,6 @@ fluid.U() ); - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - fluid.rho() - ); - Info<< "Calculating field DDtU1 and DDtU2\n" << endl; volVectorField DDtU1 @@ -91,7 +80,7 @@ IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", dimensionSet(0, 0, 1, 0, 0), 0.0) + dimensionedScalar("zero", dimensionSet(-1, 3, 1, 0, 0), 0.0) ); volScalarField rAU2 @@ -105,7 +94,7 @@ IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", dimensionSet(0, 0, 1, 0, 0), 0.0) + dimensionedScalar("zero", dimensionSet(-1, 3, 1, 0, 0), 0.0) ); label pRefCell = 0; diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/Make/options b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/Make/options index 95c5844e..a728cb7f 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/Make/options +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/Make/options @@ -1,10 +1,11 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/transportModel \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \ -I../twoPhaseSystem/lnInclude LIB_LIBS = \ diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/Burns/Burns.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/Burns/Burns.C index 6beb9579..dfe1be16 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/Burns/Burns.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/Burns/Burns.C @@ -26,7 +26,7 @@ License #include "Burns.H" #include "phasePair.H" #include "fvc.H" -#include "PhaseIncompressibleTurbulenceModel.H" +#include "PhaseCompressibleTurbulenceModel.H" #include "addToRunTimeSelectionTable.H" #include "dragModel.H" diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/Gosman/Gosman.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/Gosman/Gosman.C index 01fb4d2f..b7374bc8 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/Gosman/Gosman.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/Gosman/Gosman.C @@ -26,7 +26,7 @@ License #include "Gosman.H" #include "phasePair.H" #include "fvc.H" -#include "PhaseIncompressibleTurbulenceModel.H" +#include "PhaseCompressibleTurbulenceModel.H" #include "addToRunTimeSelectionTable.H" #include "dragModel.H" diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/constantTurbulentDispersionCoefficient/constantTurbulentDispersionCoefficient.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/constantTurbulentDispersionCoefficient/constantTurbulentDispersionCoefficient.C index 0d28518b..5def478d 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/constantTurbulentDispersionCoefficient/constantTurbulentDispersionCoefficient.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/constantTurbulentDispersionCoefficient/constantTurbulentDispersionCoefficient.C @@ -26,7 +26,7 @@ License #include "constantTurbulentDispersionCoefficient.H" #include "phasePair.H" #include "fvc.H" -#include "PhaseIncompressibleTurbulenceModel.H" +#include "PhaseCompressibleTurbulenceModel.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -73,7 +73,7 @@ Foam::tmp Foam::turbulentDispersionModels::constantTurbulentDispersionCoefficient:: F() const { - return + return - Ctd_ *pair_.dispersed() *pair_.continuous().rho() diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H b/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H index 00d7cef7..9eca93e2 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H @@ -5,8 +5,8 @@ rAU1 = 1.0/U1Eqn.A(); rAU2 = 1.0/U2Eqn.A(); - surfaceScalarField rAlphaAU1f(fvc::interpolate(alpha1*rAU1)); - surfaceScalarField rAlphaAU2f(fvc::interpolate(alpha2*rAU2)); + surfaceScalarField rAlphaAU1f(fvc::interpolate(alpha1*rho1*rAU1)); + surfaceScalarField rAlphaAU2f(fvc::interpolate(alpha2*rho2*rAU2)); volVectorField HbyA1 ( @@ -31,7 +31,7 @@ surfaceScalarField phiP1 ( "phiP1", - fvc::interpolate((1.0/rho1)*rAU1*phase1.turbulence().pPrime()) + fvc::interpolate(rAU1*phase1.turbulence().pPrime()) *fvc::snGrad(alpha1)*mesh.magSf() ); phiP1.boundaryField() == 0; @@ -40,7 +40,7 @@ surfaceScalarField phiP2 ( "phiP2", - fvc::interpolate((1.0/rho2)*rAU2*phase2.turbulence().pPrime()) + fvc::interpolate(rAU2*phase2.turbulence().pPrime()) *fvc::snGrad(alpha2)*mesh.magSf() ); phiP2.boundaryField() == 0; @@ -61,14 +61,14 @@ phiHbyA1 += ( - fvc::interpolate((1.0/rho1)*rAU1*dragCoeff)*phi2 + fvc::interpolate(rAU1*dragCoeff)*phi2 - phiP1 + rAlphaAU1f*(g & mesh.Sf()) ); phiHbyA2 += ( - fvc::interpolate((1.0/rho2)*rAU2*dragCoeff)*phi1 + fvc::interpolate(rAU2*dragCoeff)*phi1 - phiP2 + rAlphaAU2f*(g & mesh.Sf()) ); @@ -82,8 +82,8 @@ surfaceScalarField phiHbyA("phiHbyA", alpha1f*phiHbyA1 + alpha2f*phiHbyA2); - HbyA1 += (1.0/rho1)*rAU1*dragCoeff*U2; - HbyA2 += (1.0/rho2)*rAU2*dragCoeff*U1; + HbyA1 += rAU1*dragCoeff*U2; + HbyA2 += rAU2*dragCoeff*U1; surfaceScalarField rAUf ( @@ -129,7 +129,7 @@ pEqnComp1 = ( - fvc::ddt(alpha1, rho1) + fvc::div(alphaPhi1, rho1) + fvc::ddt(alpha1, rho1) + fvc::div(alphaRhoPhi1) - fvc::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), rho1) )/rho1 + (alpha1/rho1)*correction @@ -142,7 +142,7 @@ pEqnComp2 = ( - fvc::ddt(alpha2, rho2) + fvc::div(alphaPhi2, rho2) + fvc::ddt(alpha2, rho2) + fvc::div(alphaRhoPhi2) - fvc::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), rho2) )/rho2 + (alpha2/rho2)*correction @@ -157,14 +157,14 @@ { pEqnComp1 = ( - fvc::ddt(alpha1, rho1) + fvc::div(alphaPhi1, rho1) + fvc::ddt(alpha1, rho1) + fvc::div(alphaRhoPhi1) - fvc::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), rho1) )/rho1 + (alpha1*psi1/rho1)*correction(fvm::ddt(p)); pEqnComp2 = ( - fvc::ddt(alpha2, rho2) + fvc::div(alphaPhi2, rho2) + fvc::ddt(alpha2, rho2) + fvc::div(alphaRhoPhi2) - fvc::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), rho2) )/rho2 + (alpha2*psi2/rho2)*correction(fvm::ddt(p)); @@ -209,8 +209,8 @@ fluid.dgdt() = ( - pos(alpha2)*(pEqnComp2 & p)/max(alpha2, scalar(1e-3)) - - pos(alpha1)*(pEqnComp1 & p)/max(alpha1, scalar(1e-3)) + alpha1*(pEqnComp2 & p) + - alpha2*(pEqnComp1 & p) ); p.relax(); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/Make/files b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/Make/files similarity index 95% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/Make/files rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/Make/files index 2a3a6a96..62c16284 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/Make/files +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/Make/files @@ -1,4 +1,4 @@ -phaseIncompressibleTurbulenceModels.C +phaseCompressibleTurbulenceModels.C phasePressureModel/phasePressureModel.C kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C @@ -35,4 +35,4 @@ kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C -LIB = $(FOAM_LIBBIN)/libphaseIncompressibleTurbulenceModels +LIB = $(FOAM_LIBBIN)/libphaseCompressibleTurbulenceModels diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/Make/options b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/Make/options similarity index 65% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/Make/options rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/Make/options index 2563e4ed..52f442a9 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/Make/options +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/Make/options @@ -1,10 +1,11 @@ EXE_INC = \ -I$(LIB_SRC)/foam/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/transportModel \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \ -I../twoPhaseSystem/lnInclude \ -I../interfacialModels/lnInclude diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.C similarity index 96% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.C index 8f928929..63e84966 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -80,7 +80,7 @@ Foam::kineticTheoryModels::conductivityModels::Gidaspow::kappa { const scalar sqrtPi = sqrt(constant::mathematical::pi); - return da*sqrt(Theta)* + return rho1*da*sqrt(Theta)* ( 2.0*sqr(alpha1)*g0*(1.0 + e)/sqrtPi + (9.0/8.0)*sqrtPi*g0*0.5*(1.0 + e)*sqr(alpha1) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.H similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.H index e1470d90..714282db 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C index 179903b0..cc965c84 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -88,7 +88,7 @@ Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::kappa scalar(1) + da/(6.0*sqrt(2.0)*(alpha1 + scalar(1.0e-5)))/L_ ); - return da*sqrt(Theta)* + return rho1*da*sqrt(Theta)* ( 2.0*sqr(alpha1)*g0*(1.0 + e)/sqrtPi + (9.0/8.0)*sqrtPi*g0*0.25*sqr(1.0 + e)*(2.0*e - 1.0)*sqr(alpha1) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.H similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.H index 0280a235..37691374 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.C similarity index 96% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.C index d7dac437..3732c57e 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -80,7 +80,7 @@ Foam::kineticTheoryModels::conductivityModels::Syamlal::kappa { const scalar sqrtPi = sqrt(constant::mathematical::pi); - return da*sqrt(Theta)* + return rho1*da*sqrt(Theta)* ( 2.0*sqr(alpha1)*g0*(1.0 + e)/sqrtPi + (9.0/8.0)*sqrtPi*g0*0.25*sqr(1.0 + e)*(2.0*e - 1.0)*sqr(alpha1) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.H similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.H index e1dea3a7..bb47cf66 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.C similarity index 96% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.C index 1430854a..3db83f67 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.H similarity index 98% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.H index f4a8a256..19f13ca9 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C index 7f4b9f63..4f86a8d2 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C similarity index 100% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.H similarity index 100% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.H diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C similarity index 100% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.H similarity index 100% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.H diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C similarity index 100% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.H similarity index 98% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.H index 2b59c0a0..0e5f7c9a 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C similarity index 100% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.H similarity index 98% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.H index 1de4d504..3f56759e 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/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-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.C similarity index 96% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.C index 02e1dc70..f1e899e8 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H similarity index 98% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H index 0da14115..28dc1ab1 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/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-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C index ed9ae62d..96e15ed4 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/Lun/LunPressure.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/Lun/LunPressure.C similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/Lun/LunPressure.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/Lun/LunPressure.C index 5a10765a..248d8b1f 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/Lun/LunPressure.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/Lun/LunPressure.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/Lun/LunPressure.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/Lun/LunPressure.H similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/Lun/LunPressure.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/Lun/LunPressure.H index 81e8ac0d..8585d001 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/Lun/LunPressure.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/Lun/LunPressure.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.C similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.C index 03b0fc1d..892a690a 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.H similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.H index 199c9957..8b4223f1 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.C similarity index 96% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.C index b8834729..6f3c915f 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.H similarity index 98% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.H index d30373ac..b22ae267 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C index 63200128..deaf6fc6 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C similarity index 93% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C index 6db46aea..f158b243 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C @@ -32,22 +32,22 @@ License Foam::RASModels::kineticTheoryModel::kineticTheoryModel ( const volScalarField& alpha, - const geometricOneField& rho, + const volScalarField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& phase, const word& propertiesName, const word& type ) : - eddyViscosity > > + eddyViscosity > > ( type, alpha, rho, U, - alphaPhi, + alphaRhoPhi, phi, phase, propertiesName @@ -159,7 +159,7 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel IOobject::NO_WRITE ), U.mesh(), - dimensionedScalar("zero", dimensionSet(0, 2, -1, 0, 0), 0.0) + dimensionedScalar("zero", dimensionSet(1, -1, -1, 0, 0), 0.0) ) { if (type == typeName) @@ -183,7 +183,7 @@ bool Foam::RASModels::kineticTheoryModel::read() ( eddyViscosity < - RASModel > + RASModel > >::read() ) { @@ -383,7 +383,7 @@ void Foam::RASModels::kineticTheoryModel::correct() // Local references volScalarField alpha(max(this->alpha_, scalar(0))); const volScalarField& rho = phase_.rho(); - const surfaceScalarField& alphaPhi = this->alphaPhi_; + const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; const volVectorField& U = this->U_; const volVectorField& Uc_ = phase_.fluid().otherPhase(phase_).U(); @@ -403,7 +403,7 @@ void Foam::RASModels::kineticTheoryModel::correct() if (!equilibrium_) { - // particle viscosity (Table 3.2, p.47) + // Particle viscosity (Table 3.2, p.47) nut_ = viscosityModel_->nu(alpha, Theta_, gs0_, rho, da, e_); volScalarField ThetaSqrt(sqrt(Theta_)); @@ -412,31 +412,29 @@ void Foam::RASModels::kineticTheoryModel::correct() lambda_ = (4.0/3.0)*sqr(alpha)*da*gs0_*(1.0 + e_)*ThetaSqrt/sqrtPi; // Stress tensor, Definitions, Table 3.1, p. 43 - volSymmTensorField tau(2.0*nut_*D + (lambda_ - (2.0/3.0)*nut_)*tr(D)*I); + volSymmTensorField tau + ( + rho*(2.0*nut_*D + (lambda_ - (2.0/3.0)*nut_)*tr(D)*I) + ); // Dissipation (Eq. 3.24, p.50) volScalarField gammaCoeff ( 12.0*(1.0 - sqr(e_)) *max(sqr(alpha), residualAlpha_) - *gs0_*(1.0/da)*ThetaSqrt/sqrtPi + *rho*gs0_*(1.0/da)*ThetaSqrt/sqrtPi ); // Drag - volScalarField magUr(mag(U - Uc_)); - - volScalarField alpha2Prim - ( - phase_.fluid().drag(phase_).K()/rho - ); + volScalarField beta(phase_.fluid().drag(phase_).K()); // Eq. 3.25, p. 50 Js = J1 - J2 - volScalarField J1(3.0*alpha2Prim); + volScalarField J1(3.0*beta); volScalarField J2 ( - 0.25*sqr(alpha2Prim)*da*sqr(magUr) + 0.25*sqr(beta)*da*magSqr(U - Uc_) /( - max(alpha, residualAlpha_) + max(alpha, residualAlpha_)*rho *sqrtPi*(ThetaSqrt + ThetaSmallSqrt) ) ); @@ -450,7 +448,7 @@ void Foam::RASModels::kineticTheoryModel::correct() gs0_, rho, e_ - )/rho + ) ); // 'thermal' conductivity (Table 3.3, p. 49) @@ -464,9 +462,9 @@ void Foam::RASModels::kineticTheoryModel::correct() ( 1.5* ( - fvm::ddt(alpha, Theta_) - + fvm::div(alphaPhi, Theta_) - - fvc::Sp(fvc::ddt(alpha) + fvc::div(alphaPhi), Theta_) + fvm::ddt(alpha, rho, Theta_) + + fvm::div(alphaRhoPhi, Theta_) + - fvc::Sp(fvc::ddt(alpha, rho) + fvc::div(alphaRhoPhi), Theta_) ) - fvm::laplacian(kappa_, Theta_, "laplacian(kappa, Theta)") == @@ -489,7 +487,7 @@ void Foam::RASModels::kineticTheoryModel::correct() ( 0.5*da*rho* ( - (sqrtPi/(3.0*(3.0-e_))) + (sqrtPi/(3.0*(3.0 - e_))) *(1.0 + 0.4*(1.0 + e_)*(3.0*e_ - 1.0)*alpha*gs0_) +1.6*alpha*gs0_*(1.0 + e_)/sqrtPi ) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H similarity index 96% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H index 28386be1..5e0f1d6f 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H @@ -47,7 +47,7 @@ SourceFiles #include "RASModel.H" #include "eddyViscosity.H" -#include "PhaseIncompressibleTurbulenceModel.H" +#include "PhaseCompressibleTurbulenceModel.H" #include "phaseModel.H" #include "dragModel.H" #include "viscosityModel.H" @@ -72,7 +72,7 @@ class kineticTheoryModel : public eddyViscosity < - RASModel > + RASModel > > { // Private data @@ -159,9 +159,9 @@ public: kineticTheoryModel ( const volScalarField& alpha, - const geometricOneField& rho, + const volScalarField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const phaseModel& transport, const word& propertiesName = turbulenceModel::propertiesName, diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.C similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.C index bedc3035..8ea724a2 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.H similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.H index 77396863..528a3b36 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.C similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.C index e9a4cfb5..a362a488 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.H similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.H index 53492c9c..a2068242 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.C similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.C index 8231cc32..36971079 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.H similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.H index bc8f44be..9e5abcbb 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C index 3ea17707..18b8eed8 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.C similarity index 96% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.C index 893117a8..e8763a01 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.H similarity index 98% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.H index fc0a583c..1d225e3b 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.C similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.C index 22e57614..ebe4e6dd 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.H similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.H index 325f4f06..96a65bb7 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C similarity index 98% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C index e1bcc67e..a8b7d1c5 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.H similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.H index 90fe892f..a47163e0 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.C similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.C index ed5df62c..1eab21fc 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.H similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.H index 7d2583e5..979e0391 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/none/noneViscosity.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/none/noneViscosity.C similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/none/noneViscosity.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/none/noneViscosity.C index 44c54a51..843386ca 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/none/noneViscosity.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/none/noneViscosity.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/none/noneViscosity.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/none/noneViscosity.H similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/none/noneViscosity.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/none/noneViscosity.H index 25fe4ce7..565dd45f 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/none/noneViscosity.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/none/noneViscosity.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C similarity index 97% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C index 58da2a78..c0222ff4 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.C similarity index 96% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.C index c3c414dd..d7aa5efb 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.H similarity index 98% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.H index bfd021a4..045c7f49 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/phaseIncompressibleTurbulenceModels.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phaseCompressibleTurbulenceModels.C similarity index 82% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/phaseIncompressibleTurbulenceModels.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phaseCompressibleTurbulenceModels.C index 8a038c43..9915c3ec 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/phaseIncompressibleTurbulenceModels.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phaseCompressibleTurbulenceModels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "PhaseIncompressibleTurbulenceModel.H" +#include "PhaseCompressibleTurbulenceModel.H" #include "phaseModel.H" #include "twoPhaseSystem.H" #include "addToRunTimeSelectionTable.H" @@ -36,19 +36,19 @@ License makeBaseTurbulenceModel ( volScalarField, - geometricOneField, - incompressibleTurbulenceModel, - PhaseIncompressibleTurbulenceModel, + volScalarField, + compressibleTurbulenceModel, + PhaseCompressibleTurbulenceModel, phaseModel ); #define makeRASModel(Type) \ makeTemplatedTurbulenceModel \ - (phaseModelPhaseIncompressibleTurbulenceModel, RAS, Type) + (phaseModelPhaseCompressibleTurbulenceModel, RAS, Type) #define makeLESModel(Type) \ makeTemplatedTurbulenceModel \ - (phaseModelPhaseIncompressibleTurbulenceModel, LES, Type) + (phaseModelPhaseCompressibleTurbulenceModel, LES, Type) #include "kEpsilon.H" makeRASModel(kEpsilon); @@ -79,11 +79,11 @@ makeLESModel(continuousGasKEqn); #include "kineticTheoryModel.H" makeTurbulenceModel -(phaseModelPhaseIncompressibleTurbulenceModel, RAS, kineticTheoryModel); +(phaseModelPhaseCompressibleTurbulenceModel, RAS, kineticTheoryModel); #include "phasePressureModel.H" makeTurbulenceModel -(phaseModelPhaseIncompressibleTurbulenceModel, RAS, phasePressureModel); +(phaseModelPhaseCompressibleTurbulenceModel, RAS, phasePressureModel); // ************************************************************************* // diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C similarity index 94% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C index 182515d7..77dfdeb0 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,22 +31,22 @@ License Foam::RASModels::phasePressureModel::phasePressureModel ( const volScalarField& alpha, - const geometricOneField& rho, + const volScalarField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& phase, const word& propertiesName, const word& type ) : - eddyViscosity > > + eddyViscosity > > ( type, alpha, rho, U, - alphaPhi, + alphaRhoPhi, phi, phase, propertiesName @@ -87,7 +87,7 @@ bool Foam::RASModels::phasePressureModel::read() ( eddyViscosity < - RASModel > + RASModel > >::read() ) { diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/phasePressureModel/phasePressureModel.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.H similarity index 94% rename from applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/phasePressureModel/phasePressureModel.H rename to applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.H index 6d85be7b..f44f77a4 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/phasePressureModel/phasePressureModel.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -53,7 +53,7 @@ SourceFiles #include "RASModel.H" #include "eddyViscosity.H" -#include "PhaseIncompressibleTurbulenceModel.H" +#include "PhaseCompressibleTurbulenceModel.H" #include "phaseModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -71,7 +71,7 @@ class phasePressureModel : public eddyViscosity < - RASModel > + RASModel > > { // Private data @@ -120,9 +120,9 @@ public: phasePressureModel ( const volScalarField& alpha, - const geometricOneField& rho, + const volScalarField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const phaseModel& transport, const word& propertiesName = turbulenceModel::propertiesName, diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C index a8d8631d..fe949d0e 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C @@ -32,7 +32,7 @@ Description #include "fvCFD.H" #include "twoPhaseSystem.H" -#include "PhaseIncompressibleTurbulenceModel.H" +#include "PhaseCompressibleTurbulenceModel.H" #include "pimpleControl.H" #include "IOMRFZoneList.H" #include "fixedFluxPressureFvPatchScalarField.H" @@ -72,7 +72,6 @@ int main(int argc, char *argv[]) while (pimple.loop()) { fluid.solve(); - rho = fluid.rho(); fluid.correct(); #include "EEqns.H" diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/Make/options b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/Make/options index eec60d23..c403e6fe 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/Make/options +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/Make/options @@ -2,11 +2,12 @@ EXE_INC = \ -I../twoPhaseSystem \ -I../interfacialModels/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude LIB_LIBS = \ -lincompressibleTransportModels \ diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATE.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATE.C index c25cedb1..93c97655 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATE.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATE.C @@ -146,7 +146,7 @@ void Foam::diameterModels::IATE::correct() residualAlpha_ ) ) - *(fvc::ddt(phase_) + fvc::div(phase_.phiAlpha())) + *(fvc::ddt(phase_) + fvc::div(phase_.alphaPhi())) ); // Accumulate the run-time selectable sources diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C index 4d834313..84db2829 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,7 @@ License #include "IATEsource.H" #include "twoPhaseSystem.H" #include "fvMatrix.H" -#include "PhaseIncompressibleTurbulenceModel.H" +#include "PhaseCompressibleTurbulenceModel.H" #include "uniformDimensionedFields.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.C index 26f30f81..2b99be00 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.C @@ -27,7 +27,7 @@ License #include "twoPhaseSystem.H" #include "diameterModel.H" #include "fvMatrix.H" -#include "PhaseIncompressibleTurbulenceModel.H" +#include "PhaseCompressibleTurbulenceModel.H" #include "dragModel.H" #include "heatTransferModel.H" #include "fixedValueFvPatchFields.H" @@ -77,7 +77,7 @@ Foam::phaseModel::phaseModel ), fluid.mesh() ), - phiAlpha_ + alphaPhi_ ( IOobject ( @@ -87,6 +87,17 @@ Foam::phaseModel::phaseModel ), fluid.mesh(), dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0) + ), + alphaRhoPhi_ + ( + IOobject + ( + IOobject::groupName("alphaRhoPhi", name_), + fluid.mesh().time().timeName(), + fluid.mesh() + ), + fluid.mesh(), + dimensionedScalar("0", dimensionSet(1, 0, -1, 0, 0), 0) ) { thermo_->validate("phaseModel " + name_, "h", "e"); @@ -169,11 +180,12 @@ Foam::phaseModel::phaseModel ); turbulence_ = - PhaseIncompressibleTurbulenceModel::New + PhaseCompressibleTurbulenceModel::New ( *this, + thermo_->rho(), U_, - phiAlpha_, + alphaRhoPhi_, phi(), *this ); @@ -199,13 +211,13 @@ Foam::tmp Foam::phaseModel::d() const return dPtr_().d(); } -Foam::PhaseIncompressibleTurbulenceModel& +Foam::PhaseCompressibleTurbulenceModel& Foam::phaseModel::turbulence() { return turbulence_(); } -const Foam::PhaseIncompressibleTurbulenceModel& +const Foam::PhaseCompressibleTurbulenceModel& Foam::phaseModel::turbulence() const { return turbulence_(); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.H b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.H index 436ec137..242b8a8a 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.H @@ -49,7 +49,7 @@ class twoPhaseSystem; class diameterModel; template -class PhaseIncompressibleTurbulenceModel; +class PhaseCompressibleTurbulenceModel; /*---------------------------------------------------------------------------*\ @@ -81,7 +81,10 @@ class phaseModel volVectorField U_; //- Volumetric flux of the phase - surfaceScalarField phiAlpha_; + surfaceScalarField alphaPhi_; + + //- Mass flux of the phase + surfaceScalarField alphaRhoPhi_; //- Volumetric flux of the phase autoPtr phiPtr_; @@ -90,7 +93,7 @@ class phaseModel autoPtr dPtr_; //- turbulence model - autoPtr > turbulence_; + autoPtr > turbulence_; public: @@ -137,12 +140,12 @@ public: tmp d() const; //- Return the turbulence model - const PhaseIncompressibleTurbulenceModel& + const PhaseCompressibleTurbulenceModel& turbulence() const; //- Return non-const access to the turbulence model // for correction - PhaseIncompressibleTurbulenceModel& + PhaseCompressibleTurbulenceModel& turbulence(); //- Return the thermophysical model @@ -170,6 +173,18 @@ public: return thermo_->nu(patchi); } + //- Return the laminar dynamic viscosity + tmp mu() const + { + return thermo_->mu(); + } + + //- Return the laminar dynamic viscosity for patch + tmp mu(const label patchi) const + { + return thermo_->mu(patchi); + } + //- Return the thermal conductivity tmp kappa() const { @@ -214,15 +229,27 @@ public: } //- Return the volumetric flux of the phase - const surfaceScalarField& phiAlpha() const + const surfaceScalarField& alphaPhi() const { - return phiAlpha_; + return alphaPhi_; } //- Return non-const access to the volumetric flux of the phase - surfaceScalarField& phiAlpha() + surfaceScalarField& alphaPhi() { - return phiAlpha_; + return alphaPhi_; + } + + //- Return the mass flux of the phase + const surfaceScalarField& alphaRhoPhi() const + { + return alphaRhoPhi_; + } + + //- Return non-const access to the mass flux of the phase + surfaceScalarField& alphaRhoPhi() + { + return alphaRhoPhi_; } //- Correct the phase properties diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C index 88f3cdbc..f8a18f4f 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "twoPhaseSystem.H" -#include "PhaseIncompressibleTurbulenceModel.H" +#include "PhaseCompressibleTurbulenceModel.H" #include "BlendedInterfacialModel.H" #include "dragModel.H" #include "virtualMassModel.H" @@ -104,9 +104,12 @@ Foam::twoPhaseSystem::twoPhaseSystem ( "dgdt", mesh.time().timeName(), - mesh + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE ), - pos(phase2_)*fvc::div(phi_)/max(phase2_, scalar(0.0001)) + mesh, + dimensionedScalar("dgdt", dimless/dimTime, 0) ), yWall_ @@ -124,8 +127,6 @@ Foam::twoPhaseSystem::twoPhaseSystem // Blending - // ~~~~~~~~ - forAllConstIter(dictionary, subDict("blending"), iter) { blendingMethods_.insert @@ -141,7 +142,6 @@ Foam::twoPhaseSystem::twoPhaseSystem // Pairs - // ~~~~~ phasePair::scalarTable sigmaTable(lookup("sigma")); phasePair::dictTable aspectRatioTable(lookup("aspectRatio")); @@ -183,7 +183,6 @@ Foam::twoPhaseSystem::twoPhaseSystem // Models - // ~~~~~~ drag_.set ( @@ -396,10 +395,8 @@ void Foam::twoPhaseSystem::solve() ); pPrimeByA = - fvc::interpolate((1.0/phase1_.rho()) - *rAU1*phase1_.turbulence().pPrime()) - + fvc::interpolate((1.0/phase2_.rho()) - *rAU2*phase2_.turbulence().pPrime()); + fvc::interpolate(rAU1*phase1_.turbulence().pPrime()) + + fvc::interpolate(rAU2*phase2_.turbulence().pPrime()); surfaceScalarField phiP ( @@ -439,67 +436,90 @@ void Foam::twoPhaseSystem::solve() forAll(dgdt_, celli) { - if (dgdt_[celli] > 0.0 && alpha1[celli] > 0.0) + if (dgdt_[celli] > 0.0) { - Sp[celli] -= dgdt_[celli]*alpha1[celli]; - Su[celli] += dgdt_[celli]*alpha1[celli]; + Sp[celli] -= dgdt_[celli]/max(1.0 - alpha1[celli], 1e-4); + Su[celli] += dgdt_[celli]/max(1.0 - alpha1[celli], 1e-4); } - else if (dgdt_[celli] < 0.0 && alpha1[celli] < 1.0) + else if (dgdt_[celli] < 0.0) { - Sp[celli] += dgdt_[celli]*(1.0 - alpha1[celli]); + Sp[celli] += dgdt_[celli]/max(alpha1[celli], 1e-4); } } - dimensionedScalar totalDeltaT = runTime.deltaT(); - if (nAlphaSubCycles > 1) - { - phase1_.phiAlpha() = - dimensionedScalar("0", phase1_.phiAlpha().dimensions(), 0); - } - - for + surfaceScalarField alphaPhic1 ( - subCycle alphaSubCycle(alpha1, nAlphaSubCycles); - !(++alphaSubCycle).end(); - ) - { - surfaceScalarField alphaPhic1 + fvc::flux ( - fvc::flux - ( - phic, - alpha1, - alphaScheme - ) - + fvc::flux - ( - -fvc::flux(-phir, scalar(1) - alpha1, alpharScheme), - alpha1, - alpharScheme - ) - ); + phic, + alpha1, + alphaScheme + ) + + fvc::flux + ( + -fvc::flux(-phir, scalar(1) - alpha1, alpharScheme), + alpha1, + alpharScheme + ) + ); - // Ensure that the flux at inflow BCs is preserved - forAll(alphaPhic1.boundaryField(), patchi) + // Ensure that the flux at inflow BCs is preserved + forAll(alphaPhic1.boundaryField(), patchi) + { + fvsPatchScalarField& alphaPhic1p = + alphaPhic1.boundaryField()[patchi]; + + if (!alphaPhic1p.coupled()) { - fvsPatchScalarField& alphaPhic1p = - alphaPhic1.boundaryField()[patchi]; + const scalarField& phi1p = phi1.boundaryField()[patchi]; + const scalarField& alpha1p = alpha1.boundaryField()[patchi]; - if (!alphaPhic1p.coupled()) + forAll(alphaPhic1p, facei) { - const scalarField& phi1p = phi1.boundaryField()[patchi]; - const scalarField& alpha1p = alpha1.boundaryField()[patchi]; - - forAll(alphaPhic1p, facei) + if (phi1p[facei] < 0) { - if (phi1p[facei] < 0) - { - alphaPhic1p[facei] = alpha1p[facei]*phi1p[facei]; - } + alphaPhic1p[facei] = alpha1p[facei]*phi1p[facei]; } } } + } + if (nAlphaSubCycles > 1) + { + for + ( + subCycle alphaSubCycle(alpha1, nAlphaSubCycles); + !(++alphaSubCycle).end(); + ) + { + surfaceScalarField alphaPhic10(alphaPhic1); + + MULES::explicitSolve + ( + geometricOneField(), + alpha1, + phi_, + alphaPhic10, + (alphaSubCycle.index()*Sp)(), + (Su - (alphaSubCycle.index() - 1)*Sp*alpha1)(), + phase1_.alphaMax(), + 0 + ); + + if (alphaSubCycle.index() == 1) + { + phase1_.alphaPhi() = alphaPhic10; + } + else + { + phase1_.alphaPhi() += alphaPhic10; + } + } + + phase1_.alphaPhi() /= nAlphaSubCycles; + } + else + { MULES::explicitSolve ( geometricOneField(), @@ -512,14 +532,7 @@ void Foam::twoPhaseSystem::solve() 0 ); - if (nAlphaSubCycles > 1) - { - phase1_.phiAlpha() += (runTime.deltaT()/totalDeltaT)*alphaPhic1; - } - else - { - phase1_.phiAlpha() = alphaPhic1; - } + phase1_.alphaPhi() = alphaPhic1; } if (implicitPhasePressure) @@ -527,17 +540,22 @@ void Foam::twoPhaseSystem::solve() fvScalarMatrix alpha1Eqn ( fvm::ddt(alpha1) - fvc::ddt(alpha1) - - fvm::laplacian(alpha1f*pPrimeByA, alpha1, "bounded") + - fvm::laplacian(alpha1f*pPrimeByA(), alpha1, "bounded") ); alpha1Eqn.relax(); alpha1Eqn.solve(); - phase1_.phiAlpha() += alpha1Eqn.flux(); + phase1_.alphaPhi() += alpha1Eqn.flux(); } - phase2_.phiAlpha() = phi_ - phase1_.phiAlpha(); + phase1_.alphaRhoPhi() = + fvc::interpolate(phase1_.rho())*phase1_.alphaPhi(); + + phase2_.alphaPhi() = phi_ - phase1_.alphaPhi(); alpha2 = scalar(1) - alpha1; + phase2_.alphaRhoPhi() = + fvc::interpolate(phase2_.rho())*phase2_.alphaPhi(); Info<< alpha1.name() << " volume fraction = " << alpha1.weightedAverage(mesh_.V()).value() diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L index f6417638..4273c130 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -1385,25 +1385,12 @@ int main(int argc, char *argv[]) label sz = bFaces.size(); labelList meshFaces(sz,-1); - - //make face set and write (seperate from rest for clarity) - //internal and external Fluent boundaries + // Search faces by point matching + forAll(bFaces, j) { - faceSet pFaceSet(pShapeMesh, patchNames[patchI], sz); - - forAll(bFaces, j) - { - const face& f = bFaces[j]; - label cMeshFace = findFace(pShapeMesh, f); - meshFaces[j] = cMeshFace; - pFaceSet.insert(cMeshFace); - } - if (writeSets) - { - Info<< "Writing patch " << patchNames[patchI] - << " of size " << sz << " to faceSet." << endl; - pFaceSet.write(); - } + const face& f = bFaces[j]; + label cMeshFace = findFace(pShapeMesh, f); + meshFaces[j] = cMeshFace; } @@ -1546,6 +1533,31 @@ int main(int argc, char *argv[]) IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision())); + // Re-do face matching to write sets + if (writeSets) + { + forAll(patches, patchI) + { + const faceList& bFaces = patches[patchI]; + label sz = bFaces.size(); + + faceSet pFaceSet(pShapeMesh, patchNames[patchI], sz); + + forAll(bFaces, j) + { + const face& f = bFaces[j]; + label cMeshFace = findFace(pShapeMesh, f); + pFaceSet.insert(cMeshFace); + } + Info<< "Writing patch " << patchNames[patchI] + << " of size " << sz << " to faceSet" << endl; + + pFaceSet.instance() = pShapeMesh.instance(); + pFaceSet.write(); + } + } + + // Zones // will write out cell zones and internal faces for those zones // note: zone boundary faces are not added to face zones diff --git a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C index 4849232d..d20f94d8 100644 --- a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C +++ b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C @@ -41,6 +41,7 @@ Description #include "volFields.H" #include "surfaceFields.H" #include "pointFields.H" +#include "uniformDimensionedFields.H" #include "ReadFields.H" #include "fvIOoptionList.H" @@ -57,6 +58,101 @@ using namespace Foam; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Read all fields of type. Returns names of fields read. Guarantees all +// processors to read fields in same order. +template +wordList ReadUniformFields +( + const IOobjectList& objects, + PtrList& fields, + const bool syncPar +) +{ + // Search list of objects for wanted type + IOobjectList fieldObjects(objects.lookupClass(GeoField::typeName)); + + wordList masterNames(fieldObjects.names()); + + if (syncPar && Pstream::parRun()) + { + // Check that I have the same fields as the master + const wordList localNames(masterNames); + Pstream::scatter(masterNames); + + HashSet localNamesSet(localNames); + + forAll(masterNames, i) + { + const word& masterFld = masterNames[i]; + + HashSet::iterator iter = localNamesSet.find(masterFld); + + if (iter == localNamesSet.end()) + { + FatalErrorIn + ( + "ReadFields" + "(const IOobjectList&, PtrList&" + ", const bool)" + ) << "Fields not synchronised across processors." << endl + << "Master has fields " << masterNames + << " processor " << Pstream::myProcNo() + << " has fields " << localNames << exit(FatalError); + } + else + { + localNamesSet.erase(iter); + } + } + + forAllConstIter(HashSet, localNamesSet, iter) + { + FatalErrorIn + ( + "ReadFields" + "(const IOobjectList&, PtrList&" + ", const bool)" + ) << "Fields not synchronised across processors." << endl + << "Master has fields " << masterNames + << " processor " << Pstream::myProcNo() + << " has fields " << localNames << exit(FatalError); + } + } + + + fields.setSize(masterNames.size()); + + // Make sure to read in masterNames order. + + forAll(masterNames, i) + { + Info<< "Reading " << GeoField::typeName << ' ' << masterNames[i] + << endl; + + const IOobject& io = *fieldObjects[masterNames[i]]; + + fields.set + ( + i, + new GeoField + ( + IOobject + ( + io.name(), + io.instance(), + io.local(), + io.db(), + IOobject::MUST_READ, + IOobject::AUTO_WRITE, + io.registerObject() + ) + ) + ); + } + return masterNames; +} + + void calc ( const argList& args, @@ -90,6 +186,23 @@ void calc PtrList vtFlds; ReadFields(mesh, objects, vtFlds); + // Read vol-internal fields. + + PtrList vsiFlds; + ReadFields(mesh, objects, vsiFlds); + + PtrList vviFlds; + ReadFields(mesh, objects, vviFlds); + + PtrList vstiFlds; + ReadFields(mesh, objects, vstiFlds); + + PtrList vsymtiFlds; + ReadFields(mesh, objects, vsymtiFlds); + + PtrList vtiFlds; + ReadFields(mesh, objects, vtiFlds); + // Read surface fields. PtrList ssFlds; @@ -125,6 +238,24 @@ void calc PtrList ptFlds; ReadFields(pMesh, objects, ptFlds); + // Read uniform dimensioned fields + IOobjectList constantObjects(mesh, runTime.constant()); + + PtrList usFlds; + ReadUniformFields(constantObjects, usFlds, true); + + PtrList uvFlds; + ReadUniformFields(constantObjects, uvFlds, true); + + PtrList ustFlds; + ReadUniformFields(constantObjects, ustFlds, true); + + PtrList usymmtFlds; + ReadUniformFields(constantObjects, usymmtFlds, true); + + PtrList utFlds; + ReadUniformFields(constantObjects, utFlds, true); + fol.execute(true); } else @@ -394,6 +525,8 @@ int main(int argc, char *argv[]) Info<< endl; } + Info<< "End\n" << endl; + return 0; } diff --git a/bin/mpirunDebug b/bin/mpirunDebug index 5fa926ba..b9a284d6 100755 --- a/bin/mpirunDebug +++ b/bin/mpirunDebug @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------- # License @@ -126,8 +126,8 @@ if [ "$WM_PROJECT" ] then for i in \ - $HOME/.WM_PROJECT/$WM_PROJECT_VERSION \ - $HOME/.WM_PROJECT \ + $HOME/.$WM_PROJECT/$WM_PROJECT_VERSION \ + $HOME/.$WM_PROJECT \ $WM_PROJECT_DIR/etc \ ; do diff --git a/src/OpenFOAM/db/Time/subCycleTime.H b/src/OpenFOAM/db/Time/subCycleTime.H index 594ee56e..9bec0326 100644 --- a/src/OpenFOAM/db/Time/subCycleTime.H +++ b/src/OpenFOAM/db/Time/subCycleTime.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -75,6 +75,18 @@ public: //- End the sub-cycling and reset the time-state void endSubCycle(); + //- Return the total number of sub-cycles + label nSubCycles() const + { + return nSubCycles_; + } + + //- Return the current sub-cycle index + label index() const + { + return subCycleIndex_; + } + // Member operators diff --git a/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.C b/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.C index 918331d8..97ecb28e 100644 --- a/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.C +++ b/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,7 +34,7 @@ CompressibleTurbulenceModel const geometricOneField& alpha, const volScalarField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName @@ -51,7 +51,7 @@ CompressibleTurbulenceModel alpha, rho, U, - alphaPhi, + alphaRhoPhi, phi, transport, propertiesName diff --git a/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.H b/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.H index ba118c0b..38ba5f90 100644 --- a/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.H +++ b/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -75,7 +75,7 @@ public: const geometricOneField& alpha, const volScalarField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& trasport, const word& propertiesName diff --git a/src/TurbulenceModels/compressible/Make/options b/src/TurbulenceModels/compressible/Make/options index 5d1b7bc8..55388cb5 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 00000000..167c62e5 --- /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 . + +\*---------------------------------------------------------------------------*/ + +#include "buoyantKEpsilon.H" +#include "addToRunTimeSelectionTable.H" +#include "uniformDimensionedFields.H" +#include "fvcGrad.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace RASModels +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +buoyantKEpsilon::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 + ( + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName, + type + ), + + Cg_ + ( + dimensioned::lookupOrAddToDict + ( + "Cg", + this->coeffDict_, + 0.85 + ) + ) +{ + if (type == typeName) + { + kEpsilon::correctNut(); + this->printCoeffs(type); + } +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +bool buoyantKEpsilon::read() +{ + if (kEpsilon::read()) + { + Cg_.readIfPresent(this->coeffDict()); + + return true; + } + else + { + return false; + } +} + + +template +tmp +buoyantKEpsilon::Gcoef() const +{ + const uniformDimensionedVectorField& g = + this->mesh_.objectRegistry::template + lookupObject("g"); + + return + this->alpha_*(this->Cmu_/this->sigmak_)*this->k_ + *(g & fvc::grad(this->rho_))/(this->epsilon_ + this->epsilonMin_); +} + + +template +tmp +buoyantKEpsilon::kSource() const +{ + return -fvm::SuSp(Gcoef(), this->k_); +} + + +template +tmp +buoyantKEpsilon::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 00000000..d13f5d5d --- /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 . + +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 buoyantKEpsilon +: + public kEpsilon +{ + // 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 Gcoef() const; + + virtual tmp kSource() const; + virtual tmp 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/compressibleTurbulenceModel.C b/src/TurbulenceModels/compressible/compressibleTurbulenceModel.C index a9e7794c..1fbebad3 100644 --- a/src/TurbulenceModels/compressible/compressibleTurbulenceModel.C +++ b/src/TurbulenceModels/compressible/compressibleTurbulenceModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,6 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "compressibleTurbulenceModel.H" +#include "surfaceInterpolate.H" +#include "surfaceFields.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -39,7 +41,7 @@ Foam::compressibleTurbulenceModel::compressibleTurbulenceModel ( const volScalarField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const word& propertiesName ) @@ -47,7 +49,7 @@ Foam::compressibleTurbulenceModel::compressibleTurbulenceModel turbulenceModel ( U, - alphaPhi, + alphaRhoPhi, phi, propertiesName ), @@ -55,4 +57,20 @@ Foam::compressibleTurbulenceModel::compressibleTurbulenceModel {} +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::compressibleTurbulenceModel::phi() const +{ + if (phi_.dimensions() == dimensionSet(0, 3, -1, 0, 0)) + { + return phi_; + } + else + { + return phi_/fvc::interpolate(rho_); + } +} + + // ************************************************************************* // diff --git a/src/TurbulenceModels/compressible/compressibleTurbulenceModel.H b/src/TurbulenceModels/compressible/compressibleTurbulenceModel.H index 0754085f..533d8992 100644 --- a/src/TurbulenceModels/compressible/compressibleTurbulenceModel.H +++ b/src/TurbulenceModels/compressible/compressibleTurbulenceModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -85,7 +85,7 @@ public: ( const volScalarField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const word& propertiesName ); @@ -98,6 +98,9 @@ public: // Member functions + //- Return the volumetric flux field + virtual tmp phi() const; + //- Return the effective stress tensor including the laminar stress virtual tmp devRhoReff() const = 0; diff --git a/src/TurbulenceModels/compressible/compressibleTurbulenceModels.C b/src/TurbulenceModels/compressible/compressibleTurbulenceModels.C index 8d1542c2..81ed6aea 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/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.C b/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.C index 96179e22..ce93b0d5 100644 --- a/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.C +++ b/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,7 +34,7 @@ IncompressibleTurbulenceModel const geometricOneField& alpha, const geometricOneField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const TransportModel& transportModel, const word& propertiesName @@ -51,7 +51,7 @@ IncompressibleTurbulenceModel alpha, rho, U, - alphaPhi, + alphaRhoPhi, phi, transportModel, propertiesName diff --git a/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.H b/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.H index d774ff91..c0d4af42 100644 --- a/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.H +++ b/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -75,7 +75,7 @@ public: const geometricOneField& alpha, const geometricOneField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const TransportModel& trasportModel, const word& propertiesName diff --git a/src/TurbulenceModels/incompressible/incompressibleTurbulenceModel.C b/src/TurbulenceModels/incompressible/incompressibleTurbulenceModel.C index 232a31fc..3d53bb9d 100644 --- a/src/TurbulenceModels/incompressible/incompressibleTurbulenceModel.C +++ b/src/TurbulenceModels/incompressible/incompressibleTurbulenceModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,7 +39,7 @@ Foam::incompressibleTurbulenceModel::incompressibleTurbulenceModel ( const geometricOneField&, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const word& propertiesName ) @@ -47,7 +47,7 @@ Foam::incompressibleTurbulenceModel::incompressibleTurbulenceModel turbulenceModel ( U, - alphaPhi, + alphaRhoPhi, phi, propertiesName ) diff --git a/src/TurbulenceModels/incompressible/incompressibleTurbulenceModel.H b/src/TurbulenceModels/incompressible/incompressibleTurbulenceModel.H index 6876d88a..b3d25a8f 100644 --- a/src/TurbulenceModels/incompressible/incompressibleTurbulenceModel.H +++ b/src/TurbulenceModels/incompressible/incompressibleTurbulenceModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -86,7 +86,7 @@ public: ( const geometricOneField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const word& propertiesName ); diff --git a/src/TurbulenceModels/phaseIncompressible/LES/Niceno/NicenoKEqn.C b/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C similarity index 93% rename from src/TurbulenceModels/phaseIncompressible/LES/Niceno/NicenoKEqn.C rename to src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C index 30356990..3cddd50a 100644 --- a/src/TurbulenceModels/phaseIncompressible/LES/Niceno/NicenoKEqn.C +++ b/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C @@ -43,7 +43,7 @@ NicenoKEqn::NicenoKEqn const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName, @@ -55,7 +55,7 @@ NicenoKEqn::NicenoKEqn alpha, rho, U, - alphaPhi, + alphaRhoPhi, phi, transport, propertiesName, @@ -123,7 +123,7 @@ bool NicenoKEqn::read() template -const PhaseIncompressibleTurbulenceModel +const PhaseCompressibleTurbulenceModel < typename BasicTurbulenceModel::transportModel >& @@ -139,7 +139,7 @@ NicenoKEqn::gasTurbulence() const gasTurbulencePtr_ = &U.db() - .lookupObject > + .lookupObject > ( IOobject::groupName ( @@ -156,7 +156,7 @@ NicenoKEqn::gasTurbulence() const template void NicenoKEqn::correctNut() { - const PhaseIncompressibleTurbulenceModel& gasTurbulence = + const PhaseCompressibleTurbulenceModel& gasTurbulence = this->gasTurbulence(); this->nut_ = @@ -171,7 +171,7 @@ void NicenoKEqn::correctNut() template tmp NicenoKEqn::bubbleG() const { - const PhaseIncompressibleTurbulenceModel& gasTurbulence = + const PhaseCompressibleTurbulenceModel& gasTurbulence = this->gasTurbulence(); const transportModel& liquid = this->transport(); @@ -218,7 +218,7 @@ tmp NicenoKEqn::kSource() const const alphaField& alpha = this->alpha_; const rhoField& rho = this->rho_; - const PhaseIncompressibleTurbulenceModel& gasTurbulence = + const PhaseCompressibleTurbulenceModel& gasTurbulence = this->gasTurbulence(); const volScalarField phaseTransferCoeff(this->phaseTransferCoeff()); diff --git a/src/TurbulenceModels/phaseIncompressible/LES/Niceno/NicenoKEqn.H b/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.H similarity index 95% rename from src/TurbulenceModels/phaseIncompressible/LES/Niceno/NicenoKEqn.H rename to src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.H index e928e8e6..d9610669 100644 --- a/src/TurbulenceModels/phaseIncompressible/LES/Niceno/NicenoKEqn.H +++ b/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -81,7 +81,7 @@ class NicenoKEqn { // Private data - mutable const PhaseIncompressibleTurbulenceModel + mutable const PhaseCompressibleTurbulenceModel < typename BasicTurbulenceModel::transportModel > *gasTurbulencePtr_; @@ -90,7 +90,7 @@ class NicenoKEqn // Private Member Functions //- Return the turbulence model for the gas phase - const PhaseIncompressibleTurbulenceModel + const PhaseCompressibleTurbulenceModel < typename BasicTurbulenceModel::transportModel >& @@ -139,7 +139,7 @@ public: const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName = turbulenceModel::propertiesName, diff --git a/src/TurbulenceModels/phaseIncompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C b/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C similarity index 91% rename from src/TurbulenceModels/phaseIncompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C rename to src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C index 0d7331a9..688a5700 100644 --- a/src/TurbulenceModels/phaseIncompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C +++ b/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,7 +40,7 @@ SmagorinskyZhang::SmagorinskyZhang const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName, @@ -52,7 +52,7 @@ SmagorinskyZhang::SmagorinskyZhang alpha, rho, U, - alphaPhi, + alphaRhoPhi, phi, transport, propertiesName, @@ -98,7 +98,7 @@ bool SmagorinskyZhang::read() template -const PhaseIncompressibleTurbulenceModel +const PhaseCompressibleTurbulenceModel < typename BasicTurbulenceModel::transportModel >& @@ -114,7 +114,7 @@ SmagorinskyZhang::gasTurbulence() const gasTurbulencePtr_ = &U.db() - .lookupObject > + .lookupObject > ( IOobject::groupName ( @@ -131,7 +131,7 @@ SmagorinskyZhang::gasTurbulence() const template void SmagorinskyZhang::correctNut() { - const PhaseIncompressibleTurbulenceModel& gasTurbulence = + const PhaseCompressibleTurbulenceModel& gasTurbulence = this->gasTurbulence(); volScalarField k(this->k(fvc::grad(this->U_))); diff --git a/src/TurbulenceModels/phaseIncompressible/LES/SmagorinskyZhang/SmagorinskyZhang.H b/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.H similarity index 95% rename from src/TurbulenceModels/phaseIncompressible/LES/SmagorinskyZhang/SmagorinskyZhang.H rename to src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.H index 20f65da2..982aef66 100644 --- a/src/TurbulenceModels/phaseIncompressible/LES/SmagorinskyZhang/SmagorinskyZhang.H +++ b/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -79,7 +79,7 @@ class SmagorinskyZhang { // Private data - mutable const PhaseIncompressibleTurbulenceModel + mutable const PhaseCompressibleTurbulenceModel < typename BasicTurbulenceModel::transportModel > *gasTurbulencePtr_; @@ -88,7 +88,7 @@ class SmagorinskyZhang // Private Member Functions //- Return the turbulence model for the gas phase - const PhaseIncompressibleTurbulenceModel + const PhaseCompressibleTurbulenceModel < typename BasicTurbulenceModel::transportModel >& @@ -132,7 +132,7 @@ public: const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName = turbulenceModel::propertiesName, diff --git a/src/TurbulenceModels/phaseIncompressible/LES/continuousGasKEqn/continuousGasKEqn.C b/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C similarity index 98% rename from src/TurbulenceModels/phaseIncompressible/LES/continuousGasKEqn/continuousGasKEqn.C rename to src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C index b55fa887..96c1ad88 100644 --- a/src/TurbulenceModels/phaseIncompressible/LES/continuousGasKEqn/continuousGasKEqn.C +++ b/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C @@ -42,7 +42,7 @@ continuousGasKEqn::continuousGasKEqn const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName, @@ -54,7 +54,7 @@ continuousGasKEqn::continuousGasKEqn alpha, rho, U, - alphaPhi, + alphaRhoPhi, phi, transport, propertiesName, diff --git a/src/TurbulenceModels/phaseIncompressible/LES/continuousGasKEqn/continuousGasKEqn.H b/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.H similarity index 97% rename from src/TurbulenceModels/phaseIncompressible/LES/continuousGasKEqn/continuousGasKEqn.H rename to src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.H index 25a7d044..9d399069 100644 --- a/src/TurbulenceModels/phaseIncompressible/LES/continuousGasKEqn/continuousGasKEqn.H +++ b/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -124,7 +124,7 @@ public: const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName = turbulenceModel::propertiesName, diff --git a/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C b/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C index 70b60a64..35af8e74 100644 --- a/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C +++ b/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,7 +34,7 @@ PhaseCompressibleTurbulenceModel const volScalarField& alpha, const volScalarField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName @@ -51,7 +51,7 @@ PhaseCompressibleTurbulenceModel alpha, rho, U, - alphaPhi, + alphaRhoPhi, phi, transport, propertiesName @@ -68,7 +68,7 @@ Foam::PhaseCompressibleTurbulenceModel::New const volScalarField& alpha, const volScalarField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName @@ -88,7 +88,7 @@ Foam::PhaseCompressibleTurbulenceModel::New alpha, rho, U, - alphaPhi, + alphaRhoPhi, phi, transport, propertiesName @@ -97,4 +97,52 @@ Foam::PhaseCompressibleTurbulenceModel::New } +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +Foam::tmp +Foam::PhaseCompressibleTurbulenceModel::pPrime() const +{ + return tmp + ( + new volScalarField + ( + IOobject + ( + IOobject::groupName("pPrime", this->U_.group()), + this->runTime_.timeName(), + this->mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + this->mesh_, + dimensionedScalar("pPrimef", dimPressure, 0.0) + ) + ); +} + + +template +Foam::tmp +Foam::PhaseCompressibleTurbulenceModel::pPrimef() const +{ + return tmp + ( + new surfaceScalarField + ( + IOobject + ( + IOobject::groupName("pPrimef", this->U_.group()), + this->runTime_.timeName(), + this->mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + this->mesh_, + dimensionedScalar("pPrimef", dimPressure, 0.0) + ) + ); +} + + // ************************************************************************* // diff --git a/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.H b/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.H index 5eefb4ea..d39949c9 100644 --- a/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.H +++ b/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -75,7 +75,7 @@ public: const alphaField& alpha, const volScalarField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& trasport, const word& propertiesName @@ -90,7 +90,7 @@ public: const alphaField& alpha, const volScalarField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& trasportModel, const word& propertiesName = turbulenceModel::propertiesName @@ -139,6 +139,14 @@ public: { return mut(patchi) + mu(patchi); } + + //- Return the phase-pressure' + // (derivative of phase-pressure w.r.t. phase-fraction) + virtual tmp pPrime() const; + + //- Return the face-phase-pressure' + // (derivative of phase-pressure w.r.t. phase-fraction) + virtual tmp pPrimef() const; }; diff --git a/src/TurbulenceModels/phaseIncompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C b/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C similarity index 93% rename from src/TurbulenceModels/phaseIncompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C rename to src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C index 91c401ee..e9e02edf 100644 --- a/src/TurbulenceModels/phaseIncompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C +++ b/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C @@ -43,7 +43,7 @@ LaheyKEpsilon::LaheyKEpsilon const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName, @@ -55,7 +55,7 @@ LaheyKEpsilon::LaheyKEpsilon alpha, rho, U, - alphaPhi, + alphaRhoPhi, phi, transport, propertiesName, @@ -134,7 +134,7 @@ bool LaheyKEpsilon::read() template -const PhaseIncompressibleTurbulenceModel +const PhaseCompressibleTurbulenceModel < typename BasicTurbulenceModel::transportModel >& @@ -150,7 +150,7 @@ LaheyKEpsilon::gasTurbulence() const gasTurbulencePtr_ = &U.db() - .lookupObject > + .lookupObject > ( IOobject::groupName ( @@ -167,7 +167,7 @@ LaheyKEpsilon::gasTurbulence() const template void LaheyKEpsilon::correctNut() { - const PhaseIncompressibleTurbulenceModel& gasTurbulence = + const PhaseCompressibleTurbulenceModel& gasTurbulence = this->gasTurbulence(); this->nut_ = @@ -182,7 +182,7 @@ void LaheyKEpsilon::correctNut() template tmp LaheyKEpsilon::bubbleG() const { - const PhaseIncompressibleTurbulenceModel& gasTurbulence = + const PhaseCompressibleTurbulenceModel& gasTurbulence = this->gasTurbulence(); const transportModel& liquid = this->transport(); @@ -232,7 +232,7 @@ tmp LaheyKEpsilon::kSource() const const alphaField& alpha = this->alpha_; const rhoField& rho = this->rho_; - const PhaseIncompressibleTurbulenceModel& gasTurbulence = + const PhaseCompressibleTurbulenceModel& gasTurbulence = this->gasTurbulence(); const volScalarField phaseTransferCoeff(this->phaseTransferCoeff()); @@ -250,7 +250,7 @@ tmp LaheyKEpsilon::epsilonSource() const const alphaField& alpha = this->alpha_; const rhoField& rho = this->rho_; - const PhaseIncompressibleTurbulenceModel& gasTurbulence = + const PhaseCompressibleTurbulenceModel& gasTurbulence = this->gasTurbulence(); const volScalarField phaseTransferCoeff(this->phaseTransferCoeff()); diff --git a/src/TurbulenceModels/phaseIncompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.H b/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.H similarity index 95% rename from src/TurbulenceModels/phaseIncompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.H rename to src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.H index 7fc85093..53850b0f 100644 --- a/src/TurbulenceModels/phaseIncompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.H +++ b/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -82,7 +82,7 @@ class LaheyKEpsilon { // Private data - mutable const PhaseIncompressibleTurbulenceModel + mutable const PhaseCompressibleTurbulenceModel < typename BasicTurbulenceModel::transportModel > *gasTurbulencePtr_; @@ -91,7 +91,7 @@ class LaheyKEpsilon // Private Member Functions //- Return the turbulence model for the gas phase - const PhaseIncompressibleTurbulenceModel + const PhaseCompressibleTurbulenceModel < typename BasicTurbulenceModel::transportModel >& @@ -142,7 +142,7 @@ public: const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName = turbulenceModel::propertiesName, diff --git a/src/TurbulenceModels/phaseIncompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C b/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C similarity index 99% rename from src/TurbulenceModels/phaseIncompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C rename to src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C index b3b453d6..0ae2dcff 100644 --- a/src/TurbulenceModels/phaseIncompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C +++ b/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C @@ -43,7 +43,7 @@ continuousGasKEpsilon::continuousGasKEpsilon const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName, @@ -55,7 +55,7 @@ continuousGasKEpsilon::continuousGasKEpsilon alpha, rho, U, - alphaPhi, + alphaRhoPhi, phi, transport, propertiesName, diff --git a/src/TurbulenceModels/phaseIncompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.H b/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.H similarity index 97% rename from src/TurbulenceModels/phaseIncompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.H rename to src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.H index 7cf70368..403e6894 100644 --- a/src/TurbulenceModels/phaseIncompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.H +++ b/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -130,7 +130,7 @@ public: const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName = turbulenceModel::propertiesName, diff --git a/src/TurbulenceModels/phaseIncompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C b/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C similarity index 99% rename from src/TurbulenceModels/phaseIncompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C rename to src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C index 52cc2eca..26df387f 100644 --- a/src/TurbulenceModels/phaseIncompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C +++ b/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C @@ -47,7 +47,7 @@ mixtureKEpsilon::mixtureKEpsilon const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName, @@ -60,7 +60,7 @@ mixtureKEpsilon::mixtureKEpsilon alpha, rho, U, - alphaPhi, + alphaRhoPhi, phi, transport, propertiesName @@ -547,7 +547,7 @@ void mixtureKEpsilon::correct() initMixtureFields(); // Local references to gas-phase properties - const surfaceScalarField& phig = this->phi_; + tmp phig = this->phi(); const volVectorField& Ug = this->U_; const volScalarField& alphag = this->alpha_; volScalarField& kg = this->k_; @@ -557,7 +557,7 @@ void mixtureKEpsilon::correct() // Local references to liquid-phase properties mixtureKEpsilon& liquidTurbulence = this->liquidTurbulence(); - const surfaceScalarField& phil = liquidTurbulence.phi_; + tmp phil = liquidTurbulence.phi(); const volVectorField& Ul = liquidTurbulence.U_; const volScalarField& alphal = liquidTurbulence.alpha_; volScalarField& kl = liquidTurbulence.k_; diff --git a/src/TurbulenceModels/phaseIncompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.H b/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.H similarity index 98% rename from src/TurbulenceModels/phaseIncompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.H rename to src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.H index 9efad277..014f2b20 100644 --- a/src/TurbulenceModels/phaseIncompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.H +++ b/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -215,7 +215,7 @@ public: const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName = turbulenceModel::propertiesName, diff --git a/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C b/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C index 003c8679..16331808 100644 --- a/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C +++ b/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,7 +34,7 @@ PhaseIncompressibleTurbulenceModel const volScalarField& alpha, const geometricOneField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const TransportModel& transportModel, const word& propertiesName @@ -51,7 +51,7 @@ PhaseIncompressibleTurbulenceModel alpha, rho, U, - alphaPhi, + alphaRhoPhi, phi, transportModel, propertiesName @@ -67,7 +67,7 @@ Foam::PhaseIncompressibleTurbulenceModel::New ( const volScalarField& alpha, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const TransportModel& transportModel, const word& propertiesName @@ -87,7 +87,7 @@ Foam::PhaseIncompressibleTurbulenceModel::New alpha, geometricOneField(), U, - alphaPhi, + alphaRhoPhi, phi, transportModel, propertiesName diff --git a/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.H b/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.H index c15b54e9..836deaaa 100644 --- a/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.H +++ b/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -75,7 +75,7 @@ public: const alphaField& alpha, const geometricOneField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const TransportModel& trasportModel, const word& propertiesName @@ -89,7 +89,7 @@ public: ( const alphaField& alpha, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const TransportModel& trasportModel, const word& propertiesName = turbulenceModel::propertiesName diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C b/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C index 1019a3ac..11ab976a 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C @@ -46,7 +46,7 @@ Foam::LESModel::LESModel const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName @@ -57,7 +57,7 @@ Foam::LESModel::LESModel alpha, rho, U, - alphaPhi, + alphaRhoPhi, phi, transport, propertiesName @@ -104,7 +104,7 @@ Foam::LESModel::New const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName @@ -154,7 +154,7 @@ Foam::LESModel::New return autoPtr ( - cstrIter()(alpha, rho, U, alphaPhi, phi, transport, propertiesName) + cstrIter()(alpha, rho, U, alphaRhoPhi, phi, transport, propertiesName) ); } diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.H b/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.H index 3fc24b42..cefb8dd7 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.H +++ b/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -121,12 +121,12 @@ public: const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName ), - (alpha, rho, U, alphaPhi, phi, transport, propertiesName) + (alpha, rho, U, alphaRhoPhi, phi, transport, propertiesName) ); @@ -139,7 +139,7 @@ public: const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName @@ -154,7 +154,7 @@ public: const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName = turbulenceModel::propertiesName diff --git a/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.C b/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.C index facf0ead..5f4379d8 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.C +++ b/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,7 +40,7 @@ Smagorinsky::Smagorinsky const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName, @@ -53,7 +53,7 @@ Smagorinsky::Smagorinsky alpha, rho, U, - alphaPhi, + alphaRhoPhi, phi, transport, propertiesName diff --git a/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.H b/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.H index c9e785a1..0c052170 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.H +++ b/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -122,7 +122,7 @@ public: const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName = turbulenceModel::propertiesName, diff --git a/src/TurbulenceModels/turbulenceModels/LES/eddyViscosity/LESeddyViscosity.C b/src/TurbulenceModels/turbulenceModels/LES/eddyViscosity/LESeddyViscosity.C index 5c30bcba..b3d1c98f 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/eddyViscosity/LESeddyViscosity.C +++ b/src/TurbulenceModels/turbulenceModels/LES/eddyViscosity/LESeddyViscosity.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -41,7 +41,7 @@ LESeddyViscosity::LESeddyViscosity const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName @@ -53,7 +53,7 @@ LESeddyViscosity::LESeddyViscosity alpha, rho, U, - alphaPhi, + alphaRhoPhi, phi, transport, propertiesName diff --git a/src/TurbulenceModels/turbulenceModels/LES/eddyViscosity/LESeddyViscosity.H b/src/TurbulenceModels/turbulenceModels/LES/eddyViscosity/LESeddyViscosity.H index 780aaea8..28efe269 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/eddyViscosity/LESeddyViscosity.H +++ b/src/TurbulenceModels/turbulenceModels/LES/eddyViscosity/LESeddyViscosity.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -87,7 +87,7 @@ public: const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName = turbulenceModel::propertiesName diff --git a/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.C b/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.C index 0e1f41d7..e73aaae1 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.C +++ b/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,7 +40,7 @@ kEqn::kEqn const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName, @@ -53,7 +53,7 @@ kEqn::kEqn alpha, rho, U, - alphaPhi, + alphaRhoPhi, phi, transport, propertiesName @@ -163,14 +163,13 @@ void kEqn::correct() // Local references const alphaField& alpha = this->alpha_; const rhoField& rho = this->rho_; - const surfaceScalarField& alphaPhi = this->alphaPhi_; - const surfaceScalarField& phi = this->phi_; + const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; const volVectorField& U = this->U_; volScalarField& nut = this->nut_; LESeddyViscosity::correct(); - volScalarField divU(fvc::div(fvc::absolute(phi/fvc::interpolate(rho), U))); + volScalarField divU(fvc::div(fvc::absolute(this->phi(), U))); tmp tgradU(fvc::grad(U)); volScalarField G(this->GName(), nut*(tgradU() && dev(twoSymm(tgradU())))); @@ -179,8 +178,8 @@ void kEqn::correct() tmp kEqn ( fvm::ddt(alpha, rho, k_) - + fvm::div(alphaPhi, k_) - - fvm::Sp(fvc::ddt(alpha, rho) + fvc::div(alphaPhi), k_) + + fvm::div(alphaRhoPhi, k_) + - fvm::Sp(fvc::ddt(alpha, rho) + fvc::div(alphaRhoPhi), k_) - fvm::laplacian(alpha*rho*DkEff(), k_) == alpha*rho*G diff --git a/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.H b/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.H index 47525e46..6a2a307d 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.H +++ b/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -125,7 +125,7 @@ public: const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName = turbulenceModel::propertiesName, diff --git a/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C b/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C index ef11969f..ada33eb5 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -46,7 +46,7 @@ Foam::RASModel::RASModel const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName @@ -57,7 +57,7 @@ Foam::RASModel::RASModel alpha, rho, U, - alphaPhi, + alphaRhoPhi, phi, transport, propertiesName @@ -116,7 +116,7 @@ Foam::RASModel::New const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName @@ -166,7 +166,7 @@ Foam::RASModel::New return autoPtr ( - cstrIter()(alpha, rho, U, alphaPhi, phi, transport, propertiesName) + cstrIter()(alpha, rho, U, alphaRhoPhi, phi, transport, propertiesName) ); } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.H b/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.H index 6e1636d0..51acd768 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.H +++ b/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -123,12 +123,12 @@ public: const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName ), - (alpha, rho, U, alphaPhi, phi, transport, propertiesName) + (alpha, rho, U, alphaRhoPhi, phi, transport, propertiesName) ); @@ -141,7 +141,7 @@ public: const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName @@ -156,7 +156,7 @@ public: const alphaField& alpha, const rhoField& rho, const volVectorField& U, - const surfaceScalarField& alphaPhi, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName = turbulenceModel::propertiesName diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index 1013dc56..226d6ab3 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -36,6 +36,10 @@ License namespace Foam { +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +scalar epsilonWallFunctionFvPatchScalarField::tolerance_ = 1e-5; + // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // void epsilonWallFunctionFvPatchScalarField::checkType() @@ -477,17 +481,17 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs scalarField& epsilonf = *this; - // only set the values if the weights are < 1 - tolerance + // only set the values if the weights are > tolerance forAll(weights, facei) { scalar w = weights[facei]; - if (w < 1.0 - 1e-6) + if (w > tolerance_) { label celli = patch().faceCells()[facei]; - G[celli] = w*G[celli] + (1.0 - w)*G0[celli]; - epsilon[celli] = w*epsilon[celli] + (1.0 - w)*epsilon0[celli]; + G[celli] = (1.0 - w)*G[celli] + w*G0[celli]; + epsilon[celli] = (1.0 - w)*epsilon[celli] + w*epsilon0[celli]; epsilonf[facei] = epsilon[celli]; } } @@ -523,8 +527,6 @@ void epsilonWallFunctionFvPatchScalarField::manipulateMatrix return; } - // filter weights so that we only apply the constraint where the - // weight > SMALL DynamicList