diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C index 222aa0ea92a30227c9ecea441d47e6af30aec13f..0f326595454e9d8681ad91b68856f6d949fa0db3 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::volSymmTensorField> Foam::PDRDragModels::basic::Dcu() const { const volScalarField& betav = U_.db().lookupObject<volScalarField>("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::volScalarField> Foam::PDRDragModels::basic::Gk() const { const volScalarField& betav = U_.db().lookupObject<volScalarField>("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 835189da6d15adf109236ff60d167950ec01013e..e7594d177fcf5a22dbbadbfd2b9bd859e9f12c5c 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 19933091a0517bfd983bb935f2acc9d7f15a7a19..4ab797dc20e17f8b2b3809bb70cc2e4cdde6326d 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 0000000000000000000000000000000000000000..35d5b4e617b0920d81e313241fa9eb790eadbe44 --- /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 dd71fa8e53a4f808961209b9fc65895bf9aec1af..594493ce21174d08a69ce0973ae9b5ad232ccb23 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 00be546b6ec747d9cda785d5690ec4846097c6f5..d21267b350af23f6d4db6e7327528a9ce494319d 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 62d0719790270310b7d9b9b3f9dc8e1373f46d40..0000000000000000000000000000000000000000 --- 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 7f55ccc3ed7c907e7147963f6ad0c3a6aeefe903..0000000000000000000000000000000000000000 --- 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 22873bb943a0612b439377636ca2cc2dc0831a57..0000000000000000000000000000000000000000 --- 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 aa1b2f2b09f93e91979f50bbdc0060edc9cb4552..0000000000000000000000000000000000000000 --- 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 8ca5f83e4a33bc0faaabbb07fa18e5e7389d9c7d..0000000000000000000000000000000000000000 --- 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 1ee1e84fd111211f34e7128894b4d77a5d4a715c..0000000000000000000000000000000000000000 --- 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 b5368ae1388b25a062f8753c46dbb9b2f037318a..0000000000000000000000000000000000000000 --- 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 2c8c1447c314e39f212f9ec3aedbe975d1768063..8dbc9ba286f06d3bf8e0e6dd1fb74f6e18dd7bd1 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 0f236a901745d229a82ec9eb84120bd09e1eb76e..db6342297ad28943253de508536462c887b34969 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 a395950ae5b28180460ab73d05d1b40bdbd9f69c..0000000000000000000000000000000000000000 --- 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 0714bf851566d59b556d1fa8350f59128e333046..0000000000000000000000000000000000000000 --- 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<nCorr; corr++) - { - volScalarField rUA = 1.0/UEqn.A(); - - U = rUA*UEqn.H(); - phi = (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, U, phi); - - adjustPhi(phi, U, p); - - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) - { - fvScalarMatrix pEqn - ( - fvm::laplacian(rUA, p) == fvc::div(phi) - ); - - pEqn.setReference(pRefCell, pRefValue); - - if (corr == nCorr-1 && nonOrth == nNonOrthCorr) - { - pEqn.solve(mesh.solver(p.name() + "Final")); - } - else - { - pEqn.solve(mesh.solver(p.name())); - } - - if (nonOrth == nNonOrthCorr) - { - phi -= pEqn.flux(); - } - } - - #include "continuityErrs.H" - - U -= rUA*fvc::grad(p); - U.correctBoundaryConditions(); - } - - 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/pimpleDyMFoam/Make/files b/applications/solvers/incompressible/pimpleDyMFoam/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..c1edb235e6e1a2025d45b3b6bc04395bbeb119bb --- /dev/null +++ b/applications/solvers/incompressible/pimpleDyMFoam/Make/files @@ -0,0 +1,3 @@ +pimpleDyMFoam.C + +EXE = $(FOAM_APPBIN)/pimpleDyMFoam diff --git a/applications/solvers/incompressible/turbDyMFoam/Make/options b/applications/solvers/incompressible/pimpleDyMFoam/Make/options similarity index 68% rename from applications/solvers/incompressible/turbDyMFoam/Make/options rename to applications/solvers/incompressible/pimpleDyMFoam/Make/options index 898b42d16adc81750a17109796a658200617241d..e14eec258502240c625f15cb5870b5b118129af9 100644 --- a/applications/solvers/incompressible/turbDyMFoam/Make/options +++ b/applications/solvers/incompressible/pimpleDyMFoam/Make/options @@ -2,14 +2,16 @@ EXE_INC = \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ + -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -ldynamicFvMesh \ -ldynamicMesh \ -lmeshTools \ - -lincompressibleRASModels \ -lincompressibleTransportModels \ + -lincompressibleRASModels \ + -lincompressibleLESModels \ -lfiniteVolume diff --git a/applications/solvers/incompressible/turbDyMFoam/UEqn.H b/applications/solvers/incompressible/pimpleDyMFoam/UEqn.H similarity index 100% rename from applications/solvers/incompressible/turbDyMFoam/UEqn.H rename to applications/solvers/incompressible/pimpleDyMFoam/UEqn.H diff --git a/applications/solvers/incompressible/icoDyMFoam/correctPhi.H b/applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H similarity index 100% rename from applications/solvers/incompressible/icoDyMFoam/correctPhi.H rename to applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H diff --git a/applications/solvers/incompressible/turbDyMFoam/createFields.H b/applications/solvers/incompressible/pimpleDyMFoam/createFields.H similarity index 89% rename from applications/solvers/incompressible/turbDyMFoam/createFields.H rename to applications/solvers/incompressible/pimpleDyMFoam/createFields.H index 1bbcd330ce1c10730a7f4a1e57621e19176a1b2d..ff3f9c51696c506eb51878d4e8a07b0837b0b89e 100644 --- a/applications/solvers/incompressible/turbDyMFoam/createFields.H +++ b/applications/solvers/incompressible/pimpleDyMFoam/createFields.H @@ -37,9 +37,9 @@ singlePhaseTransportModel laminarTransport(U, phi); - autoPtr<incompressible::RASModel> turbulence + autoPtr<incompressible::turbulenceModel> 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 f34843f1ba2d1bb2be65892cd657b2e92a3c94bb..42aae85309ee0b730e7c08147a4f20ba907b8dce 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; ocorr<nOuterCorr; ocorr++) { - p.storePrevIter(); + if (nOuterCorr != 1) + { + p.storePrevIter(); + } # include "UEqn.H" @@ -112,7 +119,11 @@ int main(int argc, char *argv[]) pEqn.setReference(pRefCell, pRefValue); - if (corr == nCorr-1 && nonOrth == nNonOrthCorr) + if + ( + ocorr == nOuterCorr-1 + && corr == nCorr-1 + && nonOrth == nNonOrthCorr) { pEqn.solve(mesh.solver(p.name() + "Final")); } @@ -143,6 +154,8 @@ int main(int argc, char *argv[]) } } + turbulence->correct(); + 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 8a31f7e5abb705153daf5f003b320fbee11cdf32..d0e8dd740d8754dec86e6d877cfb141e0be13c1d 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 d334e4a31f34ec8ab842bec1cc508b4a4aeb27c1..e4127150c0d8f3ffba6326ab3edd187434f94c98 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<incompressible::RASModel> turbulence +autoPtr<incompressible::turbulenceModel> 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 f3c16142393a5205148221cb7582c81cd5044538..bcc60b7b5e9687b9e7a1dc314dff20365655d814 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<nOuterCorr; oCorr++) { + if (nOuterCorr != 1) + { + p.storePrevIter(); + } + #include "UEqn.H" // --- PISO loop diff --git a/applications/solvers/incompressible/pisoFoam/Make/files b/applications/solvers/incompressible/pisoFoam/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..d9fdfd28ce96551e4189886e2513f1e3965d3b3e --- /dev/null +++ b/applications/solvers/incompressible/pisoFoam/Make/files @@ -0,0 +1,3 @@ +pisoFoam.C + +EXE = $(FOAM_APPBIN)/pisoFoam diff --git a/applications/solvers/incompressible/turbFoam/Make/options b/applications/solvers/incompressible/pisoFoam/Make/options similarity index 54% rename from applications/solvers/incompressible/turbFoam/Make/options rename to applications/solvers/incompressible/pisoFoam/Make/options index e8bf7df237d5845a1a7b087d6a92cbd3273f09a5..419f1ffcbab4ac08ac3eb10937a66ce49e355dd3 100644 --- a/applications/solvers/incompressible/turbFoam/Make/options +++ b/applications/solvers/incompressible/pisoFoam/Make/options @@ -1,10 +1,12 @@ EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels/RAS \ + -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -lincompressibleRASModels \ + -lincompressibleLESModels \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools diff --git a/applications/solvers/incompressible/oodles/createFields.H b/applications/solvers/incompressible/pisoFoam/createFields.H similarity index 85% rename from applications/solvers/incompressible/oodles/createFields.H rename to applications/solvers/incompressible/pisoFoam/createFields.H index 7099762cc2fbd844e4588b22da0cdd16fa6dc44c..7cae304f6f6d018824d5dba8ebbf3598fff7c3ad 100644 --- a/applications/solvers/incompressible/oodles/createFields.H +++ b/applications/solvers/incompressible/pisoFoam/createFields.H @@ -12,7 +12,6 @@ mesh ); - Info<< "Reading field U\n" << endl; volVectorField U ( @@ -37,7 +36,7 @@ singlePhaseTransportModel laminarTransport(U, phi); - autoPtr<incompressible::LESModel> sgsModel + autoPtr<incompressible::turbulenceModel> 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 d32ee3be691317dc9a239c847a984be989a0b010..1c8a534db274a5c29ad19dd2077f0967422ae5bf 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 8a31f7e5abb705153daf5f003b320fbee11cdf32..a3c8f75dee3d810ad18e185f8acef0c0007c84ec 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 7c378fe8ff714f44ddb56f898968fa607d986850..4a0c5c4bd48827b52bb3d499e8c854b0abdd3485 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 5297b027d053cbf596a8ffced12631c542d57f69..0000000000000000000000000000000000000000 --- 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 493c4e09297dda164af75b9c29b846be3ccf68e8..0000000000000000000000000000000000000000 --- a/applications/solvers/incompressible/turbDyMFoam/correctPhi.H +++ /dev/null @@ -1,44 +0,0 @@ -{ - wordList pcorrTypes(p.boundaryField().types()); - - for (label i=0; i<p.boundaryField().size(); i++) - { - if(p.boundaryField()[i].fixesValue()) - { - pcorrTypes[i] = fixedValueFvPatchScalarField::typeName; - } - } - - volScalarField pcorr - ( - IOobject - ( - "pcorr", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimensionedScalar("pcorr", p.dimensions(), 0.0), - pcorrTypes - ); - - for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) - { - fvScalarMatrix pcorrEqn - ( - fvm::laplacian(rAU, pcorr) == fvc::div(phi) - ); - - pcorrEqn.setReference(pRefCell, pRefValue); - pcorrEqn.solve(); - - if (nonOrth == nNonOrthCorr) - { - phi -= pcorrEqn.flux(); - } - } -} - -#include "continuityErrs.H" diff --git a/applications/solvers/incompressible/turbDyMFoam/readControls.H b/applications/solvers/incompressible/turbDyMFoam/readControls.H deleted file mode 100644 index 9336616a1bec863a01212696f321470026eeff91..0000000000000000000000000000000000000000 --- a/applications/solvers/incompressible/turbDyMFoam/readControls.H +++ /dev/null @@ -1,14 +0,0 @@ -# include "readTimeControls.H" -# include "readPISOControls.H" - - bool correctPhi = false; - 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/incompressible/turbDyMFoam/turbDyMFoam.C b/applications/solvers/incompressible/turbDyMFoam/turbDyMFoam.C deleted file mode 100644 index a37622f6b3df77e9f99a8272624ad95857db4177..0000000000000000000000000000000000000000 --- a/applications/solvers/incompressible/turbDyMFoam/turbDyMFoam.C +++ /dev/null @@ -1,163 +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 - turbDyMFoam - -Description - Transient solver for incompressible, turbulent flow of Newtonian fluids - with moving mesh. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/RASModel/RASModel.H" -#include "dynamicFvMesh.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - -# include "setRootCase.H" - -# include "createTime.H" -# include "createDynamicFvMesh.H" -# include "readPISOControls.H" -# include "initContinuityErrs.H" -# include "createFields.H" -# include "readTimeControls.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { -# include "readControls.H" -# include "CourantNo.H" - - p.storePrevIter(); - - // Make the fluxes absolute - fvc::makeAbsolute(phi, U); - -# include "setDeltaT.H" - - runTime++; - - Info<< "Time = " << runTime.timeName() << nl << endl; - - bool meshChanged = mesh.update(); - - if (correctPhi && meshChanged) - { -# include "correctPhi.H" - } - - // Make the fluxes relative to the mesh motion - fvc::makeRelative(phi, U); - - if (meshChanged && checkMeshCourantNo) - { -# include "meshCourantNo.H" - } - - // --- PIMPLE loop - for (int ocorr=0; ocorr<nOuterCorr; ocorr++) - { -# include "UEqn.H" - - // --- PISO loop - for (int corr=0; corr<nCorr; corr++) - { - rAU = 1.0/UEqn.A(); - - U = rAU*UEqn.H(); - phi = (fvc::interpolate(U) & mesh.Sf()); - //+ fvc::ddtPhiCorr(rAU, U, phi); - - adjustPhi(phi, U, p); - - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) - { - fvScalarMatrix pEqn - ( - fvm::laplacian(rAU, p) == fvc::div(phi) - ); - - pEqn.setReference(pRefCell, pRefValue); - - if - ( - ocorr == nOuterCorr-1 - && corr == nCorr-1 - && nonOrth == nNonOrthCorr) - { - pEqn.solve(mesh.solver(p.name() + "Final")); - } - else - { - pEqn.solve(mesh.solver(p.name())); - } - - if (nonOrth == nNonOrthCorr) - { - phi -= pEqn.flux(); - } - } - -# include "continuityErrs.H" - - // Explicitly relax pressure for momentum corrector - if (ocorr != nOuterCorr-1) - { - p.relax(); - } - - // Make the fluxes relative to the mesh motion - fvc::makeRelative(phi, U); - - U -= rAU*fvc::grad(p); - U.correctBoundaryConditions(); - } - } - - turbulence->correct(); - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return(0); -} - - -// ************************************************************************* // diff --git a/applications/solvers/incompressible/turbFoam/Make/files b/applications/solvers/incompressible/turbFoam/Make/files deleted file mode 100644 index c3d6346165f84d970dbd27ead0e0d812ffd38a49..0000000000000000000000000000000000000000 --- 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 8bcbfe7a75e9c31fa28f50c5393ed7d24887e131..0000000000000000000000000000000000000000 --- 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<incompressible::RASModel> 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 0000000000000000000000000000000000000000..832391f03f07431725448405fcc96cce26318037 --- /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 a694ac21793d0dd9ec9b12747cef7f8de9e9d066..9cb749d63c1f5fe2cbfb1a83cff5a62049e4373a 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 374e410c2e03793b8f2eaab26df890df4e333764..11eaf617bc659982773b64e54f862bf715927b12 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 2ad2dfb04fcc89627a9c3c4f7e0309c0b15af2c1..36ced22ada63b82d70ae49e593a37318c4067af6 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; outerCorr<nOuterCorr; outerCorr++) { # include "rhoEqn.H" @@ -78,6 +78,8 @@ int main(int argc, char *argv[]) } } + turbulence->correct(); + 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 37ff01d41f6101fb7723cc3ee5f425573e419c6d..dc2f5e696129edaac8b20e59effedc957c975a24 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<incompressible::RASModel> turbulence + // Create incompressible turbulence model + autoPtr<incompressible::turbulenceModel> 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 0000000000000000000000000000000000000000..121264b1a93bb8cceb65acf687471b2231fcbabd --- /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 0000000000000000000000000000000000000000..13d31339e47338b7f5c46d3551b5906b82b204f2 --- /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 089591736773862c21899dfc34679e0166748b83..90033f9826fa037c0d626e2b7f9e4aa5b2fa0ba3 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 c52dce96900965eefc1571d18fda1aa6ed714c84..e161a3cbe6b2ea9eb48eeca600982f0a4cc3492f 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 33e85efd4b6eb7fc77b9f9832554cc252f4afa31..11a180957567674655948c692551189aaf2a908f 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(); + + if (mesh.changing()) + { + Info<< "Execution time for mesh.update() = " + << runTime.elapsedCpuTime() - timeBeforeMeshUpdate + << " s" << endl; + + gh = g & mesh.C(); + ghf = g & mesh.Cf(); + } - // --- PISO loop - for (int corr=0; corr < nCorr; corr++) + if (mesh.changing() && correctPhi) { - #include "pEqn.H" + //***HGW#include "correctPhi.H" } - #include "continuityErrs.H" + // Make the fluxes relative to the mesh motion + fvc::makeRelative(phi, U); - p = pd + rho*gh; + if (mesh.changing() && checkMeshCourantNo) + { + #include "meshCourantNo.H" + } turbulence->correct(); + // --- Outer-corrector loop + for (int oCorr=0; oCorr<nOuterCorr; oCorr++) + { + #include "alphaEqnsSubCycle.H" + + solve(fvm::ddt(rho) + fvc::div(rhoPhi)); + + #include "UEqn.H" + + // --- PISO loop + for (int corr=0; corr<nCorr; corr++) + { + #include "pEqn.H" + } + } + + rho = alpha1*rho1 + alpha2*rho2; + runTime.write(); - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; + Info<< "ExecutionTime = " + << runTime.elapsedCpuTime() + << " s\n\n" << endl; } Info<< "End\n" << endl; diff --git a/applications/solvers/multiphase/compressibleLesInterFoam/createFields.H b/applications/solvers/multiphase/compressibleInterDyMFoam/createFields.H similarity index 94% rename from applications/solvers/multiphase/compressibleLesInterFoam/createFields.H rename to applications/solvers/multiphase/compressibleInterDyMFoam/createFields.H index 6fa5049de47edfa4053792ba6015990e627e1a36..1f579d245bdcac21f647ac2a90a516b5f612b3c9 100644 --- a/applications/solvers/multiphase/compressibleLesInterFoam/createFields.H +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/createFields.H @@ -145,8 +145,8 @@ // Construct interface from alpha1 distribution interfaceProperties interface(alpha1, U, twoPhaseProperties); - // Construct LES model - autoPtr<incompressible::LESModel> turbulence + // Construct incompressible turbulence model + autoPtr<incompressible::turbulenceModel> 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 0000000000000000000000000000000000000000..013d8eb05f7e341ee0c8bf9fc5f1511e8d9c6dc6 --- /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<fvScalarMatrix> 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 0000000000000000000000000000000000000000..a2e4ef3747f5e90cf13fcc16d721275040144869 --- /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 0000000000000000000000000000000000000000..de5437219c00fd0ec616736c21ad3b570b7d9f5e --- /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 45e4e10f670cd864e3619f1cd6920ac748b57849..9412e3e3748f0e24ba4291cbc87e2fa150b702c4 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 c627f04d176380be8eba3c4524cdf4f4c4c71184..528e0aaafd892c2995fa94848c0d59b66af41942 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 0000000000000000000000000000000000000000..819cd0f538b6a87d0448618482caf75c52e3c793 --- /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<nAlphaCorr; gCorr++) + { + volScalarField::DimensionedInternalField Sp + ( + IOobject + ( + "Sp", + runTime.timeName(), + mesh + ), + mesh, + dimensionedScalar("Sp", dgdt.dimensions(), 0.0) + ); + + volScalarField::DimensionedInternalField Su + ( + IOobject + ( + "Su", + runTime.timeName(), + mesh + ), + // Divergence term is handled explicitly to be + // consistent with the explicit transport solution + divU*min(alpha1, scalar(1)) + ); + + forAll(dgdt, celli) + { + if (dgdt[celli] > 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 0000000000000000000000000000000000000000..89ba7a4e7577e98b0e04fd99cb39bd3af711c68b --- /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<volScalarField> 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 6280b4293cfc395169192d3b09fb6ac49edd1821..a48fd6b5d39694dbbd6130f21acc58a9bbdd9c81 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; oCorr<nOuterCorr; oCorr++) { @@ -89,6 +88,8 @@ int main(int argc, char *argv[]) rho = alpha1*rho1 + alpha2*rho2; + turbulence->correct(); + 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 0000000000000000000000000000000000000000..1f579d245bdcac21f647ac2a90a516b5f612b3c9 --- /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<incompressible::turbulenceModel> 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 05dafae8b1b49f07062d873d376b5de966702c8d..0000000000000000000000000000000000000000 --- 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 6755d5bc592ade8a72508a181f567055f99b558b..74498326a9b50323fabc5c29781578d8aaec8e2e 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 ab58050ed0c61802baf7af3410798ad5193159d4..0f1efe717f535961d11b57db5099f4caea932854 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<incompressible::RASModel> turbulence + // Construct incompressible turbulence model + autoPtr<incompressible::turbulenceModel> 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 915fee9a9737857830b45e27ed40f68682960cf1..0ea32adcc8bbb3eed802540cf594e653cda86826 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 c6961f6c22c3e2be738c1ae4de1226fa431deb0b..f8ff18f60631c3cd66f02a8b9b4e8adc5ceb19e9 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 ae5ccba0fd97de10dda33a8bc171099e8dc021ff..0e21fc2d6423b4febd7dc39a0973924b33bf6446 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 217a9c39778f3bab6f7d7c425bb0c455406bf880..ade1b8e7f3518e713918601628f7b9b7d7dd98bb 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 e585f3cab177aa12092b3d0c07e3bcc67e81e7dd..528e0aaafd892c2995fa94848c0d59b66af41942 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 0000000000000000000000000000000000000000..3bf24a845efadf9f66af09ba27e379859a7b3c14 --- /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<nAlphaCorr; gCorr++) + { + surfaceScalarField phiAlpha = + fvc::flux + ( + phi, + alpha1, + alphaScheme + ) + + fvc::flux + ( + -fvc::flux(-phir, scalar(1) - alpha1, alpharScheme), + alpha1, + alpharScheme + ); + + MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0); + + rhoPhi = phiAlpha*(rho1 - rho2) + phi*rho2; + } + + Info<< "Liquid phase volume fraction = " + << alpha1.weightedAverage(mesh.V()).value() + << " Min(alpha1) = " << min(alpha1).value() + << " Max(alpha1) = " << max(alpha1).value() + << endl; +} diff --git a/applications/solvers/multiphase/interFoam/alphaEqnSubCycle.H b/applications/solvers/multiphase/interFoam/alphaEqnSubCycle.H new file mode 100644 index 0000000000000000000000000000000000000000..9aae37a8bef50329d7e2b4cac649219d48dcc707 --- /dev/null +++ b/applications/solvers/multiphase/interFoam/alphaEqnSubCycle.H @@ -0,0 +1,35 @@ +label nAlphaCorr +( + readLabel(piso.lookup("nAlphaCorr")) +); + +label nAlphaSubCycles +( + readLabel(piso.lookup("nAlphaSubCycles")) +); + +if (nAlphaSubCycles > 1) +{ + dimensionedScalar totalDeltaT = runTime.deltaT(); + surfaceScalarField rhoPhiSum = 0.0*rhoPhi; + + for + ( + subCycle<volScalarField> 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 887bcbdead1a56701f879de1d94aafdf4da40463..af349d79174e164e50dca3d8d48b49b0f8c1349a 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<incompressible::turbulenceModel> 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 8978d1d2930593d8e20b1fb6ec52399334ffb9a9..0000000000000000000000000000000000000000 --- 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<nGammaCorr; gCorr++) - { - surfaceScalarField phiGamma = - fvc::flux - ( - phi, - gamma, - gammaScheme - ) - + fvc::flux - ( - -fvc::flux(-phir, scalar(1) - gamma, gammarScheme), - gamma, - gammarScheme - ); - - MULES::explicitSolve(gamma, phi, phiGamma, 1, 0); - - rhoPhi = phiGamma*(rho1 - rho2) + phi*rho2; - } - - Info<< "Liquid phase volume fraction = " - << gamma.weightedAverage(mesh.V()).value() - << " Min(gamma) = " << min(gamma).value() - << " Max(gamma) = " << max(gamma).value() - << endl; -} diff --git a/applications/solvers/multiphase/interFoam/gammaEqnSubCycle.H b/applications/solvers/multiphase/interFoam/gammaEqnSubCycle.H deleted file mode 100644 index f762bac8ca7df5af785c8307f37dbf0cbbcebf5c..0000000000000000000000000000000000000000 --- a/applications/solvers/multiphase/interFoam/gammaEqnSubCycle.H +++ /dev/null @@ -1,35 +0,0 @@ -label nGammaCorr -( - readLabel(piso.lookup("nGammaCorr")) -); - -label nGammaSubCycles -( - readLabel(piso.lookup("nGammaSubCycles")) -); - -if (nGammaSubCycles > 1) -{ - dimensionedScalar totalDeltaT = runTime.deltaT(); - surfaceScalarField rhoPhiSum = 0.0*rhoPhi; - - for - ( - subCycle<volScalarField> 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 b7f4f0ada56d2a2c1d9f155def3077c4061902ca..1286a16d62704acd9d645702efb564ec4a414017 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 77256a8e2fdddf1fa76037b0fcb139cdf85696af..e5afbb8e4f24606318afe045faac8554960b04e5 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 fa6943e580b322ca8892655081bfe4448f634122..24e523f2496bbf2c588af4dce0eecdf770418d6d 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 fefdeb41c30db3c70841c3630a00f4ecf42970fb..f020863077b7b9678a76af75d3249fe860280098 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 0186948920bfdf9fce37c902ee68bbbef6dc4799..15a5291ee63596e75b32ed0b4459b7390d601e88 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<nGammaCorr; gCorr++) + for (int gCorr=0; gCorr<nAlphaCorr; gCorr++) { - surfaceScalarField phiGamma = + surfaceScalarField phiAlpha = fvc::flux ( phi, - gamma, - gammaScheme + alpha1, + alphaScheme ) + fvc::flux ( - -fvc::flux(-phir, scalar(1) - gamma, gammarScheme), - gamma, - gammarScheme + -fvc::flux(-phir, scalar(1) - alpha1, alpharScheme), + alpha1, + alpharScheme ); Pair<tmp<volScalarField> > 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 c6355d6fb0b9ce882c5c3e904df1ecb8842dbe9c..dd1d828030fa10b1e607e0081cb0b2fae02aba31 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<volScalarField> gammaSubCycle(gamma, nGammaSubCycles); - !(++gammaSubCycle).end(); + subCycle<volScalarField> 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 9e9c68a89075cebe558f42ba5d2f9e8012f8400b..5e727dea3eca4828580cadaf9a10531a7719fd62 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<phaseChangeTwoPhaseMixture> 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<incompressible::LESModel> turbulence + // Construct incompressible turbulence model + autoPtr<incompressible::turbulenceModel> 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 bb6f1133ceec462285eb02d39a9340437f09d08c..f7c8aa72502ecf6931518bafa2aacc14de3f6649 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 3a7f7e4ebcd00d8b3df2ad966ee3f0a7820e0f52..0037d71cf52ce5dd50dd298767b27987d4e03e38 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 0cbc33c52e30842e14d6706e9db18fb5d404d2e0..a2db01643ae827a5d7c1b6adba88edeb6276e25f 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 b577562e27b3351555e02b8090f232d4e13a31b4..0000000000000000000000000000000000000000 --- 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 91833c1365820ef6d68fe5c2c52bb469af717517..0000000000000000000000000000000000000000 --- 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 73033ddfaa4881d69495276701f9195d8cc62ce9..0000000000000000000000000000000000000000 --- 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 d2e19bcae8905ed27ba220f9443e5b5146bd3322..0000000000000000000000000000000000000000 --- 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<barotropicCompressibilityModel> 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<incompressible::LESModel> 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 db9cb56991d06d954bae25e0011f0beef159fae2..0000000000000000000000000000000000000000 --- 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<scalar>::lookupOrAddToDict - ( - "ck", - coeffDict(), - 0.07 - ) - ) -{ - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void devOneEqEddy::correct(const tmp<volTensorField>& 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 40039bd1a7d334740ae1f7d706a803fd664af549..0000000000000000000000000000000000000000 --- 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 43c523e2203c09617871967797c56f3620d3294d..0000000000000000000000000000000000000000 --- 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 1bf56f02dd133b48c59a33c57ab8b687858d554c..0000000000000000000000000000000000000000 --- 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 c622be15611318d38b9509cd70c38fc84ef00269..0000000000000000000000000000000000000000 --- 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<incompressible::LESModel> 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 8d109f03b39d7463bbe9ee691b94f70e0d831d0a..0000000000000000000000000000000000000000 --- 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 cd906bfa53ea19b9cb0c541065247dbdab412b4b..1fc821726c9c4e0e9710d90f77a366ec7d7519fb 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 43cc2cb183afdbbd179abf7a35a51d579910a0fe..5ce0c0c08847df8fd9b99161e8feb3962b3006bf 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 4f71f75ba487c91fb4e5429d1a54d997446d10eb..aa62d0f2a177af49e20ed3cb49ce9ba605029037 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<incompressible::turbulenceModel> turbulence + ( + incompressible::turbulenceModel::New(U, phi, mixture) + ); diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C index 5dd13984bf9dd6407abe30ac932887b2f5389350..edd2bca88091ac03521378b55deda7f45d799b22 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; corr<nCorr; corr++) { -# include "pEqn.H" + #include "pEqn.H" } -# include "continuityErrs.H" + #include "continuityErrs.H" + + p = pd + rho*gh; + + turbulence->correct(); runTime.write(); diff --git a/applications/solvers/multiphase/rasCavitatingFoam/CourantNo.H b/applications/solvers/multiphase/rasCavitatingFoam/CourantNo.H deleted file mode 100644 index 014944e191f2d316a11b52d9e5cf3ecb8464fd96..0000000000000000000000000000000000000000 --- 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 45094637969e3d8f9f90293ccdb7f9614bec9b03..0000000000000000000000000000000000000000 --- 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 6f1622510f63b07d18cbd86bea94ee378bdba4f4..0000000000000000000000000000000000000000 --- 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 b259ddd3222ff00fe49a83854a1bcae1e84ba240..0000000000000000000000000000000000000000 --- 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 c9382dfc0fb95f3cb59f2d510cad407c4757d8c8..0000000000000000000000000000000000000000 --- 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 51d2a31dde25abc765fe1a7e9236e849cd119706..0000000000000000000000000000000000000000 --- 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; outerCorr<nOuterCorr; outerCorr++) - { -# include "rhoEqn.H" -# include "gammaPsi.H" -# include "UEqn.H" - - for (int corr=0; corr<nCorr; corr++) - { -# include "pEqn.H" - } - } - - turbulence->correct(); - - 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 f53e7b9eb1cf63f2ca57abe6b63c441243400647..0000000000000000000000000000000000000000 --- 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 d3fbb9307aa853f5123b03f25290b208bc0cee7c..0000000000000000000000000000000000000000 --- 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 e7d0c2f93eafbb50cbadbef8f56300b0e73db919..0000000000000000000000000000000000000000 --- 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<calculatedFvsPatchScalarField>(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 7e8b040bb6e4f52e22745936d2775060cfa048be..0000000000000000000000000000000000000000 --- 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<calculatedFvsPatchScalarField>(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 d0bd6e1dad3e5c5edfd50b4eca846aa467ad85fd..0000000000000000000000000000000000000000 --- 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 012a5276e8cd64f8eb409496b9f0c1a85b1b6d24..0000000000000000000000000000000000000000 --- 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 237cacd05a2d6c46af760358e1eb2fada271f672..0000000000000000000000000000000000000000 --- 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 39b992ad4db735ea12674a9c6c9fafae71ff694c..0000000000000000000000000000000000000000 --- 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 04a3c57887c6c189dd005b3a86f50e570162fef2..0000000000000000000000000000000000000000 --- 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 e97a3abcb09cb52e0c407bf87a6dad94cf68291a..0000000000000000000000000000000000000000 --- 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<incompressible::RASModel> turbulence - ( - incompressible::RASModel::New(U, phi, twoPhaseProperties) - ); diff --git a/applications/solvers/multiphase/settlingFoam/UEqn.H b/applications/solvers/multiphase/settlingFoam/UEqn.H index 8dba5041c29eb08e2ae34d00410259ac616fade5..ac4c18ab19dc4b70fe0770f23e0a24bc4af3eebd 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 ae5ccba0fd97de10dda33a8bc171099e8dc021ff..0e21fc2d6423b4febd7dc39a0973924b33bf6446 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 0ebaec44f581723d0080ac1814c74f774bb796d9..5a945697caa2ffa30846b7fc1831c8b92dbde7fb 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 0000000000000000000000000000000000000000..c12602536870ab39e1a63a81062b143d5d360c00 --- /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 652d1ad64c49713e5a665b242423dc18669cd388..bd7c3e2c9ff9515e3c0e1d4a2501de200c9f7083 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<incompressible::turbulenceModel> 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 144339f39898be1dc30de182c9c75faecca415ad..0000000000000000000000000000000000000000 --- 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 64895530f6c2838b88e3d2cf559dde78ed68d3d0..7f9b32a917d11ef3bfd63d013e150a2b8fee9bab 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 ee7bca21f473ddc6a936bb5b20499b4c83bb6899..d114749b1cd394177f9fa791b289ca92915e2060 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 ef85d72f629a1487b910d946da7e9df2bd444841..f06687625383376e07eaa7bd14d83e75cd1ca253 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 56f21e91b1c9cee342b5628712a81a020513cbb7..a62008cee873bef20e833be5c2cb8972e76213be 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 e4862424a4dcafae220a015f08eae164ebbd9a51..b11bbd83cf9f0235bac8ffb91a95ac2ee320f839 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<scalar, volMesh>& iF @@ -50,9 +49,9 @@ gammaContactAngleFvPatchScalarField::gammaContactAngleFvPatchScalarField {} -gammaContactAngleFvPatchScalarField::gammaContactAngleFvPatchScalarField +Foam::alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField ( - const gammaContactAngleFvPatchScalarField& gcpsf, + const alphaContactAngleFvPatchScalarField& gcpsf, const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, const fvPatchFieldMapper& mapper @@ -62,7 +61,7 @@ gammaContactAngleFvPatchScalarField::gammaContactAngleFvPatchScalarField {} -gammaContactAngleFvPatchScalarField::gammaContactAngleFvPatchScalarField +Foam::alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField ( const fvPatch& p, const DimensionedField<scalar, volMesh>& 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<scalar, volMesh>& 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 6b90d838e1acbf6a2397c13505669241fb50da0b..4036f8cb695a1d58c0530f8d6edf9a5b2a305424 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<scalar, volMesh>& ); //- Construct from patch, internal field and dictionary - gammaContactAngleFvPatchScalarField + alphaContactAngleFvPatchScalarField ( const fvPatch&, const DimensionedField<scalar, volMesh>&, 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<scalar, volMesh>&, 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<scalar, volMesh>& ); 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 d13c0c0c058e1d992a5ce710c1779fe4e6dc60ef..bf80fd79bde2c9438f3e406d09e6d5c812be1927 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<scalar, volMesh>& 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<scalar, volMesh>& 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<scalar, volMesh>& 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<scalar, volMesh>& iF ) : - gammaContactAngleFvPatchScalarField(gcpsf, iF), + alphaContactAngleFvPatchScalarField(gcpsf, iF), theta0_(gcpsf.theta0_) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp<scalarField> constantGammaContactAngleFvPatchScalarField::theta +Foam::tmp<Foam::scalarField> +Foam::constantAlphaContactAngleFvPatchScalarField::theta ( const fvPatchVectorField&, const fvsPatchVectorField& @@ -112,7 +108,10 @@ tmp<scalarField> 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 d941402ec10330049afc7b9f9583f74784e2d84e..d81c115bd717d330b7530195a785479e5a3aea67 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<scalar, volMesh>& ); //- Construct from patch, internal field and dictionary - constantGammaContactAngleFvPatchScalarField + constantAlphaContactAngleFvPatchScalarField ( const fvPatch&, const DimensionedField<scalar, volMesh>&, @@ -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<scalar, volMesh>&, const fvPatchFieldMapper& ); //- Construct as copy - constantGammaContactAngleFvPatchScalarField + constantAlphaContactAngleFvPatchScalarField ( - const constantGammaContactAngleFvPatchScalarField& + const constantAlphaContactAngleFvPatchScalarField& ); //- Construct and return a clone @@ -103,14 +103,14 @@ public: { return tmp<fvPatchScalarField> ( - new constantGammaContactAngleFvPatchScalarField(*this) + new constantAlphaContactAngleFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - constantGammaContactAngleFvPatchScalarField + constantAlphaContactAngleFvPatchScalarField ( - const constantGammaContactAngleFvPatchScalarField&, + const constantAlphaContactAngleFvPatchScalarField&, const DimensionedField<scalar, volMesh>& ); @@ -122,7 +122,7 @@ public: { return tmp<fvPatchScalarField> ( - 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 e96567115077f440755145937710d29d16290ad7..8c2009f6d01a32e48f36aed60b6b82ee5b6488d9 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<scalar, volMesh>& 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<scalar, volMesh>& 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<scalar, volMesh>& 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<scalar, volMesh>& 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::scalarField> -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 9e730c6f74ff166fcfe39549121d38c3cbef6156..6c3d16965d8662a6c61bae369432006cfd5dc29f 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<scalar, volMesh>& ); //- Construct from patch, internal field and dictionary - dynamicGammaContactAngleFvPatchScalarField + dynamicAlphaContactAngleFvPatchScalarField ( const fvPatch&, const DimensionedField<scalar, volMesh>&, @@ -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<scalar, volMesh>&, const fvPatchFieldMapper& ); //- Construct as copy - dynamicGammaContactAngleFvPatchScalarField + dynamicAlphaContactAngleFvPatchScalarField ( - const dynamicGammaContactAngleFvPatchScalarField& + const dynamicAlphaContactAngleFvPatchScalarField& ); //- Construct and return a clone @@ -112,14 +112,14 @@ public: { return tmp<fvPatchScalarField> ( - new dynamicGammaContactAngleFvPatchScalarField(*this) + new dynamicAlphaContactAngleFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - dynamicGammaContactAngleFvPatchScalarField + dynamicAlphaContactAngleFvPatchScalarField ( - const dynamicGammaContactAngleFvPatchScalarField&, + const dynamicAlphaContactAngleFvPatchScalarField&, const DimensionedField<scalar, volMesh>& ); @@ -131,7 +131,7 @@ public: { return tmp<fvPatchScalarField> ( - 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 0f43629851934ab3753194f8790b73391fe5f9c7..ff9d7210c51262c73265dd39d0a76252b942dfd0 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<scalar, volMesh>& 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<scalar, volMesh>& 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<scalar, volMesh>& 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<scalar, volMesh>& iF ) : - gammaContactAngleFvPatchScalarField(gcpsf, iF), + alphaContactAngleFvPatchScalarField(gcpsf, iF), t0_(gcpsf.t0_), thetaT0_(gcpsf.thetaT0_), te_(gcpsf.te_), @@ -104,7 +99,8 @@ timeVaryingGammaContactAngleFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp<scalarField> timeVaryingGammaContactAngleFvPatchScalarField::theta +Foam::tmp<Foam::scalarField> +Foam::timeVaryingAlphaContactAngleFvPatchScalarField::theta ( const fvPatchVectorField&, const fvsPatchVectorField& @@ -130,7 +126,10 @@ tmp<scalarField> 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 e07637471b0ac0f02aec154afc0af26035a016f0..a2a071357e4414c72b7f881caa3a64cfe84748f5 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<scalar, volMesh>& ); //- Construct from patch, internal field and dictionary - timeVaryingGammaContactAngleFvPatchScalarField + timeVaryingAlphaContactAngleFvPatchScalarField ( const fvPatch&, const DimensionedField<scalar, volMesh>&, 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<scalar, volMesh>&, const fvPatchFieldMapper& @@ -99,14 +99,14 @@ public: { return tmp<fvPatchScalarField> ( - new timeVaryingGammaContactAngleFvPatchScalarField(*this) + new timeVaryingAlphaContactAngleFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - timeVaryingGammaContactAngleFvPatchScalarField + timeVaryingAlphaContactAngleFvPatchScalarField ( - const timeVaryingGammaContactAngleFvPatchScalarField&, + const timeVaryingAlphaContactAngleFvPatchScalarField&, const DimensionedField<scalar, volMesh>& ); @@ -118,7 +118,7 @@ public: { return tmp<fvPatchScalarField> ( - 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 aa9637b99335bc819fbf74053c6e9d25db1ac8ff..85d7f4710595af21390c130ac0a14336fdb3c0c0 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<scalar, volMesh>& iF @@ -48,9 +44,10 @@ gammaFixedPressureFvPatchScalarField::gammaFixedPressureFvPatchScalarField {} -gammaFixedPressureFvPatchScalarField::gammaFixedPressureFvPatchScalarField +Foam::alphaFixedPressureFvPatchScalarField:: +alphaFixedPressureFvPatchScalarField ( - const gammaFixedPressureFvPatchScalarField& ptf, + const alphaFixedPressureFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, const fvPatchFieldMapper& mapper @@ -61,7 +58,8 @@ gammaFixedPressureFvPatchScalarField::gammaFixedPressureFvPatchScalarField {} -gammaFixedPressureFvPatchScalarField::gammaFixedPressureFvPatchScalarField +Foam::alphaFixedPressureFvPatchScalarField:: +alphaFixedPressureFvPatchScalarField ( const fvPatch& p, const DimensionedField<scalar, volMesh>& 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<scalar, volMesh>& 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<const gammaFixedPressureFvPatchScalarField>(ptf); + const alphaFixedPressureFvPatchScalarField& tiptf = + refCast<const alphaFixedPressureFvPatchScalarField>(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 e7c360b6bcc6bd691586b5a59ead685507479fa7..1a7200b1ce4724c6ed14da60df490ffce16074bc 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<scalar, volMesh>& ); //- Construct from patch, internal field and dictionary - gammaFixedPressureFvPatchScalarField + alphaFixedPressureFvPatchScalarField ( const fvPatch&, const DimensionedField<scalar, volMesh>&, 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<scalar, volMesh>&, const fvPatchFieldMapper& ); //- Construct as copy - gammaFixedPressureFvPatchScalarField + alphaFixedPressureFvPatchScalarField ( - const gammaFixedPressureFvPatchScalarField& + const alphaFixedPressureFvPatchScalarField& ); //- Construct and return a clone @@ -101,14 +101,14 @@ public: { return tmp<fvPatchScalarField> ( - new gammaFixedPressureFvPatchScalarField(*this) + new alphaFixedPressureFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - gammaFixedPressureFvPatchScalarField + alphaFixedPressureFvPatchScalarField ( - const gammaFixedPressureFvPatchScalarField&, + const alphaFixedPressureFvPatchScalarField&, const DimensionedField<scalar, volMesh>& ); @@ -120,7 +120,7 @@ public: { return tmp<fvPatchScalarField> ( - 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 2cf5fff1a3d2b9e358c719d62a93e697d3da38b0..4e3fb21ddca5985b9171696d1482c0209af5003d 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<gammaContactAngleFvPatchScalarField>(gbf[patchi])) + if (isA<alphaContactAngleFvPatchScalarField>(gbf[patchi])) { - const gammaContactAngleFvPatchScalarField& gcap = - refCast<const gammaContactAngleFvPatchScalarField> + const alphaContactAngleFvPatchScalarField& gcap = + refCast<const alphaContactAngleFvPatchScalarField> (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 33294b131965d75dd9ca31561a037813aedeadb1..e47345f59de42cc274bd82b37eb13bedba56af94 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 b542eeeeaed2adb1a5b870982748b83030d00627..4c49ec6163362cc9eaa8858cb0c99799253a38ef 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 a2521d21f07c66194ead15877ae830e00df91be7..a80c71ab57d28206f7585707735d49f8be229d95 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 fa13c45c32fdd4f290829de7b4e23608eef82606..9aed207d23c855c5410ac8e72b00752db6ad4b3d 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 00c47f9eb71b765e10ec6cc92bcc23b1ae5acb33..a1f26f8ead2092d30b5d3ad3bc75d104ae52d724 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 28d9362265d7f412354d77b98256cd6c27158a93..3277e770327ac19c2901bcdf9df69c17e3adfd2b 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 45266f583bbe78274b3f4c3dedda1620331c962a..119d41f8f04ce022127c9e33e50f6169f57b401c 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 714605fd969631d10df96f05ff115584b9857c3e..8d53e8ccd52f807a1b992396d1be922f3d5dc958 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 729eeb34b28722e6cab293bb36c7a213ed88da1c..45a4e70edf45f4f80d5c456a4bcfa20a01968812 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<volScalarField> operator()(const tmp<volScalarField>&) const; - tmp<volVectorField> operator()(const tmp<volVectorField>&) const; - tmp<volSymmTensorField> operator() + virtual tmp<volScalarField> operator()(const tmp<volScalarField>&) const; + + virtual tmp<volVectorField> operator()(const tmp<volVectorField>&) const; + + virtual tmp<volSymmTensorField> operator() ( const tmp<volSymmTensorField>& ) const; - tmp<volTensorField> operator()(const tmp<volTensorField>&) const; + + virtual tmp<volTensorField> operator()(const tmp<volTensorField>&) const; }; diff --git a/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.H b/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.H index 158f3ea320798d4c68348bbe79b26c5a0f355fab..3e5760604b579d9cc18cfafde0da379656fca98d 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<volScalarField> operator()(const tmp<volScalarField>&) const; - tmp<volVectorField> operator()(const tmp<volVectorField>&) const; - tmp<volSymmTensorField> operator() + virtual tmp<volScalarField> operator()(const tmp<volScalarField>&) const; + + virtual tmp<volVectorField> operator()(const tmp<volVectorField>&) const; + + virtual tmp<volSymmTensorField> operator() ( const tmp<volSymmTensorField>& ) const; - tmp<volTensorField> operator()(const tmp<volTensorField>&) const; + + virtual tmp<volTensorField> operator()(const tmp<volTensorField>&) const; }; diff --git a/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.H b/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.H index 6cf7729e1e54d1087df028527f29c4912d56b690..4e4c5e0f471024d99baf02db1d3149e46c432027 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<volScalarField> operator()(const tmp<volScalarField>&) const; - tmp<volVectorField> operator()(const tmp<volVectorField>&) const; - tmp<volSymmTensorField> operator() + virtual tmp<volScalarField> operator()(const tmp<volScalarField>&) const; + + virtual tmp<volVectorField> operator()(const tmp<volVectorField>&) const; + + virtual tmp<volSymmTensorField> operator() ( const tmp<volSymmTensorField>& ) const; - tmp<volTensorField> operator()(const tmp<volTensorField>&) const; + + virtual tmp<volTensorField> operator()(const tmp<volTensorField>&) const; }; diff --git a/src/turbulenceModels/LES/incompressible/Make/options b/src/turbulenceModels/LES/incompressible/Make/options deleted file mode 100644 index a2991710f1c211847e90db63d8b94d71e97566a8..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..4686db7027c71c2ac1726bfb3dfe023abae9da74 --- /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 c148a902e054bdb040c68332e8813a12d06eb6d4..4ccb52fba2eaef908a0bb34a37307ae2f5676b5d 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 5761ba6ffd784c8f5f7942aaf7089a7f3f52ba0f..ddff4170182e9c3f52fe2291bbebe0b912eca766 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 dabd5838f1c7adec40be8fd18184e71c6bb1a76f..aa7e5b7cc624a6035ec1748763d449d683355f53 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<volTensorField>& 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<volTensorField>& 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 57576bf5e57e280af8f8023a3f6112417f301098..713189bbdd643ff756753de4ed6abfa280cd7a3d 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<volTensorField>& gradU); + virtual void correct(const tmp<volTensorField>& 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 388606f284a8f0dc068ff9801ad95597b79ff1f3..5c16c9614738f1c1d61a986d72b288f0e14272db 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<volTensorField>& 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 eb6cc7e9065b0ab437d580637568838d4cb50269..38073d08b62a549cce8602926df83ed8a4a8d0af 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<fvVectorMatrix> 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 4eefbe2d6082dcd951ebe6e0b3b73be97cb24073..e55a55b47ed1aa23d89e47e16ac738b4a615c9e1 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<Switch>("printCoeffs", false)), - coeffDict_(subDict(type + "Coeffs")), k0_("k0", dimVelocity*dimVelocity, SMALL), - delta_(LESdelta::New("delta", U.mesh(), *this)) { readIfPresent("k0", k0_); } +// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // + +autoPtr<LESModel> 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<LESModel>(cstrIter()(U, phi, transport)); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +LESModel::~LESModel() +{} + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void LESModel::correct(const tmp<volTensorField>&) { + 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 e1374ed2864557fb5bb89cd29fd107d3e471c1d9..776328d3a229f75a58792311256e85f1051f111b 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,19 +89,21 @@ private: autoPtr<LESdelta> delta_; - // Private Member Functions + // Protected member functions - // Disallow default bitwise copy construct and assignment - LESModel(const LESModel&); - LESModel& operator=(const LESModel&); + //- Print model coefficients + virtual void printCoeffs(); -protected: +private: - // Protected member functions + // Private Member Functions - //- Print model coefficients - virtual void printCoeffs(); + //- Disallow default bitwise copy construct + LESModel(const LESModel&); + + //- Disallow default bitwise assignment + LESModel& operator=(const LESModel&); public: @@ -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 flux field - inline const surfaceScalarField& phi() const - { - return phi_; - } - - //- Access function to incompressible transport model - inline transportModel& transport() const - { - return transport_; - } + //- Access function to velocity field + inline const volVectorField& U() const + { + return U_; + } - //- 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 flux field + inline const surfaceScalarField& phi() const + { + return phi_; + } - //- 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_; + } - //- Access function to incompressible viscosity - inline const volScalarField& nu() const - { - return transport_.nu(); - } + //- Access function to filter width + inline const volScalarField& delta() const + { + return delta_(); + } - //- Return the value of k0 which k is not allowed to be less than - const dimensionedScalar& k0() const - { - return k0_; - } + //- 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<fvVectorMatrix> divDevBeff(volVectorField& U) const = 0; + + // RAS compatibility functions for the turbulenceModel base class + + //- Return the turbulence viscosity + virtual tmp<volScalarField> nut() const + { + return nuSgs(); + } + + //- Return the Reynolds stress tensor + virtual tmp<volSymmTensorField> R() const + { + return B(); + } + + //- Return the effective stress tensor including the laminar stress + virtual tmp<volSymmTensorField> devReff() const + { + return devBeff(); + } + + //- Return the source term for the momentum equation + virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const + { + return divDevBeff(U); + } + + //- Correct Eddy-Viscosity and related properties virtual void correct(const tmp<volTensorField>& 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 af3fb1628e76a3669f16a96f7f176d608baa830e..f6aa1f536e9394a5ccaf1dcb99298c1a85359a17 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<volTensorField>& 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<volTensorField>& 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 f58b6e224be01a91cedeb5dd6167bee296168ced..a61ea1a49a63b7a9e16309fc3fcb67fee06238c3 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<volTensorField>& gradU); + virtual void correct(const tmp<volTensorField>& 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 feda56ca15f600f00a5efd2f24da1f3ab9c2cdc0..bd97e2c1ecd3b1cb1f07acb1451924dd2d46073e 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 0000000000000000000000000000000000000000..8772261e70f3ada8f606d3ca133f2a1ccca0eee2 --- /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 f86578934e7a7fda63efe644062c51229c29676d..3dcb5b28a4d6a7daa00549792c02a4708a4fd476 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<volScalarField> k() const + virtual tmp<volScalarField> 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 7c780da1e1a1fda398e7f0c084fda71666368100..330bfd8b28cebc3d26ae56de08109ea83153b9bd 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<volSymmTensorField> B() const; + virtual tmp<volSymmTensorField> B() const; //- Returns div(B). // This is the additional term due to the filtering of the NSE. - tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> 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 9d5ad49bdd2dda666fe7ad4d9e3f3b4d372fc8ab..11843958d5b9ca10ec16bfc9b3f6bc7534d61335 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<volTensorField>& gradU) dTildaUpdate(S); - solve + fvScalarMatrix nuTildaEqn ( fvm::ddt(nuTilda_) + fvm::div(phi(), nuTilda_) @@ -299,6 +299,9 @@ void SpalartAllmaras::correct(const tmp<volTensorField>& 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 1bcecd018ff52a25ad4a5f87f4becbe072c8ef11..aa721b1b5c46dd3fa5dfcab4fb94ef7f515e9efc 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<volScalarField> k() const + virtual tmp<volScalarField> k() const { return sqr(nuSgs()/ck_/dTilda_); } //- Return sub-grid disipation rate - tmp<volScalarField> epsilon() const; + virtual tmp<volScalarField> epsilon() const; tmp<volScalarField> nuTilda() const { @@ -153,21 +152,21 @@ public: } //- Return SGS viscosity - tmp<volScalarField> nuSgs() const + virtual tmp<volScalarField> nuSgs() const { return nuSgs_; } //- Return the sub-grid stress tensor. - tmp<volSymmTensorField> B() const; + virtual tmp<volSymmTensorField> B() const; //- Return the effective sub-grid turbulence stress tensor // including the laminar stress - tmp<volSymmTensorField> devBeff() const; + virtual tmp<volSymmTensorField> devBeff() const; //- Return the deviatoric part of the divergence of Beff // i.e. the additional term in the filtered NSE. - tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const; //- Correct nuTilda and related properties virtual void correct(const tmp<volTensorField>& 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 d905c34710d36c3804a2cd41619f616ba954220d..ec7eeda68c77fb29a3a181b22ae06950e49e8d75 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 d07b53672c007929893e099ce2ef8c6b7b04a428..815d2c28a6e633d21144c37e5a63d3ba24b8c042 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 88a308aaf16b72e7c0ff5ecaf444cd09457cbbab..14314e28076a51d61a96e2e95701ef0a195113cb 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<volTensorField>& 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<volTensorField>& 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 3ba67f6b24fe36f5292295f285c527abec91a8fe..48aad65c601f4240a6a313af28dc8d6b54737f23 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<volScalarField> k() const + virtual tmp<volScalarField> k() const { return k_; } @@ -135,10 +134,10 @@ public: } //- Correct Eddy-Viscosity and related properties - void correct(const tmp<volTensorField>& gradU); + virtual void correct(const tmp<volTensorField>& 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 d155d45a581455c74f225654c99688e848f0a02b..bf8159609baafd3ac9701b1dec9a5976e1253539 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<volScalarField> k() const + virtual tmp<volScalarField> k() const { return k_; } //- Correct Eddy-Viscosity and related properties - void correct(const tmp<volTensorField>& gradU); + virtual void correct(const tmp<volTensorField>& 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 a06f4298c64bdb8f8f202e781682ead49d8b8773..3460137709af70d6b0ca1a33a68ed12d6d2ca84c 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<volTensorField>& 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<volTensorField>& 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 - ( - (F1 - scalar(1))*CDkOmega/omega_, - omega_ - ) - + FSAS_ - *max + { + fvScalarMatrix omegaEqn ( - 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 8048be0adf729fce3a06c0166537ed279d6dee8e..56e395ff4cc422c71d99847e7079b656b5b893f3 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<volScalarField> k() const + virtual tmp<volScalarField> k() const { return k_; } //- Return omega - tmp<volScalarField> omega() const + virtual tmp<volScalarField> omega() const { return omega_; } @@ -218,24 +218,24 @@ public: } //- Return sub-grid disipation rate - tmp<volScalarField> epsilon() const; + virtual tmp<volScalarField> epsilon() const; //- Return SGS viscosity - tmp<volScalarField> nuSgs() const + virtual tmp<volScalarField> nuSgs() const { return nuSgs_; } //- Return the sub-grid stress tensor. - tmp<volSymmTensorField> B() const; + virtual tmp<volSymmTensorField> B() const; //- Return the effective sub-grid turbulence stress tensor // including the laminar stress - tmp<volSymmTensorField> devBeff() const; + virtual tmp<volSymmTensorField> devBeff() const; //- Return the deviatoric part of the divergence of Beff // i.e. the additional term in the filtered NSE. - tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const; //- Solve the turbulence equations (k-w) and correct the turbulence viscosity virtual void correct(const tmp<volTensorField>& 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 648e0b8229185547eca155dd742ef310e40ce100..bd8c3b2a3bb0eca3128e41e0e237c9e96500f0bb 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<volScalarField> k() const; + virtual tmp<volScalarField> k() const; //- Return sub-grid disipation rate - tmp<volScalarField> epsilon() const; + virtual tmp<volScalarField> epsilon() const; //- Return SGS viscosity - tmp<volScalarField> nuSgs() const; + virtual tmp<volScalarField> nuSgs() const; //- Return the effective viscosity - tmp<volScalarField> nuEff() const; + virtual tmp<volScalarField> nuEff() const; //- Return the sub-grid stress tensor B. virtual tmp<volSymmTensorField> 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<fvVectorMatrix> divDevBeff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> 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 35f99986add4090ce9b6cca11716ac528bca8a6e..471695ccecfe4a8111f55459ce797339cc8bbf4d 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<volTensorField>& 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<volTensorField>& 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 960b6f185e4019d64f08766d88525351ee2fc7eb..f751fc8f6de84e0629b04f039c4ba214dbdda9da 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<volScalarField> k() const + virtual tmp<volScalarField> k() const { return k_; } @@ -153,10 +152,10 @@ public: } //- Correct Eddy-Viscosity and related properties - void correct(const tmp<volTensorField>& gradU); + virtual void correct(const tmp<volTensorField>& 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 7fa3f0c9ecc81d585959fb89807c9fd7443bd66b..b340b5ca30997185c4945f1fb835420befd1cb8a 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<volScalarField> k() const; + virtual tmp<volScalarField> k() const; //- Return the SGS turbulent disipation rate. - tmp<volScalarField> epsilon() const; + virtual tmp<volScalarField> epsilon() const; //- Return the SGS viscosity. - tmp<volScalarField> nuSgs() const + virtual tmp<volScalarField> nuSgs() const { return nuSgs_; } //- Return the sub-grid stress tensor. - tmp<volSymmTensorField> B() const; + virtual tmp<volSymmTensorField> B() const; //- Return the effective sub-grid turbulence stress tensor // including the laminar stress - tmp<volSymmTensorField> devBeff() const; + virtual tmp<volSymmTensorField> devBeff() const; //- Implementation of div(B). This is necessary to override // (and include) the div(B) terms from both the parent classes. - tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const; //- Correct Eddy-Viscosity and related properties - void correct(const tmp<volTensorField>& gradU); + virtual void correct(const tmp<volTensorField>& 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 6089a313d43fbe19f5dd077c4cab4225cacf494b..be020ae572f52408e010c2850443bbc9bdbe052c 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<volTensorField>& 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<volTensorField>& 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 632530b2056d632729aba907bbfb51a68f4d69f2..dcb9a9bc2c0d6743d74dcada2ab6c001088b31e1 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<volScalarField> k() const + virtual tmp<volScalarField> k() const { return k_; } @@ -128,10 +127,10 @@ public: } //- Correct Eddy-Viscosity and related properties - void correct(const tmp<volTensorField>& gradU); + virtual void correct(const tmp<volTensorField>& 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 079d38a4a2fdd327f39d4046ef144fd0c30a7cd5..faa2010e59434c04e53cd8db4f3408d1979b2d5f 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<volScalarField> k() const; + virtual tmp<volScalarField> k() const; //- Return the SGS turbulent dissipation. - tmp<volScalarField> epsilon() const; + virtual tmp<volScalarField> epsilon() const; //- Return the sub-grid stress tensor. - tmp<volSymmTensorField> B() const; + virtual tmp<volSymmTensorField> B() const; //- Return the deviatoric part of the effective sub-grid // turbulence stress tensor including the laminar stress - tmp<volSymmTensorField> devBeff() const; + virtual tmp<volSymmTensorField> devBeff() const; //- Return the deviatoric part of the divergence of Beff // i.e. the additional term in the filtered NSE. - tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const; //- Correct Eddy-Viscosity and related properties - void correct(const tmp<volTensorField>&); + virtual void correct(const tmp<volTensorField>&); //- 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 dd6b4e68b02c246168c4edbd20c765b5dbb2acf8..d7a99b75f8b46c2a4cb24684a39be267acba5891 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<volScalarField> k() const; + virtual tmp<volScalarField> k() const; //- Correct Eddy-Viscosity and related properties - void correct(const tmp<volTensorField>&); + virtual void correct(const tmp<volTensorField>&); //- 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 6903765f6b367fca1a4d346330875057e8df7e98..66fe691c103e777002e4545611acd8d3bea58012 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 7bf38a998257449e293f7c5f21013b6315034e58..937b4b36d2d77cfa98c6a1cb4a8c2eecbcfef0e8 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 45b3df83e86952b448edea7110e171c086f5e5f7..8d515d4d56cfd92f0439ad61fa5306e478f8c740 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<volScalarField> nut() const + virtual tmp<volScalarField> nut() const { return nut_; } @@ -144,34 +143,34 @@ public: } //- Return the turbulence kinetic energy - tmp<volScalarField> k() const + virtual tmp<volScalarField> k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp<volScalarField> epsilon() const + virtual tmp<volScalarField> epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp<volSymmTensorField> R() const + virtual tmp<volSymmTensorField> R() const { return R_; } //- Return the effective stress tensor including the laminar stress - tmp<volSymmTensorField> devReff() const; + virtual tmp<volSymmTensorField> devReff() const; //- Return the source term for the momentum equation - tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> 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 52145f9b4bda3f9aca9bd2c994a78bd6a5314f32..183466e2ac9882b071be22402031630c676f26b8 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 f0e8a0ba591eb69444cf1ae356104e586bcff0a8..422ddffdf60b01da8fb2ff95e619b14a1835a92e 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<volScalarField> nut() const + virtual tmp<volScalarField> nut() const { return nut_; } @@ -124,31 +123,31 @@ public: } //- Return the turbulence kinetic energy - tmp<volScalarField> k() const + virtual tmp<volScalarField> k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp<volScalarField> epsilon() const + virtual tmp<volScalarField> epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp<volSymmTensorField> R() const; + virtual tmp<volSymmTensorField> R() const; //- Return the effective stress tensor including the laminar stress - tmp<volSymmTensorField> devReff() const; + virtual tmp<volSymmTensorField> devReff() const; //- Return the source term for the momentum equation - tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> 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 d67c91a227d7e1f9f58aeed397c53b4cd5d74575..dc6a2c84a6fb4c99d38e2dbabe224e207f7d7ca2 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 73169b389ffec861cf6f35234e69a877d539b11c..e3f5d7a0afd1eda44a1348e406f6c7b21d442a0a 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<volScalarField> nut() const + virtual tmp<volScalarField> nut() const { return nut_; } @@ -152,34 +151,34 @@ public: } //- Return the turbulence kinetic energy - tmp<volScalarField> k() const + virtual tmp<volScalarField> k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp<volScalarField> epsilon() const + virtual tmp<volScalarField> epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp<volSymmTensorField> R() const + virtual tmp<volSymmTensorField> R() const { return R_; } //- Return the effective stress tensor including the laminar stress - tmp<volSymmTensorField> devReff() const; + virtual tmp<volSymmTensorField> devReff() const; //- Return the source term for the momentum equation - tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> 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 2e48e8763054c26324c62880030a8e20c0e20810..ff5483491db6d5f007841f661e1229bb382b35bb 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 a16a1d8f3a2e561a3c56f9a311b9b15fa2fee079..22f5adf28f309e7a0a113bf566ec259d28307884 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<volScalarField> nut() const + virtual tmp<volScalarField> nut() const { return nut_; } @@ -138,32 +137,32 @@ public: } //- Return the turbulence kinetic energy - tmp<volScalarField> k() const + virtual tmp<volScalarField> k() const { return k_; } //- Note that epsilonTilda is returned as epsilon. // This is the appropriate variable for most purposes. - tmp<volScalarField> epsilon() const + virtual tmp<volScalarField> epsilon() const { return epsilonTilda_; } //- Return the Reynolds stress tensor - tmp<volSymmTensorField> R() const; + virtual tmp<volSymmTensorField> R() const; //- Return the effective stress tensor including the laminar stress - tmp<volSymmTensorField> devReff() const; + virtual tmp<volSymmTensorField> devReff() const; //- Return the source term for the momentum equation - tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> 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 b347693adc4ce0421a65dc115f2f40e260e123f4..09b802504e47894846bc9b568abc047c287d749e 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 005c8257751e255d007557c6210cd3b5abf3ee8f..e1617389b7eb80716bed9329aabe3cb0b81d3a1e 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<volScalarField> nut() const + virtual tmp<volScalarField> nut() const { return nut_; } @@ -132,31 +131,31 @@ public: } //- Return the turbulence kinetic energy - tmp<volScalarField> k() const + virtual tmp<volScalarField> k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp<volScalarField> epsilon() const + virtual tmp<volScalarField> epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp<volSymmTensorField> R() const; + virtual tmp<volSymmTensorField> R() const; //- Return the effective stress tensor including the laminar stress - tmp<volSymmTensorField> devReff() const; + virtual tmp<volSymmTensorField> devReff() const; //- Return the source term for the momentum equation - tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> 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 4a6963883de1ec27de4bc5dfe8c638eac790125a..19ad85b82d3f324ac5d840ca1ef8d4caf88e3808 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 1708dde2446b5b2136a2f994834880d97cf5fcab..02d0fc63cf6418b9db1643c3db45f917da812bf1 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<volScalarField> nut() const + virtual tmp<volScalarField> nut() const { return nut_; } @@ -157,31 +156,31 @@ public: } //- Return the turbulence kinetic energy - tmp<volScalarField> k() const + virtual tmp<volScalarField> k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp<volScalarField> epsilon() const + virtual tmp<volScalarField> epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp<volSymmTensorField> R() const; + virtual tmp<volSymmTensorField> R() const; //- Return the effective stress tensor including the laminar stress - tmp<volSymmTensorField> devReff() const; + virtual tmp<volSymmTensorField> devReff() const; //- Return the source term for the momentum equation - tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> 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 2dd14b9d9a1aa6c813f2107f822e97687b224afb..6c51a324a518c1e0590cdf3b7b98912cb2015af1 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 59efb82c9820719d99d153b86034d7362f30982a..41df680dd953a2a050266b64764a9987b838fb84 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<volScalarField> nut() const + virtual tmp<volScalarField> nut() const { return nut_; } @@ -127,31 +126,31 @@ public: } //- Return the turbulence kinetic energy - tmp<volScalarField> k() const + virtual tmp<volScalarField> k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp<volScalarField> epsilon() const + virtual tmp<volScalarField> epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp<volSymmTensorField> R() const; + virtual tmp<volSymmTensorField> R() const; //- Return the effective stress tensor including the laminar stress - tmp<volSymmTensorField> devReff() const; + virtual tmp<volSymmTensorField> devReff() const; //- Return the source term for the momentum equation - tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> 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 32b29db2fe88badc50821f82a22538e4341687ed..d5736d3064102cbea204047817324bbddfb45397 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 0000000000000000000000000000000000000000..701f27bfc008ef1738a48ad21bd631372e40e8d9 --- /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 cef22b9d84e0bc9939843b0273075ff057eb261c..bbf4155c829a171628b16842112eda2d3c0081b7 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 7f8f6ebc8ff50819d1c04ac86bb742853690c907..091c99cadf27b89e29736eee5b0e6c09147c8b48 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<volScalarField> nut() const + virtual tmp<volScalarField> nut() const { return nut_; } @@ -131,31 +130,31 @@ public: } //- Return the turbulence kinetic energy - tmp<volScalarField> k() const + virtual tmp<volScalarField> k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp<volScalarField> epsilon() const + virtual tmp<volScalarField> epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp<volSymmTensorField> R() const; + virtual tmp<volSymmTensorField> R() const; //- Return the effective stress tensor including the laminar stress - tmp<volSymmTensorField> devReff() const; + virtual tmp<volSymmTensorField> devReff() const; //- Return the source term for the momentum equation - tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> 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 1790d67fcb79b4b86d3b4bfb85a3dffa9af26b5d..336e6d6db60bbba8a66b7f91a71be54ec4aed90b 100644 --- a/src/turbulenceModels/RAS/incompressible/QZeta/QZeta.C +++ b/src/turbulenceModels/incompressible/RAS/QZeta/QZeta.C @@ -69,7 +69,6 @@ tmp<volScalarField> 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 8c675a8fc1fae2182be7eae4bfb2a8e80a85a911..0d76112835a22aee4cea9a37d13d98d51dddc25d 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<volScalarField> nut() const + virtual tmp<volScalarField> nut() const { return nut_; } @@ -128,41 +127,41 @@ public: } //- Return the turbulence kinetic energy - tmp<volScalarField> k() const + virtual tmp<volScalarField> k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp<volScalarField> epsilon() const + virtual tmp<volScalarField> epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp<volSymmTensorField> R() const; + virtual tmp<volSymmTensorField> 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<volSymmTensorField> devReff() const; + virtual tmp<volSymmTensorField> devReff() const; //- Return the source term for the momentum equation - tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> 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 46236828f231c127211565fb271596fe04dbcc34..197c84a033fa9e7c19990343362a60e47fff2f7a 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<Switch>("printCoeffs", false)), coeffDict_(subDict(type + "Coeffs")), @@ -123,6 +120,61 @@ RASModel::RASModel {} +// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // + +autoPtr<RASModel> 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<RASModel>(cstrIter()(U, phi, transport)); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + RASModel::~RASModel() {} @@ -173,7 +225,9 @@ tmp<scalarField> 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 b5edce3ea3137fd99de9f58072812b7d4204e91f..ce1d77f3cfd593c325ec8c5e904032b0a320702f 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<RASModel> 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 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 transportModel_.nu(); + return wallFunctionDict_; } + //- Return the turbulence viscosity virtual tmp<volScalarField> nut() const = 0; @@ -276,6 +260,9 @@ public: ); } + //- Return yPlus for the given patch + virtual tmp<scalarField> yPlus(const label patchI) const; + //- Return the turbulence kinetic energy virtual tmp<volScalarField> k() const = 0; @@ -291,9 +278,6 @@ public: //- Return the source term for the momentum equation virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const = 0; - //- Return yPlus for the given patch - virtual tmp<scalarField> 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 3c98bfec9e3e856bea4b7e9b83e013488d60fc6e..f632eea7986710c2ec21af1fcc5ece962fb2c6fb 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 960d0a344d740f510cfb03f00f6f9428e34f4b81..7710c54bf16948dda107d0b2cd425cfa0ddef6ff 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<volScalarField> nut() const + virtual tmp<volScalarField> nut() const { return nut_; } @@ -135,31 +134,31 @@ public: } //- Return the turbulence kinetic energy - tmp<volScalarField> k() const + virtual tmp<volScalarField> k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp<volScalarField> epsilon() const + virtual tmp<volScalarField> epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp<volSymmTensorField> R() const; + virtual tmp<volSymmTensorField> R() const; //- Return the effective stress tensor including the laminar stress - tmp<volSymmTensorField> devReff() const; + virtual tmp<volSymmTensorField> devReff() const; //- Return the source term for the momentum equation - tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> 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 7c0253db73901a611a66f530d355187c8f6b7b91..c22460a1d81e04fd1a296a0da4009305c9d017e4 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 39cb3977e0c0dcd2d2db539c1d9293c067675b6e..abc946efeca57fe7a9686a5d87dc5784475d231c 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<volScalarField> nut() const + virtual tmp<volScalarField> nut() const { return nut_; } @@ -157,25 +156,25 @@ public: tmp<volScalarField> DnuTildaEff() const; //- Return the turbulence kinetic energy - tmp<volScalarField> k() const; + virtual tmp<volScalarField> k() const; //- Return the turbulence kinetic energy dissipation rate - tmp<volScalarField> epsilon() const; + virtual tmp<volScalarField> epsilon() const; //- Return the Reynolds stress tensor - tmp<volSymmTensorField> R() const; + virtual tmp<volSymmTensorField> R() const; //- Return the effective stress tensor including the laminar stress - tmp<volSymmTensorField> devReff() const; + virtual tmp<volSymmTensorField> devReff() const; //- Return the source term for the momentum equation - tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> 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 c38760430152764c40b3bdaa80491a6920cfb9a5..38b382b86aa49a87bcc3d635782d0699f6676286 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 5ac0d5a4614f037a02c374aa93fca67e41492c08..52e3f70d84c873e2b70a0c5b4ac6104d14065306 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<volScalarField> nut() const + virtual tmp<volScalarField> nut() const { return nut_; } @@ -135,31 +134,31 @@ public: } //- Return the turbulence kinetic energy - tmp<volScalarField> k() const + virtual tmp<volScalarField> k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp<volScalarField> epsilon() const + virtual tmp<volScalarField> epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp<volSymmTensorField> R() const; + virtual tmp<volSymmTensorField> R() const; //- Return the effective stress tensor including the laminar stress - tmp<volSymmTensorField> devReff() const; + virtual tmp<volSymmTensorField> devReff() const; //- Return the source term for the momentum equation - tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> 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 ff2dceca5adc5915198148246d56b762b9de0cde..bb53b7e765b59586cf29e32852a369ce0ee987f2 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 6501a691f8527ba0ca63f5c21b31d5102fd3df70..cb387cd10ed4f3f7cf362500681ba51c9835110b 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<volScalarField> nut() const + virtual tmp<volScalarField> nut() const { return nut_; } @@ -150,19 +149,19 @@ public: } //- Return the turbulence kinetic energy - tmp<volScalarField> k() const + virtual tmp<volScalarField> k() const { return k_; } //- Return the turbulence specific dissipation rate - tmp<volScalarField> omega() const + virtual tmp<volScalarField> omega() const { return omega_; } //- Return the turbulence kinetic energy dissipation rate - tmp<volScalarField> epsilon() const + virtual tmp<volScalarField> epsilon() const { return tmp<volScalarField> ( @@ -181,19 +180,19 @@ public: } //- Return the Reynolds stress tensor - tmp<volSymmTensorField> R() const; + virtual tmp<volSymmTensorField> R() const; //- Return the effective stress tensor including the laminar stress - tmp<volSymmTensorField> devReff() const; + virtual tmp<volSymmTensorField> devReff() const; //- Return the source term for the momentum equation - tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> 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 4760c17152ec8f4ce64408ac98ee41492a07c478..cff3a3dc56620c0c3f18fb2c5aba28b095e14c39 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 8b406d6ea74ba657c5c488cca0dca0f1a55ce276..646f3ad15e427647c682ee3ac1d5e7d59a84f88b 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<volScalarField> nut() const + virtual tmp<volScalarField> nut() const { return nut_; } @@ -230,19 +229,19 @@ public: } //- Return the turbulence kinetic energy - tmp<volScalarField> k() const + virtual tmp<volScalarField> k() const { return k_; } //- Return the turbulence specific dissipation rate - tmp<volScalarField> omega() const + virtual tmp<volScalarField> omega() const { return omega_; } //- Return the turbulence kinetic energy dissipation rate - tmp<volScalarField> epsilon() const + virtual tmp<volScalarField> epsilon() const { return tmp<volScalarField> ( @@ -261,19 +260,19 @@ public: } //- Return the Reynolds stress tensor - tmp<volSymmTensorField> R() const; + virtual tmp<volSymmTensorField> R() const; //- Return the effective stress tensor including the laminar stress - tmp<volSymmTensorField> devReff() const; + virtual tmp<volSymmTensorField> devReff() const; //- Return the source term for the momentum equation - tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> 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 9ef6730bc9d0840dd8215c8763810da360126ce8..2c871874c96486b3546b61f2ec2db92743f70a05 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 7f07045aa3e5a0443cb391a2bbe4dc289986d020..6675a336cbd6d3b8fbc881be8eaa0566da7eb0eb 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<volScalarField> nut() const; + virtual tmp<volScalarField> nut() const; //- Return the effective viscosity, i.e. the laminar viscosity - tmp<volScalarField> nuEff() const; + virtual tmp<volScalarField> nuEff() const; //- Return the turbulence kinetic energy, i.e. 0 for laminar flow - tmp<volScalarField> k() const; + virtual tmp<volScalarField> k() const; //- Return the turbulence kinetic energy dissipation rate, // i.e. 0 for laminar flow - tmp<volScalarField> epsilon() const; + virtual tmp<volScalarField> epsilon() const; //- Return the Reynolds stress tensor, i.e. 0 for laminar flow - tmp<volSymmTensorField> R() const; + virtual tmp<volSymmTensorField> R() const; //- Return the effective stress tensor including the laminar stress - tmp<volSymmTensorField> devReff() const; + virtual tmp<volSymmTensorField> devReff() const; //- Return the source term for the momentum equation - tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> 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 ffeba065d7576a3dfe869f05d3f5c34d6c67a5a5..f44f0e53e8ca63f2ca399976cafe4bbe3347ab46 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 d3587b2f51b04c80eeb64214f55b48b24a5002ea..9a6330065373a942552e7399c7fd9bc82fbdb9b6 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<volScalarField> nut() const + virtual tmp<volScalarField> nut() const { return nut_; } @@ -152,31 +151,31 @@ public: } //- Return the turbulence kinetic energy - tmp<volScalarField> k() const + virtual tmp<volScalarField> k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp<volScalarField> epsilon() const + virtual tmp<volScalarField> epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp<volSymmTensorField> R() const; + virtual tmp<volSymmTensorField> R() const; //- Return the effective stress tensor including the laminar stress - tmp<volSymmTensorField> devReff() const; + virtual tmp<volSymmTensorField> devReff() const; //- Return the source term for the momentum equation - tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> 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 0000000000000000000000000000000000000000..80aac8369019e68848657645c08fee6f304f5479 --- /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 a6f6e7f45360181f9a8b539057b442146a62587f..6ade1173471776300bac25506028aed0a6b44374 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 0000000000000000000000000000000000000000..a30a17924e6de09465b67e75ddcb3c0718367765 --- /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> laminar::New +( + const volVectorField& U, + const surfaceScalarField& phi, + transportModel& lamTransportModel +) +{ + return autoPtr<laminar>(new laminar(U, phi, lamTransportModel)); +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +tmp<volScalarField> laminar::nut() const +{ + return tmp<volScalarField> + ( + new volScalarField + ( + IOobject + ( + "nut", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar("nut", nu().dimensions(), 0.0) + ) + ); +} + + +tmp<volScalarField> laminar::nuEff() const +{ + return tmp<volScalarField>(new volScalarField("nuEff", nu())); +} + + +tmp<volScalarField> laminar::k() const +{ + return tmp<volScalarField> + ( + new volScalarField + ( + IOobject + ( + "k", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar("k", sqr(U_.dimensions()), 0.0) + ) + ); +} + + +tmp<volScalarField> laminar::epsilon() const +{ + return tmp<volScalarField> + ( + new volScalarField + ( + IOobject + ( + "epsilon", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar + ( + "epsilon", sqr(U_.dimensions())/dimTime, 0.0 + ) + ) + ); +} + + +tmp<volSymmTensorField> laminar::R() const +{ + return tmp<volSymmTensorField> + ( + new volSymmTensorField + ( + IOobject + ( + "R", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedSymmTensor + ( + "R", sqr(U_.dimensions()), symmTensor::zero + ) + ) + ); +} + + +tmp<volSymmTensorField> laminar::devReff() const +{ + return tmp<volSymmTensorField> + ( + new volSymmTensorField + ( + IOobject + ( + "devRhoReff", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + -nu()*dev(twoSymm(fvc::grad(U_))) + ) + ); +} + + +tmp<fvVectorMatrix> 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 30090fe28f8ed2f89ee914f399218b9aaf8b27e3..e617e90950c364bfd54218a2d353c56207b450c6 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 -<pre> - 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 -</pre> + 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<laminar> New + ( + const volVectorField& U, + const surfaceScalarField& phi, + transportModel& lamTransportModel + ); + + + //- Destructor + virtual ~laminar() + {} // Member Functions - //- Return SGS kinetic energy - tmp<volScalarField> k() const - { - return k_; - } + //- Return the turbulence viscosity, i.e. 0 for laminar flow + virtual tmp<volScalarField> nut() const; + + //- Return the effective viscosity, i.e. the laminar viscosity + virtual tmp<volScalarField> nuEff() const; + + //- Return the turbulence kinetic energy, i.e. 0 for laminar flow + virtual tmp<volScalarField> k() const; + + //- Return the turbulence kinetic energy dissipation rate, + // i.e. 0 for laminar flow + virtual tmp<volScalarField> epsilon() const; + + //- Return the Reynolds stress tensor, i.e. 0 for laminar flow + virtual tmp<volSymmTensorField> R() const; + + //- Return the effective stress tensor including the laminar stress + virtual tmp<volSymmTensorField> devReff() const; - //- Return the effective diffusivity for k - tmp<volScalarField> DkEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DkEff", nuSgs_ + nu()) - ); - } + //- Return the source term for the momentum equation + virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - //- Correct Eddy-Viscosity and related properties - void correct(const tmp<volTensorField>& gradU); + //- 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 5cda1e5f562a031c46ffc8fc87dac5f8d3544879..ef609c61f150501672382b1f12952a34d7fc82bf 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> LESModel::New +autoPtr<turbulenceModel> 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> LESModel::New ( IOobject ( - "LESProperties", + "turbulenceProperties", U.time().constant(), U.db(), IOobject::MUST_READ, @@ -60,28 +61,30 @@ autoPtr<LESModel> 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<LESModel>(cstrIter()(U, phi, transport)); + return autoPtr<turbulenceModel>(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 b3f0a9876a37cf322a6fa358ca0a4335e6d4225e..e3a4a00dafbd3ae14c12fad14ed57e632733213a 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> 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<RASModel>(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 0000000000000000000000000000000000000000..490b59e14e6487278f46896b3884e64eca267249 --- /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<turbulenceModel> 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<volScalarField> nut() const = 0; + + //- Return the effective viscosity + virtual tmp<volScalarField> nuEff() const = 0; + + //- Return the turbulence kinetic energy + virtual tmp<volScalarField> k() const = 0; + + //- Return the turbulence kinetic energy dissipation rate + virtual tmp<volScalarField> epsilon() const = 0; + + //- Return the Reynolds stress tensor + virtual tmp<volSymmTensorField> R() const = 0; + + //- Return the effective stress tensor including the laminar stress + virtual tmp<volSymmTensorField> devReff() const = 0; + + //- Return the source term for the momentum equation + virtual tmp<fvVectorMatrix> 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 0000000000000000000000000000000000000000..a413baf8ed52f13df3079e39ad1d827607e1c0ce --- /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 46a465314bba1bb27c4a20bfb95b5be3f44c9240..243a852f894cddeea49c2aaf7f81a2e9c1141cb5 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 0000000000000000000000000000000000000000..f39bcff94273d77d588fdff4411f29c3b2915360 --- /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 5485bd3e573f9738fce7a7bc2a8c39ac2ead9d57..1b8a55e1b5900fec1c1b03ce90f5811cdc90a955 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 0000000000000000000000000000000000000000..6289576d7823dc3408fd1574320cc7e04414940d --- /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 0000000000000000000000000000000000000000..64a67eea2ad3b4c701d91ba4507c56d6da4cba4a --- /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 713344455a1a29c3cccb21bfcfb43f423eaa5cf3..9590626e73b22338987ef922d3789c839e0ded3e 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 62275784712aebe76b90f3356879dce098912e1e..942950db4e35e4d54d201d75c8ca65e43e78e2a9 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 4adf8e9374f634d277f886f7272de6083b7d5276..99db32d37aee3949480199a7b63f6075d4dd9549 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 d4cc4c65a67476de08b56cbb2efd682e88a46db6..9dcf5eae9a46f2cf8d1f2c50e4d67549358bb667 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 742f2974431e8ab23664341603ef199480f49c68..fcb8a585f3b685cec545b4a9f808a6b9a683f3b8 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 742f2974431e8ab23664341603ef199480f49c68..fcb8a585f3b685cec545b4a9f808a6b9a683f3b8 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 2ade45bf8af4b3d69246b192a556e72e7e0652c4..eb22ec5273f7a92f89eb73ad1d24ffcbf3235cda 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 0000000000000000000000000000000000000000..11c91f0a1e42a95ae426081d72d755827c0e84ad --- /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 bc9ad1d53d2ba824b089db475c996119061f7d4d..6b8e4385b40a677ca15c2384a98c7d710a29a4b7 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 4c158476b8e3cf15deeac3083d30f422de09ebcd..57f829277796a6f17ec77d5965259173a400a546 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 e7666438bbe4735aecd12f49030731efacc13b68..8e031272ac37ad56d3e3282004fd2f3ee8a87366 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 910ca9d25ff32d4aecc1e6aeca3e0665701d53fd..592961a2ce8b25e2ca51e8d1a5d4091b3943a746 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 8b76469d5ee58b046cffebce129505c7bba8e35d..8f801cc9ce5e42414767aed367a048d7c0c4e6fa 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 dab2d58091bfdea9b65e51c3349ecad6c1dbb582..568799d2231b34f683f1f6bd3c02c7a237abb64f 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 ad04177991584430d1042ca45818e086e7d9cf3e..e2320b01cffac5dba8a064c7cd470a4318a69e18 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 dd82705f59d2e15216e58d627b86501393599941..250a0c6d5311f65c0531e1d54e5983c45a167d73 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 9f24995858c0b99f31603d7bd2ed0ac12a45b70f..383d411db8a9cd0c0991719605d49a17e0930791 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 0000000000000000000000000000000000000000..e53dd92be33834460d1da9362d9166ff22dd4626 --- /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 40eb2c6513221bd579800417a8958b6d0f11c3a2..2d28e02de03ea0463ec4c7e251fa88b5f2cca6f5 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 8aa83e86f6e1e6a0676d4a4b21fe2f45547aac31..8d5181515e957c9eaaab47d8d389359bbb9bf3a6 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