mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
MRG: Integrated Foundation code to commit ba4dbed
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,7 +24,6 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "PaSR.H"
|
||||
#include "fvmSup.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -39,19 +38,18 @@ Foam::combustionModels::PaSR<Type>::PaSR
|
||||
:
|
||||
laminar<Type>(modelType, mesh, combustionProperties, phaseName),
|
||||
Cmix_(readScalar(this->coeffs().lookup("Cmix"))),
|
||||
turbulentReaction_(this->coeffs().lookup("turbulentReaction")),
|
||||
kappa_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("PaSR:kappa", phaseName),
|
||||
IOobject::groupName(typeName + ":kappa", phaseName),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("kappa", dimless, 0.0)
|
||||
dimensionedScalar("kappa", dimless, 0)
|
||||
)
|
||||
{}
|
||||
|
||||
@ -72,35 +70,31 @@ void Foam::combustionModels::PaSR<Type>::correct()
|
||||
{
|
||||
laminar<Type>::correct();
|
||||
|
||||
if (turbulentReaction_)
|
||||
{
|
||||
tmp<volScalarField> tepsilon(this->turbulence().epsilon());
|
||||
const volScalarField& epsilon = tepsilon();
|
||||
tmp<volScalarField> tmuEff(this->turbulence().muEff());
|
||||
const volScalarField& muEff = tmuEff();
|
||||
tmp<volScalarField> ttc(this->tc());
|
||||
const volScalarField& tc = ttc();
|
||||
tmp<volScalarField> trho(this->rho());
|
||||
const volScalarField& rho = trho();
|
||||
tmp<volScalarField> tepsilon(this->turbulence().epsilon());
|
||||
const scalarField& epsilon = tepsilon();
|
||||
|
||||
forAll(epsilon, i)
|
||||
tmp<volScalarField> tmuEff(this->turbulence().muEff());
|
||||
const scalarField& muEff = tmuEff();
|
||||
|
||||
tmp<volScalarField> ttc(this->tc());
|
||||
const scalarField& tc = ttc();
|
||||
|
||||
tmp<volScalarField> trho(this->rho());
|
||||
const scalarField& rho = trho();
|
||||
|
||||
forAll(epsilon, i)
|
||||
{
|
||||
const scalar tk =
|
||||
Cmix_*sqrt(max(muEff[i]/rho[i]/(epsilon[i] + SMALL), 0));
|
||||
|
||||
if (tk > SMALL)
|
||||
{
|
||||
scalar tk =
|
||||
Cmix_*sqrt(max(muEff[i]/rho[i]/(epsilon[i] + SMALL), 0));
|
||||
|
||||
if (tk > SMALL)
|
||||
{
|
||||
kappa_[i] = tc[i]/(tc[i] + tk);
|
||||
}
|
||||
else
|
||||
{
|
||||
kappa_[i] = 1.0;
|
||||
}
|
||||
kappa_[i] = tc[i]/(tc[i] + tk);
|
||||
}
|
||||
else
|
||||
{
|
||||
kappa_[i] = 1.0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
kappa_ = 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -122,7 +116,7 @@ Foam::combustionModels::PaSR<Type>::Qdot() const
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject::groupName("PaSR:dQ", this->phaseName_),
|
||||
IOobject::groupName(typeName + ":Qdot", this->phaseName_),
|
||||
kappa_*laminar<Type>::Qdot()
|
||||
)
|
||||
);
|
||||
@ -135,7 +129,6 @@ bool Foam::combustionModels::PaSR<Type>::read()
|
||||
if (laminar<Type>::read())
|
||||
{
|
||||
this->coeffs().lookup("Cmix") >> Cmix_;
|
||||
this->coeffs().lookup("turbulentReaction") >> turbulentReaction_;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,10 +28,11 @@ Group
|
||||
grpCombustionModels
|
||||
|
||||
Description
|
||||
Partially stirred reactor combustion model. The model calculates a finite
|
||||
rate, based on both turbulence and chemistry time scales. Depending on
|
||||
mesh resolution, the Cmix parameter can be used to scale the turbulence
|
||||
mixing time scale.
|
||||
Partially stirred reactor turbulent combustion model.
|
||||
|
||||
This model calculates a finite rate, based on both turbulence and chemistry
|
||||
time scales. Depending on mesh resolution, the Cmix parameter can be used
|
||||
to scale the turbulence mixing time scale.
|
||||
|
||||
SourceFiles
|
||||
PaSR.C
|
||||
@ -64,9 +65,6 @@ class PaSR
|
||||
//- Mixing constant
|
||||
scalar Cmix_;
|
||||
|
||||
//- Turbulent reaction switch
|
||||
Switch turbulentReaction_;
|
||||
|
||||
//- Mixing parameter
|
||||
volScalarField kappa_;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -170,8 +170,8 @@ bool Foam::combustionModels::laminar<Type>::read()
|
||||
{
|
||||
if (Type::read())
|
||||
{
|
||||
this->coeffs().lookup("integrateReactionRate")
|
||||
>> integrateReactionRate_;
|
||||
integrateReactionRate_ =
|
||||
this->coeffs().lookupOrDefault("integrateReactionRate", true);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -52,9 +52,7 @@ Foam::combustionModels::noCombustion<CombThermoType>::~noCombustion()
|
||||
|
||||
template<class CombThermoType>
|
||||
void Foam::combustionModels::noCombustion<CombThermoType>::correct()
|
||||
{
|
||||
// Do Nothing
|
||||
}
|
||||
{}
|
||||
|
||||
|
||||
template<class CombThermoType>
|
||||
@ -83,7 +81,7 @@ Foam::combustionModels::noCombustion<CombThermoType>::Qdot() const
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("Qdot", this->phaseName_),
|
||||
IOobject::groupName(typeName + ":Qdot", this->phaseName_),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
|
||||
Reference in New Issue
Block a user