From 5109a8d233eeff9728fe7bc9181f1aa13ea14549 Mon Sep 17 00:00:00 2001 From: henry Date: Sun, 23 Nov 2008 11:51:08 +0000 Subject: [PATCH 1/5] Added generic tumbulenceModel base class to the compressible RAS and LES models. This allows the constructions of applications which are independent of the particular type of turbulence modelling. --- .../anisotropicFilter/anisotropicFilter.H | 4 +- .../LESfilters/laplaceFilter/laplaceFilter.H | 4 +- .../LESfilters/simpleFilter/simpleFilter.H | 4 +- src/turbulenceModels/compressible/Allwmake | 2 +- .../DeardorffDiffStress/DeardorffDiffStress.C | 1 - .../DeardorffDiffStress/DeardorffDiffStress.H | 11 +- .../LES/GenEddyVisc/GenEddyVisc.C | 5 +- .../LES/GenEddyVisc/GenEddyVisc.H | 9 +- .../LES/GenSGSStress/GenSGSStress.C | 5 +- .../LES/GenSGSStress/GenSGSStress.H | 9 +- .../compressible/LES/LESModel/LESModel.C | 12 +- .../compressible/LES/LESModel/LESModel.H | 152 +++++------- .../compressible/LES/Make/options | 9 +- .../LES/Smagorinsky/Smagorinsky.C | 1 - .../LES/Smagorinsky/Smagorinsky.H | 11 +- .../LES/SpalartAllmaras/SpalartAllmaras.H | 35 ++- .../LES/dynOneEqEddy/dynOneEqEddy.C | 7 - .../LES/dynOneEqEddy/dynOneEqEddy.H | 10 +- .../LES/lowReOneEqEddy/lowReOneEqEddy.C | 1 - .../LES/lowReOneEqEddy/lowReOneEqEddy.H | 11 +- .../compressible/LES/oneEqEddy/oneEqEddy.H | 9 +- .../compressible/RAS/LRR/LRR.C | 3 +- .../compressible/RAS/LRR/LRR.H | 38 +-- .../RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C | 3 +- .../RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H | 40 ++- .../RAS/LaunderSharmaKE/LaunderSharmaKE.C | 3 +- .../RAS/LaunderSharmaKE/LaunderSharmaKE.H | 38 +-- .../compressible/RAS/Make/options | 4 +- .../compressible/RAS/RASModel/RASModel.C | 15 +- .../compressible/RAS/RASModel/RASModel.H | 36 +-- .../compressible/RAS/RASModel/newRASModel.C | 2 +- .../RAS/RNGkEpsilon/RNGkEpsilon.C | 3 +- .../RAS/RNGkEpsilon/RNGkEpsilon.H | 38 +-- .../RAS/SpalartAllmaras/SpalartAllmaras.C | 2 +- .../RAS/SpalartAllmaras/SpalartAllmaras.H | 42 ++-- .../compressible/RAS/kEpsilon/kEpsilon.C | 2 +- .../compressible/RAS/kEpsilon/kEpsilon.H | 39 ++- .../compressible/RAS/kOmegaSST/kOmegaSST.C | 2 +- .../compressible/RAS/kOmegaSST/kOmegaSST.H | 37 ++- .../compressible/RAS/laminar/laminar.C | 5 +- .../compressible/RAS/laminar/laminar.H | 11 +- .../RAS/realizableKE/realizableKE.C | 2 +- .../RAS/realizableKE/realizableKE.H | 38 +-- .../compressible/turbulenceModel/Make/files | 4 + .../compressible/turbulenceModel/Make/options | 7 + .../turbulenceModel/laminar/laminar.C | 227 +++++++++++++++++ .../turbulenceModel/laminar/laminar.H | 135 +++++++++++ .../turbulenceModel/turbulenceModel.C} | 53 +++- .../turbulenceModel/turbulenceModel.H | 229 ++++++++++++++++++ .../incompressible/LES/LESModel/LESModel.H | 12 - .../LES/spectEddyVisc/spectEddyVisc.C | 1 - .../incompressible/RAS/LRR/LRR.H | 2 +- .../RAS/LamBremhorstKE/LamBremhorstKE.H | 2 +- .../RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H | 2 +- .../RAS/LaunderSharmaKE/LaunderSharmaKE.H | 2 +- .../RAS/LienCubicKE/LienCubicKE.H | 2 +- .../RAS/LienCubicKELowRe/LienCubicKELowRe.H | 2 +- .../LienLeschzinerLowRe/LienLeschzinerLowRe.H | 2 +- .../RAS/NonlinearKEShih/NonlinearKEShih.H | 2 +- .../incompressible/RAS/QZeta/QZeta.H | 2 +- .../RAS/RNGkEpsilon/RNGkEpsilon.H | 2 +- .../RAS/SpalartAllmaras/SpalartAllmaras.H | 2 +- .../incompressible/RAS/laminar/laminar.H | 2 +- .../RAS/realizableKE/realizableKE.H | 2 +- .../incompressible/turbulenceModel/Make/files | 1 - .../turbulenceModel/turbulenceModel.C | 57 ++++- .../turbulenceModel/turbulenceModel.H | 12 + 67 files changed, 1045 insertions(+), 434 deletions(-) create mode 100644 src/turbulenceModels/compressible/turbulenceModel/Make/files create mode 100644 src/turbulenceModels/compressible/turbulenceModel/Make/options create mode 100644 src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C create mode 100644 src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H rename src/turbulenceModels/{incompressible/turbulenceModel/newTurbulenceModel.C => compressible/turbulenceModel/turbulenceModel.C} (69%) create mode 100644 src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H diff --git a/src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.H b/src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.H index 45a4e70edf..cee0a3e260 100644 --- a/src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.H +++ b/src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.H @@ -79,10 +79,10 @@ public: // Constructors - //- from components + //- Construct from components anisotropicFilter(const fvMesh& mesh, scalar widthCoeff); - //- from IOdictionary + //- Construct from IOdictionary anisotropicFilter(const fvMesh& mesh, const dictionary&); diff --git a/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.H b/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.H index 3e5760604b..324ab5ba92 100644 --- a/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.H +++ b/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.H @@ -80,10 +80,10 @@ public: // Constructors - //- from components + //- Construct from components laplaceFilter(const fvMesh& mesh, scalar widthCoeff); - //- from IOdictionary + //- Construct from IOdictionary laplaceFilter(const fvMesh& mesh, const dictionary&); diff --git a/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.H b/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.H index 4e4c5e0f47..0c9b0ebec3 100644 --- a/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.H +++ b/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.H @@ -69,10 +69,10 @@ public: // Constructors - //- from components + //- Construct from components simpleFilter(const fvMesh& mesh); - //- from IOdictionary + //- Construct from IOdictionary simpleFilter(const fvMesh& mesh, const dictionary&); diff --git a/src/turbulenceModels/compressible/Allwmake b/src/turbulenceModels/compressible/Allwmake index 4686db7027..ddff417018 100755 --- a/src/turbulenceModels/compressible/Allwmake +++ b/src/turbulenceModels/compressible/Allwmake @@ -2,7 +2,7 @@ cd ${0%/*} || exit 1 # run from this directory set -x -#wmake libso turbulenceModel +wmake libso turbulenceModel wmake libso RAS wmake libso LES diff --git a/src/turbulenceModels/compressible/LES/DeardorffDiffStress/DeardorffDiffStress.C b/src/turbulenceModels/compressible/LES/DeardorffDiffStress/DeardorffDiffStress.C index 28f31e7164..4127724ed1 100644 --- a/src/turbulenceModels/compressible/LES/DeardorffDiffStress/DeardorffDiffStress.C +++ b/src/turbulenceModels/compressible/LES/DeardorffDiffStress/DeardorffDiffStress.C @@ -43,7 +43,6 @@ addToRunTimeSelectionTable(LESModel, DeardorffDiffStress, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// from components DeardorffDiffStress::DeardorffDiffStress ( const volScalarField& rho, diff --git a/src/turbulenceModels/compressible/LES/DeardorffDiffStress/DeardorffDiffStress.H b/src/turbulenceModels/compressible/LES/DeardorffDiffStress/DeardorffDiffStress.H index bfbcb2a41b..46bf057bec 100644 --- a/src/turbulenceModels/compressible/LES/DeardorffDiffStress/DeardorffDiffStress.H +++ b/src/turbulenceModels/compressible/LES/DeardorffDiffStress/DeardorffDiffStress.H @@ -103,10 +103,9 @@ public: ); - // Destructor - - ~DeardorffDiffStress() - {} + //- Destructor + virtual ~DeardorffDiffStress() + {} // Member Functions @@ -121,10 +120,10 @@ public: } //- Correct Eddy-Viscosity and related properties - void correct(const tmp& gradU); + virtual void correct(const tmp& gradU); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.C b/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.C index c3843bb8f1..143ddc0987 100644 --- a/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.C +++ b/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.C @@ -37,7 +37,6 @@ namespace LESModels // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// from components GenEddyVisc::GenEddyVisc ( const volScalarField& rho, @@ -86,9 +85,7 @@ GenEddyVisc::GenEddyVisc ), mesh_ ) -{ -// printCoeffs(); -} +{} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.H b/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.H index cd501e9f68..2ed052c141 100644 --- a/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.H +++ b/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.H @@ -88,10 +88,9 @@ public: ); - // Destructor - - virtual ~GenEddyVisc() - {} + //- Destructor + virtual ~GenEddyVisc() + {} // Member Functions @@ -138,7 +137,7 @@ public: virtual void correct(const tmp& gradU); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.C b/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.C index 7ef8ebee76..6b861941f2 100644 --- a/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.C +++ b/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.C @@ -37,7 +37,6 @@ namespace LESModels // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// from components GenSGSStress::GenSGSStress ( const volScalarField& rho, @@ -90,9 +89,7 @@ GenSGSStress::GenSGSStress ), mesh_ ) -{ -// printCoeffs(); -} +{} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.H b/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.H index c071a7a01c..c1d53d8848 100644 --- a/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.H +++ b/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.H @@ -89,10 +89,9 @@ public: ); - // Destructor - - virtual ~GenSGSStress() - {} + //- Destructor + virtual ~GenSGSStress() + {} // Member Functions @@ -143,7 +142,7 @@ public: virtual void correct(const tmp& gradU); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C index 8591c4c7b4..01d3a4110c 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "LESModel.H" -#include "wallDist.H" +#include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -61,6 +61,8 @@ LESModel::LESModel const basicThermo& thermoPhysicalModel ) : + turbulenceModel(rho, U, phi, thermoPhysicalModel), + IOdictionary ( IOobject @@ -73,14 +75,6 @@ LESModel::LESModel ) ), - runTime_(U.time()), - mesh_(U.mesh()), - - rho_(rho), - U_(U), - phi_(phi), - thermoPhysicalModel_(thermoPhysicalModel), - printCoeffs_(lookupOrDefault("printCoeffs", false)), coeffDict_(subDict(type + "Coeffs")), diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H index ecef2d8f77..61ada48798 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H @@ -43,13 +43,13 @@ Description SourceFiles LESModel.C - newLESModel.C \*---------------------------------------------------------------------------*/ #ifndef compressibleLESModel_H #define compressibleLESModel_H +#include "turbulenceModel.H" #include "LESdelta.H" #include "fvm.H" #include "fvc.H" @@ -72,6 +72,7 @@ namespace compressible class LESModel : + public turbulenceModel, public IOdictionary { @@ -79,20 +80,6 @@ protected: // Protected data - const Time& runTime_; - const fvMesh& mesh_; - - -private: - - // Private data - - const volScalarField& rho_; - const volVectorField& U_; - const surfaceScalarField& phi_; - - const basicThermo& thermoPhysicalModel_; - Switch printCoeffs_; dictionary coeffDict_; @@ -101,21 +88,23 @@ private: autoPtr delta_; - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - LESModel(const LESModel&); - LESModel& operator=(const LESModel&); - - -protected: - // Protected Member Functions //- Print model coefficients virtual void printCoeffs(); +private: + + // Private Member Functions + + //- Disallow default bitwise copy construct + LESModel(const LESModel&); + + //- Disallow default bitwise assignment + LESModel& operator=(const LESModel&); + + public: //- Runtime type information @@ -164,76 +153,37 @@ public: ); - // Destructor - - virtual ~LESModel() - {} + //- Destructor + virtual ~LESModel() + {} // Member Functions - // Access + //- 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 the density field - inline const volScalarField& rho() const - { - return rho_; - } + //- Access function to filter width + inline const volScalarField& delta() const + { + return delta_(); + } - //- Access function to velocity field - inline const volVectorField& U() const - { - return U_; - } + //- Return the value of k0 which k is not allowed to be less than + const dimensionedScalar& k0() const + { + return k0_; + } - //- Access function to flux field - inline const surfaceScalarField& phi() const - { - return phi_; - } - - //- Access function to the thermophysical properties model - inline const basicThermo& thermo() const - { - return thermoPhysicalModel_; - } - - //- 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 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_; - } - - //- Allow k0 to be changed - dimensionedScalar& k0() - { - return k0_; - } - - //- Access function to laminar viscosity - tmp mu() const - { - return thermoPhysicalModel_.mu(); - } - - //- Access function to laminar thermal conductivity - tmp alpha() const - { - return thermoPhysicalModel_.alpha(); - } + //- Allow k0 to be changed + dimensionedScalar& k0() + { + return k0_; + } //- Return the SGS turbulent kinetic energy. @@ -268,6 +218,34 @@ public: // This is the additional term due to the filtering of the NSE. virtual tmp divDevRhoBeff(volVectorField& U) const = 0; + + // RAS compatibility functions for the turbulenceModel base class + + //- Return the turbulence viscosity + virtual tmp mut() const + { + return muSgs(); + } + + //- Return the Reynolds stress tensor + virtual tmp R() const + { + return B(); + } + + //- Return the effective stress tensor including the laminar stress + virtual tmp devRhoReff() const + { + return devRhoBeff(); + } + + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff(volVectorField& U) const + { + return divDevRhoBeff(U); + } + + //- Correct Eddy-Viscosity and related properties. // This calls correct(const tmp& gradU) by supplying // gradU calculated locally. diff --git a/src/turbulenceModels/compressible/LES/Make/options b/src/turbulenceModels/compressible/LES/Make/options index 4ccb52fba2..b8d3ee786e 100644 --- a/src/turbulenceModels/compressible/LES/Make/options +++ b/src/turbulenceModels/compressible/LES/Make/options @@ -1,11 +1,14 @@ EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ + -I../turbulenceModel/lnInclude \ -I../../LES/LESdeltas/lnInclude \ -I../../LES/LESfilters/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = \ + -lcompressibleTurbulenceModel \ -lLESdeltas \ -lLESfilters \ + -lfiniteVolume \ -lmeshTools diff --git a/src/turbulenceModels/compressible/LES/Smagorinsky/Smagorinsky.C b/src/turbulenceModels/compressible/LES/Smagorinsky/Smagorinsky.C index 547fd60f5e..1bb1098489 100644 --- a/src/turbulenceModels/compressible/LES/Smagorinsky/Smagorinsky.C +++ b/src/turbulenceModels/compressible/LES/Smagorinsky/Smagorinsky.C @@ -43,7 +43,6 @@ addToRunTimeSelectionTable(LESModel, Smagorinsky, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// from components Smagorinsky::Smagorinsky ( const volScalarField& rho, diff --git a/src/turbulenceModels/compressible/LES/Smagorinsky/Smagorinsky.H b/src/turbulenceModels/compressible/LES/Smagorinsky/Smagorinsky.H index e5d786f94a..03d056def0 100644 --- a/src/turbulenceModels/compressible/LES/Smagorinsky/Smagorinsky.H +++ b/src/turbulenceModels/compressible/LES/Smagorinsky/Smagorinsky.H @@ -98,19 +98,18 @@ public: ); - // Destructor - - ~Smagorinsky() - {} + //- Destructor + virtual ~Smagorinsky() + {} // Member Functions //- Correct Eddy-Viscosity and related properties - void correct(const tmp& gradU); + virtual void correct(const tmp& gradU); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.H index 67a1d7b8a8..ca94bdd613 100644 --- a/src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.H @@ -106,36 +106,35 @@ public: ); - // Destructor - - ~SpalartAllmaras() - {} + //- Destructor + virtual ~SpalartAllmaras() + {} // Member Functions - //- Return SGS kinetic energy - tmp k() const - { - return sqr(muSgs()/rho()/ck_/dTilda_); - } - - //- Return sub-grid disipation rate - tmp epsilon() const; - tmp nuTilda() const { return nuTilda_; } + //- Return SGS kinetic energy + virtual tmp k() const + { + return sqr(muSgs()/rho()/ck_/dTilda_); + } + + //- Return sub-grid disipation rate + virtual tmp epsilon() const; + //- Return SGS viscosity - tmp muSgs() const + virtual tmp muSgs() const { return muSgs_; } //- Return thermal conductivity - tmp alphaEff() const + virtual tmp alphaEff() const { return tmp ( @@ -152,13 +151,13 @@ public: //- Returns div(rho*dev(B)). // This is the additional term due to the filtering of the NSE. - tmp divDevRhoBeff(volVectorField& U) const; + virtual tmp divDevRhoBeff(volVectorField& U) const; //- Correct nuTilda and related properties - void correct(const tmp& gradU); + virtual void correct(const tmp& gradU); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/compressible/LES/dynOneEqEddy/dynOneEqEddy.C b/src/turbulenceModels/compressible/LES/dynOneEqEddy/dynOneEqEddy.C index 96bf8abbc9..64f189d8d2 100644 --- a/src/turbulenceModels/compressible/LES/dynOneEqEddy/dynOneEqEddy.C +++ b/src/turbulenceModels/compressible/LES/dynOneEqEddy/dynOneEqEddy.C @@ -76,7 +76,6 @@ dimensionedScalar dynOneEqEddy::ce_(const volSymmTensorField& D) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// from components dynOneEqEddy::dynOneEqEddy ( const volScalarField& rho, @@ -95,12 +94,6 @@ dynOneEqEddy::dynOneEqEddy } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -dynOneEqEddy::~dynOneEqEddy() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void dynOneEqEddy::correct(const tmp& tgradU) diff --git a/src/turbulenceModels/compressible/LES/dynOneEqEddy/dynOneEqEddy.H b/src/turbulenceModels/compressible/LES/dynOneEqEddy/dynOneEqEddy.H index 3ffeb9c5db..3f0abdb544 100644 --- a/src/turbulenceModels/compressible/LES/dynOneEqEddy/dynOneEqEddy.H +++ b/src/turbulenceModels/compressible/LES/dynOneEqEddy/dynOneEqEddy.H @@ -110,8 +110,8 @@ public: // Destructor - - ~dynOneEqEddy(); + virtual ~dynOneEqEddy() + {} // Member Functions @@ -119,17 +119,17 @@ public: //- Return the effective diffusivity for k tmp DkEff() const { - return tmp + return tmp ( new volScalarField("DkEff", muSgs_ + mu()) ); } //- Correct Eddy-Viscosity and related properties - void correct(const tmp& gradU); + virtual void correct(const tmp& gradU); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/compressible/LES/lowReOneEqEddy/lowReOneEqEddy.C b/src/turbulenceModels/compressible/LES/lowReOneEqEddy/lowReOneEqEddy.C index a626068335..3d6b70f5ba 100644 --- a/src/turbulenceModels/compressible/LES/lowReOneEqEddy/lowReOneEqEddy.C +++ b/src/turbulenceModels/compressible/LES/lowReOneEqEddy/lowReOneEqEddy.C @@ -43,7 +43,6 @@ addToRunTimeSelectionTable(LESModel, lowReOneEqEddy, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// from components lowReOneEqEddy::lowReOneEqEddy ( const volScalarField& rho, diff --git a/src/turbulenceModels/compressible/LES/lowReOneEqEddy/lowReOneEqEddy.H b/src/turbulenceModels/compressible/LES/lowReOneEqEddy/lowReOneEqEddy.H index 44d74f8ea9..6ab246167e 100644 --- a/src/turbulenceModels/compressible/LES/lowReOneEqEddy/lowReOneEqEddy.H +++ b/src/turbulenceModels/compressible/LES/lowReOneEqEddy/lowReOneEqEddy.H @@ -100,10 +100,9 @@ public: ); - // Destructor - - ~lowReOneEqEddy() - {} + //- Destructor + virtual ~lowReOneEqEddy() + {} // Member Functions @@ -118,10 +117,10 @@ public: } //- Correct Eddy-Viscosity and related properties - void correct(const tmp& gradU); + virtual void correct(const tmp& gradU); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/compressible/LES/oneEqEddy/oneEqEddy.H b/src/turbulenceModels/compressible/LES/oneEqEddy/oneEqEddy.H index edd2c04d37..834983f7cf 100644 --- a/src/turbulenceModels/compressible/LES/oneEqEddy/oneEqEddy.H +++ b/src/turbulenceModels/compressible/LES/oneEqEddy/oneEqEddy.H @@ -104,9 +104,8 @@ public: // Destructor - - ~oneEqEddy() - {} + virtual ~oneEqEddy() + {} // Member Functions @@ -121,10 +120,10 @@ public: } //- Correct Eddy-Viscosity and related properties - void correct(const tmp& gradU); + virtual void correct(const tmp& gradU); //- Read turbulenceProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/compressible/RAS/LRR/LRR.C b/src/turbulenceModels/compressible/RAS/LRR/LRR.C index a22d495249..2398efc680 100644 --- a/src/turbulenceModels/compressible/RAS/LRR/LRR.C +++ b/src/turbulenceModels/compressible/RAS/LRR/LRR.C @@ -46,13 +46,12 @@ addToRunTimeSelectionTable(RASModel, LRR, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// from components LRR::LRR ( const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ) : RASModel(typeName, rho, U, phi, thermophysicalModel), diff --git a/src/turbulenceModels/compressible/RAS/LRR/LRR.H b/src/turbulenceModels/compressible/RAS/LRR/LRR.H index 0dc2ed2ad8..84016a132b 100644 --- a/src/turbulenceModels/compressible/RAS/LRR/LRR.H +++ b/src/turbulenceModels/compressible/RAS/LRR/LRR.H @@ -107,29 +107,23 @@ public: // Constructors - //- from components + //- Construct from components LRR ( const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ); - // Destructor - - ~LRR(){} + //- Destructor + virtual ~LRR() + {} // Member Functions - //- Return the turbulence viscosity - tmp mut() const - { - return mut_; - } - //- Return the effective diffusivity for R tmp DREff() const { @@ -148,8 +142,14 @@ public: ); } + //- Return the turbulence viscosity + virtual tmp mut() const + { + return mut_; + } + //- Return the effective turbulent thermal diffusivity - tmp alphaEff() const + virtual tmp alphaEff() const { return tmp ( @@ -158,34 +158,34 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const + virtual tmp epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp R() const + virtual tmp R() const { return R_; } //- Return the effective stress tensor including the laminar stress - tmp devRhoReff() const; + virtual tmp devRhoReff() const; //- Return the source term for the momentum equation - tmp divDevRhoReff(volVectorField& U) const; + virtual tmp divDevRhoReff(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/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C index 0181605fb1..c71c3c510a 100644 --- a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C @@ -48,13 +48,12 @@ addToRunTimeSelectionTable(RASModel, LaunderGibsonRSTM, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// from components LaunderGibsonRSTM::LaunderGibsonRSTM ( const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ) : RASModel(typeName, rho, U, phi, thermophysicalModel), diff --git a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H index 4fa0e9315e..21e3f98b0c 100644 --- a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H +++ b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H @@ -114,31 +114,23 @@ public: // Constructors - //- from components + //- Construct from components LaunderGibsonRSTM ( const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ); - // Destructor - - ~LaunderGibsonRSTM(){} + //- Destructor + virtual ~LaunderGibsonRSTM() + {} // Member Functions - // Access - - //- Return the turbulence viscosity - tmp mut() const - { - return mut_; - } - //- Return the effective diffusivity for R tmp DREff() const { @@ -157,8 +149,14 @@ public: ); } + //- Return the turbulence viscosity + virtual tmp mut() const + { + return mut_; + } + //- Return the effective turbulent thermal diffusivity - tmp alphaEff() const + virtual tmp alphaEff() const { return tmp ( @@ -167,34 +165,34 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const + virtual tmp epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp R() const + virtual tmp R() const { return R_; } //- Return the effective stress tensor including the laminar stress - tmp devRhoReff() const; + virtual tmp devRhoReff() const; //- Return the source term for the momentum equation - tmp divDevRhoReff(volVectorField& U) const; + virtual tmp divDevRhoReff(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/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C b/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C index b577410097..57461b3544 100644 --- a/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C +++ b/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C @@ -60,13 +60,12 @@ tmp LaunderSharmaKE::f2() const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// from components LaunderSharmaKE::LaunderSharmaKE ( const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ) : RASModel(typeName, rho, U, phi, thermophysicalModel), diff --git a/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H b/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H index 731e0cdb02..7b2add3ea6 100644 --- a/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H +++ b/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H @@ -99,29 +99,23 @@ public: // Constructors - //- from components + //- Construct from components LaunderSharmaKE ( const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ); - // Destructor - - ~LaunderSharmaKE(){} + //- Destructor + virtual ~LaunderSharmaKE() + {} // Member Functions - //- Return the turbulence viscosity - tmp mut() const - { - return mut_; - } - //- Return the effective diffusivity for k tmp DkEff() const { @@ -140,8 +134,14 @@ public: ); } + //- Return the turbulence viscosity + virtual tmp mut() const + { + return mut_; + } + //- Return the effective turbulent thermal diffusivity - tmp alphaEff() const + virtual tmp alphaEff() const { return tmp ( @@ -150,31 +150,31 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const + virtual tmp epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp R() const; + virtual tmp R() const; //- Return the effective stress tensor including the laminar stress - tmp devRhoReff() const; + virtual tmp devRhoReff() const; //- Return the source term for the momentum equation - tmp divDevRhoReff(volVectorField& U) const; + virtual tmp divDevRhoReff(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/compressible/RAS/Make/options b/src/turbulenceModels/compressible/RAS/Make/options index 6c12c9d781..996f328e69 100644 --- a/src/turbulenceModels/compressible/RAS/Make/options +++ b/src/turbulenceModels/compressible/RAS/Make/options @@ -1,8 +1,10 @@ EXE_INC = \ + -I../turbulenceModel/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude LIB_LIBS = \ + -lcompressibleTurbulenceModel \ -lfiniteVolume \ -lmeshTools diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C index c1bbdc1684..22b646e55e 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C @@ -25,9 +25,8 @@ License \*---------------------------------------------------------------------------*/ #include "RASModel.H" -#include "wallDist.H" #include "wallFvPatch.H" -#include "fixedValueFvPatchFields.H" +#include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -61,9 +60,11 @@ RASModel::RASModel const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ) : + turbulenceModel(rho, U, phi, thermophysicalModel), + IOdictionary ( IOobject @@ -76,14 +77,6 @@ RASModel::RASModel ) ), - runTime_(U.time()), - mesh_(U.mesh()), - - rho_(rho), - U_(U), - phi_(phi), - thermophysicalModel_(thermophysicalModel), - turbulence_(lookup("turbulence")), printCoeffs_(lookupOrDefault("printCoeffs", false)), coeffDict_(subDict(type + "Coeffs")), diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H index 1be29e6e79..2ff398347d 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H @@ -45,6 +45,7 @@ SourceFiles #ifndef compressibleRASModel_H #define compressibleRASModel_H +#include "turbulenceModel.H" #include "volFields.H" #include "surfaceFields.H" #include "nearWallDist.H" @@ -71,6 +72,7 @@ namespace compressible class RASModel : + public turbulenceModel, public IOdictionary { @@ -78,15 +80,6 @@ protected: // Protected data - const Time& runTime_; - const fvMesh& mesh_; - - const volScalarField& rho_; - const volVectorField& U_; - const surfaceScalarField& phi_; - - basicThermo& thermophysicalModel_; - Switch turbulence_; Switch printCoeffs_; dictionary coeffDict_; @@ -111,12 +104,6 @@ protected: //- Print model coefficients virtual void printCoeffs(); - //- Return the laminar thermal conductivity - const volScalarField& alpha() const - { - return thermophysicalModel_.alpha(); - } - private: @@ -146,7 +133,7 @@ public: const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermoPhysicalModel + const basicThermo& thermoPhysicalModel ), (rho, U, phi, thermoPhysicalModel) ); @@ -161,7 +148,7 @@ public: const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermoPhysicalModel + const basicThermo& thermoPhysicalModel ); @@ -173,14 +160,13 @@ public: const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermoPhysicalModel + const basicThermo& thermoPhysicalModel ); - // Destructor - - virtual ~RASModel() - {} + //- Destructor + virtual ~RASModel() + {} // Member Functions @@ -280,12 +266,6 @@ public: } - //- Return the laminar viscosity - const volScalarField& mu() const - { - return thermophysicalModel_.mu(); - } - //- Return the turbulence viscosity virtual tmp mut() const = 0; diff --git a/src/turbulenceModels/compressible/RAS/RASModel/newRASModel.C b/src/turbulenceModels/compressible/RAS/RASModel/newRASModel.C index 339e9ad2d2..4f5d8cea5e 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/newRASModel.C +++ b/src/turbulenceModels/compressible/RAS/RASModel/newRASModel.C @@ -40,7 +40,7 @@ autoPtr RASModel::New const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ) { word RASModelTypeName; diff --git a/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.C b/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.C index 8f6ba82321..fdc5b61763 100644 --- a/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.C +++ b/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.C @@ -46,13 +46,12 @@ addToRunTimeSelectionTable(RASModel, RNGkEpsilon, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// from components RNGkEpsilon::RNGkEpsilon ( const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ) : RASModel(typeName, rho, U, phi, thermophysicalModel), diff --git a/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.H b/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.H index 98445ced1d..da1c292a5b 100644 --- a/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.H +++ b/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.H @@ -97,29 +97,23 @@ public: // Constructors - //- from components + //- Construct from components RNGkEpsilon ( const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ); - // Destructor - - ~RNGkEpsilon(){} + //- Destructor + virtual ~RNGkEpsilon() + {} // Member Functions - //- Return the turbulence viscosity - tmp mut() const - { - return mut_; - } - //- Return the effective diffusivity for k tmp DkEff() const { @@ -138,8 +132,14 @@ public: ); } + //- Return the turbulence viscosity + virtual tmp mut() const + { + return mut_; + } + //- Return the effective turbulent thermal diffusivity - tmp alphaEff() const + virtual tmp alphaEff() const { return tmp ( @@ -148,31 +148,31 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const + virtual tmp epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp R() const; + virtual tmp R() const; //- Return the effective stress tensor including the laminar stress - tmp devRhoReff() const; + virtual tmp devRhoReff() const; //- Return the effective stress tensor including the laminar stress - tmp divDevRhoReff(volVectorField& U) const; + virtual tmp divDevRhoReff(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/compressible/RAS/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.C index d0757ab142..7918372c81 100644 --- a/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.C @@ -110,7 +110,7 @@ SpalartAllmaras::SpalartAllmaras const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ) : RASModel(typeName, rho, U, phi, thermophysicalModel), diff --git a/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.H index da3aa6fc2e..0565e05cef 100644 --- a/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.H @@ -132,30 +132,23 @@ public: // Constructors - //- from components + //- Construct from components SpalartAllmaras ( const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ); - // Destructor - - ~SpalartAllmaras() - {} + //- Destructor + virtual ~SpalartAllmaras() + {} // Member Functions - //- Return the turbulence viscosity - tmp mut() const - { - return mut_; - } - //- Return the effective diffusivity for nuTilda tmp DnuTildaEff() const { @@ -168,8 +161,15 @@ public: ) ); } - //- Return the effective turbulent thermal diffusivity - tmp alphaEff() const + + //- Return the turbulence viscosity + virtual tmp mut() const + { + return mut_; + } + + //- Return the effective turbulent thermal diffusivity + virtual tmp alphaEff() const { return tmp ( @@ -178,7 +178,7 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return tmp ( @@ -197,7 +197,7 @@ public: } //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const + virtual tmp epsilon() const { return tmp ( @@ -216,19 +216,19 @@ public: } //- Return the Reynolds stress tensor - tmp R() const; + virtual tmp R() const; //- Return the effective stress tensor including the laminar stress - tmp devRhoReff() const; + virtual tmp devRhoReff() const; //- Return the source term for the momentum equation - tmp divDevRhoReff(volVectorField& U) const; + virtual tmp divDevRhoReff(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/compressible/RAS/kEpsilon/kEpsilon.C b/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.C index cb0fecc03d..7d07a8eff3 100644 --- a/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.C +++ b/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.C @@ -51,7 +51,7 @@ kEpsilon::kEpsilon const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ) : RASModel(typeName, rho, U, phi, thermophysicalModel), diff --git a/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.H b/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.H index 76d952d40d..405ffaf206 100644 --- a/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.H +++ b/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.H @@ -97,30 +97,23 @@ public: // Constructors - //- from components + //- Construct from components kEpsilon ( const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ); - // Destructor - - ~kEpsilon() - {} + //- Destructor + virtual ~kEpsilon() + {} // Member Functions - //- Return the turbulence viscosity - tmp mut() const - { - return mut_; - } - //- Return the effective diffusivity for k tmp DkEff() const { @@ -139,8 +132,14 @@ public: ); } + //- Return the turbulence viscosity + virtual tmp mut() const + { + return mut_; + } + //- Return the effective turbulent thermal diffusivity - tmp alphaEff() const + virtual tmp alphaEff() const { return tmp ( @@ -149,31 +148,31 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const + virtual tmp epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp R() const; + virtual tmp R() const; //- Return the effective stress tensor including the laminar stress - tmp devRhoReff() const; + virtual tmp devRhoReff() const; //- Return the source term for the momentum equation - tmp divDevRhoReff(volVectorField& U) const; + virtual tmp divDevRhoReff(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/compressible/RAS/kOmegaSST/kOmegaSST.C b/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C index 1181169f87..3164794e7f 100644 --- a/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C +++ b/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C @@ -94,7 +94,7 @@ kOmegaSST::kOmegaSST const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ) : RASModel(typeName, rho, U, phi, thermophysicalModel), diff --git a/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.H b/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.H index 3f9c1486d3..950cfeeb92 100644 --- a/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.H +++ b/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.H @@ -199,23 +199,17 @@ public: const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ); - // Destructor - - ~kOmegaSST() - {} + //- Destructor + virtual ~kOmegaSST() + {} // Member Functions - tmp mut() const - { - return mut_; - } - //- Return the effective diffusivity for k tmp DkEff(const volScalarField& F1) const { @@ -234,8 +228,13 @@ public: ); } + virtual tmp mut() const + { + return mut_; + } + //- Return the effective turbulent thermal diffusivity - tmp alphaEff() const + virtual tmp alphaEff() const { return tmp ( @@ -244,18 +243,18 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return k_; } - tmp omega() const + virtual tmp omega() const { return omega_; } //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const + virtual tmp epsilon() const { return tmp ( @@ -274,19 +273,19 @@ public: } //- Return the Reynolds stress tensor - tmp R() const; + virtual tmp R() const; //- Return the effective stress tensor including the laminar stress - tmp devRhoReff() const; + virtual tmp devRhoReff() const; //- Return the source term for the momentum equation - tmp divDevRhoReff(volVectorField& U) const; + virtual tmp divDevRhoReff(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/compressible/RAS/laminar/laminar.C b/src/turbulenceModels/compressible/RAS/laminar/laminar.C index 7a24cacc7a..2f5364fb2b 100644 --- a/src/turbulenceModels/compressible/RAS/laminar/laminar.C +++ b/src/turbulenceModels/compressible/RAS/laminar/laminar.C @@ -48,7 +48,7 @@ laminar::laminar const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ) : RASModel(typeName, rho, U, phi, thermophysicalModel) @@ -171,7 +171,8 @@ tmp laminar::divDevRhoReff(volVectorField& U) const { return ( - - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(fvc::grad(U)().T())) + - fvm::laplacian(muEff(), U) + - fvc::div(muEff()*dev2(fvc::grad(U)().T())) ); } diff --git a/src/turbulenceModels/compressible/RAS/laminar/laminar.H b/src/turbulenceModels/compressible/RAS/laminar/laminar.H index dda7f73117..029a112cd5 100644 --- a/src/turbulenceModels/compressible/RAS/laminar/laminar.H +++ b/src/turbulenceModels/compressible/RAS/laminar/laminar.H @@ -64,20 +64,19 @@ public: // Constructors - //- from components + //- Construct from components laminar ( const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ); - // Destructor - - ~laminar() - {} + //- Destructor + virtual ~laminar() + {} // Member Functions diff --git a/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.C b/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.C index 1e762433f3..085058c102 100644 --- a/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.C +++ b/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.C @@ -92,7 +92,7 @@ realizableKE::realizableKE const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ) : RASModel(typeName, rho, U, phi, thermophysicalModel), diff --git a/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.H b/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.H index f997efdd5f..168a72e88a 100644 --- a/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.H +++ b/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.H @@ -112,29 +112,23 @@ public: // Constructors - //- from components + //- Construct from components realizableKE ( const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ); - // Destructor - - ~realizableKE(){} + //- Destructor + virtual ~realizableKE() + {} // Member Functions - //- Return the turbulence viscosity - tmp mut() const - { - return mut_; - } - //- Return the effective diffusivity for k tmp DkEff() const { @@ -153,8 +147,14 @@ public: ); } + //- Return the turbulence viscosity + virtual tmp mut() const + { + return mut_; + } + //- Return the effective turbulent thermal diffusivity - tmp alphaEff() const + virtual tmp alphaEff() const { return tmp ( @@ -163,31 +163,31 @@ public: } //- Return the turbulence kinetic energy - tmp k() const + virtual tmp k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate - tmp epsilon() const + virtual tmp epsilon() const { return epsilon_; } //- Return the Reynolds stress tensor - tmp R() const; + virtual tmp R() const; //- Return the effective stress tensor including the laminar stress - tmp devRhoReff() const; + virtual tmp devRhoReff() const; //- Return the source term for the momentum equation - tmp divDevRhoReff(volVectorField& U) const; + virtual tmp divDevRhoReff(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/compressible/turbulenceModel/Make/files b/src/turbulenceModels/compressible/turbulenceModel/Make/files new file mode 100644 index 0000000000..3f01b20354 --- /dev/null +++ b/src/turbulenceModels/compressible/turbulenceModel/Make/files @@ -0,0 +1,4 @@ +turbulenceModel.C +laminar/laminar.C + +LIB = $(FOAM_LIBBIN)/libcompressibleTurbulenceModel diff --git a/src/turbulenceModels/compressible/turbulenceModel/Make/options b/src/turbulenceModels/compressible/turbulenceModel/Make/options new file mode 100644 index 0000000000..65d3ed1e01 --- /dev/null +++ b/src/turbulenceModels/compressible/turbulenceModel/Make/options @@ -0,0 +1,7 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude + +LIB_LIBS = \ + -lfiniteVolume + diff --git a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C new file mode 100644 index 0000000000..3a9ae2a52b --- /dev/null +++ b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C @@ -0,0 +1,227 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 compressible +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineTypeNameAndDebug(laminar, 0); +addToRunTimeSelectionTable(turbulenceModel, laminar, turbulenceModel); + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +laminar::laminar +( + const volScalarField& rho, + const volVectorField& U, + const surfaceScalarField& phi, + const basicThermo& thermoPhysicalModel +) +: + turbulenceModel(rho, U, phi, thermoPhysicalModel) +{} + + +// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // + +autoPtr laminar::New +( + const volScalarField& rho, + const volVectorField& U, + const surfaceScalarField& phi, + const basicThermo& thermoPhysicalModel +) +{ + return autoPtr(new laminar(rho, U, phi, thermoPhysicalModel)); +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +tmp laminar::mut() const +{ + return tmp + ( + new volScalarField + ( + IOobject + ( + "mut", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar("mut", mu().dimensions(), 0.0) + ) + ); +} + + +tmp laminar::muEff() const +{ + return tmp(new volScalarField("muEff", mu())); +} + + +tmp laminar::alphaEff() const +{ + return tmp(new volScalarField("alphaEff", alpha())); +} + + +tmp laminar::k() const +{ + return tmp + ( + new volScalarField + ( + IOobject + ( + "k", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar("k", sqr(U_.dimensions()), 0.0) + ) + ); +} + + +tmp laminar::epsilon() const +{ + return tmp + ( + new volScalarField + ( + IOobject + ( + "epsilon", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar + ( + "epsilon", sqr(U_.dimensions())/dimTime, 0.0 + ) + ) + ); +} + + +tmp laminar::R() const +{ + return tmp + ( + new volSymmTensorField + ( + IOobject + ( + "R", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedSymmTensor + ( + "R", sqr(U_.dimensions()), symmTensor::zero + ) + ) + ); +} + + +tmp laminar::devRhoReff() const +{ + return tmp + ( + new volSymmTensorField + ( + IOobject + ( + "devRhoReff", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + -mu()*dev(twoSymm(fvc::grad(U_))) + ) + ); +} + + +tmp laminar::divDevRhoReff(volVectorField& U) const +{ + return + ( + - fvm::laplacian(muEff(), U) + - fvc::div(muEff()*dev2(fvc::grad(U)().T())) + ); +} + + +bool laminar::read() +{ + return true; +} + + +void laminar::correct() +{ + turbulenceModel::correct(); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace incompressible +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H new file mode 100644 index 0000000000..ac1829d84c --- /dev/null +++ b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H @@ -0,0 +1,135 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +Class + Foam::compressible::laminar + +Description + Turbulence model for laminar compressible flow. + +SourceFiles + laminar.C + +\*---------------------------------------------------------------------------*/ + +#ifndef laminar_H +#define laminar_H + +#include "turbulenceModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace compressible +{ + +/*---------------------------------------------------------------------------*\ + Class laminar Declaration +\*---------------------------------------------------------------------------*/ + +class laminar +: + public turbulenceModel +{ + +public: + + //- Runtime type information + TypeName("laminar"); + + // Constructors + + //- Construct from components + laminar + ( + const volScalarField& rho, + const volVectorField& U, + const surfaceScalarField& phi, + const basicThermo& thermoPhysicalModel + ); + + + // Selectors + + //- Return a reference to the selected turbulence model + static autoPtr New + ( + const volScalarField& rho, + const volVectorField& U, + const surfaceScalarField& phi, + const basicThermo& thermoPhysicalModel + ); + + + //- Destructor + virtual ~laminar() + {} + + + // Member Functions + + //- Return the turbulence viscosity, i.e. 0 for laminar flow + virtual tmp mut() const; + + //- Return the effective viscosity, i.e. the laminar viscosity + virtual tmp muEff() const; + + //- Return the effective turbulent thermal diffusivity + virtual tmp alphaEff() const; + + //- Return the turbulence kinetic energy, i.e. 0 for laminar flow + virtual tmp k() const; + + //- Return the turbulence kinetic energy dissipation rate, + // i.e. 0 for laminar flow + virtual tmp epsilon() const; + + //- Return the Reynolds stress tensor, i.e. 0 for laminar flow + virtual tmp R() const; + + //- Return the effective stress tensor including the laminar stress + virtual tmp devRhoReff() const; + + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff(volVectorField& U) const; + + //- Correct the laminar viscosity + virtual void correct(); + + //- Read turbulenceProperties dictionary + virtual bool read(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace incompressible +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/newTurbulenceModel.C b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C similarity index 69% rename from src/turbulenceModels/incompressible/turbulenceModel/newTurbulenceModel.C rename to src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C index ef609c61f1..28e5001b6a 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/newTurbulenceModel.C +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C @@ -26,21 +26,48 @@ License #include "turbulenceModel.H" #include "volFields.H" +#include "surfaceFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace incompressible +namespace compressible { -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineTypeNameAndDebug(turbulenceModel, 0); +defineRunTimeSelectionTable(turbulenceModel, turbulenceModel); + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +turbulenceModel::turbulenceModel +( + const volScalarField& rho, + const volVectorField& U, + const surfaceScalarField& phi, + const basicThermo& thermophysicalModel +) +: + runTime_(U.time()), + mesh_(U.mesh()), + + rho_(rho), + U_(U), + phi_(phi), + thermophysicalModel_(thermophysicalModel) +{} + + +// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // autoPtr turbulenceModel::New ( + const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - transportModel& transport + const basicThermo& thermophysicalModel ) { word turbulenceModelTypeName; @@ -61,7 +88,7 @@ autoPtr turbulenceModel::New ) ); - turbulencePropertiesDict.lookup("simulationType") + turbulencePropertiesDict.lookup("turbulenceModel") >> turbulenceModelTypeName; } @@ -75,8 +102,9 @@ autoPtr turbulenceModel::New { FatalErrorIn ( - "turbulenceModel::New(const volVectorField&, " - "const surfaceScalarField&, transportModel&)" + "turbulenceModel::New(const volScalarField&, " + "const volVectorField&, const surfaceScalarField&, " + "basicThermo&)" ) << "Unknown turbulenceModel type " << turbulenceModelTypeName << endl << endl << "Valid turbulenceModel types are :" << endl @@ -84,13 +112,22 @@ autoPtr turbulenceModel::New << exit(FatalError); } - return autoPtr(cstrIter()(U, phi, transport)); + return autoPtr + ( + cstrIter()(rho, U, phi, thermophysicalModel) + ); } +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +turbulenceModel::~turbulenceModel() +{} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace incompressible +} // End namespace compressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H new file mode 100644 index 0000000000..46c6b2a625 --- /dev/null +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H @@ -0,0 +1,229 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::compressible::turbulenceModels + +Description + Namespace for compressible turbulence turbulence models. + + +Class + Foam::compressible::turbulenceModel + +Description + Abstract base class for compressible turbulence models + (RAS, LES and laminar). + + +SourceFiles + turbulenceModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef compressibleturbulenceModel_H +#define compressibleturbulenceModel_H + +#include "primitiveFieldsFwd.H" +#include "volFieldsFwd.H" +#include "surfaceFieldsFwd.H" +#include "fvMatricesFwd.H" +#include "basicThermo.H" +#include "autoPtr.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declarations +class fvMesh; + +namespace compressible +{ + +/*---------------------------------------------------------------------------*\ + Class turbulenceModel Declaration +\*---------------------------------------------------------------------------*/ + +class turbulenceModel +{ + +protected: + + // Protected data + + const Time& runTime_; + const fvMesh& mesh_; + + const volScalarField& rho_; + const volVectorField& U_; + const surfaceScalarField& phi_; + + const basicThermo& thermophysicalModel_; + + +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 constructor selection table + + declareRunTimeNewSelectionTable + ( + autoPtr, + turbulenceModel, + turbulenceModel, + ( + const volScalarField& rho, + const volVectorField& U, + const surfaceScalarField& phi, + const basicThermo& thermoPhysicalModel + ), + (rho, U, phi, thermoPhysicalModel) + ); + + + // Constructors + + //- Construct from components + turbulenceModel + ( + const volScalarField& rho, + const volVectorField& U, + const surfaceScalarField& phi, + const basicThermo& thermoPhysicalModel + ); + + + // Selectors + + //- Return a reference to the selected turbulence model + static autoPtr New + ( + const volScalarField& rho, + const volVectorField& U, + const surfaceScalarField& phi, + const basicThermo& thermoPhysicalModel + ); + + + //- Destructor + virtual ~turbulenceModel(); + + + // Member Functions + + //- Access function to density field + const volScalarField& rho() const + { + return rho_; + } + + //- Access function to velocity field + const volVectorField& U() const + { + return U_; + } + + //- Access function to flux field + const surfaceScalarField& phi() const + { + return phi_; + } + + //- Access function to thermophysical model + const basicThermo& thermo() const + { + return thermophysicalModel_; + } + + //- Return the laminar viscosity + const volScalarField& mu() const + { + return thermophysicalModel_.mu(); + } + + //- Return the laminar thermal conductivity + const volScalarField& alpha() const + { + return thermophysicalModel_.alpha(); + } + + //- Return the turbulence viscosity + virtual tmp mut() const = 0; + + //- Return the effective viscosity + virtual tmp muEff() const = 0; + + //- Return the effective turbulent thermal diffusivity + virtual tmp alphaEff() const = 0; + + //- Return the turbulence kinetic energy + virtual tmp k() const = 0; + + //- Return the turbulence kinetic energy dissipation rate + virtual tmp epsilon() const = 0; + + //- Return the Reynolds stress tensor + virtual tmp R() const = 0; + + //- Return the effective stress tensor including the laminar stress + virtual tmp devRhoReff() const = 0; + + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff(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 compressible +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H index 776328d3a2..94ee816164 100644 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H @@ -157,18 +157,6 @@ public: // Member Functions - //- 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 the dictionary which provides info. about choice of // models, and all related data (particularly model coefficients). inline dictionary& coeffDict() diff --git a/src/turbulenceModels/incompressible/LES/spectEddyVisc/spectEddyVisc.C b/src/turbulenceModels/incompressible/LES/spectEddyVisc/spectEddyVisc.C index cda43a2ccf..67005d54fe 100644 --- a/src/turbulenceModels/incompressible/LES/spectEddyVisc/spectEddyVisc.C +++ b/src/turbulenceModels/incompressible/LES/spectEddyVisc/spectEddyVisc.C @@ -43,7 +43,6 @@ addToRunTimeSelectionTable(LESModel, spectEddyVisc, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// from components spectEddyVisc::spectEddyVisc ( const volVectorField& U, diff --git a/src/turbulenceModels/incompressible/RAS/LRR/LRR.H b/src/turbulenceModels/incompressible/RAS/LRR/LRR.H index 8d515d4d56..9d0a4ceb0a 100644 --- a/src/turbulenceModels/incompressible/RAS/LRR/LRR.H +++ b/src/turbulenceModels/incompressible/RAS/LRR/LRR.H @@ -102,7 +102,7 @@ public: // Constructors - //- from components + //- Construct from components LRR ( const volVectorField& U, diff --git a/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.H b/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.H index 422ddffdf6..0ec4d36cfb 100644 --- a/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.H +++ b/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.H @@ -82,7 +82,7 @@ public: // Constructors - //- from components + //- Construct from components LamBremhorstKE ( const volVectorField& U, diff --git a/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H index e3f5d7a0af..ed94be0f24 100644 --- a/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H +++ b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H @@ -110,7 +110,7 @@ public: // Constructors - //- from components + //- Construct from components LaunderGibsonRSTM ( const volVectorField& U, diff --git a/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H b/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H index 22f5adf28f..1e50f7ceb7 100644 --- a/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H +++ b/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H @@ -96,7 +96,7 @@ public: // Constructors - //- from components + //- Construct from components LaunderSharmaKE ( const volVectorField& U, diff --git a/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.H b/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.H index e1617389b7..b187473fa7 100644 --- a/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.H +++ b/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.H @@ -90,7 +90,7 @@ public: // Constructors - //- from components + //- Construct from components LienCubicKE ( const volVectorField& U, diff --git a/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.H b/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.H index 02d0fc63cf..c71bf4fd03 100644 --- a/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.H +++ b/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.H @@ -115,7 +115,7 @@ public: // Constructors - //- from components + //- Construct from components LienCubicKELowRe ( const volVectorField& U, diff --git a/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H b/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H index 41df680dd9..ce1e332d69 100644 --- a/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H +++ b/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H @@ -85,7 +85,7 @@ public: // Constructors - //- from components + //- Construct from components LienLeschzinerLowRe ( const volVectorField& U, diff --git a/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.H b/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.H index 091c99cadf..68f04d1322 100644 --- a/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.H +++ b/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.H @@ -89,7 +89,7 @@ public: // Constructors - //- from components + //- Construct from components NonlinearKEShih ( const volVectorField& U, diff --git a/src/turbulenceModels/incompressible/RAS/QZeta/QZeta.H b/src/turbulenceModels/incompressible/RAS/QZeta/QZeta.H index 0d76112835..ed50b7f926 100644 --- a/src/turbulenceModels/incompressible/RAS/QZeta/QZeta.H +++ b/src/turbulenceModels/incompressible/RAS/QZeta/QZeta.H @@ -86,7 +86,7 @@ public: // Constructors - //- from components + //- Construct from components QZeta ( const volVectorField& U, diff --git a/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.H b/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.H index 7710c54bf1..9d89294f81 100644 --- a/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.H +++ b/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.H @@ -93,7 +93,7 @@ public: // Constructors - //- from components + //- Construct from components RNGkEpsilon ( const volVectorField& U, diff --git a/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.H index abc946efec..54c418d483 100644 --- a/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.H @@ -130,7 +130,7 @@ public: // Constructors - //- from components + //- Construct from components SpalartAllmaras ( const volVectorField& U, diff --git a/src/turbulenceModels/incompressible/RAS/laminar/laminar.H b/src/turbulenceModels/incompressible/RAS/laminar/laminar.H index 6675a336cb..23af89574f 100644 --- a/src/turbulenceModels/incompressible/RAS/laminar/laminar.H +++ b/src/turbulenceModels/incompressible/RAS/laminar/laminar.H @@ -63,7 +63,7 @@ public: // Constructors - //- from components + //- Construct from components laminar ( const volVectorField& U, diff --git a/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.H b/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.H index 9a63300653..3b3795910f 100644 --- a/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.H +++ b/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.H @@ -110,7 +110,7 @@ public: // Constructors - //- from components + //- Construct from components realizableKE ( const volVectorField& U, diff --git a/src/turbulenceModels/incompressible/turbulenceModel/Make/files b/src/turbulenceModels/incompressible/turbulenceModel/Make/files index 80aac83690..a77efed2ab 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/Make/files +++ b/src/turbulenceModels/incompressible/turbulenceModel/Make/files @@ -1,5 +1,4 @@ turbulenceModel.C -newTurbulenceModel.C laminar/laminar.C LIB = $(FOAM_LIBBIN)/libincompressibleTurbulenceModel diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C index e3a4a00daf..9ed06e844e 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C @@ -27,7 +27,6 @@ License #include "turbulenceModel.H" #include "volFields.H" #include "surfaceFields.H" -#include "wallFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -59,6 +58,62 @@ turbulenceModel::turbulenceModel {} +// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // + +autoPtr turbulenceModel::New +( + const volVectorField& U, + const surfaceScalarField& phi, + transportModel& transport +) +{ + word turbulenceModelTypeName; + + // 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 + ( + "turbulenceProperties", + U.time().constant(), + U.db(), + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + + turbulencePropertiesDict.lookup("simulationType") + >> turbulenceModelTypeName; + } + + Info<< "Selecting turbulence model type " + << turbulenceModelTypeName << endl; + + turbulenceModelConstructorTable::iterator cstrIter = + turbulenceModelConstructorTablePtr_->find(turbulenceModelTypeName); + + if (cstrIter == turbulenceModelConstructorTablePtr_->end()) + { + FatalErrorIn + ( + "turbulenceModel::New(const volVectorField&, " + "const surfaceScalarField&, transportModel&)" + ) << "Unknown turbulenceModel type " << turbulenceModelTypeName + << endl << endl + << "Valid turbulenceModel types are :" << endl + << turbulenceModelConstructorTablePtr_->toc() + << exit(FatalError); + } + + return autoPtr(cstrIter()(U, phi, transport)); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + turbulenceModel::~turbulenceModel() {} diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H index 490b59e14e..01380eacb8 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H @@ -144,6 +144,18 @@ public: // Member Functions + //- 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 { From 870fbd14e78b57e842da968335f0a407d274aeda Mon Sep 17 00:00:00 2001 From: henry Date: Sun, 23 Nov 2008 11:54:54 +0000 Subject: [PATCH 2/5] Added description. --- applications/test/tmpField/tmpFieldTest.C | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/applications/test/tmpField/tmpFieldTest.C b/applications/test/tmpField/tmpFieldTest.C index f0745e6da4..4c9298874c 100644 --- a/applications/test/tmpField/tmpFieldTest.C +++ b/applications/test/tmpField/tmpFieldTest.C @@ -23,8 +23,10 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Application - + tmpFieldTest + Description + Tests for possible memory leaks in the tmp algebra. \*---------------------------------------------------------------------------*/ @@ -44,9 +46,6 @@ int main() f1 = f2 + f3 + f2 + f3; } -// Info<< f1 << endl; - - Info<< "end" << endl; } From 381b1e8c9f4e1cbed0dd7f0312d993c8e6276ab5 Mon Sep 17 00:00:00 2001 From: henry Date: Sun, 23 Nov 2008 15:01:53 +0000 Subject: [PATCH 3/5] Updated compressible applications to use the new turbulenceModel base-class where appropriate (transient solvers) and corrected paths to the new location of the turbulence models. --- .../kinematicParcelFoam/Make/options | 12 +- .../kinematicParcelFoam/createFields.H | 6 +- .../kinematicParcelFoam/kinematicParcelFoam.C | 6 +- .../solvers/combustion/PDRFoam/Make/options | 3 +- .../turbulence/PDRkEpsilon/PDRkEpsilon.C | 2 +- .../turbulence/PDRkEpsilon/PDRkEpsilon.H | 9 +- .../solvers/combustion/PDRFoam/kEpsilon.H | 54 ------- .../solvers/combustion/XiFoam/Make/options | 15 +- .../solvers/combustion/XiFoam/XiFoam.C | 2 +- .../solvers/combustion/XiFoam/createFields.H | 6 +- .../solvers/combustion/Xoodles/Make/files | 3 - .../solvers/combustion/Xoodles/Make/options | 23 --- .../solvers/combustion/Xoodles/Xoodles.C | 122 ---------------- .../solvers/combustion/Xoodles/createFields.H | 124 ---------------- .../combustion/coldEngineFoam/Make/options | 9 +- .../coldEngineFoam/coldEngineFoam.C | 2 +- .../combustion/coldEngineFoam/createFields.H | 4 +- .../combustion/dieselEngineFoam/Make/options | 7 +- .../dieselEngineFoam/createFields.H | 6 +- .../dieselEngineFoam/dieselEngineFoam.C | 2 +- .../combustion/dieselFoam/Make/options | 7 +- .../combustion/dieselFoam/dieselFoam.C | 2 +- .../combustion/engineFoam/Make/options | 11 +- .../combustion/engineFoam/engineFoam.C | 2 +- .../combustion/reactingFoam/Make/options | 11 +- .../combustion/reactingFoam/createFields.H | 6 +- .../combustion/reactingFoam/reactingFoam.C | 2 +- .../solvers/compressible/coodles/Make/files | 3 - .../compressible/coodles/createFields.H | 50 ------- .../compressible/rhoPimpleFoam/Make/options | 13 +- .../compressible/rhoPimpleFoam/createFields.H | 6 +- .../rhoPimpleFoam/rhoPimpleFoam.C | 8 +- .../compressible/rhoPisoFoam/Make/files | 3 + .../{coodles => rhoPisoFoam}/Make/options | 6 +- .../{coodles => rhoPisoFoam}/UEqn.H | 0 .../createFields.H | 10 +- .../{coodles => rhoPisoFoam}/hEqn.H | 0 .../{coodles => rhoPisoFoam}/pEqn.H | 0 .../coodles.C => rhoPisoFoam/rhoPisoFoam.C} | 25 ++-- .../rhoPorousSimpleFoam/Make/options | 13 +- .../rhoPorousSimpleFoam/rhoPorousSimpleFoam.C | 2 +- .../compressible/rhoSimpleFoam/Make/options | 13 +- .../rhoSimpleFoam/rhoSimpleFoam.C | 31 ++-- .../compressible/rhoTurbFoam/Make/files | 3 - .../compressible/rhoTurbFoam/Make/options | 12 -- .../solvers/compressible/rhoTurbFoam/UEqn.H | 11 -- .../solvers/compressible/rhoTurbFoam/hEqn.H | 12 -- .../solvers/compressible/rhoTurbFoam/pEqn.H | 68 --------- .../compressible/rhoTurbFoam/rhoTurbFoam.C | 96 ------------- .../compressible/sonicDyMFoam/Make/files | 3 + .../Make/options | 16 ++- .../compressibleContinuityErrs.H | 0 .../createFields.H | 6 +- .../readThermodynamicProperties.H | 0 .../readTransportProperties.H | 0 .../sonicDyMFoam.C} | 57 ++++---- .../compressible/sonicFoam/Make/options | 10 +- .../compressible/sonicFoam/createFields.H | 96 +++++-------- .../{sonicTurbFoam => sonicFoam}/hEqn.H | 0 .../compressible/sonicFoam/sonicFoam.C | 59 ++++---- .../sonicFoamAutoMotion/Make/files | 3 - .../sonicFoamAutoMotion/Make/options | 9 -- .../sonicFoamAutoMotion/createFields.H | 103 ------------- .../compressible/sonicTurbFoam/Make/files | 3 - .../sonicTurbFoam/sonicTurbFoam.C | 135 ------------------ .../heatTransfer/buoyantFoam/Make/options | 11 +- .../heatTransfer/buoyantFoam/buoyantFoam.C | 2 +- .../heatTransfer/buoyantFoam/createFields.H | 4 +- .../buoyantSimpleFoam/Make/options | 11 +- .../buoyantSimpleFoam/buoyantSimpleFoam.C | 2 +- .../buoyantSimpleRadiationFoam/Make/options | 14 +- .../buoyantSimpleRadiationFoam.C | 2 +- .../chtMultiRegionFoam/Make/options | 7 +- .../chtMultiRegionFoam/chtMultiRegionFoam.C | 2 +- .../fluid/createFluidFields.H | 6 +- .../fluid/solveEnthalpyEquation.C | 2 +- .../fluid/solveMomentumEquation.C | 2 +- .../heatTransfer/lesBuoyantFoam/Make/files | 3 - .../heatTransfer/lesBuoyantFoam/Make/options | 13 -- .../lesBuoyantFoam/createFields.H | 75 ---------- .../lesBuoyantFoam/lesBuoyantFoam.C | 96 ------------- src/lagrangian/dieselSpray/Make/options | 5 +- src/lagrangian/intermediate/Make/options | 10 +- .../turbulenceModel/turbulenceModel.C | 6 + 84 files changed, 306 insertions(+), 1310 deletions(-) delete mode 100644 applications/solvers/combustion/PDRFoam/kEpsilon.H delete mode 100644 applications/solvers/combustion/Xoodles/Make/files delete mode 100644 applications/solvers/combustion/Xoodles/Make/options delete mode 100644 applications/solvers/combustion/Xoodles/Xoodles.C delete mode 100644 applications/solvers/combustion/Xoodles/createFields.H delete mode 100644 applications/solvers/compressible/coodles/Make/files delete mode 100644 applications/solvers/compressible/coodles/createFields.H create mode 100644 applications/solvers/compressible/rhoPisoFoam/Make/files rename applications/solvers/compressible/{coodles => rhoPisoFoam}/Make/options (64%) rename applications/solvers/compressible/{coodles => rhoPisoFoam}/UEqn.H (100%) rename applications/solvers/compressible/{rhoTurbFoam => rhoPisoFoam}/createFields.H (88%) rename applications/solvers/compressible/{coodles => rhoPisoFoam}/hEqn.H (100%) rename applications/solvers/compressible/{coodles => rhoPisoFoam}/pEqn.H (100%) rename applications/solvers/compressible/{coodles/coodles.C => rhoPisoFoam/rhoPisoFoam.C} (83%) delete mode 100644 applications/solvers/compressible/rhoTurbFoam/Make/files delete mode 100644 applications/solvers/compressible/rhoTurbFoam/Make/options delete mode 100644 applications/solvers/compressible/rhoTurbFoam/UEqn.H delete mode 100644 applications/solvers/compressible/rhoTurbFoam/hEqn.H delete mode 100644 applications/solvers/compressible/rhoTurbFoam/pEqn.H delete mode 100644 applications/solvers/compressible/rhoTurbFoam/rhoTurbFoam.C create mode 100644 applications/solvers/compressible/sonicDyMFoam/Make/files rename applications/solvers/compressible/{sonicTurbFoam => sonicDyMFoam}/Make/options (50%) rename applications/solvers/compressible/{sonicFoamAutoMotion => sonicDyMFoam}/compressibleContinuityErrs.H (100%) rename applications/solvers/compressible/{sonicTurbFoam => sonicDyMFoam}/createFields.H (89%) rename applications/solvers/compressible/{sonicFoamAutoMotion => sonicDyMFoam}/readThermodynamicProperties.H (100%) rename applications/solvers/compressible/{sonicFoamAutoMotion => sonicDyMFoam}/readTransportProperties.H (100%) rename applications/solvers/compressible/{sonicFoamAutoMotion/sonicFoamAutoMotion.C => sonicDyMFoam/sonicDyMFoam.C} (77%) rename applications/solvers/compressible/{sonicTurbFoam => sonicFoam}/hEqn.H (100%) delete mode 100644 applications/solvers/compressible/sonicFoamAutoMotion/Make/files delete mode 100644 applications/solvers/compressible/sonicFoamAutoMotion/Make/options delete mode 100644 applications/solvers/compressible/sonicFoamAutoMotion/createFields.H delete mode 100644 applications/solvers/compressible/sonicTurbFoam/Make/files delete mode 100644 applications/solvers/compressible/sonicTurbFoam/sonicTurbFoam.C delete mode 100644 applications/solvers/heatTransfer/lesBuoyantFoam/Make/files delete mode 100644 applications/solvers/heatTransfer/lesBuoyantFoam/Make/options delete mode 100644 applications/solvers/heatTransfer/lesBuoyantFoam/createFields.H delete mode 100644 applications/solvers/heatTransfer/lesBuoyantFoam/lesBuoyantFoam.C 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 Date: Sun, 23 Nov 2008 16:17:05 +0000 Subject: [PATCH 4/5] Updated utilities to use the new turbulenceModels paths. --- .../solvers/combustion/PDRFoam/Make/options | 2 +- .../rhoPorousSimpleFoam/Make/options | 2 +- .../compressible/rhoSimpleFoam/Make/options | 2 +- .../heatTransfer/buoyantSimpleFoam/Make/options | 2 +- .../buoyantSimpleRadiationFoam/Make/options | 2 +- .../incompressible/boundaryFoam/Make/options | 2 +- .../incompressible/channelFoam/Make/options | 2 +- .../incompressible/simpleFoam/Make/options | 2 +- .../execFlowFunctionObjects/Make/options | 11 +++++------ .../execFlowFunctionObjects.C | 8 ++++---- .../postProcessing/turbulence/R/Make/options | 8 ++++---- .../utilities/postProcessing/turbulence/R/R.C | 14 ++++++-------- .../createTurbulenceFields/Make/options | 11 ++++++----- .../createTurbulenceFields.C | 16 +++++++--------- .../velocityField/Pe/Make/options | 17 ++++++++--------- .../postProcessing/velocityField/Pe/Pe.C | 8 ++++---- .../wall/wallHeatFlux/Make/options | 7 ++++--- .../wall/wallHeatFlux/wallHeatFlux.C | 8 ++++---- .../wall/wallShearStress/Make/options | 7 ++++--- .../wall/wallShearStress/wallShearStress.C | 8 ++++---- .../postProcessing/wall/yPlusLES/Make/options | 3 ++- .../postProcessing/wall/yPlusLES/yPlusLES.C | 2 +- .../postProcessing/wall/yPlusRAS/Make/options | 7 ++++--- .../postProcessing/wall/yPlusRAS/yPlusRAS.C | 2 +- src/postProcessing/forces/Make/options | 11 +++++------ src/postProcessing/forces/forces/forces.C | 9 +++++---- .../compressible/LES/LESModel/LESModel.H | 2 +- .../compressible/LES/Make/options | 6 +++--- .../compressible/RAS/Make/options | 2 +- .../compressible/RAS/RASModel/RASModel.H | 2 +- .../incompressible/LES/LESModel/LESModel.H | 2 +- .../incompressible/LES/Make/options | 6 +++--- .../incompressible/RAS/Make/options | 2 +- .../incompressible/RAS/RASModel/RASModel.H | 2 +- 34 files changed, 98 insertions(+), 99 deletions(-) diff --git a/applications/solvers/combustion/PDRFoam/Make/options b/applications/solvers/combustion/PDRFoam/Make/options index 0385979d4a..e765e61574 100644 --- a/applications/solvers/combustion/PDRFoam/Make/options +++ b/applications/solvers/combustion/PDRFoam/Make/options @@ -9,7 +9,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ diff --git a/applications/solvers/compressible/rhoPorousSimpleFoam/Make/options b/applications/solvers/compressible/rhoPorousSimpleFoam/Make/options index e02ce02628..61456e486a 100644 --- a/applications/solvers/compressible/rhoPorousSimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoPorousSimpleFoam/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel \ -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/lnInclude \ diff --git a/applications/solvers/compressible/rhoSimpleFoam/Make/options b/applications/solvers/compressible/rhoSimpleFoam/Make/options index 39cd4533e3..d51be54abf 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoSimpleFoam/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel \ -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/lnInclude diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options index 321733e39b..ec604cf28c 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/lnInclude diff --git a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options index bd4dd4339a..22d41fdb80 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options @@ -1,7 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ -I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/finiteVolume/cfdTools \ diff --git a/applications/solvers/incompressible/boundaryFoam/Make/options b/applications/solvers/incompressible/boundaryFoam/Make/options index e7594d177f..b5a6f5b406 100644 --- a/applications/solvers/incompressible/boundaryFoam/Make/options +++ b/applications/solvers/incompressible/boundaryFoam/Make/options @@ -1,5 +1,5 @@ EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ diff --git a/applications/solvers/incompressible/channelFoam/Make/options b/applications/solvers/incompressible/channelFoam/Make/options index 594493ce21..76a1a299dd 100644 --- a/applications/solvers/incompressible/channelFoam/Make/options +++ b/applications/solvers/incompressible/channelFoam/Make/options @@ -1,5 +1,5 @@ EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/incompressible/LES/LESModel \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/transportModels \ diff --git a/applications/solvers/incompressible/simpleFoam/Make/options b/applications/solvers/incompressible/simpleFoam/Make/options index a3c8f75dee..61091811bf 100644 --- a/applications/solvers/incompressible/simpleFoam/Make/options +++ b/applications/solvers/incompressible/simpleFoam/Make/options @@ -1,5 +1,5 @@ EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ diff --git a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options index 601df67db4..fe46b10d13 100644 --- a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options +++ b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options @@ -1,19 +1,18 @@ EXE_INC = \ -I$(LIB_SRC)/postProcessing/postCalc \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/turbulenceModels/RAS \ - -I$(LIB_SRC)/turbulenceModels/LES \ + -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ $(FOAM_LIBBIN)/postCalc.o \ - -lfiniteVolume \ -lincompressibleTransportModels \ -lincompressibleRASModels \ -lincompressibleLESModels \ -lbasicThermophysicalModels \ -lspecie \ -lcompressibleRASModels \ - -lcompressibleLESModels + -lcompressibleLESModels \ + -lfiniteVolume diff --git a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C index 3f7a99040b..7a1e86c286 100644 --- a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C +++ b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C @@ -39,12 +39,12 @@ Description #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/RASModel/RASModel.H" -#include "incompressible/LESModel/LESModel.H" +#include "incompressible/RAS/RASModel/RASModel.H" +#include "incompressible/LES/LESModel/LESModel.H" #include "basicThermo.H" -#include "compressible/RASModel/RASModel.H" -#include "compressible/LESModel/LESModel.H" +#include "compressible/RAS/RASModel/RASModel.H" +#include "compressible/LES/LESModel/LESModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/postProcessing/turbulence/R/Make/options b/applications/utilities/postProcessing/turbulence/R/Make/options index a53125aaf2..5e71b80afa 100644 --- a/applications/utilities/postProcessing/turbulence/R/Make/options +++ b/applications/utilities/postProcessing/turbulence/R/Make/options @@ -1,10 +1,10 @@ EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ - -I$(LIB_SRC)/transportModels + -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ + -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lfiniteVolume \ -lincompressibleRASModels \ -lincompressibleTransportModels \ -lfiniteVolume diff --git a/applications/utilities/postProcessing/turbulence/R/R.C b/applications/utilities/postProcessing/turbulence/R/R.C index 7ce19a8c5f..dbf1860bce 100644 --- a/applications/utilities/postProcessing/turbulence/R/R.C +++ b/applications/utilities/postProcessing/turbulence/R/R.C @@ -32,21 +32,19 @@ Description #include "fvCFD.H" #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/RASModel/RASModel.H" - +#include "RASModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { + #include "setRootCase.H" -# include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "createFields.H" -# include "createTime.H" -# include "createMesh.H" -# include "createFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nCalculating the Reynolds Stress R\n" << endl; diff --git a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/Make/options b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/Make/options index be60a20b9f..a524a0aae5 100644 --- a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/Make/options +++ b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/Make/options @@ -1,9 +1,10 @@ EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ - -I$(LIB_SRC)/transportModels + -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lfiniteVolume \ -lincompressibleRASModels \ - -lincompressibleTransportModels + -lincompressibleTransportModels \ + -lfiniteVolume \ No newline at end of file diff --git a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createTurbulenceFields.C b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createTurbulenceFields.C index 30a74548dd..2a8ed8f529 100644 --- a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createTurbulenceFields.C +++ b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createTurbulenceFields.C @@ -36,28 +36,26 @@ Source files: #include "fvCFD.H" #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/RASModel/RASModel.H" - +#include "RASModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { - -# include "addTimeOptions.H" -# include "setRootCase.H" -# include "createTime.H" + #include "addTimeOptions.H" + #include "setRootCase.H" + #include "createTime.H" // Get times list instantList Times = runTime.times(); // set startTime and endTime depending on -time and -latestTime options -# include "checkTimeOptions.H" + #include "checkTimeOptions.H" runTime.setTime(Times[startTime], startTime); -# include "createMesh.H" + #include "createMesh.H" -# include "createFields.H" + #include "createFields.H" for (label i=startTime; ialphaEff())*fvc::snGrad(h); diff --git a/applications/utilities/postProcessing/wall/wallShearStress/Make/options b/applications/utilities/postProcessing/wall/wallShearStress/Make/options index 2a417f9549..89632547e0 100644 --- a/applications/utilities/postProcessing/wall/wallShearStress/Make/options +++ b/applications/utilities/postProcessing/wall/wallShearStress/Make/options @@ -1,7 +1,8 @@ EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ - -I$(LIB_SRC)/transportModels + -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -lincompressibleRASModels \ diff --git a/applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C b/applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C index d53fa5491c..98b7d6ebc2 100644 --- a/applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C +++ b/applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C @@ -32,7 +32,7 @@ Description #include "fvCFD.H" #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/RASModel/RASModel.H" +#include "RASModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -40,9 +40,9 @@ int main(int argc, char *argv[]) { timeSelector::addOptions(); #include "setRootCase.H" -# include "createTime.H" + #include "createTime.H" instantList timeDirs = timeSelector::select0(runTime, args); -# include "createMesh.H" + #include "createMesh.H" forAll(timeDirs, timeI) { @@ -50,7 +50,7 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << endl; mesh.readUpdate(); -# include "createFields.H" + #include "createFields.H" volSymmTensorField Reff(RASModel->devReff()); diff --git a/applications/utilities/postProcessing/wall/yPlusLES/Make/options b/applications/utilities/postProcessing/wall/yPlusLES/Make/options index b624a502aa..79fbbac91e 100644 --- a/applications/utilities/postProcessing/wall/yPlusLES/Make/options +++ b/applications/utilities/postProcessing/wall/yPlusLES/Make/options @@ -1,5 +1,6 @@ EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels/LES \ + -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/incompressible/LES/LESModel \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/finiteVolume/lnInclude diff --git a/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C b/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C index d7c145b953..d89411f497 100644 --- a/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C +++ b/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C @@ -32,7 +32,7 @@ Description #include "fvCFD.H" #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/LESModel/LESModel.H" +#include "LESModel.H" #include "nearWallDist.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/postProcessing/wall/yPlusRAS/Make/options b/applications/utilities/postProcessing/wall/yPlusRAS/Make/options index 2a417f9549..89632547e0 100644 --- a/applications/utilities/postProcessing/wall/yPlusRAS/Make/options +++ b/applications/utilities/postProcessing/wall/yPlusRAS/Make/options @@ -1,7 +1,8 @@ EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ - -I$(LIB_SRC)/transportModels + -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -lincompressibleRASModels \ diff --git a/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C b/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C index 2db2f0d3b1..f9e164bbd0 100644 --- a/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C +++ b/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C @@ -32,7 +32,7 @@ Description #include "fvCFD.H" #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/RASModel/RASModel.H" +#include "RASModel.H" #include "wallFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/postProcessing/forces/Make/options b/src/postProcessing/forces/Make/options index 3ae6adad4e..72bbb01e6b 100644 --- a/src/postProcessing/forces/Make/options +++ b/src/postProcessing/forces/Make/options @@ -3,19 +3,18 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/turbulenceModels/RAS \ - -I$(LIB_SRC)/turbulenceModels/LES \ + -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude LIB_LIBS = \ - -lfiniteVolume \ - -lmeshTools \ - -lsampling \ -lincompressibleTransportModels \ -lincompressibleRASModels \ -lincompressibleLESModels \ -lbasicThermophysicalModels \ -lspecie \ -lcompressibleRASModels \ - -lcompressibleLESModels + -lcompressibleLESModels \ + -lfiniteVolume \ + -lmeshTools \ + -lsampling diff --git a/src/postProcessing/forces/forces/forces.C b/src/postProcessing/forces/forces/forces.C index d3db7ed569..2201c951a1 100644 --- a/src/postProcessing/forces/forces/forces.C +++ b/src/postProcessing/forces/forces/forces.C @@ -30,11 +30,12 @@ License #include "Time.H" #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/RASModel/RASModel.H" -#include "incompressible/LESModel/LESModel.H" +#include "incompressible/RAS/RASModel/RASModel.H" +#include "incompressible/LES/LESModel/LESModel.H" + #include "basicThermo.H" -#include "compressible/RASModel/RASModel.H" -#include "compressible/LESModel/LESModel.H" +#include "compressible/RAS/RASModel/RASModel.H" +#include "compressible/LES/LESModel/LESModel.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H index 61ada48798..65898b9d6a 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H @@ -49,7 +49,7 @@ SourceFiles #ifndef compressibleLESModel_H #define compressibleLESModel_H -#include "turbulenceModel.H" +#include "compressible/turbulenceModel/turbulenceModel.H" #include "LESdelta.H" #include "fvm.H" #include "fvc.H" diff --git a/src/turbulenceModels/compressible/LES/Make/options b/src/turbulenceModels/compressible/LES/Make/options index b8d3ee786e..5f392cebf6 100644 --- a/src/turbulenceModels/compressible/LES/Make/options +++ b/src/turbulenceModels/compressible/LES/Make/options @@ -1,7 +1,7 @@ EXE_INC = \ - -I../turbulenceModel/lnInclude \ - -I../../LES/LESdeltas/lnInclude \ - -I../../LES/LESfilters/lnInclude \ + -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/LES/LESfilters/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude diff --git a/src/turbulenceModels/compressible/RAS/Make/options b/src/turbulenceModels/compressible/RAS/Make/options index 996f328e69..b44e4ae64c 100644 --- a/src/turbulenceModels/compressible/RAS/Make/options +++ b/src/turbulenceModels/compressible/RAS/Make/options @@ -1,5 +1,5 @@ EXE_INC = \ - -I../turbulenceModel/lnInclude \ + -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H index 2ff398347d..eba91ed9c2 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H @@ -45,7 +45,7 @@ SourceFiles #ifndef compressibleRASModel_H #define compressibleRASModel_H -#include "turbulenceModel.H" +#include "compressible/turbulenceModel/turbulenceModel.H" #include "volFields.H" #include "surfaceFields.H" #include "nearWallDist.H" diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H index 94ee816164..dc09ec8b97 100644 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H @@ -48,7 +48,7 @@ SourceFiles #ifndef LESModel_H #define LESModel_H -#include "turbulenceModel.H" +#include "incompressible/turbulenceModel/turbulenceModel.H" #include "LESdelta.H" #include "fvm.H" #include "fvc.H" diff --git a/src/turbulenceModels/incompressible/LES/Make/options b/src/turbulenceModels/incompressible/LES/Make/options index 8772261e70..2699300b56 100644 --- a/src/turbulenceModels/incompressible/LES/Make/options +++ b/src/turbulenceModels/incompressible/LES/Make/options @@ -1,7 +1,7 @@ EXE_INC = \ - -I../turbulenceModel/lnInclude \ - -I../../LES/LESdeltas/lnInclude \ - -I../../LES/LESfilters/lnInclude \ + -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/LES/LESfilters/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude diff --git a/src/turbulenceModels/incompressible/RAS/Make/options b/src/turbulenceModels/incompressible/RAS/Make/options index 701f27bfc0..73454e7e38 100644 --- a/src/turbulenceModels/incompressible/RAS/Make/options +++ b/src/turbulenceModels/incompressible/RAS/Make/options @@ -1,5 +1,5 @@ EXE_INC = \ - -I../turbulenceModel/lnInclude \ + -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H index ce1d77f3cf..e850b18882 100644 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H +++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H @@ -42,7 +42,7 @@ SourceFiles #ifndef RASModel_H #define RASModel_H -#include "turbulenceModel.H" +#include "incompressible/turbulenceModel/turbulenceModel.H" #include "volFields.H" #include "surfaceFields.H" #include "nearWallDist.H" From dfba9d772fc7bdef306ba96a45713104eb3707cd Mon Sep 17 00:00:00 2001 From: henry Date: Sun, 23 Nov 2008 16:19:13 +0000 Subject: [PATCH 5/5] Updated the indentation style for #include statements and separators. --- bin/foamTemplates/source/foamAppTemplate.C | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/foamTemplates/source/foamAppTemplate.C b/bin/foamTemplates/source/foamAppTemplate.C index 351c9d251b..bef53f7f8e 100644 --- a/bin/foamTemplates/source/foamAppTemplate.C +++ b/bin/foamTemplates/source/foamAppTemplate.C @@ -36,10 +36,10 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" + #include "createTime.H" -# include "setRootCase.H" -# include "createTime.H" - + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info << "End\n" << endl;