diff --git a/applications/solvers/combustion/reactingFoam/createFields.H b/applications/solvers/combustion/reactingFoam/createFields.H index 9e02c8de2e..21a7fac1e7 100644 --- a/applications/solvers/combustion/reactingFoam/createFields.H +++ b/applications/solvers/combustion/reactingFoam/createFields.H @@ -1,16 +1,11 @@ Info<< "Creating reaction model\n" << endl; -autoPtr reaction +autoPtr reaction ( - combustionModels::psiChemistryCombustionModel::New - ( - mesh - ) + combustionModels::psiCombustionModel::New(mesh) ); -psiChemistryModel& chemistry = reaction->pChemistry(); - -psiReactionThermo& thermo = chemistry.thermo(); +psiReactionThermo& thermo = reaction->thermo(); basicMultiComponentMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); diff --git a/applications/solvers/combustion/reactingFoam/reactingFoam.C b/applications/solvers/combustion/reactingFoam/reactingFoam.C index 5344eea3be..f2517529e2 100644 --- a/applications/solvers/combustion/reactingFoam/reactingFoam.C +++ b/applications/solvers/combustion/reactingFoam/reactingFoam.C @@ -31,7 +31,7 @@ Description #include "fvCFD.H" #include "turbulenceModel.H" -#include "psiChemistryCombustionModel.H" +#include "psiCombustionModel.H" #include "multivariateScheme.H" #include "pimpleControl.H" diff --git a/applications/solvers/combustion/rhoReactingFoam/createFields.H b/applications/solvers/combustion/rhoReactingFoam/createFields.H index 5d71e0f075..f58e6e71bd 100644 --- a/applications/solvers/combustion/rhoReactingFoam/createFields.H +++ b/applications/solvers/combustion/rhoReactingFoam/createFields.H @@ -1,16 +1,11 @@ Info<< "Creating reaction model\n" << endl; -autoPtr reaction +autoPtr reaction ( - combustionModels::rhoChemistryCombustionModel::New - ( - mesh - ) + combustionModels::rhoCombustionModel::New(mesh) ); -rhoChemistryModel& chemistry = reaction->pChemistry(); - -rhoReactionThermo& thermo = chemistry.thermo(); +rhoReactionThermo& thermo = reaction->thermo(); basicMultiComponentMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); diff --git a/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C b/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C index aa8f1a5501..f3bab92f2f 100644 --- a/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C +++ b/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "rhoChemistryCombustionModel.H" +#include "rhoCombustionModel.H" #include "turbulenceModel.H" #include "multivariateScheme.H" #include "pimpleControl.H" diff --git a/applications/solvers/lagrangian/LTSReactingParcelFoam/LTSReactingParcelFoam.C b/applications/solvers/lagrangian/LTSReactingParcelFoam/LTSReactingParcelFoam.C index 4c368e7cdd..6f41f328a3 100644 --- a/applications/solvers/lagrangian/LTSReactingParcelFoam/LTSReactingParcelFoam.C +++ b/applications/solvers/lagrangian/LTSReactingParcelFoam/LTSReactingParcelFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,7 +38,7 @@ Description #include "fvCFD.H" #include "turbulenceModel.H" #include "basicReactingMultiphaseCloud.H" -#include "rhoChemistryCombustionModel.H" +#include "rhoCombustionModel.H" #include "radiationModel.H" #include "porousZones.H" #include "IObasicSourceList.H" diff --git a/applications/solvers/lagrangian/LTSReactingParcelFoam/createFields.H b/applications/solvers/lagrangian/LTSReactingParcelFoam/createFields.H index 25ceef7aa6..b78aeea132 100644 --- a/applications/solvers/lagrangian/LTSReactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/LTSReactingParcelFoam/createFields.H @@ -1,16 +1,11 @@ Info<< "Creating combustion model\n" << endl; - autoPtr combustion + autoPtr combustion ( - combustionModels::rhoChemistryCombustionModel::New - ( - mesh - ) + combustionModels::rhoCombustionModel::New(mesh) ); - rhoChemistryModel& chemistry = combustion->pChemistry(); - - rhoReactionThermo& thermo = chemistry.thermo(); + rhoReactionThermo& thermo = combustion->thermo(); SLGThermo slgThermo(mesh, thermo); diff --git a/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C b/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C index d6c61074e1..7b9dff602e 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C +++ b/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,7 +39,7 @@ Description #include "turbulenceModel.H" #include "basicThermoCloud.H" #include "coalCloud.H" -#include "psiChemistryCombustionModel.H" +#include "psiCombustionModel.H" #include "IObasicSourceList.H" #include "radiationModel.H" #include "SLGThermo.H" diff --git a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H index 9a2b17f1af..22451ca108 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H @@ -1,16 +1,11 @@ Info<< "Creating combustion model\n" << endl; - autoPtr combustion + autoPtr combustion ( - combustionModels::psiChemistryCombustionModel::New - ( - mesh - ) + combustionModels::psiCombustionModel::New(mesh) ); - psiChemistryModel& chemistry = combustion->pChemistry(); - - psiReactionThermo& thermo = chemistry.thermo(); + psiReactionThermo& thermo = combustion->thermo(); SLGThermo slgThermo(mesh, thermo); diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H index 52ed150808..1dfb6aa284 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H @@ -1,16 +1,11 @@ Info<< "Creating combustion model\n" << endl; - autoPtr combustion + autoPtr combustion ( - combustionModels::rhoChemistryCombustionModel::New - ( - mesh - ) + combustionModels::rhoCombustionModel::New(mesh) ); - rhoChemistryModel& chemistry = combustion->pChemistry(); - - rhoReactionThermo& thermo = chemistry.thermo(); + rhoReactionThermo& thermo = combustion->thermo(); SLGThermo slgThermo(mesh, thermo); diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C index 8d97ec99ff..61533fcd6b 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,7 @@ Application porousExplicitSourceReactingParcelFoam Description - Transient PISO solver for compressible, laminar or turbulent flow with + Transient PIMPLE solver for compressible, laminar or turbulent flow with reacting multiphase Lagrangian parcels for porous media, including explicit sources for mass, momentum and energy @@ -42,7 +42,7 @@ Description #include "fvCFD.H" #include "turbulenceModel.H" #include "basicReactingMultiphaseCloud.H" -#include "rhoChemistryCombustionModel.H" +#include "rhoCombustionModel.H" #include "radiationModel.H" #include "porousZones.H" #include "IObasicSourceList.H" diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H index 433e3d0182..6b0dd8655f 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H @@ -1,16 +1,11 @@ Info<< "Creating combustion model\n" << endl; - autoPtr combustion + autoPtr combustion ( - combustionModels::psiChemistryCombustionModel::New - ( - mesh - ) + combustionModels::psiCombustionModel::New(mesh) ); - psiChemistryModel& chemistry = combustion->pChemistry(); - - psiReactionThermo& thermo = chemistry.thermo(); + psiReactionThermo& thermo = combustion->thermo(); SLGThermo slgThermo(mesh, thermo); diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C b/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C index 06ef5ddac3..9badba12b7 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,7 @@ Application reactingParcelFilmFoam Description - Transient PISO solver for compressible, laminar or turbulent flow with + Transient PIMPLE solver for compressible, laminar or turbulent flow with reacting Lagrangian parcels, and surface film modelling. \*---------------------------------------------------------------------------*/ @@ -34,7 +34,7 @@ Description #include "turbulenceModel.H" #include "basicReactingCloud.H" #include "surfaceFilmModel.H" -#include "psiChemistryCombustionModel.H" +#include "psiCombustionModel.H" #include "radiationModel.H" #include "SLGThermo.H" #include "pimpleControl.H" diff --git a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H index 655510006d..da5568da10 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H @@ -1,16 +1,11 @@ Info<< "Creating combustion model\n" << endl; - autoPtr combustion + autoPtr combustion ( - combustionModels::psiChemistryCombustionModel::New - ( - mesh - ) + combustionModels::psiCombustionModel::New(mesh) ); - psiChemistryModel& chemistry = combustion->pChemistry(); - - psiReactionThermo& thermo = chemistry.thermo(); + psiReactionThermo& thermo = combustion->thermo(); SLGThermo slgThermo(mesh, thermo); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C index a46cb30f80..3cfbcb907c 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,7 @@ Application reactingParcelFoam Description - Transient PISO solver for compressible, laminar or turbulent flow with + Transient PIMPLE solver for compressible, laminar or turbulent flow with reacting Lagrangian parcels. \*---------------------------------------------------------------------------*/ @@ -33,7 +33,7 @@ Description #include "fvCFD.H" #include "turbulenceModel.H" #include "basicReactingCloud.H" -#include "psiChemistryCombustionModel.H" +#include "psiCombustionModel.H" #include "radiationModel.H" #include "SLGThermo.H" #include "pimpleControl.H" diff --git a/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C b/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C index 0bc6773518..d02da85df5 100644 --- a/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C +++ b/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -41,9 +41,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) { @@ -90,7 +90,7 @@ int main(int argc, char *argv[]) mesh ); -# include "createPhi.H" + #include "createPhi.H" singlePhaseTransportModel laminarTransport(U, phi); @@ -124,8 +124,8 @@ int main(int argc, char *argv[]) Info<< "Patch " << patchi << " named " << currPatch.name() - << " y+ : min: " << min(Yp) << " max: " << max(Yp) - << " average: " << average(Yp) << nl << endl; + << " y+ : min: " << gMin(Yp) << " max: " << gMax(Yp) + << " average: " << gAverage(Yp) << nl << endl; } } diff --git a/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C b/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C index c8de884de9..7af0a901af 100644 --- a/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C +++ b/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C @@ -86,8 +86,8 @@ void calcIncompressibleYPlus Info<< "Patch " << patchi << " named " << nutPw.patch().name() - << " y+ : min: " << min(Yp) << " max: " << max(Yp) - << " average: " << average(Yp) << nl << endl; + << " y+ : min: " << gMin(Yp) << " max: " << gMax(Yp) + << " average: " << gAverage(Yp) << nl << endl; } } @@ -166,8 +166,8 @@ void calcCompressibleYPlus Info<< "Patch " << patchi << " named " << mutPw.patch().name() - << " y+ : min: " << min(Yp) << " max: " << max(Yp) - << " average: " << average(Yp) << nl << endl; + << " y+ : min: " << gMin(Yp) << " max: " << gMax(Yp) + << " average: " << gAverage(Yp) << nl << endl; } } diff --git a/src/combustionModels/FSD/FSD.C b/src/combustionModels/FSD/FSD.C index c7b646d8bb..26f58505a7 100644 --- a/src/combustionModels/FSD/FSD.C +++ b/src/combustionModels/FSD/FSD.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,7 +36,8 @@ namespace combustionModels template FSD::FSD ( - const word& modelType, const fvMesh& mesh + const word& modelType, + const fvMesh& mesh ) : singleStepCombustion(modelType, mesh), @@ -62,14 +63,8 @@ FSD::FSD this->mesh(), dimensionedScalar("zero", dimless, 0.0) ), - YFuelFuelStream_ - ( - dimensionedScalar("YFuelStream", dimless, 1.0) - ), - YO2OxiStream_ - ( - dimensionedScalar("YOxiStream", dimless, 0.23) - ), + YFuelFuelStream_(dimensionedScalar("YFuelStream", dimless, 1.0)), + YO2OxiStream_(dimensionedScalar("YOxiStream", dimless, 0.23)), Cv_(readScalar(this->coeffs().lookup("Cv"))), C_(5.0), ftMin_(0.0), @@ -91,15 +86,15 @@ FSD::~FSD() template void FSD::calculateSourceNorm() { - this->singleMixture_.fresCorrect(); + this->singleMixturePtr_->fresCorrect(); - const label fuelI = this->singleMixture_.fuelIndex(); + const label fuelI = this->singleMixturePtr_->fuelIndex(); - const volScalarField& YFuel = this->thermo_->composition().Y()[fuelI]; + const volScalarField& YFuel = this->thermoPtr_->composition().Y()[fuelI]; - const volScalarField& YO2 = this->thermo_->composition().Y("O2"); + const volScalarField& YO2 = this->thermoPtr_->composition().Y("O2"); - const dimensionedScalar s = this->singleMixture_.s(); + const dimensionedScalar s = this->singleMixturePtr_->s(); ft_ = (s*YFuel - (YO2 - YO2OxiStream_))/(s*YFuelFuelStream_ + YO2OxiStream_); @@ -195,7 +190,7 @@ void FSD::calculateSourceNorm() volScalarField deltaF ( - lesModel.delta()/dimensionedScalar("flame",dimLength, 1.5e-3) + lesModel.delta()/dimensionedScalar("flame", dimLength, 1.5e-3) ); // Linear correlation between delta and flame thickness @@ -205,33 +200,33 @@ void FSD::calculateSourceNorm() forAll(ft_, cellI) { - if(ft_[cellI] > ftMin_ && ft_[cellI] < ftMax_) + if (ft_[cellI] > ftMin_ && ft_[cellI] < ftMax_) { scalar ftCell = ft_[cellI]; - if(ftVar[cellI] > ftVarMin_) //sub-grid beta pdf of ft_ + if (ftVar[cellI] > ftVarMin_) //sub-grid beta pdf of ft_ { scalar ftVarc = ftVar[cellI]; scalar a = max(ftCell*(ftCell*(1.0 - ftCell)/ftVarc - 1.0), 0.0); scalar b = max(a/ftCell - a, 0.0); - for(int i=1; i::calculateSourceNorm() else { omegaFuelBar[cellI] = - (omegaFuel[cellI]/omegaF[cellI]) - *exp - ( - -sqr(ftCell - ftStoich)/(2.0*sqr(0.01*omegaF[cellI])) - ); + omegaFuel[cellI]/omegaF[cellI] + *exp(-sqr(ftCell - ftStoich)/(2.0*sqr(0.01*omegaF[cellI]))); } - } else { - omegaFuelBar[cellI] = 0.0; + omegaFuelBar[cellI] = 0.0; } } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Combustion progress variable (c). -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // Combustion progress variable, c List