Documente Academic
Documente Profesional
Documente Cultură
Abstract
We present biomassGasificationFoam solver and libraries, developed in an open-source C++ code OpenFOAM (Open
Field Operation and Manipulation), for the comprehensive simulation of the physical and thermochemical processes
of biomass gasification and pyrolysis.
The code biomassGasificationFoam integrates models of drying, pyrolysis, gasification, combustion, and complex
flow within a porous biomass. The most important newly implemented functionalities are transient flow in porous
media (with changing porosity), a flexible definition of biomass and its properties, heat and mass transfer between
gases and solids (with a submodel for heat transfer in wood biomass and radiation heating), homogeneous and heterogeneous reactions (the heat of reaction is defined directly or based on enthalpies of formations), and customisable
kinetic mechanisms of pyrolysis and gasification. The number of subprocesses and possible paths of chemical reactions involved in the thermal conversion of biomass make the flexibility of the developed code the key factor for
successful numerical modelling.
Keywords: openFoam, biomass, pyrolysis, gasification, combustion, porous media, fixed bed
PROGRAM SUMMARY
Manuscript Title: Biomass gasification solver based on OpenFOAM
Authors: Kamil Kwiatkowski, Pawel Jan Zuk, Konrad Bajer, Marek Dudynski
Program Title: biomassGasificationModel
Licensing provisions: GNU General Public Licence (Version 3 of GNU GPL)
Programming language: C++
Computer: Any x86, 64 bit
Operating system: Generic Linux (the instructions consider Ubuntu distribution, tested also on Centos)
Keywords: OpenFOAM, Biomass, Pyrolysis, Gasification, Combustion, Porous Media , Fixed bed
Classification: 12
R version 2.1.1
External routines/libraries: OpenFOAM,
Nature of problem: The developed software is a set of libraries and a solver for simulating the thermal conversion of biomass,
including drying, pyrolysis, gasification, and combustion of gas and solid phases. Essentially, the model includes the flow of the
reactive gas mixture and the complex transfer of mass and energy between the gas phase and porous solid phase. The code treats
the biomass as a porous medium with a complex, reactive structure that changes during the process. The model is transient and
enables three-dimensional simulations.
Solution method: The standard finite-volume method is used in the code. A set of governing equations is solved for the gas phase
and porous solid phase, including mass conservation of gaseous species and solid components, momentum conservation in the gas
phase, and equations of energy conservation in both phases.
Running time: From hours to days depending on the mesh size and complexity of the kinetics of the thermal processes.
Pasteura
March 2, 2014
1. Introduction
The term biomass gasification refers to all processes taking place in a gasifier fed with biomass. Biomass gasification in a fixed bed, apart from complex mass and energy transfer, involves thermal processes in gas and porous solid
phases [1]:
evaporation of water embedded in biomass;
pyrolysis - thermal decomposition that transforms biomass into gases, liquids, and charcoal;
gasification - a set of reactions for the partial oxidation of charcoal, during which H2 and CO are produced;
combustion of gases and char - when the amount of O2 is sucient, char produced in pyrolysis or flammable
pyrolytic gases may be burnt;
Biomass gasification is a comprehensive solution to the many problems of the contemporary energy sector [2].
The types of biomass available for gasification, such as organic wastes, biological residues, and biomass cultivated for
energy production, are virtually unlimited (e.g., [3, 4, 5]). The variety of feedstocks combined with the wide spectrum
of biomass gasification products-syngases, bio-oils, liquid hydrocarbons, and bio-coals makes this technology attractive for industrial applications [2]. However, the complex nature of gasification, the wide range of available feedstocks
together with an extensive process parameter space, and various types of reactors and possible reaction paths impede
the development of a rigorous treatment of the process from a numerical perspective.
We identified the following challenges in creating a numerical description of the process [6]:
biomass gasification involves several size and time scales, from the smallest scale of the porosity of a single
biomass particle to the largest scale of the entire industrial reactor; most numerical approaches are focused on
one scale.
simulations depend on the chemical composition of the biomass and its physical properties, which are time and
process dependent; parameters are typically simplified.
the kinetics of pyrolysis and gasification are a subject of the on-going research for wide range of materials and
process conditions.
numerical models for biomass gasification are dicult to validate.
existing numerical models and databases are not standardised, which impedes cross-checking and comparison.
To meet these challenges, it is important to create a comprehensive computational environment that allows the
newest development in gasification science to be implemented easily and enhances the ability to share models and
their results within the community. We develop a fixed-bed biomass gasification solver based on the well-established
open-source CFD software OpenFOAM [7, 8]. The package, based on a C++ class structure, makes it possible to
override the selected existing libraries and replace them with new implementations.
The process of biomass gasification and its subprocesses are well fitted in the fields that may be simulated with
OpenFOAM [7, 9]. The most advanced solver including thermal processes of solid is fireFoam [9]. It is focused on
modelling fire phenomena, and it is not suitable for modelling biomass gasification. Other solvers, eg. coalChemistryFoam, are designed to simulate gasification in fluidised bed. Until now, there has been no solver providing a
description of biomass gasification in a fixed bed. In this work, we present the new solver biomassGasificationFoam
and the complementary library biomassGasificationMedia developed to simulate a wide range of processes and applications related to the fixed bed biomass gasification. Unlike other numerical approaches (e.g. [10, 11]) the developed
solver is open-source.
In this code, we implemented and integrated the following: transient flow within and around porous medium, heat
and mass transfer between gases and solids around and within porous medium, a flexible definition of biomass and
its thermochemical properties, homogeneous and heterogeneous reactions with the heat of reaction defined directly or
derived from enthalpies of formations, and customisable kinetic mechanisms of pyrolysis and gasification.
2
In the present paper, we first introduce the concept of Dynamic Porosity Field for mesh-independent definition
of biomass-filled region. Next, we present a mathematical model of biomass gasification, discuss the stress source
terms related to thermal processes, and clarify all required material parameters. Transitioning from mathematics into
numerics, we first briefly introduce the general structure and features of OpenFOAM. Then, we present the developed
extensions of OpenFOAM, namely, the solver and related library. Finally, the results of simulations are presented and
compared with the thermogravimetric analysis (TGA) of wood pyrolysis.
2. Mathematical modelling
2.1. Dynamic Porosity Field
The solvers embedded in the standard OpenFOAM distributions for modelling pyrolysis (fireFoam [9]) and chemical reactions (reactingFoam) or gasification in fluidised bed (coalChemistryFoam) are not suitable for fixed bed
biomass gasification simulations. Currently available approaches do not consider the mutual influence of the reacting
flow and gasified solid and volumetric reactions within porous material.
In the first solver, fireFoam, the pyrolysing medium is attached to the main computational domain, where the
gas flow is calculated, and interacts with the gas phase only through the domain boundary conditions. Within this
approach, there is no natural representation of the porous material with the gas flowing through. In fireFoam, pyrolysis
is implemented as surface phenomena, not volumetric, which limits its use. The second solver, reactingFoam, allows
for volumetric reactions but only within the gas phase.
To allow for the volumetric implementation of thermal processes, we propose to introduce porous medium inside
the main computational domain as a volumetric porous field, as shown in Fig. 1. Flow modelling in the proposed
approach follows the so-called Fictitious Domain method of [12], which is a rather special version of the Immerse
Boundary Method [13]. However, in the current approach the equations inside and outside the porous medium are the
same and the boundary has no extra dynamics of its own. The boundary of the porous material is the surface where
the physical parameters present in those equations are discontinuous. In the momentum equation, for example, both
the dArcy term and the usual viscous term of a Newtonian fluid, as in the Navier-Stokes equation, are formally present
on both sides, but the associated coecients have a jump across the interface.
The porous medium representing biomass is defined by two fields: a scalar (porosity) and a tensor (viscous
resistance). Since the boundary of the porous material has no intrinsic dynamics, there is no need to track its precise
shape, as is the case, for example, with elastic boundaries or with surface tension where local curvature is critically
important. The numerical implementation is then much simplified as each grid cell can be assumed to lie entirely
inside or entirely outside the porous domain.
The fields defining porous medium (volumetric fields of non-zero porosity and viscous resistance) are accessible
and easily modifiable, if necessary, during the calculation.
It must be stressed that the typical approach available in CFD codes introduces porous medium as a separate
zones in the computational domain itself, not as a field inside this domain. Such porous field defined once in the
preprocessing stage cannot be easily modified without changing the entire domain.
The new set of libraries that we implemented introduces thermal, chemical, and radiation properties of such
defined porous field and determines their interactions with the gas phase flowing through and around these fields.
Essentially, the libraries handle biomass as a collection of additional scalar and tensor fields within the computational
domain, e.g., the mass fraction of cellulose, the thermal conductivity of the porous medium, and the absolute density.
The introduction of the Dynamic Porosity Field allows thermal processes to be considered as volumetric phenomena that may take place within the entire porous material depending on local conditions. Treating gasification as a
volumetric process makes it possible to simulate such eects as the front of reactions inside the biomass. It makes
it possible to carry out simulations of chemical and thermal processes inside a porous medium, involving mutual
interactions of the gas and solid. We believe that applications of this approach exceed currently simulated pyrolysis,
combustion, and gasification. It may be potentially applied in modelling any processes involving porous reacting
media, such as catalysis or filtration.
Table 1: Notation.
A
a
c
d
D
hs
hf
hr
Hr
k
K
N
R
R
T
Y
V
W
G
Greek symbols
Subscripts
a
c
i
k
s
p
wall
sur f
Superscripts
S
G
evap
pyro
gasi f
comb
rad
VV S
V
The porous medium loses mass via homogeneous and heterogeneous processes.
The governing equations for the gaseous phase are as follows: momentum conservation (Eq. 1), continuity (Eq.
2), species conservation (Eq. 3), and energy conservation (Eq. 5). The set of species typically involves water vapour,
CO, CO2 , O2 , N2 , and CH4 . YiG is the mass fraction of the individual species. The solid-phase equations involve
conservation of solid components (Eq. 4) and the energy conservation equation 6). YkS denotes the mass fraction of
particular solid components (i.e., cellulose, hemicellulose, lignin, char, ash), and Sk represents the density of these
solid ingredients.
All equations are solved in the whole computational domain, however where porosity field is equal zero the
parameters of the solid phase, such as density, heat capacity and thermal conductivity, are zero. This approach is
analogous to the Fictitious Domain Approach by [12].
G u
+ (G uu) + p (u) =
t
G
+ (G u) =
t
(
)
G YiG
+ (G uYiG ) G DYiG =
t
S S
(Y ) =
t k
G CiG T G
+ u (G CiG T G ) ((1 )kG T G ) =
t
S CkS T S
(kS T S ) =
t
(1 )Ku
)
( evap
pyro
gasi f
RGi
+ RGi
+ RGi
(1)
(2)
Gi + RGi
RSk
pyro
evap
+ RSk
+ RGi
gasi f
pyro
+ RSk
+ RGi
gasi f
(3)
comb
Gi h f Gi (T G T S ) + S G
(4)
rad
(5)
(T G T S ) + Hr + S S
rad
(6)
The equations 16 are presented such that all terms on the left-hand side (LHS) are standard for modelling gas
flow or heat transfer in a solid. On the right-hand side (RHS), we collected all source terms regarding the porous
structure of biomass, chemical reactions, and thermal conversions. The thermal processes are included via the source
5
terms denoted by reaction rates R with corresponding superscripts (G - gas and S - solid; evap - evaporation, pyro pyrolysis, gasif - gasification, comb - combustion) and subscripts (i - gaseous species, k - solid components). Hr is
the total heat source due to solid phase reactions. We briefly describe these additional source terms in Section 2.3.
2.3. Thermal processes
The thermal processes of moisture evaporation, biomass pyrolysis, char gasification, and combustion take place
in the solid phase (RHS of Eqs. 4 and 6). Mass and energy are transferred from the solid to gas phase (RHS of Eqs.
25) or vice versa.
The sequence of processes involved in the thermal conversion of biomass, using wood as an example, is presented
in Fig. 2. First, embedded moisture evaporates from the biomass (Fig. 2 (a)); then, volatiles are released from the solid
in the process of pyrolysis (Fig. 2 (b)). In both processes, the material must be heated up and products are formed
without any additional reactants. The porous carbon skeleton remaining from pyrolysis has higher void fractions than
the original biomass char. The char is gasified in the presence of a gasification agent-CO or water vapour (Fig. 2
(d))-or burnt in the presence of an oxidiser (Fig. 2 (d)). The only residual is a small amount of ash composed of
minerals. The general characteristic of all these processes are summarised in Table 2.
In the current implementation of the solver reaction (thermal process), the rate coecient is modelled using
Arrhenius formula [14, 15] as follows:
(
)
{
A exp TTa , T > T c
=
(7)
0, T T c
6
(a) evaporation,
(b) pyrolysis, the simplest scheme,
(c) char gasification with CO,
(d) char combustion.
Figure 2: Sequence of processes included in the thermal conversion of wood.
where A, T a , and T c are the pre-exponential factor, activation temperature, and cut-o temperature, respectively.
For the simplified schemes presented in Fig. 2, the mass source terms (mass changes per volume) due to thermal
processes are as follows:
evap
S
S Ymoisture
evap
pyro
RGgas
gasi f
S
G
S Ychar
YCO
pyro
2
(10)
comb
S
S Ychar
YOG2 comb
(11)
RGwater vapour
RSchar
RSchar
S
pyro
Ydry
wood
(8)
(9)
It must be stressed that the pyrolysis scheme presented in Fig. 2 (b) is the simplest possible. In general, energy
supplied to the material causes the large hydrocarbon molecules that form the material to crack into smaller molecules.
This mechanism may be formulated in dierent ways, typically including several intermediate states coupled together
(e.i. [16, 17, 18, 19, 20]. Two examples of more complex schemes are presented in Fig. 3. More details on the kinetics
of pyrolysis and gasification are available in the textbook by Basu [1] and several reviewed papers by di Blasi [17],
Pereira [2], and others. For simplicity, the determination of source terms for complex kinetics is presented separately
in Appendix A. From a modelling perspective, easy introduction of increasingly complex schemes is one of the most
important features of the developed code.
(b) pyrolysis, complex scheme with intermediate tar and temporary char included.
Figure 3: Examples of two more complex mechanisms of pyrolysis.
Characteristic
Gaseous substrates
Solid substrates
Gaseous products
Solid products
Intermediate steps
Reaction rate (gases)
Reaction rate (solid)
Type
Details
1
2
3
Evaporation
homogeneous
endothermic
moisture2
H2 O
no
evap
RGH2 O
Arrhenius
[21, 15]
Pyrolysis
homogeneous
endothermic1
biomass
complex3
char
possible
pyro
RGi
pyro
RSk
Arrhenius
Appendix A.1
Gasification
heterogeneous
endothermic
CO2 , H2 O
char
CO, H2
ash
no
G gasi f
Ri
gasi f
RSk
Arrhenius
Appendix A.3
Gas combustion
homogeneous
exothermic
CO, H2 , CH4
CO2 , H2 O
possible
Gi
Arrhenius
[22, 23]
Solid combustion
heterogeneous
exothermic
O2
char
CO2
ash
no
G comb
RCO2
comb
RSk
Arrhenius
Appendix A.2
wood particle, the gases (both outside and inside the particle) are not in equilibrium with the solid [25] and separate
energy equations for the gas (Eq. 5) and solid (Eq. 6) are required.
The early analysis performed by [14] and repeated recently by [19] suggested that within the microscopic pores
of single wood particles, the gases and solid are in thermal equilibrium. Investigations into the miniaturisation of
heat exchangers independently led to the same conclusion: the assumption of thermal equilibrium is reasonable for
micrometre-sized pores. In such case, the temperatures of the gas (in the pores) and solid phases are always equal
and only one energy equation has to be solved within the computational domain. This assumption is common in the
numerical modelling of pyrolysis and gasification [17, 26]. However, the above-mentioned analysis did not consider
energy fluxes due to chemical reactions.
The validity of the assumption of thermal equilibrium within a single biomass particle is arguable, but there is
agreement that this assumption is not general. A typical situation in which the temperatures of the gases and solids
dier substantially is when entire fixed-bed reactor is modelled. For example, hot pyrolytic gases heat up the fresh,
relatively cold feedstock in an updraft fixed-bed gasifier. Similarly, the temperature of the gas and solid are typically
dierent in a large-scale heat exchanger. The flexibility of the developed solver requires that a more general nonequilibrium state be assumed.
The withdrawal of the assumption of thermal equilibrium requires that energy transfer between the gas and solid
is considered within the entire porous medium according to the source term.
(T G T S )
(12)
where: - heat transfer coecient (per surface), - total surface area of pores per solid state volume. The implementation of this term will be discussed in Section 5.2.3.
In the current approach, we assume that during thermal conversion, solid substrates take on the temperature of the
porous medium, whereas gaseous products take on the temperature of the surrounding gases inside porous material.
Thus, for the reactions taking place in the solid, the energy is required for heating (or cooling) products to the
temperature of the gas. The source term in Eq. 5 is defined as follows:
= (T G CGp (T G ) T S CGp (T S ))
RGi
(13)
i
This eect is independent from the previously mentioned eect of energy exchanging between the phases.
YkS 1
S
=
(14)
S
k
k
Based on the absolute density S and void fraction , the bulk density S used in the mathematical modelling is
determined as follows:
Sk = Sk
(15)
The thermal properties of the material are the thermal conductivities kS and heat capacities C Sp . These intrinsic parameters are also defined for individual solid components. During thermal conversion, the mass fractions of lignocellulose
material decrease, whereas the mass fraction of char increases. As a result, changes in the material parameters accompanying thermal conversion are intrinsically included into the model as discussed in Section 5.2.4.
The collection of gas and solid parameters is summarised in Table 3.
Table 3: Summary of thermochemical properties of gases (with an averaged value for the gas mixture) and solid components (with an averaged
value).
Average value
constant
Gas phase
Density
Heat capacity1
Thermal conductivity
Viscosity
Diusion coecient
Solid phase
Heat capacity
Thermal conductivity
G = i Gi
cG = i YiG cGi
kG = i YiG kG
i
G = i Gi
DG = i iD
S S
S
(c = kS Y) k c(k
Y
kS = k kkS kS / k
k
+
+
YkS
Sk
Temperature dependence
linear
power( )
n
(x(T ) = x0 + x1 T ) (x(T ) = x2 TT0 )
defined separately
+
+
defined separately
defined separately
+
+
3. Structure of OpenFOAM
The OpenFOAM (Open Field Operation and Manipulation) Toolbox [7, 8] is a free, open-source C++ package for
solving partial dierential equations with the finite-volume method.
This code is widely used in various fields of fluid mechanics and provides comprehensive, standardised libraries
and tools for solving partial dierential equations. Due to the flexibility and versatility of the code, it is applied to
model and simulate a broad range of problems, including transport and mixing [27], diusion [28], reacting flows
[29], porous media [30], shear stresses [31], combustion [32], heat transfer [33], viscoelastic flows [34], multiphase
flows [35, 36], boiling flows [37], free-surface flows [38], biological flows [39], and others [40].
9
Figure 4: Structure of the developed code: the solver and collection of libraries.
OpenFOAM as an object-oriented package is a structured collection of C++ libraries and solvers. The libraries
can be divided into two major categories:
numerics - provides a vast choice of schemes for equation discretisation, solving, and parallelisation;
physics - implements mathematical models of simulated physical and chemical phenomena.
The important inheritance of the C++ class structure is the ability to override and replace the existing libraries.
The separate part of the package are solvers, which are executable programs containing algorithms that integrate
selected functionalities of libraries and schedule the calculations in each time step. Each solver is prepared for a
separate class of problems, e.g., reactingFoam solves flows of chemically reacting fluid.
Splitting the package into libraries and the solvers provides additional flexibility by supporting runtime selection.
This design idea makes it possible to switch during the solver runtime between libraries (physical models) and change
the simulation parameters. No breaking of the calculation or recompilation is necessary.
All of the above considerations make OpenFOAM an exceptionally flexible and transparent programming environment for designing new solvers. In this paper, such a new solver biomassGasificationFoam and library biomassGasificationMedia for modelling biomass gasification are introduced. In Figure 4, we present the scheme of the developed
code: the solver and the library. The main new idea, which we implemented to extend OpenFOAM applications
for modelling and simulating gas-solid interactions, is the Dynamic Porosity Field approach, which is described in
Section 2.1. In the following sections, the biomassGasificationFoam solver and biomassGasificationMedia library are
described in detail.
4. Solver - biomassGasificationFoam
The biomassGasificationFoam solver is based on the algorithm used in the unsteady solver reactingFoam for
reacting laminar or turbulent flows with turbulence models available in the OpenFOAM standard distribution [32].
The reactingFoam solves only gas-phase equations (Eqs. 15). The RHS of Eqs. 1 and 2 are equal to zero, whereas
the RHS of Eqs. 3 and 5 are limited to gas-phase reaction source terms (Gi ).
In the following list, we summarise the novel modifications implemented in biomassGasificationFoam:
a reacting porous medium is introduced,
equations for the solid phase are introduced: conservation of solid components (Eq. 4) and energy conservation
(Eq. 6),
10
Figure 5: Scheme of the main loop of the biomassGasificationFoam solver based on the PIMPLE algorithm. New development in the solver is in
bold.
the continuity equation for the gas phase (Eq. 2) and the species transport (Eq. 3) contain source terms due to
the gas originating from the biomass gasification (see the RHS of these equations),
the gas energy conservation (Eq. 5) has additional source terms due to heat exchange between the gas and solid
phases.
radiation absorption by biomass surface is possible.
A schematic illustration of the main loop of the biomassGasificationFoam solver is provided in Fig. 5. The
PIMPLE (PISO-SIMPLE) algorithm is used in biomassGasificationFoam, as in reactingFoam. The main loop contains
two inner corrections for solving the pressure-momentum coupling influenced by energy and species distributions.
The mass conservation equation is solved and the source terms calculated once per each main loop term.
5. Library - biomassGasificationMedia
The model of the thermal conversion of biomass, as presented in Fig. 4, is constructed from three main elements:
11
the definition of a porous medium and its mechanical properties - porousReactingMedia library, with the setPorosity utility;
definitions of thermal, chemical, and radiation properties of solids - thermophysicalModels libraries;
class linking the above libraries to the biomass gasification model - pyrolysisModels.
Each part of the biomassGasificationMedia library is described in the following chapters.
5.1. porousReactingMedia and setPorosity
The porosity model based on Darcys law is implemented in the porousReactingMedia library. The porous medium
is introduced by two volumetric fields in the main computational domain: volScalarField porosityF - denoting the
one minus void fraction (1 ) and volTensorField D f - representing the viscous resistance tensor K (see Eq. 1).
The initial shape and mechanical properties of the porous medium are set using the setPorosity utility, which
creates a field of porosity (porosityF) and a tensor field of porous resistance (D f ) of the desired shape and properties
independent of the lattice. These fields are created using coordinate constraints on the centres of each computational
cell in the already meshed domain. We found that the most beneficial and time-ecient way to design ones own
porous medium is to modify the medium.H file of setPorosity and to recompile it using the standard OpenFOAM
compilation mechanism. The computational cells are recognised as solid-state cells based on the field, and the Darcy
tensor defined in cells with = 0 is of no importance.
Porous media described in this way can be easily modified during program execution, which is particularly beneficial if one wants to simulate porous medium dynamics in the model. The porousReactingMedia library with the
setPorosity utility can be used as the standalone model of the complex-shaped porous medium inside the computational domain. Currently, the library includes the Darcy Law for a porous medium only but can be extended to other
nonlinear formulas (e.g., Forchheimer).
5.2. thermophysicalModels
5.2.1. ODEHeterogeneousSolidChemistryModel - reaction rates and stoichiometry
The ODEHeterogeneousSolidChemistryModel derived from the ODESolidChemistryModel library is the implementation of the customisable kinetics of chemical reactions. The implemented kinetics is suitable for both homogeneous reactions (only gas or only solid substrates are involved) and heterogeneous reactions (both gas- and solid-phase
substrates are involved, gaseous substrates included gases inside porous material and outside gases close to the solid
surface). The reactions taking place in the gas phase only and the way of defining these reactions are inherited from
the standard OpenFOAM solver reactingFoam. To introduce reactions (thermal processes) with the solid state, we
must declare a new entry in the reaction subdictionary of the chemistryProperties dictionary.
As a first example, we take the complex reaction of hemicellulose pyrolysis introduced as follows:
irreversibleSolidArrheniusHeterogeneousReaction
hem = 1.57 CH4 + 8.75 H2 + 5.73 CO + 9.72 CO2 + 0.4 char
(1.495e9 1.488e4 400 1 1)
The first line determines the choice of the reaction rate model. The second line describes a reaction involving the
pyrolytic conversion of 1 kg of hemicellulose into 0.4 kg of char. The remaining hemicellulose volatiles are left as
pyrolytic gases, namely, CH4 , H2 , CO, and CO2 , with the stoichiometry obtained experimentally [5]. Thus, there is
only one substrate, and the reaction is automatically recognised as homogeneous. The third line contains numerical
parameters of the reaction in the following order: the pre-exponential factor A, temperature of activation T a , critical
temperature T c below which the reaction stops, reaction order nr , and, optionally, heat of reaction hr . The heat of
reaction is defined per unit mass of volatiles (i.e., per unit mass of solid-phase mass loss). The last term (heat of
reaction) is used only when the reaction energetic eect is introduced directly from experiment and not determined
from the enthalpies of formation of the substrates and products (see Section 5.2.2).
The second example, the heterogeneous reaction of char gasification with CO2 as a gasification agent, is introduced
into the chemistryProperties dictionary as follows:
12
irreversibleSolidArrheniusHeterogeneousReaction
char + CO2 = 2CO + 0.1 ash
(1.7e7 324 800 2 1)
This reaction is automatically interpreted as a heterogeneous reaction in which 1 kg of char reacts with gaseous CO2 ,
producing 0.1 kg of ash and two moles of CO per mole of CO2 consumed as a substrate. The net mass release to
the gas phase is equal to the solid-phase mass loss, which makes it possible to calculate source terms for all gaseous
species involved in the reaction.
In the current version of the library, there are two possible models of the reaction rate :
[
]
irreversibleSolidArrheniusHeterogeneousReaction - Arrhenius reaction: = A exp TTa
T > Tc;
[
]
irreversibleSolidEvaporationHeterogeneousReaction - water evaporation: = A|T T c |2/3 exp TTa
T > Tc.
The reaction rate r for the reaction r involving the solid-state substrate s is calculated as follows:
{ S S n G G
(Y s ) r (Y ) r , T > T c
r =
0, T T c
(16)
where G equals one when there is a gaseous substrate and zero otherwise.
Typically, the irreversibleSolidArrheniusHeterogeneousReaction is used for biomass pyrolysis, char gasification,
and char combustion. For the evaporation of water contained within biomass, both kinetics (irreversibleSolidEvaporationHeterogeneousReaction and irreversibleSolidArrheniusHeterogeneousReaction) may be used. Other possible
forms of reaction rates, such as a more realistic model of the evaporation of water embedded within porous structures,
can be implemented.
5.2.2. ODEHeterogeneousSolidChemistryModel - heat of reaction
There are two dierent ways of introducing the heats of reaction for the processes involving the solid phase. These
two approaches are implemented in ODEHeterogeneousSolidChemistryModel:
formationEnthalpy - the heat of reaction is determined based on the enthalpy of formation of substrates and
products;
heatOfReaction - the heat of reaction is provided independently by the user for each reaction.
In both cases, the net energetic eect of solid reactions is calculated dierently.
The first approach, already implemented in reactingFoam, is typical for gas-phase reactions. In this approach, the
heat of reaction is determined based on the formation enthalpies of substrates and products. For each substrate s and
each product p, the enthalpies of formation h f s and h f p must be defined. Thus, for the reaction
char + CO2 2CO + 0.1ash
(17)
(18)
Finally, the calculated mass changes for every substrate m s and every product m p are multiplied by their enthalpy of formation and summed to obtain the final energetic eect:
Hr =
m s h f s +
m p h f p
(19)
s
13
Unfortunately, the enthalpies of formation of solid components, such as lignin, are dicult to determine. In this
case, the heats of individual reactions must be introduced directly based on experimental results. Considering the
reaction 17, with defined hr reaction energy and reaction rate r , we can calculate the total energetic eect in time
step t as
Hr = t
hr r
(20)
r
5.2.3. heatTransferModel
In modelling the thermal conversion processes, we use an energy equation based on temperature rather than
enthalpy. We do not assume that the gas and solid are constantly in thermal equilibrium, and thus, the temperatures of
the gas phase T G and solid phase T S are permanently distinguished.
We assume that the heat transfer between both phases is proportional to the dierence between the solid- and
gas-phase temperatures.
(T G T S )
(21)
where denotes the heat transfer coecient and denotes a surface area of pores per solid state volume.
However, heat transfer inside the bulk of the sample is qualitatively dierent from heat transfer through the border of the solid phase. To dierentiate between those two situations, we introduce a new parameter borderHTC in
addition to HTC. HTC denotes for computational cells inside the solid-phase bulk, and borderHTC defines for
computational cells on the border of biomass fragment.
To determine the surface area of pores , we propose two approaches:
constHTC - assumes a constant total area of pore surface per volume unit, = const,
cylinderHTC - porosity is modelled as a collection of parallel pipes.
The cylinderHTC model assumes that the porous medium with initial void fraction 0 has a regular lattice of
parallel pipes with an initial radius a0 . Based on this assumption, one can determine the number of parallel cylinders
N per unit volume.
0 V
N = 2 1/3 .
(22)
a0 V
We assume that N is constant; thus, the pores are enlarged due only to the increasing cylinder radius a. From the
evolution of the void fraction accompanying the solid-state depletion, we can deduce the evolution of the surface per
volume in the porous medium.
( )1/2
N2aV 1/3
2 0
=
=
(23)
V
a0
It must be stressed that there is a significant dierence between the heat capacity of the solid and gas phases, which
may lead to instability of the numerical solution due to energy transfer between phases. To avoid these fluctuations,
we introduce a control parameter limiting time step (maxdT) in the controlDict dictionary. This parameter controls
the maximum ratio of change in the gas- and solid-phase temperatures over all cells.
5.2.4. thermoType
The thermoType library determines three main thermodynamic properties of the solid components: density, heat
capacity, and thermal conductivity.
Currently, as presented in Section 2.5, there are three models prepared for the runtime selection that can be selected
in the solidThermophysicalProperties dictionary:
solidMixtureThermo<constHeterogeneous> - constant density, constant heat capacity, and a constant heat transport coecient;
solidMixtureThermo<expoHeterogeneous> - constant density, exponential heat capacity, and an exponential
heat transport coecient (see Section 2.5);
solidMixtureThermo<linearHeterogenic> - constant density, constant heat capacity, and a linear heat transport
coecient;
14
5.2.5. heterogeneousRadiationModel
At the current stage, the influence of radiation on the solid is modelled in a simplified manner. We assumed that
radiation is only absorbed by the biomass surface, not emitted. This assumption is reasonable in a wide class of
applications, particularly for biomass particles in a heated environment, such as in a TGA experiment.
Three heterogeneousRadiationModels are implemented and can be chosen in the radiationProperties dictionary:
none;
heterogeneousMeanTemp;
heterogeneousP1.
In the first set, no radiation is considered in the simulation. In the second set, we assume that the optical thickness
of the gases inside the reactor is small and that the gases do not interfere with the radiation. In this case, the energy
is transferred directly from the heated walls to the surface of the biomass particle. To determine the surface of the
2
porous medium, we assume that on average, every cell is cubic; thus, its surface is given by V 3 , where V is the cell
volume. An additional assumption is that on average approximately one sixth of its surface is exposed to the outside.
This assumption gives the amount of surface exposed to radiation per computational cell on the border of the biomass
given the volume of the biomass:
1 2
S = V3.
(24)
6
Then, the net energetic income per unit volume is calculated according to Eq. 25:
1 V 2/3
4
S
4
(T wall
(T sur
(25)
f ace ) ))
6 V
where T wall is the average temperature of the walls, T sur f is the temperature of the particle surface, is the Boltzmann
constant, is the solid-state surface optical absorption coecient, and is the absorption-to-emission ratio. The
last two parameters that describe the optical properties of the biomass surface are assumed to be constant in this
implementation.
In the third approach, the radiation within the computational domain is determined with the P1 radiation model
available in OpenFOAM, as there is no biomass inside. Then, the biomass surface absorbs part of the available
radiation energy. In the current implementation, the emission from biomass is not included, which means that the
solid mass has no influence on the radiation density. The calculated radiation density in the gas phase is absorbed on
the boundaries of the solid state. The net energetic income per unit volume is calculated as
S rad = max(0,
S rad = max(0,
1 V 2/3
(G (T S )4 ))
6 V
(26)
Table 4: Source terms calculated for the solid and gas phases in the volPyrolysis model.
Source
Heat transfer
Reaction mass sources
Reaction heat sources
Radiative heat source
Porosity
Solid phase
Eq. 6
Eq. 4
Eq. 6
Eq. 6
Eqs. 4-6
Gas phase
Eq. 5
Eq. 2 and Eq.3
Eq. 5
Eqs. 1-5
Inert species
Temperature
Velocity
Pressure
Initial
condition
nitrogen
300 K
0 m s1
101300 Pa
Boundary condition
inlet
walls
nitrogen
300 K + 10 t K min1 300 K + 10 t K min1
0.3 m s1
0 m s1
101300 Pa
-
outlet
zero gradient
zero gradient
zero gradient
The solver was validated with the case of pyrolysis of a pre-processed isotropic wood sample (Rubinia preudoaccacia) with the initial mass of 24 mg [6]. The test calculations were performed with simplified geometry for the TGA
reactor and sample, both of which are modelled as cubes (see Fig. 6). The edge of the reactor is 8 mm. The entire
computational domain was composed of 20 x 20 x 20 cells. The porous medium was distributed over 8 x 8 x 8 cells.
The complete calculations corresponding to the TGA experiment took approximately 12 h with eight processors.
In this paper, we use the mechanism of wood biomass pyrolysis, where cellulose, hemicellulose, and lignin decompose into a set of gases: H2 , CO, CO2 , and CH4 [6]. The heat of pyrolysis was determined from enthalpies of
formation of substrates and products.
The set of material properties and parameters of kinetics are presented in Table 6. The experimentally determined
material properties of wood are typically eective, combining the eects of gas and solid phases. Such properties
depend strongly on the origin of the wood, the structure of the porosity, and the selected experimental procedures. In
the solver presented here, we have introduced separate equations for the solid state that requires parameters for a pure
solid. A good example of such a material property is thermal conductivity. Measured eective values vary from 0.1
to 1 W m1 K1 , but the thermal conductivity of a solid skeleton is an order of magnitude higher, approximately 10
W m1 K1 .
The comparison of mass loss during evaporation and pyrolysis in the TGA experiment and the corresponding
simulation is presented in Fig. 7. The results are in qualitative agreement, but discrepancies are visible. The main
reasons for these discrepancies are the imperfect and oversimplified kinetics of pyrolysis and the variability of wood
composition, that cannot be exactly determined.
The subsequent peaks of the inverse of the mass loss rate presented in Fig. 8 correspond to the processes of
evaporation and pyrolysis of hemicellulose, cellulose, and lignin, respectively. All processes stop at approximately
800 K, when only char remains. In reality, as we see in Fig. 7, a small amount of char is still volatilising at higher
temperatures. This eect is not included in the chosen pyrolysis kinetics. The mass loss rates shown in Fig. 8 are
almost indistinguishable at dierent locations within the wood sample.
16
Figure 6: A simplified TGA reactor with cubic geometry and a hexagonal wood sample placed in the centre. In a diagonal plane cross-section of
the sample, five points are marked (centre (C), top (T), bottom (B), top-corner (TC), and bottom-corner (BC)) in order to probe results.
Figure 9 illustrates how the densities (mass) of solid components, embedded moisture, hemicellulose, cellulose,
and lignin are decreasing while the density (mass) of char is increasing. Reproducing this well-known sequence of decomposition is possible with separate kinetics constants for the individual solid components, which is straightforward
in the presented solver.
Figure 10 shows spatial distribution of the total density of the solid material during evaporation (at time 500 s
when wall temperature equals 383 K) and during pyrolysis (at time 2000 s when wall temperature is equal 633 K).
The density at the centre of the particle is highest. The gradients of density are small, which is expected for a small,
thermally thin particle.
Figure 11 illustrates the increase in the temperature of the gas phase at five selected points inside the wood: the
centre, the bottom, the top, the bottom-corner, and the top-corner. The dierences between points are small. This
result corroborates the expectation that temperature gradients should be negligible in such a small sample [45]. The
thermal thickness of this particle is confirmed by relatively uniform field of solid temperature presented in Fig. 12.
The included thermal processes are endothermic and, as can be seen in Fig. 11, the rate of the gas temperature increase
drops slightly when these processes occur. As expected, this decrease is most pronounced in the centre of the sample.
In Fig. 13 (a), we present the evolution of the dierence between the gas- and solid-phase temperatures, at each
point. Figure 13 (b) illustrates the spatial distribution of this dierence during pyrolysis at time 2000 s. As expected,
this dierence is negligible when no reaction takes place but increases when thermal processes are present. The
sequence of peaks visible in Fig. 13 (a) is due to the evaporation and pyrolysis of dierent solid components. The gas
phase is hotter than the solid.
Figure 14 presents the composition of the produced gases. Because the process takes place in a reactor filled with
nitrogen, the presented values are relative. The solver with the selected kinetics adequately reproduces the relative
mass fractions (the ratios of the mass fractions of the dierent gaseous components) and the peaks of the processes.
The velocity field around and inside the porous medium is presented in Fig. 15. As expected, the gas flows
17
Table 6: Physical properties and kinetic constants of the pyrolysis lignocellulose material used in the simulation.
Embedded
Wood components
Unit
moisture
Cel.
Hem.
Lig.
Char
Kinetic parameters of the pyrolysis of cellulose, hemicellulose, and lignin according to Fig. 3 (a)
Initial mass fraction
0.07
0.3588
0.276
0.2852
0
Pre-exponential factor
s1
1.4 1014
2.1 107
5.8 1013 1.06 103
Activation energy
J mol1
1.35 104
1.34 104 1.94 104 8.95 103
Minimum temperature
K
300
450
400
500
H2 O yield
kg kg1
1
0
0
0
H2 yield
kg kg1
0
0.02
0.02
0.05
CO yield
kg kg1
0
0.37
0.21
0.28
CH4 yield
kg kg1
0
0.04
0.04
0.08
CO2 yield
kg kg1
0
0.38
0.55
0.40
Char yield
kg kg1
0
0.19
0.19
0.19
Enthalpy of formation
J kg1
15.9 106 1.0 106 8.5 105 9.2 105 4.1 104
Material properties for solid components
Absolute density
kg m3
1000
1480
1957
Initial void fraction
0.55
0.91
Initial pore diameter
m
1 106
1 104
Permeability
m2
1 1014
1 1011
a
1 1
a
Thermal conductivity
Wm K
0.58
0.20
0.1a
1 1
Heat capacity
J kg K
4200
1380
1100
a
Ash
Reference
0.01
12.4 106
[6]
[41, 42]
2500
0.17
840
[43]
[3]
[44]
[19]
[43]
[43]
Eective. Thermal conductivity through porous matrix kS , which leads to the presented eective conductivity is 10 W m1 K1 .
symmetrically around the porous particle (see Fig. 15 (a)-(b)). Velocity magnitude inside the porous medium is, due
to porous resistance, more than an order of magnitude smaller than outside. As we show in Figure 15 (c) the velocity
vectors inside the particle are directed upwards and outwards. Upward components are due to the outer flow but
outward components are caused by the gases being produced inside the porous medium.
7. Practical Issues
7.1. Installation instructions
7.1.1. OpenFOAM main package installation guide
The easiest way to install the OpenFOAM main package is to use packs prepared for main Linux distributions available
on the OpenFOAM website [7]. Here, a brief example for Ubuntu 12.04 LTS is provided. It is sucient to copy, paste,
and execute the following commands in the terminal window: (superuser privileges are required)
VERS=$(lsb_release -cs)
Obtains the installed version of Ubuntu release name
sudo sh -c "echo deb http://www.openfoam.org/download/ubuntu
$VERS main > /etc/apt/sources.list.d/openfoam.list"
Adds the OpenFOAM pack address to repositories. The above command must be written on one line.
sudo apt-get update
Updates package list
sudo apt-get install openfoam211
sudo apt-get install paraviewopenfoam3120
18
Figure 7: Comparison of the mass loss during the TGA experiment and the corresponding simulation.
Installs OpenFOAM (211 refers to version 2.1.1) and Paraview [46] (3120 refers to version 3.12.0) for the visualisation
of results. Both OpenFOAM and Paraview are now installed in the /opt directory. From now on, no superuser
privileges will be required. To configure the OpenFOAM package, it is necessary to add OpenFOAM to the system
path by editing the .bashrc file in the users home directory.
gedit ~/.bashrc
and adding the following line to the bottom
source /opt/openfoam211/etc/bashrc
To check the installation type,
icoFoam -help
If usage information appears, the installation has completed correctly. Finally, create a user project directory in the
$HOME/OpenFOAM directory named <USER>-2.1.1 by typing
mkdir -p $WM_PROJECT_USER_DIR
Now, we can proceed to the installation of biomassGasificationFoam.
7.1.2. biomassGasificationFoam library
First, create a folder for the installation
mkdir -p $WM_PROJECT_USER_DIR/biomassGasificationMedia
Then, download the biomassGasificationFoam library and extract it into a temporary folder
tar -zxvf biomassGasificationFoam_installPack_1.0.tar.gz
Enter the extracted folder
cd biomassGasificationFoam_installPack_1.0
19
0.5
centre (C)
bottom (B)
top (T)
bottomcorner (BC)
topcorner (TC)
0.45
0.4
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0
300
400
500
600
700
Temperature [K]
800
900
1000
Figure 8: Simulation: rate of mass loss at the five locations within the sample. Except at the very early stage they are almost indistinguishable.
Install the library and solver in the default folder (/OpenFOAM/<USER>-2.1.1/biomassGasificationMedia/) by typing
source biomassGasificationMediaDirectiories
./install
To test the installation, open a new terminal window and again set the environmental paths by typing
source /opt/openfoam211/etc/bashrc
source biomassGasificationMediaDirectories
then run the solver by typing
biomassGasificationFoam
The message starting with the OpenFOAM header should appear. If so, the installation has been completed
successfully, even if the computation cannot start due to FOAM FATAL IO ERROR. To start the computations
proceed to the pre-set test (tutorial) cases.
7.2. Test cases
7.2.1. Validation test
The validation test case presented in Section 6 is included in the biomassGasificationMedia package with the
solver and adequate libraries. The case reproduces results of the TGA experiment presented in Section 6.
In Fig. 16, we summarised the structure of the directories and files included in the test case and required to start
the new solver. All necessary data and parameters are set initially:
the initial and boundary conditions are set up in folder ./0 according to Table 5, initial solid composition is set
according to the first row of Table 3.
the material parameters from Table 3 and mechanisms of thermal processes are defined in ./constant and
./chemkin.
the case control parameters and details of the numerics are set up in ./system.
The solver is started in the case folder by typing
biomassGasificationFoam
Running in parallel is possible with the standard OpenFOAM setup. An exemplary dictionary file for the decomposePar tool is available in ./system.
20
cellulose
moisture
cellulose
hemicellulose
lignin
char
ash
250
200
lignin
hemicellulose
150
char
100
moisture
50
ash
0
300
400
500
600
700
Temperature [K]
800
900
1000
Figure 10: Biomass particle: the comparison of biomass density at 500 s (evaporation) and 2000 s (pyrolysis).
9. Acknowledgements
Part of this work has been supported by the strategic program of scientific research and experimental development
of the National (Polish) Centre for Research and Development: Advanced Technologies for Energy Generation;
Task 4. Developing integrated technologies for fuel and energy production from biomass, agricultural wastes, and
other resources.
Numerical computations were performed in the Interdisciplinary Centre for Computational and Mathematical
Modelling (ICM), University of Warsaw, grant number G34-8.
We thank Marek Kochanczyk for helpful comments on C++.
We thank prof. Marzena Poka from The Main School of Fire Service in Warsaw for performing the thermogravimetry analysis.
Appendix A. Source term calculation
Appendix A.1. Pyrolysis
The process of pyrolysis is presented in the following convenient form of Eq. A.3. In this formula, the solid
component k (cellulose, hemicellulose, or lignin) produces a set of gaseous products pG (where the index p denotes
H2 , CO, CO2 , CH4 ). As a result of pyrolysis, the solid component is transformed into char [6].
cellulose
hemicellulose
lignin
p pG + char
(A.1)
p pG + char
(A.2)
p pG + char
(A.3)
The reaction rate coecient modelled by Arrhenius formulae leads to the following mass rate k,r for reaction (process) r for solid component k:
(
)
T
S
S nr
, T > Tc
(A.4)
k,r = Ar (Yk ) exp
T 0r
In general, several dierent paths of decomposition of the same solid component k are possible. The index r counts
these separate paths of reactions; in the present example, A.3 r = 1. Each reaction r of substrate k is appended to the
total reaction rate
pyro
RSk
=
k,r
(A.5)
r
22
800
750
700
BC
650
hemicellulose
pyrolysis
BC
600
550
C
cellulose pyrolysis
500
450
centre (C)
bottom (B)
top (T)
bottomcorner (BC)
topcorner (TC)
evaporation
400
BC
350
300
300
C
400
500
600
Temperature [K]
700
800
(a) Gas temperature as a function of time for selected points inside the biomass particle.
Figure 12: Temperature of the solid at time 2000 s when wall temperature is equal 633 K.
23
60
evaporation
centre
bottom
top
bottomcorner
topcorner
hemicellulose cellulose
pyrolysis
pyrolysis
BC
50
BC
TC
40
B
30
lignin pyrolysis
T
BC
T
20
C
10
0
300
400
500
600
700
Temperature [K]
800
900
1000
(a) Dierence between T and T s for selected points inside the biomass particle.
The reaction rates for products of reaction Eq. A.3 take the form
pyro
RSchar
=
r k,r
k
RGp
pyro
(A.6)
W pG
G (1 r ) k,r
i Wp
r
k
(A.7)
0.01
hemicellulose
pyrolysis
0.009
H O
2
H2
cellulose pyrolysis
0.008
0.007
0.006
evaporation
CO
CO2
CO2
CH
H2O
0.005
lignin pyrolysis
0.004
CO
0.003
0.002
CH4
0.001
0
300
400
500
600
700
Temperature [K]
800
900
1000
or homogeneous combustion. The combustion of the solid phase occurs only if O2 is present and the temperature is
suciently high.
In the present paper, we assume that only the carbon contained in char is available for combustion and gasification.
The reaction of char combustion is presented in Eq. A.8.
char + O2 CO2 + 0.1ash
(A.8)
With the reaction rate coecient modelled by Arrhenius, mass rates for reactants and products are presented in a set
of equations A.10.
(
)
T
S comb
S
S
nc G
Rchar
= Ac (Ychar ) YO2 exp
, T > Tc
(A.9)
T 0c
Sash S comb
comb
RSash
=
R
(A.10)
Schar char
RG
CO2
comb
comb
RGO2
=
=
G
WCO
2
G
WCO
WOG2
2
(1
WOG2
G
WOG2
WCO
2
Sash
Schar
(1
)RSchar
Sash
Schar
comb
)RSchar
comb
(A.11)
(A.12)
(A.13)
(A.14)
(A.15)
T
T 0r
)
(A.16)
Each reaction is appended to the total reaction rate for the species included in the following manner from mass
26
Figure 16: Structure of the dictionaries and files of the test case. Inside the black frame are files modified (dashed lines) or introduced (solid lines)
for biomassGasificationFoam.
conservation:
RSchar
gasi f
(A.17)
(1 r )r
(A.18)
RSash
gasi f
r
gasi f
RGp
RGa
gasi f
p W pG
(1 r )r
(A.19)
a WaG
(1 r )r
p W pG a WaG
(A.20)
p W pG a WaG
27
28
29