combustionModels: Added multiphase-phase support

by naming fields including the phase name is needed
This commit is contained in:
Henry 2015-06-05 08:19:13 +01:00
parent 28f58cb679
commit 320b8708c2
35 changed files with 262 additions and 154 deletions

View File

@ -40,10 +40,16 @@ template<class CombThermoType, class ThermoType>
FSD<CombThermoType, ThermoType>::FSD
(
const word& modelType,
const fvMesh& mesh
const fvMesh& mesh,
const word& phaseName
)
:
singleStepCombustion<CombThermoType, ThermoType>(modelType, mesh),
singleStepCombustion<CombThermoType, ThermoType>
(
modelType,
mesh,
phaseName
),
reactionRateFlameArea_
(
reactionRateFlameArea::New
@ -57,7 +63,7 @@ FSD<CombThermoType, ThermoType>::FSD
(
IOobject
(
"ft",
IOobject::groupName("ft", phaseName),
this->mesh().time().timeName(),
this->mesh(),
IOobject::NO_READ,
@ -144,7 +150,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
(
IOobject
(
"Pc",
IOobject::groupName("Pc", this->phaseName_),
U.time().timeName(),
U.db(),
IOobject::NO_READ,
@ -163,7 +169,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
(
IOobject
(
"omegaFuelBar",
IOobject::groupName("omegaFuelBar", this->phaseName_),
U.time().timeName(),
U.db(),
IOobject::NO_READ,
@ -291,7 +297,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
(
IOobject
(
"products",
IOobject::groupName("products", this->phaseName_),
U.time().timeName(),
U.db(),
IOobject::NO_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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -136,7 +136,7 @@ public:
// Constructors
//- Construct from components
FSD(const word& modelType, const fvMesh& mesh);
FSD(const word& modelType, const fvMesh& mesh, const word& phaseName);
// Destructor
@ -149,7 +149,7 @@ public:
virtual void correct();
// I-O
// IO
//- Update properties
virtual bool 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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -60,17 +60,18 @@ Foam::scalar Foam::consumptionSpeed::omega0Sigma
scalar a
) const
{
scalar omega0 = 0.0;
if (sigma < sigmaExt_)
{
omega0 =
max
(
a*omega0_*(1.0 - exp(eta_*max(sigma, 0.0))),
omegaMin_
) ;
}
return omega0;
scalar omega0 = 0.0;
if (sigma < sigmaExt_)
{
omega0 = max
(
a*omega0_*(1.0 - exp(eta_*max(sigma, 0.0))),
omegaMin_
) ;
}
return omega0;
}
@ -137,4 +138,5 @@ void Foam::consumptionSpeed::read(const dictionary& dict)
dict.lookup("omegaMin") >> omegaMin_;
}
// ************************************************************************* //

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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -51,7 +51,6 @@ class consumptionSpeed
{
// Private Data
//- Maximum consumption speed
scalar omega0_;
@ -122,7 +121,7 @@ public:
}
// I-O
// IO
//- Update properties
void read(const dictionary& dict);

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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -59,8 +59,7 @@ Foam::reactionRateFlameArea::reactionRateFlameArea
),
mesh_
)
{
}
{}
Foam::reactionRateFlameArea::reactionRateFlameArea
@ -87,8 +86,8 @@ Foam::reactionRateFlameArea::reactionRateFlameArea
),
mesh_
)
{
}
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
@ -101,8 +100,9 @@ Foam::reactionRateFlameArea::~reactionRateFlameArea()
bool Foam::reactionRateFlameArea::read(const dictionary& dict)
{
dict.lookup("fuel") >> fuel_;
return true;
return true;
}
// ************************************************************************* //

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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -103,7 +103,7 @@ public:
virtual void correct(const volScalarField& sigma);
// I-O
// IO
//- Update properties from given dictionary
virtual bool read(const dictionary& dictProperties);

View File

@ -32,17 +32,18 @@ template<class Type>
Foam::combustionModels::PaSR<Type>::PaSR
(
const word& modelType,
const fvMesh& mesh
const fvMesh& mesh,
const word& phaseName
)
:
laminar<Type>(modelType, mesh),
laminar<Type>(modelType, mesh, phaseName),
Cmix_(readScalar(this->coeffs().lookup("Cmix"))),
turbulentReaction_(this->coeffs().lookup("turbulentReaction")),
kappa_
(
IOobject
(
"PaSR:kappa",
IOobject::groupName("PaSR:kappa", phaseName),
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
@ -116,11 +117,14 @@ template<class Type>
Foam::tmp<Foam::volScalarField>
Foam::combustionModels::PaSR<Type>::dQ() const
{
return
tmp<volScalarField>
return tmp<volScalarField>
(
new volScalarField
(
new volScalarField("PaSR:dQ", kappa_*laminar<Type>::dQ())
);
IOobject::groupName("PaSR:dQ", this->phaseName_),
kappa_*laminar<Type>::dQ()
)
);
}
@ -128,11 +132,14 @@ template<class Type>
Foam::tmp<Foam::volScalarField>
Foam::combustionModels::PaSR<Type>::Sh() const
{
return
tmp<volScalarField>
return tmp<volScalarField>
(
new volScalarField
(
new volScalarField("PaSR:Sh", kappa_*laminar<Type>::Sh())
);
IOobject::groupName("PaSR:Sh", this->phaseName_),
kappa_*laminar<Type>::Sh()
)
);
}

View File

@ -86,7 +86,7 @@ public:
// Constructors
//- Construct from components
PaSR(const word& modelType, const fvMesh& mesh);
PaSR(const word& modelType, const fvMesh& mesh, const word& phaseName);
//- Destructor
@ -110,7 +110,7 @@ public:
virtual tmp<volScalarField> Sh() const;
// I-O
// IO
//- Update properties from given dictionary
virtual bool read();

View File

@ -37,14 +37,15 @@ namespace Foam
Foam::combustionModel::combustionModel
(
const word& modelType,
const fvMesh& mesh
const fvMesh& mesh,
const word& phaseName
)
:
IOdictionary
(
IOobject
(
"combustionProperties",
IOobject::groupName("combustionProperties", phaseName),
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
@ -55,7 +56,8 @@ Foam::combustionModel::combustionModel
mesh_(mesh),
active_(lookupOrDefault<Switch>("active", true)),
coeffs_(subDict(modelType + "Coeffs")),
modelType_(modelType)
modelType_(modelType),
phaseName_(phaseName)
{}
@ -96,7 +98,7 @@ Foam::tmp<Foam::volScalarField> Foam::combustionModel::Sh() const
(
IOobject
(
"Sh",
IOobject::groupName("Sh", phaseName_),
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,

View File

@ -51,6 +51,14 @@ class combustionModel
:
public IOdictionary
{
// Private Member Functions
//- Disallow copy construct
combustionModel(const combustionModel&);
//- Disallow default bitwise assignment
void operator=(const combustionModel&);
protected:
@ -68,19 +76,11 @@ protected:
//- Dictionary of the model
dictionary coeffs_;
//- Model name
//- Model type
const word modelType_;
private:
// Private Member Functions
//- Disallow copy construct
combustionModel(const combustionModel&);
//- Disallow default bitwise assignment
void operator=(const combustionModel&);
//- Phase name
const word phaseName_;
public:
@ -91,9 +91,13 @@ public:
// Constructors
//- Construct from components
combustionModel(const word& modelType, const fvMesh& mesh);
combustionModel
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName=word::null
);
//- Destructor
@ -104,7 +108,6 @@ public:
// Access
//- Return const access to the mesh database
inline const fvMesh& mesh() const;
@ -145,7 +148,7 @@ public:
virtual tmp<volScalarField> Sh() const;
// I-O
// IO
//- Update properties from given dictionary
virtual bool read();

View File

@ -36,10 +36,17 @@ namespace combustionModels
template<class CombThermoType, class ThermoType>
diffusion<CombThermoType, ThermoType>::diffusion
(
const word& modelType, const fvMesh& mesh
const word& modelType,
const fvMesh& mesh,
const word& phaseName
)
:
singleStepCombustion<CombThermoType, ThermoType>(modelType, mesh),
singleStepCombustion<CombThermoType, ThermoType>
(
modelType,
mesh,
phaseName
),
C_(readScalar(this->coeffs().lookup("C"))),
oxidantName_(this->coeffs().template lookupOrDefault<word>("oxidant", "O2"))
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -82,7 +82,12 @@ public:
// Constructors
//- Construct from components
diffusion(const word& modelType, const fvMesh& mesh);
diffusion
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName
);
//- Destructor
@ -97,7 +102,7 @@ public:
virtual void correct();
// I-O
// IO
//- Update properties
virtual bool read();

View File

@ -35,10 +35,17 @@ namespace combustionModels
template<class CombThermoType, class ThermoType>
infinitelyFastChemistry<CombThermoType, ThermoType>::infinitelyFastChemistry
(
const word& modelType, const fvMesh& mesh
const word& modelType,
const fvMesh& mesh,
const word& phaseName
)
:
singleStepCombustion<CombThermoType, ThermoType>(modelType, mesh),
singleStepCombustion<CombThermoType, ThermoType>
(
modelType,
mesh,
phaseName
),
C_(readScalar(this->coeffs().lookup("C")))
{}

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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -79,7 +79,12 @@ public:
// Constructors
//- Construct from components
infinitelyFastChemistry(const word& modelType, const fvMesh& mesh);
infinitelyFastChemistry
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName
);
//- Destructor
@ -94,7 +99,7 @@ public:
virtual void correct();
// I-O
// IO
//- Update properties
virtual bool read();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -33,10 +33,11 @@ template<class Type>
Foam::combustionModels::laminar<Type>::laminar
(
const word& modelType,
const fvMesh& mesh
const fvMesh& mesh,
const word& phaseName
)
:
Type(modelType, mesh),
Type(modelType, mesh, phaseName),
integrateReactionRate_
(
this->coeffs().lookupOrDefault("integrateReactionRate", true)
@ -128,7 +129,8 @@ Foam::combustionModels::laminar<Type>::R(volScalarField& Y) const
if (this->active())
{
const label specieI = this->thermo().composition().species()[Y.name()];
const label specieI =
this->thermo().composition().species()[Y.member()];
Su += this->chemistryPtr_->RR(specieI);
}
@ -147,7 +149,7 @@ Foam::combustionModels::laminar<Type>::dQ() const
(
IOobject
(
typeName + ":dQ",
IOobject::groupName(typeName + ":dQ", this->phaseName_),
this->mesh().time().timeName(),
this->mesh(),
IOobject::NO_READ,
@ -179,7 +181,7 @@ Foam::combustionModels::laminar<Type>::Sh() const
(
IOobject
(
typeName + ":Sh",
IOobject::groupName(typeName + ":Sh", this->phaseName_),
this->mesh().time().timeName(),
this->mesh(),
IOobject::NO_READ,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -84,7 +84,12 @@ public:
// Constructors
//- Construct from components
laminar(const word& modelType, const fvMesh& mesh);
laminar
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName
);
//- Destructor
@ -108,7 +113,7 @@ public:
virtual tmp<volScalarField> Sh() const;
// I-O
// IO
//- Update properties from given dictionary
virtual bool read();

View File

@ -32,10 +32,11 @@ template<class CombThermoType>
Foam::combustionModels::noCombustion<CombThermoType>::noCombustion
(
const word& modelType,
const fvMesh& mesh
const fvMesh& mesh,
const word& phaseName
)
:
CombThermoType(modelType, mesh)
CombThermoType(modelType, mesh, phaseName)
{}
@ -81,7 +82,7 @@ Foam::combustionModels::noCombustion<CombThermoType>::dQ() const
(
IOobject
(
"dQ",
IOobject::groupName("dQ", this->phaseName_),
this->mesh().time().timeName(),
this->mesh(),
IOobject::NO_READ,
@ -108,7 +109,7 @@ Foam::combustionModels::noCombustion<CombThermoType>::Sh() const
(
IOobject
(
"Sh",
IOobject::groupName("Sh", this->phaseName_),
this->mesh().time().timeName(),
this->mesh(),
IOobject::NO_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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -71,7 +71,8 @@ public:
noCombustion
(
const word& modelType,
const fvMesh& mesh
const fvMesh& mesh,
const word& phaseName
);
@ -95,7 +96,7 @@ public:
//- Return source for enthalpy equation [kg/m/s3]
virtual tmp<volScalarField> Sh() const;
// I-O
// IO
//- Update properties from given dictionary
virtual bool read();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,11 +30,12 @@ License
Foam::combustionModels::psiChemistryCombustion::psiChemistryCombustion
(
const word& modelType,
const fvMesh& mesh
const fvMesh& mesh,
const word& phaseName
)
:
psiCombustionModel(modelType, mesh),
chemistryPtr_(psiChemistryModel::New(mesh))
psiCombustionModel(modelType, mesh, phaseName),
chemistryPtr_(psiChemistryModel::New(mesh, phaseName))
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -76,7 +76,12 @@ public:
// Constructors
//- Construct from components and thermo
psiChemistryCombustion(const word& modelType, const fvMesh& mesh);
psiChemistryCombustion
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName
);
//- Destructor

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -41,10 +41,11 @@ namespace combustionModels
Foam::combustionModels::psiCombustionModel::psiCombustionModel
(
const word& modelType,
const fvMesh& mesh
const fvMesh& mesh,
const word& phaseName
)
:
combustionModel(modelType, mesh)
combustionModel(modelType, mesh, phaseName)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -81,21 +81,31 @@ public:
dictionary,
(
const word& modelType,
const fvMesh& mesh
const fvMesh& mesh,
const word& phaseName
),
(modelType, mesh)
(modelType, mesh, phaseName)
);
// Constructors
//- Construct from components and thermo
psiCombustionModel(const word& modelType, const fvMesh& mesh);
//- Construct from components
psiCombustionModel
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName
);
//- Selector
static autoPtr<psiCombustionModel> New(const fvMesh& mesh);
static autoPtr<psiCombustionModel> New
(
const fvMesh& mesh,
const word& phaseName=word::null
);
//- Destructor
@ -114,7 +124,7 @@ public:
virtual tmp<volScalarField> rho() const = 0;
// I-O
// IO
//- Update properties from given dictionary
virtual bool read();

View File

@ -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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,7 +30,8 @@ License
Foam::autoPtr<Foam::combustionModels::psiCombustionModel>
Foam::combustionModels::psiCombustionModel::New
(
const fvMesh& mesh
const fvMesh& mesh,
const word& phaseName
)
{
const word combModelName
@ -39,7 +40,7 @@ Foam::combustionModels::psiCombustionModel::New
(
IOobject
(
"combustionProperties",
IOobject::groupName("combustionProperties", phaseName),
mesh.time().constant(),
mesh,
IOobject::MUST_READ,
@ -70,7 +71,7 @@ Foam::combustionModels::psiCombustionModel::New
const word className = combModelName(0, tempOpen);
return autoPtr<psiCombustionModel>(cstrIter()(className, mesh));
return autoPtr<psiCombustionModel>(cstrIter()(className, mesh, phaseName));
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,11 +30,12 @@ License
Foam::combustionModels::psiThermoCombustion::psiThermoCombustion
(
const word& modelType,
const fvMesh& mesh
const fvMesh& mesh,
const word& phaseName
)
:
psiCombustionModel(modelType, mesh),
thermoPtr_(psiReactionThermo::New(mesh))
psiCombustionModel(modelType, mesh, phaseName),
thermoPtr_(psiReactionThermo::New(mesh, phaseName))
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -75,8 +75,13 @@ public:
// Constructors
//- Construct from components and thermo
psiThermoCombustion(const word& modelType, const fvMesh& mesh);
//- Construct from components
psiThermoCombustion
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName
);
//- Destructor

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,11 +30,12 @@ License
Foam::combustionModels::rhoChemistryCombustion::rhoChemistryCombustion
(
const word& modelType,
const fvMesh& mesh
const fvMesh& mesh,
const word& phaseName
)
:
rhoCombustionModel(modelType, mesh),
chemistryPtr_(rhoChemistryModel::New(mesh))
rhoCombustionModel(modelType, mesh, phaseName),
chemistryPtr_(rhoChemistryModel::New(mesh, phaseName))
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -76,7 +76,12 @@ public:
// Constructors
//- Construct from components and thermo
rhoChemistryCombustion(const word& modelType, const fvMesh& mesh);
rhoChemistryCombustion
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName
);
//- Destructor

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -38,14 +38,14 @@ namespace combustionModels
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::combustionModels::rhoCombustionModel::rhoCombustionModel
(
const word& modelType,
const fvMesh& mesh
const fvMesh& mesh,
const word& phaseName
)
:
combustionModel(modelType, mesh)
combustionModel(modelType, mesh, phaseName)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -81,22 +81,32 @@ public:
dictionary,
(
const word& modelType,
const fvMesh& mesh
const fvMesh& mesh,
const word& phaseName
),
(modelType, mesh)
(modelType, mesh, phaseName)
);
// Constructors
//- Construct from components and thermo
rhoCombustionModel(const word& modelType, const fvMesh& mesh);
//- Construct from components
rhoCombustionModel
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName
);
//- Selector
static autoPtr<rhoCombustionModel> New(const fvMesh& mesh);
static autoPtr<rhoCombustionModel> New
(
const fvMesh& mesh,
const word& phaseName=word::null
);
//- Destructor
@ -121,7 +131,7 @@ public:
virtual tmp<volScalarField> rho() const = 0;
// I-O
// IO
//- Update properties from given dictionary
virtual bool read();

View File

@ -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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,7 +30,8 @@ License
Foam::autoPtr<Foam::combustionModels::rhoCombustionModel>
Foam::combustionModels::rhoCombustionModel::New
(
const fvMesh& mesh
const fvMesh& mesh,
const word& phaseName
)
{
const word combTypeName
@ -39,7 +40,7 @@ Foam::combustionModels::rhoCombustionModel::New
(
IOobject
(
"combustionProperties",
IOobject::groupName("combustionProperties", phaseName),
mesh.time().constant(),
mesh,
IOobject::MUST_READ,
@ -70,7 +71,7 @@ Foam::combustionModels::rhoCombustionModel::New
const word className = combTypeName(0, tempOpen);
return autoPtr<rhoCombustionModel> (cstrIter()(className, mesh));
return autoPtr<rhoCombustionModel> (cstrIter()(className, mesh, phaseName));
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,11 +30,12 @@ License
Foam::combustionModels::rhoThermoCombustion::rhoThermoCombustion
(
const word& modelType,
const fvMesh& mesh
const fvMesh& mesh,
const word& phaseName
)
:
rhoCombustionModel(modelType, mesh),
thermoPtr_(rhoReactionThermo::New(mesh))
rhoCombustionModel(modelType, mesh, phaseName),
thermoPtr_(rhoReactionThermo::New(mesh, phaseName))
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -75,8 +75,13 @@ public:
// Constructors
//- Construct from components and thermo
rhoThermoCombustion(const word& modelType, const fvMesh& mesh);
//- Construct from components
rhoThermoCombustion
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName
);
//- Destructor

View File

@ -37,16 +37,17 @@ template<class CombThermoType, class ThermoType>
singleStepCombustion<CombThermoType, ThermoType>::singleStepCombustion
(
const word& modelType,
const fvMesh& mesh
const fvMesh& mesh,
const word& phaseName
)
:
CombThermoType(modelType, mesh),
CombThermoType(modelType, mesh, phaseName),
singleMixturePtr_(NULL),
wFuel_
(
IOobject
(
"wFuel",
IOobject::groupName("wFuel", phaseName),
this->mesh().time().timeName(),
this->mesh(),
IOobject::NO_READ,
@ -73,7 +74,8 @@ singleStepCombustion<CombThermoType, ThermoType>::singleStepCombustion
"singleStepCombustion"
"("
"const word&, "
"const fvMesh&"
"const fvMesh& "
"const word&"
")"
)
<< "Inconsistent thermo package for " << this->type() << " model:\n"
@ -108,7 +110,8 @@ tmp<fvScalarMatrix> singleStepCombustion<CombThermoType, ThermoType>::R
volScalarField& Y
) const
{
const label specieI = this->thermoPtr_->composition().species()[Y.name()];
const label specieI =
this->thermoPtr_->composition().species()[Y.member()];
volScalarField wSpecie
(
@ -152,7 +155,7 @@ singleStepCombustion<CombThermoType, ThermoType>::dQ() const
(
IOobject
(
"dQ",
IOobject::groupName("dQ", this->phaseName_),
this->mesh_.time().timeName(),
this->mesh_,
IOobject::NO_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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -81,7 +81,12 @@ public:
// Constructors
//- Construct from components
singleStepCombustion(const word& modelType, const fvMesh& mesh);
singleStepCombustion
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName
);
//- Destructor
@ -102,7 +107,7 @@ public:
virtual tmp<volScalarField> Sh() const;
// I-O
// IO
//- Update properties from given dictionary
virtual bool read();

View File

@ -24,6 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "perfectFluid.H"
#include "specie.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //