diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C index 222aa0ea92..0f32659545 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C @@ -117,7 +117,7 @@ Foam::tmp Foam::PDRDragModels::basic::Dcu() const { const volScalarField& betav = U_.db().lookupObject("betav"); - return rho_*CR_*mag(U_) + (Csu*I)*betav*turbulence_.muEff()*Aw2_; + return (0.5*rho_)*CR_*mag(U_) + (Csu*I)*betav*turbulence_.muEff()*Aw2_; } @@ -125,8 +125,8 @@ Foam::tmp Foam::PDRDragModels::basic::Gk() const { const volScalarField& betav = U_.db().lookupObject("betav"); - return - rho_*mag(U_)*(U_ & CT_ & U_) + return + (0.5*rho_)*mag(U_)*(U_ & CT_ & U_) + Csk*betav*turbulence_.muEff()*Aw2_*magSqr(U_); } diff --git a/applications/solvers/incompressible/boundaryFoam/Make/options b/applications/solvers/incompressible/boundaryFoam/Make/options index 835189da6d..e7594d177f 100644 --- a/applications/solvers/incompressible/boundaryFoam/Make/options +++ b/applications/solvers/incompressible/boundaryFoam/Make/options @@ -1,7 +1,9 @@ EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ + -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ diff --git a/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C b/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C index 19933091a0..4ab797dc20 100644 --- a/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C +++ b/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C @@ -37,8 +37,8 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/RASModel/RASModel.H" +#include "singlePhaseTransportModel.H" +#include "RASModel.H" #include "wallFvPatch.H" #include "makeGraph.H" diff --git a/applications/solvers/incompressible/channelFoam/Make/files b/applications/solvers/incompressible/channelFoam/Make/files new file mode 100644 index 0000000000..35d5b4e617 --- /dev/null +++ b/applications/solvers/incompressible/channelFoam/Make/files @@ -0,0 +1,3 @@ +channelFoam.C + +EXE = $(FOAM_APPBIN)/channelFoam diff --git a/applications/solvers/incompressible/oodles/Make/options b/applications/solvers/incompressible/channelFoam/Make/options similarity index 59% rename from applications/solvers/incompressible/oodles/Make/options rename to applications/solvers/incompressible/channelFoam/Make/options index dd71fa8e53..594493ce21 100644 --- a/applications/solvers/incompressible/oodles/Make/options +++ b/applications/solvers/incompressible/channelFoam/Make/options @@ -1,9 +1,10 @@ EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels/LES \ + -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels/incompressible/LES/LESModel \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ diff --git a/applications/solvers/incompressible/channelOodles/channelOodles.C b/applications/solvers/incompressible/channelFoam/channelFoam.C similarity index 96% rename from applications/solvers/incompressible/channelOodles/channelOodles.C rename to applications/solvers/incompressible/channelFoam/channelFoam.C index 00be546b6e..d21267b350 100644 --- a/applications/solvers/incompressible/channelOodles/channelOodles.C +++ b/applications/solvers/incompressible/channelFoam/channelFoam.C @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Application - oodles + channelFoam Description Incompressible LES solver for flow in a channel. @@ -31,8 +31,8 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/LESModel/LESModel.H" +#include "singlePhaseTransportModel.H" +#include "LESModel.H" #include "IFstream.H" #include "OFstream.H" #include "Random.H" diff --git a/applications/solvers/incompressible/channelOodles/createFields.H b/applications/solvers/incompressible/channelFoam/createFields.H similarity index 100% rename from applications/solvers/incompressible/channelOodles/createFields.H rename to applications/solvers/incompressible/channelFoam/createFields.H diff --git a/applications/solvers/incompressible/channelOodles/createGradP.H b/applications/solvers/incompressible/channelFoam/createGradP.H similarity index 100% rename from applications/solvers/incompressible/channelOodles/createGradP.H rename to applications/solvers/incompressible/channelFoam/createGradP.H diff --git a/applications/solvers/incompressible/channelOodles/readTransportProperties.H b/applications/solvers/incompressible/channelFoam/readTransportProperties.H similarity index 100% rename from applications/solvers/incompressible/channelOodles/readTransportProperties.H rename to applications/solvers/incompressible/channelFoam/readTransportProperties.H diff --git a/applications/solvers/incompressible/channelOodles/writeGradP.H b/applications/solvers/incompressible/channelFoam/writeGradP.H similarity index 100% rename from applications/solvers/incompressible/channelOodles/writeGradP.H rename to applications/solvers/incompressible/channelFoam/writeGradP.H diff --git a/applications/solvers/incompressible/channelOodles/Make/files b/applications/solvers/incompressible/channelOodles/Make/files deleted file mode 100644 index 62d0719790..0000000000 --- a/applications/solvers/incompressible/channelOodles/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -channelOodles.C - -EXE = $(FOAM_APPBIN)/channelOodles diff --git a/applications/solvers/incompressible/channelOodles/Make/options b/applications/solvers/incompressible/channelOodles/Make/options deleted file mode 100644 index 7f55ccc3ed..0000000000 --- a/applications/solvers/incompressible/channelOodles/Make/options +++ /dev/null @@ -1,13 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels/LES \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude \ - -I../oodles - -EXE_LIBS = \ - -lincompressibleLESModels \ - -lincompressibleTransportModels \ - -lfiniteVolume \ - -lmeshTools diff --git a/applications/solvers/incompressible/icoDyMFoam/Make/files b/applications/solvers/incompressible/icoDyMFoam/Make/files deleted file mode 100644 index 22873bb943..0000000000 --- a/applications/solvers/incompressible/icoDyMFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -icoDyMFoam.C - -EXE = $(FOAM_APPBIN)/icoDyMFoam diff --git a/applications/solvers/incompressible/icoDyMFoam/Make/options b/applications/solvers/incompressible/icoDyMFoam/Make/options deleted file mode 100644 index aa1b2f2b09..0000000000 --- a/applications/solvers/incompressible/icoDyMFoam/Make/options +++ /dev/null @@ -1,11 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -EXE_LIBS = \ - -ldynamicFvMesh \ - -ldynamicMesh \ - -lmeshTools \ - -lfiniteVolume diff --git a/applications/solvers/incompressible/icoDyMFoam/UEqn.H b/applications/solvers/incompressible/icoDyMFoam/UEqn.H deleted file mode 100644 index 8ca5f83e4a..0000000000 --- a/applications/solvers/incompressible/icoDyMFoam/UEqn.H +++ /dev/null @@ -1,16 +0,0 @@ - fvVectorMatrix UEqn - ( - fvm::ddt(U) - + fvm::div(phi, U) - - fvm::laplacian(nu, U) - ); - - if (ocorr != nOuterCorr-1) - { - UEqn.relax(); - } - - if (momentumPredictor) - { - solve(UEqn == -fvc::grad(p)); - } diff --git a/applications/solvers/incompressible/icoDyMFoam/checkTotalVolume.H b/applications/solvers/incompressible/icoDyMFoam/checkTotalVolume.H deleted file mode 100644 index 1ee1e84fd1..0000000000 --- a/applications/solvers/incompressible/icoDyMFoam/checkTotalVolume.H +++ /dev/null @@ -1,6 +0,0 @@ - scalar newTotalVolume = sum(mesh.V()); - scalar totalVolRatio = newTotalVolume/totalVolume; - - Info << "Total volume change: " << totalVolRatio - 1 << endl; - - totalVolume = newTotalVolume; diff --git a/applications/solvers/incompressible/icoDyMFoam/createFields.H b/applications/solvers/incompressible/icoDyMFoam/createFields.H deleted file mode 100644 index b5368ae138..0000000000 --- a/applications/solvers/incompressible/icoDyMFoam/createFields.H +++ /dev/null @@ -1,72 +0,0 @@ - Info<< "Reading transportProperties\n" << endl; - - IOdictionary transportProperties - ( - IOobject - ( - "transportProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ) - ); - - dimensionedScalar nu - ( - transportProperties.lookup("nu") - ); - - - Info<< "Reading field p\n" << endl; - volScalarField p - ( - IOobject - ( - "p", - 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 - ); - -# include "createPhi.H" - - - label pRefCell = 0; - scalar pRefValue = 0.0; - setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue); - - - Info<< "Reading field rAU if present\n" << endl; - volScalarField rAU - ( - IOobject - ( - "rAU", - runTime.timeName(), - mesh, - IOobject::READ_IF_PRESENT, - IOobject::AUTO_WRITE - ), - mesh, - runTime.deltaT(), - zeroGradientFvPatchScalarField::typeName - ); diff --git a/applications/solvers/incompressible/nonNewtonianIcoFoam/Make/options b/applications/solvers/incompressible/nonNewtonianIcoFoam/Make/options index 2c8c1447c3..8dbc9ba286 100644 --- a/applications/solvers/incompressible/nonNewtonianIcoFoam/Make/options +++ b/applications/solvers/incompressible/nonNewtonianIcoFoam/Make/options @@ -1,6 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/transportModels + -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel EXE_LIBS = \ -lfiniteVolume \ diff --git a/applications/solvers/incompressible/nonNewtonianIcoFoam/nonNewtonianIcoFoam.C b/applications/solvers/incompressible/nonNewtonianIcoFoam/nonNewtonianIcoFoam.C index 0f236a9017..db6342297a 100644 --- a/applications/solvers/incompressible/nonNewtonianIcoFoam/nonNewtonianIcoFoam.C +++ b/applications/solvers/incompressible/nonNewtonianIcoFoam/nonNewtonianIcoFoam.C @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" +#include "singlePhaseTransportModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/incompressible/oodles/Make/files b/applications/solvers/incompressible/oodles/Make/files deleted file mode 100644 index a395950ae5..0000000000 --- a/applications/solvers/incompressible/oodles/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -oodles.C - -EXE = $(FOAM_APPBIN)/oodles diff --git a/applications/solvers/incompressible/oodles/oodles.C b/applications/solvers/incompressible/oodles/oodles.C deleted file mode 100644 index 0714bf8515..0000000000 --- a/applications/solvers/incompressible/oodles/oodles.C +++ /dev/null @@ -1,128 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Application - oodles - -Description - Incompressible LES solver. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/transportModel/transportModel.H" -#include "incompressible/LESModel/LESModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "setRootCase.H" - #include "createTime.H" - #include "createMeshNoClear.H" - #include "createFields.H" - #include "initContinuityErrs.H" - - Info<< "\nStarting time loop\n" << endl; - - for (runTime++; !runTime.end(); runTime++) - { - Info<< "Time = " << runTime.timeName() << nl << endl; - - #include "readPISOControls.H" - #include "CourantNo.H" - - sgsModel->correct(); - - fvVectorMatrix UEqn - ( - fvm::ddt(U) - + fvm::div(phi, U) - + sgsModel->divDevBeff(U) - ); - - // Optionally ensure diagonal-dominance of the momentum matrix - UEqn.relax(); - - if (momentumPredictor) - { - solve(UEqn == -fvc::grad(p)); - } - - // --- PISO loop - for (int corr=0; corr turbulence + autoPtr turbulence ( - incompressible::RASModel::New(U, phi, laminarTransport) + incompressible::turbulenceModel::New(U, phi, laminarTransport) ); Info<< "Reading field rAU if present\n" << endl; diff --git a/applications/solvers/incompressible/icoDyMFoam/icoDyMFoam.C b/applications/solvers/incompressible/pimpleDyMFoam/pimpleDyMFoam.C similarity index 87% rename from applications/solvers/incompressible/icoDyMFoam/icoDyMFoam.C rename to applications/solvers/incompressible/pimpleDyMFoam/pimpleDyMFoam.C index f34843f1ba..42aae85309 100644 --- a/applications/solvers/incompressible/icoDyMFoam/icoDyMFoam.C +++ b/applications/solvers/incompressible/pimpleDyMFoam/pimpleDyMFoam.C @@ -23,15 +23,19 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Application - icoDyMFoam + turbDyMFoam Description - Transient solver for incompressible, laminar flow of Newtonian fluids - with moving mesh. + Transient solver for incompressible, flow of Newtonian fluids + on a moving mesh using the PIMPLE (merged PISO-SIMPLE) algorithm. + + Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "singlePhaseTransportModel.H" +#include "turbulenceModel.H" #include "dynamicFvMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -84,7 +88,10 @@ int main(int argc, char *argv[]) // --- PIMPLE loop for (int ocorr=0; ocorrcorrect(); + runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/solvers/incompressible/icoDyMFoam/readControls.H b/applications/solvers/incompressible/pimpleDyMFoam/readControls.H similarity index 100% rename from applications/solvers/incompressible/icoDyMFoam/readControls.H rename to applications/solvers/incompressible/pimpleDyMFoam/readControls.H diff --git a/applications/solvers/incompressible/pimpleFoam/Make/options b/applications/solvers/incompressible/pimpleFoam/Make/options index 8a31f7e5ab..d0e8dd740d 100644 --- a/applications/solvers/incompressible/pimpleFoam/Make/options +++ b/applications/solvers/incompressible/pimpleFoam/Make/options @@ -1,10 +1,12 @@ EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ - -I$(LIB_SRC)/transportModels + -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lincompressibleRASModels \ -lincompressibleTransportModels \ + -lincompressibleRASModels \ + -lincompressibleLESModels \ -lfiniteVolume \ -lmeshTools diff --git a/applications/solvers/incompressible/pimpleFoam/createFields.H b/applications/solvers/incompressible/pimpleFoam/createFields.H index d334e4a31f..e4127150c0 100644 --- a/applications/solvers/incompressible/pimpleFoam/createFields.H +++ b/applications/solvers/incompressible/pimpleFoam/createFields.H @@ -36,7 +36,7 @@ setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue); singlePhaseTransportModel laminarTransport(U, phi); -autoPtr turbulence +autoPtr turbulence ( - incompressible::RASModel::New(U, phi, laminarTransport) + incompressible::turbulenceModel::New(U, phi, laminarTransport) ); diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C index f3c1614239..bcc60b7b5e 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C @@ -26,14 +26,16 @@ Application pimpleFoam Description - Large time-step transient solver for incompressible, turbulent flow using - the PIMPLE (merged PISO-SIMPLE) algorithm. + Large time-step transient solver for incompressible, flow using the PIMPLE + (merged PISO-SIMPLE) algorithm. + + Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/RASModel/RASModel.H" +#include "singlePhaseTransportModel.H" +#include "turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -58,14 +60,14 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; - if (nOuterCorr != 1) - { - p.storePrevIter(); - } - // --- Pressure-velocity PIMPLE corrector loop for (int oCorr=0; oCorr sgsModel + autoPtr turbulence ( - incompressible::LESModel::New(U, phi, laminarTransport) + incompressible::turbulenceModel::New(U, phi, laminarTransport) ); diff --git a/applications/solvers/incompressible/turbFoam/turbFoam.C b/applications/solvers/incompressible/pisoFoam/pisoFoam.C similarity index 93% rename from applications/solvers/incompressible/turbFoam/turbFoam.C rename to applications/solvers/incompressible/pisoFoam/pisoFoam.C index d32ee3be69..1c8a534db2 100644 --- a/applications/solvers/incompressible/turbFoam/turbFoam.C +++ b/applications/solvers/incompressible/pisoFoam/pisoFoam.C @@ -26,13 +26,15 @@ Application turbFoam Description - Transient solver for incompressible, turbulent flow. + Transient solver for incompressible flow. + + Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/RASModel/RASModel.H" +#include "singlePhaseTransportModel.H" +#include "turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -80,7 +82,7 @@ int main(int argc, char *argv[]) volScalarField rUA = 1.0/UEqn.A(); U = rUA*UEqn.H(); - phi = (fvc::interpolate(U) & mesh.Sf()) + phi = (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, U, phi); adjustPhi(phi, U, p); diff --git a/applications/solvers/incompressible/simpleFoam/Make/options b/applications/solvers/incompressible/simpleFoam/Make/options index 8a31f7e5ab..a3c8f75dee 100644 --- a/applications/solvers/incompressible/simpleFoam/Make/options +++ b/applications/solvers/incompressible/simpleFoam/Make/options @@ -1,7 +1,9 @@ EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ - -I$(LIB_SRC)/transportModels + -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ + -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -lincompressibleRASModels \ diff --git a/applications/solvers/incompressible/simpleFoam/simpleFoam.C b/applications/solvers/incompressible/simpleFoam/simpleFoam.C index 7c378fe8ff..4a0c5c4bd4 100644 --- a/applications/solvers/incompressible/simpleFoam/simpleFoam.C +++ b/applications/solvers/incompressible/simpleFoam/simpleFoam.C @@ -31,8 +31,8 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/RASModel/RASModel.H" +#include "singlePhaseTransportModel.H" +#include "RASModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/incompressible/turbDyMFoam/Make/files b/applications/solvers/incompressible/turbDyMFoam/Make/files deleted file mode 100644 index 5297b027d0..0000000000 --- a/applications/solvers/incompressible/turbDyMFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -turbDyMFoam.C - -EXE = $(FOAM_APPBIN)/turbDyMFoam diff --git a/applications/solvers/incompressible/turbDyMFoam/correctPhi.H b/applications/solvers/incompressible/turbDyMFoam/correctPhi.H deleted file mode 100644 index 493c4e0929..0000000000 --- a/applications/solvers/incompressible/turbDyMFoam/correctPhi.H +++ /dev/null @@ -1,44 +0,0 @@ -{ - wordList pcorrTypes(p.boundaryField().types()); - - for (label i=0; icorrect(); - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return(0); -} - - -// ************************************************************************* // diff --git a/applications/solvers/incompressible/turbFoam/Make/files b/applications/solvers/incompressible/turbFoam/Make/files deleted file mode 100644 index c3d6346165..0000000000 --- a/applications/solvers/incompressible/turbFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -turbFoam.C - -EXE = $(FOAM_APPBIN)/turbFoam diff --git a/applications/solvers/incompressible/turbFoam/createFields.H b/applications/solvers/incompressible/turbFoam/createFields.H deleted file mode 100644 index 8bcbfe7a75..0000000000 --- a/applications/solvers/incompressible/turbFoam/createFields.H +++ /dev/null @@ -1,42 +0,0 @@ - Info<< "Reading field p\n" << endl; - volScalarField p - ( - IOobject - ( - "p", - 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 - ); - -# include "createPhi.H" - - - label pRefCell = 0; - scalar pRefValue = 0.0; - setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue); - - - singlePhaseTransportModel laminarTransport(U, phi); - - autoPtr turbulence - ( - incompressible::RASModel::New(U, phi, laminarTransport) - ); diff --git a/applications/solvers/multiphase/lesCavitatingFoam/CourantNo.H b/applications/solvers/multiphase/cavitatingFoam/CourantNo.H similarity index 100% rename from applications/solvers/multiphase/lesCavitatingFoam/CourantNo.H rename to applications/solvers/multiphase/cavitatingFoam/CourantNo.H diff --git a/applications/solvers/multiphase/cavitatingFoam/Make/files b/applications/solvers/multiphase/cavitatingFoam/Make/files new file mode 100644 index 0000000000..832391f03f --- /dev/null +++ b/applications/solvers/multiphase/cavitatingFoam/Make/files @@ -0,0 +1,3 @@ +cavitatingFoam.C + +EXE = $(FOAM_APPBIN)/cavitatingFoam diff --git a/applications/solvers/multiphase/rasCavitatingFoam/Make/options b/applications/solvers/multiphase/cavitatingFoam/Make/options similarity index 81% rename from applications/solvers/multiphase/rasCavitatingFoam/Make/options rename to applications/solvers/multiphase/cavitatingFoam/Make/options index a694ac2179..9cb749d63c 100644 --- a/applications/solvers/multiphase/rasCavitatingFoam/Make/options +++ b/applications/solvers/multiphase/cavitatingFoam/Make/options @@ -3,12 +3,12 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ + -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/thermophysicalModels/barotropicCompressibilityModel/lnInclude EXE_LIBS = \ -lincompressibleTransportModels \ -lincompressibleRASModels \ + -lincompressibleLESModels \ -lfiniteVolume \ -lbarotropicCompressibilityModel - diff --git a/applications/solvers/multiphase/rasCavitatingFoam/UEqn.H b/applications/solvers/multiphase/cavitatingFoam/UEqn.H similarity index 95% rename from applications/solvers/multiphase/rasCavitatingFoam/UEqn.H rename to applications/solvers/multiphase/cavitatingFoam/UEqn.H index 374e410c2e..11eaf617bc 100644 --- a/applications/solvers/multiphase/rasCavitatingFoam/UEqn.H +++ b/applications/solvers/multiphase/cavitatingFoam/UEqn.H @@ -14,6 +14,8 @@ - fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) ); + UEqn.relax(); + if (momentumPredictor) { solve(UEqn == -fvc::grad(p)); diff --git a/applications/solvers/multiphase/lesCavitatingFoam/lesCavitatingFoam.C b/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C similarity index 93% rename from applications/solvers/multiphase/lesCavitatingFoam/lesCavitatingFoam.C rename to applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C index 2ad2dfb04f..36ced22ada 100644 --- a/applications/solvers/multiphase/lesCavitatingFoam/lesCavitatingFoam.C +++ b/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C @@ -23,17 +23,19 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Application - lesCavitatingFoam + cavitatingFoam Description - Transient cavitation code with LES turbulence. + Transient cavitation code based on the barotropic equation of state. + + Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" #include "barotropicCompressibilityModel.H" #include "twoPhaseMixture.H" -#include "incompressible/LESModel/LESModel.H" +#include "turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -64,8 +66,6 @@ int main(int argc, char *argv[]) runTime++; Info<< "Time = " << runTime.timeName() << nl << endl; - turbulence->correct(); - for (int outerCorr=0; outerCorrcorrect(); + runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/solvers/multiphase/lesCavitatingFoam/continuityErrs.H b/applications/solvers/multiphase/cavitatingFoam/continuityErrs.H similarity index 100% rename from applications/solvers/multiphase/lesCavitatingFoam/continuityErrs.H rename to applications/solvers/multiphase/cavitatingFoam/continuityErrs.H diff --git a/applications/solvers/multiphase/rasCavitatingFoam/createFields.H b/applications/solvers/multiphase/cavitatingFoam/createFields.H similarity index 90% rename from applications/solvers/multiphase/rasCavitatingFoam/createFields.H rename to applications/solvers/multiphase/cavitatingFoam/createFields.H index 37ff01d41f..dc2f5e6961 100644 --- a/applications/solvers/multiphase/rasCavitatingFoam/createFields.H +++ b/applications/solvers/multiphase/cavitatingFoam/createFields.H @@ -78,8 +78,8 @@ twoPhaseMixture twoPhaseProperties(U, phiv, "gamma"); - // Create RAS turbulence model - autoPtr turbulence + // Create incompressible turbulence model + autoPtr turbulence ( - incompressible::RASModel::New(U, phiv, twoPhaseProperties) + incompressible::turbulenceModel::New(U, phiv, twoPhaseProperties) ); diff --git a/applications/solvers/multiphase/lesCavitatingFoam/gammaPsi.H b/applications/solvers/multiphase/cavitatingFoam/gammaPsi.H similarity index 100% rename from applications/solvers/multiphase/lesCavitatingFoam/gammaPsi.H rename to applications/solvers/multiphase/cavitatingFoam/gammaPsi.H diff --git a/applications/solvers/multiphase/lesCavitatingFoam/pEqn.H b/applications/solvers/multiphase/cavitatingFoam/pEqn.H similarity index 100% rename from applications/solvers/multiphase/lesCavitatingFoam/pEqn.H rename to applications/solvers/multiphase/cavitatingFoam/pEqn.H diff --git a/applications/solvers/multiphase/lesCavitatingFoam/readControls.H b/applications/solvers/multiphase/cavitatingFoam/readControls.H similarity index 100% rename from applications/solvers/multiphase/lesCavitatingFoam/readControls.H rename to applications/solvers/multiphase/cavitatingFoam/readControls.H diff --git a/applications/solvers/multiphase/lesCavitatingFoam/readThermodynamicProperties.H b/applications/solvers/multiphase/cavitatingFoam/readThermodynamicProperties.H similarity index 100% rename from applications/solvers/multiphase/lesCavitatingFoam/readThermodynamicProperties.H rename to applications/solvers/multiphase/cavitatingFoam/readThermodynamicProperties.H diff --git a/applications/solvers/multiphase/lesCavitatingFoam/resetPhiPatches.H b/applications/solvers/multiphase/cavitatingFoam/resetPhiPatches.H similarity index 100% rename from applications/solvers/multiphase/lesCavitatingFoam/resetPhiPatches.H rename to applications/solvers/multiphase/cavitatingFoam/resetPhiPatches.H diff --git a/applications/solvers/multiphase/lesCavitatingFoam/resetPhivPatches.H b/applications/solvers/multiphase/cavitatingFoam/resetPhivPatches.H similarity index 100% rename from applications/solvers/multiphase/lesCavitatingFoam/resetPhivPatches.H rename to applications/solvers/multiphase/cavitatingFoam/resetPhivPatches.H diff --git a/applications/solvers/multiphase/lesCavitatingFoam/rhoEqn.H b/applications/solvers/multiphase/cavitatingFoam/rhoEqn.H similarity index 100% rename from applications/solvers/multiphase/lesCavitatingFoam/rhoEqn.H rename to applications/solvers/multiphase/cavitatingFoam/rhoEqn.H diff --git a/applications/solvers/multiphase/lesCavitatingFoam/setDeltaT.H b/applications/solvers/multiphase/cavitatingFoam/setDeltaT.H similarity index 100% rename from applications/solvers/multiphase/lesCavitatingFoam/setDeltaT.H rename to applications/solvers/multiphase/cavitatingFoam/setDeltaT.H diff --git a/applications/solvers/multiphase/lesCavitatingFoam/setInitialDeltaT.H b/applications/solvers/multiphase/cavitatingFoam/setInitialDeltaT.H similarity index 100% rename from applications/solvers/multiphase/lesCavitatingFoam/setInitialDeltaT.H rename to applications/solvers/multiphase/cavitatingFoam/setInitialDeltaT.H diff --git a/applications/solvers/multiphase/compressibleInterDyMFoam/Make/files b/applications/solvers/multiphase/compressibleInterDyMFoam/Make/files new file mode 100644 index 0000000000..121264b1a9 --- /dev/null +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/Make/files @@ -0,0 +1,3 @@ +compressibleInterDyMFoam.C + +EXE = $(FOAM_APPBIN)/compressibleInterDyMFoam diff --git a/applications/solvers/multiphase/compressibleInterDyMFoam/Make/options b/applications/solvers/multiphase/compressibleInterDyMFoam/Make/options new file mode 100644 index 0000000000..13d31339e4 --- /dev/null +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/Make/options @@ -0,0 +1,22 @@ +INTERFOAM = $(FOAM_SOLVERS)/multiphase/interFoam + +EXE_INC = \ + -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)/dynamicMesh/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/dynamicFvMesh/lnInclude + +EXE_LIBS = \ + -linterfaceProperties \ + -lincompressibleTransportModels \ + -lincompressibleRASModels \ + -lincompressibleLESModels \ + -lfiniteVolume \ + -ldynamicMesh \ + -lmeshTools \ + -ldynamicFvMesh + diff --git a/applications/solvers/multiphase/compressibleLesInterFoam/UEqn.H b/applications/solvers/multiphase/compressibleInterDyMFoam/UEqn.H similarity index 90% rename from applications/solvers/multiphase/compressibleLesInterFoam/UEqn.H rename to applications/solvers/multiphase/compressibleInterDyMFoam/UEqn.H index 0895917367..90033f9826 100644 --- a/applications/solvers/multiphase/compressibleLesInterFoam/UEqn.H +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/UEqn.H @@ -1,6 +1,6 @@ surfaceScalarField muf = twoPhaseProperties.muf() - + fvc::interpolate(rho*turbulence->nuSgs()); + + fvc::interpolate(rho*turbulence->nut()); fvVectorMatrix UEqn ( @@ -11,6 +11,8 @@ //- fvc::div(muf*(mesh.Sf() & fvc::interpolate(fvc::grad(U)().T()))) ); + UEqn.relax(); + if (momentumPredictor) { solve diff --git a/applications/solvers/multiphase/compressibleLesInterFoam/alphaEqns.H b/applications/solvers/multiphase/compressibleInterDyMFoam/alphaEqns.H similarity index 100% rename from applications/solvers/multiphase/compressibleLesInterFoam/alphaEqns.H rename to applications/solvers/multiphase/compressibleInterDyMFoam/alphaEqns.H diff --git a/applications/solvers/multiphase/compressibleLesInterFoam/alphaEqnsSubCycle.H b/applications/solvers/multiphase/compressibleInterDyMFoam/alphaEqnsSubCycle.H similarity index 94% rename from applications/solvers/multiphase/compressibleLesInterFoam/alphaEqnsSubCycle.H rename to applications/solvers/multiphase/compressibleInterDyMFoam/alphaEqnsSubCycle.H index c52dce9690..e161a3cbe6 100644 --- a/applications/solvers/multiphase/compressibleLesInterFoam/alphaEqnsSubCycle.H +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/alphaEqnsSubCycle.H @@ -10,7 +10,7 @@ ); surfaceScalarField phic = mag(phi/mesh.magSf()); - phic = min(interface.cGamma()*phic, max(phic)); + phic = min(interface.cAlpha()*phic, max(phic)); volScalarField divU = fvc::div(phi); diff --git a/applications/solvers/multiphase/rasInterFoam/rasInterFoam.C b/applications/solvers/multiphase/compressibleInterDyMFoam/compressibleInterDyMFoam.C similarity index 57% rename from applications/solvers/multiphase/rasInterFoam/rasInterFoam.C rename to applications/solvers/multiphase/compressibleInterDyMFoam/compressibleInterDyMFoam.C index 33e85efd4b..11a1809575 100644 --- a/applications/solvers/multiphase/rasInterFoam/rasInterFoam.C +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/compressibleInterDyMFoam.C @@ -23,23 +23,25 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Application - rasInterFoam + compressibleLesInterFoam Description - Solver for 2 incompressible, isothermal immiscible fluids using a VOF + Solver for 2 compressible, 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 is modelled using a run-time - selectable incompressible RAS model. + momentum equation is solved. + + Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "dynamicFvMesh.H" #include "MULES.H" #include "subCycle.H" #include "interfaceProperties.H" #include "twoPhaseMixture.H" -#include "incompressible/RASModel/RASModel.H" +#include "turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -47,52 +49,84 @@ int main(int argc, char *argv[]) { #include "setRootCase.H" #include "createTime.H" - #include "createMesh.H" + #include "createDynamicFvMesh.H" #include "readEnvironmentalProperties.H" - #include "readPISOControls.H" + #include "readControls.H" #include "initContinuityErrs.H" #include "createFields.H" - #include "readTimeControls.H" - #include "correctPhi.H" #include "CourantNo.H" #include "setInitialDeltaT.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { - #include "readPISOControls.H" - #include "readTimeControls.H" + #include "readControls.H" #include "CourantNo.H" + + // Make the fluxes absolute + fvc::makeAbsolute(phi, U); + #include "setDeltaT.H" runTime++; Info<< "Time = " << runTime.timeName() << nl << endl; - #include "gammaEqnSubCycle.H" + scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime(); - #include "UEqn.H" + // Do any mesh changes + mesh.update(); - // --- PISO loop - for (int corr=0; corr < nCorr; corr++) + if (mesh.changing()) { - #include "pEqn.H" + Info<< "Execution time for mesh.update() = " + << runTime.elapsedCpuTime() - timeBeforeMeshUpdate + << " s" << endl; + + gh = g & mesh.C(); + ghf = g & mesh.Cf(); } - #include "continuityErrs.H" + if (mesh.changing() && correctPhi) + { + //***HGW#include "correctPhi.H" + } - p = pd + rho*gh; + // Make the fluxes relative to the mesh motion + fvc::makeRelative(phi, U); + + if (mesh.changing() && checkMeshCourantNo) + { + #include "meshCourantNo.H" + } turbulence->correct(); + // --- Outer-corrector loop + for (int oCorr=0; oCorr turbulence + // Construct incompressible turbulence model + autoPtr turbulence ( - incompressible::LESModel::New(U, phi, twoPhaseProperties) + incompressible::turbulenceModel::New(U, phi, twoPhaseProperties) ); diff --git a/applications/solvers/multiphase/compressibleInterDyMFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterDyMFoam/pEqn.H new file mode 100644 index 0000000000..013d8eb05f --- /dev/null +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/pEqn.H @@ -0,0 +1,77 @@ +{ + volScalarField rUA = 1.0/UEqn.A(); + surfaceScalarField rUAf = fvc::interpolate(rUA); + + tmp pdEqnComp; + + if (transonic) + { + pdEqnComp = + (fvm::ddt(pd) + fvm::div(phi, pd) - fvm::Sp(fvc::div(phi), pd)); + } + else + { + pdEqnComp = + (fvm::ddt(pd) + fvc::div(phi, pd) - fvc::Sp(fvc::div(phi), pd)); + } + + + U = rUA*UEqn.H(); + + surfaceScalarField phiU + ( + "phiU", + (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, rho, U, phi) + ); + + phi = phiU + + ( + fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) + - ghf*fvc::snGrad(rho) + )*rUAf*mesh.magSf(); + + for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + fvScalarMatrix pdEqnIncomp + ( + fvc::div(phi) + - fvm::laplacian(rUAf, pd) + ); + + solve + ( + ( + max(alpha1, scalar(0))*(psi1/rho1) + + max(alpha2, scalar(0))*(psi2/rho2) + ) + *pdEqnComp() + + pdEqnIncomp + ); + + if (nonOrth == nNonOrthCorr) + { + dgdt = + (pos(alpha2)*(psi2/rho2) - pos(alpha1)*(psi1/rho1)) + *(pdEqnComp & pd); + phi += pdEqnIncomp.flux(); + } + } + + U += rUA*fvc::reconstruct((phi - phiU)/rUAf); + U.correctBoundaryConditions(); + + p = max + ( + (pd + gh*(alpha1*rho10 + alpha2*rho20))/(1.0 - gh*(alpha1*psi1 + alpha2*psi2)), + pMin + ); + + rho1 = rho10 + psi1*p; + rho2 = rho20 + psi2*p; + + Info<< "max(U) " << max(mag(U)).value() << endl; + Info<< "min(pd) " << min(pd).value() << endl; + + // Make the fluxes relative to the mesh motion + fvc::makeRelative(phi, U); +} diff --git a/applications/solvers/multiphase/compressibleInterDyMFoam/readControls.H b/applications/solvers/multiphase/compressibleInterDyMFoam/readControls.H new file mode 100644 index 0000000000..a2e4ef3747 --- /dev/null +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/readControls.H @@ -0,0 +1,32 @@ + #include "readPISOControls.H" + #include "readTimeControls.H" + + label nAlphaCorr + ( + readLabel(piso.lookup("nAlphaCorr")) + ); + + label nAlphaSubCycles + ( + readLabel(piso.lookup("nAlphaSubCycles")) + ); + + if (nAlphaSubCycles > 1 && nOuterCorr != 1) + { + FatalErrorIn(args.executable()) + << "Sub-cycling alpha is only allowed for PISO, " + "i.e. when the number of outer-correctors = 1" + << exit(FatalError); + } + + bool correctPhi = true; + if (piso.found("correctPhi")) + { + correctPhi = Switch(piso.lookup("correctPhi")); + } + + bool checkMeshCourantNo = false; + if (piso.found("checkMeshCourantNo")) + { + checkMeshCourantNo = Switch(piso.lookup("checkMeshCourantNo")); + } diff --git a/applications/solvers/multiphase/compressibleInterFoam/Make/files b/applications/solvers/multiphase/compressibleInterFoam/Make/files new file mode 100644 index 0000000000..de5437219c --- /dev/null +++ b/applications/solvers/multiphase/compressibleInterFoam/Make/files @@ -0,0 +1,3 @@ +compressibleInterFoam.C + +EXE = $(FOAM_APPBIN)/compressibleInterFoam diff --git a/applications/solvers/multiphase/compressibleLesInterFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/Make/options similarity index 79% rename from applications/solvers/multiphase/compressibleLesInterFoam/Make/options rename to applications/solvers/multiphase/compressibleInterFoam/Make/options index 45e4e10f67..9412e3e374 100644 --- a/applications/solvers/multiphase/compressibleLesInterFoam/Make/options +++ b/applications/solvers/multiphase/compressibleInterFoam/Make/options @@ -4,12 +4,12 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/LES \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -linterfaceProperties \ -lincompressibleTransportModels \ + -lincompressibleRASModels \ -lincompressibleLESModels \ -lfiniteVolume diff --git a/applications/solvers/multiphase/rasInterFoam/UEqn.H b/applications/solvers/multiphase/compressibleInterFoam/UEqn.H similarity index 95% rename from applications/solvers/multiphase/rasInterFoam/UEqn.H rename to applications/solvers/multiphase/compressibleInterFoam/UEqn.H index c627f04d17..528e0aaafd 100644 --- a/applications/solvers/multiphase/rasInterFoam/UEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/UEqn.H @@ -14,6 +14,8 @@ //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) ); + UEqn.relax(); + if (momentumPredictor) { solve @@ -23,7 +25,7 @@ fvc::reconstruct ( ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma) + fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - ghf*fvc::snGrad(rho) - fvc::snGrad(pd) ) * mesh.magSf() diff --git a/applications/solvers/multiphase/compressibleInterFoam/alphaEqns.H b/applications/solvers/multiphase/compressibleInterFoam/alphaEqns.H new file mode 100644 index 0000000000..819cd0f538 --- /dev/null +++ b/applications/solvers/multiphase/compressibleInterFoam/alphaEqns.H @@ -0,0 +1,76 @@ +{ + word alphaScheme("div(phi,alpha)"); + word alpharScheme("div(phirb,alpha)"); + + surfaceScalarField phir = phic*interface.nHatf(); + + for (int gCorr=0; gCorr 0.0 && alpha1[celli] > 0.0) + { + Sp[celli] -= dgdt[celli]*alpha1[celli]; + Su[celli] += dgdt[celli]*alpha1[celli]; + } + else if (dgdt[celli] < 0.0 && alpha1[celli] < 1.0) + { + Sp[celli] += dgdt[celli]*(1.0 - alpha1[celli]); + } + } + + + surfaceScalarField phiAlpha1 = + fvc::flux + ( + phi, + alpha1, + alphaScheme + ) + + fvc::flux + ( + -fvc::flux(-phir, alpha2, alpharScheme), + alpha1, + alpharScheme + ); + + MULES::explicitSolve(oneField(), alpha1, phi, phiAlpha1, Sp, Su, 1, 0); + + surfaceScalarField rho1f = fvc::interpolate(rho1); + surfaceScalarField rho2f = fvc::interpolate(rho2); + rhoPhi = phiAlpha1*(rho1f - rho2f) + phi*rho2f; + + alpha2 = scalar(1) - alpha1; + } + + Info<< "Liquid phase volume fraction = " + << alpha1.weightedAverage(mesh.V()).value() + << " Min(alpha1) = " << min(alpha1).value() + << " Min(alpha2) = " << min(alpha2).value() + << endl; +} diff --git a/applications/solvers/multiphase/compressibleInterFoam/alphaEqnsSubCycle.H b/applications/solvers/multiphase/compressibleInterFoam/alphaEqnsSubCycle.H new file mode 100644 index 0000000000..89ba7a4e75 --- /dev/null +++ b/applications/solvers/multiphase/compressibleInterFoam/alphaEqnsSubCycle.H @@ -0,0 +1,43 @@ +{ + label nAlphaCorr + ( + readLabel(piso.lookup("nAlphaCorr")) + ); + + label nAlphaSubCycles + ( + readLabel(piso.lookup("nAlphaSubCycles")) + ); + + surfaceScalarField phic = mag(phi/mesh.magSf()); + phic = min(interface.cAlpha()*phic, max(phic)); + + volScalarField divU = fvc::div(phi); + + if (nAlphaSubCycles > 1) + { + dimensionedScalar totalDeltaT = runTime.deltaT(); + surfaceScalarField rhoPhiSum = 0.0*rhoPhi; + + for + ( + subCycle alphaSubCycle(alpha1, nAlphaSubCycles); + !(++alphaSubCycle).end(); + ) + { + #include "alphaEqns.H" + rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi; + } + + rhoPhi = rhoPhiSum; + } + else + { + #include "alphaEqns.H" + } + + if (oCorr == 0) + { + interface.correct(); + } +} diff --git a/applications/solvers/multiphase/compressibleLesInterFoam/compressibleLesInterFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C similarity index 95% rename from applications/solvers/multiphase/compressibleLesInterFoam/compressibleLesInterFoam.C rename to applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C index 6280b4293c..a48fd6b5d3 100644 --- a/applications/solvers/multiphase/compressibleLesInterFoam/compressibleLesInterFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C @@ -29,8 +29,9 @@ Description Solver for 2 compressible, 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 is modelled using a run-time - selectable incompressible LES model. + momentum equation is solved. + + Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. \*---------------------------------------------------------------------------*/ @@ -39,7 +40,7 @@ Description #include "subCycle.H" #include "interfaceProperties.H" #include "twoPhaseMixture.H" -#include "incompressible/LESModel/LESModel.H" +#include "turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -69,8 +70,6 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; - turbulence->correct(); - // --- Outer-corrector loop for (int oCorr=0; oCorrcorrect(); + runTime.write(); Info<< "ExecutionTime = " diff --git a/applications/solvers/multiphase/compressibleInterFoam/createFields.H b/applications/solvers/multiphase/compressibleInterFoam/createFields.H new file mode 100644 index 0000000000..1f579d245b --- /dev/null +++ b/applications/solvers/multiphase/compressibleInterFoam/createFields.H @@ -0,0 +1,152 @@ + Info<< "Reading field pd\n" << endl; + volScalarField pd + ( + IOobject + ( + "pd", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + + Info<< "Reading field alpha1\n" << endl; + volScalarField alpha1 + ( + IOobject + ( + "alpha1", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + + Info<< "Calculating field alpha1\n" << endl; + volScalarField alpha2("alpha2", scalar(1) - alpha1); + + Info<< "Reading field U\n" << endl; + volVectorField U + ( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + + #include "createPhi.H" + + + Info<< "Calculating field g.h\n" << endl; + volScalarField gh("gh", g & mesh.C()); + surfaceScalarField ghf("ghf", g & mesh.Cf()); + + + Info<< "Reading transportProperties\n" << endl; + twoPhaseMixture twoPhaseProperties(U, phi); + + dimensionedScalar rho10 + ( + twoPhaseProperties.subDict + ( + twoPhaseProperties.phase1Name() + ).lookup("rho0") + ); + + dimensionedScalar rho20 + ( + twoPhaseProperties.subDict + ( + twoPhaseProperties.phase2Name() + ).lookup("rho0") + ); + + dimensionedScalar psi1 + ( + twoPhaseProperties.subDict + ( + twoPhaseProperties.phase1Name() + ).lookup("psi") + ); + + dimensionedScalar psi2 + ( + twoPhaseProperties.subDict + ( + twoPhaseProperties.phase2Name() + ).lookup("psi") + ); + + dimensionedScalar pMin(twoPhaseProperties.lookup("pMin")); + + volScalarField p + ( + IOobject + ( + "p", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + max + ( + (pd + gh*(alpha1*rho10 + alpha2*rho20)) + /(1.0 - gh*(alpha1*psi1 + alpha2*psi2)), + pMin + ) + ); + + volScalarField rho1 = rho10 + psi1*p; + volScalarField rho2 = rho20 + psi2*p; + + volScalarField rho + ( + IOobject + ( + "rho", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + alpha1*rho1 + alpha2*rho2 + ); + + + // Mass flux + // Initialisation does not matter because rhoPhi is reset after the + // alpha1 solution before it is used in the U equation. + surfaceScalarField rhoPhi + ( + IOobject + ( + "rho*phi", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + fvc::interpolate(rho)*phi + ); + + volScalarField dgdt = + pos(alpha2)*fvc::div(phi)/max(alpha2, scalar(0.0001)); + + // Construct interface from alpha1 distribution + interfaceProperties interface(alpha1, U, twoPhaseProperties); + + // Construct incompressible turbulence model + autoPtr turbulence + ( + incompressible::turbulenceModel::New(U, phi, twoPhaseProperties) + ); diff --git a/applications/solvers/multiphase/compressibleLesInterFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H similarity index 100% rename from applications/solvers/multiphase/compressibleLesInterFoam/pEqn.H rename to applications/solvers/multiphase/compressibleInterFoam/pEqn.H diff --git a/applications/solvers/multiphase/compressibleLesInterFoam/readControls.H b/applications/solvers/multiphase/compressibleInterFoam/readControls.H similarity index 100% rename from applications/solvers/multiphase/compressibleLesInterFoam/readControls.H rename to applications/solvers/multiphase/compressibleInterFoam/readControls.H diff --git a/applications/solvers/multiphase/compressibleLesInterFoam/Make/files b/applications/solvers/multiphase/compressibleLesInterFoam/Make/files deleted file mode 100644 index 05dafae8b1..0000000000 --- a/applications/solvers/multiphase/compressibleLesInterFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -compressibleLesInterFoam.C - -EXE = $(FOAM_APPBIN)/compressibleLesInterFoam diff --git a/applications/solvers/multiphase/interDyMFoam/Make/options b/applications/solvers/multiphase/interDyMFoam/Make/options index 6755d5bc59..74498326a9 100644 --- a/applications/solvers/multiphase/interDyMFoam/Make/options +++ b/applications/solvers/multiphase/interDyMFoam/Make/options @@ -1,11 +1,9 @@ EXE_INC = \ - -I../rasInterFoam \ -I../interFoam \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ - -I$(LIB_SRC)/turbulenceModels/RAS/incompressible/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ @@ -16,6 +14,7 @@ EXE_LIBS = \ -linterfaceProperties \ -lincompressibleTransportModels \ -lincompressibleRASModels \ + -lincompressibleLESModels \ -lfiniteVolume \ -ldynamicMesh \ -lmeshTools \ diff --git a/applications/solvers/multiphase/interDyMFoam/createFields.H b/applications/solvers/multiphase/interDyMFoam/createFields.H index ab58050ed0..0f1efe717f 100644 --- a/applications/solvers/multiphase/interDyMFoam/createFields.H +++ b/applications/solvers/multiphase/interDyMFoam/createFields.H @@ -12,12 +12,12 @@ mesh ); - Info<< "Reading field gamma\n" << endl; - volScalarField gamma + Info<< "Reading field alpha1\n" << endl; + volScalarField alpha1 ( IOobject ( - "gamma", + "alpha1", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -44,7 +44,7 @@ Info<< "Reading transportProperties\n" << endl; - twoPhaseMixture twoPhaseProperties(U, phi, "gamma"); + twoPhaseMixture twoPhaseProperties(U, phi); const dimensionedScalar& rho1 = twoPhaseProperties.rho1(); const dimensionedScalar& rho2 = twoPhaseProperties.rho2(); @@ -60,15 +60,15 @@ mesh, IOobject::READ_IF_PRESENT ), - gamma*rho1 + (scalar(1) - gamma)*rho2, - gamma.boundaryField().types() + alpha1*rho1 + (scalar(1) - alpha1)*rho2, + alpha1.boundaryField().types() ); rho.oldTime(); // Mass flux // Initialisation does not matter because rhoPhi is reset after the - // gamma solution before it is used in the U equation. + // alpha1 solution before it is used in the U equation. surfaceScalarField rhoPhi ( IOobject @@ -83,13 +83,13 @@ ); - // Construct interface from gamma distribution - interfaceProperties interface(gamma, U, twoPhaseProperties); + // Construct interface from alpha1 distribution + interfaceProperties interface(alpha1, U, twoPhaseProperties); - // Construct incompressible RAS model - autoPtr turbulence + // Construct incompressible turbulence model + autoPtr turbulence ( - incompressible::RASModel::New(U, phi, twoPhaseProperties) + incompressible::turbulenceModel::New(U, phi, twoPhaseProperties) ); wordList pcorrTypes(pd.boundaryField().types()); diff --git a/applications/solvers/multiphase/interDyMFoam/interDyMFoam.C b/applications/solvers/multiphase/interDyMFoam/interDyMFoam.C index 915fee9a97..0ea32adcc8 100644 --- a/applications/solvers/multiphase/interDyMFoam/interDyMFoam.C +++ b/applications/solvers/multiphase/interDyMFoam/interDyMFoam.C @@ -39,7 +39,7 @@ Description #include "subCycle.H" #include "interfaceProperties.H" #include "twoPhaseMixture.H" -#include "incompressible/RASModel/RASModel.H" +#include "turbulenceModel.H" #include "probes.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -58,8 +58,7 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; while (runTime.run()) @@ -106,7 +105,7 @@ int main(int argc, char *argv[]) twoPhaseProperties.correct(); - #include "gammaEqnSubCycle.H" + #include "alphaEqnSubCycle.H" #include "UEqn.H" diff --git a/applications/solvers/multiphase/interDyMFoam/pEqn.H b/applications/solvers/multiphase/interDyMFoam/pEqn.H index c6961f6c22..f8ff18f606 100644 --- a/applications/solvers/multiphase/interDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/interDyMFoam/pEqn.H @@ -7,7 +7,7 @@ phi = phiU + ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma) + fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - ghf*fvc::snGrad(rho) )*rAUf*mesh.magSf(); diff --git a/applications/solvers/multiphase/interFoam/Make/options b/applications/solvers/multiphase/interFoam/Make/options index ae5ccba0fd..0e21fc2d64 100644 --- a/applications/solvers/multiphase/interFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/Make/options @@ -2,9 +2,12 @@ EXE_INC = \ -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 = \ -linterfaceProperties \ -lincompressibleTransportModels \ + -lincompressibleRASModels \ + -lincompressibleLESModels \ -lfiniteVolume diff --git a/applications/solvers/multiphase/interFoam/UBlendingFactor.H b/applications/solvers/multiphase/interFoam/UBlendingFactor.H index 217a9c3977..ade1b8e7f3 100644 --- a/applications/solvers/multiphase/interFoam/UBlendingFactor.H +++ b/applications/solvers/multiphase/interFoam/UBlendingFactor.H @@ -1,6 +1,6 @@ - surfaceScalarField gammaf = fvc::interpolate(gamma); + surfaceScalarField alpha1f = fvc::interpolate(alpha1); surfaceScalarField UBlendingFactor ( "UBlendingFactor", - sqrt(max(min(4*gammaf*(1.0 - gammaf), 1.0), 0.0)) + sqrt(max(min(4*alpha1f*(1.0 - alpha1f), 1.0), 0.0)) ); diff --git a/applications/solvers/multiphase/interFoam/UEqn.H b/applications/solvers/multiphase/interFoam/UEqn.H index e585f3cab1..528e0aaafd 100644 --- a/applications/solvers/multiphase/interFoam/UEqn.H +++ b/applications/solvers/multiphase/interFoam/UEqn.H @@ -1,14 +1,21 @@ - surfaceScalarField muf = twoPhaseProperties.muf(); + surfaceScalarField muEff + ( + "muEff", + twoPhaseProperties.muf() + + fvc::interpolate(rho*turbulence->nut()) + ); fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - - fvm::laplacian(muf, U) - - (fvc::grad(U) & fvc::grad(muf)) - //- fvc::div(muf*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) + - fvm::laplacian(muEff, U) + - (fvc::grad(U) & fvc::grad(muEff)) + //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) ); + UEqn.relax(); + if (momentumPredictor) { solve @@ -18,7 +25,7 @@ fvc::reconstruct ( ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma) + fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - ghf*fvc::snGrad(rho) - fvc::snGrad(pd) ) * mesh.magSf() diff --git a/applications/solvers/multiphase/interFoam/alphaEqn.H b/applications/solvers/multiphase/interFoam/alphaEqn.H new file mode 100644 index 0000000000..3bf24a845e --- /dev/null +++ b/applications/solvers/multiphase/interFoam/alphaEqn.H @@ -0,0 +1,35 @@ +{ + word alphaScheme("div(phi,alpha)"); + word alpharScheme("div(phirb,alpha)"); + + surfaceScalarField phic = mag(phi/mesh.magSf()); + phic = min(interface.cAlpha()*phic, max(phic)); + surfaceScalarField phir = phic*interface.nHatf(); + + for (int gCorr=0; gCorr 1) +{ + dimensionedScalar totalDeltaT = runTime.deltaT(); + surfaceScalarField rhoPhiSum = 0.0*rhoPhi; + + for + ( + subCycle alphaSubCycle(alpha1, nAlphaSubCycles); + !(++alphaSubCycle).end(); + ) + { +# include "alphaEqn.H" + rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi; + } + + rhoPhi = rhoPhiSum; +} +else +{ +# include "alphaEqn.H" +} + +interface.correct(); + +rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2; diff --git a/applications/solvers/multiphase/interFoam/createFields.H b/applications/solvers/multiphase/interFoam/createFields.H index 887bcbdead..af349d7917 100644 --- a/applications/solvers/multiphase/interFoam/createFields.H +++ b/applications/solvers/multiphase/interFoam/createFields.H @@ -12,12 +12,12 @@ mesh ); - Info<< "Reading field gamma\n" << endl; - volScalarField gamma + Info<< "Reading field alpha1\n" << endl; + volScalarField alpha1 ( IOobject ( - "gamma", + "alpha1", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -44,7 +44,7 @@ Info<< "Reading transportProperties\n" << endl; - twoPhaseMixture twoPhaseProperties(U, phi, "gamma"); + twoPhaseMixture twoPhaseProperties(U, phi); const dimensionedScalar& rho1 = twoPhaseProperties.rho1(); const dimensionedScalar& rho2 = twoPhaseProperties.rho2(); @@ -60,15 +60,15 @@ mesh, IOobject::READ_IF_PRESENT ), - gamma*rho1 + (scalar(1) - gamma)*rho2, - gamma.boundaryField().types() + alpha1*rho1 + (scalar(1) - alpha1)*rho2, + alpha1.boundaryField().types() ); rho.oldTime(); // Mass flux // Initialisation does not matter because rhoPhi is reset after the - // gamma solution before it is used in the U equation. + // alpha1 solution before it is used in the U equation. surfaceScalarField rhoPhi ( IOobject @@ -107,5 +107,12 @@ setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue); - // Construct interface from gamma distribution - interfaceProperties interface(gamma, U, twoPhaseProperties); + // Construct interface from alpha1 distribution + interfaceProperties interface(alpha1, U, twoPhaseProperties); + + + // Construct incompressible turbulence model + autoPtr turbulence + ( + incompressible::turbulenceModel::New(U, phi, twoPhaseProperties) + ); diff --git a/applications/solvers/multiphase/interFoam/gammaEqn.H b/applications/solvers/multiphase/interFoam/gammaEqn.H deleted file mode 100644 index 8978d1d293..0000000000 --- a/applications/solvers/multiphase/interFoam/gammaEqn.H +++ /dev/null @@ -1,35 +0,0 @@ -{ - word gammaScheme("div(phi,gamma)"); - word gammarScheme("div(phirb,gamma)"); - - surfaceScalarField phic = mag(phi/mesh.magSf()); - phic = min(interface.cGamma()*phic, max(phic)); - surfaceScalarField phir = phic*interface.nHatf(); - - for (int gCorr=0; gCorr 1) -{ - dimensionedScalar totalDeltaT = runTime.deltaT(); - surfaceScalarField rhoPhiSum = 0.0*rhoPhi; - - for - ( - subCycle gammaSubCycle(gamma, nGammaSubCycles); - !(++gammaSubCycle).end(); - ) - { -# include "gammaEqn.H" - rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi; - } - - rhoPhi = rhoPhiSum; -} -else -{ -# include "gammaEqn.H" -} - -interface.correct(); - -rho == gamma*rho1 + (scalar(1) - gamma)*rho2; diff --git a/applications/solvers/multiphase/interFoam/interFoam.C b/applications/solvers/multiphase/interFoam/interFoam.C index b7f4f0ada5..1286a16d62 100644 --- a/applications/solvers/multiphase/interFoam/interFoam.C +++ b/applications/solvers/multiphase/interFoam/interFoam.C @@ -31,6 +31,8 @@ Description 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. \*---------------------------------------------------------------------------*/ @@ -40,6 +42,7 @@ Description #include "subCycle.H" #include "interfaceProperties.H" #include "twoPhaseMixture.H" +#include "turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -57,7 +60,7 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -74,7 +77,7 @@ int main(int argc, char *argv[]) twoPhaseProperties.correct(); - #include "gammaEqnSubCycle.H" + #include "alphaEqnSubCycle.H" #include "UEqn.H" @@ -88,6 +91,8 @@ int main(int argc, char *argv[]) p = pd + rho*gh; + turbulence->correct(); + runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/solvers/multiphase/interFoam/pEqn.H b/applications/solvers/multiphase/interFoam/pEqn.H index 77256a8e2f..e5afbb8e4f 100644 --- a/applications/solvers/multiphase/interFoam/pEqn.H +++ b/applications/solvers/multiphase/interFoam/pEqn.H @@ -12,7 +12,7 @@ phi = phiU + ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma) + fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - ghf*fvc::snGrad(rho) )*rUAf*mesh.magSf(); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/Make/options b/applications/solvers/multiphase/interPhaseChangeFoam/Make/options index fa6943e580..24e523f249 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/Make/options +++ b/applications/solvers/multiphase/interPhaseChangeFoam/Make/options @@ -2,13 +2,13 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/LES \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -IphaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -linterfaceProperties \ -lincompressibleTransportModels \ + -lincompressibleRASModels \ -lincompressibleLESModels \ -lfiniteVolume diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H index fefdeb41c3..f020863077 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H @@ -1,6 +1,6 @@ surfaceScalarField muf = twoPhaseProperties->muf() - + fvc::interpolate(rho*turbulence->nuSgs()); + + fvc::interpolate(rho*turbulence->nut()); fvVectorMatrix UEqn ( @@ -23,7 +23,7 @@ fvc::reconstruct ( ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma) + fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - ghf*fvc::snGrad(rho) - fvc::snGrad(pd) ) * mesh.magSf() diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/gammaEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqn.H similarity index 57% rename from applications/solvers/multiphase/interPhaseChangeFoam/gammaEqn.H rename to applications/solvers/multiphase/interPhaseChangeFoam/alphaEqn.H index 0186948920..15a5291ee6 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/gammaEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqn.H @@ -1,23 +1,23 @@ { - word gammaScheme("div(phi,gamma)"); - word gammarScheme("div(phirb,gamma)"); + word alphaScheme("div(phi,alpha)"); + word alpharScheme("div(phirb,alpha)"); surfaceScalarField phir("phir", phic*interface.nHatf()); - for (int gCorr=0; gCorr > vDotAlphal = @@ -46,22 +46,22 @@ ), // Divergence term is handled explicitly to be // consistent with the explicit transport solution - divU*gamma + divU*alpha1 + vDotcAlphal ); - //MULES::explicitSolve(gamma, phi, phiGamma, 1, 0); - //MULES::explicitSolve(oneField(), gamma, phi, phiGamma, Sp, Su, 1, 0); - MULES::implicitSolve(oneField(), gamma, phi, phiGamma, Sp, Su, 1, 0); + //MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0); + //MULES::explicitSolve(oneField(), alpha1, phi, phiAlpha, Sp, Su, 1, 0); + MULES::implicitSolve(oneField(), alpha1, phi, phiAlpha, Sp, Su, 1, 0); rhoPhi += (runTime.deltaT()/totalDeltaT) - *(phiGamma*(rho1 - rho2) + phi*rho2); + *(phiAlpha*(rho1 - rho2) + phi*rho2); } Info<< "Liquid phase volume fraction = " - << gamma.weightedAverage(mesh.V()).value() - << " Min(gamma) = " << min(gamma).value() - << " Max(gamma) = " << max(gamma).value() + << alpha1.weightedAverage(mesh.V()).value() + << " Min(alpha1) = " << min(alpha1).value() + << " Max(alpha1) = " << max(alpha1).value() << endl; } diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/gammaEqnSubCycle.H b/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqnSubCycle.H similarity index 53% rename from applications/solvers/multiphase/interPhaseChangeFoam/gammaEqnSubCycle.H rename to applications/solvers/multiphase/interPhaseChangeFoam/alphaEqnSubCycle.H index c6355d6fb0..dd1d828030 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/gammaEqnSubCycle.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqnSubCycle.H @@ -11,37 +11,37 @@ surfaceScalarField rhoPhi ); { - label nGammaCorr + label nAlphaCorr ( - readLabel(piso.lookup("nGammaCorr")) + readLabel(piso.lookup("nAlphaCorr")) ); - label nGammaSubCycles + label nAlphaSubCycles ( - readLabel(piso.lookup("nGammaSubCycles")) + readLabel(piso.lookup("nAlphaSubCycles")) ); surfaceScalarField phic = mag(phi/mesh.magSf()); - phic = min(interface.cGamma()*phic, max(phic)); + phic = min(interface.cAlpha()*phic, max(phic)); volScalarField divU = fvc::div(phi); dimensionedScalar totalDeltaT = runTime.deltaT(); - if (nGammaSubCycles > 1) + if (nAlphaSubCycles > 1) { for ( - subCycle gammaSubCycle(gamma, nGammaSubCycles); - !(++gammaSubCycle).end(); + subCycle alphaSubCycle(alpha1, nAlphaSubCycles); + !(++alphaSubCycle).end(); ) { -# include "gammaEqn.H" +# include "alphaEqn.H" } } else { -# include "gammaEqn.H" +# include "alphaEqn.H" } if (nOuterCorr == 1) @@ -49,5 +49,5 @@ surfaceScalarField rhoPhi interface.correct(); } - rho == gamma*rho1 + (scalar(1) - gamma)*rho2; + rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2; } diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H b/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H index 9e9c68a890..5e727dea3e 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H @@ -12,12 +12,12 @@ mesh ); - Info<< "Reading field gamma\n" << endl; - volScalarField gamma + Info<< "Reading field alpha1\n" << endl; + volScalarField alpha1 ( IOobject ( - "gamma", + "alpha1", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -44,7 +44,7 @@ Info<< "Creating phaseChangeTwoPhaseMixture\n" << endl; autoPtr twoPhaseProperties = - phaseChangeTwoPhaseMixture::New(U, phi, "gamma"); + phaseChangeTwoPhaseMixture::New(U, phi); const dimensionedScalar& rho1 = twoPhaseProperties->rho1(); const dimensionedScalar& rho2 = twoPhaseProperties->rho2(); @@ -60,8 +60,8 @@ mesh, IOobject::READ_IF_PRESENT ), - gamma*rho1 + (scalar(1) - gamma)*rho2, - gamma.boundaryField().types() + alpha1*rho1 + (scalar(1) - alpha1)*rho2, + alpha1.boundaryField().types() ); rho.oldTime(); @@ -88,11 +88,11 @@ ); - // Construct interface from gamma distribution - interfaceProperties interface(gamma, U, twoPhaseProperties()); + // Construct interface from alpha1 distribution + interfaceProperties interface(alpha1, U, twoPhaseProperties()); - // Construct LES model - autoPtr turbulence + // Construct incompressible turbulence model + autoPtr turbulence ( - incompressible::LESModel::New(U, phi, twoPhaseProperties()) + incompressible::turbulenceModel::New(U, phi, twoPhaseProperties()) ); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C index bb6f1133ce..f7c8aa7250 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C @@ -35,6 +35,8 @@ Description but other mechanisms of phase-change are supported within this solver framework. + Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. + \*---------------------------------------------------------------------------*/ #include "fvCFD.H" @@ -42,7 +44,7 @@ Description #include "subCycle.H" #include "interfaceProperties.H" #include "phaseChangeTwoPhaseMixture.H" -#include "incompressible/LESModel/LESModel.H" +#include "turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -60,7 +62,7 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -75,9 +77,7 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; - twoPhaseProperties->correct(); - - #include "gammaEqnSubCycle.H" + #include "alphaEqnSubCycle.H" turbulence->correct(); @@ -95,6 +95,8 @@ int main(int argc, char *argv[]) #include "continuityErrs.H" } + twoPhaseProperties->correct(); + runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H index 3a7f7e4ebc..0037d71cf5 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H @@ -13,7 +13,7 @@ phi = phiU + ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma) + fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - ghf*fvc::snGrad(rho) )*rUAf*mesh.magSf(); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H index 0cbc33c52e..a2db01643a 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H @@ -106,7 +106,7 @@ public: ( const volVectorField& U, const surfaceScalarField& phi, - const word& alpha1Name + const word& alpha1Name = "alpha1" ); diff --git a/applications/solvers/multiphase/lesCavitatingFoam/Make/files b/applications/solvers/multiphase/lesCavitatingFoam/Make/files deleted file mode 100644 index b577562e27..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/Make/files +++ /dev/null @@ -1,5 +0,0 @@ -lesCavitatingFoam.C - -devOneEqEddy/devOneEqEddy.C - -EXE = $(FOAM_APPBIN)/lesCavitatingFoam diff --git a/applications/solvers/multiphase/lesCavitatingFoam/Make/options b/applications/solvers/multiphase/lesCavitatingFoam/Make/options deleted file mode 100644 index 91833c1365..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/Make/options +++ /dev/null @@ -1,16 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ - -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/LES \ - -I$(LIB_SRC)/turbulenceModels/LES/incompressible/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/barotropicCompressibilityModel/lnInclude - -EXE_LIBS = \ - -lincompressibleTransportModels \ - -lincompressibleLESModels \ - -lfiniteVolume \ - -lbarotropicCompressibilityModel - diff --git a/applications/solvers/multiphase/lesCavitatingFoam/UEqn.H b/applications/solvers/multiphase/lesCavitatingFoam/UEqn.H deleted file mode 100644 index 73033ddfaa..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/UEqn.H +++ /dev/null @@ -1,20 +0,0 @@ - surfaceScalarField muEff - ( - "muEff", - twoPhaseProperties.muf() - + fvc::interpolate(rho*turbulence->nuSgs()) - ); - - fvVectorMatrix UEqn - ( - fvm::ddt(rho, U) - + fvm::div(phi, U) - - fvm::laplacian(muEff, U) - //- (fvc::grad(U) & fvc::grad(muf)) - - fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) - ); - - if (momentumPredictor) - { - solve(UEqn == -fvc::grad(p)); - } diff --git a/applications/solvers/multiphase/lesCavitatingFoam/createFields.H b/applications/solvers/multiphase/lesCavitatingFoam/createFields.H deleted file mode 100644 index d2e19bcae8..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/createFields.H +++ /dev/null @@ -1,85 +0,0 @@ - Info<< "Reading field p\n" << endl; - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - volScalarField gamma - ( - IOobject - ( - "gamma", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0)) - ); - gamma.oldTime(); - - Info<< "Creating compressibilityModel\n" << endl; - autoPtr psiModel = - barotropicCompressibilityModel::New - ( - thermodynamicProperties, - gamma - ); - - const volScalarField& psi = psiModel->psi(); - - rho == max - ( - psi*p - + (1.0 - gamma)*rhol0 - + ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat, - rhoMin - ); - - Info<< "Reading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - -# include "createPhiv.H" -# include "compressibleCreatePhi.H" - - Info<< "Reading transportProperties\n" << endl; - - twoPhaseMixture twoPhaseProperties(U, phiv, "gamma"); - - // Create LES model - autoPtr turbulence - ( - incompressible::LESModel::New(U, phiv, twoPhaseProperties) - ); diff --git a/applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.C b/applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.C deleted file mode 100644 index db9cb56991..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.C +++ /dev/null @@ -1,130 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "devOneEqEddy.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(devOneEqEddy, 0); -addToRunTimeSelectionTable(LESModel, devOneEqEddy, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -devOneEqEddy::devOneEqEddy -( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport -) -: - LESModel(typeName, U, phi, transport), - GenEddyVisc(U, phi, transport), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - ck_ - ( - dimensioned::lookupOrAddToDict - ( - "ck", - coeffDict(), - 0.07 - ) - ) -{ - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void devOneEqEddy::correct(const tmp& gradU) -{ - GenEddyVisc::correct(gradU); - - //volScalarField G = 2*nuSgs_*magSqr(symm(gradU)); - volScalarField G = 2*nuSgs_*(gradU() && dev(symm(gradU()))); - - solve - ( - fvm::ddt(k_) - + fvm::div(phi(), k_) - - fvm::Sp(fvc::div(phi()), k_) - - fvm::laplacian(DkEff(), k_) - == - G - - fvm::Sp(ce_*sqrt(k_)/delta(), k_) - ); - - bound(k_, k0()); - - nuSgs_ = ck_*sqrt(k_)*delta(); - nuSgs_.correctBoundaryConditions(); -} - - -bool devOneEqEddy::read() -{ - if (GenEddyVisc::read()) - { - ck_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/lesInterFoam/Make/files b/applications/solvers/multiphase/lesInterFoam/Make/files deleted file mode 100644 index 40039bd1a7..0000000000 --- a/applications/solvers/multiphase/lesInterFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -lesInterFoam.C - -EXE = $(FOAM_APPBIN)/lesInterFoam diff --git a/applications/solvers/multiphase/lesInterFoam/Make/options b/applications/solvers/multiphase/lesInterFoam/Make/options deleted file mode 100644 index 43c523e220..0000000000 --- a/applications/solvers/multiphase/lesInterFoam/Make/options +++ /dev/null @@ -1,15 +0,0 @@ -EXE_INC = \ - -Iaveraging \ - -I../interFoam \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ - -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/LES \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -EXE_LIBS = \ - -linterfaceProperties \ - -lincompressibleTransportModels \ - -lincompressibleLESModels \ - -lfiniteVolume diff --git a/applications/solvers/multiphase/lesInterFoam/UEqn.H b/applications/solvers/multiphase/lesInterFoam/UEqn.H deleted file mode 100644 index 1bf56f02dd..0000000000 --- a/applications/solvers/multiphase/lesInterFoam/UEqn.H +++ /dev/null @@ -1,32 +0,0 @@ - surfaceScalarField muEff - ( - "muEff", - twoPhaseProperties.muf() - + fvc::interpolate(rho*turbulence->nuSgs()) - ); - - 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())) - ); - - if (momentumPredictor) - { - solve - ( - UEqn - == - fvc::reconstruct - ( - ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma) - - ghf*fvc::snGrad(rho) - - fvc::snGrad(pd) - ) * mesh.magSf() - ) - ); - } diff --git a/applications/solvers/multiphase/lesInterFoam/createFields.H b/applications/solvers/multiphase/lesInterFoam/createFields.H deleted file mode 100644 index c622be1561..0000000000 --- a/applications/solvers/multiphase/lesInterFoam/createFields.H +++ /dev/null @@ -1,115 +0,0 @@ - Info<< "Reading field pd\n" << endl; - volScalarField pd - ( - IOobject - ( - "pd", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - Info<< "Reading field gamma\n" << endl; - volScalarField gamma - ( - IOobject - ( - "gamma", - 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 - ); - -# include "createPhi.H" - - Info<< "Reading transportProperties\n" << endl; - twoPhaseMixture twoPhaseProperties(U, phi, "gamma"); - - const dimensionedScalar& rho1 = twoPhaseProperties.rho1(); - const dimensionedScalar& rho2 = twoPhaseProperties.rho2(); - - - // Need to store rho for ddt(rho, U) - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::READ_IF_PRESENT - ), - gamma*rho1 + (scalar(1) - gamma)*rho2, - gamma.boundaryField().types() - ); - rho.oldTime(); - - // Mass flux - // Initialisation does not matter because rhoPhi is reset after the - // gamma solution before it is used in the U equation. - surfaceScalarField rhoPhi - ( - IOobject - ( - "rho*phi", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - rho1*phi - ); - - - label pdRefCell = 0; - scalar pdRefValue = 0.0; - setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue); - - - Info<< "Calculating field g.h\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 - ), - pd + rho*gh - ); - - - // Construct interface from gamma distribution - interfaceProperties interface(gamma, U, twoPhaseProperties); - - // Construct LES model - autoPtr turbulence - ( - incompressible::LESModel::New(U, phi, twoPhaseProperties) - ); diff --git a/applications/solvers/multiphase/lesInterFoam/lesInterFoam.C b/applications/solvers/multiphase/lesInterFoam/lesInterFoam.C deleted file mode 100644 index 8d109f03b3..0000000000 --- a/applications/solvers/multiphase/lesInterFoam/lesInterFoam.C +++ /dev/null @@ -1,103 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Application - lesInterFoam - -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 is modelled using a run-time - selectable incompressible LES model. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "MULES.H" -#include "subCycle.H" -#include "interfaceProperties.H" -#include "twoPhaseMixture.H" -#include "incompressible/LESModel/LESModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "setRootCase.H" - #include "createTime.H" - #include "createMesh.H" - #include "readEnvironmentalProperties.H" - #include "readPISOControls.H" - #include "initContinuityErrs.H" - #include "createFields.H" - #include "readTimeControls.H" - #include "correctPhi.H" - #include "CourantNo.H" - #include "setInitialDeltaT.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { - #include "readPISOControls.H" - #include "readTimeControls.H" - #include "CourantNo.H" - #include "setDeltaT.H" - - runTime++; - Info<< "Time = " << runTime.timeName() << nl << endl; - - #include "gammaEqnSubCycle.H" - - turbulence->correct(); - - #include "UEqn.H" - - // --- PISO loop - for (int corr=0; corr < nCorr; corr++) - { - #include "pEqn.H" - } - - #include "continuityErrs.H" - - p = pd + rho*gh; - - 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/multiphaseInterFoam/Make/options b/applications/solvers/multiphase/multiphaseInterFoam/Make/options index cd906bfa53..1fc821726c 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/Make/options +++ b/applications/solvers/multiphase/multiphaseInterFoam/Make/options @@ -6,9 +6,13 @@ EXE_INC = \ -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 = \ -linterfaceProperties \ -lincompressibleTransportModels \ + -lincompressibleTransportModels \ + -lincompressibleRASModels \ + -lincompressibleLESModels \ -lfiniteVolume diff --git a/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H b/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H index 43cc2cb183..5ce0c0c088 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H @@ -1,10 +1,34 @@ - surfaceScalarField muf = mixture.muf(); + surfaceScalarField muEff + ( + "muEff", + mixture.muf() + + fvc::interpolate(rho*turbulence->nut()) + ); fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(mixture.rhoPhi(), U) - - fvm::laplacian(muf, U) - - (fvc::grad(U) & fvc::grad(muf)) - //- fvc::div(muf*(mesh.Sf() & fvc::interpolate(fvc::grad(U)().T()))) + - fvm::laplacian(muEff, U) + - (fvc::grad(U) & fvc::grad(muEff)) + //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) ); + + UEqn.relax(); + + if (momentumPredictor) + { + solve + ( + UEqn + == + fvc::reconstruct + ( + ( + mixture.surfaceTensionForce() + - ghf*fvc::snGrad(rho) + - fvc::snGrad(pd) + ) * mesh.magSf() + ) + ); + } diff --git a/applications/solvers/multiphase/multiphaseInterFoam/createFields.H b/applications/solvers/multiphase/multiphaseInterFoam/createFields.H index 4f71f75ba4..aa62d0f2a1 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/createFields.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/createFields.H @@ -46,9 +46,31 @@ Info<< "Calculating field g.h\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 + ), + pd + rho*gh + ); + + label pdRefCell = 0; scalar pdRefValue = 0.0; setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue); + + + // Construct incompressible turbulence model + autoPtr turbulence + ( + incompressible::turbulenceModel::New(U, phi, mixture) + ); diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C index 5dd13984bf..edd2bca880 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C @@ -29,38 +29,40 @@ Description Solver for n incompressible fluids which captures the interfaces and includes surface-tension and contact-angle effects for each. + Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. + \*---------------------------------------------------------------------------*/ #include "fvCFD.H" #include "multiphaseMixture.H" +#include "turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "readEnvironmentalProperties.H" + #include "readPISOControls.H" + #include "initContinuityErrs.H" + #include "createFields.H" + #include "readTimeControls.H" + #include "correctPhi.H" + #include "CourantNo.H" + #include "setInitialDeltaT.H" -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "readEnvironmentalProperties.H" -# include "readPISOControls.H" -# include "initContinuityErrs.H" -# include "createFields.H" -# include "readTimeControls.H" -# include "correctPhi.H" -# include "CourantNo.H" -# include "setInitialDeltaT.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { -# include "readPISOControls.H" -# include "readTimeControls.H" -# include "CourantNo.H" -# include "setDeltaT.H" + #include "readPISOControls.H" + #include "readTimeControls.H" + #include "CourantNo.H" + #include "setDeltaT.H" runTime++; @@ -69,15 +71,19 @@ int main(int argc, char *argv[]) mixture.correct(); rho = mixture.rho(); -# include "UEqn.H" + #include "UEqn.H" // --- PISO loop for (int corr=0; corrcorrect(); runTime.write(); diff --git a/applications/solvers/multiphase/rasCavitatingFoam/CourantNo.H b/applications/solvers/multiphase/rasCavitatingFoam/CourantNo.H deleted file mode 100644 index 014944e191..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/CourantNo.H +++ /dev/null @@ -1,59 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Global - CourantNo - -Description - Calculates and outputs the mean and maximum Courant Numbers. - -\*---------------------------------------------------------------------------*/ - -scalar CoNum = 0.0; -scalar meanCoNum = 0.0; -scalar acousticCoNum = 0.0; - -if (mesh.nInternalFaces()) -{ - surfaceScalarField SfUfbyDelta = - mesh.surfaceInterpolation::deltaCoeffs()*mag(phiv); - - CoNum = max(SfUfbyDelta/mesh.magSf()) - .value()*runTime.deltaT().value(); - - meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf())) - .value()*runTime.deltaT().value(); - - acousticCoNum = max - ( - mesh.surfaceInterpolation::deltaCoeffs()/sqrt(fvc::interpolate(psi)) - ).value()*runTime.deltaT().value(); -} - -Info<< "phiv Courant Number mean: " << meanCoNum - << " max: " << CoNum - << " acoustic max: " << acousticCoNum - << endl; - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/rasCavitatingFoam/Make/files b/applications/solvers/multiphase/rasCavitatingFoam/Make/files deleted file mode 100644 index 4509463796..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -rasCavitatingFoam.C - -EXE = $(FOAM_APPBIN)/rasCavitatingFoam diff --git a/applications/solvers/multiphase/rasCavitatingFoam/continuityErrs.H b/applications/solvers/multiphase/rasCavitatingFoam/continuityErrs.H deleted file mode 100644 index 6f1622510f..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/continuityErrs.H +++ /dev/null @@ -1,22 +0,0 @@ -{ - volScalarField thermoRho = psi*p + (1.0 - gamma)*rhol0; - - dimensionedScalar totalMass = fvc::domainIntegrate(rho); - - scalar sumLocalContErr = - ( - fvc::domainIntegrate(mag(rho - thermoRho))/totalMass - ).value(); - - scalar globalContErr = - ( - fvc::domainIntegrate(rho - thermoRho)/totalMass - ).value(); - - cumulativeContErr += globalContErr; - - Info<< "time step continuity errors : sum local = " << sumLocalContErr - << ", global = " << globalContErr - << ", cumulative = " << cumulativeContErr - << endl; -} diff --git a/applications/solvers/multiphase/rasCavitatingFoam/gammaPsi.H b/applications/solvers/multiphase/rasCavitatingFoam/gammaPsi.H deleted file mode 100644 index b259ddd322..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/gammaPsi.H +++ /dev/null @@ -1,10 +0,0 @@ -{ - gamma = max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0)); - - Info<< "max-min gamma: " << max(gamma).value() - << " " << min(gamma).value() << endl; - - psiModel->correct(); - - //Info<< "min a: " << 1.0/sqrt(max(psi)).value() << endl; -} diff --git a/applications/solvers/multiphase/rasCavitatingFoam/pEqn.H b/applications/solvers/multiphase/rasCavitatingFoam/pEqn.H deleted file mode 100644 index c9382dfc0f..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/pEqn.H +++ /dev/null @@ -1,80 +0,0 @@ -{ - if (nOuterCorr == 1) - { - p = - ( - rho - - (1.0 - gamma)*rhol0 - - ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat - )/psi; - } - - surfaceScalarField rhof = fvc::interpolate(rho, "rhof"); - - volScalarField rUA = 1.0/UEqn.A(); - surfaceScalarField rUAf("rUAf", rhof*fvc::interpolate(rUA)); - volVectorField HbyA = rUA*UEqn.H(); - - phiv = (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phiv); - - p.boundaryField().updateCoeffs(); - - surfaceScalarField phiGradp = rUAf*mesh.magSf()*fvc::snGrad(p); - - phiv -= phiGradp/rhof; - -# include "resetPhivPatches.H" - - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) - { - fvScalarMatrix pEqn - ( - fvm::ddt(psi, p) - - (rhol0 + (psil - psiv)*pSat)*fvc::ddt(gamma) - pSat*fvc::ddt(psi) - + fvc::div(phiv, rho) - + fvc::div(phiGradp) - - fvm::laplacian(rUAf, p) - ); - - pEqn.solve(); - - if (nonOrth == nNonOrthCorr) - { - phiv += (phiGradp + pEqn.flux())/rhof; - } - } - - Info<< "max-min p: " << max(p).value() - << " " << min(p).value() << endl; - - - U = HbyA - rUA*fvc::grad(p); - - // Remove the swirl component of velocity for "wedge" cases - if (piso.found("removeSwirl")) - { - label swirlCmpt(readLabel(piso.lookup("removeSwirl"))); - - Info<< "Removing swirl component-" << swirlCmpt << " of U" << endl; - U.field().replace(swirlCmpt, 0.0); - } - - U.correctBoundaryConditions(); - - Info<< "max(U) " << max(mag(U)).value() << endl; - - rho == max - ( - psi*p - + (1.0 - gamma)*rhol0 - + ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat, - rhoMin - ); - - Info<< "max-min rho: " << max(rho).value() - << " " << min(rho).value() << endl; - -# include "gammaPsi.H" - -} diff --git a/applications/solvers/multiphase/rasCavitatingFoam/rasCavitatingFoam.C b/applications/solvers/multiphase/rasCavitatingFoam/rasCavitatingFoam.C deleted file mode 100644 index 51d2a31dde..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/rasCavitatingFoam.C +++ /dev/null @@ -1,94 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Application - rasCavitatingFoam - -Description - Transient cavitation code with RAS turbulence. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "barotropicCompressibilityModel.H" -#include "twoPhaseMixture.H" -#include "incompressible/RASModel/RASModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - -# include "setRootCase.H" - -# include "createTime.H" -# include "createMesh.H" -# include "readThermodynamicProperties.H" -# include "readControls.H" -# include "createFields.H" -# include "initContinuityErrs.H" -# include "compressibleCourantNo.H" -# include "setInitialDeltaT.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { -# include "readControls.H" -# include "CourantNo.H" -# include "setDeltaT.H" - - runTime++; - Info<< "Time = " << runTime.timeName() << nl << endl; - - for (int outerCorr=0; outerCorrcorrect(); - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "\n end \n"; - - return(0); -} - - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/rasCavitatingFoam/readControls.H b/applications/solvers/multiphase/rasCavitatingFoam/readControls.H deleted file mode 100644 index f53e7b9eb1..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/readControls.H +++ /dev/null @@ -1,9 +0,0 @@ -#include "readTimeControls.H" - -scalar maxAcousticCo -( - readScalar(runTime.controlDict().lookup("maxAcousticCo")) -); - - -#include "readPISOControls.H" diff --git a/applications/solvers/multiphase/rasCavitatingFoam/readThermodynamicProperties.H b/applications/solvers/multiphase/rasCavitatingFoam/readThermodynamicProperties.H deleted file mode 100644 index d3fbb9307a..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/readThermodynamicProperties.H +++ /dev/null @@ -1,27 +0,0 @@ - Info<< "Reading thermodynamicProperties\n" << endl; - - IOdictionary thermodynamicProperties - ( - IOobject - ( - "thermodynamicProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ) - ); - - dimensionedScalar psil(thermodynamicProperties.lookup("psil")); - - dimensionedScalar rholSat(thermodynamicProperties.lookup("rholSat")); - - dimensionedScalar psiv(thermodynamicProperties.lookup("psiv")); - - dimensionedScalar pSat(thermodynamicProperties.lookup("pSat")); - - dimensionedScalar rhovSat("rhovSat", psiv*pSat); - - dimensionedScalar rhol0("rhol0", rholSat - pSat*psil); - - dimensionedScalar rhoMin(thermodynamicProperties.lookup("rhoMin")); diff --git a/applications/solvers/multiphase/rasCavitatingFoam/resetPhiPatches.H b/applications/solvers/multiphase/rasCavitatingFoam/resetPhiPatches.H deleted file mode 100644 index e7d0c2f93e..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/resetPhiPatches.H +++ /dev/null @@ -1,15 +0,0 @@ -fvsPatchScalarFieldField& phiPatches = phi.boundaryField(); -const fvPatchScalarFieldField& rhoPatches = rho.boundaryField(); -const fvPatchVectorFieldField& Upatches = U.boundaryField(); -const fvsPatchVectorFieldField& SfPatches = mesh.Sf().boundaryField(); - -forAll(phiPatches, patchI) -{ - if (phi.boundaryField().types()[patchI] == "calculated") - { - calculatedFvsPatchScalarField& phiPatch = - refCast(phiPatches[patchI]); - - phiPatch == ((rhoPatches[patchI]*Upatches[patchI]) & SfPatches[patchI]); - } -} diff --git a/applications/solvers/multiphase/rasCavitatingFoam/resetPhivPatches.H b/applications/solvers/multiphase/rasCavitatingFoam/resetPhivPatches.H deleted file mode 100644 index 7e8b040bb6..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/resetPhivPatches.H +++ /dev/null @@ -1,14 +0,0 @@ -surfaceScalarField::GeometricBoundaryField& phivPatches = phiv.boundaryField(); -const volVectorField::GeometricBoundaryField& Upatches = U.boundaryField(); -const surfaceVectorField::GeometricBoundaryField& SfPatches = mesh.Sf().boundaryField(); - -forAll(phivPatches, patchI) -{ - if (phiv.boundaryField().types()[patchI] == "calculated") - { - calculatedFvsPatchScalarField& phivPatch = - refCast(phivPatches[patchI]); - - phivPatch == (Upatches[patchI] & SfPatches[patchI]); - } -} diff --git a/applications/solvers/multiphase/rasCavitatingFoam/rhoEqn.H b/applications/solvers/multiphase/rasCavitatingFoam/rhoEqn.H deleted file mode 100644 index d0bd6e1dad..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/rhoEqn.H +++ /dev/null @@ -1,16 +0,0 @@ -{ - fvScalarMatrix rhoEqn - ( - fvm::ddt(rho) - + fvm::div(phiv, rho) - ); - - rhoEqn.solve(); - - phi = rhoEqn.flux(); - - Info<< "max-min rho: " << max(rho).value() - << " " << min(rho).value() << endl; - - rho == max(rho, rhoMin); -} diff --git a/applications/solvers/multiphase/rasCavitatingFoam/setDeltaT.H b/applications/solvers/multiphase/rasCavitatingFoam/setDeltaT.H deleted file mode 100644 index 012a5276e8..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/setDeltaT.H +++ /dev/null @@ -1,54 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Global - setDeltaT - -Description - Reset the timestep to maintain a constant maximum courant Number. - Reduction of time-step is imediate but increase is damped to avoid - unstable oscillations. - -\*---------------------------------------------------------------------------*/ - -if (adjustTimeStep) -{ - scalar maxDeltaTFact = - min(maxCo/(CoNum + SMALL), maxAcousticCo/(acousticCoNum + SMALL)); - - scalar deltaTFact = min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2); - - runTime.setDeltaT - ( - min - ( - deltaTFact*runTime.deltaT().value(), - maxDeltaT - ) - ); - - Info<< "deltaT = " << runTime.deltaT().value() << endl; -} - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/rasCavitatingFoam/setInitialDeltaT.H b/applications/solvers/multiphase/rasCavitatingFoam/setInitialDeltaT.H deleted file mode 100644 index 237cacd05a..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/setInitialDeltaT.H +++ /dev/null @@ -1,54 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Global - setInitialDeltaT - -Description - Set the initial timestep corresponding to the timestep adjustment - algorithm in setDeltaT - -\*---------------------------------------------------------------------------*/ - -if (adjustTimeStep) -{ -# include "CourantNo.H" - - if (CoNum > SMALL) - { - scalar maxDeltaTFact = - min(maxCo/(CoNum + SMALL), maxAcousticCo/(acousticCoNum + SMALL)); - - runTime.setDeltaT - ( - min - ( - maxDeltaTFact*runTime.deltaT().value(), - maxDeltaT - ) - ); - } -} - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/rasInterFoam/Make/files b/applications/solvers/multiphase/rasInterFoam/Make/files deleted file mode 100644 index 39b992ad4d..0000000000 --- a/applications/solvers/multiphase/rasInterFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -rasInterFoam.C - -EXE = $(FOAM_APPBIN)/rasInterFoam diff --git a/applications/solvers/multiphase/rasInterFoam/Make/options b/applications/solvers/multiphase/rasInterFoam/Make/options deleted file mode 100644 index 04a3c57887..0000000000 --- a/applications/solvers/multiphase/rasInterFoam/Make/options +++ /dev/null @@ -1,13 +0,0 @@ -EXE_INC = \ - -I../interFoam \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ - -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -EXE_LIBS = \ - -linterfaceProperties \ - -lincompressibleTransportModels \ - -lincompressibleRASModels \ - -lfiniteVolume diff --git a/applications/solvers/multiphase/rasInterFoam/createFields.H b/applications/solvers/multiphase/rasInterFoam/createFields.H deleted file mode 100644 index e97a3abcb0..0000000000 --- a/applications/solvers/multiphase/rasInterFoam/createFields.H +++ /dev/null @@ -1,116 +0,0 @@ - Info<< "Reading field pd\n" << endl; - volScalarField pd - ( - IOobject - ( - "pd", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - Info<< "Reading field gamma\n" << endl; - volScalarField gamma - ( - IOobject - ( - "gamma", - 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 - ); - -# include "createPhi.H" - - Info<< "Reading transportProperties\n" << endl; - twoPhaseMixture twoPhaseProperties(U, phi, "gamma"); - - const dimensionedScalar& rho1 = twoPhaseProperties.rho1(); - const dimensionedScalar& rho2 = twoPhaseProperties.rho2(); - - - // Need to store rho for ddt(rho, U) - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::READ_IF_PRESENT - ), - gamma*rho1 + (scalar(1) - gamma)*rho2, - gamma.boundaryField().types() - ); - rho.oldTime(); - - - // Mass flux - // Initialisation does not matter because rhoPhi is reset after the - // gamma solution before it is used in the U equation. - surfaceScalarField rhoPhi - ( - IOobject - ( - "rho*phi", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - rho1*phi - ); - - - label pdRefCell = 0; - scalar pdRefValue = 0.0; - setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue); - - - Info<< "Calculating field g.h\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 - ), - pd + rho*gh - ); - - - // Construct interface from gamma distribution - interfaceProperties interface(gamma, U, twoPhaseProperties); - - // Construct LES model - autoPtr turbulence - ( - incompressible::RASModel::New(U, phi, twoPhaseProperties) - ); diff --git a/applications/solvers/multiphase/settlingFoam/UEqn.H b/applications/solvers/multiphase/settlingFoam/UEqn.H index 8dba5041c2..ac4c18ab19 100644 --- a/applications/solvers/multiphase/settlingFoam/UEqn.H +++ b/applications/solvers/multiphase/settlingFoam/UEqn.H @@ -1,29 +1,31 @@ -// Solve the Momentum equation + // Solve the Momentum equation -fvVectorMatrix UEqn -( - fvm::ddt(rho, U) - + fvm::div(phi, U) - + fvc::div + fvVectorMatrix UEqn ( - (Alpha/(scalar(1.001) - Alpha))*(sqr(rhoc)/rho)*Vdj*Vdj, - "div(phiVdj,Vdj)" - ) - - fvm::laplacian(mu, U, "laplacian(muEff,U)") -); - -if (momentumPredictor) -{ - solve - ( - UEqn - == - fvc::reconstruct + fvm::ddt(rho, U) + + fvm::div(phi, U) + + fvc::div ( - ( - - ghf*fvc::snGrad(rho) - - fvc::snGrad(p) - )*mesh.magSf() + (Alpha/(scalar(1.001) - Alpha))*(sqr(rhoc)/rho)*Vdj*Vdj, + "div(phiVdj,Vdj)" ) + - fvm::laplacian(mu, U, "laplacian(muEff,U)") ); -} + + UEqn.relax(); + + if (momentumPredictor) + { + solve + ( + UEqn + == + fvc::reconstruct + ( + ( + - ghf*fvc::snGrad(rho) + - fvc::snGrad(p) + )*mesh.magSf() + ) + ); + } diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options b/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options index ae5ccba0fd..0e21fc2d64 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options @@ -2,9 +2,12 @@ EXE_INC = \ -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 = \ -linterfaceProperties \ -lincompressibleTransportModels \ + -lincompressibleRASModels \ + -lincompressibleLESModels \ -lfiniteVolume diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H b/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H index 0ebaec44f5..5a945697ca 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H @@ -1,14 +1,21 @@ - surfaceScalarField muf = twoPhaseProperties.muf(); + surfaceScalarField muEff + ( + "muEff", + twoPhaseProperties.muf() + + fvc::interpolate(rho*turbulence->nut()) + ); fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - - fvm::laplacian(muf, U) - //- (fvc::grad(U) & fvc::grad(muf)) - - fvc::div(muf*(mesh.Sf() & fvc::interpolate(fvc::grad(U)().T()))) + - fvm::laplacian(muEff, U) + - (fvc::grad(U) & fvc::grad(muEff)) + //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) ); + UEqn.relax(); + if (momentumPredictor) { solve diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/alphaEqn.H b/applications/solvers/multiphase/twoLiquidMixingFoam/alphaEqn.H new file mode 100644 index 0000000000..c126025368 --- /dev/null +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/alphaEqn.H @@ -0,0 +1,19 @@ +{ + fvScalarMatrix alpha1Eqn + ( + fvm::ddt(alpha1) + + fvm::div(phi, alpha1) + - fvm::laplacian(Dab, alpha1) + ); + + alpha1Eqn.solve(); + + rhoPhi = alpha1Eqn.flux()*(rho1 - rho2) + phi*rho2; + rho = alpha1*rho1 + (scalar(1) - alpha1)*rho2; + + Info<< "Phase 1 volume fraction = " + << alpha1.weightedAverage(mesh.V()).value() + << " Min(alpha1) = " << min(alpha1).value() + << " Max(alpha1) = " << max(alpha1).value() + << endl; +} diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H b/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H index 652d1ad64c..bd7c3e2c9f 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H @@ -12,12 +12,12 @@ mesh ); - Info<< "Reading field gamma\n" << endl; - volScalarField gamma + Info<< "Reading field alpha1\n" << endl; + volScalarField alpha1 ( IOobject ( - "gamma", + "alpha1", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -43,21 +43,21 @@ # include "createPhi.H" Info<< "Reading transportProperties\n" << endl; - twoPhaseMixture twoPhaseProperties(U, phi, "gamma"); - + twoPhaseMixture twoPhaseProperties(U, phi); + const dimensionedScalar& rho1 = twoPhaseProperties.rho1(); const dimensionedScalar& rho2 = twoPhaseProperties.rho2(); dimensionedScalar Dab(twoPhaseProperties.lookup("Dab")); // Need to store rho for ddt(rho, U) - volScalarField rho("rho", gamma*rho1 + (scalar(1) - gamma)*rho2); + volScalarField rho("rho", alpha1*rho1 + (scalar(1) - alpha1)*rho2); rho.oldTime(); // Mass flux // Initialisation does not matter because rhoPhi is reset after the - // gamma solution before it is used in the U equation. + // alpha1 solution before it is used in the U equation. surfaceScalarField rhoPhi ( IOobject @@ -73,9 +73,31 @@ Info<< "Calculating field g.h\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 + ), + pd + rho*gh + ); + + label pdRefCell = 0; scalar pdRefValue = 0.0; setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue); + + + // Construct incompressible turbulence model + autoPtr turbulence + ( + incompressible::turbulenceModel::New(U, phi, twoPhaseProperties) + ); diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/gammaEqn.H b/applications/solvers/multiphase/twoLiquidMixingFoam/gammaEqn.H deleted file mode 100644 index 144339f398..0000000000 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/gammaEqn.H +++ /dev/null @@ -1,19 +0,0 @@ -{ - fvScalarMatrix gammaEqn - ( - fvm::ddt(gamma) - + fvm::div(phi, gamma) - - fvm::laplacian(Dab, gamma) - ); - - gammaEqn.solve(); - - rhoPhi = gammaEqn.flux()*(rho1 - rho2) + phi*rho2; - rho = gamma*rho1 + (scalar(1) - gamma)*rho2; - - Info<< "Phase 1 volume fraction = " - << gamma.weightedAverage(mesh.V()).value() - << " Min(gamma) = " << min(gamma).value() - << " Max(gamma) = " << max(gamma).value() - << endl; -} diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C index 64895530f6..7f9b32a917 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C @@ -28,10 +28,13 @@ Application Description Solver for mixing 2 incompressible fluids. + Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. + \*---------------------------------------------------------------------------*/ #include "fvCFD.H" #include "twoPhaseMixture.H" +#include "turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -58,7 +61,7 @@ int main(int argc, char *argv[]) twoPhaseProperties.correct(); -# include "gammaEqn.H" +# include "alphaEqn.H" # include "UEqn.H" @@ -70,6 +73,10 @@ int main(int argc, char *argv[]) # include "continuityErrs.H" + p = pd + rho*gh; + + turbulence->correct(); + runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L index ee7bca21f4..d114749b1c 100644 --- a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L @@ -928,7 +928,7 @@ int main(int argc, char *argv[]) } else { - if (!ignoreFaceGroups.found(groupName[faceGroupZoneID[fgi]])) + if (!ignoreFaceGroups.found(groupName[faceGroupZoneID[fgi] ])) { faceZoneIDs.append(fgi); } diff --git a/src/OpenFOAM/meshes/boundBox/boundBox.C b/src/OpenFOAM/meshes/boundBox/boundBox.C index ef85d72f62..f066876253 100644 --- a/src/OpenFOAM/meshes/boundBox/boundBox.C +++ b/src/OpenFOAM/meshes/boundBox/boundBox.C @@ -42,15 +42,6 @@ Foam::boundBox::boundBox(const pointField& points, const bool doReduce) min_ = point(VGREAT, VGREAT, VGREAT); max_ = point(-VGREAT, -VGREAT, -VGREAT); } - else - { - WarningIn("boundBox::boundBox(const pointField& points)") - << "Cannot find bounding box for zero sized pointField, " - "returning zero" - << endl; - - return; - } } else { diff --git a/src/transportModels/interfaceProperties/Make/files b/src/transportModels/interfaceProperties/Make/files index 56f21e91b1..a62008cee8 100644 --- a/src/transportModels/interfaceProperties/Make/files +++ b/src/transportModels/interfaceProperties/Make/files @@ -1,11 +1,11 @@ interfaceProperties.C interfaceCompression/interfaceCompression.C -gammaContactAngle/gammaContactAngle/gammaContactAngleFvPatchScalarField.C -gammaContactAngle/constantGammaContactAngle/constantGammaContactAngleFvPatchScalarField.C -gammaContactAngle/dynamicGammaContactAngle/dynamicGammaContactAngleFvPatchScalarField.C -gammaContactAngle/timeVaryingGammaContactAngle/timeVaryingGammaContactAngleFvPatchScalarField.C +alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C +alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C +alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.C +alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.C -gammaFixedPressure/gammaFixedPressureFvPatchScalarField.C +alphaFixedPressure/alphaFixedPressureFvPatchScalarField.C LIB = $(FOAM_LIBBIN)/libinterfaceProperties diff --git a/src/transportModels/interfaceProperties/gammaContactAngle/gammaContactAngle/gammaContactAngleFvPatchScalarField.C b/src/transportModels/interfaceProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C similarity index 72% rename from src/transportModels/interfaceProperties/gammaContactAngle/gammaContactAngle/gammaContactAngleFvPatchScalarField.C rename to src/transportModels/interfaceProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C index e4862424a4..b11bbd83cf 100644 --- a/src/transportModels/interfaceProperties/gammaContactAngle/gammaContactAngle/gammaContactAngleFvPatchScalarField.C +++ b/src/transportModels/interfaceProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "gammaContactAngleFvPatchScalarField.H" +#include "alphaContactAngleFvPatchScalarField.H" #include "addToRunTimeSelectionTable.H" #include "fvPatchFieldMapper.H" #include "volMesh.H" @@ -33,14 +33,13 @@ License namespace Foam { + defineTypeNameAndDebug(alphaContactAngleFvPatchScalarField, 0); +} -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(gammaContactAngleFvPatchScalarField, 0); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -gammaContactAngleFvPatchScalarField::gammaContactAngleFvPatchScalarField +Foam::alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF @@ -50,9 +49,9 @@ gammaContactAngleFvPatchScalarField::gammaContactAngleFvPatchScalarField {} -gammaContactAngleFvPatchScalarField::gammaContactAngleFvPatchScalarField +Foam::alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField ( - const gammaContactAngleFvPatchScalarField& gcpsf, + const alphaContactAngleFvPatchScalarField& gcpsf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper @@ -62,7 +61,7 @@ gammaContactAngleFvPatchScalarField::gammaContactAngleFvPatchScalarField {} -gammaContactAngleFvPatchScalarField::gammaContactAngleFvPatchScalarField +Foam::alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, @@ -75,18 +74,18 @@ gammaContactAngleFvPatchScalarField::gammaContactAngleFvPatchScalarField } -gammaContactAngleFvPatchScalarField::gammaContactAngleFvPatchScalarField +Foam::alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField ( - const gammaContactAngleFvPatchScalarField& gcpsf + const alphaContactAngleFvPatchScalarField& gcpsf ) : zeroGradientFvPatchScalarField(gcpsf) {} -gammaContactAngleFvPatchScalarField::gammaContactAngleFvPatchScalarField +Foam::alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField ( - const gammaContactAngleFvPatchScalarField& gcpsf, + const alphaContactAngleFvPatchScalarField& gcpsf, const DimensionedField& iF ) : @@ -94,8 +93,4 @@ gammaContactAngleFvPatchScalarField::gammaContactAngleFvPatchScalarField {} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/transportModels/interfaceProperties/gammaContactAngle/gammaContactAngle/gammaContactAngleFvPatchScalarField.H b/src/transportModels/interfaceProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.H similarity index 78% rename from src/transportModels/interfaceProperties/gammaContactAngle/gammaContactAngle/gammaContactAngleFvPatchScalarField.H rename to src/transportModels/interfaceProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.H index 6b90d838e1..4036f8cb69 100644 --- a/src/transportModels/interfaceProperties/gammaContactAngle/gammaContactAngle/gammaContactAngleFvPatchScalarField.H +++ b/src/transportModels/interfaceProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.H @@ -23,21 +23,21 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::gammaContactAngleFvPatchScalarField + Foam::alphaContactAngleFvPatchScalarField Description - Abstract base class for gammaContactAngle boundary conditions. + Abstract base class for alphaContactAngle boundary conditions. Derived classes must implement the theta() fuction which returns the wall contact angle field. SourceFiles - gammaContactAngleFvPatchScalarField.C + alphaContactAngleFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef gammaContactAngleFvPatchScalarField_H -#define gammaContactAngleFvPatchScalarField_H +#ifndef alphaContactAngleFvPatchScalarField_H +#define alphaContactAngleFvPatchScalarField_H #include "zeroGradientFvPatchFields.H" #include "fvsPatchFields.H" @@ -48,10 +48,10 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class gammaContactAngleFvPatch Declaration + Class alphaContactAngleFvPatch Declaration \*---------------------------------------------------------------------------*/ -class gammaContactAngleFvPatchScalarField +class alphaContactAngleFvPatchScalarField : public zeroGradientFvPatchScalarField { @@ -59,46 +59,46 @@ class gammaContactAngleFvPatchScalarField public: //- Runtime type information - TypeName("gammaContactAngle"); + TypeName("alphaContactAngle"); // Constructors //- Construct from patch and internal field - gammaContactAngleFvPatchScalarField + alphaContactAngleFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - gammaContactAngleFvPatchScalarField + alphaContactAngleFvPatchScalarField ( const fvPatch&, const DimensionedField&, const dictionary& ); - //- Construct by mapping given gammaContactAngleFvPatchScalarField + //- Construct by mapping given alphaContactAngleFvPatchScalarField // onto a new patch - gammaContactAngleFvPatchScalarField + alphaContactAngleFvPatchScalarField ( - const gammaContactAngleFvPatchScalarField&, + const alphaContactAngleFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy - gammaContactAngleFvPatchScalarField + alphaContactAngleFvPatchScalarField ( - const gammaContactAngleFvPatchScalarField& + const alphaContactAngleFvPatchScalarField& ); //- Construct as copy setting internal field reference - gammaContactAngleFvPatchScalarField + alphaContactAngleFvPatchScalarField ( - const gammaContactAngleFvPatchScalarField&, + const alphaContactAngleFvPatchScalarField&, const DimensionedField& ); diff --git a/src/transportModels/interfaceProperties/gammaContactAngle/constantGammaContactAngle/constantGammaContactAngleFvPatchScalarField.C b/src/transportModels/interfaceProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C similarity index 64% rename from src/transportModels/interfaceProperties/gammaContactAngle/constantGammaContactAngle/constantGammaContactAngleFvPatchScalarField.C rename to src/transportModels/interfaceProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C index d13c0c0c05..bf80fd79bd 100644 --- a/src/transportModels/interfaceProperties/gammaContactAngle/constantGammaContactAngle/constantGammaContactAngleFvPatchScalarField.C +++ b/src/transportModels/interfaceProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C @@ -24,85 +24,81 @@ License \*---------------------------------------------------------------------------*/ -#include "constantGammaContactAngleFvPatchScalarField.H" +#include "constantAlphaContactAngleFvPatchScalarField.H" #include "addToRunTimeSelectionTable.H" #include "volMesh.H" #include "fvPatchFieldMapper.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -constantGammaContactAngleFvPatchScalarField:: -constantGammaContactAngleFvPatchScalarField +Foam::constantAlphaContactAngleFvPatchScalarField:: +constantAlphaContactAngleFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF ) : - gammaContactAngleFvPatchScalarField(p, iF), + alphaContactAngleFvPatchScalarField(p, iF), theta0_(0.0) {} -constantGammaContactAngleFvPatchScalarField:: -constantGammaContactAngleFvPatchScalarField +Foam::constantAlphaContactAngleFvPatchScalarField:: +constantAlphaContactAngleFvPatchScalarField ( - const constantGammaContactAngleFvPatchScalarField& gcpsf, + const constantAlphaContactAngleFvPatchScalarField& gcpsf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper ) : - gammaContactAngleFvPatchScalarField(gcpsf, p, iF, mapper), + alphaContactAngleFvPatchScalarField(gcpsf, p, iF, mapper), theta0_(gcpsf.theta0_) {} -constantGammaContactAngleFvPatchScalarField:: -constantGammaContactAngleFvPatchScalarField +Foam::constantAlphaContactAngleFvPatchScalarField:: +constantAlphaContactAngleFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, const dictionary& dict ) : - gammaContactAngleFvPatchScalarField(p, iF), + alphaContactAngleFvPatchScalarField(p, iF), theta0_(readScalar(dict.lookup("theta0"))) { evaluate(); } -constantGammaContactAngleFvPatchScalarField:: -constantGammaContactAngleFvPatchScalarField +Foam::constantAlphaContactAngleFvPatchScalarField:: +constantAlphaContactAngleFvPatchScalarField ( - const constantGammaContactAngleFvPatchScalarField& gcpsf + const constantAlphaContactAngleFvPatchScalarField& gcpsf ) : - gammaContactAngleFvPatchScalarField(gcpsf), + alphaContactAngleFvPatchScalarField(gcpsf), theta0_(gcpsf.theta0_) {} -constantGammaContactAngleFvPatchScalarField:: -constantGammaContactAngleFvPatchScalarField +Foam::constantAlphaContactAngleFvPatchScalarField:: +constantAlphaContactAngleFvPatchScalarField ( - const constantGammaContactAngleFvPatchScalarField& gcpsf, + const constantAlphaContactAngleFvPatchScalarField& gcpsf, const DimensionedField& iF ) : - gammaContactAngleFvPatchScalarField(gcpsf, iF), + alphaContactAngleFvPatchScalarField(gcpsf, iF), theta0_(gcpsf.theta0_) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp constantGammaContactAngleFvPatchScalarField::theta +Foam::tmp +Foam::constantAlphaContactAngleFvPatchScalarField::theta ( const fvPatchVectorField&, const fvsPatchVectorField& @@ -112,7 +108,10 @@ tmp constantGammaContactAngleFvPatchScalarField::theta } -void constantGammaContactAngleFvPatchScalarField::write(Ostream& os) const +void Foam::constantAlphaContactAngleFvPatchScalarField::write +( + Ostream& os +) const { fvPatchScalarField::write(os); os.writeKeyword("theta0") << theta0_ << token::END_STATEMENT << nl; @@ -122,14 +121,13 @@ void constantGammaContactAngleFvPatchScalarField::write(Ostream& os) const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makePatchTypeField -( - fvPatchScalarField, - constantGammaContactAngleFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam +namespace Foam +{ + makePatchTypeField + ( + fvPatchScalarField, + constantAlphaContactAngleFvPatchScalarField + ); +} // ************************************************************************* // diff --git a/src/transportModels/interfaceProperties/gammaContactAngle/constantGammaContactAngle/constantGammaContactAngleFvPatchScalarField.H b/src/transportModels/interfaceProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.H similarity index 74% rename from src/transportModels/interfaceProperties/gammaContactAngle/constantGammaContactAngle/constantGammaContactAngleFvPatchScalarField.H rename to src/transportModels/interfaceProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.H index d941402ec1..d81c115bd7 100644 --- a/src/transportModels/interfaceProperties/gammaContactAngle/constantGammaContactAngle/constantGammaContactAngleFvPatchScalarField.H +++ b/src/transportModels/interfaceProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.H @@ -23,21 +23,21 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::constantGammaContactAngleFvPatchScalarField + Foam::constantAlphaContactAngleFvPatchScalarField Description - A constant gammaContactAngle scalar boundary condition - (gammaContactAngleFvPatchScalarField) + A constant alphaContactAngle scalar boundary condition + (alphaContactAngleFvPatchScalarField) SourceFiles - constantGammaContactAngleFvPatchScalarField.C + constantAlphaContactAngleFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef constantGammaContactAngleFvPatchScalarField_H -#define constantGammaContactAngleFvPatchScalarField_H +#ifndef constantAlphaContactAngleFvPatchScalarField_H +#define constantAlphaContactAngleFvPatchScalarField_H -#include "gammaContactAngleFvPatchScalarField.H" +#include "alphaContactAngleFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -45,12 +45,12 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class constantGammaContactAngleFvPatch Declaration + Class constantAlphaContactAngleFvPatch Declaration \*---------------------------------------------------------------------------*/ -class constantGammaContactAngleFvPatchScalarField +class constantAlphaContactAngleFvPatchScalarField : - public gammaContactAngleFvPatchScalarField + public alphaContactAngleFvPatchScalarField { // Private data @@ -61,20 +61,20 @@ class constantGammaContactAngleFvPatchScalarField public: //- Runtime type information - TypeName("constantGammaContactAngle"); + TypeName("constantAlphaContactAngle"); // Constructors //- Construct from patch and internal field - constantGammaContactAngleFvPatchScalarField + constantAlphaContactAngleFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - constantGammaContactAngleFvPatchScalarField + constantAlphaContactAngleFvPatchScalarField ( const fvPatch&, const DimensionedField&, @@ -82,20 +82,20 @@ public: ); //- Construct by mapping given - // constantGammaContactAngleFvPatchScalarField + // constantAlphaContactAngleFvPatchScalarField // onto a new patch - constantGammaContactAngleFvPatchScalarField + constantAlphaContactAngleFvPatchScalarField ( - const constantGammaContactAngleFvPatchScalarField&, + const constantAlphaContactAngleFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy - constantGammaContactAngleFvPatchScalarField + constantAlphaContactAngleFvPatchScalarField ( - const constantGammaContactAngleFvPatchScalarField& + const constantAlphaContactAngleFvPatchScalarField& ); //- Construct and return a clone @@ -103,14 +103,14 @@ public: { return tmp ( - new constantGammaContactAngleFvPatchScalarField(*this) + new constantAlphaContactAngleFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - constantGammaContactAngleFvPatchScalarField + constantAlphaContactAngleFvPatchScalarField ( - const constantGammaContactAngleFvPatchScalarField&, + const constantAlphaContactAngleFvPatchScalarField&, const DimensionedField& ); @@ -122,7 +122,7 @@ public: { return tmp ( - new constantGammaContactAngleFvPatchScalarField(*this, iF) + new constantAlphaContactAngleFvPatchScalarField(*this, iF) ); } diff --git a/src/transportModels/interfaceProperties/gammaContactAngle/dynamicGammaContactAngle/dynamicGammaContactAngleFvPatchScalarField.C b/src/transportModels/interfaceProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.C similarity index 77% rename from src/transportModels/interfaceProperties/gammaContactAngle/dynamicGammaContactAngle/dynamicGammaContactAngleFvPatchScalarField.C rename to src/transportModels/interfaceProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.C index e965671150..8c2009f6d0 100644 --- a/src/transportModels/interfaceProperties/gammaContactAngle/dynamicGammaContactAngle/dynamicGammaContactAngleFvPatchScalarField.C +++ b/src/transportModels/interfaceProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.C @@ -24,21 +24,21 @@ License \*---------------------------------------------------------------------------*/ -#include "dynamicGammaContactAngleFvPatchScalarField.H" +#include "dynamicAlphaContactAngleFvPatchScalarField.H" #include "addToRunTimeSelectionTable.H" #include "fvPatchFieldMapper.H" #include "volMesh.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::dynamicGammaContactAngleFvPatchScalarField:: -dynamicGammaContactAngleFvPatchScalarField +Foam::dynamicAlphaContactAngleFvPatchScalarField:: +dynamicAlphaContactAngleFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF ) : - gammaContactAngleFvPatchScalarField(p, iF), + alphaContactAngleFvPatchScalarField(p, iF), theta0_(0.0), uTheta_(0.0), thetaA_(0.0), @@ -46,16 +46,16 @@ dynamicGammaContactAngleFvPatchScalarField {} -Foam::dynamicGammaContactAngleFvPatchScalarField:: -dynamicGammaContactAngleFvPatchScalarField +Foam::dynamicAlphaContactAngleFvPatchScalarField:: +dynamicAlphaContactAngleFvPatchScalarField ( - const dynamicGammaContactAngleFvPatchScalarField& gcpsf, + const dynamicAlphaContactAngleFvPatchScalarField& gcpsf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper ) : - gammaContactAngleFvPatchScalarField(gcpsf, p, iF, mapper), + alphaContactAngleFvPatchScalarField(gcpsf, p, iF, mapper), theta0_(gcpsf.theta0_), uTheta_(gcpsf.uTheta_), thetaA_(gcpsf.thetaA_), @@ -63,15 +63,15 @@ dynamicGammaContactAngleFvPatchScalarField {} -Foam::dynamicGammaContactAngleFvPatchScalarField:: -dynamicGammaContactAngleFvPatchScalarField +Foam::dynamicAlphaContactAngleFvPatchScalarField:: +dynamicAlphaContactAngleFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, const dictionary& dict ) : - gammaContactAngleFvPatchScalarField(p, iF), + alphaContactAngleFvPatchScalarField(p, iF), theta0_(readScalar(dict.lookup("theta0"))), uTheta_(readScalar(dict.lookup("uTheta"))), thetaA_(readScalar(dict.lookup("thetaA"))), @@ -81,13 +81,13 @@ dynamicGammaContactAngleFvPatchScalarField } -Foam::dynamicGammaContactAngleFvPatchScalarField:: -dynamicGammaContactAngleFvPatchScalarField +Foam::dynamicAlphaContactAngleFvPatchScalarField:: +dynamicAlphaContactAngleFvPatchScalarField ( - const dynamicGammaContactAngleFvPatchScalarField& gcpsf + const dynamicAlphaContactAngleFvPatchScalarField& gcpsf ) : - gammaContactAngleFvPatchScalarField(gcpsf), + alphaContactAngleFvPatchScalarField(gcpsf), theta0_(gcpsf.theta0_), uTheta_(gcpsf.uTheta_), thetaA_(gcpsf.thetaA_), @@ -95,14 +95,14 @@ dynamicGammaContactAngleFvPatchScalarField {} -Foam::dynamicGammaContactAngleFvPatchScalarField:: -dynamicGammaContactAngleFvPatchScalarField +Foam::dynamicAlphaContactAngleFvPatchScalarField:: +dynamicAlphaContactAngleFvPatchScalarField ( - const dynamicGammaContactAngleFvPatchScalarField& gcpsf, + const dynamicAlphaContactAngleFvPatchScalarField& gcpsf, const DimensionedField& iF ) : - gammaContactAngleFvPatchScalarField(gcpsf, iF), + alphaContactAngleFvPatchScalarField(gcpsf, iF), theta0_(gcpsf.theta0_), uTheta_(gcpsf.uTheta_), thetaA_(gcpsf.thetaA_), @@ -113,7 +113,7 @@ dynamicGammaContactAngleFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // Foam::tmp -Foam::dynamicGammaContactAngleFvPatchScalarField::theta +Foam::dynamicAlphaContactAngleFvPatchScalarField::theta ( const fvPatchVectorField& Up, const fvsPatchVectorField& nHat @@ -144,7 +144,7 @@ Foam::dynamicGammaContactAngleFvPatchScalarField::theta } -void Foam::dynamicGammaContactAngleFvPatchScalarField::write(Ostream& os) const +void Foam::dynamicAlphaContactAngleFvPatchScalarField::write(Ostream& os) const { fvPatchScalarField::write(os); os.writeKeyword("theta0") << theta0_ << token::END_STATEMENT << nl; @@ -162,7 +162,7 @@ namespace Foam makePatchTypeField ( fvPatchScalarField, - dynamicGammaContactAngleFvPatchScalarField + dynamicAlphaContactAngleFvPatchScalarField ); } diff --git a/src/transportModels/interfaceProperties/gammaContactAngle/dynamicGammaContactAngle/dynamicGammaContactAngleFvPatchScalarField.H b/src/transportModels/interfaceProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.H similarity index 75% rename from src/transportModels/interfaceProperties/gammaContactAngle/dynamicGammaContactAngle/dynamicGammaContactAngleFvPatchScalarField.H rename to src/transportModels/interfaceProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.H index 9e730c6f74..6c3d16965d 100644 --- a/src/transportModels/interfaceProperties/gammaContactAngle/dynamicGammaContactAngle/dynamicGammaContactAngleFvPatchScalarField.H +++ b/src/transportModels/interfaceProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.H @@ -23,21 +23,21 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::dynamicGammaContactAngleFvPatchScalarField + Foam::dynamicAlphaContactAngleFvPatchScalarField Description - A dynamic gammaContactAngle scalar boundary condition - (gammaContactAngleFvPatchScalarField) + A dynamic alphaContactAngle scalar boundary condition + (alphaContactAngleFvPatchScalarField) SourceFiles - dynamicGammaContactAngleFvPatchScalarField.C + dynamicAlphaContactAngleFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef dynamicGammaContactAngleFvPatchScalarField_H -#define dynamicGammaContactAngleFvPatchScalarField_H +#ifndef dynamicAlphaContactAngleFvPatchScalarField_H +#define dynamicAlphaContactAngleFvPatchScalarField_H -#include "gammaContactAngleFvPatchScalarField.H" +#include "alphaContactAngleFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -45,12 +45,12 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class dynamicGammaContactAngleFvPatch Declaration + Class dynamicAlphaContactAngleFvPatch Declaration \*---------------------------------------------------------------------------*/ -class dynamicGammaContactAngleFvPatchScalarField +class dynamicAlphaContactAngleFvPatchScalarField : - public gammaContactAngleFvPatchScalarField + public alphaContactAngleFvPatchScalarField { // Private data @@ -70,20 +70,20 @@ class dynamicGammaContactAngleFvPatchScalarField public: //- Runtime type information - TypeName("dynamicGammaContactAngle"); + TypeName("dynamicAlphaContactAngle"); // Constructors //- Construct from patch and internal field - dynamicGammaContactAngleFvPatchScalarField + dynamicAlphaContactAngleFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - dynamicGammaContactAngleFvPatchScalarField + dynamicAlphaContactAngleFvPatchScalarField ( const fvPatch&, const DimensionedField&, @@ -91,20 +91,20 @@ public: ); //- Construct by mapping given - // dynamicGammaContactAngleFvPatchScalarField + // dynamicAlphaContactAngleFvPatchScalarField // onto a new patch - dynamicGammaContactAngleFvPatchScalarField + dynamicAlphaContactAngleFvPatchScalarField ( - const dynamicGammaContactAngleFvPatchScalarField&, + const dynamicAlphaContactAngleFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy - dynamicGammaContactAngleFvPatchScalarField + dynamicAlphaContactAngleFvPatchScalarField ( - const dynamicGammaContactAngleFvPatchScalarField& + const dynamicAlphaContactAngleFvPatchScalarField& ); //- Construct and return a clone @@ -112,14 +112,14 @@ public: { return tmp ( - new dynamicGammaContactAngleFvPatchScalarField(*this) + new dynamicAlphaContactAngleFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - dynamicGammaContactAngleFvPatchScalarField + dynamicAlphaContactAngleFvPatchScalarField ( - const dynamicGammaContactAngleFvPatchScalarField&, + const dynamicAlphaContactAngleFvPatchScalarField&, const DimensionedField& ); @@ -131,7 +131,7 @@ public: { return tmp ( - new dynamicGammaContactAngleFvPatchScalarField(*this, iF) + new dynamicAlphaContactAngleFvPatchScalarField(*this, iF) ); } diff --git a/src/transportModels/interfaceProperties/gammaContactAngle/timeVaryingGammaContactAngle/timeVaryingGammaContactAngleFvPatchScalarField.C b/src/transportModels/interfaceProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.C similarity index 73% rename from src/transportModels/interfaceProperties/gammaContactAngle/timeVaryingGammaContactAngle/timeVaryingGammaContactAngleFvPatchScalarField.C rename to src/transportModels/interfaceProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.C index 0f43629851..ff9d7210c5 100644 --- a/src/transportModels/interfaceProperties/gammaContactAngle/timeVaryingGammaContactAngle/timeVaryingGammaContactAngleFvPatchScalarField.C +++ b/src/transportModels/interfaceProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.C @@ -24,27 +24,22 @@ License \*---------------------------------------------------------------------------*/ -#include "timeVaryingGammaContactAngleFvPatchScalarField.H" +#include "timeVaryingAlphaContactAngleFvPatchScalarField.H" #include "addToRunTimeSelectionTable.H" #include "fvPatchFieldMapper.H" #include "volMesh.H" #include "Time.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -timeVaryingGammaContactAngleFvPatchScalarField:: -timeVaryingGammaContactAngleFvPatchScalarField +Foam::timeVaryingAlphaContactAngleFvPatchScalarField:: +timeVaryingAlphaContactAngleFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF ) : - gammaContactAngleFvPatchScalarField(p, iF), + alphaContactAngleFvPatchScalarField(p, iF), t0_(0.0), thetaT0_(0.0), te_(0.0), @@ -52,16 +47,16 @@ timeVaryingGammaContactAngleFvPatchScalarField {} -timeVaryingGammaContactAngleFvPatchScalarField:: -timeVaryingGammaContactAngleFvPatchScalarField +Foam::timeVaryingAlphaContactAngleFvPatchScalarField:: +timeVaryingAlphaContactAngleFvPatchScalarField ( - const timeVaryingGammaContactAngleFvPatchScalarField& gcpsf, + const timeVaryingAlphaContactAngleFvPatchScalarField& gcpsf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper ) : - gammaContactAngleFvPatchScalarField(gcpsf, p, iF, mapper), + alphaContactAngleFvPatchScalarField(gcpsf, p, iF, mapper), t0_(gcpsf.t0_), thetaT0_(gcpsf.thetaT0_), te_(gcpsf.te_), @@ -69,15 +64,15 @@ timeVaryingGammaContactAngleFvPatchScalarField {} -timeVaryingGammaContactAngleFvPatchScalarField:: -timeVaryingGammaContactAngleFvPatchScalarField +Foam::timeVaryingAlphaContactAngleFvPatchScalarField:: +timeVaryingAlphaContactAngleFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, const dictionary& dict ) : - gammaContactAngleFvPatchScalarField(p, iF), + alphaContactAngleFvPatchScalarField(p, iF), t0_(readScalar(dict.lookup("t0"))), thetaT0_(readScalar(dict.lookup("thetaT0"))), te_(readScalar(dict.lookup("te"))), @@ -87,14 +82,14 @@ timeVaryingGammaContactAngleFvPatchScalarField } -timeVaryingGammaContactAngleFvPatchScalarField:: -timeVaryingGammaContactAngleFvPatchScalarField +Foam::timeVaryingAlphaContactAngleFvPatchScalarField:: +timeVaryingAlphaContactAngleFvPatchScalarField ( - const timeVaryingGammaContactAngleFvPatchScalarField& gcpsf, + const timeVaryingAlphaContactAngleFvPatchScalarField& gcpsf, const DimensionedField& iF ) : - gammaContactAngleFvPatchScalarField(gcpsf, iF), + alphaContactAngleFvPatchScalarField(gcpsf, iF), t0_(gcpsf.t0_), thetaT0_(gcpsf.thetaT0_), te_(gcpsf.te_), @@ -104,7 +99,8 @@ timeVaryingGammaContactAngleFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp timeVaryingGammaContactAngleFvPatchScalarField::theta +Foam::tmp +Foam::timeVaryingAlphaContactAngleFvPatchScalarField::theta ( const fvPatchVectorField&, const fvsPatchVectorField& @@ -130,7 +126,10 @@ tmp timeVaryingGammaContactAngleFvPatchScalarField::theta } -void timeVaryingGammaContactAngleFvPatchScalarField::write(Ostream& os) const +void Foam::timeVaryingAlphaContactAngleFvPatchScalarField::write +( + Ostream& os +) const { fvPatchScalarField::write(os); os.writeKeyword("t0") << t0_ << token::END_STATEMENT << nl; @@ -143,10 +142,13 @@ void timeVaryingGammaContactAngleFvPatchScalarField::write(Ostream& os) const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makePatchTypeField(fvPatchScalarField, timeVaryingGammaContactAngleFvPatchScalarField); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam +namespace Foam +{ + makePatchTypeField + ( + fvPatchScalarField, + timeVaryingAlphaContactAngleFvPatchScalarField + ); +} // ************************************************************************* // diff --git a/src/transportModels/interfaceProperties/gammaContactAngle/timeVaryingGammaContactAngle/timeVaryingGammaContactAngleFvPatchScalarField.H b/src/transportModels/interfaceProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.H similarity index 75% rename from src/transportModels/interfaceProperties/gammaContactAngle/timeVaryingGammaContactAngle/timeVaryingGammaContactAngleFvPatchScalarField.H rename to src/transportModels/interfaceProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.H index e07637471b..a2a071357e 100644 --- a/src/transportModels/interfaceProperties/gammaContactAngle/timeVaryingGammaContactAngle/timeVaryingGammaContactAngleFvPatchScalarField.H +++ b/src/transportModels/interfaceProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.H @@ -23,21 +23,21 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::timeVaryingGammaContactAngleFvPatchScalarField + Foam::timeVaryingAlphaContactAngleFvPatchScalarField Description - A time-varying gammaContactAngle scalar boundary condition - (gammaContactAngleFvPatchScalarField) + A time-varying alphaContactAngle scalar boundary condition + (alphaContactAngleFvPatchScalarField) SourceFiles - timeVaryingGammaContactAngleFvPatchScalarField.C + timeVaryingAlphaContactAngleFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef timeVaryingGammaContactAngleFvPatchScalarField_H -#define timeVaryingGammaContactAngleFvPatchScalarField_H +#ifndef timeVaryingAlphaContactAngleFvPatchScalarField_H +#define timeVaryingAlphaContactAngleFvPatchScalarField_H -#include "gammaContactAngleFvPatchScalarField.H" +#include "alphaContactAngleFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -45,12 +45,12 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class timeVaryingGammaContactAngleFvPatch Declaration + Class timeVaryingAlphaContactAngleFvPatch Declaration \*---------------------------------------------------------------------------*/ -class timeVaryingGammaContactAngleFvPatchScalarField +class timeVaryingAlphaContactAngleFvPatchScalarField : - public gammaContactAngleFvPatchScalarField + public alphaContactAngleFvPatchScalarField { // Private data @@ -64,31 +64,31 @@ class timeVaryingGammaContactAngleFvPatchScalarField public: //- Runtime type information - TypeName("timeVaryingGammaContactAngle"); + TypeName("timeVaryingAlphaContactAngle"); // Constructors //- Construct from patch and internal field - timeVaryingGammaContactAngleFvPatchScalarField + timeVaryingAlphaContactAngleFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - timeVaryingGammaContactAngleFvPatchScalarField + timeVaryingAlphaContactAngleFvPatchScalarField ( const fvPatch&, const DimensionedField&, const dictionary& ); - //- Construct by mapping given timeVaryingGammaContactAngleFvPatchScalarField + //- Construct by mapping given timeVaryingAlphaContactAngleFvPatchScalarField // onto a new patch - timeVaryingGammaContactAngleFvPatchScalarField + timeVaryingAlphaContactAngleFvPatchScalarField ( - const timeVaryingGammaContactAngleFvPatchScalarField&, + const timeVaryingAlphaContactAngleFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& @@ -99,14 +99,14 @@ public: { return tmp ( - new timeVaryingGammaContactAngleFvPatchScalarField(*this) + new timeVaryingAlphaContactAngleFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - timeVaryingGammaContactAngleFvPatchScalarField + timeVaryingAlphaContactAngleFvPatchScalarField ( - const timeVaryingGammaContactAngleFvPatchScalarField&, + const timeVaryingAlphaContactAngleFvPatchScalarField&, const DimensionedField& ); @@ -118,7 +118,7 @@ public: { return tmp ( - new timeVaryingGammaContactAngleFvPatchScalarField(*this, iF) + new timeVaryingAlphaContactAngleFvPatchScalarField(*this, iF) ); } diff --git a/src/transportModels/interfaceProperties/gammaFixedPressure/gammaFixedPressureFvPatchScalarField.C b/src/transportModels/interfaceProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.C similarity index 73% rename from src/transportModels/interfaceProperties/gammaFixedPressure/gammaFixedPressureFvPatchScalarField.C rename to src/transportModels/interfaceProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.C index aa9637b993..85d7f47105 100644 --- a/src/transportModels/interfaceProperties/gammaFixedPressure/gammaFixedPressureFvPatchScalarField.C +++ b/src/transportModels/interfaceProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.C @@ -24,20 +24,16 @@ License \*---------------------------------------------------------------------------*/ -#include "gammaFixedPressureFvPatchScalarField.H" +#include "alphaFixedPressureFvPatchScalarField.H" #include "addToRunTimeSelectionTable.H" #include "fvPatchFieldMapper.H" #include "volFields.H" #include "surfaceFields.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -gammaFixedPressureFvPatchScalarField::gammaFixedPressureFvPatchScalarField +Foam::alphaFixedPressureFvPatchScalarField:: +alphaFixedPressureFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF @@ -48,9 +44,10 @@ gammaFixedPressureFvPatchScalarField::gammaFixedPressureFvPatchScalarField {} -gammaFixedPressureFvPatchScalarField::gammaFixedPressureFvPatchScalarField +Foam::alphaFixedPressureFvPatchScalarField:: +alphaFixedPressureFvPatchScalarField ( - const gammaFixedPressureFvPatchScalarField& ptf, + const alphaFixedPressureFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper @@ -61,7 +58,8 @@ gammaFixedPressureFvPatchScalarField::gammaFixedPressureFvPatchScalarField {} -gammaFixedPressureFvPatchScalarField::gammaFixedPressureFvPatchScalarField +Foam::alphaFixedPressureFvPatchScalarField:: +alphaFixedPressureFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, @@ -85,9 +83,10 @@ gammaFixedPressureFvPatchScalarField::gammaFixedPressureFvPatchScalarField } -gammaFixedPressureFvPatchScalarField::gammaFixedPressureFvPatchScalarField +Foam::alphaFixedPressureFvPatchScalarField:: +alphaFixedPressureFvPatchScalarField ( - const gammaFixedPressureFvPatchScalarField& tppsf + const alphaFixedPressureFvPatchScalarField& tppsf ) : fixedValueFvPatchScalarField(tppsf), @@ -95,9 +94,10 @@ gammaFixedPressureFvPatchScalarField::gammaFixedPressureFvPatchScalarField {} -gammaFixedPressureFvPatchScalarField::gammaFixedPressureFvPatchScalarField +Foam::alphaFixedPressureFvPatchScalarField:: +alphaFixedPressureFvPatchScalarField ( - const gammaFixedPressureFvPatchScalarField& tppsf, + const alphaFixedPressureFvPatchScalarField& tppsf, const DimensionedField& iF ) : @@ -108,7 +108,7 @@ gammaFixedPressureFvPatchScalarField::gammaFixedPressureFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void gammaFixedPressureFvPatchScalarField::autoMap +void Foam::alphaFixedPressureFvPatchScalarField::autoMap ( const fvPatchFieldMapper& m ) @@ -118,7 +118,7 @@ void gammaFixedPressureFvPatchScalarField::autoMap } -void gammaFixedPressureFvPatchScalarField::rmap +void Foam::alphaFixedPressureFvPatchScalarField::rmap ( const fvPatchScalarField& ptf, const labelList& addr @@ -126,14 +126,14 @@ void gammaFixedPressureFvPatchScalarField::rmap { fixedValueFvPatchScalarField::rmap(ptf, addr); - const gammaFixedPressureFvPatchScalarField& tiptf = - refCast(ptf); + const alphaFixedPressureFvPatchScalarField& tiptf = + refCast(ptf); p_.rmap(tiptf.p_, addr); } -void gammaFixedPressureFvPatchScalarField::updateCoeffs() +void Foam::alphaFixedPressureFvPatchScalarField::updateCoeffs() { if (updated()) { @@ -154,7 +154,10 @@ void gammaFixedPressureFvPatchScalarField::updateCoeffs() } -void gammaFixedPressureFvPatchScalarField::write(Ostream& os) const +void Foam::alphaFixedPressureFvPatchScalarField::write +( + Ostream& os +) const { fvPatchScalarField::write(os); p_.writeEntry("p", os); @@ -164,10 +167,13 @@ void gammaFixedPressureFvPatchScalarField::write(Ostream& os) const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makePatchTypeField(fvPatchScalarField, gammaFixedPressureFvPatchScalarField); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam +namespace Foam +{ + makePatchTypeField + ( + fvPatchScalarField, + alphaFixedPressureFvPatchScalarField + ); +} // ************************************************************************* // diff --git a/src/transportModels/interfaceProperties/gammaFixedPressure/gammaFixedPressureFvPatchScalarField.H b/src/transportModels/interfaceProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.H similarity index 79% rename from src/transportModels/interfaceProperties/gammaFixedPressure/gammaFixedPressureFvPatchScalarField.H rename to src/transportModels/interfaceProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.H index e7c360b6bc..1a7200b1ce 100644 --- a/src/transportModels/interfaceProperties/gammaFixedPressure/gammaFixedPressureFvPatchScalarField.H +++ b/src/transportModels/interfaceProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.H @@ -23,18 +23,18 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::gammaFixedPressureFvPatchScalarField + Foam::alphaFixedPressureFvPatchScalarField Description - A fixed-pressure gammaContactAngle boundary + A fixed-pressure alphaContactAngle boundary SourceFiles - gammaFixedPressureFvPatchScalarField.C + alphaFixedPressureFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef gammaFixedPressureFvPatchScalarField_H -#define gammaFixedPressureFvPatchScalarField_H +#ifndef alphaFixedPressureFvPatchScalarField_H +#define alphaFixedPressureFvPatchScalarField_H #include "fixedValueFvPatchFields.H" @@ -44,10 +44,10 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class gammaFixedPressureFvPatch Declaration + Class alphaFixedPressureFvPatch Declaration \*---------------------------------------------------------------------------*/ -class gammaFixedPressureFvPatchScalarField +class alphaFixedPressureFvPatchScalarField : public fixedValueFvPatchScalarField { @@ -60,40 +60,40 @@ class gammaFixedPressureFvPatchScalarField public: //- Runtime type information - TypeName("gammaFixedPressure"); + TypeName("alphaFixedPressure"); // Constructors //- Construct from patch and internal field - gammaFixedPressureFvPatchScalarField + alphaFixedPressureFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - gammaFixedPressureFvPatchScalarField + alphaFixedPressureFvPatchScalarField ( const fvPatch&, const DimensionedField&, const dictionary& ); - //- Construct by mapping given gammaFixedPressureFvPatchScalarField + //- Construct by mapping given alphaFixedPressureFvPatchScalarField // onto a new patch - gammaFixedPressureFvPatchScalarField + alphaFixedPressureFvPatchScalarField ( - const gammaFixedPressureFvPatchScalarField&, + const alphaFixedPressureFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy - gammaFixedPressureFvPatchScalarField + alphaFixedPressureFvPatchScalarField ( - const gammaFixedPressureFvPatchScalarField& + const alphaFixedPressureFvPatchScalarField& ); //- Construct and return a clone @@ -101,14 +101,14 @@ public: { return tmp ( - new gammaFixedPressureFvPatchScalarField(*this) + new alphaFixedPressureFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - gammaFixedPressureFvPatchScalarField + alphaFixedPressureFvPatchScalarField ( - const gammaFixedPressureFvPatchScalarField&, + const alphaFixedPressureFvPatchScalarField&, const DimensionedField& ); @@ -120,7 +120,7 @@ public: { return tmp ( - new gammaFixedPressureFvPatchScalarField(*this, iF) + new alphaFixedPressureFvPatchScalarField(*this, iF) ); } @@ -129,13 +129,13 @@ public: // Access - //- Return the gammaFixed pressure + //- Return the alphaFixed pressure const scalarField& p() const { return p_; } - //- Return reference to the gammaFixed pressure to allow adjustment + //- Return reference to the alphaFixed pressure to allow adjustment scalarField& p() { return p_; diff --git a/src/transportModels/interfaceProperties/interfaceProperties.C b/src/transportModels/interfaceProperties/interfaceProperties.C index 2cf5fff1a3..4e3fb21ddc 100644 --- a/src/transportModels/interfaceProperties/interfaceProperties.C +++ b/src/transportModels/interfaceProperties/interfaceProperties.C @@ -22,33 +22,20 @@ License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Application - interfaceProperties - -Description - Properties to aid interFoam : - 1. Correct the gamma boundary condition for dynamic contact angle. - 2. Calculate interface curvature. - \*---------------------------------------------------------------------------*/ #include "interfaceProperties.H" -#include "gammaContactAngleFvPatchScalarField.H" +#include "alphaContactAngleFvPatchScalarField.H" #include "mathematicalConstants.H" #include "surfaceInterpolate.H" #include "fvcDiv.H" #include "fvcGrad.H" #include "fvcSnGrad.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * // -const scalar interfaceProperties::convertToRad = - mathematicalConstant::pi/180.0; +const Foam::scalar Foam::interfaceProperties::convertToRad = + Foam::mathematicalConstant::pi/180.0; // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -59,26 +46,26 @@ const scalar interfaceProperties::convertToRad = // The dynamic contact angle is calculated from the component of the // velocity on the direction of the interface, parallel to the wall. -void interfaceProperties::correctContactAngle +void Foam::interfaceProperties::correctContactAngle ( surfaceVectorField::GeometricBoundaryField& nHatb ) const { - const fvMesh& mesh = gamma_.mesh(); - const volScalarField::GeometricBoundaryField& gbf = gamma_.boundaryField(); + const fvMesh& mesh = alpha1_.mesh(); + const volScalarField::GeometricBoundaryField& gbf = alpha1_.boundaryField(); const fvBoundaryMesh& boundary = mesh.boundary(); forAll(boundary, patchi) { - if (isA(gbf[patchi])) + if (isA(gbf[patchi])) { - const gammaContactAngleFvPatchScalarField& gcap = - refCast + const alphaContactAngleFvPatchScalarField& gcap = + refCast (gbf[patchi]); fvsPatchVectorField& nHatp = nHatb[patchi]; - scalarField theta = + scalarField theta = convertToRad*gcap.theta(U_.boundaryField()[patchi], nHatp); vectorField nf = boundary[patchi].nf(); @@ -109,22 +96,22 @@ void interfaceProperties::correctContactAngle } -void interfaceProperties::calculateK() +void Foam::interfaceProperties::calculateK() { - const fvMesh& mesh = gamma_.mesh(); + const fvMesh& mesh = alpha1_.mesh(); const surfaceVectorField& Sf = mesh.Sf(); - // Cell gradient of gamma - volVectorField gradGamma = fvc::grad(gamma_); + // Cell gradient of alpha + volVectorField gradAlpha = fvc::grad(alpha1_); - // Interpolated face-gradient of gamma - surfaceVectorField gradGammaf = fvc::interpolate(gradGamma); - //gradGammaf -= + // Interpolated face-gradient of alpha + surfaceVectorField gradAlphaf = fvc::interpolate(gradAlpha); + //gradAlphaf -= // (mesh.Sf()/mesh.magSf()) - // *(fvc::snGrad(gamma_) - (mesh.Sf() & gradGammaf)/mesh.magSf()); + // *(fvc::snGrad(alpha1_) - (mesh.Sf() & gradAlphaf)/mesh.magSf()); // Face unit interface normal - surfaceVectorField nHatfv = gradGammaf/(mag(gradGammaf) + deltaN_); + surfaceVectorField nHatfv = gradAlphaf/(mag(gradAlphaf) + deltaN_); correctContactAngle(nHatfv.boundaryField()); // Face unit interface normal flux @@ -136,7 +123,7 @@ void interfaceProperties::calculateK() // Complex expression for curvature. // Correction is formally zero but numerically non-zero. /* - volVectorField nHat = gradGamma/(mag(gradGamma) + deltaN_); + volVectorField nHat = gradAlpha/(mag(gradAlpha) + deltaN_); forAll(nHat.boundaryField(), patchi) { nHat.boundaryField()[patchi] = nHatfv.boundaryField()[patchi]; @@ -149,19 +136,19 @@ void interfaceProperties::calculateK() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -interfaceProperties::interfaceProperties +Foam::interfaceProperties::interfaceProperties ( - const volScalarField& gamma, + const volScalarField& alpha1, const volVectorField& U, const IOdictionary& dict ) : transportPropertiesDict_(dict), - cGamma_ + cAlpha_ ( readScalar ( - gamma.mesh().solutionDict().subDict("PISO").lookup("cGamma") + alpha1.mesh().solutionDict().subDict("PISO").lookup("cAlpha") ) ), sigma_(dict.lookup("sigma")), @@ -169,10 +156,10 @@ interfaceProperties::interfaceProperties deltaN_ ( "deltaN", - 1e-8/pow(average(gamma.mesh().V()), 1.0/3.0) + 1e-8/pow(average(alpha1.mesh().V()), 1.0/3.0) ), - gamma_(gamma), + alpha1_(alpha1), U_(U), nHatf_ @@ -180,10 +167,10 @@ interfaceProperties::interfaceProperties IOobject ( "nHatf", - gamma_.time().timeName(), - gamma_.mesh() + alpha1_.time().timeName(), + alpha1_.mesh() ), - gamma_.mesh(), + alpha1_.mesh(), dimensionedScalar("nHatf", dimArea, 0.0) ), @@ -192,10 +179,10 @@ interfaceProperties::interfaceProperties IOobject ( "K", - gamma_.time().timeName(), - gamma_.mesh() + alpha1_.time().timeName(), + alpha1_.mesh() ), - gamma_.mesh(), + alpha1_.mesh(), dimensionedScalar("K", dimless/dimLength, 0.0) ) { @@ -203,8 +190,4 @@ interfaceProperties::interfaceProperties } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/transportModels/interfaceProperties/interfaceProperties.H b/src/transportModels/interfaceProperties/interfaceProperties.H index 33294b1319..e47345f59d 100644 --- a/src/transportModels/interfaceProperties/interfaceProperties.H +++ b/src/transportModels/interfaceProperties/interfaceProperties.H @@ -29,7 +29,7 @@ Description Contains the interface properties. Properties to aid interFoam: - -# Correct the gamma boundary condition for dynamic contact angle. + -# Correct the alpha boundary condition for dynamic contact angle. -# Calculate interface curvature. SourceFiles @@ -61,7 +61,7 @@ class interfaceProperties const dictionary& transportPropertiesDict_; //- Compression coefficient - scalar cGamma_; + scalar cAlpha_; //- Surface tension dimensionedScalar sigma_; @@ -69,7 +69,7 @@ class interfaceProperties //- Stabilisation for normalisation of the interface normal const dimensionedScalar deltaN_; - const volScalarField& gamma_; + const volScalarField& alpha1_; const volVectorField& U_; surfaceScalarField nHatf_; volScalarField K_; @@ -104,7 +104,7 @@ public: //- Construct from volume fraction field gamma and IOdictionary interfaceProperties ( - const volScalarField& gamma, + const volScalarField& alpha1, const volVectorField& U, const IOdictionary& ); @@ -112,9 +112,9 @@ public: // Member Functions - scalar cGamma() const + scalar cAlpha() const { - return cGamma_; + return cAlpha_; } const dimensionedScalar& deltaN() const diff --git a/src/turbulenceModels/Allwmake b/src/turbulenceModels/Allwmake index b542eeeeae..4c49ec6163 100755 --- a/src/turbulenceModels/Allwmake +++ b/src/turbulenceModels/Allwmake @@ -2,7 +2,8 @@ cd ${0%/*} || exit 1 # run from this directory set -x -RAS/Allwmake -LES/Allwmake +(cd LES && ./Allwmake ) +(cd incompressible && ./Allwmake ) +(cd compressible && ./Allwmake ) # ----------------------------------------------------------------- end-of-file diff --git a/src/turbulenceModels/LES/Allwmake b/src/turbulenceModels/LES/Allwmake index a2521d21f0..a80c71ab57 100755 --- a/src/turbulenceModels/LES/Allwmake +++ b/src/turbulenceModels/LES/Allwmake @@ -2,11 +2,9 @@ cd ${0%/*} || exit 1 # run from this directory set -x -wmakeLnInclude -f incompressible +wmakeLnInclude -f ../incompressible/LES wmake libso LESfilters wmake libso LESdeltas -wmake libso incompressible -wmake libso compressible # ----------------------------------------------------------------- end-of-file diff --git a/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.H b/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.H index fa13c45c32..9aed207d23 100644 --- a/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.H +++ b/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.H @@ -113,10 +113,9 @@ public: ); - // Destructor - - virtual ~LESdelta() - {} + //- Destructor + virtual ~LESdelta() + {} // Member Functions diff --git a/src/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.H b/src/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.H index 00c47f9eb7..a1f26f8ead 100644 --- a/src/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.H +++ b/src/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.H @@ -85,19 +85,18 @@ public: ); - // Destructor - - ~PrandtlDelta() - {} + //- Destructor + virtual ~PrandtlDelta() + {} // Member Functions //- Read the LESdelta dictionary - void read(const dictionary&); + virtual void read(const dictionary&); // Correct values - void correct(); + virtual void correct(); }; diff --git a/src/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.H b/src/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.H index 28d9362265..3277e77032 100644 --- a/src/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.H +++ b/src/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.H @@ -83,19 +83,18 @@ public: ); - // Destructor - - ~cubeRootVolDelta() - {} + //- Destructor + virtual ~cubeRootVolDelta() + {} // Member Functions //- Read the LESdelta dictionary - void read(const dictionary&); + virtual void read(const dictionary&); // Correct values - void correct(); + virtual void correct(); }; diff --git a/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H b/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H index 45266f583b..119d41f8f0 100644 --- a/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H +++ b/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H @@ -26,8 +26,8 @@ Class Foam::smoothDelta Description - Smoothed delta which takes a given simple geometric delta and applies - smoothing to it such that the ratio of deltas between two cells is no + Smoothed delta which takes a given simple geometric delta and applies + smoothing to it such that the ratio of deltas between two cells is no larger than a specified amount, typically 1.15. SourceFiles @@ -233,19 +233,18 @@ public: ); - // Destructor - - ~smoothDelta() - {} + //- Destructor + virtual ~smoothDelta() + {} // Member Functions //- Read the LESdelta dictionary - void read(const dictionary&); + virtual void read(const dictionary&); // Correct values - void correct(); + virtual void correct(); }; diff --git a/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.H b/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.H index 714605fd96..8d53e8ccd5 100644 --- a/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.H +++ b/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.H @@ -107,10 +107,9 @@ public: ); - // Destructor - - virtual ~LESfilter() - {} + //- Destructor + virtual ~LESfilter() + {} // Member Functions diff --git a/src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.H b/src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.H index 729eeb34b2..45a4e70edf 100644 --- a/src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.H +++ b/src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.H @@ -86,27 +86,29 @@ public: anisotropicFilter(const fvMesh& mesh, const dictionary&); - // Destructor - - ~anisotropicFilter() - {} + //- Destructor + virtual ~anisotropicFilter() + {} // Member Functions //- Read the LESfilter dictionary - void read(const dictionary&); + virtual void read(const dictionary&); // Member Operators - tmp operator()(const tmp&) const; - tmp operator()(const tmp&) const; - tmp operator() + virtual tmp operator()(const tmp&) const; + + virtual tmp operator()(const tmp&) const; + + virtual tmp operator() ( const tmp& ) const; - tmp operator()(const tmp&) const; + + virtual tmp operator()(const tmp&) const; }; diff --git a/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.H b/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.H index 158f3ea320..3e5760604b 100644 --- a/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.H +++ b/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.H @@ -87,27 +87,29 @@ public: laplaceFilter(const fvMesh& mesh, const dictionary&); - // Destructor - - ~laplaceFilter() - {} + //- Destructor + virtual ~laplaceFilter() + {} // Member Functions //- Read the LESfilter dictionary - void read(const dictionary&); + virtual void read(const dictionary&); // Member Operators - tmp operator()(const tmp&) const; - tmp operator()(const tmp&) const; - tmp operator() + virtual tmp operator()(const tmp&) const; + + virtual tmp operator()(const tmp&) const; + + virtual tmp operator() ( const tmp& ) const; - tmp operator()(const tmp&) const; + + virtual tmp operator()(const tmp&) const; }; diff --git a/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.H b/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.H index 6cf7729e1e..4e4c5e0f47 100644 --- a/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.H +++ b/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.H @@ -76,27 +76,29 @@ public: simpleFilter(const fvMesh& mesh, const dictionary&); - // Destructor - - ~simpleFilter() - {} + //- Destructor + virtual ~simpleFilter() + {} // Member Functions //- Read the LESfilter dictionary - void read(const dictionary&); + virtual void read(const dictionary&); // Member Operators - tmp operator()(const tmp&) const; - tmp operator()(const tmp&) const; - tmp operator() + virtual tmp operator()(const tmp&) const; + + virtual tmp operator()(const tmp&) const; + + virtual tmp operator() ( const tmp& ) const; - tmp operator()(const tmp&) const; + + virtual tmp operator()(const tmp&) const; }; diff --git a/src/turbulenceModels/LES/incompressible/Make/options b/src/turbulenceModels/LES/incompressible/Make/options deleted file mode 100644 index a2991710f1..0000000000 --- a/src/turbulenceModels/LES/incompressible/Make/options +++ /dev/null @@ -1,12 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I../LESdeltas/lnInclude \ - -I../LESfilters/lnInclude \ - -I$(LIB_SRC)/transportModels - -LIB_LIBS = \ - -lLESdeltas \ - -lLESfilters\ - -lfiniteVolume \ - -lmeshTools diff --git a/src/turbulenceModels/compressible/Allwmake b/src/turbulenceModels/compressible/Allwmake new file mode 100755 index 0000000000..4686db7027 --- /dev/null +++ b/src/turbulenceModels/compressible/Allwmake @@ -0,0 +1,9 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory +set -x + +#wmake libso turbulenceModel +wmake libso RAS +wmake libso LES + +# ----------------------------------------------------------------- end-of-file diff --git a/src/turbulenceModels/LES/compressible/DeardorffDiffStress/DeardorffDiffStress.C b/src/turbulenceModels/compressible/LES/DeardorffDiffStress/DeardorffDiffStress.C similarity index 100% rename from src/turbulenceModels/LES/compressible/DeardorffDiffStress/DeardorffDiffStress.C rename to src/turbulenceModels/compressible/LES/DeardorffDiffStress/DeardorffDiffStress.C diff --git a/src/turbulenceModels/LES/compressible/DeardorffDiffStress/DeardorffDiffStress.H b/src/turbulenceModels/compressible/LES/DeardorffDiffStress/DeardorffDiffStress.H similarity index 100% rename from src/turbulenceModels/LES/compressible/DeardorffDiffStress/DeardorffDiffStress.H rename to src/turbulenceModels/compressible/LES/DeardorffDiffStress/DeardorffDiffStress.H diff --git a/src/turbulenceModels/LES/compressible/GenEddyVisc/GenEddyVisc.C b/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.C similarity index 100% rename from src/turbulenceModels/LES/compressible/GenEddyVisc/GenEddyVisc.C rename to src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.C diff --git a/src/turbulenceModels/LES/compressible/GenEddyVisc/GenEddyVisc.H b/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.H similarity index 100% rename from src/turbulenceModels/LES/compressible/GenEddyVisc/GenEddyVisc.H rename to src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.H diff --git a/src/turbulenceModels/LES/compressible/GenSGSStress/GenSGSStress.C b/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.C similarity index 100% rename from src/turbulenceModels/LES/compressible/GenSGSStress/GenSGSStress.C rename to src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.C diff --git a/src/turbulenceModels/LES/compressible/GenSGSStress/GenSGSStress.H b/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.H similarity index 100% rename from src/turbulenceModels/LES/compressible/GenSGSStress/GenSGSStress.H rename to src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.H diff --git a/src/turbulenceModels/LES/compressible/LESModel/LESModel.C b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C similarity index 100% rename from src/turbulenceModels/LES/compressible/LESModel/LESModel.C rename to src/turbulenceModels/compressible/LES/LESModel/LESModel.C diff --git a/src/turbulenceModels/LES/compressible/LESModel/LESModel.H b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H similarity index 100% rename from src/turbulenceModels/LES/compressible/LESModel/LESModel.H rename to src/turbulenceModels/compressible/LES/LESModel/LESModel.H diff --git a/src/turbulenceModels/LES/compressible/LESModel/newLESModel.C b/src/turbulenceModels/compressible/LES/LESModel/newLESModel.C similarity index 100% rename from src/turbulenceModels/LES/compressible/LESModel/newLESModel.C rename to src/turbulenceModels/compressible/LES/LESModel/newLESModel.C diff --git a/src/turbulenceModels/LES/compressible/Make/files b/src/turbulenceModels/compressible/LES/Make/files similarity index 100% rename from src/turbulenceModels/LES/compressible/Make/files rename to src/turbulenceModels/compressible/LES/Make/files diff --git a/src/turbulenceModels/LES/compressible/Make/options b/src/turbulenceModels/compressible/LES/Make/options similarity index 73% rename from src/turbulenceModels/LES/compressible/Make/options rename to src/turbulenceModels/compressible/LES/Make/options index c148a902e0..4ccb52fba2 100644 --- a/src/turbulenceModels/LES/compressible/Make/options +++ b/src/turbulenceModels/compressible/LES/Make/options @@ -1,8 +1,8 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I../LESdeltas/lnInclude \ - -I../LESfilters/lnInclude \ + -I../../LES/LESdeltas/lnInclude \ + -I../../LES/LESfilters/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude LIB_LIBS = \ diff --git a/src/turbulenceModels/LES/compressible/Smagorinsky/Smagorinsky.C b/src/turbulenceModels/compressible/LES/Smagorinsky/Smagorinsky.C similarity index 100% rename from src/turbulenceModels/LES/compressible/Smagorinsky/Smagorinsky.C rename to src/turbulenceModels/compressible/LES/Smagorinsky/Smagorinsky.C diff --git a/src/turbulenceModels/LES/compressible/Smagorinsky/Smagorinsky.H b/src/turbulenceModels/compressible/LES/Smagorinsky/Smagorinsky.H similarity index 100% rename from src/turbulenceModels/LES/compressible/Smagorinsky/Smagorinsky.H rename to src/turbulenceModels/compressible/LES/Smagorinsky/Smagorinsky.H diff --git a/src/turbulenceModels/LES/compressible/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.C similarity index 100% rename from src/turbulenceModels/LES/compressible/SpalartAllmaras/SpalartAllmaras.C rename to src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.C diff --git a/src/turbulenceModels/LES/compressible/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.H similarity index 100% rename from src/turbulenceModels/LES/compressible/SpalartAllmaras/SpalartAllmaras.H rename to src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.H diff --git a/src/turbulenceModels/LES/compressible/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsSpalartAllmarasWallFunction/muSgsSpalartAllmarasWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsSpalartAllmarasWallFunction/muSgsSpalartAllmarasWallFunctionFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/LES/compressible/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsSpalartAllmarasWallFunction/muSgsSpalartAllmarasWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsSpalartAllmarasWallFunction/muSgsSpalartAllmarasWallFunctionFvPatchScalarField.C diff --git a/src/turbulenceModels/LES/compressible/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsSpalartAllmarasWallFunction/muSgsSpalartAllmarasWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsSpalartAllmarasWallFunction/muSgsSpalartAllmarasWallFunctionFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/LES/compressible/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsSpalartAllmarasWallFunction/muSgsSpalartAllmarasWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsSpalartAllmarasWallFunction/muSgsSpalartAllmarasWallFunctionFvPatchScalarField.H diff --git a/src/turbulenceModels/LES/compressible/dynOneEqEddy/dynOneEqEddy.C b/src/turbulenceModels/compressible/LES/dynOneEqEddy/dynOneEqEddy.C similarity index 100% rename from src/turbulenceModels/LES/compressible/dynOneEqEddy/dynOneEqEddy.C rename to src/turbulenceModels/compressible/LES/dynOneEqEddy/dynOneEqEddy.C diff --git a/src/turbulenceModels/LES/compressible/dynOneEqEddy/dynOneEqEddy.H b/src/turbulenceModels/compressible/LES/dynOneEqEddy/dynOneEqEddy.H similarity index 100% rename from src/turbulenceModels/LES/compressible/dynOneEqEddy/dynOneEqEddy.H rename to src/turbulenceModels/compressible/LES/dynOneEqEddy/dynOneEqEddy.H diff --git a/src/turbulenceModels/LES/compressible/lowReOneEqEddy/lowReOneEqEddy.C b/src/turbulenceModels/compressible/LES/lowReOneEqEddy/lowReOneEqEddy.C similarity index 100% rename from src/turbulenceModels/LES/compressible/lowReOneEqEddy/lowReOneEqEddy.C rename to src/turbulenceModels/compressible/LES/lowReOneEqEddy/lowReOneEqEddy.C diff --git a/src/turbulenceModels/LES/compressible/lowReOneEqEddy/lowReOneEqEddy.H b/src/turbulenceModels/compressible/LES/lowReOneEqEddy/lowReOneEqEddy.H similarity index 100% rename from src/turbulenceModels/LES/compressible/lowReOneEqEddy/lowReOneEqEddy.H rename to src/turbulenceModels/compressible/LES/lowReOneEqEddy/lowReOneEqEddy.H diff --git a/src/turbulenceModels/LES/compressible/oneEqEddy/oneEqEddy.C b/src/turbulenceModels/compressible/LES/oneEqEddy/oneEqEddy.C similarity index 100% rename from src/turbulenceModels/LES/compressible/oneEqEddy/oneEqEddy.C rename to src/turbulenceModels/compressible/LES/oneEqEddy/oneEqEddy.C diff --git a/src/turbulenceModels/LES/compressible/oneEqEddy/oneEqEddy.H b/src/turbulenceModels/compressible/LES/oneEqEddy/oneEqEddy.H similarity index 100% rename from src/turbulenceModels/LES/compressible/oneEqEddy/oneEqEddy.H rename to src/turbulenceModels/compressible/LES/oneEqEddy/oneEqEddy.H diff --git a/src/turbulenceModels/RAS/compressible/LRR/LRR.C b/src/turbulenceModels/compressible/RAS/LRR/LRR.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/LRR/LRR.C rename to src/turbulenceModels/compressible/RAS/LRR/LRR.C diff --git a/src/turbulenceModels/RAS/compressible/LRR/LRR.H b/src/turbulenceModels/compressible/RAS/LRR/LRR.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/LRR/LRR.H rename to src/turbulenceModels/compressible/RAS/LRR/LRR.H diff --git a/src/turbulenceModels/RAS/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C rename to src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C diff --git a/src/turbulenceModels/RAS/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H rename to src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H diff --git a/src/turbulenceModels/RAS/compressible/LaunderSharmaKE/LaunderSharmaKE.C b/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/LaunderSharmaKE/LaunderSharmaKE.C rename to src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C diff --git a/src/turbulenceModels/RAS/compressible/LaunderSharmaKE/LaunderSharmaKE.H b/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/LaunderSharmaKE/LaunderSharmaKE.H rename to src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H diff --git a/src/turbulenceModels/RAS/compressible/Make/files b/src/turbulenceModels/compressible/RAS/Make/files similarity index 100% rename from src/turbulenceModels/RAS/compressible/Make/files rename to src/turbulenceModels/compressible/RAS/Make/files diff --git a/src/turbulenceModels/RAS/compressible/Make/options b/src/turbulenceModels/compressible/RAS/Make/options similarity index 100% rename from src/turbulenceModels/RAS/compressible/Make/options rename to src/turbulenceModels/compressible/RAS/Make/options diff --git a/src/turbulenceModels/RAS/compressible/RASModel/RASModel.C b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/RASModel/RASModel.C rename to src/turbulenceModels/compressible/RAS/RASModel/RASModel.C diff --git a/src/turbulenceModels/RAS/compressible/RASModel/RASModel.H b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/RASModel/RASModel.H rename to src/turbulenceModels/compressible/RAS/RASModel/RASModel.H diff --git a/src/turbulenceModels/RAS/compressible/RASModel/newRASModel.C b/src/turbulenceModels/compressible/RAS/RASModel/newRASModel.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/RASModel/newRASModel.C rename to src/turbulenceModels/compressible/RAS/RASModel/newRASModel.C diff --git a/src/turbulenceModels/RAS/compressible/RNGkEpsilon/RNGkEpsilon.C b/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/RNGkEpsilon/RNGkEpsilon.C rename to src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.C diff --git a/src/turbulenceModels/RAS/compressible/RNGkEpsilon/RNGkEpsilon.H b/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/RNGkEpsilon/RNGkEpsilon.H rename to src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.H diff --git a/src/turbulenceModels/RAS/compressible/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/SpalartAllmaras/SpalartAllmaras.C rename to src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.C diff --git a/src/turbulenceModels/RAS/compressible/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/SpalartAllmaras/SpalartAllmaras.H rename to src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.H diff --git a/src/turbulenceModels/RAS/compressible/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.C b/src/turbulenceModels/compressible/RAS/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.C rename to src/turbulenceModels/compressible/RAS/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.C diff --git a/src/turbulenceModels/RAS/compressible/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.H b/src/turbulenceModels/compressible/RAS/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.H rename to src/turbulenceModels/compressible/RAS/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.H diff --git a/src/turbulenceModels/RAS/compressible/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctionsTemplates.C b/src/turbulenceModels/compressible/RAS/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctionsTemplates.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctionsTemplates.C rename to src/turbulenceModels/compressible/RAS/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctionsTemplates.C diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.C rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.C diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.H rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.H diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchFields.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchFields.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchFields.C rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchFields.C diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchFields.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchFields.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchFields.H rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchFields.H diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.H diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.C diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.H diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H diff --git a/src/turbulenceModels/RAS/compressible/include/wallDissipationI.H b/src/turbulenceModels/compressible/RAS/include/wallDissipationI.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/include/wallDissipationI.H rename to src/turbulenceModels/compressible/RAS/include/wallDissipationI.H diff --git a/src/turbulenceModels/RAS/compressible/include/wallFunctionsI.H b/src/turbulenceModels/compressible/RAS/include/wallFunctionsI.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/include/wallFunctionsI.H rename to src/turbulenceModels/compressible/RAS/include/wallFunctionsI.H diff --git a/src/turbulenceModels/RAS/compressible/include/wallViscosityI.H b/src/turbulenceModels/compressible/RAS/include/wallViscosityI.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/include/wallViscosityI.H rename to src/turbulenceModels/compressible/RAS/include/wallViscosityI.H diff --git a/src/turbulenceModels/RAS/compressible/kEpsilon/kEpsilon.C b/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/kEpsilon/kEpsilon.C rename to src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.C diff --git a/src/turbulenceModels/RAS/compressible/kEpsilon/kEpsilon.H b/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/kEpsilon/kEpsilon.H rename to src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.H diff --git a/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaSST.C b/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaSST.C rename to src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C diff --git a/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaSST.H b/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaSST.H rename to src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.H diff --git a/src/turbulenceModels/RAS/compressible/laminar/laminar.C b/src/turbulenceModels/compressible/RAS/laminar/laminar.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/laminar/laminar.C rename to src/turbulenceModels/compressible/RAS/laminar/laminar.C diff --git a/src/turbulenceModels/RAS/compressible/laminar/laminar.H b/src/turbulenceModels/compressible/RAS/laminar/laminar.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/laminar/laminar.H rename to src/turbulenceModels/compressible/RAS/laminar/laminar.H diff --git a/src/turbulenceModels/RAS/compressible/realizableKE/realizableKE.C b/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.C similarity index 100% rename from src/turbulenceModels/RAS/compressible/realizableKE/realizableKE.C rename to src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.C diff --git a/src/turbulenceModels/RAS/compressible/realizableKE/realizableKE.H b/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.H similarity index 100% rename from src/turbulenceModels/RAS/compressible/realizableKE/realizableKE.H rename to src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.H diff --git a/src/turbulenceModels/RAS/Allwmake b/src/turbulenceModels/incompressible/Allwmake similarity index 71% rename from src/turbulenceModels/RAS/Allwmake rename to src/turbulenceModels/incompressible/Allwmake index 5761ba6ffd..ddff417018 100755 --- a/src/turbulenceModels/RAS/Allwmake +++ b/src/turbulenceModels/incompressible/Allwmake @@ -2,7 +2,8 @@ cd ${0%/*} || exit 1 # run from this directory set -x -wmake libso incompressible -wmake libso compressible +wmake libso turbulenceModel +wmake libso RAS +wmake libso LES # ----------------------------------------------------------------- end-of-file diff --git a/src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.C b/src/turbulenceModels/incompressible/LES/DeardorffDiffStress/DeardorffDiffStress.C similarity index 98% rename from src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.C rename to src/turbulenceModels/incompressible/LES/DeardorffDiffStress/DeardorffDiffStress.C index dabd5838f1..aa7e5b7cc6 100644 --- a/src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.C +++ b/src/turbulenceModels/incompressible/LES/DeardorffDiffStress/DeardorffDiffStress.C @@ -43,7 +43,6 @@ addToRunTimeSelectionTable(LESModel, DeardorffDiffStress, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// from components DeardorffDiffStress::DeardorffDiffStress ( const volVectorField& U, @@ -92,7 +91,7 @@ void DeardorffDiffStress::correct(const tmp& tgradU) volScalarField K = 0.5*tr(B_); volScalarField Epsilon = 2*nuEff()*magSqr(D); - solve + fvSymmTensorMatrix BEqn ( fvm::ddt(B_) + fvm::div(phi(), B_) @@ -104,6 +103,8 @@ void DeardorffDiffStress::correct(const tmp& tgradU) - (2*ce_ - 0.667*cm_)*I*Epsilon ); + BEqn.relax(); + BEqn.solve(); // Bounding the component kinetic energies diff --git a/src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.H b/src/turbulenceModels/incompressible/LES/DeardorffDiffStress/DeardorffDiffStress.H similarity index 95% rename from src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.H rename to src/turbulenceModels/incompressible/LES/DeardorffDiffStress/DeardorffDiffStress.H index 57576bf5e5..713189bbdd 100644 --- a/src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.H +++ b/src/turbulenceModels/incompressible/LES/DeardorffDiffStress/DeardorffDiffStress.H @@ -93,7 +93,7 @@ public: // Constructors - //- Constructor from components + //- Construct from components DeardorffDiffStress ( const volVectorField& U, @@ -102,10 +102,9 @@ public: ); - // Destructor - - ~DeardorffDiffStress() - {} + //- Destructor + virtual ~DeardorffDiffStress() + {} // Member Functions @@ -120,10 +119,10 @@ public: } //- Correct Eddy-Viscosity and related properties - void correct(const tmp& gradU); + virtual void correct(const tmp& gradU); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/LES/incompressible/GenEddyVisc/GenEddyVisc.C b/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.C similarity index 100% rename from src/turbulenceModels/LES/incompressible/GenEddyVisc/GenEddyVisc.C rename to src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.C diff --git a/src/turbulenceModels/LES/incompressible/GenEddyVisc/GenEddyVisc.H b/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.H similarity index 97% rename from src/turbulenceModels/LES/incompressible/GenEddyVisc/GenEddyVisc.H rename to src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.H index 388606f284..5c16c96147 100644 --- a/src/turbulenceModels/LES/incompressible/GenEddyVisc/GenEddyVisc.H +++ b/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.H @@ -86,10 +86,9 @@ public: ); - // Destructor - - virtual ~GenEddyVisc() - {} + //- Destructor + virtual ~GenEddyVisc() + {} // Member Functions @@ -124,7 +123,7 @@ public: virtual void correct(const tmp& gradU); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/LES/incompressible/GenSGSStress/GenSGSStress.C b/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.C similarity index 100% rename from src/turbulenceModels/LES/incompressible/GenSGSStress/GenSGSStress.C rename to src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.C diff --git a/src/turbulenceModels/LES/incompressible/GenSGSStress/GenSGSStress.H b/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.H similarity index 97% rename from src/turbulenceModels/LES/incompressible/GenSGSStress/GenSGSStress.H rename to src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.H index eb6cc7e906..38073d08b6 100644 --- a/src/turbulenceModels/LES/incompressible/GenSGSStress/GenSGSStress.H +++ b/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.H @@ -81,7 +81,7 @@ public: // Constructors - //- Constructor from components + //- Construct from components GenSGSStress ( const volVectorField& U, @@ -90,10 +90,9 @@ public: ); - // Destructor - - virtual ~GenSGSStress() - {} + //- Destructor + virtual ~GenSGSStress() + {} // Member Functions @@ -132,7 +131,7 @@ public: virtual tmp divDevBeff(volVectorField& U) const; //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/LES/incompressible/LESModel/LESModel.C b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C similarity index 62% rename from src/turbulenceModels/LES/incompressible/LESModel/LESModel.C rename to src/turbulenceModels/incompressible/LES/LESModel/LESModel.C index 4eefbe2d60..e55a55b47e 100644 --- a/src/turbulenceModels/LES/incompressible/LESModel/LESModel.C +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "LESModel.H" -#include "wallDist.H" +#include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -38,6 +38,7 @@ namespace incompressible defineTypeNameAndDebug(LESModel, 0); defineRunTimeSelectionTable(LESModel, dictionary); +addToRunTimeSelectionTable(turbulenceModel, LESModel, turbulenceModel); // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // @@ -57,9 +58,11 @@ LESModel::LESModel const word& type, const volVectorField& U, const surfaceScalarField& phi, - transportModel& transport + transportModel& lamTransportModel ) : + turbulenceModel(U, phi, lamTransportModel), + IOdictionary ( IOobject @@ -72,31 +75,81 @@ LESModel::LESModel ) ), - runTime_(U.time()), - mesh_(U.mesh()), - - U_(U), - phi_(phi), - transport_(transport), - + turbulence_(lookup("turbulence")), printCoeffs_(lookupOrDefault("printCoeffs", false)), - coeffDict_(subDict(type + "Coeffs")), k0_("k0", dimVelocity*dimVelocity, SMALL), - delta_(LESdelta::New("delta", U.mesh(), *this)) { readIfPresent("k0", k0_); } +// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // + +autoPtr LESModel::New +( + const volVectorField& U, + const surfaceScalarField& phi, + transportModel& transport +) +{ + word LESModelTypeName; + + // Enclose the creation of the turbulencePropertiesDict to ensure it is + // deleted before the turbulenceModel is created otherwise the dictionary + // is entered in the database twice + { + IOdictionary turbulencePropertiesDict + ( + IOobject + ( + "LESProperties", + U.time().constant(), + U.db(), + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + + turbulencePropertiesDict.lookup("LESModel") >> LESModelTypeName; + } + + Info<< "Selecting LES turbulence model " << LESModelTypeName << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(LESModelTypeName); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorIn + ( + "LESModel::select(const volVectorField&, const " + "surfaceScalarField&, transportModel&)" + ) << "Unknown LESModel type " << LESModelTypeName + << endl << endl + << "Valid LESModel types are :" << endl + << dictionaryConstructorTablePtr_->toc() + << exit(FatalError); + } + + return autoPtr(cstrIter()(U, phi, transport)); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +LESModel::~LESModel() +{} + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void LESModel::correct(const tmp&) { + turbulenceModel::correct(); delta_().correct(); - transport_.correct(); } diff --git a/src/turbulenceModels/LES/incompressible/LESModel/LESModel.H b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H similarity index 73% rename from src/turbulenceModels/LES/incompressible/LESModel/LESModel.H rename to src/turbulenceModels/incompressible/LES/LESModel/LESModel.H index e1374ed286..776328d3a2 100644 --- a/src/turbulenceModels/LES/incompressible/LESModel/LESModel.H +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H @@ -28,7 +28,6 @@ Namespace Description Namespace for incompressible LES models. - Class Foam::incompressible::LESModel @@ -43,13 +42,13 @@ Description SourceFiles LESModel.C - newIsoLESModel.C \*---------------------------------------------------------------------------*/ #ifndef LESModel_H #define LESModel_H +#include "turbulenceModel.H" #include "LESdelta.H" #include "fvm.H" #include "fvc.H" @@ -73,6 +72,7 @@ namespace incompressible class LESModel : + public turbulenceModel, public IOdictionary { @@ -80,19 +80,7 @@ protected: // Protected data - const Time& runTime_; - const fvMesh& mesh_; - - -private: - - // Private data - - const volVectorField& U_; - const surfaceScalarField& phi_; - - transportModel& transport_; - + Switch turbulence_; Switch printCoeffs_; dictionary coeffDict_; @@ -101,21 +89,23 @@ private: autoPtr delta_; - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - LESModel(const LESModel&); - LESModel& operator=(const LESModel&); - - -protected: - // Protected member functions //- Print model coefficients virtual void printCoeffs(); +private: + + // Private Member Functions + + //- Disallow default bitwise copy construct + LESModel(const LESModel&); + + //- Disallow default bitwise assignment + LESModel& operator=(const LESModel&); + + public: //- Runtime type information @@ -132,9 +122,9 @@ public: ( const volVectorField& U, const surfaceScalarField& phi, - transportModel& transport + transportModel& lamTransportModel ), - (U, phi, transport) + (U, phi, lamTransportModel) ); @@ -146,7 +136,7 @@ public: const word& type, const volVectorField& U, const surfaceScalarField& phi, - transportModel& transport + transportModel& lamTransportModel ); @@ -157,68 +147,52 @@ public: ( const volVectorField& U, const surfaceScalarField& phi, - transportModel& transport + transportModel& lamTransportModel ); - // Destructor - - virtual ~LESModel() - {} + //- Destructor + virtual ~LESModel(); // Member Functions - // Access + //- Access function to velocity field + inline const volVectorField& U() const + { + return U_; + } - //- Access function to velocity field - inline const volVectorField& U() const - { - return U_; - } + //- Access function to flux field + inline const surfaceScalarField& phi() const + { + return phi_; + } - //- Access function to flux field - inline const surfaceScalarField& phi() const - { - return phi_; - } + //- Access the dictionary which provides info. about choice of + // models, and all related data (particularly model coefficients). + inline dictionary& coeffDict() + { + return coeffDict_; + } - //- Access function to incompressible transport model - inline transportModel& transport() const - { - return transport_; - } + //- Access function to filter width + inline const volScalarField& delta() const + { + return delta_(); + } - //- Access the dictionary which provides info. about choice of - // models, and all related data (particularly model coefficients). - inline dictionary& coeffDict() - { - return coeffDict_; - } + //- Return the value of k0 which k is not allowed to be less than + const dimensionedScalar& k0() const + { + return k0_; + } - //- Access function to filter width - inline const volScalarField& delta() const - { - return delta_(); - } - - //- Access function to incompressible viscosity - inline const volScalarField& nu() const - { - return transport_.nu(); - } - - //- Return the value of k0 which k is not allowed to be less than - const dimensionedScalar& k0() const - { - return k0_; - } - - //- Allow k0 to be changed - dimensionedScalar& k0() - { - return k0_; - } + //- Allow k0 to be changed + dimensionedScalar& k0() + { + return k0_; + } //- Return the SGS turbulent kinetic energy. @@ -250,6 +224,34 @@ public: // This is the additional term due to the filtering of the NSE. virtual tmp divDevBeff(volVectorField& U) const = 0; + + // RAS compatibility functions for the turbulenceModel base class + + //- Return the turbulence viscosity + virtual tmp nut() const + { + return nuSgs(); + } + + //- Return the Reynolds stress tensor + virtual tmp R() const + { + return B(); + } + + //- Return the effective stress tensor including the laminar stress + virtual tmp devReff() const + { + return devBeff(); + } + + //- Return the source term for the momentum equation + virtual tmp divDevReff(volVectorField& U) const + { + return divDevBeff(U); + } + + //- Correct Eddy-Viscosity and related properties virtual void correct(const tmp& gradU); diff --git a/src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.C b/src/turbulenceModels/incompressible/LES/LRRDiffStress/LRRDiffStress.C similarity index 98% rename from src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.C rename to src/turbulenceModels/incompressible/LES/LRRDiffStress/LRRDiffStress.C index af3fb1628e..f6aa1f536e 100644 --- a/src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.C +++ b/src/turbulenceModels/incompressible/LES/LRRDiffStress/LRRDiffStress.C @@ -43,7 +43,6 @@ addToRunTimeSelectionTable(LESModel, LRRDiffStress, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// from components LRRDiffStress::LRRDiffStress ( const volVectorField& U, @@ -101,7 +100,7 @@ void LRRDiffStress::correct(const tmp& tgradU) volScalarField K = 0.5*tr(B_); volScalarField Epsilon = 2*nuEff()*magSqr(D); - solve + fvSymmTensorMatrix BEqn ( fvm::ddt(B_) + fvm::div(phi(), B_) @@ -114,6 +113,8 @@ void LRRDiffStress::correct(const tmp& tgradU) - (0.667 - 2*c1_)*I*pow(K, 1.5)/delta() ); + BEqn.relax(); + BEqn.solve(); // Bounding the component kinetic energies diff --git a/src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.H b/src/turbulenceModels/incompressible/LES/LRRDiffStress/LRRDiffStress.H similarity index 95% rename from src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.H rename to src/turbulenceModels/incompressible/LES/LRRDiffStress/LRRDiffStress.H index f58b6e224b..a61ea1a49a 100644 --- a/src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.H +++ b/src/turbulenceModels/incompressible/LES/LRRDiffStress/LRRDiffStress.H @@ -92,7 +92,7 @@ public: // Constructors - //- Constructors from components + //- Construct from components LRRDiffStress ( const volVectorField& U, @@ -101,10 +101,9 @@ public: ); - // Destructor - - ~LRRDiffStress() - {} + //- Destructor + virtual ~LRRDiffStress() + {} // Member Functions @@ -119,10 +118,10 @@ public: } //- Correct Eddy-Viscosity and related properties - void correct(const tmp& gradU); + virtual void correct(const tmp& gradU); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/LES/incompressible/Make/files b/src/turbulenceModels/incompressible/LES/Make/files similarity index 97% rename from src/turbulenceModels/LES/incompressible/Make/files rename to src/turbulenceModels/incompressible/LES/Make/files index feda56ca15..bd97e2c1ec 100644 --- a/src/turbulenceModels/LES/incompressible/Make/files +++ b/src/turbulenceModels/incompressible/LES/Make/files @@ -1,7 +1,6 @@ vanDriestDelta/vanDriestDelta.C LESModel/LESModel.C -LESModel/newLESModel.C GenEddyVisc/GenEddyVisc.C GenSGSStress/GenSGSStress.C diff --git a/src/turbulenceModels/incompressible/LES/Make/options b/src/turbulenceModels/incompressible/LES/Make/options new file mode 100644 index 0000000000..8772261e70 --- /dev/null +++ b/src/turbulenceModels/incompressible/LES/Make/options @@ -0,0 +1,14 @@ +EXE_INC = \ + -I../turbulenceModel/lnInclude \ + -I../../LES/LESdeltas/lnInclude \ + -I../../LES/LESfilters/lnInclude \ + -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude + +LIB_LIBS = \ + -lincompressibleTurbulenceModel \ + -lLESdeltas \ + -lLESfilters\ + -lfiniteVolume \ + -lmeshTools diff --git a/src/turbulenceModels/LES/incompressible/Smagorinsky/Smagorinsky.C b/src/turbulenceModels/incompressible/LES/Smagorinsky/Smagorinsky.C similarity index 100% rename from src/turbulenceModels/LES/incompressible/Smagorinsky/Smagorinsky.C rename to src/turbulenceModels/incompressible/LES/Smagorinsky/Smagorinsky.C diff --git a/src/turbulenceModels/LES/incompressible/Smagorinsky/Smagorinsky.H b/src/turbulenceModels/incompressible/LES/Smagorinsky/Smagorinsky.H similarity index 97% rename from src/turbulenceModels/LES/incompressible/Smagorinsky/Smagorinsky.H rename to src/turbulenceModels/incompressible/LES/Smagorinsky/Smagorinsky.H index f86578934e..3dcb5b28a4 100644 --- a/src/turbulenceModels/LES/incompressible/Smagorinsky/Smagorinsky.H +++ b/src/turbulenceModels/incompressible/LES/Smagorinsky/Smagorinsky.H @@ -98,10 +98,9 @@ public: ); - // Destructor - - ~Smagorinsky() - {} + //- Destructor + virtual ~Smagorinsky() + {} // Member Functions @@ -114,7 +113,7 @@ public: } //- Return SGS kinetic energy - tmp k() const + virtual tmp k() const { return k(fvc::grad(U())); } diff --git a/src/turbulenceModels/LES/incompressible/Smagorinsky2/Smagorinsky2.C b/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.C similarity index 100% rename from src/turbulenceModels/LES/incompressible/Smagorinsky2/Smagorinsky2.C rename to src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.C diff --git a/src/turbulenceModels/LES/incompressible/Smagorinsky2/Smagorinsky2.H b/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.H similarity index 94% rename from src/turbulenceModels/LES/incompressible/Smagorinsky2/Smagorinsky2.H rename to src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.H index 7c780da1e1..330bfd8b28 100644 --- a/src/turbulenceModels/LES/incompressible/Smagorinsky2/Smagorinsky2.H +++ b/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.H @@ -98,23 +98,22 @@ public: ); - // Destructor - - ~Smagorinsky2() - {} + //- Destructor + virtual ~Smagorinsky2() + {} // Member Functions //- Return B. - tmp B() const; + virtual tmp B() const; //- Returns div(B). // This is the additional term due to the filtering of the NSE. - tmp divDevBeff(volVectorField& U) const; + virtual tmp divDevBeff(volVectorField& U) const; //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C similarity index 99% rename from src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.C rename to src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C index 9d5ad49bdd..11843958d5 100644 --- a/src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C @@ -283,7 +283,7 @@ void SpalartAllmaras::correct(const tmp& gradU) dTildaUpdate(S); - solve + fvScalarMatrix nuTildaEqn ( fvm::ddt(nuTilda_) + fvm::div(phi(), nuTilda_) @@ -299,6 +299,9 @@ void SpalartAllmaras::correct(const tmp& gradU) - fvm::Sp(Cw1_*fw(STilda)*nuTilda_/sqr(dTilda_), nuTilda_) ); + nuTildaEqn.relax(); + nuTildaEqn.solve(); + bound(nuTilda_, dimensionedScalar("zero", nuTilda_.dimensions(), 0.0)); nuTilda_.correctBoundaryConditions(); diff --git a/src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H similarity index 92% rename from src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.H rename to src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H index 1bcecd018f..aa721b1b5c 100644 --- a/src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H @@ -120,7 +120,7 @@ public: // Constructors - //- Constructor from components + //- Construct from components SpalartAllmaras ( const volVectorField& U, @@ -130,22 +130,21 @@ public: ); - // Destructor - - virtual ~SpalartAllmaras() - {} + //- Destructor + virtual ~SpalartAllmaras() + {} // Member Functions //- Return SGS kinetic energy - tmp k() const + virtual tmp k() const { return sqr(nuSgs()/ck_/dTilda_); } //- Return sub-grid disipation rate - tmp epsilon() const; + virtual tmp epsilon() const; tmp nuTilda() const { @@ -153,21 +152,21 @@ public: } //- Return SGS viscosity - tmp nuSgs() const + virtual tmp nuSgs() const { return nuSgs_; } //- Return the sub-grid stress tensor. - tmp B() const; + virtual tmp B() const; //- Return the effective sub-grid turbulence stress tensor // including the laminar stress - tmp devBeff() const; + virtual tmp devBeff() const; //- Return the deviatoric part of the divergence of Beff // i.e. the additional term in the filtered NSE. - tmp divDevBeff(volVectorField& U) const; + virtual tmp divDevBeff(volVectorField& U) const; //- Correct nuTilda and related properties virtual void correct(const tmp& gradU); diff --git a/src/turbulenceModels/LES/incompressible/SpalartAllmarasDDES/SpalartAllmarasDDES.C b/src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.C similarity index 100% rename from src/turbulenceModels/LES/incompressible/SpalartAllmarasDDES/SpalartAllmarasDDES.C rename to src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.C diff --git a/src/turbulenceModels/LES/incompressible/SpalartAllmarasDDES/SpalartAllmarasDDES.H b/src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.H similarity index 98% rename from src/turbulenceModels/LES/incompressible/SpalartAllmarasDDES/SpalartAllmarasDDES.H rename to src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.H index d905c34710..ec7eeda68c 100644 --- a/src/turbulenceModels/LES/incompressible/SpalartAllmarasDDES/SpalartAllmarasDDES.H +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.H @@ -90,7 +90,7 @@ public: // Constructors - //- Constructor from components + //- Construct from components SpalartAllmarasDDES ( const volVectorField& U, diff --git a/src/turbulenceModels/LES/incompressible/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C similarity index 100% rename from src/turbulenceModels/LES/incompressible/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C rename to src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C diff --git a/src/turbulenceModels/LES/incompressible/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.H b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.H similarity index 100% rename from src/turbulenceModels/LES/incompressible/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.H rename to src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.H diff --git a/src/turbulenceModels/LES/incompressible/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C similarity index 100% rename from src/turbulenceModels/LES/incompressible/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C rename to src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C diff --git a/src/turbulenceModels/LES/incompressible/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H similarity index 98% rename from src/turbulenceModels/LES/incompressible/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H rename to src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H index d07b53672c..815d2c28a6 100644 --- a/src/turbulenceModels/LES/incompressible/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H @@ -98,7 +98,7 @@ public: // Constructors - //- Constructor from components + //- Construct from components SpalartAllmarasIDDES ( const volVectorField& U, diff --git a/src/turbulenceModels/LES/incompressible/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsSpalartAllmarasWallFunction/nuSgsSpalartAllmarasWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsSpalartAllmarasWallFunction/nuSgsSpalartAllmarasWallFunctionFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/LES/incompressible/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsSpalartAllmarasWallFunction/nuSgsSpalartAllmarasWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsSpalartAllmarasWallFunction/nuSgsSpalartAllmarasWallFunctionFvPatchScalarField.C diff --git a/src/turbulenceModels/LES/incompressible/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsSpalartAllmarasWallFunction/nuSgsSpalartAllmarasWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsSpalartAllmarasWallFunction/nuSgsSpalartAllmarasWallFunctionFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/LES/incompressible/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsSpalartAllmarasWallFunction/nuSgsSpalartAllmarasWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsSpalartAllmarasWallFunction/nuSgsSpalartAllmarasWallFunctionFvPatchScalarField.H diff --git a/src/turbulenceModels/LES/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.C b/src/turbulenceModels/incompressible/LES/dynMixedSmagorinsky/dynMixedSmagorinsky.C similarity index 100% rename from src/turbulenceModels/LES/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.C rename to src/turbulenceModels/incompressible/LES/dynMixedSmagorinsky/dynMixedSmagorinsky.C diff --git a/src/turbulenceModels/LES/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.H b/src/turbulenceModels/incompressible/LES/dynMixedSmagorinsky/dynMixedSmagorinsky.H similarity index 100% rename from src/turbulenceModels/LES/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.H rename to src/turbulenceModels/incompressible/LES/dynMixedSmagorinsky/dynMixedSmagorinsky.H diff --git a/src/turbulenceModels/LES/incompressible/dynOneEqEddy/dynOneEqEddy.C b/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C similarity index 98% rename from src/turbulenceModels/LES/incompressible/dynOneEqEddy/dynOneEqEddy.C rename to src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C index 88a308aaf1..14314e2807 100644 --- a/src/turbulenceModels/LES/incompressible/dynOneEqEddy/dynOneEqEddy.C +++ b/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C @@ -140,7 +140,7 @@ void dynOneEqEddy::correct(const tmp& gradU) volScalarField P = 2.0*nuSgs_*magSqr(D); - solve + fvScalarMatrix kEqn ( fvm::ddt(k_) + fvm::div(phi(), k_) @@ -150,6 +150,9 @@ void dynOneEqEddy::correct(const tmp& gradU) - fvm::Sp(ce(D)*sqrt(k_)/delta(), k_) ); + kEqn.relax(); + kEqn.solve(); + bound(k_, k0()); nuSgs_ = ck(D)*sqrt(k_)*delta(); diff --git a/src/turbulenceModels/LES/incompressible/dynOneEqEddy/dynOneEqEddy.H b/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.H similarity index 94% rename from src/turbulenceModels/LES/incompressible/dynOneEqEddy/dynOneEqEddy.H rename to src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.H index 3ba67f6b24..48aad65c60 100644 --- a/src/turbulenceModels/LES/incompressible/dynOneEqEddy/dynOneEqEddy.H +++ b/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.H @@ -103,7 +103,7 @@ public: // Constructors - //- Constructor from components + //- Construct from components dynOneEqEddy ( const volVectorField& U, @@ -112,15 +112,14 @@ public: ); - // Destructor - - ~dynOneEqEddy(); + //- Destructor + virtual ~dynOneEqEddy(); // Member Functions //- Return SGS kinetic energy - tmp k() const + virtual tmp k() const { return k_; } @@ -135,10 +134,10 @@ public: } //- Correct Eddy-Viscosity and related properties - void correct(const tmp& gradU); + virtual void correct(const tmp& gradU); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/LES/incompressible/dynSmagorinsky/dynSmagorinsky.C b/src/turbulenceModels/incompressible/LES/dynSmagorinsky/dynSmagorinsky.C similarity index 100% rename from src/turbulenceModels/LES/incompressible/dynSmagorinsky/dynSmagorinsky.C rename to src/turbulenceModels/incompressible/LES/dynSmagorinsky/dynSmagorinsky.C diff --git a/src/turbulenceModels/LES/incompressible/dynSmagorinsky/dynSmagorinsky.H b/src/turbulenceModels/incompressible/LES/dynSmagorinsky/dynSmagorinsky.H similarity index 94% rename from src/turbulenceModels/LES/incompressible/dynSmagorinsky/dynSmagorinsky.H rename to src/turbulenceModels/incompressible/LES/dynSmagorinsky/dynSmagorinsky.H index d155d45a58..bf8159609b 100644 --- a/src/turbulenceModels/LES/incompressible/dynSmagorinsky/dynSmagorinsky.H +++ b/src/turbulenceModels/incompressible/LES/dynSmagorinsky/dynSmagorinsky.H @@ -112,7 +112,7 @@ public: // Constructors - //- Constructor from components + //- Construct from components dynSmagorinsky ( const volVectorField& U, @@ -121,24 +121,23 @@ public: ); - // Destructor - - ~dynSmagorinsky(); + //- Destructor + virtual ~dynSmagorinsky(); // Member Functions //- Return SGS kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Correct Eddy-Viscosity and related properties - void correct(const tmp& gradU); + virtual void correct(const tmp& gradU); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/LES/incompressible/kOmegaSSTSAS/kOmegaSSTSAS.C b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C similarity index 89% rename from src/turbulenceModels/LES/incompressible/kOmegaSSTSAS/kOmegaSSTSAS.C rename to src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C index a06f4298c6..3460137709 100644 --- a/src/turbulenceModels/LES/incompressible/kOmegaSSTSAS/kOmegaSSTSAS.C +++ b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C @@ -330,18 +330,21 @@ void kOmegaSSTSAS::correct(const tmp& gradU) volScalarField G = nuSgs_*2.0*S2; // Turbulent kinetic energy equation - solve - ( - fvm::ddt(k_) - + fvm::div(phi(), k_) - - fvm::Sp(fvc::div(phi()), k_) - - fvm::laplacian(DkEff(F1), k_) - == - min(G, c1_*betaStar_*k_*omega_) - - fvm::Sp(betaStar_*omega_, k_) - ); - + { + fvScalarMatrix kEqn + ( + fvm::ddt(k_) + + fvm::div(phi(), k_) + - fvm::Sp(fvc::div(phi()), k_) + - fvm::laplacian(DkEff(F1), k_) + == + min(G, c1_*betaStar_*k_*omega_) + - fvm::Sp(betaStar_*omega_, k_) + ); + kEqn.relax(); + kEqn.solve(); + } bound(k_, k0()); volScalarField grad_omega_k = max @@ -353,28 +356,32 @@ void kOmegaSSTSAS::correct(const tmp& gradU) ); // Turbulent frequency equation - solve - ( - fvm::ddt(omega_) - + fvm::div(phi(), omega_) - - fvm::Sp(fvc::div(phi()), omega_) - - fvm::laplacian(DomegaEff(F1), omega_) - == - gamma(F1)*2.0*S2 - - fvm::Sp(beta(F1)*omega_, omega_) - - fvm::SuSp // cross diffusion term + { + fvScalarMatrix omegaEqn ( - (F1 - scalar(1))*CDkOmega/omega_, - omega_ - ) - + FSAS_ - *max - ( - dimensionedScalar("zero",dimensionSet(0, 0 , -2, 0, 0),0. ), - zetaTilda2_*kappa_*S2*(L/Lvk2(S2))- 2.0/alphaPhi_*k_*grad_omega_k - ) + fvm::ddt(omega_) + + fvm::div(phi(), omega_) + - fvm::Sp(fvc::div(phi()), omega_) + - fvm::laplacian(DomegaEff(F1), omega_) + == + gamma(F1)*2.0*S2 + - fvm::Sp(beta(F1)*omega_, omega_) + - fvm::SuSp // cross diffusion term + ( + (F1 - scalar(1))*CDkOmega/omega_, + omega_ + ) + + FSAS_ + *max + ( + dimensionedScalar("zero",dimensionSet(0, 0 , -2, 0, 0),0. ), + zetaTilda2_*kappa_*S2*(L/Lvk2(S2))- 2.0/alphaPhi_*k_*grad_omega_k + ) + ); - ); + omegaEqn.relax(); + omegaEqn.solve(); + } bound(omega_, omega0_); // Re-calculate viscosity diff --git a/src/turbulenceModels/LES/incompressible/kOmegaSSTSAS/kOmegaSSTSAS.H b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H similarity index 93% rename from src/turbulenceModels/LES/incompressible/kOmegaSSTSAS/kOmegaSSTSAS.H rename to src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H index 8048be0adf..56e395ff4c 100644 --- a/src/turbulenceModels/LES/incompressible/kOmegaSSTSAS/kOmegaSSTSAS.H +++ b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H @@ -170,7 +170,7 @@ public: // Constructors - //- Constructor from components + //- Construct from components kOmegaSSTSAS ( const volVectorField& U, @@ -188,13 +188,13 @@ public: // Member Functions //- Return SGS kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Return omega - tmp omega() const + virtual tmp omega() const { return omega_; } @@ -218,24 +218,24 @@ public: } //- Return sub-grid disipation rate - tmp epsilon() const; + virtual tmp epsilon() const; //- Return SGS viscosity - tmp nuSgs() const + virtual tmp nuSgs() const { return nuSgs_; } //- Return the sub-grid stress tensor. - tmp B() const; + virtual tmp B() const; //- Return the effective sub-grid turbulence stress tensor // including the laminar stress - tmp devBeff() const; + virtual tmp devBeff() const; //- Return the deviatoric part of the divergence of Beff // i.e. the additional term in the filtered NSE. - tmp divDevBeff(volVectorField& U) const; + virtual tmp divDevBeff(volVectorField& U) const; //- Solve the turbulence equations (k-w) and correct the turbulence viscosity virtual void correct(const tmp& gradU); diff --git a/src/turbulenceModels/LES/incompressible/laminar/laminar.C b/src/turbulenceModels/incompressible/LES/laminar/laminar.C similarity index 100% rename from src/turbulenceModels/LES/incompressible/laminar/laminar.C rename to src/turbulenceModels/incompressible/LES/laminar/laminar.C diff --git a/src/turbulenceModels/LES/incompressible/laminar/laminar.H b/src/turbulenceModels/incompressible/LES/laminar/laminar.H similarity index 90% rename from src/turbulenceModels/LES/incompressible/laminar/laminar.H rename to src/turbulenceModels/incompressible/LES/laminar/laminar.H index 648e0b8229..bd8c3b2a3b 100644 --- a/src/turbulenceModels/LES/incompressible/laminar/laminar.H +++ b/src/turbulenceModels/incompressible/LES/laminar/laminar.H @@ -72,7 +72,7 @@ public: // Constructors - //- Constructor from components + //- Construct from components laminar ( const volVectorField& U, @@ -81,25 +81,24 @@ public: ); - // Destructor - - ~laminar() - {} + //- Destructor + virtual ~laminar() + {} // Member Functions //- Return SGS kinetic energy - tmp k() const; + virtual tmp k() const; //- Return sub-grid disipation rate - tmp epsilon() const; + virtual tmp epsilon() const; //- Return SGS viscosity - tmp nuSgs() const; + virtual tmp nuSgs() const; //- Return the effective viscosity - tmp nuEff() const; + virtual tmp nuEff() const; //- Return the sub-grid stress tensor B. virtual tmp B() const; @@ -110,7 +109,7 @@ public: //- Return the deviatoric part of the divergence of Beff // i.e. the additional term in the filtered NSE. - tmp divDevBeff(volVectorField& U) const; + virtual tmp divDevBeff(volVectorField& U) const; //- Read turbulenceProperties dictionary bool read(); diff --git a/src/turbulenceModels/LES/incompressible/locDynOneEqEddy/locDynOneEqEddy.C b/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.C similarity index 98% rename from src/turbulenceModels/LES/incompressible/locDynOneEqEddy/locDynOneEqEddy.C rename to src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.C index 35f99986ad..471695ccec 100644 --- a/src/turbulenceModels/LES/incompressible/locDynOneEqEddy/locDynOneEqEddy.C +++ b/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.C @@ -131,7 +131,7 @@ void locDynOneEqEddy::correct(const tmp& gradU) volScalarField P = 2.0*nuSgs_*magSqr(D); - solve + fvScalarMatrix kEqn ( fvm::ddt(k_) + fvm::div(phi(), k_) @@ -141,6 +141,9 @@ void locDynOneEqEddy::correct(const tmp& gradU) - fvm::Sp(ce(D, KK)*sqrt(k_)/delta(), k_) ); + kEqn.relax(); + kEqn.solve(); + bound(k_, k0()); nuSgs_ = ck(D, KK)*sqrt(k_)*delta(); diff --git a/src/turbulenceModels/LES/incompressible/locDynOneEqEddy/locDynOneEqEddy.H b/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.H similarity index 95% rename from src/turbulenceModels/LES/incompressible/locDynOneEqEddy/locDynOneEqEddy.H rename to src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.H index 960b6f185e..f751fc8f6d 100644 --- a/src/turbulenceModels/LES/incompressible/locDynOneEqEddy/locDynOneEqEddy.H +++ b/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.H @@ -121,7 +121,7 @@ public: // Constructors - //- from components + //- Construct from components locDynOneEqEddy ( const volVectorField& U, @@ -130,15 +130,14 @@ public: ); - // Destructor - - ~locDynOneEqEddy(); + //- Destructor + virtual ~locDynOneEqEddy(); // Member Functions //- Return SGS kinetic energy - tmp k() const + virtual tmp k() const { return k_; } @@ -153,10 +152,10 @@ public: } //- Correct Eddy-Viscosity and related properties - void correct(const tmp& gradU); + virtual void correct(const tmp& gradU); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/LES/incompressible/mixedSmagorinsky/mixedSmagorinsky.C b/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.C similarity index 100% rename from src/turbulenceModels/LES/incompressible/mixedSmagorinsky/mixedSmagorinsky.C rename to src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.C diff --git a/src/turbulenceModels/LES/incompressible/mixedSmagorinsky/mixedSmagorinsky.H b/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.H similarity index 88% rename from src/turbulenceModels/LES/incompressible/mixedSmagorinsky/mixedSmagorinsky.H rename to src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.H index 7fa3f0c9ec..b340b5ca30 100644 --- a/src/turbulenceModels/LES/incompressible/mixedSmagorinsky/mixedSmagorinsky.H +++ b/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.H @@ -95,7 +95,7 @@ public: // Constructors - //- Constructor from components + //- Construct from components mixedSmagorinsky ( const volVectorField& U, @@ -104,42 +104,41 @@ public: ); - // Destructor - - ~mixedSmagorinsky() - {} + //- Destructor + virtual ~mixedSmagorinsky() + {} // Member Functions //- Return the SGS turbulent kinetic energy. - tmp k() const; + virtual tmp k() const; //- Return the SGS turbulent disipation rate. - tmp epsilon() const; + virtual tmp epsilon() const; //- Return the SGS viscosity. - tmp nuSgs() const + virtual tmp nuSgs() const { return nuSgs_; } //- Return the sub-grid stress tensor. - tmp B() const; + virtual tmp B() const; //- Return the effective sub-grid turbulence stress tensor // including the laminar stress - tmp devBeff() const; + virtual tmp devBeff() const; //- Implementation of div(B). This is necessary to override // (and include) the div(B) terms from both the parent classes. - tmp divDevBeff(volVectorField& U) const; + virtual tmp divDevBeff(volVectorField& U) const; //- Correct Eddy-Viscosity and related properties - void correct(const tmp& gradU); + virtual void correct(const tmp& gradU); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/LES/incompressible/oneEqEddy/oneEqEddy.C b/src/turbulenceModels/incompressible/LES/oneEqEddy/oneEqEddy.C similarity index 98% rename from src/turbulenceModels/LES/incompressible/oneEqEddy/oneEqEddy.C rename to src/turbulenceModels/incompressible/LES/oneEqEddy/oneEqEddy.C index 6089a313d4..be020ae572 100644 --- a/src/turbulenceModels/LES/incompressible/oneEqEddy/oneEqEddy.C +++ b/src/turbulenceModels/incompressible/LES/oneEqEddy/oneEqEddy.C @@ -88,7 +88,7 @@ void oneEqEddy::correct(const tmp& gradU) volScalarField G = 2.0*nuSgs_*magSqr(symm(gradU)); - solve + fvScalarMatrix kEqn ( fvm::ddt(k_) + fvm::div(phi(), k_) @@ -98,6 +98,9 @@ void oneEqEddy::correct(const tmp& gradU) - fvm::Sp(ce_*sqrt(k_)/delta(), k_) ); + kEqn.relax(); + kEqn.solve(); + bound(k_, k0()); nuSgs_ = ck_*sqrt(k_)*delta(); diff --git a/src/turbulenceModels/LES/incompressible/oneEqEddy/oneEqEddy.H b/src/turbulenceModels/incompressible/LES/oneEqEddy/oneEqEddy.H similarity index 94% rename from src/turbulenceModels/LES/incompressible/oneEqEddy/oneEqEddy.H rename to src/turbulenceModels/incompressible/LES/oneEqEddy/oneEqEddy.H index 632530b205..dcb9a9bc2c 100644 --- a/src/turbulenceModels/LES/incompressible/oneEqEddy/oneEqEddy.H +++ b/src/turbulenceModels/incompressible/LES/oneEqEddy/oneEqEddy.H @@ -95,7 +95,7 @@ public: // Constructors - //- Constructor from components + //- Construct from components oneEqEddy ( const volVectorField& U, @@ -104,16 +104,15 @@ public: ); - // Destructor - - ~oneEqEddy() - {} + //- Destructor + virtual ~oneEqEddy() + {} // Member Functions //- Return SGS kinetic energy - tmp k() const + virtual tmp k() const { return k_; } @@ -128,10 +127,10 @@ public: } //- Correct Eddy-Viscosity and related properties - void correct(const tmp& gradU); + virtual void correct(const tmp& gradU); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/LES/incompressible/scaleSimilarity/scaleSimilarity.C b/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.C similarity index 100% rename from src/turbulenceModels/LES/incompressible/scaleSimilarity/scaleSimilarity.C rename to src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.C diff --git a/src/turbulenceModels/LES/incompressible/scaleSimilarity/scaleSimilarity.H b/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H similarity index 89% rename from src/turbulenceModels/LES/incompressible/scaleSimilarity/scaleSimilarity.H rename to src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H index 079d38a4a2..faa2010e59 100644 --- a/src/turbulenceModels/LES/incompressible/scaleSimilarity/scaleSimilarity.H +++ b/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H @@ -89,35 +89,34 @@ public: ); - // Destructor - - ~scaleSimilarity(); + //- Destructor + virtual ~scaleSimilarity(); // Member Functions //- Return the SGS turbulent kinetic energy. - tmp k() const; + virtual tmp k() const; //- Return the SGS turbulent dissipation. - tmp epsilon() const; + virtual tmp epsilon() const; //- Return the sub-grid stress tensor. - tmp B() const; + virtual tmp B() const; //- Return the deviatoric part of the effective sub-grid // turbulence stress tensor including the laminar stress - tmp devBeff() const; + virtual tmp devBeff() const; //- Return the deviatoric part of the divergence of Beff // i.e. the additional term in the filtered NSE. - tmp divDevBeff(volVectorField& U) const; + virtual tmp divDevBeff(volVectorField& U) const; //- Correct Eddy-Viscosity and related properties - void correct(const tmp&); + virtual void correct(const tmp&); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/LES/incompressible/spectEddyVisc/spectEddyVisc.C b/src/turbulenceModels/incompressible/LES/spectEddyVisc/spectEddyVisc.C similarity index 100% rename from src/turbulenceModels/LES/incompressible/spectEddyVisc/spectEddyVisc.C rename to src/turbulenceModels/incompressible/LES/spectEddyVisc/spectEddyVisc.C diff --git a/src/turbulenceModels/LES/incompressible/spectEddyVisc/spectEddyVisc.H b/src/turbulenceModels/incompressible/LES/spectEddyVisc/spectEddyVisc.H similarity index 94% rename from src/turbulenceModels/LES/incompressible/spectEddyVisc/spectEddyVisc.H rename to src/turbulenceModels/incompressible/LES/spectEddyVisc/spectEddyVisc.H index dd6b4e68b0..d7a99b75f8 100644 --- a/src/turbulenceModels/LES/incompressible/spectEddyVisc/spectEddyVisc.H +++ b/src/turbulenceModels/incompressible/LES/spectEddyVisc/spectEddyVisc.H @@ -97,7 +97,7 @@ public: // Constructors - // from components + // Construct from components spectEddyVisc ( const volVectorField& U, @@ -106,22 +106,21 @@ public: ); - // Destructor - - ~spectEddyVisc() - {} + //- Destructor + virtual ~spectEddyVisc() + {} // Member Functions //- Return SGS kinetic energy - tmp k() const; + virtual tmp k() const; //- Correct Eddy-Viscosity and related properties - void correct(const tmp&); + virtual void correct(const tmp&); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/LES/incompressible/vanDriestDelta/vanDriestDelta.C b/src/turbulenceModels/incompressible/LES/vanDriestDelta/vanDriestDelta.C similarity index 100% rename from src/turbulenceModels/LES/incompressible/vanDriestDelta/vanDriestDelta.C rename to src/turbulenceModels/incompressible/LES/vanDriestDelta/vanDriestDelta.C diff --git a/src/turbulenceModels/LES/incompressible/vanDriestDelta/vanDriestDelta.H b/src/turbulenceModels/incompressible/LES/vanDriestDelta/vanDriestDelta.H similarity index 93% rename from src/turbulenceModels/LES/incompressible/vanDriestDelta/vanDriestDelta.H rename to src/turbulenceModels/incompressible/LES/vanDriestDelta/vanDriestDelta.H index 6903765f6b..66fe691c10 100644 --- a/src/turbulenceModels/LES/incompressible/vanDriestDelta/vanDriestDelta.H +++ b/src/turbulenceModels/incompressible/LES/vanDriestDelta/vanDriestDelta.H @@ -81,23 +81,22 @@ public: // Constructors - //- from name, mesh and IOdictionary + //- Construct from name, mesh and IOdictionary vanDriestDelta(const word& name, const fvMesh& mesh, const dictionary&); - // Destructor - - ~vanDriestDelta() - {} + //- Destructor + virtual ~vanDriestDelta() + {} // Member Functions //- Read the LESdelta dictionary - void read(const dictionary&); + virtual void read(const dictionary&); // Correct values - void correct(); + virtual void correct(); }; diff --git a/src/turbulenceModels/RAS/incompressible/LRR/LRR.C b/src/turbulenceModels/incompressible/RAS/LRR/LRR.C similarity index 99% rename from src/turbulenceModels/RAS/incompressible/LRR/LRR.C rename to src/turbulenceModels/incompressible/RAS/LRR/LRR.C index 7bf38a9982..937b4b36d2 100644 --- a/src/turbulenceModels/RAS/incompressible/LRR/LRR.C +++ b/src/turbulenceModels/incompressible/RAS/LRR/LRR.C @@ -46,7 +46,6 @@ addToRunTimeSelectionTable(RASModel, LRR, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// from components LRR::LRR ( const volVectorField& U, @@ -290,15 +289,13 @@ bool LRR::read() void LRR::correct() { - transportModel_.correct(); + RASModel::correct(); if (!turbulence_) { return; } - RASModel::correct(); - volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_)); volScalarField G("G", 0.5*tr(P)); diff --git a/src/turbulenceModels/RAS/incompressible/LRR/LRR.H b/src/turbulenceModels/incompressible/RAS/LRR/LRR.H similarity index 91% rename from src/turbulenceModels/RAS/incompressible/LRR/LRR.H rename to src/turbulenceModels/incompressible/RAS/LRR/LRR.H index 45b3df83e8..8d515d4d56 100644 --- a/src/turbulenceModels/RAS/incompressible/LRR/LRR.H +++ b/src/turbulenceModels/incompressible/RAS/LRR/LRR.H @@ -111,16 +111,15 @@ public: ); - // Destructor - - ~LRR() - {} + //- Destructor + virtual ~LRR() + {} // Member Functions //- Return the turbulence viscosity - tmp nut() const + virtual tmp nut() const { return nut_; } @@ -144,34 +143,34 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const + virtual tmp epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp R() const + virtual tmp R() const { return R_; } //- Return the effective stress tensor including the laminar stress - tmp devReff() const; + virtual tmp devReff() const; //- Return the source term for the momentum equation - tmp divDevReff(volVectorField& U) const; + virtual tmp divDevReff(volVectorField& U) const; //- Solve the turbulence equations and correct the turbulence viscosity - void correct(); + virtual void correct(); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/RAS/incompressible/LamBremhorstKE/LamBremhorstKE.C b/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.C similarity index 99% rename from src/turbulenceModels/RAS/incompressible/LamBremhorstKE/LamBremhorstKE.C rename to src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.C index 52145f9b4b..183466e2ac 100644 --- a/src/turbulenceModels/RAS/incompressible/LamBremhorstKE/LamBremhorstKE.C +++ b/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.C @@ -43,7 +43,6 @@ addToRunTimeSelectionTable(RASModel, LamBremhorstKE, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// from components LamBremhorstKE::LamBremhorstKE ( const volVectorField& U, @@ -205,15 +204,13 @@ bool LamBremhorstKE::read() void LamBremhorstKE::correct() { - transportModel_.correct(); + RASModel::correct(); if (!turbulence_) { return; } - RASModel::correct(); - if (mesh_.changing()) { y_.correct(); diff --git a/src/turbulenceModels/RAS/incompressible/LamBremhorstKE/LamBremhorstKE.H b/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.H similarity index 90% rename from src/turbulenceModels/RAS/incompressible/LamBremhorstKE/LamBremhorstKE.H rename to src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.H index f0e8a0ba59..422ddffdf6 100644 --- a/src/turbulenceModels/RAS/incompressible/LamBremhorstKE/LamBremhorstKE.H +++ b/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.H @@ -91,16 +91,15 @@ public: ); - // Destructor - - ~LamBremhorstKE() - {} + //- Destructor + virtual ~LamBremhorstKE() + {} // Member Functions //- Return the turbulence viscosity - tmp nut() const + virtual tmp nut() const { return nut_; } @@ -124,31 +123,31 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const + virtual tmp epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp R() const; + virtual tmp R() const; //- Return the effective stress tensor including the laminar stress - tmp devReff() const; + virtual tmp devReff() const; //- Return the source term for the momentum equation - tmp divDevReff(volVectorField& U) const; + virtual tmp divDevReff(volVectorField& U) const; //- Solve the turbulence equations and correct the turbulence viscosity - void correct(); + virtual void correct(); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C similarity index 99% rename from src/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C rename to src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C index d67c91a227..dc6a2c84a6 100644 --- a/src/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C @@ -46,7 +46,6 @@ addToRunTimeSelectionTable(RASModel, LaunderGibsonRSTM, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// from components LaunderGibsonRSTM::LaunderGibsonRSTM ( const volVectorField& U, @@ -317,15 +316,13 @@ bool LaunderGibsonRSTM::read() void LaunderGibsonRSTM::correct() { - transportModel_.correct(); + RASModel::correct(); if (!turbulence_) { return; } - RASModel::correct(); - if (mesh_.changing()) { yr_.correct(); diff --git a/src/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H similarity index 91% rename from src/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H rename to src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H index 73169b389f..e3f5d7a0af 100644 --- a/src/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H +++ b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H @@ -119,16 +119,15 @@ public: ); - // Destructor - - ~LaunderGibsonRSTM() - {} + //- Destructor + virtual ~LaunderGibsonRSTM() + {} // Member Functions //- Return the turbulence viscosity - tmp nut() const + virtual tmp nut() const { return nut_; } @@ -152,34 +151,34 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const + virtual tmp epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp R() const + virtual tmp R() const { return R_; } //- Return the effective stress tensor including the laminar stress - tmp devReff() const; + virtual tmp devReff() const; //- Return the source term for the momentum equation - tmp divDevReff(volVectorField& U) const; + virtual tmp divDevReff(volVectorField& U) const; //- Solve the turbulence equations and correct the turbulence viscosity - void correct(); + virtual void correct(); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/RAS/incompressible/LaunderSharmaKE/LaunderSharmaKE.C b/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C similarity index 99% rename from src/turbulenceModels/RAS/incompressible/LaunderSharmaKE/LaunderSharmaKE.C rename to src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C index 2e48e87630..ff5483491d 100644 --- a/src/turbulenceModels/RAS/incompressible/LaunderSharmaKE/LaunderSharmaKE.C +++ b/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C @@ -210,15 +210,13 @@ bool LaunderSharmaKE::read() void LaunderSharmaKE::correct() { - transportModel_.correct(); + RASModel::correct(); if (!turbulence_) { return; } - RASModel::correct(); - volScalarField S2 = 2*magSqr(symm(fvc::grad(U_))); volScalarField G = nut_*S2; diff --git a/src/turbulenceModels/RAS/incompressible/LaunderSharmaKE/LaunderSharmaKE.H b/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H similarity index 91% rename from src/turbulenceModels/RAS/incompressible/LaunderSharmaKE/LaunderSharmaKE.H rename to src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H index a16a1d8f3a..22f5adf28f 100644 --- a/src/turbulenceModels/RAS/incompressible/LaunderSharmaKE/LaunderSharmaKE.H +++ b/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H @@ -105,16 +105,15 @@ public: ); - // Destructor - - ~LaunderSharmaKE() - {} + //- Destructor + virtual ~LaunderSharmaKE() + {} // Member Functions //- Return the turbulence viscosity - tmp nut() const + virtual tmp nut() const { return nut_; } @@ -138,32 +137,32 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Note that epsilonTilda is returned as epsilon. // This is the appropriate variable for most purposes. - tmp epsilon() const + virtual tmp epsilon() const { return epsilonTilda_; } //- Return the Reynolds stress tensor - tmp R() const; + virtual tmp R() const; //- Return the effective stress tensor including the laminar stress - tmp devReff() const; + virtual tmp devReff() const; //- Return the source term for the momentum equation - tmp divDevReff(volVectorField& U) const; + virtual tmp divDevReff(volVectorField& U) const; //- Solve the turbulence equations and correct the turbulence viscosity - void correct(); + virtual void correct(); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/RAS/incompressible/LienCubicKE/LienCubicKE.C b/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.C similarity index 99% rename from src/turbulenceModels/RAS/incompressible/LienCubicKE/LienCubicKE.C rename to src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.C index b347693adc..09b802504e 100644 --- a/src/turbulenceModels/RAS/incompressible/LienCubicKE/LienCubicKE.C +++ b/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.C @@ -46,7 +46,6 @@ addToRunTimeSelectionTable(RASModel, LienCubicKE, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// from components LienCubicKE::LienCubicKE ( const volVectorField& U, @@ -315,15 +314,13 @@ bool LienCubicKE::read() void LienCubicKE::correct() { - transportModel_.correct(); + RASModel::correct(); if (!turbulence_) { return; } - RASModel::correct(); - gradU_ = fvc::grad(U_); // generation term diff --git a/src/turbulenceModels/RAS/incompressible/LienCubicKE/LienCubicKE.H b/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.H similarity index 91% rename from src/turbulenceModels/RAS/incompressible/LienCubicKE/LienCubicKE.H rename to src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.H index 005c825775..e1617389b7 100644 --- a/src/turbulenceModels/RAS/incompressible/LienCubicKE/LienCubicKE.H +++ b/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.H @@ -100,15 +100,14 @@ public: // Destructor - - ~LienCubicKE() - {} + virtual ~LienCubicKE() + {} // Member Functions //- Return the turbulence viscosity - tmp nut() const + virtual tmp nut() const { return nut_; } @@ -132,31 +131,31 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const + virtual tmp epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp R() const; + virtual tmp R() const; //- Return the effective stress tensor including the laminar stress - tmp devReff() const; + virtual tmp devReff() const; //- Return the source term for the momentum equation - tmp divDevReff(volVectorField& U) const; + virtual tmp divDevReff(volVectorField& U) const; //- Solve the turbulence equations and correct the turbulence viscosity - void correct(); + virtual void correct(); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowRe.C b/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.C similarity index 99% rename from src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowRe.C rename to src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.C index 4a6963883d..19ad85b82d 100644 --- a/src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowRe.C +++ b/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.C @@ -1,4 +1,4 @@ -/*---------------------------------------------------------------------------*\ +/*---------------------------------------------------------------------------* \ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | @@ -44,7 +44,6 @@ addToRunTimeSelectionTable(RASModel, LienCubicKELowRe, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// from components LienCubicKELowRe::LienCubicKELowRe ( const volVectorField& U, @@ -362,15 +361,13 @@ bool LienCubicKELowRe::read() void LienCubicKELowRe::correct() { - transportModel_.correct(); + RASModel::correct(); if (!turbulence_) { return; } - RASModel::correct(); - if (mesh_.changing()) { y_.correct(); diff --git a/src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowRe.H b/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.H similarity index 92% rename from src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowRe.H rename to src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.H index 1708dde244..02d0fc63cf 100644 --- a/src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowRe.H +++ b/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.H @@ -124,16 +124,15 @@ public: ); - // Destructor - - ~LienCubicKELowRe() - {} + //- Destructor + virtual ~LienCubicKELowRe() + {} // Member Functions //- Return the turbulence viscosity - tmp nut() const + virtual tmp nut() const { return nut_; } @@ -157,31 +156,31 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const + virtual tmp epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp R() const; + virtual tmp R() const; //- Return the effective stress tensor including the laminar stress - tmp devReff() const; + virtual tmp devReff() const; //- Return the source term for the momentum equation - tmp divDevReff(volVectorField& U) const; + virtual tmp divDevReff(volVectorField& U) const; //- Solve the turbulence equations and correct the turbulence viscosity - void correct(); + virtual void correct(); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H b/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H similarity index 100% rename from src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H rename to src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H diff --git a/src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C b/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C similarity index 99% rename from src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C rename to src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C index 2dd14b9d9a..6c51a324a5 100644 --- a/src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C +++ b/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C @@ -44,7 +44,6 @@ addToRunTimeSelectionTable(RASModel, LienLeschzinerLowRe, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// from components LienLeschzinerLowRe::LienLeschzinerLowRe ( const volVectorField& U, @@ -190,15 +189,13 @@ bool LienLeschzinerLowRe::read() void LienLeschzinerLowRe::correct() { - transportModel_.correct(); + RASModel::correct(); if (!turbulence_) { return; } - RASModel::correct(); - if (mesh_.changing()) { y_.correct(); diff --git a/src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.H b/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H similarity index 90% rename from src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.H rename to src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H index 59efb82c98..41df680dd9 100644 --- a/src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.H +++ b/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H @@ -94,16 +94,15 @@ public: ); - // Destructor - - ~LienLeschzinerLowRe() - {} + //- Destructor + virtual ~LienLeschzinerLowRe() + {} // Member Functions //- Return the turbulence viscosity - tmp nut() const + virtual tmp nut() const { return nut_; } @@ -127,31 +126,31 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const + virtual tmp epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp R() const; + virtual tmp R() const; //- Return the effective stress tensor including the laminar stress - tmp devReff() const; + virtual tmp devReff() const; //- Return the source term for the momentum equation - tmp divDevReff(volVectorField& U) const; + virtual tmp divDevReff(volVectorField& U) const; //- Solve the turbulence equations and correct the turbulence viscosity - void correct(); + virtual void correct(); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H b/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H similarity index 100% rename from src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H rename to src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H diff --git a/src/turbulenceModels/RAS/incompressible/Make/files b/src/turbulenceModels/incompressible/RAS/Make/files similarity index 97% rename from src/turbulenceModels/RAS/incompressible/Make/files rename to src/turbulenceModels/incompressible/RAS/Make/files index 32b29db2fe..d5736d3064 100644 --- a/src/turbulenceModels/RAS/incompressible/Make/files +++ b/src/turbulenceModels/incompressible/RAS/Make/files @@ -1,6 +1,5 @@ -/* RAS turbulence models */ RASModel/RASModel.C -RASModel/newRASModel.C + laminar/laminar.C kEpsilon/kEpsilon.C RNGkEpsilon/RNGkEpsilon.C diff --git a/src/turbulenceModels/incompressible/RAS/Make/options b/src/turbulenceModels/incompressible/RAS/Make/options new file mode 100644 index 0000000000..701f27bfc0 --- /dev/null +++ b/src/turbulenceModels/incompressible/RAS/Make/options @@ -0,0 +1,10 @@ +EXE_INC = \ + -I../turbulenceModel/lnInclude \ + -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude + +LIB_LIBS = \ + -lincompressibleTurbulenceModel \ + -lfiniteVolume \ + -lmeshTools diff --git a/src/turbulenceModels/RAS/incompressible/NonlinearKEShih/NonlinearKEShih.C b/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.C similarity index 99% rename from src/turbulenceModels/RAS/incompressible/NonlinearKEShih/NonlinearKEShih.C rename to src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.C index cef22b9d84..bbf4155c82 100644 --- a/src/turbulenceModels/RAS/incompressible/NonlinearKEShih/NonlinearKEShih.C +++ b/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.C @@ -44,7 +44,6 @@ addToRunTimeSelectionTable(RASModel, NonlinearKEShih, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// from components NonlinearKEShih::NonlinearKEShih ( const volVectorField& U, @@ -285,15 +284,13 @@ bool NonlinearKEShih::read() void NonlinearKEShih::correct() { - transportModel_.correct(); + RASModel::correct(); if (!turbulence_) { return; } - RASModel::correct(); - gradU_ = fvc::grad(U_); // generation term diff --git a/src/turbulenceModels/RAS/incompressible/NonlinearKEShih/NonlinearKEShih.H b/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.H similarity index 90% rename from src/turbulenceModels/RAS/incompressible/NonlinearKEShih/NonlinearKEShih.H rename to src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.H index 7f8f6ebc8f..091c99cadf 100644 --- a/src/turbulenceModels/RAS/incompressible/NonlinearKEShih/NonlinearKEShih.H +++ b/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.H @@ -98,16 +98,15 @@ public: ); - // Destructor - - ~NonlinearKEShih() - {} + //- Destructor + virtual ~NonlinearKEShih() + {} // Member Functions //- Return the turbulence viscosity - tmp nut() const + virtual tmp nut() const { return nut_; } @@ -131,31 +130,31 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const + virtual tmp epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp R() const; + virtual tmp R() const; //- Return the effective stress tensor including the laminar stress - tmp devReff() const; + virtual tmp devReff() const; //- Return the source term for the momentum equation - tmp divDevReff(volVectorField& U) const; + virtual tmp divDevReff(volVectorField& U) const; //- Solve the turbulence equations and correct the turbulence viscosity - void correct(); + virtual void correct(); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/RAS/incompressible/QZeta/QZeta.C b/src/turbulenceModels/incompressible/RAS/QZeta/QZeta.C similarity index 99% rename from src/turbulenceModels/RAS/incompressible/QZeta/QZeta.C rename to src/turbulenceModels/incompressible/RAS/QZeta/QZeta.C index 1790d67fcb..336e6d6db6 100644 --- a/src/turbulenceModels/RAS/incompressible/QZeta/QZeta.C +++ b/src/turbulenceModels/incompressible/RAS/QZeta/QZeta.C @@ -69,7 +69,6 @@ tmp QZeta::f2() const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// from components QZeta::QZeta ( const volVectorField& U, @@ -259,15 +258,13 @@ bool QZeta::read() void QZeta::correct() { - transportModel_.correct(); + RASModel::correct(); if (!turbulence_) { return; } - RASModel::correct(); - volScalarField S2 = 2*magSqr(symm(fvc::grad(U_))); volScalarField G = nut_/(2.0*q_)*S2; diff --git a/src/turbulenceModels/RAS/incompressible/QZeta/QZeta.H b/src/turbulenceModels/incompressible/RAS/QZeta/QZeta.H similarity index 88% rename from src/turbulenceModels/RAS/incompressible/QZeta/QZeta.H rename to src/turbulenceModels/incompressible/RAS/QZeta/QZeta.H index 8c675a8fc1..0d76112835 100644 --- a/src/turbulenceModels/RAS/incompressible/QZeta/QZeta.H +++ b/src/turbulenceModels/incompressible/RAS/QZeta/QZeta.H @@ -95,16 +95,15 @@ public: ); - // Destructor - - ~QZeta() - {} + //- Destructor + virtual ~QZeta() + {} // Member Functions //- Return the turbulence viscosity - tmp nut() const + virtual tmp nut() const { return nut_; } @@ -128,41 +127,41 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const + virtual tmp epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp R() const; + virtual tmp R() const; - const volScalarField& q() const + virtual const volScalarField& q() const { return q_; } - const volScalarField& zeta() const + virtual const volScalarField& zeta() const { return zeta_; } //- Return the effective stress tensor including the laminar stress - tmp devReff() const; + virtual tmp devReff() const; //- Return the source term for the momentum equation - tmp divDevReff(volVectorField& U) const; + virtual tmp divDevReff(volVectorField& U) const; //- Solve the turbulence equations and correct the turbulence viscosity - void correct(); + virtual void correct(); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/RAS/incompressible/RASModel/RASModel.C b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C similarity index 73% rename from src/turbulenceModels/RAS/incompressible/RASModel/RASModel.C rename to src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C index 46236828f2..197c84a033 100644 --- a/src/turbulenceModels/RAS/incompressible/RASModel/RASModel.C +++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C @@ -26,6 +26,7 @@ License #include "RASModel.H" #include "wallFvPatch.H" +#include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -38,6 +39,7 @@ namespace incompressible defineTypeNameAndDebug(RASModel, 0); defineRunTimeSelectionTable(RASModel, dictionary); +addToRunTimeSelectionTable(turbulenceModel, RASModel, turbulenceModel); // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // @@ -61,6 +63,8 @@ RASModel::RASModel transportModel& lamTransportModel ) : + turbulenceModel(U, phi, lamTransportModel), + IOdictionary ( IOobject @@ -73,13 +77,6 @@ RASModel::RASModel ) ), - runTime_(U.time()), - mesh_(U.mesh()), - - U_(U), - phi_(phi), - transportModel_(lamTransportModel), - turbulence_(lookup("turbulence")), printCoeffs_(lookupOrDefault("printCoeffs", false)), coeffDict_(subDict(type + "Coeffs")), @@ -123,6 +120,61 @@ RASModel::RASModel {} +// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // + +autoPtr RASModel::New +( + const volVectorField& U, + const surfaceScalarField& phi, + transportModel& transport +) +{ + word RASModelTypeName; + + // Enclose the creation of the turbulencePropertiesDict to ensure it is + // deleted before the RASModel is created otherwise the dictionary + // is entered in the database twice + { + IOdictionary turbulencePropertiesDict + ( + IOobject + ( + "RASProperties", + U.time().constant(), + U.db(), + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + + turbulencePropertiesDict.lookup("RASModel") + >> RASModelTypeName; + } + + Info<< "Selecting RAS turbulence model " << RASModelTypeName << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(RASModelTypeName); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorIn + ( + "RASModel::New(const volVectorField&, " + "const surfaceScalarField&, transportModel&)" + ) << "Unknown RASModel type " << RASModelTypeName + << endl << endl + << "Valid RASModel types are :" << endl + << dictionaryConstructorTablePtr_->toc() + << exit(FatalError); + } + + return autoPtr(cstrIter()(U, phi, transport)); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + RASModel::~RASModel() {} @@ -173,7 +225,9 @@ tmp RASModel::yPlus(const label patchNo) const void RASModel::correct() { - if (mesh_.changing()) + turbulenceModel::correct(); + + if (turbulence_ && mesh_.changing()) { y_.correct(); } @@ -191,7 +245,6 @@ bool RASModel::read() kappa_.readIfPresent(wallFunctionDict_); E_.readIfPresent(wallFunctionDict_); Cmu_.readIfPresent(wallFunctionDict_); - yPlusLam_ = yPlusLam(kappa_.value(), E_.value()); k0_.readIfPresent(*this); diff --git a/src/turbulenceModels/RAS/incompressible/RASModel/RASModel.H b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H similarity index 64% rename from src/turbulenceModels/RAS/incompressible/RASModel/RASModel.H rename to src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H index b5edce3ea3..ce1d77f3cf 100644 --- a/src/turbulenceModels/RAS/incompressible/RASModel/RASModel.H +++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H @@ -36,13 +36,13 @@ Description SourceFiles RASModel.C - newTurbulenceModel.C \*---------------------------------------------------------------------------*/ #ifndef RASModel_H #define RASModel_H +#include "turbulenceModel.H" #include "volFields.H" #include "surfaceFields.H" #include "nearWallDist.H" @@ -69,6 +69,7 @@ namespace incompressible class RASModel : + public turbulenceModel, public IOdictionary { @@ -76,14 +77,6 @@ protected: // Protected data - const Time& runTime_; - const fvMesh& mesh_; - - const volVectorField& U_; - const surfaceScalarField& phi_; - - transportModel& transportModel_; - Switch turbulence_; Switch printCoeffs_; dictionary coeffDict_; @@ -135,9 +128,9 @@ public: ( const volVectorField& U, const surfaceScalarField& phi, - transportModel& transport + transportModel& lamTransportModel ), - (U, phi, transport) + (U, phi, lamTransportModel) ); @@ -149,121 +142,112 @@ public: const word& type, const volVectorField& U, const surfaceScalarField& phi, - transportModel& transport + transportModel& lamTransportModel ); // Selectors - //- Return a reference to the selected turbulence model + //- Return a reference to the selected RAS model static autoPtr New ( const volVectorField& U, const surfaceScalarField& phi, - transportModel& transport + transportModel& lamTransportModel ); - // Destructor - - virtual ~RASModel(); + //- Destructor + virtual ~RASModel(); // Member Functions - // Access - - //- Return the value of k0 which k is not allowed to be less than - const dimensionedScalar& k0() const - { - return k0_; - } - - //- Return the value of epsilon0 which epsilon is not allowed to be - // less than - const dimensionedScalar& epsilon0() const - { - return epsilon0_; - } - - //- Return the value of epsilonSmall which is added to epsilon when - // calculating nut - const dimensionedScalar& epsilonSmall() const - { - return epsilonSmall_; - } - - //- Allow k0 to be changed - dimensionedScalar& k0() - { - return k0_; - } - - //- Allow epsilon0 to be changed - dimensionedScalar& epsilon0() - { - return epsilon0_; - } - - //- Allow epsilonSmall to be changed - dimensionedScalar& epsilonSmall() - { - return epsilonSmall_; - } - - //- Return kappa for use in wall-functions - dimensionedScalar kappa() const - { - return kappa_; - } - - //- Return E for use in wall-functions - dimensionedScalar E() const - { - return E_; - } - - //- Return Cmu for use in wall-functions - dimensionedScalar Cmu() const - { - return Cmu_; - } - - //- Return the near wall distances - const nearWallDist& y() const - { - return y_; - } - - //- Calculate y+ at the edge of the laminar sublayer - scalar yPlusLam(const scalar kappa, const scalar E) const; - - //- Return y+ at the edge of the laminar sublayer - // for use in wall-functions - scalar yPlusLam() const - { - return yPlusLam_; - } - - //- Const access to the coefficients dictionary - const dictionary& coeffDict() const - { - return coeffDict_; - } - - //- Const access to the wall functions coefficients dictionary - const dictionary& walLFunctionDict() const - { - return wallFunctionDict_; - } - - - //- Return the laminar viscosity - const volScalarField& nu() const + //- Return the value of k0 which k is not allowed to be less than + const dimensionedScalar& k0() const { - return transportModel_.nu(); + return k0_; } + //- Return the value of epsilon0 which epsilon is not allowed to be + // less than + const dimensionedScalar& epsilon0() const + { + return epsilon0_; + } + + //- Return the value of epsilonSmall which is added to epsilon when + // calculating nut + const dimensionedScalar& epsilonSmall() const + { + return epsilonSmall_; + } + + //- Allow k0 to be changed + dimensionedScalar& k0() + { + return k0_; + } + + //- Allow epsilon0 to be changed + dimensionedScalar& epsilon0() + { + return epsilon0_; + } + + //- Allow epsilonSmall to be changed + dimensionedScalar& epsilonSmall() + { + return epsilonSmall_; + } + + //- Return kappa for use in wall-functions + dimensionedScalar kappa() const + { + return kappa_; + } + + //- Return E for use in wall-functions + dimensionedScalar E() const + { + return E_; + } + + //- Return Cmu for use in wall-functions + dimensionedScalar Cmu() const + { + return Cmu_; + } + + //- Return the near wall distances + const nearWallDist& y() const + { + return y_; + } + + //- Calculate y+ at the edge of the laminar sublayer + scalar yPlusLam(const scalar kappa, const scalar E) const; + + //- Return y+ at the edge of the laminar sublayer + // for use in wall-functions + scalar yPlusLam() const + { + return yPlusLam_; + } + + //- Const access to the coefficients dictionary + const dictionary& coeffDict() const + { + return coeffDict_; + } + + //- Const access to the wall functions coefficients dictionary + const dictionary& walLFunctionDict() const + { + return wallFunctionDict_; + } + + //- Return the turbulence viscosity virtual tmp nut() const = 0; @@ -276,6 +260,9 @@ public: ); } + //- Return yPlus for the given patch + virtual tmp yPlus(const label patchI) const; + //- Return the turbulence kinetic energy virtual tmp k() const = 0; @@ -291,9 +278,6 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const = 0; - //- Return yPlus for the given patch - virtual tmp yPlus(const label patchI) const; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct() = 0; diff --git a/src/turbulenceModels/RAS/incompressible/RNGkEpsilon/RNGkEpsilon.C b/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.C similarity index 99% rename from src/turbulenceModels/RAS/incompressible/RNGkEpsilon/RNGkEpsilon.C rename to src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.C index 3c98bfec9e..f632eea798 100644 --- a/src/turbulenceModels/RAS/incompressible/RNGkEpsilon/RNGkEpsilon.C +++ b/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.C @@ -240,15 +240,13 @@ bool RNGkEpsilon::read() void RNGkEpsilon::correct() { - transportModel_.correct(); + RASModel::correct(); if (!turbulence_) { return; } - RASModel::correct(); - volScalarField S2 = 2*magSqr(symm(fvc::grad(U_))); volScalarField G("G", nut_*S2); diff --git a/src/turbulenceModels/RAS/incompressible/RNGkEpsilon/RNGkEpsilon.H b/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.H similarity index 91% rename from src/turbulenceModels/RAS/incompressible/RNGkEpsilon/RNGkEpsilon.H rename to src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.H index 960d0a344d..7710c54bf1 100644 --- a/src/turbulenceModels/RAS/incompressible/RNGkEpsilon/RNGkEpsilon.H +++ b/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.H @@ -102,16 +102,15 @@ public: ); - // Destructor - - ~RNGkEpsilon() - {} + //- Destructor + virtual ~RNGkEpsilon() + {} // Member Functions //- Return the turbulence viscosity - tmp nut() const + virtual tmp nut() const { return nut_; } @@ -135,31 +134,31 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const + virtual tmp epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp R() const; + virtual tmp R() const; //- Return the effective stress tensor including the laminar stress - tmp devReff() const; + virtual tmp devReff() const; //- Return the source term for the momentum equation - tmp divDevReff(volVectorField& U) const; + virtual tmp divDevReff(volVectorField& U) const; //- Solve the turbulence equations and correct the turbulence viscosity - void correct(); + virtual void correct(); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/RAS/incompressible/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C similarity index 99% rename from src/turbulenceModels/RAS/incompressible/SpalartAllmaras/SpalartAllmaras.C rename to src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C index 7c0253db73..c22460a1d8 100644 --- a/src/turbulenceModels/RAS/incompressible/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C @@ -338,15 +338,13 @@ bool SpalartAllmaras::read() void SpalartAllmaras::correct() { - transportModel_.correct(); + RASModel::correct(); if (!turbulence_) { return; } - RASModel::correct(); - if (mesh_.changing()) { d_.correct(); diff --git a/src/turbulenceModels/RAS/incompressible/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.H similarity index 91% rename from src/turbulenceModels/RAS/incompressible/SpalartAllmaras/SpalartAllmaras.H rename to src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.H index 39cb3977e0..abc946efec 100644 --- a/src/turbulenceModels/RAS/incompressible/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.H @@ -139,16 +139,15 @@ public: ); - // Destructor - - ~SpalartAllmaras() - {} + //- Destructor + virtual ~SpalartAllmaras() + {} // Member Functions //- Return the turbulence viscosity - tmp nut() const + virtual tmp nut() const { return nut_; } @@ -157,25 +156,25 @@ public: tmp DnuTildaEff() const; //- Return the turbulence kinetic energy - tmp k() const; + virtual tmp k() const; //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const; + virtual tmp epsilon() const; //- Return the Reynolds stress tensor - tmp R() const; + virtual tmp R() const; //- Return the effective stress tensor including the laminar stress - tmp devReff() const; + virtual tmp devReff() const; //- Return the source term for the momentum equation - tmp divDevReff(volVectorField& U) const; + virtual tmp divDevReff(volVectorField& U) const; //- Solve the turbulence equations and correct the turbulence viscosity - void correct(); + virtual void correct(); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/RAS/incompressible/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.C b/src/turbulenceModels/incompressible/RAS/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.C similarity index 100% rename from src/turbulenceModels/RAS/incompressible/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.C rename to src/turbulenceModels/incompressible/RAS/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.C diff --git a/src/turbulenceModels/RAS/incompressible/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.H b/src/turbulenceModels/incompressible/RAS/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.H similarity index 100% rename from src/turbulenceModels/RAS/incompressible/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.H rename to src/turbulenceModels/incompressible/RAS/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.H diff --git a/src/turbulenceModels/RAS/incompressible/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctionsTemplates.C b/src/turbulenceModels/incompressible/RAS/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctionsTemplates.C similarity index 100% rename from src/turbulenceModels/RAS/incompressible/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctionsTemplates.C rename to src/turbulenceModels/incompressible/RAS/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctionsTemplates.C diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.C similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.C rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.C diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.H similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.H rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.H diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchFields.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchFields.C similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchFields.C rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchFields.C diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchFields.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchFields.H similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchFields.H rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchFields.H diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.H diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.C diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.H diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H similarity index 100% rename from src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H diff --git a/src/turbulenceModels/RAS/incompressible/include/nonLinearWallFunctionsI.H b/src/turbulenceModels/incompressible/RAS/include/nonLinearWallFunctionsI.H similarity index 100% rename from src/turbulenceModels/RAS/incompressible/include/nonLinearWallFunctionsI.H rename to src/turbulenceModels/incompressible/RAS/include/nonLinearWallFunctionsI.H diff --git a/src/turbulenceModels/RAS/incompressible/include/wallDissipationI.H b/src/turbulenceModels/incompressible/RAS/include/wallDissipationI.H similarity index 100% rename from src/turbulenceModels/RAS/incompressible/include/wallDissipationI.H rename to src/turbulenceModels/incompressible/RAS/include/wallDissipationI.H diff --git a/src/turbulenceModels/RAS/incompressible/include/wallFunctionsI.H.old b/src/turbulenceModels/incompressible/RAS/include/wallFunctionsI.H.old similarity index 100% rename from src/turbulenceModels/RAS/incompressible/include/wallFunctionsI.H.old rename to src/turbulenceModels/incompressible/RAS/include/wallFunctionsI.H.old diff --git a/src/turbulenceModels/RAS/incompressible/include/wallNonlinearViscosityI.H b/src/turbulenceModels/incompressible/RAS/include/wallNonlinearViscosityI.H similarity index 100% rename from src/turbulenceModels/RAS/incompressible/include/wallNonlinearViscosityI.H rename to src/turbulenceModels/incompressible/RAS/include/wallNonlinearViscosityI.H diff --git a/src/turbulenceModels/RAS/incompressible/include/wallViscosityI.H.old b/src/turbulenceModels/incompressible/RAS/include/wallViscosityI.H.old similarity index 100% rename from src/turbulenceModels/RAS/incompressible/include/wallViscosityI.H.old rename to src/turbulenceModels/incompressible/RAS/include/wallViscosityI.H.old diff --git a/src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.C b/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C similarity index 98% rename from src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.C rename to src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C index c387604301..38b382b86a 100644 --- a/src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.C +++ b/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C @@ -46,7 +46,6 @@ addToRunTimeSelectionTable(RASModel, kEpsilon, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components kEpsilon::kEpsilon ( const volVectorField& U, @@ -210,20 +209,13 @@ bool kEpsilon::read() void kEpsilon::correct() { - transportModel_.correct(); + RASModel::correct(); if (!turbulence_) { return; } - RASModel::correct(); - - if (mesh_.changing()) - { - y_.correct(); - } - volScalarField G("G", nut_*2*magSqr(symm(fvc::grad(U_)))); // Update espsilon and G at the wall diff --git a/src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.H b/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.H similarity index 90% rename from src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.H rename to src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.H index 5ac0d5a461..52e3f70d84 100644 --- a/src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.H +++ b/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.H @@ -102,16 +102,15 @@ public: ); - // Destructor - - ~kEpsilon() - {} + //- Destructor + virtual ~kEpsilon() + {} // Member Functions //- Return the turbulence viscosity - tmp nut() const + virtual tmp nut() const { return nut_; } @@ -135,31 +134,31 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const + virtual tmp epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp R() const; + virtual tmp R() const; //- Return the effective stress tensor including the laminar stress - tmp devReff() const; + virtual tmp devReff() const; //- Return the source term for the momentum equation - tmp divDevReff(volVectorField& U) const; + virtual tmp divDevReff(volVectorField& U) const; //- Solve the turbulence equations and correct the turbulence viscosity - void correct(); + virtual void correct(); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/RAS/incompressible/kOmega/kOmega.C b/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.C similarity index 99% rename from src/turbulenceModels/RAS/incompressible/kOmega/kOmega.C rename to src/turbulenceModels/incompressible/RAS/kOmega/kOmega.C index ff2dceca5a..bb53b7e765 100644 --- a/src/turbulenceModels/RAS/incompressible/kOmega/kOmega.C +++ b/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.C @@ -221,15 +221,13 @@ bool kOmega::read() void kOmega::correct() { - transportModel_.correct(); + RASModel::correct(); if (!turbulence_) { return; } - RASModel::correct(); - volScalarField G("G", nut_*2*magSqr(symm(fvc::grad(U_)))); // Update omega and G at the wall diff --git a/src/turbulenceModels/RAS/incompressible/kOmega/kOmega.H b/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.H similarity index 91% rename from src/turbulenceModels/RAS/incompressible/kOmega/kOmega.H rename to src/turbulenceModels/incompressible/RAS/kOmega/kOmega.H index 6501a691f8..cb387cd10e 100644 --- a/src/turbulenceModels/RAS/incompressible/kOmega/kOmega.H +++ b/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.H @@ -118,15 +118,14 @@ public: // Destructor - - ~kOmega() - {} + virtual ~kOmega() + {} // Member Functions //- Return the turbulence viscosity - tmp nut() const + virtual tmp nut() const { return nut_; } @@ -150,19 +149,19 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Return the turbulence specific dissipation rate - tmp omega() const + virtual tmp omega() const { return omega_; } //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const + virtual tmp epsilon() const { return tmp ( @@ -181,19 +180,19 @@ public: } //- Return the Reynolds stress tensor - tmp R() const; + virtual tmp R() const; //- Return the effective stress tensor including the laminar stress - tmp devReff() const; + virtual tmp devReff() const; //- Return the source term for the momentum equation - tmp divDevReff(volVectorField& U) const; + virtual tmp divDevReff(volVectorField& U) const; //- Solve the turbulence equations and correct the turbulence viscosity - void correct(); + virtual void correct(); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaSST.C b/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C similarity index 99% rename from src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaSST.C rename to src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C index 4760c17152..cff3a3dc56 100644 --- a/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaSST.C +++ b/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C @@ -344,15 +344,13 @@ bool kOmegaSST::read() void kOmegaSST::correct() { - transportModel_.correct(); + RASModel::correct(); if (!turbulence_) { return; } - RASModel::correct(); - if (mesh_.changing()) { y_.correct(); diff --git a/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaSST.H b/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.H similarity index 93% rename from src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaSST.H rename to src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.H index 8b406d6ea7..646f3ad15e 100644 --- a/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaSST.H +++ b/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.H @@ -197,16 +197,15 @@ public: ); - // Destructor - - ~kOmegaSST() - {} + //- Destructor + virtual ~kOmegaSST() + {} // Member Functions //- Return the turbulence viscosity - tmp nut() const + virtual tmp nut() const { return nut_; } @@ -230,19 +229,19 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Return the turbulence specific dissipation rate - tmp omega() const + virtual tmp omega() const { return omega_; } //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const + virtual tmp epsilon() const { return tmp ( @@ -261,19 +260,19 @@ public: } //- Return the Reynolds stress tensor - tmp R() const; + virtual tmp R() const; //- Return the effective stress tensor including the laminar stress - tmp devReff() const; + virtual tmp devReff() const; //- Return the source term for the momentum equation - tmp divDevReff(volVectorField& U) const; + virtual tmp divDevReff(volVectorField& U) const; //- Solve the turbulence equations and correct the turbulence viscosity - void correct(); + virtual void correct(); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/RAS/incompressible/laminar/laminar.C b/src/turbulenceModels/incompressible/RAS/laminar/laminar.C similarity index 99% rename from src/turbulenceModels/RAS/incompressible/laminar/laminar.C rename to src/turbulenceModels/incompressible/RAS/laminar/laminar.C index 9ef6730bc9..2c871874c9 100644 --- a/src/turbulenceModels/RAS/incompressible/laminar/laminar.C +++ b/src/turbulenceModels/incompressible/RAS/laminar/laminar.C @@ -190,7 +190,7 @@ bool laminar::read() void laminar::correct() { - transportModel_.correct(); + turbulenceModel::correct(); } diff --git a/src/turbulenceModels/RAS/incompressible/laminar/laminar.H b/src/turbulenceModels/incompressible/RAS/laminar/laminar.H similarity index 86% rename from src/turbulenceModels/RAS/incompressible/laminar/laminar.H rename to src/turbulenceModels/incompressible/RAS/laminar/laminar.H index 7f07045aa3..6675a336cb 100644 --- a/src/turbulenceModels/RAS/incompressible/laminar/laminar.H +++ b/src/turbulenceModels/incompressible/RAS/laminar/laminar.H @@ -72,41 +72,40 @@ public: ); - // Destructor - - ~laminar() - {} + //- Destructor + virtual ~laminar() + {} // Member Functions //- Return the turbulence viscosity, i.e. 0 for laminar flow - tmp nut() const; + virtual tmp nut() const; //- Return the effective viscosity, i.e. the laminar viscosity - tmp nuEff() const; + virtual tmp nuEff() const; //- Return the turbulence kinetic energy, i.e. 0 for laminar flow - tmp k() const; + virtual tmp k() const; //- Return the turbulence kinetic energy dissipation rate, // i.e. 0 for laminar flow - tmp epsilon() const; + virtual tmp epsilon() const; //- Return the Reynolds stress tensor, i.e. 0 for laminar flow - tmp R() const; + virtual tmp R() const; //- Return the effective stress tensor including the laminar stress - tmp devReff() const; + virtual tmp devReff() const; //- Return the source term for the momentum equation - tmp divDevReff(volVectorField& U) const; + virtual tmp divDevReff(volVectorField& U) const; //- Correct the laminar viscosity - void correct(); + virtual void correct(); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/RAS/incompressible/realizableKE/realizableKE.C b/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.C similarity index 99% rename from src/turbulenceModels/RAS/incompressible/realizableKE/realizableKE.C rename to src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.C index ffeba065d7..f44f0e53e8 100644 --- a/src/turbulenceModels/RAS/incompressible/realizableKE/realizableKE.C +++ b/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.C @@ -263,15 +263,13 @@ bool realizableKE::read() void realizableKE::correct() { - transportModel_.correct(); + RASModel::correct(); if (!turbulence_) { return; } - RASModel::correct(); - volTensorField gradU = fvc::grad(U_); volScalarField S2 = 2*magSqr(dev(symm(gradU))); volScalarField magS = sqrt(S2); diff --git a/src/turbulenceModels/RAS/incompressible/realizableKE/realizableKE.H b/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.H similarity index 91% rename from src/turbulenceModels/RAS/incompressible/realizableKE/realizableKE.H rename to src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.H index d3587b2f51..9a63300653 100644 --- a/src/turbulenceModels/RAS/incompressible/realizableKE/realizableKE.H +++ b/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.H @@ -119,16 +119,15 @@ public: ); - // Destructor - - ~realizableKE() - {} + //- Destructor + virtual ~realizableKE() + {} // Member Functions //- Return the turbulence viscosity - tmp nut() const + virtual tmp nut() const { return nut_; } @@ -152,31 +151,31 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const + virtual tmp epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp R() const; + virtual tmp R() const; //- Return the effective stress tensor including the laminar stress - tmp devReff() const; + virtual tmp devReff() const; //- Return the source term for the momentum equation - tmp divDevReff(volVectorField& U) const; + virtual tmp divDevReff(volVectorField& U) const; //- Solve the turbulence equations and correct the turbulence viscosity - void correct(); + virtual void correct(); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/incompressible/turbulenceModel/Make/files b/src/turbulenceModels/incompressible/turbulenceModel/Make/files new file mode 100644 index 0000000000..80aac83690 --- /dev/null +++ b/src/turbulenceModels/incompressible/turbulenceModel/Make/files @@ -0,0 +1,5 @@ +turbulenceModel.C +newTurbulenceModel.C +laminar/laminar.C + +LIB = $(FOAM_LIBBIN)/libincompressibleTurbulenceModel diff --git a/src/turbulenceModels/RAS/incompressible/Make/options b/src/turbulenceModels/incompressible/turbulenceModel/Make/options similarity index 57% rename from src/turbulenceModels/RAS/incompressible/Make/options rename to src/turbulenceModels/incompressible/turbulenceModel/Make/options index a6f6e7f453..6ade117347 100644 --- a/src/turbulenceModels/RAS/incompressible/Make/options +++ b/src/turbulenceModels/incompressible/turbulenceModel/Make/options @@ -1,8 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/transportModels LIB_LIBS = \ - -lfiniteVolume \ - -lmeshTools + -lfiniteVolume + diff --git a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C new file mode 100644 index 0000000000..a30a17924e --- /dev/null +++ b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C @@ -0,0 +1,219 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\/ 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "laminar.H" +#include "Time.H" +#include "volFields.H" +#include "fvcGrad.H" +#include "fvcDiv.H" +#include "fvmLaplacian.H" +#include "addToRunTimeSelectionTable.H" + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace incompressible +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineTypeNameAndDebug(laminar, 0); +addToRunTimeSelectionTable(turbulenceModel, laminar, turbulenceModel); + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +laminar::laminar +( + const volVectorField& U, + const surfaceScalarField& phi, + transportModel& lamTransportModel +) +: + turbulenceModel(U, phi, lamTransportModel) +{} + + +// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // + +autoPtr laminar::New +( + const volVectorField& U, + const surfaceScalarField& phi, + transportModel& lamTransportModel +) +{ + return autoPtr(new laminar(U, phi, lamTransportModel)); +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +tmp laminar::nut() const +{ + return tmp + ( + new volScalarField + ( + IOobject + ( + "nut", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar("nut", nu().dimensions(), 0.0) + ) + ); +} + + +tmp laminar::nuEff() const +{ + return tmp(new volScalarField("nuEff", nu())); +} + + +tmp laminar::k() const +{ + return tmp + ( + new volScalarField + ( + IOobject + ( + "k", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar("k", sqr(U_.dimensions()), 0.0) + ) + ); +} + + +tmp laminar::epsilon() const +{ + return tmp + ( + new volScalarField + ( + IOobject + ( + "epsilon", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar + ( + "epsilon", sqr(U_.dimensions())/dimTime, 0.0 + ) + ) + ); +} + + +tmp laminar::R() const +{ + return tmp + ( + new volSymmTensorField + ( + IOobject + ( + "R", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedSymmTensor + ( + "R", sqr(U_.dimensions()), symmTensor::zero + ) + ) + ); +} + + +tmp laminar::devReff() const +{ + return tmp + ( + new volSymmTensorField + ( + IOobject + ( + "devRhoReff", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + -nu()*dev(twoSymm(fvc::grad(U_))) + ) + ); +} + + +tmp laminar::divDevReff(volVectorField& U) const +{ + return + ( + - fvm::laplacian(nuEff(), U) + - fvc::div(nuEff()*dev(fvc::grad(U)().T())) + ); +} + + +bool laminar::read() +{ + return true; +} + + +void laminar::correct() +{ + turbulenceModel::correct(); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace incompressible +} // End namespace Foam + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.H b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H similarity index 56% rename from applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.H rename to src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H index 30090fe28f..e617e90950 100644 --- a/applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.H +++ b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H @@ -23,39 +23,20 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - devOneEqEddy + Foam::incompressible::laminar Description -
-    One Equation Eddy Viscosity Model
-    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    Eddy viscosity SGS model using a modeled balance equation to simulate the
-    behaviour of k, hence,
-
-        d/dt(k) + div(U*k) - div(nuEff*grad(k))
-        =
-        -B*L - ce*k^3/2/delta
-
-    and
-
-        B = 2/3*k*I - 2*nuEff*dev(D)
-
-    where
-
-        D = symm(grad(U));
-        nuSgs = ck*sqrt(k)*delta
-        nuEff = nuSgs + nu
-
+ Turbulence model for laminar incompressible flow. SourceFiles - devOneEqEddy.C + laminar.C \*---------------------------------------------------------------------------*/ -#ifndef devOneEqEddy_H -#define devOneEqEddy_H +#ifndef laminar_H +#define laminar_H -#include "GenEddyVisc.H" +#include "turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -63,40 +44,25 @@ namespace Foam { namespace incompressible { -namespace LESModels -{ /*---------------------------------------------------------------------------*\ - Class devOneEqEddy Declaration + Class laminar Declaration \*---------------------------------------------------------------------------*/ -class devOneEqEddy +class laminar : - public GenEddyVisc + public turbulenceModel { - // Private data - - volScalarField k_; - - dimensionedScalar ck_; - - - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - devOneEqEddy(const devOneEqEddy&); - devOneEqEddy& operator=(const devOneEqEddy&); - public: //- Runtime type information - TypeName("devOneEqEddy"); + TypeName("laminar"); // Constructors - //- Constructor from components - devOneEqEddy + //- Construct from components + laminar ( const volVectorField& U, const surfaceScalarField& phi, @@ -104,40 +70,56 @@ public: ); - // Destructor + // Selectors - ~devOneEqEddy() - {} + //- Return a reference to the selected turbulence model + static autoPtr New + ( + const volVectorField& U, + const surfaceScalarField& phi, + transportModel& lamTransportModel + ); + + + //- Destructor + virtual ~laminar() + {} // Member Functions - //- Return SGS kinetic energy - tmp k() const - { - return k_; - } + //- Return the turbulence viscosity, i.e. 0 for laminar flow + virtual tmp nut() const; - //- Return the effective diffusivity for k - tmp DkEff() const - { - return tmp - ( - new volScalarField("DkEff", nuSgs_ + nu()) - ); - } + //- Return the effective viscosity, i.e. the laminar viscosity + virtual tmp nuEff() const; - //- Correct Eddy-Viscosity and related properties - void correct(const tmp& gradU); + //- Return the turbulence kinetic energy, i.e. 0 for laminar flow + virtual tmp k() const; + + //- Return the turbulence kinetic energy dissipation rate, + // i.e. 0 for laminar flow + virtual tmp epsilon() const; + + //- Return the Reynolds stress tensor, i.e. 0 for laminar flow + virtual tmp R() const; + + //- Return the effective stress tensor including the laminar stress + virtual tmp devReff() const; + + //- Return the source term for the momentum equation + virtual tmp divDevReff(volVectorField& U) const; + + //- Correct the laminar viscosity + virtual void correct(); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESModelsModels } // End namespace incompressible } // End namespace Foam diff --git a/src/turbulenceModels/LES/incompressible/LESModel/newLESModel.C b/src/turbulenceModels/incompressible/turbulenceModel/newTurbulenceModel.C similarity index 71% rename from src/turbulenceModels/LES/incompressible/LESModel/newLESModel.C rename to src/turbulenceModels/incompressible/turbulenceModel/newTurbulenceModel.C index 5cda1e5f56..ef609c61f1 100644 --- a/src/turbulenceModels/LES/incompressible/LESModel/newLESModel.C +++ b/src/turbulenceModels/incompressible/turbulenceModel/newTurbulenceModel.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ -#include "LESModel.H" +#include "turbulenceModel.H" +#include "volFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -35,14 +36,14 @@ namespace incompressible // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -autoPtr LESModel::New +autoPtr turbulenceModel::New ( const volVectorField& U, const surfaceScalarField& phi, transportModel& transport ) { - word LESModelTypeName; + word turbulenceModelTypeName; // Enclose the creation of the turbulencePropertiesDict to ensure it is // deleted before the turbulenceModel is created otherwise the dictionary @@ -52,7 +53,7 @@ autoPtr LESModel::New ( IOobject ( - "LESProperties", + "turbulenceProperties", U.time().constant(), U.db(), IOobject::MUST_READ, @@ -60,28 +61,30 @@ autoPtr LESModel::New ) ); - turbulencePropertiesDict.lookup("LESModel") >> LESModelTypeName; + turbulencePropertiesDict.lookup("simulationType") + >> turbulenceModelTypeName; } - Info<< "Selecting LES turbulence model " << LESModelTypeName << endl; + Info<< "Selecting turbulence model type " + << turbulenceModelTypeName << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(LESModelTypeName); + turbulenceModelConstructorTable::iterator cstrIter = + turbulenceModelConstructorTablePtr_->find(turbulenceModelTypeName); - if (cstrIter == dictionaryConstructorTablePtr_->end()) + if (cstrIter == turbulenceModelConstructorTablePtr_->end()) { FatalErrorIn ( - "LESModel::select(const volVectorField&, const " - "surfaceScalarField&, transportModel&)" - ) << "Unknown LESModel type " << LESModelTypeName + "turbulenceModel::New(const volVectorField&, " + "const surfaceScalarField&, transportModel&)" + ) << "Unknown turbulenceModel type " << turbulenceModelTypeName << endl << endl - << "Valid LESModel types are :" << endl - << dictionaryConstructorTablePtr_->toc() + << "Valid turbulenceModel types are :" << endl + << turbulenceModelConstructorTablePtr_->toc() << exit(FatalError); } - return autoPtr(cstrIter()(U, phi, transport)); + return autoPtr(cstrIter()(U, phi, transport)); } diff --git a/src/turbulenceModels/RAS/incompressible/RASModel/newRASModel.C b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C similarity index 55% rename from src/turbulenceModels/RAS/incompressible/RASModel/newRASModel.C rename to src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C index b3f0a9876a..e3a4a00daf 100644 --- a/src/turbulenceModels/RAS/incompressible/RASModel/newRASModel.C +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C @@ -24,9 +24,10 @@ License \*---------------------------------------------------------------------------*/ -#include "error.H" - -#include "RASModel.H" +#include "turbulenceModel.H" +#include "volFields.H" +#include "surfaceFields.H" +#include "wallFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -37,54 +38,36 @@ namespace incompressible // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -autoPtr RASModel::New +defineTypeNameAndDebug(turbulenceModel, 0); +defineRunTimeSelectionTable(turbulenceModel, turbulenceModel); + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +turbulenceModel::turbulenceModel ( const volVectorField& U, const surfaceScalarField& phi, - transportModel& transport + transportModel& lamTransportModel ) +: + runTime_(U.time()), + mesh_(U.mesh()), + + U_(U), + phi_(phi), + transportModel_(lamTransportModel) +{} + + +turbulenceModel::~turbulenceModel() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void turbulenceModel::correct() { - word RASModelTypeName; - - // Enclose the creation of the turbulencePropertiesDict to ensure it is - // deleted before the RASModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary turbulencePropertiesDict - ( - IOobject - ( - "RASProperties", - U.time().constant(), - U.db(), - IOobject::MUST_READ, - IOobject::NO_WRITE - ) - ); - - turbulencePropertiesDict.lookup("RASModel") - >> RASModelTypeName; - } - - Info<< "Selecting RAS turbulence model " << RASModelTypeName << endl; - - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(RASModelTypeName); - - if (cstrIter == dictionaryConstructorTablePtr_->end()) - { - FatalErrorIn - ( - "RASModel::New(const volVectorField&, " - "const surfaceScalarField&, transportModel&)" - ) << "Unknown RASModel type " << RASModelTypeName - << endl << endl - << "Valid RASModel types are :" << endl - << dictionaryConstructorTablePtr_->toc() - << exit(FatalError); - } - - return autoPtr(cstrIter()(U, phi, transport)); + transportModel_.correct(); } diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H new file mode 100644 index 0000000000..490b59e14e --- /dev/null +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H @@ -0,0 +1,197 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\/ 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Namespace + Foam::incompressible::turbulenceModels + +Description + Namespace for incompressible turbulence turbulence models. + +Class + Foam::incompressible::turbulenceModel + +Description + Abstract base class for incompressible turbulence models + (RAS, LES and laminar). + +SourceFiles + turbulenceModel.C + newTurbulenceModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef turbulenceModel_H +#define turbulenceModel_H + +#include "primitiveFieldsFwd.H" +#include "volFieldsFwd.H" +#include "surfaceFieldsFwd.H" +#include "fvMatricesFwd.H" +#include "incompressible/transportModel/transportModel.H" +#include "autoPtr.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declarations +class fvMesh; + +namespace incompressible +{ + +/*---------------------------------------------------------------------------*\ + Class turbulenceModel Declaration +\*---------------------------------------------------------------------------*/ + +class turbulenceModel +{ + +protected: + + // Protected data + + const Time& runTime_; + const fvMesh& mesh_; + + const volVectorField& U_; + const surfaceScalarField& phi_; + + transportModel& transportModel_; + + +private: + + // Private Member Functions + + //- Disallow default bitwise copy construct + turbulenceModel(const turbulenceModel&); + + //- Disallow default bitwise assignment + void operator=(const turbulenceModel&); + + +public: + + //- Runtime type information + TypeName("turbulenceModel"); + + + // Declare run-time New selection table + + declareRunTimeNewSelectionTable + ( + autoPtr, + turbulenceModel, + turbulenceModel, + ( + const volVectorField& U, + const surfaceScalarField& phi, + transportModel& lamTransportModel + ), + (U, phi, lamTransportModel) + ); + + + // Constructors + + //- Construct from components + turbulenceModel + ( + const volVectorField& U, + const surfaceScalarField& phi, + transportModel& lamTransportModel + ); + + + // Selectors + + //- Return a reference to the selected turbulence model + static autoPtr New + ( + const volVectorField& U, + const surfaceScalarField& phi, + transportModel& lamTransportModel + ); + + + //- Destructor + virtual ~turbulenceModel(); + + + // Member Functions + + //- Access function to incompressible transport model + inline transportModel& transport() const + { + return transportModel_; + } + + //- Return the laminar viscosity + const volScalarField& nu() const + { + return transportModel_.nu(); + } + + //- Return the turbulence viscosity + virtual tmp nut() const = 0; + + //- Return the effective viscosity + virtual tmp nuEff() const = 0; + + //- Return the turbulence kinetic energy + virtual tmp k() const = 0; + + //- Return the turbulence kinetic energy dissipation rate + virtual tmp epsilon() const = 0; + + //- Return the Reynolds stress tensor + virtual tmp R() const = 0; + + //- Return the effective stress tensor including the laminar stress + virtual tmp devReff() const = 0; + + //- Return the source term for the momentum equation + virtual tmp divDevReff(volVectorField& U) const = 0; + + //- Solve the turbulence equations and correct the turbulence viscosity + virtual void correct() = 0; + + //- Read turbulenceProperties dictionary + virtual bool read() = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace incompressible +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/tutorials/buoyantSimpleFoam/hotRoom/0/alphat b/tutorials/buoyantSimpleFoam/hotRoom/0/alphat new file mode 100644 index 0000000000..a413baf8ed --- /dev/null +++ b/tutorials/buoyantSimpleFoam/hotRoom/0/alphat @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + floor + { + type alphatWallFunction; + value uniform 0; + } + ceiling + { + type alphatWallFunction; + value uniform 0; + } + fixedWalls + { + type alphatWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/buoyantSimpleFoam/hotRoom/0/epsilon b/tutorials/buoyantSimpleFoam/hotRoom/0/epsilon index 46a465314b..243a852f89 100644 --- a/tutorials/buoyantSimpleFoam/hotRoom/0/epsilon +++ b/tutorials/buoyantSimpleFoam/hotRoom/0/epsilon @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -10,6 +10,7 @@ FoamFile version 2.0; format ascii; class volScalarField; + location "0"; object epsilon; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -20,20 +21,22 @@ internalField uniform 0.01; boundaryField { - floor + floor { - type zeroGradient; + type epsilonWallFunction; + value uniform 0.01; } - - ceiling + ceiling { - type zeroGradient; + type epsilonWallFunction; + value uniform 0.01; } - - fixedWalls + fixedWalls { - type zeroGradient; + type epsilonWallFunction; + value uniform 0.01; } } + // ************************************************************************* // diff --git a/tutorials/buoyantSimpleFoam/hotRoom/0/epsilon.old b/tutorials/buoyantSimpleFoam/hotRoom/0/epsilon.old new file mode 100644 index 0000000000..f39bcff942 --- /dev/null +++ b/tutorials/buoyantSimpleFoam/hotRoom/0/epsilon.old @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object epsilon.old; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 0.01; + +boundaryField +{ + floor + { + type zeroGradient; + } + ceiling + { + type zeroGradient; + } + fixedWalls + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/buoyantSimpleFoam/hotRoom/0/k b/tutorials/buoyantSimpleFoam/hotRoom/0/k index 5485bd3e57..1b8a55e1b5 100644 --- a/tutorials/buoyantSimpleFoam/hotRoom/0/k +++ b/tutorials/buoyantSimpleFoam/hotRoom/0/k @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -10,6 +10,7 @@ FoamFile version 2.0; format ascii; class volScalarField; + location "0"; object k; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -20,20 +21,22 @@ internalField uniform 0.1; boundaryField { - floor + floor { - type zeroGradient; + type kQRWallFunction; + value uniform 0.1; } - - ceiling + ceiling { - type zeroGradient; + type kQRWallFunction; + value uniform 0.1; } - - fixedWalls + fixedWalls { - type zeroGradient; + type kQRWallFunction; + value uniform 0.1; } } + // ************************************************************************* // diff --git a/tutorials/buoyantSimpleFoam/hotRoom/0/k.old b/tutorials/buoyantSimpleFoam/hotRoom/0/k.old new file mode 100644 index 0000000000..6289576d78 --- /dev/null +++ b/tutorials/buoyantSimpleFoam/hotRoom/0/k.old @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k.old; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0.1; + +boundaryField +{ + floor + { + type zeroGradient; + } + ceiling + { + type zeroGradient; + } + fixedWalls + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/buoyantSimpleFoam/hotRoom/0/mut b/tutorials/buoyantSimpleFoam/hotRoom/0/mut new file mode 100644 index 0000000000..64a67eea2a --- /dev/null +++ b/tutorials/buoyantSimpleFoam/hotRoom/0/mut @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object mut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + floor + { + type mutWallFunction; + value uniform 0; + } + ceiling + { + type mutWallFunction; + value uniform 0; + } + fixedWalls + { + type mutWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/buoyantSimpleFoam/hotRoom/constant/polyMesh/boundary b/tutorials/buoyantSimpleFoam/hotRoom/constant/polyMesh/boundary index 713344455a..9590626e73 100644 --- a/tutorials/buoyantSimpleFoam/hotRoom/constant/polyMesh/boundary +++ b/tutorials/buoyantSimpleFoam/hotRoom/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -10,6 +10,7 @@ FoamFile version 2.0; format ascii; class polyBoundaryMesh; + location "constant/polyMesh"; object boundary; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/interFoam/Allclean b/tutorials/interFoam/Allclean index 6227578471..942950db4e 100755 --- a/tutorials/interFoam/Allclean +++ b/tutorials/interFoam/Allclean @@ -12,7 +12,7 @@ do if [ "$case" = "damBreak" ] then - cp $case/0/gamma.org $case/0/gamma + cp $case/0/alpha1.org $case/0/alpha1 fi done @@ -20,3 +20,7 @@ for case in $loseCases do removeCase $case done + +cd nozzleFlow2D + ./Allclean +cd .. diff --git a/tutorials/interFoam/Allrun b/tutorials/interFoam/Allrun index 4adf8e9374..99db32d37a 100755 --- a/tutorials/interFoam/Allrun +++ b/tutorials/interFoam/Allrun @@ -37,7 +37,7 @@ cloneCase damBreak damBreakFine cd damBreakFine # Modify case setDamBreakFine - cp ../damBreak/0/gamma.org 0/gamma + cp ../damBreak/0/alpha1.org 0/alpha1 # And execute runApplication blockMesh runApplication setFields @@ -46,3 +46,7 @@ cd damBreakFine runParallel $application 4 system/machines runApplication reconstructPar cd .. + +cd nozzleFlow2D + ./Allrun +cd .. diff --git a/tutorials/interFoam/damBreak/0/U b/tutorials/interFoam/damBreak/0/U index d4cc4c65a6..9dcf5eae9a 100644 --- a/tutorials/interFoam/damBreak/0/U +++ b/tutorials/interFoam/damBreak/0/U @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -10,6 +10,7 @@ FoamFile version 2.0; format ascii; class volVectorField; + location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -38,7 +39,6 @@ boundaryField atmosphere { type pressureInletOutletVelocity; - phi phi; value uniform (0 0 0); } defaultFaces @@ -47,4 +47,5 @@ boundaryField } } + // ************************************************************************* // diff --git a/tutorials/interFoam/damBreak/0/gamma b/tutorials/interFoam/damBreak/0/alpha1 similarity index 90% rename from tutorials/interFoam/damBreak/0/gamma rename to tutorials/interFoam/damBreak/0/alpha1 index 742f297443..fcb8a585f3 100644 --- a/tutorials/interFoam/damBreak/0/gamma +++ b/tutorials/interFoam/damBreak/0/alpha1 @@ -10,7 +10,7 @@ FoamFile version 2.0; format ascii; class volScalarField; - object gamma; + object alpha; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -20,29 +20,29 @@ internalField uniform 0; boundaryField { - leftWall + leftWall { type zeroGradient; } - rightWall + rightWall { type zeroGradient; } - lowerWall + lowerWall { type zeroGradient; } - atmosphere + atmosphere { type inletOutlet; inletValue uniform 0; value uniform 0; } - defaultFaces + defaultFaces { type empty; } diff --git a/tutorials/interFoam/damBreak/0/gamma.org b/tutorials/interFoam/damBreak/0/alpha1.org similarity index 90% rename from tutorials/interFoam/damBreak/0/gamma.org rename to tutorials/interFoam/damBreak/0/alpha1.org index 742f297443..fcb8a585f3 100644 --- a/tutorials/interFoam/damBreak/0/gamma.org +++ b/tutorials/interFoam/damBreak/0/alpha1.org @@ -10,7 +10,7 @@ FoamFile version 2.0; format ascii; class volScalarField; - object gamma; + object alpha; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -20,29 +20,29 @@ internalField uniform 0; boundaryField { - leftWall + leftWall { type zeroGradient; } - rightWall + rightWall { type zeroGradient; } - lowerWall + lowerWall { type zeroGradient; } - atmosphere + atmosphere { type inletOutlet; inletValue uniform 0; value uniform 0; } - defaultFaces + defaultFaces { type empty; } diff --git a/tutorials/interFoam/damBreak/constant/polyMesh/boundary b/tutorials/interFoam/damBreak/constant/polyMesh/boundary index 2ade45bf8a..eb22ec5273 100644 --- a/tutorials/interFoam/damBreak/constant/polyMesh/boundary +++ b/tutorials/interFoam/damBreak/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -10,6 +10,7 @@ FoamFile version 2.0; format ascii; class polyBoundaryMesh; + location "constant/polyMesh"; object boundary; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/interFoam/damBreak/constant/turbulenceProperties b/tutorials/interFoam/damBreak/constant/turbulenceProperties new file mode 100644 index 0000000000..11c91f0a1e --- /dev/null +++ b/tutorials/interFoam/damBreak/constant/turbulenceProperties @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/interFoam/damBreak/system/fvSchemes b/tutorials/interFoam/damBreak/system/fvSchemes index bc9ad1d53d..6b8e4385b4 100644 --- a/tutorials/interFoam/damBreak/system/fvSchemes +++ b/tutorials/interFoam/damBreak/system/fvSchemes @@ -23,14 +23,14 @@ gradSchemes { default Gauss linear; grad(U) Gauss linear; - grad(gamma) Gauss linear; + grad(alpha1) Gauss linear; } divSchemes { div(rho*phi,U) Gauss limitedLinearV 1; - div(phi,gamma) Gauss vanLeer; - div(phirb,gamma) Gauss interfaceCompression; + div(phi,alpha) Gauss vanLeer; + div(phirb,alpha) Gauss interfaceCompression; } laplacianSchemes @@ -53,7 +53,7 @@ fluxRequired default no; pd; pcorr; - gamma; + alpha1; } // ************************************************************************* // diff --git a/tutorials/interFoam/damBreak/system/fvSolution b/tutorials/interFoam/damBreak/system/fvSolution index 4c158476b8..57f8292777 100644 --- a/tutorials/interFoam/damBreak/system/fvSolution +++ b/tutorials/interFoam/damBreak/system/fvSolution @@ -47,9 +47,9 @@ PISO momentumPredictor no; nCorrectors 3; nNonOrthogonalCorrectors 0; - nGammaCorr 1; - nGammaSubCycles 2; - cGamma 1; + nAlphaCorr 1; + nAlphaSubCycles 2; + cAlpha 1; } // ************************************************************************* // diff --git a/tutorials/interFoam/damBreak/system/setFieldsDict b/tutorials/interFoam/damBreak/system/setFieldsDict index e7666438bb..8e031272ac 100644 --- a/tutorials/interFoam/damBreak/system/setFieldsDict +++ b/tutorials/interFoam/damBreak/system/setFieldsDict @@ -16,7 +16,7 @@ FoamFile defaultFieldValues ( - volScalarFieldValue gamma 0 + volScalarFieldValue alpha1 0 volVectorFieldValue U (0 0 0) ); @@ -28,7 +28,7 @@ regions fieldValues ( - volScalarFieldValue gamma 1 + volScalarFieldValue alpha1 1 ); } ); diff --git a/tutorials/lesInterFoam/nozzleFlow2D/0/B b/tutorials/interFoam/nozzleFlow2D/0/B similarity index 100% rename from tutorials/lesInterFoam/nozzleFlow2D/0/B rename to tutorials/interFoam/nozzleFlow2D/0/B diff --git a/tutorials/lesInterFoam/nozzleFlow2D/0/U b/tutorials/interFoam/nozzleFlow2D/0/U similarity index 100% rename from tutorials/lesInterFoam/nozzleFlow2D/0/U rename to tutorials/interFoam/nozzleFlow2D/0/U diff --git a/tutorials/lesInterFoam/nozzleFlow2D/0/gamma b/tutorials/interFoam/nozzleFlow2D/0/alpha1 similarity index 91% rename from tutorials/lesInterFoam/nozzleFlow2D/0/gamma rename to tutorials/interFoam/nozzleFlow2D/0/alpha1 index 910ca9d25f..592961a2ce 100644 --- a/tutorials/lesInterFoam/nozzleFlow2D/0/gamma +++ b/tutorials/interFoam/nozzleFlow2D/0/alpha1 @@ -10,7 +10,7 @@ FoamFile version 2.0; format ascii; class volScalarField; - object gamma; + object alpha1; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -25,30 +25,30 @@ boundaryField type empty; } - inlet + inlet { type fixedValue; value uniform 1; } - wall + wall { type zeroGradient; } - atmosphere + atmosphere { type inletOutlet; inletValue uniform 0; value uniform 0; } - front + front { type wedge; } - back + back { type wedge; } diff --git a/tutorials/lesInterFoam/nozzleFlow2D/0/data/Ubulk b/tutorials/interFoam/nozzleFlow2D/0/data/Ubulk similarity index 100% rename from tutorials/lesInterFoam/nozzleFlow2D/0/data/Ubulk rename to tutorials/interFoam/nozzleFlow2D/0/data/Ubulk diff --git a/tutorials/lesInterFoam/nozzleFlow2D/0/data/ptrace b/tutorials/interFoam/nozzleFlow2D/0/data/ptrace similarity index 100% rename from tutorials/lesInterFoam/nozzleFlow2D/0/data/ptrace rename to tutorials/interFoam/nozzleFlow2D/0/data/ptrace diff --git a/tutorials/lesInterFoam/nozzleFlow2D/0/k b/tutorials/interFoam/nozzleFlow2D/0/k similarity index 100% rename from tutorials/lesInterFoam/nozzleFlow2D/0/k rename to tutorials/interFoam/nozzleFlow2D/0/k diff --git a/tutorials/lesInterFoam/nozzleFlow2D/0/nuSgs b/tutorials/interFoam/nozzleFlow2D/0/nuSgs similarity index 100% rename from tutorials/lesInterFoam/nozzleFlow2D/0/nuSgs rename to tutorials/interFoam/nozzleFlow2D/0/nuSgs diff --git a/tutorials/lesInterFoam/nozzleFlow2D/0/nuTilda b/tutorials/interFoam/nozzleFlow2D/0/nuTilda similarity index 100% rename from tutorials/lesInterFoam/nozzleFlow2D/0/nuTilda rename to tutorials/interFoam/nozzleFlow2D/0/nuTilda diff --git a/tutorials/lesInterFoam/nozzleFlow2D/0/pd b/tutorials/interFoam/nozzleFlow2D/0/pd similarity index 100% rename from tutorials/lesInterFoam/nozzleFlow2D/0/pd rename to tutorials/interFoam/nozzleFlow2D/0/pd diff --git a/tutorials/lesInterFoam/nozzleFlow2D/Allclean b/tutorials/interFoam/nozzleFlow2D/Allclean similarity index 100% rename from tutorials/lesInterFoam/nozzleFlow2D/Allclean rename to tutorials/interFoam/nozzleFlow2D/Allclean diff --git a/tutorials/lesInterFoam/nozzleFlow2D/Allrun b/tutorials/interFoam/nozzleFlow2D/Allrun similarity index 96% rename from tutorials/lesInterFoam/nozzleFlow2D/Allrun rename to tutorials/interFoam/nozzleFlow2D/Allrun index 8b76469d5e..8f801cc9ce 100755 --- a/tutorials/lesInterFoam/nozzleFlow2D/Allrun +++ b/tutorials/interFoam/nozzleFlow2D/Allrun @@ -3,7 +3,7 @@ . $WM_PROJECT_DIR/bin/tools/RunFunctions # Get application name from directory -application="lesInterFoam" +application="interFoam" runRefineMesh () { diff --git a/tutorials/lesInterFoam/nozzleFlow2D/constant/LESProperties b/tutorials/interFoam/nozzleFlow2D/constant/LESProperties similarity index 99% rename from tutorials/lesInterFoam/nozzleFlow2D/constant/LESProperties rename to tutorials/interFoam/nozzleFlow2D/constant/LESProperties index dab2d58091..568799d223 100644 --- a/tutorials/lesInterFoam/nozzleFlow2D/constant/LESProperties +++ b/tutorials/interFoam/nozzleFlow2D/constant/LESProperties @@ -16,6 +16,8 @@ FoamFile LESModel oneEqEddy; +turbulence on; + delta smooth; printCoeffs on; diff --git a/tutorials/lesInterFoam/nozzleFlow2D/constant/environmentalProperties b/tutorials/interFoam/nozzleFlow2D/constant/environmentalProperties similarity index 100% rename from tutorials/lesInterFoam/nozzleFlow2D/constant/environmentalProperties rename to tutorials/interFoam/nozzleFlow2D/constant/environmentalProperties diff --git a/tutorials/lesInterFoam/nozzleFlow2D/constant/polyMesh/blockMeshDict b/tutorials/interFoam/nozzleFlow2D/constant/polyMesh/blockMeshDict similarity index 100% rename from tutorials/lesInterFoam/nozzleFlow2D/constant/polyMesh/blockMeshDict rename to tutorials/interFoam/nozzleFlow2D/constant/polyMesh/blockMeshDict diff --git a/tutorials/lesInterFoam/nozzleFlow2D/constant/polyMesh/boundary b/tutorials/interFoam/nozzleFlow2D/constant/polyMesh/boundary similarity index 100% rename from tutorials/lesInterFoam/nozzleFlow2D/constant/polyMesh/boundary rename to tutorials/interFoam/nozzleFlow2D/constant/polyMesh/boundary diff --git a/tutorials/lesInterFoam/nozzleFlow2D/constant/polyMesh/boundary.org b/tutorials/interFoam/nozzleFlow2D/constant/polyMesh/boundary.org similarity index 100% rename from tutorials/lesInterFoam/nozzleFlow2D/constant/polyMesh/boundary.org rename to tutorials/interFoam/nozzleFlow2D/constant/polyMesh/boundary.org diff --git a/tutorials/lesInterFoam/nozzleFlow2D/constant/polyMesh/sets/c0 b/tutorials/interFoam/nozzleFlow2D/constant/polyMesh/sets/c0 similarity index 99% rename from tutorials/lesInterFoam/nozzleFlow2D/constant/polyMesh/sets/c0 rename to tutorials/interFoam/nozzleFlow2D/constant/polyMesh/sets/c0 index ad04177991..e2320b01cf 100644 --- a/tutorials/lesInterFoam/nozzleFlow2D/constant/polyMesh/sets/c0 +++ b/tutorials/interFoam/nozzleFlow2D/constant/polyMesh/sets/c0 @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -10,10 +10,12 @@ FoamFile version 2.0; format ascii; class cellSet; + location "constant/polyMesh/sets"; object c0; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + 7069 ( 10832 diff --git a/tutorials/lesInterFoam/nozzleFlow2D/constant/polyMesh/sets/c0_old b/tutorials/interFoam/nozzleFlow2D/constant/polyMesh/sets/c0_old similarity index 87% rename from tutorials/lesInterFoam/nozzleFlow2D/constant/polyMesh/sets/c0_old rename to tutorials/interFoam/nozzleFlow2D/constant/polyMesh/sets/c0_old index dd82705f59..250a0c6d53 100644 --- a/tutorials/lesInterFoam/nozzleFlow2D/constant/polyMesh/sets/c0_old +++ b/tutorials/interFoam/nozzleFlow2D/constant/polyMesh/sets/c0_old @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -10,10 +10,12 @@ FoamFile version 2.0; format ascii; class topoSet; + location "constant/polyMesh/sets"; object c0_old; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + 0 ( ) diff --git a/tutorials/lesInterFoam/nozzleFlow2D/constant/polyMesh/sets/refinedCells b/tutorials/interFoam/nozzleFlow2D/constant/polyMesh/sets/refinedCells similarity index 99% rename from tutorials/lesInterFoam/nozzleFlow2D/constant/polyMesh/sets/refinedCells rename to tutorials/interFoam/nozzleFlow2D/constant/polyMesh/sets/refinedCells index 9f24995858..383d411db8 100644 --- a/tutorials/lesInterFoam/nozzleFlow2D/constant/polyMesh/sets/refinedCells +++ b/tutorials/interFoam/nozzleFlow2D/constant/polyMesh/sets/refinedCells @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -10,10 +10,12 @@ FoamFile version 2.0; format ascii; class cellSet; + location "1e-08/polyMesh/sets"; object refinedCells; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + 14138 ( 0 diff --git a/tutorials/lesInterFoam/nozzleFlow2D/constant/transportProperties b/tutorials/interFoam/nozzleFlow2D/constant/transportProperties similarity index 100% rename from tutorials/lesInterFoam/nozzleFlow2D/constant/transportProperties rename to tutorials/interFoam/nozzleFlow2D/constant/transportProperties diff --git a/tutorials/interFoam/nozzleFlow2D/constant/turbulenceProperties b/tutorials/interFoam/nozzleFlow2D/constant/turbulenceProperties new file mode 100644 index 0000000000..e53dd92be3 --- /dev/null +++ b/tutorials/interFoam/nozzleFlow2D/constant/turbulenceProperties @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType LESModel; + +// ************************************************************************* // diff --git a/tutorials/lesInterFoam/nozzleFlow2D/system/cellSetDict b/tutorials/interFoam/nozzleFlow2D/system/cellSetDict similarity index 100% rename from tutorials/lesInterFoam/nozzleFlow2D/system/cellSetDict rename to tutorials/interFoam/nozzleFlow2D/system/cellSetDict diff --git a/tutorials/lesInterFoam/nozzleFlow2D/system/cellSetDict.1 b/tutorials/interFoam/nozzleFlow2D/system/cellSetDict.1 similarity index 100% rename from tutorials/lesInterFoam/nozzleFlow2D/system/cellSetDict.1 rename to tutorials/interFoam/nozzleFlow2D/system/cellSetDict.1 diff --git a/tutorials/lesInterFoam/nozzleFlow2D/system/cellSetDict.2 b/tutorials/interFoam/nozzleFlow2D/system/cellSetDict.2 similarity index 100% rename from tutorials/lesInterFoam/nozzleFlow2D/system/cellSetDict.2 rename to tutorials/interFoam/nozzleFlow2D/system/cellSetDict.2 diff --git a/tutorials/lesInterFoam/nozzleFlow2D/system/controlDict b/tutorials/interFoam/nozzleFlow2D/system/controlDict similarity index 100% rename from tutorials/lesInterFoam/nozzleFlow2D/system/controlDict rename to tutorials/interFoam/nozzleFlow2D/system/controlDict diff --git a/tutorials/lesInterFoam/nozzleFlow2D/system/fvSchemes b/tutorials/interFoam/nozzleFlow2D/system/fvSchemes similarity index 93% rename from tutorials/lesInterFoam/nozzleFlow2D/system/fvSchemes rename to tutorials/interFoam/nozzleFlow2D/system/fvSchemes index 40eb2c6513..2d28e02de0 100644 --- a/tutorials/lesInterFoam/nozzleFlow2D/system/fvSchemes +++ b/tutorials/interFoam/nozzleFlow2D/system/fvSchemes @@ -27,8 +27,8 @@ gradSchemes divSchemes { div(rho*phi,U) Gauss linear; - div(phi,gamma) Gauss vanLeer; - div(phirb,gamma) Gauss interfaceCompression; + div(phi,alpha) Gauss vanLeer; + div(phirb,alpha) Gauss interfaceCompression; div(phi,k) Gauss limitedLinear 1; div(phi,B) Gauss limitedLinear 1; div(B) Gauss linear; @@ -57,7 +57,7 @@ fluxRequired default no; pd; pcorr; - gamma; + alpha1; } // ************************************************************************* // diff --git a/tutorials/lesInterFoam/nozzleFlow2D/system/fvSolution b/tutorials/interFoam/nozzleFlow2D/system/fvSolution similarity index 97% rename from tutorials/lesInterFoam/nozzleFlow2D/system/fvSolution rename to tutorials/interFoam/nozzleFlow2D/system/fvSolution index 8aa83e86f6..8d5181515e 100644 --- a/tutorials/lesInterFoam/nozzleFlow2D/system/fvSolution +++ b/tutorials/interFoam/nozzleFlow2D/system/fvSolution @@ -113,9 +113,9 @@ PISO momentumPredictor no; nCorrectors 2; nNonOrthogonalCorrectors 1; - nGammaCorr 1; - nGammaSubCycles 4; - cGamma 2; + nAlphaCorr 1; + nAlphaSubCycles 4; + cAlpha 2; } // ************************************************************************* // diff --git a/tutorials/lesInterFoam/nozzleFlow2D/system/refineMeshDict b/tutorials/interFoam/nozzleFlow2D/system/refineMeshDict similarity index 100% rename from tutorials/lesInterFoam/nozzleFlow2D/system/refineMeshDict rename to tutorials/interFoam/nozzleFlow2D/system/refineMeshDict