diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C index 06dca4d56c..4e767ca3ad 100644 --- a/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,32 +36,6 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::reactionRateFlameArea::reactionRateFlameArea -( - const dictionary& dict, - const fvMesh& mesh, - const combustionModel& combModel -) -: - coeffDict_(dictionary::null), - mesh_(mesh), - combModel_(combModel), - fuel_(dict.lookup("fuel")), - omega_ - ( - IOobject - ( - "omega", - mesh_.time().timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ) -{} - - Foam::reactionRateFlameArea::reactionRateFlameArea ( const word& modelType, @@ -78,7 +52,7 @@ Foam::reactionRateFlameArea::reactionRateFlameArea ( IOobject ( - "omega", + "FSDomega", mesh_.time().timeName(), mesh_, IOobject::MUST_READ, diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.H b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.H index b6267a3892..4ae4271a9a 100644 --- a/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.H +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -111,14 +111,6 @@ public: // Constructors - //- Construct from dictionary and psiReactionThermo - reactionRateFlameArea - ( - const dictionary& dict, - const fvMesh& mesh, - const combustionModel& combModel - ); - //- Construct from components reactionRateFlameArea ( @@ -160,7 +152,6 @@ public: //- Update from dictionary virtual bool read(const dictionary& dictProperties); - }; diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C b/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C index f26b698b6f..c714bc5cd2 100644 --- a/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -123,13 +123,14 @@ void Foam::reactionRateFlameAreaModels::relaxation::correct /(sqr(omega0 - omegaInf) + sqr(omegaMin)) ); - const volScalarField rho(combModel_.rho()); - const surfaceScalarField phi(combModel_.phi()); + const volScalarField& rho = combModel_.rho(); + const tmp tphi = combModel_.phi(); + const surfaceScalarField& phi = tphi(); solve ( fvm::ddt(rho, omega_) - + fvm::div(phi, omega_, "div(phi,omega)") + + fvm::div(phi, omega_) == rho*Rc*omega0 - fvm::SuSp(rho*(tau + Rc), omega_) diff --git a/src/combustionModels/combustionModel/combustionModel.H b/src/combustionModels/combustionModel/combustionModel.H index 5368d1af80..2eb74cc3b5 100644 --- a/src/combustionModels/combustionModel/combustionModel.H +++ b/src/combustionModels/combustionModel/combustionModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -111,20 +111,17 @@ public: //- Return const access to the mesh database inline const fvMesh& mesh() const; - //- Return const access to phi - inline const surfaceScalarField& phi() const; - - //- Return const access to rho - virtual tmp rho() const = 0; + //- Set turbulence + inline void setTurbulence(compressibleTurbulenceModel& turbModel); //- Return access to turbulence inline const compressibleTurbulenceModel& turbulence() const; - //- Set turbulence - inline void setTurbulence - ( - compressibleTurbulenceModel& turbModel - ); + //- Return const access to rho + inline const volScalarField& rho() const; + + //- Return const access to phi + inline tmp phi() const; //- Is combustion active? inline const Switch& active() const; diff --git a/src/combustionModels/combustionModel/combustionModelI.H b/src/combustionModels/combustionModel/combustionModelI.H index e095c5f7e0..135dbe4038 100644 --- a/src/combustionModels/combustionModel/combustionModelI.H +++ b/src/combustionModels/combustionModel/combustionModelI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,42 +31,31 @@ inline const Foam::fvMesh& Foam::combustionModel::mesh() const } -inline const Foam::surfaceScalarField& Foam::combustionModel::phi() const -{ - if (turbulencePtr_) - { - return turbulencePtr_->phi(); - } - else - { - FatalErrorInFunction - << "turbulencePtr_ is empty. Please use " - << "combustionModel::setTurbulence " - << "(compressibleTurbulenceModel& )" - << abort(FatalError); - - return turbulencePtr_->phi(); - } -} - - inline const Foam::compressibleTurbulenceModel& Foam::combustionModel::turbulence() const { - if (turbulencePtr_) - { - return *turbulencePtr_; - } - else + if (!turbulencePtr_) { FatalErrorInFunction << "turbulencePtr_ is empty. Please use " << "combustionModel::setTurbulence " << "(compressibleTurbulenceModel& )" << abort(FatalError); - - return *turbulencePtr_; } + + return *turbulencePtr_; +} + + +inline const Foam::volScalarField& Foam::combustionModel::rho() const +{ + return turbulence().rho(); +} + + +inline Foam::tmp Foam::combustionModel::phi() const +{ + return turbulence().alphaRhoPhi(); } diff --git a/src/combustionModels/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.C b/src/combustionModels/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.C index be0ccfabfb..b28116706e 100644 --- a/src/combustionModels/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.C +++ b/src/combustionModels/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -61,11 +61,4 @@ Foam::combustionModels::psiChemistryCombustion::thermo() const } -Foam::tmp -Foam::combustionModels::psiChemistryCombustion::rho() const -{ - return chemistryPtr_->thermo().rho(); -} - - // ************************************************************************* // diff --git a/src/combustionModels/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.H b/src/combustionModels/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.H index e3725d35d3..5c16c8ad8e 100644 --- a/src/combustionModels/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.H +++ b/src/combustionModels/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -95,9 +95,6 @@ public: //- Return const access to the thermo package virtual const psiReactionThermo& thermo() const; - - //- Return const access to the density field - virtual tmp rho() const; }; diff --git a/src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModel.H b/src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModel.H index 64c5234bfc..36bd824f41 100644 --- a/src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModel.H +++ b/src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -120,9 +120,6 @@ public: //- Return const access to the thermo package virtual const psiReactionThermo& thermo() const = 0; - //- Return tmp of rho - virtual tmp rho() const = 0; - // IO diff --git a/src/combustionModels/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.C b/src/combustionModels/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.C index 6d45d60ef5..25450e2473 100644 --- a/src/combustionModels/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.C +++ b/src/combustionModels/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -61,11 +61,4 @@ Foam::combustionModels::psiThermoCombustion::thermo() const } -Foam::tmp -Foam::combustionModels::psiThermoCombustion::rho() const -{ - return thermoPtr_->rho(); -} - - // ************************************************************************* // diff --git a/src/combustionModels/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.H b/src/combustionModels/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.H index 44a55155ad..f922e1a44d 100644 --- a/src/combustionModels/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.H +++ b/src/combustionModels/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -95,9 +95,6 @@ public: //- Return const access to the thermo package virtual const psiReactionThermo& thermo() const; - - //- Return const access to the density field - virtual tmp rho() const; }; diff --git a/src/combustionModels/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.C b/src/combustionModels/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.C index 70ce698d7b..b6d1ac1172 100644 --- a/src/combustionModels/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.C +++ b/src/combustionModels/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -61,11 +61,4 @@ Foam::combustionModels::rhoChemistryCombustion::thermo() const } -Foam::tmp -Foam::combustionModels::rhoChemistryCombustion::rho() const -{ - return chemistryPtr_->thermo().rho(); -} - - // ************************************************************************* // diff --git a/src/combustionModels/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.H b/src/combustionModels/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.H index 2a37812e05..c8389c0ea5 100644 --- a/src/combustionModels/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.H +++ b/src/combustionModels/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -95,9 +95,6 @@ public: //- Return const access to the thermo package virtual const rhoReactionThermo& thermo() const; - - //- Return const access to the density field - virtual tmp rho() const; }; diff --git a/src/combustionModels/rhoCombustionModel/rhoCombustionModel/rhoCombustionModel.H b/src/combustionModels/rhoCombustionModel/rhoCombustionModel/rhoCombustionModel.H index 341b5b6dcd..0266c74b3e 100644 --- a/src/combustionModels/rhoCombustionModel/rhoCombustionModel/rhoCombustionModel.H +++ b/src/combustionModels/rhoCombustionModel/rhoCombustionModel/rhoCombustionModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -127,9 +127,6 @@ public: //- Return const access to the thermo package virtual const rhoReactionThermo& thermo() const = 0; - //- Return tmp of rho - virtual tmp rho() const = 0; - // IO diff --git a/src/combustionModels/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.C b/src/combustionModels/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.C index ef95710f2a..aa645f0898 100644 --- a/src/combustionModels/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.C +++ b/src/combustionModels/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -61,11 +61,4 @@ Foam::combustionModels::rhoThermoCombustion::thermo() const } -Foam::tmp -Foam::combustionModels::rhoThermoCombustion::rho() const -{ - return thermoPtr_().rho(); -} - - // ************************************************************************* // diff --git a/src/combustionModels/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.H b/src/combustionModels/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.H index 6982569fa6..43041d4601 100644 --- a/src/combustionModels/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.H +++ b/src/combustionModels/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -95,9 +95,6 @@ public: //- Return const access to the thermo package virtual const rhoReactionThermo& thermo() const; - - //- Return const access to the density field - virtual tmp rho() const; }; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/omega b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/FSDomega similarity index 98% rename from tutorials/combustion/fireFoam/les/smallPoolFire2D/0/omega rename to tutorials/combustion/fireFoam/les/smallPoolFire2D/0/FSDomega index faca2f4dd8..f91a845488 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/omega +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/FSDomega @@ -11,7 +11,7 @@ FoamFile format ascii; class volScalarField; location "0"; - object omega; + object FSDomega; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties index 51e80f82d6..dff08d26af 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties @@ -35,6 +35,8 @@ FSDCoeffs fuel Methane; + semiImplicit no; + relaxationCoeffs { C 2.0; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes index 82cb86a511..60500f7832 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes @@ -30,8 +30,10 @@ divSchemes default none; div(phi,U) Gauss LUST grad(U); + div(U) Gauss linear; div(phi,K) Gauss linear; div(phi,k) Gauss limitedLinear 1; + div(phi,FSDomega) Gauss limitedLinear 1; div(phi,Yi_h) Gauss multivariateSelection { O2 limitedLinear01 1; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSolution b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSolution index 4506a37939..063fada2c7 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSolution +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSolution @@ -54,7 +54,7 @@ solvers } - "(U|Yi|k|h|omega)" + "(U|Yi|k|h|FSDomega)" { solver PBiCGStab; preconditioner DILU; @@ -63,7 +63,7 @@ solvers nSweeps 1; }; - "(U|Yi|k|h|omega)Final" + "(U|Yi|k|h|FSDomega)Final" { $U; tolerance 1e-6;