/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
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 .
Class
Foam::SingleKineticRateDevolatilisation
Group
grpLagrangianIntermediateDevolatilisationSubModels
Description
Single kinetic rate devolatisation model.
- acts on a per-specie basis
- Rate given by Arrhenius eqn
kappa = A1.exp(- E/R.T)
Where:
kappa = rate constant
A1 = activation energy (user input)
E = pre-exponential factor (user input)
R = universal gas constant
T = temperature
Usage:
SingleKineticRateDevolatilisationCoeffs
{
volatileData
(
(CH4 12 0.5) // (name A1 E)
(CO2 12 0.5) // (name A1 E)
);
volatileResidualCoeff 1e-6;
}
\*---------------------------------------------------------------------------*/
#ifndef SingleKineticRateDevolatilisation_H
#define SingleKineticRateDevolatilisation_H
#include "DevolatilisationModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class SingleKineticRateDevolatilisation Declaration
\*---------------------------------------------------------------------------*/
template
class SingleKineticRateDevolatilisation
:
public DevolatilisationModel
{
//- Helper class to store specie-local volatile data
class volatileData
{
// Private Data
//- Specie name
word name_;
//- Activation energy
scalar A1_;
//- Pre-exponential factor
scalar E_;
public:
// Constructors
//- Default construct
volatileData()
:
name_(),
A1_(0),
E_(0)
{}
//- Construct from Istream
explicit volatileData(Istream& is)
:
name_(is),
A1_(readScalar(is)),
E_(readScalar(is))
{}
// Member Functions
// Access
//- Return const access to the name
const word& name() const
{
return name_;
}
//- Return const access to the activation energy
scalar A1() const
{
return A1_;
}
//- Return const access to the pre-exponential factor
scalar E() const
{
return E_;
}
// IOstream Operators
//- Read from Istream
friend Istream& operator>>(Istream& is, volatileData& vd)
{
is.readBegin("volatileData");
is >> vd.name_ >> vd.A1_ >> vd.E_;
is.readEnd("volatileData");
return is;
}
//- Write to Ostream
friend Ostream& operator<<(Ostream& os, const volatileData& vd)
{
os << token::BEGIN_LIST
<< vd.name_ << token::SPACE
<< vd.A1_ << token::SPACE
<< vd.E_
<< token::END_LIST;
return os;
}
};
// Private Data
// Model Constants
//- List of volatile data - (name A1 E)
List volatileData_;
//- List of initial volatile mass fractions
List YVolatile0_;
//- Mapping between local and cloud gaseous species
List