combustionModels/FSD: Corrected

Renamed 'omega' to 'FSDomega' to avoid a clash with the k-omega
turbulence models.

Resolves bug-report http://bugs.openfoam.org/view.php?id=2237
This commit is contained in:
Henry Weller
2016-09-09 16:23:28 +01:00
parent 7531b2a4be
commit 017281a116
19 changed files with 49 additions and 139 deletions

View File

@ -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,

View File

@ -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);
};

View File

@ -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<surfaceScalarField> 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_)

View File

@ -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<volScalarField> 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<surfaceScalarField> phi() const;
//- Is combustion active?
inline const Switch& active() const;

View File

@ -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::surfaceScalarField> Foam::combustionModel::phi() const
{
return turbulence().alphaRhoPhi();
}

View File

@ -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::volScalarField>
Foam::combustionModels::psiChemistryCombustion::rho() const
{
return chemistryPtr_->thermo().rho();
}
// ************************************************************************* //

View File

@ -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<volScalarField> rho() const;
};

View File

@ -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<volScalarField> rho() const = 0;
// IO

View File

@ -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::volScalarField>
Foam::combustionModels::psiThermoCombustion::rho() const
{
return thermoPtr_->rho();
}
// ************************************************************************* //

View File

@ -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<volScalarField> rho() const;
};

View File

@ -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::volScalarField>
Foam::combustionModels::rhoChemistryCombustion::rho() const
{
return chemistryPtr_->thermo().rho();
}
// ************************************************************************* //

View File

@ -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<volScalarField> rho() const;
};

View File

@ -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<volScalarField> rho() const = 0;
// IO

View File

@ -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::volScalarField>
Foam::combustionModels::rhoThermoCombustion::rho() const
{
return thermoPtr_().rho();
}
// ************************************************************************* //

View File

@ -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<volScalarField> rho() const;
};

View File

@ -11,7 +11,7 @@ FoamFile
format ascii;
class volScalarField;
location "0";
object omega;
object FSDomega;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -35,6 +35,8 @@ FSDCoeffs
fuel Methane;
semiImplicit no;
relaxationCoeffs
{
C 2.0;

View File

@ -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;

View File

@ -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;