Files
OpenFOAM-6/src/combustionModels/FSD/FSD.H
Will Bainbridge 0ea0b7c407 combustionModels: Changed the construction order
The combustion and chemistry models no longer select and own the
thermodynamic model; they hold a reference instead. The construction of
the combustion and chemistry models has been changed to require a
reference to the thermodyanmics, rather than the mesh and a phase name.

At the solver-level the thermo, turbulence and combustion models are now
selected in sequence. The cyclic dependency between the three models has
been resolved, and the raw-pointer based post-construction step for the
combustion model has been removed.

The old solver-level construction sequence (typically in createFields.H)
was as follows:

    autoPtr<combustionModels::psiCombustionModel> combustion
    (
        combustionModels::psiCombustionModel::New(mesh)
    );

    psiReactionThermo& thermo = combustion->thermo();

    // Create rho, U, phi, etc...

    autoPtr<compressible::turbulenceModel> turbulence
    (
        compressible::turbulenceModel::New(rho, U, phi, thermo)
    );

    combustion->setTurbulence(*turbulence);

The new sequence is:

    autoPtr<psiReactionThermo> thermo(psiReactionThermo::New(mesh));

    // Create rho, U, phi, etc...

    autoPtr<compressible::turbulenceModel> turbulence
    (
        compressible::turbulenceModel::New(rho, U, phi, *thermo)
    );

    autoPtr<combustionModels::psiCombustionModel> combustion
    (
        combustionModels::psiCombustionModel::New(*thermo, *turbulence)
    );
2017-11-24 22:52:18 +00:00

178 lines
5.0 KiB
C++

/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 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::FSD
Description
Flame Surface Dennsity (FDS) combustion model.
The fuel source term is given by mgft*pc*omegaFuelBar.
where:
mgft: filtered flame area.
pc: probability of the combustion progress.
omegaFuelBar: filtered consumption speed per unit of flame area.
pc is considered from the IFC solution.
omegaFuelBar is calculated solving a relaxation equation which tends to
omegaEq. This omegaEq is obtained from the flamelet solution for
different strain rates and fit using a expential distribution.
The spacial distribution of the consumption speed (omega) is obtained also
from a strained flamelet solution and it is assumed to have a guassian
distribution.
If the grid resolution is not enough to resolve the flame, the consumption
speed distribution is linearly thickened conserving the overall heat
release.
If the turbulent fluctuation of the mixture fraction at the sub-grid level
is large (>1e-04) then a beta pdf is used for filtering.
At the moment the flame area combustion model is only fit to work in a LES
frame work. In RAS the subgrid fluctuation has to be solved by an extra
transport equation.
SourceFiles
FSD.C
\*---------------------------------------------------------------------------*/
#ifndef FSD_H
#define FSD_H
#include "singleStepCombustion.H"
#include "reactionRateFlameArea.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace combustionModels
{
/*---------------------------------------------------------------------------*\
Class FSD Declaration
\*---------------------------------------------------------------------------*/
template<class CombThermoType, class ThermoType>
class FSD
:
public singleStepCombustion <CombThermoType, ThermoType>
{
// Private data
//- Auto pointer to consumption speed per unit of flame area model
autoPtr<reactionRateFlameArea> reactionRateFlameArea_;
//- Mixture fraction
volScalarField ft_;
//- Fuel mass concentration on the fuel stream
dimensionedScalar YFuelFuelStream_;
//- Oxygen mass concentration on the oxydizer stream
dimensionedScalar YO2OxiStream_;
//- Similarity constant for the sub-grid ft fluctuations
scalar Cv_;
//- Model constant
scalar C_;
//- Lower flammability limit
scalar ftMin_;
//- Upper flammability limit
scalar ftMax_;
//- Dimension of the ft space. Used to integrate the beta-pdf
scalar ftDim_;
//- Minimum mixture freaction variance to calculate pdf
scalar ftVarMin_;
// Private Member Functions
//- Calculate the normalised fuel source term
void calculateSourceNorm();
//- Disallow copy construct
FSD(const FSD&);
//- Disallow default bitwise assignment
void operator=(const FSD&);
public:
//- Runtime type information
TypeName("FSD");
// Constructors
//- Construct from components
FSD
(
const word& modelType,
typename CombThermoType::reactionThermo& thermo,
const compressibleTurbulenceModel& turb,
const word& combustionProperties
);
//- Destructor
virtual ~FSD();
// Member Functions
//- Correct combustion rate
virtual void correct();
//- Update properties
virtual bool read();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace combustionModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "FSD.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //