diff --git a/applications/solvers/Lagrangian/kinematicParcelFoam/Make/options b/applications/solvers/Lagrangian/kinematicParcelFoam/Make/options index 517724be31..c9727abd52 100644 --- a/applications/solvers/Lagrangian/kinematicParcelFoam/Make/options +++ b/applications/solvers/Lagrangian/kinematicParcelFoam/Make/options @@ -1,21 +1,21 @@ EXE_INC = \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -llagrangian \ -llagrangianIntermediate \ - -lfiniteVolume \ - -lmeshTools \ -lthermophysicalFunctions \ -lbasicThermophysicalModels \ - /* -lcombustionThermophysicalModels */ \ -lspecie \ -lradiation \ - -lcompressibleRASModels + -lcompressibleRASModels \ + -lcompressibleLESModels \ + -lfiniteVolume \ + -lmeshTools diff --git a/applications/solvers/Lagrangian/kinematicParcelFoam/createFields.H b/applications/solvers/Lagrangian/kinematicParcelFoam/createFields.H index c5a992817f..3854911dd9 100644 --- a/applications/solvers/Lagrangian/kinematicParcelFoam/createFields.H +++ b/applications/solvers/Lagrangian/kinematicParcelFoam/createFields.H @@ -32,12 +32,12 @@ mesh ); -# include "compressibleCreatePhi.H" + #include "compressibleCreatePhi.H" Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence + autoPtr turbulence ( - compressible::RASModel::New + compressible::turbulenceModel::New ( rho, U, diff --git a/applications/solvers/Lagrangian/kinematicParcelFoam/kinematicParcelFoam.C b/applications/solvers/Lagrangian/kinematicParcelFoam/kinematicParcelFoam.C index 57b3dc5d13..e72bac1484 100644 --- a/applications/solvers/Lagrangian/kinematicParcelFoam/kinematicParcelFoam.C +++ b/applications/solvers/Lagrangian/kinematicParcelFoam/kinematicParcelFoam.C @@ -26,14 +26,14 @@ Application kinematicParcelFoam Description - Transient solver for a single kinematicCloud. Uses precalculated velocity + Transient solver for a single kinematicCloud. Uses pre-calculated velocity field to evolve a cloud. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" #include "basicThermo.H" -#include "compressible/RASModel/RASModel.H" +#include "turbulenceModel.H" #include "basicKinematicCloud.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -49,7 +49,7 @@ int main(int argc, char *argv[]) #include "createFields.H" #include "compressibleCourantNo.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/combustion/PDRFoam/Make/options b/applications/solvers/combustion/PDRFoam/Make/options index 9f019439a7..0385979d4a 100644 --- a/applications/solvers/combustion/PDRFoam/Make/options +++ b/applications/solvers/combustion/PDRFoam/Make/options @@ -9,7 +9,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS/compressible/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C index 463acf2448..a0e4bcfdb0 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C @@ -50,7 +50,7 @@ PDRkEpsilon::PDRkEpsilon const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ) : RASModel(typeName, rho, U, phi, thermophysicalModel), diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H index 2e911ad6a6..15d52e7269 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H @@ -77,20 +77,19 @@ public: // Constructors - //- from components + //- Construct from components PDRkEpsilon ( const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ); // Destructor - - ~PDRkEpsilon() - {} + virtual ~PDRkEpsilon() + {} // Member Functions diff --git a/applications/solvers/combustion/PDRFoam/kEpsilon.H b/applications/solvers/combustion/PDRFoam/kEpsilon.H deleted file mode 100644 index 7264443d6d..0000000000 --- a/applications/solvers/combustion/PDRFoam/kEpsilon.H +++ /dev/null @@ -1,54 +0,0 @@ -if(turbulence) -{ - volScalarField divU = fvc::div(Uf & mesh.Sf()); - - tmp tgradU = fvc::grad(Uf); - volScalarField G = 2*mut*(tgradU() && dev(symm(tgradU()))); - tgradU.clear(); - - // Add the blockage generation term so that it is included consistently - // in both the k and epsilon equations - volScalarField GR = rho*mag(U)*(U & CT & U); - -# include "wallFunctions.H" - - // Dissipation equation - fvScalarMatrix epsEqn - ( - betav*fvm::ddt(rho, epsilon) - + fvm::div(phi, epsilon) - - fvm::laplacian(fvc::interpolate(alphaEps*muEff), epsilon) - == - C1*(betav*G + GR)*epsilon/k - - fvm::SuSp((2.0/3.0*C1)*betav*rho*divU, epsilon) - - fvm::Sp(C2*betav*rho*epsilon/k, epsilon) - ); - -# include "wallDissipation.H" - - epsEqn.solve(); - bound(epsilon, dimensionedScalar("0", epsilon.dimensions(), 1.0e-15)); - - - // Turbulent kinetic energy equation - solve - ( - betav*fvm::ddt(rho, k) - + fvm::div(phi, k) - - fvm::laplacian(fvc::interpolate(alphak*muEff), k) - == - betav*G + GR - - fvm::SuSp(2.0/3.0*betav*rho*divU, k) - - fvm::Sp(betav*rho*epsilon/k, k) - ); - - bound(k, dimensionedScalar("0", k.dimensions(), 0.0)); - - //- Re-calculate turbulence viscosity - mut = Cmu*rho*sqr(k)/epsilon; - -# include "wallViscosity.H" - -} - -muEff = mut + thermo->mu(); diff --git a/applications/solvers/combustion/XiFoam/Make/options b/applications/solvers/combustion/XiFoam/Make/options index 69ded9ae57..bc89c0a716 100644 --- a/applications/solvers/combustion/XiFoam/Make/options +++ b/applications/solvers/combustion/XiFoam/Make/options @@ -1,19 +1,20 @@ EXE_INC = \ -I$(LIB_SRC)/engine/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ - -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -lengine \ - -lfiniteVolume \ - -lmeshTools \ -lcompressibleRASModels \ + -lcompressibleLESModels \ -lbasicThermophysicalModels \ -lcombustionThermophysicalModels \ -lspecie \ - -llaminarFlameSpeedModels + -llaminarFlameSpeedModels \ + -lfiniteVolume \ + -lmeshTools diff --git a/applications/solvers/combustion/XiFoam/XiFoam.C b/applications/solvers/combustion/XiFoam/XiFoam.C index 8ee0f4d14f..2e5df8fe8c 100644 --- a/applications/solvers/combustion/XiFoam/XiFoam.C +++ b/applications/solvers/combustion/XiFoam/XiFoam.C @@ -52,7 +52,7 @@ Description #include "fvCFD.H" #include "hhuCombustionThermo.H" -#include "compressible/RASModel/RASModel.H" +#include "turbulenceModel.H" #include "laminarFlameSpeed.H" #include "ignition.H" #include "Switch.H" diff --git a/applications/solvers/combustion/XiFoam/createFields.H b/applications/solvers/combustion/XiFoam/createFields.H index 737680fefa..8121886402 100644 --- a/applications/solvers/combustion/XiFoam/createFields.H +++ b/applications/solvers/combustion/XiFoam/createFields.H @@ -48,9 +48,9 @@ Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence + autoPtr turbulence ( - compressible::RASModel::New + compressible::turbulenceModel::New ( rho, U, @@ -60,7 +60,7 @@ ); Info<< "Creating field DpDt\n" << endl; - volScalarField DpDt = + volScalarField DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/combustion/Xoodles/Make/files b/applications/solvers/combustion/Xoodles/Make/files deleted file mode 100644 index 3db9275c31..0000000000 --- a/applications/solvers/combustion/Xoodles/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -Xoodles.C - -EXE = $(FOAM_APPBIN)/Xoodles diff --git a/applications/solvers/combustion/Xoodles/Make/options b/applications/solvers/combustion/Xoodles/Make/options deleted file mode 100644 index 92932f16d0..0000000000 --- a/applications/solvers/combustion/Xoodles/Make/options +++ /dev/null @@ -1,23 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/engine/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/LES \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \ - -I../XiFoam - - -EXE_LIBS = \ - -lengine \ - -lfiniteVolume \ - -lmeshTools \ - -lbasicThermophysicalModels \ - -lcombustionThermophysicalModels \ - -lspecie \ - -lcompressibleLESModels \ - -llaminarFlameSpeedModels diff --git a/applications/solvers/combustion/Xoodles/Xoodles.C b/applications/solvers/combustion/Xoodles/Xoodles.C deleted file mode 100644 index 48ceb34218..0000000000 --- a/applications/solvers/combustion/Xoodles/Xoodles.C +++ /dev/null @@ -1,122 +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 - Xoodles - -Description - Compressible premixed/partially-premixed combustion solver with large-eddy - simulation (LES) turbulence modelling. - - Combusting LES code using the b-Xi two-equation model. - Xi may be obtained by either the solution of the Xi transport - equation or from an algebraic exression. Both approaches are - based on Gulder's flame speed correlation which has been shown - to be appropriate for LES by comparison with the results from the - spectral model. - - Strain effects are encorporated directly into the Xi equation - but not in the algebraic approximation. Further work need to be - done on this issue, particularly regarding the enhanced removal rate - caused by flame compression. Analysis using results of the spectral - model will be required. - - For cases involving very lean Propane flames or other flames which are - very strain-sensitive, a transport equation for the laminar flame - speed is present. This equation is derived using heuristic arguments - involving the strain time scale and the strain-rate at extinction. - the transport velocity is the same as that for the Xi equation. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "hhuCombustionThermo.H" -#include "compressible/LESModel/LESModel.H" -#include "laminarFlameSpeed.H" -#include "ignition.H" -#include "IFstream.H" -#include "OFstream.H" - -#define divDevRhoReff divDevRhoBeff - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "setRootCase.H" - - #include "createTime.H" - #include "createMeshNoClear.H" - #include "readEnvironmentalProperties.H" - #include "createFields.H" - #include "readPISOControls.H" - #include "readCombustionProperties.H" - #include "initContinuityErrs.H" - - Info<< "\nStarting time loop\n" << endl; - - for (runTime++; !runTime.end(); runTime++) - { - Info<< "Time = " << runTime.timeName() << nl << endl; - - #include "compressibleCourantNo.H" - - #include "rhoEqn.H" - - turbulence->correct(); - - #include "UEqn.H" - - // --- PISO loop - for (int corr=1; corr<=nCorr; corr++) - { - #include "ftEqn.H" - #include "bEqn.H" - #include "huEqn.H" - #include "hEqn.H" - - if (!ign.ignited()) - { - hu == h; - } - - #include "pEqn.H" - } - - runTime.write(); - - rho = thermo->rho(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return(0); -} - - -// ************************************************************************* // diff --git a/applications/solvers/combustion/Xoodles/createFields.H b/applications/solvers/combustion/Xoodles/createFields.H deleted file mode 100644 index 8a12db6f1b..0000000000 --- a/applications/solvers/combustion/Xoodles/createFields.H +++ /dev/null @@ -1,124 +0,0 @@ - Info<< "Reading thermophysical properties\n" << endl; - - autoPtr thermo - ( - hhuCombustionThermo::New(mesh) - ); - combustionMixture& composition = thermo->composition(); - - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - thermo->rho() - ); - - volScalarField& p = thermo->p(); - const volScalarField& psi = thermo->psi(); - volScalarField& h = thermo->h(); - volScalarField& hu = thermo->hu(); - - volScalarField& b = composition.Y("b"); - Info<< "min(b) = " << min(b).value() << endl; - - const volScalarField& T = thermo->T(); - - - Info<< "\nReading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - -# include "compressibleCreatePhi.H" - - - Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence - ( - compressible::LESModel::New(rho, U, phi, thermo()) - ); - - - Info<< "Creating field DpDt\n" << endl; - volScalarField DpDt = - fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); - - Info<< "Creating field Xi\n" << endl; - volScalarField Xi - ( - IOobject - ( - "Xi", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - - Info<< "Creating the unstrained laminar flame speed\n" << endl; - autoPtr unstrainedLaminarFlameSpeed - ( - laminarFlameSpeed::New(thermo) - ); - - - Info<< "Reading strained laminar flame speed field Su\n" << endl; - volScalarField Su - ( - IOobject - ( - "Su", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - dimensionedScalar SuMin = 0.01*Su.average(); - dimensionedScalar SuMax = 4*Su.average(); - - Info<< "Calculating turbulent flame speed field St\n" << endl; - volScalarField St - ( - IOobject - ( - "St", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - Xi*Su - ); - - - multivariateSurfaceInterpolationScheme::fieldTable fields; - - if (composition.contains("ft")) - { - fields.add(composition.Y("ft")); - } - - fields.add(b); - fields.add(h); - fields.add(hu); diff --git a/applications/solvers/combustion/coldEngineFoam/Make/options b/applications/solvers/combustion/coldEngineFoam/Make/options index fef39c4afd..028498cc63 100644 --- a/applications/solvers/combustion/coldEngineFoam/Make/options +++ b/applications/solvers/combustion/coldEngineFoam/Make/options @@ -2,15 +2,16 @@ EXE_INC = \ -I../engineFoam \ -I../XiFoam \ -I$(LIB_SRC)/engine/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS/compressible/lnInclude + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -lengine \ - -lfiniteVolume \ -lcompressibleRASModels \ + -lcompressibleLESModels \ -lbasicThermophysicalModels \ - -lspecie + -lspecie \ + -lfiniteVolume diff --git a/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C b/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C index b262b7b79c..2f077ca1cf 100644 --- a/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C +++ b/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C @@ -34,7 +34,7 @@ Description #include "engineTime.H" #include "engineMesh.H" #include "basicThermo.H" -#include "RASModel.H" +#include "turbulenceModel.H" #include "OFstream.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/combustion/coldEngineFoam/createFields.H b/applications/solvers/combustion/coldEngineFoam/createFields.H index ed7c012d53..7a369df472 100644 --- a/applications/solvers/combustion/coldEngineFoam/createFields.H +++ b/applications/solvers/combustion/coldEngineFoam/createFields.H @@ -42,9 +42,9 @@ Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence + autoPtr turbulence ( - compressible::RASModel::New + compressible::turbulenceModel::New ( rho, U, diff --git a/applications/solvers/combustion/dieselEngineFoam/Make/options b/applications/solvers/combustion/dieselEngineFoam/Make/options index a5cbe01e35..20f008d331 100644 --- a/applications/solvers/combustion/dieselEngineFoam/Make/options +++ b/applications/solvers/combustion/dieselEngineFoam/Make/options @@ -1,7 +1,6 @@ EXE_INC = \ -I../engineFoam \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/dieselSpray/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \ @@ -14,11 +13,13 @@ EXE_INC = \ -I$(LIB_SRC)/../applications/solvers/combustion/XiFoam \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude \ - -I$(LIB_SRC)/engine/lnInclude + -I$(LIB_SRC)/engine/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ EXE_LIBS = \ -lengine \ -lcompressibleRASModels \ + -lcompressibleLESModels \ -lcombustionThermophysicalModels \ -lfiniteVolume \ -llagrangian \ diff --git a/applications/solvers/combustion/dieselEngineFoam/createFields.H b/applications/solvers/combustion/dieselEngineFoam/createFields.H index c07aa63cdb..cf0532b0f3 100644 --- a/applications/solvers/combustion/dieselEngineFoam/createFields.H +++ b/applications/solvers/combustion/dieselEngineFoam/createFields.H @@ -58,9 +58,9 @@ volScalarField kappa ); Info << "Creating turbulence model.\n" << nl; -autoPtr turbulence +autoPtr turbulence ( - compressible::RASModel::New + compressible::turbulenceModel::New ( rho, U, @@ -70,7 +70,7 @@ autoPtr turbulence ); Info<< "Creating field DpDt\n" << endl; -volScalarField DpDt = +volScalarField DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); Info << "Constructing chemical mechanism" << endl; diff --git a/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C b/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C index f579825384..3882701c73 100644 --- a/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C +++ b/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C @@ -34,7 +34,7 @@ Description #include "engineTime.H" #include "engineMesh.H" #include "hCombustionThermo.H" -#include "compressible/RASModel/RASModel.H" +#include "turbulenceModel.H" #include "spray.H" #include "chemistryModel.H" #include "chemistrySolver.H" diff --git a/applications/solvers/combustion/dieselFoam/Make/options b/applications/solvers/combustion/dieselFoam/Make/options index 605042aa49..44d527b062 100644 --- a/applications/solvers/combustion/dieselFoam/Make/options +++ b/applications/solvers/combustion/dieselFoam/Make/options @@ -1,7 +1,7 @@ EXE_INC = \ -I../dieselEngineFoam \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/dieselSpray/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \ @@ -17,8 +17,8 @@ EXE_INC = \ EXE_LIBS = \ -lcompressibleRASModels \ + -lcompressibleLESModels \ -lcombustionThermophysicalModels \ - -lfiniteVolume \ -llagrangian \ -ldieselSpray \ -lliquids \ @@ -29,4 +29,5 @@ EXE_LIBS = \ -llaminarFlameSpeedModels \ -lchemistryModel \ -lODE \ - -lpdf + -lpdf \ + -lfiniteVolume diff --git a/applications/solvers/combustion/dieselFoam/dieselFoam.C b/applications/solvers/combustion/dieselFoam/dieselFoam.C index 73abb05b51..899dd2928a 100644 --- a/applications/solvers/combustion/dieselFoam/dieselFoam.C +++ b/applications/solvers/combustion/dieselFoam/dieselFoam.C @@ -32,7 +32,7 @@ Description #include "fvCFD.H" #include "hCombustionThermo.H" -#include "compressible/RASModel/RASModel.H" +#include "turbulenceModel.H" #include "spray.H" #include "chemistryModel.H" #include "chemistrySolver.H" diff --git a/applications/solvers/combustion/engineFoam/Make/options b/applications/solvers/combustion/engineFoam/Make/options index 73b365c001..3ee7cc666f 100644 --- a/applications/solvers/combustion/engineFoam/Make/options +++ b/applications/solvers/combustion/engineFoam/Make/options @@ -1,18 +1,19 @@ EXE_INC = \ + -I../XiFoam \ -I$(LIB_SRC)/engine/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS/compressible/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \ - -I../XiFoam + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -lengine \ - -lfiniteVolume \ -lcompressibleRASModels \ + -lcompressibleLESModels \ -lbasicThermophysicalModels \ -lcombustionThermophysicalModels \ -lspecie \ - -llaminarFlameSpeedModels + -llaminarFlameSpeedModels \ + -lfiniteVolume diff --git a/applications/solvers/combustion/engineFoam/engineFoam.C b/applications/solvers/combustion/engineFoam/engineFoam.C index b7f94eb6f7..544b967a16 100644 --- a/applications/solvers/combustion/engineFoam/engineFoam.C +++ b/applications/solvers/combustion/engineFoam/engineFoam.C @@ -53,7 +53,7 @@ Description #include "engineTime.H" #include "engineMesh.H" #include "hhuCombustionThermo.H" -#include "RASModel.H" +#include "turbulenceModel.H" #include "laminarFlameSpeed.H" #include "ignition.H" #include "Switch.H" diff --git a/applications/solvers/combustion/reactingFoam/Make/options b/applications/solvers/combustion/reactingFoam/Make/options index 2753c31bf0..908472524a 100644 --- a/applications/solvers/combustion/reactingFoam/Make/options +++ b/applications/solvers/combustion/reactingFoam/Make/options @@ -1,18 +1,19 @@ EXE_INC = \ -I../XiFoam \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ - -I$(LIB_SRC)/ODE/lnInclude + -I$(LIB_SRC)/ODE/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -lcompressibleRASModels \ + -lcompressibleLESModels \ -lcombustionThermophysicalModels \ - -lfiniteVolume \ -lspecie \ -lbasicThermophysicalModels \ -lchemistryModel \ - -lODE + -lODE \ + -lfiniteVolume diff --git a/applications/solvers/combustion/reactingFoam/createFields.H b/applications/solvers/combustion/reactingFoam/createFields.H index c07aa63cdb..cf0532b0f3 100644 --- a/applications/solvers/combustion/reactingFoam/createFields.H +++ b/applications/solvers/combustion/reactingFoam/createFields.H @@ -58,9 +58,9 @@ volScalarField kappa ); Info << "Creating turbulence model.\n" << nl; -autoPtr turbulence +autoPtr turbulence ( - compressible::RASModel::New + compressible::turbulenceModel::New ( rho, U, @@ -70,7 +70,7 @@ autoPtr turbulence ); Info<< "Creating field DpDt\n" << endl; -volScalarField DpDt = +volScalarField DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); Info << "Constructing chemical mechanism" << endl; diff --git a/applications/solvers/combustion/reactingFoam/reactingFoam.C b/applications/solvers/combustion/reactingFoam/reactingFoam.C index e4773559a6..ad91e392ee 100644 --- a/applications/solvers/combustion/reactingFoam/reactingFoam.C +++ b/applications/solvers/combustion/reactingFoam/reactingFoam.C @@ -32,7 +32,7 @@ Description #include "fvCFD.H" #include "hCombustionThermo.H" -#include "compressible/RASModel/RASModel.H" +#include "turbulenceModel.H" #include "chemistryModel.H" #include "chemistrySolver.H" #include "multivariateScheme.H" diff --git a/applications/solvers/compressible/coodles/Make/files b/applications/solvers/compressible/coodles/Make/files deleted file mode 100644 index fe1849f0ad..0000000000 --- a/applications/solvers/compressible/coodles/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -coodles.C - -EXE = $(FOAM_APPBIN)/coodles diff --git a/applications/solvers/compressible/coodles/createFields.H b/applications/solvers/compressible/coodles/createFields.H deleted file mode 100644 index 5b02f0c4db..0000000000 --- a/applications/solvers/compressible/coodles/createFields.H +++ /dev/null @@ -1,50 +0,0 @@ - Info<< "Reading thermophysical properties\n" << endl; - - autoPtr thermo - ( - basicThermo::New(mesh) - ); - - volScalarField& p = thermo->p(); - volScalarField& h = thermo->h(); - const volScalarField& psi = thermo->psi(); - - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - thermo->rho() - ); - - Info<< "\nReading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - -# include "compressibleCreatePhi.H" - - - Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence - ( - compressible::LESModel::New(rho, U, phi, thermo()) - ); - - Info<< "Creating field DpDt\n" << endl; - volScalarField DpDt = - fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/compressible/rhoPimpleFoam/Make/options b/applications/solvers/compressible/rhoPimpleFoam/Make/options index c33e5a1da8..4858e53f30 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoPimpleFoam/Make/options @@ -1,12 +1,13 @@ EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/cfdTools \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/finiteVolume/cfdTools \ + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lfiniteVolume \ - -lmeshTools \ -lbasicThermophysicalModels \ -lspecie \ - -lcompressibleRASModels + -lcompressibleRASModels \ + -lcompressibleLESModels \ + -lfiniteVolume \ + -lmeshTools diff --git a/applications/solvers/compressible/rhoPimpleFoam/createFields.H b/applications/solvers/compressible/rhoPimpleFoam/createFields.H index 5704a66403..e836704cb1 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoPimpleFoam/createFields.H @@ -44,9 +44,9 @@ ); Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence + autoPtr turbulence ( - compressible::RASModel::New + compressible::turbulenceModel::New ( rho, U, @@ -59,5 +59,5 @@ Info<< "Creating field DpDt\n" << endl; - volScalarField DpDt = + volScalarField DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C index 858d83749e..0d85a699bf 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C @@ -26,8 +26,8 @@ Application rhoPimpleFoam Description - Transient solver for turbulent flow of compressible fluids for - ventilation and heat-transfer. + Transient solver for laminar or turbulent flow of compressible fluids + for HVAC and similar applications. Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and pseudo-transient simulations. @@ -36,8 +36,8 @@ Description #include "fvCFD.H" #include "basicThermo.H" -#include "compressible/RASModel/RASModel.H" -#include "fixedGradientFvPatchFields.H" +#include "turbulenceModel.H" +#include "bound.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/compressible/rhoPisoFoam/Make/files b/applications/solvers/compressible/rhoPisoFoam/Make/files new file mode 100644 index 0000000000..3c89295014 --- /dev/null +++ b/applications/solvers/compressible/rhoPisoFoam/Make/files @@ -0,0 +1,3 @@ +rhoPisoFoam.C + +EXE = $(FOAM_APPBIN)/rhoPisoFoam diff --git a/applications/solvers/compressible/coodles/Make/options b/applications/solvers/compressible/rhoPisoFoam/Make/options similarity index 64% rename from applications/solvers/compressible/coodles/Make/options rename to applications/solvers/compressible/rhoPisoFoam/Make/options index 9d53cd4819..5c62488b65 100644 --- a/applications/solvers/compressible/coodles/Make/options +++ b/applications/solvers/compressible/rhoPisoFoam/Make/options @@ -1,13 +1,13 @@ EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/LES \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ -lbasicThermophysicalModels \ -lspecie \ + -lcompressibleRASModels \ -lcompressibleLESModels diff --git a/applications/solvers/compressible/coodles/UEqn.H b/applications/solvers/compressible/rhoPisoFoam/UEqn.H similarity index 100% rename from applications/solvers/compressible/coodles/UEqn.H rename to applications/solvers/compressible/rhoPisoFoam/UEqn.H diff --git a/applications/solvers/compressible/rhoTurbFoam/createFields.H b/applications/solvers/compressible/rhoPisoFoam/createFields.H similarity index 88% rename from applications/solvers/compressible/rhoTurbFoam/createFields.H rename to applications/solvers/compressible/rhoPisoFoam/createFields.H index a523aa36d5..614f01702d 100644 --- a/applications/solvers/compressible/rhoTurbFoam/createFields.H +++ b/applications/solvers/compressible/rhoPisoFoam/createFields.H @@ -40,18 +40,18 @@ Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence + autoPtr turbulence ( - compressible::RASModel::New + compressible::turbulenceModel::New ( rho, U, phi, thermo() ) - ); - + ); + Info<< "Creating field DpDt\n" << endl; - volScalarField DpDt = + volScalarField DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/compressible/coodles/hEqn.H b/applications/solvers/compressible/rhoPisoFoam/hEqn.H similarity index 100% rename from applications/solvers/compressible/coodles/hEqn.H rename to applications/solvers/compressible/rhoPisoFoam/hEqn.H diff --git a/applications/solvers/compressible/coodles/pEqn.H b/applications/solvers/compressible/rhoPisoFoam/pEqn.H similarity index 100% rename from applications/solvers/compressible/coodles/pEqn.H rename to applications/solvers/compressible/rhoPisoFoam/pEqn.H diff --git a/applications/solvers/compressible/coodles/coodles.C b/applications/solvers/compressible/rhoPisoFoam/rhoPisoFoam.C similarity index 83% rename from applications/solvers/compressible/coodles/coodles.C rename to applications/solvers/compressible/rhoPisoFoam/rhoPisoFoam.C index 0cb902336e..4a625bdb83 100644 --- a/applications/solvers/compressible/coodles/coodles.C +++ b/applications/solvers/compressible/rhoPisoFoam/rhoPisoFoam.C @@ -23,18 +23,16 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Application - coodles + rhoPisoFoam Description - Compressible LES solver. + Transient PISO solver for compressible, laminar or turbulent flow. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" #include "basicThermo.H" -#include "compressible/LESModel/LESModel.H" - -#define divDevRhoReff divDevRhoBeff +#include "turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -45,16 +43,27 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createMesh.H" #include "createFields.H" + #include "readPISOControls.H" #include "initContinuityErrs.H" + #include "readTimeControls.H" + #include "compressibleCourantNo.H" + #include "setInitialDeltaT.H" + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; - for (runTime++; !runTime.end(); runTime++) + while (runTime.run()) { - Info<< "Time = " << runTime.timeName() << nl << endl; - + #include "readTimeControls.H" #include "readPISOControls.H" #include "compressibleCourantNo.H" + #include "setDeltaT.H" + + runTime++; + + Info<< "Time = " << runTime.timeName() << nl << endl; #include "rhoEqn.H" #include "UEqn.H" diff --git a/applications/solvers/compressible/rhoPorousSimpleFoam/Make/options b/applications/solvers/compressible/rhoPorousSimpleFoam/Make/options index 6d8c3fe27a..e02ce02628 100644 --- a/applications/solvers/compressible/rhoPorousSimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoPorousSimpleFoam/Make/options @@ -1,13 +1,14 @@ EXE_INC = \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel \ -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS + -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ - -lfiniteVolume \ - -lmeshTools \ -lbasicThermophysicalModels \ -lspecie \ - -lcompressibleRASModels + -lcompressibleRASModels \ + -lfiniteVolume \ + -lmeshTools diff --git a/applications/solvers/compressible/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C b/applications/solvers/compressible/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C index cba0c2dce1..df2373512b 100644 --- a/applications/solvers/compressible/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C +++ b/applications/solvers/compressible/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C @@ -33,7 +33,7 @@ Description #include "fvCFD.H" #include "basicThermo.H" -#include "compressible/RASModel/RASModel.H" +#include "RASModel.H" #include "porousZones.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/compressible/rhoSimpleFoam/Make/options b/applications/solvers/compressible/rhoSimpleFoam/Make/options index c33e5a1da8..39cd4533e3 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoSimpleFoam/Make/options @@ -1,12 +1,13 @@ EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/cfdTools \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel \ + -I$(LIB_SRC)/finiteVolume/cfdTools \ + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lfiniteVolume \ - -lmeshTools \ -lbasicThermophysicalModels \ -lspecie \ - -lcompressibleRASModels + -lcompressibleRASModels \ + -lfiniteVolume \ + -lmeshTools diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C b/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C index edfe329902..efabfc9ef8 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C @@ -26,27 +26,26 @@ Application rhoSimpleFoam Description - Steady-state solver for turbulent flow of compressible fluids + Steady-state SIMPLE solver for laminar or turbulent flow of + compressible fluids. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" #include "basicThermo.H" -#include "compressible/RASModel/RASModel.H" -#include "fixedGradientFvPatchFields.H" +#include "RASModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "createFields.H" + #include "initContinuityErrs.H" -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "createFields.H" -# include "initContinuityErrs.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -54,17 +53,17 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; -# include "readSIMPLEControls.H" -# include "initConvergenceCheck.H" + #include "readSIMPLEControls.H" + #include "initConvergenceCheck.H" p.storePrevIter(); rho.storePrevIter(); // Pressure-velocity SIMPLE corrector { -# include "UEqn.H" -# include "hEqn.H" -# include "pEqn.H" + #include "UEqn.H" + #include "hEqn.H" + #include "pEqn.H" } turbulence->correct(); @@ -75,7 +74,7 @@ int main(int argc, char *argv[]) << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; -# include "convergenceCheck.H" + #include "convergenceCheck.H" } Info<< "End\n" << endl; diff --git a/applications/solvers/compressible/rhoTurbFoam/Make/files b/applications/solvers/compressible/rhoTurbFoam/Make/files deleted file mode 100644 index eac0e20e76..0000000000 --- a/applications/solvers/compressible/rhoTurbFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -rhoTurbFoam.C - -EXE = $(FOAM_APPBIN)/rhoTurbFoam diff --git a/applications/solvers/compressible/rhoTurbFoam/Make/options b/applications/solvers/compressible/rhoTurbFoam/Make/options deleted file mode 100644 index e7f320c747..0000000000 --- a/applications/solvers/compressible/rhoTurbFoam/Make/options +++ /dev/null @@ -1,12 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS - -EXE_LIBS = \ - -lfiniteVolume \ - -lmeshTools \ - -lbasicThermophysicalModels \ - -lspecie \ - -lcompressibleRASModels diff --git a/applications/solvers/compressible/rhoTurbFoam/UEqn.H b/applications/solvers/compressible/rhoTurbFoam/UEqn.H deleted file mode 100644 index 64dd52b1b0..0000000000 --- a/applications/solvers/compressible/rhoTurbFoam/UEqn.H +++ /dev/null @@ -1,11 +0,0 @@ - fvVectorMatrix UEqn - ( - fvm::ddt(rho, U) - + fvm::div(phi, U) - + turbulence->divDevRhoReff(U) - ); - - if (momentumPredictor) - { - solve(UEqn == -fvc::grad(p)); - } diff --git a/applications/solvers/compressible/rhoTurbFoam/hEqn.H b/applications/solvers/compressible/rhoTurbFoam/hEqn.H deleted file mode 100644 index f72ef0c89c..0000000000 --- a/applications/solvers/compressible/rhoTurbFoam/hEqn.H +++ /dev/null @@ -1,12 +0,0 @@ -{ - solve - ( - fvm::ddt(rho, h) - + fvm::div(phi, h) - - fvm::laplacian(turbulence->alphaEff(), h) - == - DpDt - ); - - thermo->correct(); -} diff --git a/applications/solvers/compressible/rhoTurbFoam/pEqn.H b/applications/solvers/compressible/rhoTurbFoam/pEqn.H deleted file mode 100644 index 05db89627d..0000000000 --- a/applications/solvers/compressible/rhoTurbFoam/pEqn.H +++ /dev/null @@ -1,68 +0,0 @@ -rho = thermo->rho(); - -volScalarField rUA = 1.0/UEqn.A(); -U = rUA*UEqn.H(); - -if (transonic) -{ - surfaceScalarField phid - ( - "phid", - fvc::interpolate(thermo->psi()) - *( - (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) - ) - ); - - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) - { - fvScalarMatrix pEqn - ( - fvm::ddt(psi, p) - + fvm::div(phid, p) - - fvm::laplacian(rho*rUA, p) - ); - - pEqn.solve(); - - if (nonOrth == nNonOrthCorr) - { - phi == pEqn.flux(); - } - } -} -else -{ - phi = - fvc::interpolate(rho)* - ( - (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) - ); - - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) - { - fvScalarMatrix pEqn - ( - fvm::ddt(psi, p) - + fvc::div(phi) - - fvm::laplacian(rho*rUA, p) - ); - - pEqn.solve(); - - if (nonOrth == nNonOrthCorr) - { - phi += pEqn.flux(); - } - } -} - -#include "rhoEqn.H" -#include "compressibleContinuityErrs.H" - -U -= rUA*fvc::grad(p); -U.correctBoundaryConditions(); - -DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/compressible/rhoTurbFoam/rhoTurbFoam.C b/applications/solvers/compressible/rhoTurbFoam/rhoTurbFoam.C deleted file mode 100644 index 1e5ea33405..0000000000 --- a/applications/solvers/compressible/rhoTurbFoam/rhoTurbFoam.C +++ /dev/null @@ -1,96 +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 - rhoTurbFoam - -Description - Transient solver for compressible, turbulent flow. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "basicThermo.H" -#include "compressible/RASModel/RASModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - -# include "setRootCase.H" - -# include "createTime.H" -# include "createMesh.H" -# include "createFields.H" -# include "readPISOControls.H" -# include "initContinuityErrs.H" -# include "readTimeControls.H" -# include "compressibleCourantNo.H" -# include "setInitialDeltaT.H" - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { -# include "readTimeControls.H" -# include "readPISOControls.H" -# include "compressibleCourantNo.H" -# include "setDeltaT.H" - - runTime++; - - Info<< "Time = " << runTime.timeName() << nl << endl; - -# include "rhoEqn.H" -# include "UEqn.H" - - // --- PISO loop - for (int corr=1; corr<=nCorr; corr++) - { -# include "hEqn.H" -# include "pEqn.H" - } - - turbulence->correct(); - - rho = thermo->rho(); - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return(0); -} - - -// ************************************************************************* // diff --git a/applications/solvers/compressible/sonicDyMFoam/Make/files b/applications/solvers/compressible/sonicDyMFoam/Make/files new file mode 100644 index 0000000000..08fa87a2cc --- /dev/null +++ b/applications/solvers/compressible/sonicDyMFoam/Make/files @@ -0,0 +1,3 @@ +sonicDyMFoam.C + +EXE = $(FOAM_APPBIN)/sonicDyMFoam diff --git a/applications/solvers/compressible/sonicTurbFoam/Make/options b/applications/solvers/compressible/sonicDyMFoam/Make/options similarity index 50% rename from applications/solvers/compressible/sonicTurbFoam/Make/options rename to applications/solvers/compressible/sonicDyMFoam/Make/options index 44a57f741c..f05f52d427 100644 --- a/applications/solvers/compressible/sonicTurbFoam/Make/options +++ b/applications/solvers/compressible/sonicDyMFoam/Make/options @@ -1,12 +1,16 @@ EXE_INC = \ -I../sonicFoam \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/dynamicMesh/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ - -lfiniteVolume \ - -lmeshTools \ - -lcompressibleRASModels \ -lbasicThermophysicalModels \ - -lspecie + -lspecie \ + -lcompressibleRASModels \ + -lcompressibleLESModels \ + -lfiniteVolume \ + -ldynamicMesh \ + -lmeshTools diff --git a/applications/solvers/compressible/sonicFoamAutoMotion/compressibleContinuityErrs.H b/applications/solvers/compressible/sonicDyMFoam/compressibleContinuityErrs.H similarity index 100% rename from applications/solvers/compressible/sonicFoamAutoMotion/compressibleContinuityErrs.H rename to applications/solvers/compressible/sonicDyMFoam/compressibleContinuityErrs.H diff --git a/applications/solvers/compressible/sonicTurbFoam/createFields.H b/applications/solvers/compressible/sonicDyMFoam/createFields.H similarity index 89% rename from applications/solvers/compressible/sonicTurbFoam/createFields.H rename to applications/solvers/compressible/sonicDyMFoam/createFields.H index d3cb63d212..eb45a7c23a 100644 --- a/applications/solvers/compressible/sonicTurbFoam/createFields.H +++ b/applications/solvers/compressible/sonicDyMFoam/createFields.H @@ -38,9 +38,9 @@ Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence + autoPtr turbulence ( - compressible::RASModel::New + compressible::turbulenceModel::New ( rho, U, @@ -50,5 +50,5 @@ ); Info<< "Creating field DpDt\n" << endl; - volScalarField DpDt = + volScalarField DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/compressible/sonicFoamAutoMotion/readThermodynamicProperties.H b/applications/solvers/compressible/sonicDyMFoam/readThermodynamicProperties.H similarity index 100% rename from applications/solvers/compressible/sonicFoamAutoMotion/readThermodynamicProperties.H rename to applications/solvers/compressible/sonicDyMFoam/readThermodynamicProperties.H diff --git a/applications/solvers/compressible/sonicFoamAutoMotion/readTransportProperties.H b/applications/solvers/compressible/sonicDyMFoam/readTransportProperties.H similarity index 100% rename from applications/solvers/compressible/sonicFoamAutoMotion/readTransportProperties.H rename to applications/solvers/compressible/sonicDyMFoam/readTransportProperties.H diff --git a/applications/solvers/compressible/sonicFoamAutoMotion/sonicFoamAutoMotion.C b/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C similarity index 77% rename from applications/solvers/compressible/sonicFoamAutoMotion/sonicFoamAutoMotion.C rename to applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C index 445f88d578..16bf90abd3 100644 --- a/applications/solvers/compressible/sonicFoamAutoMotion/sonicFoamAutoMotion.C +++ b/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C @@ -23,31 +23,30 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Application - sonicFoamAutoMotion + sonicDyMFoam Description - Transient solver for trans-sonic/supersonic, laminar flow of a - compressible gas with mesh motion.. + Transient solver for trans-sonic/supersonic, laminar or turbulent flow + of a compressible gas with mesh motion.. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "basicThermo.H" +#include "turbulenceModel.H" #include "motionSolver.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "createFields.H" + #include "initContinuityErrs.H" -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "readThermodynamicProperties.H" -# include "readTransportProperties.H" -# include "createFields.H" -# include "initContinuityErrs.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -57,34 +56,24 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; -# include "readPISOControls.H" -# include "compressibleCourantNo.H" + #include "readPISOControls.H" + #include "compressibleCourantNo.H" mesh.movePoints(motionPtr->newPoints()); -# include "rhoEqn.H" + #include "rhoEqn.H" fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(phi, U) - - fvm::laplacian(mu, U) + + turbulence->divDevRhoReff(U) ); solve(UEqn == -fvc::grad(p)); - solve - ( - fvm::ddt(rho, e) - + fvm::div(phi, e) - - fvm::laplacian(mu, e) - == - - p*fvc::div(phi/fvc::interpolate(rho) + fvc::meshPhi(rho, U)) - + mu*magSqr(symm(fvc::grad(U))) - ); + #include "hEqn.H" - T = e/Cv; - psi = 1.0/(R*T); // --- PISO loop @@ -115,12 +104,24 @@ int main(int argc, char *argv[]) phi = pEqn.flux(); } -# include "compressibleContinuityErrs.H" + #include "compressibleContinuityErrs.H" U -= fvc::grad(p)/UEqn.A(); U.correctBoundaryConditions(); } + DpDt = fvc::DDt + ( + surfaceScalarField + ( + "phiU", + phi/fvc::interpolate(rho) + fvc::meshPhi(rho, U) + ), + p + ); + + turbulence->correct(); + rho = psi*p; runTime.write(); diff --git a/applications/solvers/compressible/sonicFoam/Make/options b/applications/solvers/compressible/sonicFoam/Make/options index 725122ea1d..ecfde60eee 100644 --- a/applications/solvers/compressible/sonicFoam/Make/options +++ b/applications/solvers/compressible/sonicFoam/Make/options @@ -1,4 +1,12 @@ EXE_INC = \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude -EXE_LIBS = -lfiniteVolume +EXE_LIBS = \ + -lbasicThermophysicalModels \ + -lspecie \ + -lcompressibleRASModels \ + -lcompressibleLESModels \ + -lfiniteVolume \ + -lmeshTools diff --git a/applications/solvers/compressible/sonicFoam/createFields.H b/applications/solvers/compressible/sonicFoam/createFields.H index 201b9ea176..eb45a7c23a 100644 --- a/applications/solvers/compressible/sonicFoam/createFields.H +++ b/applications/solvers/compressible/sonicFoam/createFields.H @@ -1,49 +1,25 @@ - Info<< "Reading field p\n" << endl; - volScalarField p + Info<< "Reading thermophysical properties\n" << endl; + + autoPtr thermo + ( + basicThermo::New(mesh) + ); + + volScalarField& p = thermo->p(); + volScalarField& h = thermo->h(); + const volScalarField& psi = thermo->psi(); + + volScalarField rho ( IOobject ( - "p", + "rho", runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE + mesh ), - mesh + thermo->rho() ); - - Info<< "Reading field T\n" << endl; - volScalarField T - ( - IOobject - ( - "T", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - - Info<< "Calculating field e from T\n" << endl; - volScalarField e - ( - IOobject - ( - "e", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - Cv*T, - T.boundaryField().types() - ); - - Info<< "Reading field U\n" << endl; volVectorField U ( @@ -58,29 +34,21 @@ mesh ); - volScalarField psi - ( - IOobject - ( - "psi", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - 1.0/(R*T) - ); - psi.oldTime(); - - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh - ), - psi*p - ); - # include "compressibleCreatePhi.H" + + + Info<< "Creating turbulence model\n" << endl; + autoPtr turbulence + ( + compressible::turbulenceModel::New + ( + rho, + U, + phi, + thermo() + ) + ); + + Info<< "Creating field DpDt\n" << endl; + volScalarField DpDt = + fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/compressible/sonicTurbFoam/hEqn.H b/applications/solvers/compressible/sonicFoam/hEqn.H similarity index 100% rename from applications/solvers/compressible/sonicTurbFoam/hEqn.H rename to applications/solvers/compressible/sonicFoam/hEqn.H diff --git a/applications/solvers/compressible/sonicFoam/sonicFoam.C b/applications/solvers/compressible/sonicFoam/sonicFoam.C index 5abdad2cef..7f607874d7 100644 --- a/applications/solvers/compressible/sonicFoam/sonicFoam.C +++ b/applications/solvers/compressible/sonicFoam/sonicFoam.C @@ -26,27 +26,26 @@ Application sonicFoam Description - Transient solver for trans-sonic/supersonic, laminar flow of a - compressible gas. + Transient solver for trans-sonic/supersonic, laminar or turbulent flow + of a compressible gas. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "basicThermo.H" +#include "turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "createFields.H" + #include "initContinuityErrs.H" -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "readThermodynamicProperties.H" -# include "readTransportProperties.H" -# include "createFields.H" -# include "initContinuityErrs.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -54,35 +53,25 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; -# include "readPISOControls.H" -# include "compressibleCourantNo.H" + #include "readPISOControls.H" + #include "compressibleCourantNo.H" -# include "rhoEqn.H" + #include "rhoEqn.H" fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(phi, U) - - fvm::laplacian(mu, U) + + turbulence->divDevRhoReff(U) ); solve(UEqn == -fvc::grad(p)); - solve - ( - fvm::ddt(rho, e) - + fvm::div(phi, e) - - fvm::laplacian(mu, e) - == - - p*fvc::div(phi/fvc::interpolate(rho)) - + mu*magSqr(symm(fvc::grad(U))) - ); - - T = e/Cv; - psi = 1.0/(R*T); + #include "hEqn.H" // --- PISO loop + for (int corr=0; corrpsi()) *( (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, rho, U, phi) - ) + ) ); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) @@ -109,15 +98,23 @@ int main(int argc, char *argv[]) pEqn.solve(); - phi = pEqn.flux(); + if (nonOrth == nNonOrthCorr) + { + phi = pEqn.flux(); + } } -# include "compressibleContinuityErrs.H" + #include "compressibleContinuityErrs.H" U -= rUA*fvc::grad(p); U.correctBoundaryConditions(); } + DpDt = + fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); + + turbulence->correct(); + rho = psi*p; runTime.write(); diff --git a/applications/solvers/compressible/sonicFoamAutoMotion/Make/files b/applications/solvers/compressible/sonicFoamAutoMotion/Make/files deleted file mode 100644 index de9936304d..0000000000 --- a/applications/solvers/compressible/sonicFoamAutoMotion/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -sonicFoamAutoMotion.C - -EXE = $(FOAM_APPBIN)/sonicFoamAutoMotion diff --git a/applications/solvers/compressible/sonicFoamAutoMotion/Make/options b/applications/solvers/compressible/sonicFoamAutoMotion/Make/options deleted file mode 100644 index 9b8c3dea8c..0000000000 --- a/applications/solvers/compressible/sonicFoamAutoMotion/Make/options +++ /dev/null @@ -1,9 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude - -EXE_LIBS = \ - -lfiniteVolume \ - -ldynamicMesh \ - -lmeshTools diff --git a/applications/solvers/compressible/sonicFoamAutoMotion/createFields.H b/applications/solvers/compressible/sonicFoamAutoMotion/createFields.H deleted file mode 100644 index d50b21d8d2..0000000000 --- a/applications/solvers/compressible/sonicFoamAutoMotion/createFields.H +++ /dev/null @@ -1,103 +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 T\n" << endl; - volScalarField T - ( - IOobject - ( - "T", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - - Info<< "Calculating field e from T\n" << endl; - volScalarField e - ( - IOobject - ( - "e", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - Cv*T, - T.boundaryField().types() - ); - - - Info<< "Reading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - - volScalarField psi - ( - IOobject - ( - "psi", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - 1.0/(R*T) - ); - psi.oldTime(); - - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh - ), - psi*p - ); - -# include "compressibleCreatePhi.H" - - - Info<< "Creating field phid\n" << endl; - surfaceScalarField phid - ( - IOobject - ( - "phid", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - phi/fvc::interpolate(p), - phi.boundaryField().types() - ); diff --git a/applications/solvers/compressible/sonicTurbFoam/Make/files b/applications/solvers/compressible/sonicTurbFoam/Make/files deleted file mode 100644 index b4639b1934..0000000000 --- a/applications/solvers/compressible/sonicTurbFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -sonicTurbFoam.C - -EXE = $(FOAM_APPBIN)/sonicTurbFoam diff --git a/applications/solvers/compressible/sonicTurbFoam/sonicTurbFoam.C b/applications/solvers/compressible/sonicTurbFoam/sonicTurbFoam.C deleted file mode 100644 index 321295a79f..0000000000 --- a/applications/solvers/compressible/sonicTurbFoam/sonicTurbFoam.C +++ /dev/null @@ -1,135 +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 - sonicFoam - -Description - Transient solver for trans-sonic/supersonic, turbulent flow of a - compressible gas. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "basicThermo.H" -#include "compressible/RASModel/RASModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.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 "compressibleCourantNo.H" - -# include "rhoEqn.H" - - fvVectorMatrix UEqn - ( - fvm::ddt(rho, U) - + fvm::div(phi, U) - + turbulence->divDevRhoReff(U) - ); - - solve(UEqn == -fvc::grad(p)); - -# include "hEqn.H" - - - // --- PISO loop - - for (int corr=0; corrpsi()) - *( - (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) - ) - ); - - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) - { - fvScalarMatrix pEqn - ( - fvm::ddt(psi, p) - + fvm::div(phid, p) - - fvm::laplacian(rho*rUA, p) - ); - - pEqn.solve(); - - if (nonOrth == nNonOrthCorr) - { - phi = pEqn.flux(); - } - } - -# include "compressibleContinuityErrs.H" - - U -= rUA*fvc::grad(p); - U.correctBoundaryConditions(); - } - - DpDt = - fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); - - turbulence->correct(); - - rho = psi*p; - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return(0); -} - - -// ************************************************************************* // diff --git a/applications/solvers/heatTransfer/buoyantFoam/Make/options b/applications/solvers/heatTransfer/buoyantFoam/Make/options index f0695e5ccb..9ac482d92e 100644 --- a/applications/solvers/heatTransfer/buoyantFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantFoam/Make/options @@ -1,12 +1,13 @@ EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ - -I../XiFoam + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I../XiFoam \ + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lfiniteVolume \ -lmeshTools \ -lbasicThermophysicalModels \ -lspecie \ - -lcompressibleRASModels + -lcompressibleRASModels \ + -lcompressibleLESModels \ + -lfiniteVolume diff --git a/applications/solvers/heatTransfer/buoyantFoam/buoyantFoam.C b/applications/solvers/heatTransfer/buoyantFoam/buoyantFoam.C index 0221283bb1..b284e7d25c 100644 --- a/applications/solvers/heatTransfer/buoyantFoam/buoyantFoam.C +++ b/applications/solvers/heatTransfer/buoyantFoam/buoyantFoam.C @@ -34,7 +34,7 @@ Description #include "fvCFD.H" #include "basicThermo.H" -#include "compressible/RASModel/RASModel.H" +#include "turbulenceModel.H" #include "fixedGradientFvPatchFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/heatTransfer/buoyantFoam/createFields.H b/applications/solvers/heatTransfer/buoyantFoam/createFields.H index 0a5a098d9f..3d604d4daf 100644 --- a/applications/solvers/heatTransfer/buoyantFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantFoam/createFields.H @@ -41,9 +41,9 @@ Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence + autoPtr turbulence ( - compressible::RASModel::New + compressible::turbulenceModel::New ( rho, U, diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options index c33e5a1da8..321733e39b 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options @@ -1,12 +1,13 @@ EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/cfdTools \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ + -I$(LIB_SRC)/finiteVolume/cfdTools \ + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lfiniteVolume \ -lmeshTools \ -lbasicThermophysicalModels \ -lspecie \ - -lcompressibleRASModels + -lcompressibleRASModels \ + -lfiniteVolume diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C index 3beb759bd7..77ca411389 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C @@ -32,7 +32,7 @@ Description #include "fvCFD.H" #include "basicThermo.H" -#include "compressible/RASModel/RASModel.H" +#include "RASModel.H" #include "fixedGradientFvPatchFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options index 9f865bc1b7..bd4dd4339a 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options @@ -1,14 +1,16 @@ EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/cfdTools \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/RAS \ + -I$(LIB_SRC)/finiteVolume/cfdTools \ + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lfiniteVolume \ - -lmeshTools \ -lbasicThermophysicalModels \ -lspecie \ -lradiation \ - -lcompressibleRASModels + -lcompressibleRASModels \ + -lfiniteVolume \ + -lmeshTools diff --git a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C index 4bb432d53e..1835801e7b 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C +++ b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C @@ -33,7 +33,7 @@ Description #include "fvCFD.H" #include "basicThermo.H" -#include "compressible/RASModel/RASModel.H" +#include "RASModel.H" #include "fixedGradientFvPatchFields.H" #include "radiationModel.H" diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options index 5bcd3c4ef6..a8797ca456 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options @@ -7,10 +7,11 @@ EXE_INC = \ -IderivedFvPatchFields/solidWallHeatFluxTemperatureCoupled \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel EXE_LIBS = \ - -lfiniteVolume \ -lbasicThermophysicalModels \ -lspecie \ - -lcompressibleRASModels + -lcompressibleRASModels \ + -lcompressibleLESModels \ + -lfiniteVolume diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C index a2b7e10c78..b34e28b38d 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C @@ -33,7 +33,7 @@ Description #include "fvCFD.H" #include "basicThermo.H" -#include "compressible/RASModel/RASModel.H" +#include "turbulenceModel.H" #include "fixedGradientFvPatchFields.H" #include "regionProperties.H" diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H index 39367bb6bf..907a4b8352 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H @@ -4,7 +4,7 @@ PtrList Kf(fluidRegions.size()); PtrList Uf(fluidRegions.size()); PtrList phif(fluidRegions.size()); - PtrList turb(fluidRegions.size()); + PtrList turb(fluidRegions.size()); PtrList DpDtf(fluidRegions.size()); PtrList ghf(fluidRegions.size()); PtrList pdf(fluidRegions.size()); @@ -127,9 +127,9 @@ turb.set ( i, - autoPtr + autoPtr ( - compressible::RASModel::New + compressible::turbulenceModel::New ( rhof[i], Uf[i], diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/solveEnthalpyEquation.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/solveEnthalpyEquation.C index 961be839d6..9c5a7576ef 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/solveEnthalpyEquation.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/solveEnthalpyEquation.C @@ -32,7 +32,7 @@ void solveEnthalpyEquation const volScalarField& rho, const volScalarField& DpDt, const surfaceScalarField& phi, - const compressible::RASModel& turb, + const compressible::turbulenceModel& turb, basicThermo& thermo ) { diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/solveMomentumEquation.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/solveMomentumEquation.C index 1b5bd29835..6fedd084ad 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/solveMomentumEquation.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/solveMomentumEquation.C @@ -35,7 +35,7 @@ tmp solveMomentumEquation const surfaceScalarField& phi, const volScalarField& pd, const volScalarField& gh, - const compressible::RASModel& turb + const compressible::turbulenceModel& turb ) { // Solve the Momentum equation diff --git a/applications/solvers/heatTransfer/lesBuoyantFoam/Make/files b/applications/solvers/heatTransfer/lesBuoyantFoam/Make/files deleted file mode 100644 index f0603c064e..0000000000 --- a/applications/solvers/heatTransfer/lesBuoyantFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -lesBuoyantFoam.C - -EXE = $(FOAM_APPBIN)/lesBuoyantFoam diff --git a/applications/solvers/heatTransfer/lesBuoyantFoam/Make/options b/applications/solvers/heatTransfer/lesBuoyantFoam/Make/options deleted file mode 100644 index 61a142792d..0000000000 --- a/applications/solvers/heatTransfer/lesBuoyantFoam/Make/options +++ /dev/null @@ -1,13 +0,0 @@ -EXE_INC = \ - -I../buoyantFoam \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/LES \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude - -EXE_LIBS = \ - -lfiniteVolume \ - -lmeshTools \ - -lbasicThermophysicalModels \ - -lspecie \ - -lcompressibleLESModels diff --git a/applications/solvers/heatTransfer/lesBuoyantFoam/createFields.H b/applications/solvers/heatTransfer/lesBuoyantFoam/createFields.H deleted file mode 100644 index 7b63660f7e..0000000000 --- a/applications/solvers/heatTransfer/lesBuoyantFoam/createFields.H +++ /dev/null @@ -1,75 +0,0 @@ - Info<< "Reading thermophysical properties\n" << endl; - - autoPtr thermo - ( - basicThermo::New(mesh) - ); - - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - thermo->rho() - ); - - volScalarField& p = thermo->p(); - volScalarField& h = thermo->h(); - const volScalarField& psi = thermo->psi(); - - - Info<< "Reading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - #include "compressibleCreatePhi.H" - - - Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence - ( - compressible::LESModel::New(rho, U, phi, thermo()) - ); - - - Info<< "Creating field dpdt\n" << endl; - volScalarField dpdt = fvc::ddt(p); - - Info<< "Calculating field g.h\n" << endl; - volScalarField gh("gh", g & mesh.C()); - - dimensionedScalar pRef("pRef", p.dimensions(), thermo->lookup("pRef")); - - Info<< "Creating field pd\n" << endl; - volScalarField pd - ( - IOobject - ( - "pd", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - p = pd + rho*gh + pRef; - thermo->correct(); - - dimensionedScalar initialMass = fvc::domainIntegrate(rho); diff --git a/applications/solvers/heatTransfer/lesBuoyantFoam/lesBuoyantFoam.C b/applications/solvers/heatTransfer/lesBuoyantFoam/lesBuoyantFoam.C deleted file mode 100644 index ba0e6349d5..0000000000 --- a/applications/solvers/heatTransfer/lesBuoyantFoam/lesBuoyantFoam.C +++ /dev/null @@ -1,96 +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 - lesBuoyantFoam - -Description - Transient Solver for buoyant, turbulent flow of compressible fluids for - ventilation and heat-transfer. Turbulence is modelled using a run-time - selectable compressible LES model. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "basicThermo.H" -#include "compressible/LESModel/LESModel.H" - -#define divDevRhoReff divDevRhoBeff - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "readEnvironmentalProperties.H" -# include "initContinuityErrs.H" -# include "createFields.H" -# include "readTimeControls.H" -# include "compressibleCourantNo.H" -# include "setInitialDeltaT.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { -# include "readPISOControls.H" -# include "readTimeControls.H" -# include "compressibleCourantNo.H" -# include "setDeltaT.H" - - runTime++; - Info<< "Time = " << runTime.timeName() << nl << endl; - -# include "rhoEqn.H" - - turbulence->correct(); - -# include "UEqn.H" -# include "hEqn.H" - - // --- PISO loop - for (int corr=0; corr