diff --git a/applications/solvers/combustion/PDRFoam/createFields.H b/applications/solvers/combustion/PDRFoam/createFields.H index fb958b3b52..95f42a03d6 100644 --- a/applications/solvers/combustion/PDRFoam/createFields.H +++ b/applications/solvers/combustion/PDRFoam/createFields.H @@ -49,7 +49,7 @@ mesh.setFluxRequired(p.name()); Info<< "Creating turbulence model\n" << endl; autoPtr turbulence ( - compressible::RASModel::New + compressible::New ( rho, U, diff --git a/applications/solvers/compressible/rhoSimpleFoam/createFields.H b/applications/solvers/compressible/rhoSimpleFoam/createFields.H index fdf8a2a769..80f317cd85 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoSimpleFoam/createFields.H @@ -71,7 +71,7 @@ dimensionedScalar rhoMin Info<< "Creating turbulence model\n" << endl; autoPtr turbulence ( - compressible::RASModel::New + compressible::New ( rho, U, diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/createFields.H b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/createFields.H index 149049e63e..537eea2ea3 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/createFields.H @@ -70,7 +70,7 @@ dimensionedScalar rhoMin Info<< "Creating turbulence model\n" << endl; autoPtr turbulence ( - compressible::RASModel::New + compressible::New ( rho, U, diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H index f98c472e11..b8d07b1f1a 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H @@ -49,7 +49,7 @@ volVectorField U Info<< "Creating turbulence model\n" << endl; autoPtr turbulence ( - incompressible::RASModel::New(U, phi, laminarTransport) + incompressible::New(U, phi, laminarTransport) ); // Kinematic density for buoyancy force diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H index 17306f7d46..014bf8045c 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H @@ -49,7 +49,7 @@ volVectorField U Info<< "Creating turbulence model\n" << endl; autoPtr turbulence ( - incompressible::RASModel::New(U, phi, laminarTransport) + incompressible::New(U, phi, laminarTransport) ); // Kinematic density for buoyancy force diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H index 5b07f643b1..37a76ba7c6 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H @@ -39,7 +39,7 @@ volVectorField U Info<< "Creating turbulence model\n" << endl; autoPtr turbulence ( - compressible::RASModel::New + compressible::New ( rho, U, diff --git a/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H b/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H index 90b475794b..4af3af3ce4 100644 --- a/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H +++ b/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H @@ -44,7 +44,7 @@ { autoPtr turbulence ( - compressible::RASModel::New + compressible::New ( rho, U, @@ -59,7 +59,7 @@ { autoPtr turbulence ( - compressible::LESModel::New + compressible::New ( rho, U, diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H index fa27e4b38b..cb7da73687 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H @@ -82,7 +82,7 @@ singlePhaseTransportModel laminarTransport(U, phi); autoPtr turbulence ( - incompressible::RASModel::New(U, phi, laminarTransport) + incompressible::New(U, phi, laminarTransport) ); diff --git a/applications/solvers/incompressible/boundaryFoam/createFields.H b/applications/solvers/incompressible/boundaryFoam/createFields.H index 15faa59f82..5ecfebfcb4 100644 --- a/applications/solvers/incompressible/boundaryFoam/createFields.H +++ b/applications/solvers/incompressible/boundaryFoam/createFields.H @@ -33,7 +33,7 @@ singlePhaseTransportModel laminarTransport(U, phi); autoPtr turbulence ( - incompressible::RASModel::New(U, phi, laminarTransport) + incompressible::New(U, phi, laminarTransport) ); dimensionedVector Ubar("Ubar", dimVelocity, laminarTransport); diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/createFields.H b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/createFields.H index 9d9fb484fc..5658b68ec6 100644 --- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/createFields.H +++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/createFields.H @@ -66,5 +66,5 @@ singlePhaseTransportModel laminarTransport(U, phi); autoPtr turbulence ( - incompressible::RASModel::New(U, phi, laminarTransport) + incompressible::New(U, phi, laminarTransport) ); diff --git a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createFields.H b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createFields.H index 7c07f44f8b..08f2c28606 100644 --- a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createFields.H +++ b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createFields.H @@ -18,5 +18,5 @@ autoPtr RASModel ( - incompressible::RASModel::New(U, phi, laminarTransport) + incompressible::New(U, phi, laminarTransport) ); diff --git a/applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C b/applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C index 958bfdc48c..6f6609c2fd 100644 --- a/applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C +++ b/applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C @@ -55,7 +55,7 @@ void calcIncompressible autoPtr model ( - incompressible::RASModel::New(U, phi, laminarTransport) + incompressible::New(U, phi, laminarTransport) ); const volSymmTensorField Reff(model->devReff()); @@ -104,7 +104,7 @@ void calcCompressible autoPtr model ( - compressible::RASModel::New + compressible::New ( rho, U, diff --git a/src/TurbulenceModels/compressible/SpecificCompressibleTurbulenceModel/SpecificCompressibleTurbulenceModel.C b/src/TurbulenceModels/compressible/SpecificCompressibleTurbulenceModel/SpecificCompressibleTurbulenceModel.C deleted file mode 100644 index b7430341b2..0000000000 --- a/src/TurbulenceModels/compressible/SpecificCompressibleTurbulenceModel/SpecificCompressibleTurbulenceModel.C +++ /dev/null @@ -1,99 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "SpecificCompressibleTurbulenceModel.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -Foam::SpecificCompressibleTurbulenceModel -< - BasicCompressibleTurbulenceModel ->::SpecificCompressibleTurbulenceModel -( - const word& type, - const geometricOneField& alpha, - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& alphaRhoPhi, - const surfaceScalarField& phi, - const transportModel& transport, - const word& propertiesName -) -: - BasicCompressibleTurbulenceModel - ( - type, - alpha, - rho, - U, - alphaRhoPhi, - phi, - transport, - propertiesName - ) -{} - - -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -template -Foam::autoPtr -< - Foam::SpecificCompressibleTurbulenceModel - < - BasicCompressibleTurbulenceModel - > -> -Foam::SpecificCompressibleTurbulenceModel -< - BasicCompressibleTurbulenceModel ->::New -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& propertiesName -) -{ - return autoPtr - ( - static_cast( - BasicCompressibleTurbulenceModel::New - ( - geometricOneField(), - rho, - U, - phi, - phi, - transport, - propertiesName - ).ptr()) - ); -} - - -// ************************************************************************* // diff --git a/src/TurbulenceModels/compressible/SpecificCompressibleTurbulenceModel/SpecificCompressibleTurbulenceModel.H b/src/TurbulenceModels/compressible/SpecificCompressibleTurbulenceModel/SpecificCompressibleTurbulenceModel.H deleted file mode 100644 index c7d31b8cc2..0000000000 --- a/src/TurbulenceModels/compressible/SpecificCompressibleTurbulenceModel/SpecificCompressibleTurbulenceModel.H +++ /dev/null @@ -1,110 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::SpecificCompressibleTurbulenceModel - -Description - Templated abstract base class for specific (RAS/LES) compressible - turbulence models - -SourceFiles - SpecificCompressibleTurbulenceModel.C - -\*---------------------------------------------------------------------------*/ - -#ifndef SpecificCompressibleTurbulenceModel_H -#define SpecificCompressibleTurbulenceModel_H - -#include "CompressibleTurbulenceModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class SpecificCompressibleTurbulenceModel Declaration -\*---------------------------------------------------------------------------*/ - -template -class SpecificCompressibleTurbulenceModel -: - public BasicCompressibleTurbulenceModel -{ - -public: - - typedef typename BasicCompressibleTurbulenceModel::transportModel - transportModel; - - // Constructors - - //- Construct from components - SpecificCompressibleTurbulenceModel - ( - const word& type, - const geometricOneField& alpha, - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& alphaRhoPhi, - const surfaceScalarField& phi, - const transportModel& transport, - const word& propertiesName - ); - - - //- Destructor - virtual ~SpecificCompressibleTurbulenceModel() - {} - - - // Selectors - - //- Return a reference to the selected turbulence model - static autoPtr New - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& propertiesName = turbulenceModel::propertiesName - ); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository -# include "SpecificCompressibleTurbulenceModel.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModel.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModel.H index da111a9907..b7a9eabd60 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModel.H +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModel.H @@ -42,7 +42,7 @@ SourceFiles #ifndef turbulentFluidThermoModel_H #define turbulentFluidThermoModel_H -#include "SpecificCompressibleTurbulenceModel.H" +#include "CompressibleTurbulenceModel.H" #include "ThermalDiffusivity.H" #include "EddyDiffusivity.H" #include "RASModel.H" @@ -58,15 +58,31 @@ namespace Foam typedef ThermalDiffusivity > turbulenceModel; - typedef SpecificCompressibleTurbulenceModel - < - RASModel > - > RASModel; + typedef RASModel > RASModel; + typedef LESModel > LESModel; - typedef SpecificCompressibleTurbulenceModel - < - LESModel > - > LESModel; + template + autoPtr New + ( + const volScalarField& rho, + const volVectorField& U, + const surfaceScalarField& phi, + const typename BasicCompressibleTurbulenceModel::transportModel& + transport, + const word& propertiesName = turbulenceModel::propertiesName + ) + { + return BasicCompressibleTurbulenceModel::New + ( + geometricOneField(), + rho, + U, + phi, + phi, + transport, + propertiesName + ); + } } } diff --git a/src/TurbulenceModels/incompressible/SpecificIncompressibleTurbulenceModel/SpecificIncompressibleTurbulenceModel.C b/src/TurbulenceModels/incompressible/SpecificIncompressibleTurbulenceModel/SpecificIncompressibleTurbulenceModel.C deleted file mode 100644 index f6ba580c0f..0000000000 --- a/src/TurbulenceModels/incompressible/SpecificIncompressibleTurbulenceModel/SpecificIncompressibleTurbulenceModel.C +++ /dev/null @@ -1,98 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "SpecificIncompressibleTurbulenceModel.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -Foam::SpecificIncompressibleTurbulenceModel -< - BasicIncompressibleTurbulenceModel ->::SpecificIncompressibleTurbulenceModel -( - const word& type, - const geometricOneField& alpha, - const geometricOneField& rho, - const volVectorField& U, - const surfaceScalarField& alphaRhoPhi, - const surfaceScalarField& phi, - const transportModel& transport, - const word& propertiesName -) -: - BasicIncompressibleTurbulenceModel - ( - type, - alpha, - rho, - U, - alphaRhoPhi, - phi, - transport, - propertiesName - ) -{} - - -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -template -Foam::autoPtr -< - Foam::SpecificIncompressibleTurbulenceModel - < - BasicIncompressibleTurbulenceModel - > -> -Foam::SpecificIncompressibleTurbulenceModel -< - BasicIncompressibleTurbulenceModel ->::New -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& propertiesName -) -{ - return autoPtr - ( - static_cast( - BasicIncompressibleTurbulenceModel::New - ( - geometricOneField(), - geometricOneField(), - U, - phi, - phi, - transport, - propertiesName - ).ptr()) - ); -} - - -// ************************************************************************* // diff --git a/src/TurbulenceModels/incompressible/SpecificIncompressibleTurbulenceModel/SpecificIncompressibleTurbulenceModel.H b/src/TurbulenceModels/incompressible/SpecificIncompressibleTurbulenceModel/SpecificIncompressibleTurbulenceModel.H deleted file mode 100644 index eb65ea2820..0000000000 --- a/src/TurbulenceModels/incompressible/SpecificIncompressibleTurbulenceModel/SpecificIncompressibleTurbulenceModel.H +++ /dev/null @@ -1,109 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::SpecificIncompressibleTurbulenceModel - -Description - Templated abstract base class for specific (RAS/LES) incompressible - turbulence models - -SourceFiles - SpecificIncompressibleTurbulenceModel.C - -\*---------------------------------------------------------------------------*/ - -#ifndef SpecificIncompressibleTurbulenceModel_H -#define SpecificIncompressibleTurbulenceModel_H - -#include "IncompressibleTurbulenceModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class SpecificIncompressibleTurbulenceModel Declaration -\*---------------------------------------------------------------------------*/ - -template -class SpecificIncompressibleTurbulenceModel -: - public BasicIncompressibleTurbulenceModel -{ - -public: - - typedef typename BasicIncompressibleTurbulenceModel::transportModel - transportModel; - - // Constructors - - //- Construct from components - SpecificIncompressibleTurbulenceModel - ( - const word& type, - const geometricOneField& alpha, - const geometricOneField& rho, - const volVectorField& U, - const surfaceScalarField& alphaRhoPhi, - const surfaceScalarField& phi, - const transportModel& transport, - const word& propertiesName - ); - - - //- Destructor - virtual ~SpecificIncompressibleTurbulenceModel() - {} - - - // Selectors - - //- Return a reference to the selected turbulence model - static autoPtr New - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& propertiesName = turbulenceModel::propertiesName - ); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository -# include "SpecificIncompressibleTurbulenceModel.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModel.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModel.H index 72818e7f3c..4ed30e0846 100644 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModel.H +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModel.H @@ -42,7 +42,7 @@ SourceFiles #ifndef turbulentTransportModel_H #define turbulentTransportModel_H -#include "SpecificIncompressibleTurbulenceModel.H" +#include "IncompressibleTurbulenceModel.H" #include "RASModel.H" #include "LESModel.H" #include "incompressible/transportModel/transportModel.H" @@ -55,15 +55,30 @@ namespace Foam { typedef IncompressibleTurbulenceModel turbulenceModel; - typedef SpecificIncompressibleTurbulenceModel - < - RASModel - > RASModel; + typedef RASModel RASModel; + typedef LESModel LESModel; - typedef SpecificIncompressibleTurbulenceModel - < - LESModel - > LESModel; + template + autoPtr New + ( + const volVectorField& U, + const surfaceScalarField& phi, + const typename BasicCompressibleTurbulenceModel::transportModel& + transport, + const word& propertiesName = turbulenceModel::propertiesName + ) + { + return BasicCompressibleTurbulenceModel::New + ( + geometricOneField(), + geometricOneField(), + U, + phi, + phi, + transport, + propertiesName + ); + } } }