Commit 8462be6a authored by Henry Weller's avatar Henry Weller
Browse files

zoneCombustion: New cellZone based combustion model

in which the reactions are enabled only in the specified list of
cellZones.  e.g. in constant/combustionProperties

combustionModel zoneCombustion<psiChemistryCombustion>;

active  true;

zoneCombustionCoeffs
{
    zones (catalyst);
}

and in constant/zoneCombustionProperties

combustionModel laminar<psiChemistryCombustion>;

active  true;

laminarCoeffs
{}
parent 043bf18d
......@@ -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-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -79,9 +79,6 @@ protected:
// Protected Member Functions
//- Return a reference to the look-up map
const Map<label>& lookupMap() const;
//- Construct the look-up map
void calcLookupMap() const;
......@@ -164,6 +161,9 @@ public:
return index_;
}
//- Return a reference to the look-up map
const Map<label>& lookupMap() const;
//- Clear addressing
virtual void clearAddressing();
......
......@@ -41,6 +41,7 @@ FSD<CombThermoType, ThermoType>::FSD
(
const word& modelType,
const fvMesh& mesh,
const word& combustionProperties,
const word& phaseName
)
:
......@@ -48,6 +49,7 @@ FSD<CombThermoType, ThermoType>::FSD
(
modelType,
mesh,
combustionProperties,
phaseName
),
reactionRateFlameArea_
......
......@@ -136,21 +136,24 @@ public:
// Constructors
//- Construct from components
FSD(const word& modelType, const fvMesh& mesh, const word& phaseName);
FSD
(
const word& modelType,
const fvMesh& mesh,
const word& combustionProperties,
const word& phaseName
);
// Destructor
virtual ~FSD();
//- Destructor
virtual ~FSD();
// Evolution
// Member Functions
//- Correct combustion rate
virtual void correct();
// IO
//- Update properties
virtual bool read();
};
......
......@@ -24,6 +24,8 @@ FSD/reactionRateFlameAreaModels/relaxation/relaxation.C
FSD/FSDs.C
zoneCombustion/zoneCombustions.C
noCombustion/noCombustions.C
LIB = $(FOAM_LIBBIN)/libcombustionModels
......@@ -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
......@@ -33,10 +33,11 @@ Foam::combustionModels::PaSR<Type>::PaSR
(
const word& modelType,
const fvMesh& mesh,
const word& combustionProperties,
const word& phaseName
)
:
laminar<Type>(modelType, mesh, phaseName),
laminar<Type>(modelType, mesh, combustionProperties, phaseName),
Cmix_(readScalar(this->coeffs().lookup("Cmix"))),
turbulentReaction_(this->coeffs().lookup("turbulentReaction")),
kappa_
......
......@@ -86,7 +86,13 @@ public:
// Constructors
//- Construct from components
PaSR(const word& modelType, const fvMesh& mesh, const word& phaseName);
PaSR
(
const word& modelType,
const fvMesh& mesh,
const word& combustionProperties,
const word& phaseName
);
//- Destructor
......@@ -95,25 +101,20 @@ public:
// Member Functions
// Evolution
//- Correct combustion rate
virtual void correct();
//- Correct combustion rate
virtual void correct();
//- Fuel consumption rate matrix.
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
//- Fuel consumption rate matrix.
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
//- Heat release rate calculated from fuel consumption rate matrix
virtual tmp<volScalarField> dQ() const;
//- Heat release rate calculated from fuel consumption rate matrix
virtual tmp<volScalarField> dQ() const;
//- Return source for enthalpy equation [kg/m/s3]
virtual tmp<volScalarField> Sh() const;
//- Return source for enthalpy equation [kg/m/s3]
virtual tmp<volScalarField> Sh() const;
// IO
//- Update properties from given dictionary
virtual bool read();
//- Update properties from given dictionary
virtual bool read();
};
......
......@@ -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
......@@ -32,12 +32,19 @@ namespace Foam
defineTypeNameAndDebug(combustionModel, 0);
}
const Foam::word Foam::combustionModel::combustionPropertiesName
(
"combustionProperties"
);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::combustionModel::combustionModel
(
const word& modelType,
const fvMesh& mesh,
const word& combustionProperties,
const word& phaseName
)
:
......@@ -45,7 +52,7 @@ Foam::combustionModel::combustionModel
(
IOobject
(
IOobject::groupName("combustionProperties", phaseName),
IOobject::groupName(combustionProperties, phaseName),
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
......
......@@ -88,6 +88,9 @@ public:
//- Runtime type information
TypeName("combustionModel");
//- Default combustionProperties dictionary name
static const word combustionPropertiesName;
// Constructors
......@@ -96,6 +99,7 @@ public:
(
const word& modelType,
const fvMesh& mesh,
const word& combustionProperties=combustionPropertiesName,
const word& phaseName=word::null
);
......@@ -106,31 +110,26 @@ public:
// Member Functions
// Access
//- Return const access to the mesh database
inline const fvMesh& mesh() const;
//- Set turbulence
inline void setTurbulence(compressibleTurbulenceModel& turbModel);
//- Return const access to the mesh database
inline const fvMesh& mesh() const;
//- 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 access to turbulence
inline const compressibleTurbulenceModel& turbulence() const;
//- Return const access to phi
inline tmp<surfaceScalarField> phi() const;
//- Return const access to rho
inline const volScalarField& rho() const;
//- Is combustion active?
inline const Switch& active() const;
//- Return const access to phi
inline tmp<surfaceScalarField> phi() const;
//- Return const dictionary of the model
inline const dictionary& coeffs() const;
//- Is combustion active?
inline const Switch& active() const;
// Evolution
//- Return const dictionary of the model
inline const dictionary& coeffs() const;
//- Correct combustion rate
virtual void correct() = 0;
......@@ -144,9 +143,6 @@ public:
//- Return source for enthalpy equation [kg/m/s3]
virtual tmp<volScalarField> Sh() const;
// IO
//- Update properties from given dictionary
virtual bool read();
};
......
......@@ -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
......@@ -38,6 +38,7 @@ diffusion<CombThermoType, ThermoType>::diffusion
(
const word& modelType,
const fvMesh& mesh,
const word& combustionProperties,
const word& phaseName
)
:
......@@ -45,6 +46,7 @@ diffusion<CombThermoType, ThermoType>::diffusion
(
modelType,
mesh,
combustionProperties,
phaseName
),
C_(readScalar(this->coeffs().lookup("C"))),
......
......@@ -86,6 +86,7 @@ public:
(
const word& modelType,
const fvMesh& mesh,
const word& combustionProperties,
const word& phaseName
);
......@@ -96,16 +97,11 @@ public:
// Member Functions
// Evolution
//- Correct combustion rate
virtual void correct();
//- Correct combustion rate
virtual void correct();
// IO
//- Update properties
virtual bool read();
//- Update properties
virtual bool read();
};
......
......@@ -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
......@@ -37,6 +37,7 @@ infinitelyFastChemistry<CombThermoType, ThermoType>::infinitelyFastChemistry
(
const word& modelType,
const fvMesh& mesh,
const word& combustionProperties,
const word& phaseName
)
:
......@@ -44,6 +45,7 @@ infinitelyFastChemistry<CombThermoType, ThermoType>::infinitelyFastChemistry
(
modelType,
mesh,
combustionProperties,
phaseName
),
C_(readScalar(this->coeffs().lookup("C")))
......
......@@ -83,6 +83,7 @@ public:
(
const word& modelType,
const fvMesh& mesh,
const word& combustionProperties,
const word& phaseName
);
......@@ -93,16 +94,11 @@ public:
// Member Functions
// Evolution
//- Correct combustion rate
virtual void correct();
//- Correct combustion rate
virtual void correct();
// IO
//- Update properties
virtual bool read();
//- Update properties
virtual bool read();
};
......
......@@ -34,10 +34,11 @@ Foam::combustionModels::laminar<Type>::laminar
(
const word& modelType,
const fvMesh& mesh,
const word& combustionProperties,
const word& phaseName
)
:
Type(modelType, mesh, phaseName),
Type(modelType, mesh, combustionProperties, phaseName),
integrateReactionRate_
(
this->coeffs().lookupOrDefault("integrateReactionRate", true)
......
......@@ -88,6 +88,7 @@ public:
(
const word& modelType,
const fvMesh& mesh,
const word& combustionProperties,
const word& phaseName
);
......@@ -98,25 +99,20 @@ public:
// Member Functions
// Evolution
//- Correct combustion rate
virtual void correct();
//- Correct combustion rate
virtual void correct();
//- Fuel consumption rate matrix.
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
//- Fuel consumption rate matrix.
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
//- Heat release rate calculated from fuel consumption rate matrix
virtual tmp<volScalarField> dQ() const;
//- Heat release rate calculated from fuel consumption rate matrix
virtual tmp<volScalarField> dQ() const;
//- Return source for enthalpy equation [kg/m/s3]
virtual tmp<volScalarField> Sh() const;
//- Return source for enthalpy equation [kg/m/s3]
virtual tmp<volScalarField> Sh() const;
// IO
//- Update properties from given dictionary
virtual bool read();
//- Update properties from given dictionary
virtual bool read();
};
......
......@@ -33,6 +33,7 @@ Foam::combustionModels::noCombustion<CombThermoType>::noCombustion
(
const word& modelType,
const fvMesh& mesh,
const word& combustionProperties,
const word& phaseName
)
:
......
......@@ -72,6 +72,7 @@ public:
(
const word& modelType,
const fvMesh& mesh,
const word& combustionProperties,
const word& phaseName
);
......@@ -82,24 +83,20 @@ public:
// Member Functions
// Evolution
//- Correct combustion rate
virtual void correct();
//- Correct combustion rate
virtual void correct();
//- Fuel consumption rate matrix
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
//- Fuel consumption rate matrix
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
//- Heat release rate calculated from fuel consumption rate matrix
virtual tmp<volScalarField> dQ() const;
//- Heat release rate calculated from fuel consumption rate matrix
virtual tmp<volScalarField> dQ() const;
//- Return source for enthalpy equation [kg/m/s3]
virtual tmp<volScalarField> Sh() const;
//- Return source for enthalpy equation [kg/m/s3]
virtual tmp<volScalarField> Sh() const;
// IO
//- Update properties from given dictionary
virtual bool read();
//- Update properties from given dictionary
virtual bool read();
};
......
......@@ -31,10 +31,11 @@ Foam::combustionModels::psiChemistryCombustion::psiChemistryCombustion
(
const word& modelType,
const fvMesh& mesh,
const word& combustionProperties,
const word& phaseName
)
:
psiCombustionModel(modelType, mesh, phaseName),
psiCombustionModel(modelType, mesh, combustionProperties, phaseName),
chemistryPtr_(psiChemistryModel::New(mesh, phaseName))
{}
......
......@@ -73,6 +73,8 @@ protected:
public:
typedef psiCombustionModel CombustionModel;
// Constructors
//- Construct from components and thermo
......@@ -80,6 +82,7 @@ public:
(
const word& modelType,
const fvMesh& mesh,
const word& combustionProperties,
const word& phaseName
);
......
......@@ -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
......@@ -42,10 +42,11 @@ Foam::combustionModels::psiCombustionModel::psiCombustionModel
(
const word& modelType,
const fvMesh& mesh,
const word& combustionProperties,
const word& phaseName
)
:
combustionModel(modelType, mesh, phaseName)
combustionModel(modelType, mesh, combustionProperties, phaseName)
{}
......
......@@ -57,7 +57,6 @@ class psiCombustionModel
:
public combustionModel
{
// Private Member Functions
//- Construct as copy (not implemented)
......@@ -82,9 +81,10 @@ public:
(
const word& modelType,
const fvMesh& mesh,
const word& combustionProperties,
const word& phaseName
),
(modelType, mesh, phaseName)
(modelType, mesh, combustionProperties, phaseName)
);
......@@ -95,17 +95,18 @@ public:
(
const word& modelType,
const fvMesh& mesh,
const word& combustionProperties,
const word& phaseName
);
//- Selector
static autoPtr<psiCombustionModel> New
(
const fvMesh& mesh,
const word& phaseName=word::null
);
//- Selector
static autoPtr<psiCombustionModel> New
(
const fvMesh& mesh,
const word& combustionProperties=combustionPropertiesName,
const word& phaseName=word::null
);
//- Destructor
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment