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
{}
This commit is contained in:
parent
c0a950c5c6
commit
f5d5031561
34 changed files with 520 additions and 145 deletions
|
|
@ -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;
|
||||
|
||||
//- Return const access to the mesh database
|
||||
inline const fvMesh& mesh() const;
|
||||
//- Set turbulence
|
||||
inline void setTurbulence(compressibleTurbulenceModel& turbModel);
|
||||
|
||||
//- Set turbulence
|
||||
inline void setTurbulence(compressibleTurbulenceModel& turbModel);
|
||||
//- Return access to turbulence
|
||||
inline const compressibleTurbulenceModel& turbulence() const;
|
||||
|
||||
//- Return access to turbulence
|
||||
inline const compressibleTurbulenceModel& turbulence() const;
|
||||
//- Return const access to rho
|
||||
inline const volScalarField& rho() const;
|
||||
|
||||
//- Return const access to rho
|
||||
inline const volScalarField& rho() const;
|
||||
//- Return const access to phi
|
||||
inline tmp<surfaceScalarField> phi() const;
|
||||
|
||||
//- Return const access to phi
|
||||
inline tmp<surfaceScalarField> phi() const;
|
||||
//- Is combustion active?
|
||||
inline const Switch& active() const;
|
||||
|
||||
//- Is combustion active?
|
||||
inline const Switch& active() const;
|
||||
|
||||
//- Return const dictionary of the model
|
||||
inline const dictionary& coeffs() 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
|
||||
|
|
|
|||
|
|
@ -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,6 +31,7 @@ Foam::autoPtr<Foam::combustionModels::psiCombustionModel>
|
|||
Foam::combustionModels::psiCombustionModel::New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
)
|
||||
{
|
||||
|
|
@ -40,7 +41,7 @@ Foam::combustionModels::psiCombustionModel::New
|
|||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("combustionProperties", phaseName),
|
||||
IOobject::groupName(combustionProperties, phaseName),
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
|
|
@ -65,11 +66,12 @@ Foam::combustionModels::psiCombustionModel::New
|
|||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
const label tempOpen = combModelName.find('<');
|
||||
const word className = combModelName(0, combModelName.find('<'));
|
||||
|
||||
const word className = combModelName(0, tempOpen);
|
||||
|
||||
return autoPtr<psiCombustionModel>(cstrIter()(className, mesh, phaseName));
|
||||
return autoPtr<psiCombustionModel>
|
||||
(
|
||||
cstrIter()(className, mesh, combustionProperties, phaseName)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ Foam::combustionModels::psiThermoCombustion::psiThermoCombustion
|
|||
const word& phaseName
|
||||
)
|
||||
:
|
||||
psiCombustionModel(modelType, mesh, phaseName),
|
||||
psiCombustionModel(modelType, mesh, combustionPropertiesName, phaseName),
|
||||
thermoPtr_(psiReactionThermo::New(mesh, phaseName))
|
||||
{}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,10 +31,11 @@ Foam::combustionModels::rhoChemistryCombustion::rhoChemistryCombustion
|
|||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
rhoCombustionModel(modelType, mesh, phaseName),
|
||||
rhoCombustionModel(modelType, mesh, combustionProperties, phaseName),
|
||||
chemistryPtr_(rhoChemistryModel::New(mesh, phaseName))
|
||||
{}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,6 +73,8 @@ protected:
|
|||
|
||||
public:
|
||||
|
||||
typedef rhoCombustionModel 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::rhoCombustionModel::rhoCombustionModel
|
|||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
combustionModel(modelType, mesh, phaseName)
|
||||
combustionModel(modelType, mesh, combustionProperties, phaseName)
|
||||
{}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -82,9 +82,10 @@ public:
|
|||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
),
|
||||
(modelType, mesh, phaseName)
|
||||
(modelType, mesh, combustionProperties, phaseName)
|
||||
);
|
||||
|
||||
|
||||
|
|
@ -96,6 +97,7 @@ public:
|
|||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
);
|
||||
|
||||
|
|
@ -105,6 +107,7 @@ public:
|
|||
static autoPtr<rhoCombustionModel> New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties=combustionPropertiesName,
|
||||
const word& phaseName=word::null
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -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,6 +31,7 @@ Foam::autoPtr<Foam::combustionModels::rhoCombustionModel>
|
|||
Foam::combustionModels::rhoCombustionModel::New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
)
|
||||
{
|
||||
|
|
@ -40,7 +41,7 @@ Foam::combustionModels::rhoCombustionModel::New
|
|||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("combustionProperties", phaseName),
|
||||
IOobject::groupName(combustionProperties, phaseName),
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
|
|
@ -69,7 +70,10 @@ Foam::combustionModels::rhoCombustionModel::New
|
|||
|
||||
const word className = combTypeName(0, tempOpen);
|
||||
|
||||
return autoPtr<rhoCombustionModel> (cstrIter()(className, mesh, phaseName));
|
||||
return autoPtr<rhoCombustionModel>
|
||||
(
|
||||
cstrIter()(className, mesh, combustionProperties, phaseName)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ Foam::combustionModels::rhoThermoCombustion::rhoThermoCombustion
|
|||
const word& phaseName
|
||||
)
|
||||
:
|
||||
rhoCombustionModel(modelType, mesh, phaseName),
|
||||
rhoCombustionModel(modelType, mesh, combustionPropertiesName, phaseName),
|
||||
thermoPtr_(rhoReactionThermo::New(mesh, phaseName))
|
||||
{}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ singleStepCombustion<CombThermoType, ThermoType>::singleStepCombustion
|
|||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ public:
|
|||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
);
|
||||
|
||||
|
|
@ -95,22 +96,17 @@ public:
|
|||
|
||||
// Member Functions
|
||||
|
||||
// Evolution
|
||||
//- 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;
|
||||
//- Sensible enthalpy source term
|
||||
virtual tmp<volScalarField> Sh() const;
|
||||
|
||||
//- Sensible enthalpy source term
|
||||
virtual tmp<volScalarField> Sh() const;
|
||||
|
||||
|
||||
// IO
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read();
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
181
src/combustionModels/zoneCombustion/zoneCombustion.C
Normal file
181
src/combustionModels/zoneCombustion/zoneCombustion.C
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
/*---------------------------------------------------------------------------* \
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "zoneCombustion.H"
|
||||
|
||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::fvScalarMatrix>
|
||||
Foam::combustionModels::zoneCombustion<Type>::filter
|
||||
(
|
||||
const tmp<fvScalarMatrix>& tR
|
||||
) const
|
||||
{
|
||||
fvScalarMatrix& R = tR.ref();
|
||||
scalarField& Su = R.source();
|
||||
scalarField filteredField(Su.size(), 0);
|
||||
|
||||
forAll(zoneNames_, zonei)
|
||||
{
|
||||
const labelList& cells = this->mesh().cellZones()[zoneNames_[zonei]];
|
||||
|
||||
forAll(cells, i)
|
||||
{
|
||||
filteredField[cells[i]] = Su[cells[i]];
|
||||
}
|
||||
}
|
||||
|
||||
Su = filteredField;
|
||||
|
||||
if (R.hasDiag())
|
||||
{
|
||||
scalarField& Sp = R.diag();
|
||||
|
||||
forAll(zoneNames_, zonei)
|
||||
{
|
||||
const labelList& cells =
|
||||
this->mesh().cellZones()[zoneNames_[zonei]];
|
||||
|
||||
forAll(cells, i)
|
||||
{
|
||||
filteredField[cells[i]] = Sp[cells[i]];
|
||||
}
|
||||
}
|
||||
|
||||
Sp = filteredField;
|
||||
}
|
||||
|
||||
return tR;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::zoneCombustion<Type>::filter
|
||||
(
|
||||
const tmp<volScalarField>& tS
|
||||
) const
|
||||
{
|
||||
scalarField& S = tS.ref();
|
||||
scalarField filteredField(S.size(), 0);
|
||||
|
||||
forAll(zoneNames_, zonei)
|
||||
{
|
||||
const labelList& cells = this->mesh().cellZones()[zoneNames_[zonei]];
|
||||
|
||||
forAll(cells, i)
|
||||
{
|
||||
filteredField[cells[i]] = S[cells[i]];
|
||||
}
|
||||
}
|
||||
|
||||
S = filteredField;
|
||||
|
||||
return tS;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::combustionModels::zoneCombustion<Type>::zoneCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
Type(modelType, mesh, combustionProperties, phaseName),
|
||||
combustionModelPtr_
|
||||
(
|
||||
Type::CombustionModel::New
|
||||
(
|
||||
mesh,
|
||||
"zoneCombustionProperties",
|
||||
phaseName
|
||||
)
|
||||
),
|
||||
zoneNames_(this->coeffs().lookup("zones"))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::combustionModels::zoneCombustion<Type>::~zoneCombustion()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::combustionModels::zoneCombustion<Type>::correct()
|
||||
{
|
||||
combustionModelPtr_->correct();
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::fvScalarMatrix>
|
||||
Foam::combustionModels::zoneCombustion<Type>::R(volScalarField& Y) const
|
||||
{
|
||||
return filter(combustionModelPtr_->R(Y));
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::zoneCombustion<Type>::dQ() const
|
||||
{
|
||||
return filter(combustionModelPtr_->dQ());
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::zoneCombustion<Type>::Sh() const
|
||||
{
|
||||
return filter(combustionModelPtr_->Sh());
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
bool Foam::combustionModels::zoneCombustion<Type>::read()
|
||||
{
|
||||
if (Type::read())
|
||||
{
|
||||
combustionModelPtr_->read();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
137
src/combustionModels/zoneCombustion/zoneCombustion.H
Normal file
137
src/combustionModels/zoneCombustion/zoneCombustion.H
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::combustionModels::zoneCombustion
|
||||
|
||||
Description
|
||||
Zone-filtered combustion model.
|
||||
|
||||
Enable the reactions within the specified list of cell-zones and set
|
||||
to zero elsewhere.
|
||||
|
||||
SourceFiles
|
||||
zoneCombustion.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef zoneCombustion_H
|
||||
#define zoneCombustion_H
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class zoneCombustion Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
class zoneCombustion
|
||||
:
|
||||
public Type
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- The combustion model to be zone-filtered
|
||||
autoPtr<typename Type::CombustionModel> combustionModelPtr_;
|
||||
|
||||
//- List of zone names in which the reactions are active
|
||||
wordList zoneNames_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Filter the reaction-rate matrix on the cellZones
|
||||
tmp<fvScalarMatrix> filter(const tmp<fvScalarMatrix>& tR) const;
|
||||
|
||||
//- Filter the given field on the cellZones
|
||||
tmp<volScalarField> filter(const tmp<volScalarField>& tS) const;
|
||||
|
||||
//- Disallow copy construct
|
||||
zoneCombustion(const zoneCombustion&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const zoneCombustion&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("zoneCombustion");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
zoneCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~zoneCombustion();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Correct combustion rate
|
||||
virtual void correct();
|
||||
|
||||
//- 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;
|
||||
|
||||
//- Return source for enthalpy equation [kg/m/s3]
|
||||
virtual tmp<volScalarField> Sh() const;
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "zoneCombustion.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
38
src/combustionModels/zoneCombustion/zoneCombustions.C
Normal file
38
src/combustionModels/zoneCombustion/zoneCombustions.C
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "makeCombustionTypes.H"
|
||||
|
||||
#include "psiChemistryCombustion.H"
|
||||
#include "rhoChemistryCombustion.H"
|
||||
#include "zoneCombustion.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeCombustionTypes(zoneCombustion, psiChemistryCombustion, psiCombustionModel);
|
||||
makeCombustionTypes(zoneCombustion, rhoChemistryCombustion, rhoCombustionModel);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -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-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -87,4 +87,3 @@ bool Foam::IOMRFZoneList::read()
|
|||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue