CN4118R Final Report U080118W OliverYeo-1r6dfjw

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 71

Department 

of Chemical and Biomolecular Engineering 
CN4118R Final Year Project 

AY 2010/2011 

Comparison of finite difference and finite volume 
methods  
& the 
Development of an educational tool 
for the 
Fixed­bed gas adsorption problem 
 
 
 

Final Report 
by
Yeo Pu Zhong Oliver (U080118W) 
 
CN4118R Final Report

Abstract 

  Finite  difference  (FDM)  and  finite  volume  methods  (FVM)  are  two  important 
categories  of  numerical  methods  used  to  solve  partial  differential  equations.  These 
methods are evaluated and compared with one another, with special emphasis put into 
the latter. The fixed‐bed gas adsorption problem is the main focus of the project as it is 
considered as an important technology in air pollution control. 

  This project investigates explicit schemes on fixed grids, which are by no means 
advance techniques. FVM was found to be more superior in accuracy and efficiency than 
FDM  in  most  cases,  especially  those  involving  sharp  discontinuities.  It  also  conserves 
mass  rigorously,  something  the  FDM  cannot  achieve.  Various  FVM  schemes  provide 
advantages  under  specific  conditions.  For  example,  the  Superbee  scheme  is  especially 
accurate and efficient with sharp discontinuities but fail with smooth solutions. 

  The  development  of  the  educational  tool  in  the  form  of  a  standalone  simulator 
using MATLAB is briefly mentioned.   
CN4118R Final Report 

 
 
 
 
Table of Contents 

1. Introduction........................................................................................................................................ 1 
PART I: LITERATURE REVIEW  
2. Gas Separation Technologies ...................................................................................................... 3
3. Adsorption in Gas Separation ..................................................................................................... 5
4. Numerical Methods for Solving Partial Differential Equations .................................... 9
5. Theory ................................................................................................................................................. 10 
PART II: METHODOLOGY  
6. Numerical Experiments ............................................................................................................... 33 
PART III: RESULTS & DISCUSSION  
7. Experiment 1 .................................................................................................................................... 37
8. Experiment 2 .................................................................................................................................... 44
9. Experiment 3 .................................................................................................................................... 49
10. Improvements ................................................................................................................................. 60 
PART IV: DEVELOPMENT OF GUI
11. GUI ........................................................................................................................................................ 61
12. Algorithm Specific to Non‐isothermal Equations............................................................. 62
PART V: CONCLUSION ................................................................................................................................. 63 

Notations and Abbreviations ................................................................................................................. 64
References ........................................................................................................................................................ 65 
   
CN4118R Final Report

List of Figures 
Figure 1 Types of adsorption isotherms .............................................................................................. 12
Figure 2 Type I isotherm at different temperatures ....................................................................... 12
Figure 3 Shell‐and‐tube depiction of vessel section ....................................................................... 14
Figure 4 Grid definition for FDM ............................................................................................................. 21
Figure 5 Grid definition for FVM ............................................................................................................. 24
Figure 6 Godunov’s scheme for first‐order approximation ......................................................... 25
Figure 7 Summary of first‐order schemes ........................................................................................... 26
Figure 8 FVM interpretation with linear function ........................................................................... 26
Figure 9 A summary of delimiter functions [35] .............................................................................. 29
Figure 10 FDM on plug flow model using different N .................................................................... 37
Figure 11 Dissipative effect of first‐order upwind scheme ......................................................... 38
Figure 12 Effects of grid size on first‐order upwind scheme ...................................................... 38
Figure 13 (a) Second‐order FVM schemes (b) High resolution FVM schemes ................... 40
Figure 14 Comparison of L‐errors between different schemes ................................................. 42
Figure 15 Comparison of L2‐errors between different schemes ............................................... 43
Figure 16 Comparison of max‐errors between different schemes ........................................... 43
Figure 17 Comparison of L‐errors between different schemes ................................................. 44
Figure 18 General trend observed in log‐log plots for experiment 2 ...................................... 46
Figure 19 Trend observed for Superbee scheme ............................................................................. 47
Figure 20 Improvement in FDM over FVM as Pe decreases ........................................................ 48
Figure 21 Log‐log plots of mass balance errors against grid size for experiment 2 ......... 48
Figure 22 General trend observed in log‐log plots for experiment 3 ...................................... 50
Figure 23 Log‐log plots of L‐ errors against grid size for experiment 3 ................................ 50
Figure 24 Log‐log plots of mass balance errors against grid size for experiment 3 ......... 51
Figure 25 Simulated solutions for extreme cases ............................................................................ 53
Figure 26 Comparison between snapshots of FDM and van Leer schemes ......................... 54
Figure 27 Computational time plots for k = 0.1 ................................................................................ 55
Figure 28 Computational time plots for k = 1 .................................................................................... 56
Figure 29 Computational time plots for k = 10 ................................................................................. 57
Figure 30 Computation time by equivalent error produced ....................................................... 59

List of Tables 
Table 1 Assumptions for the derivation of governing equations. ............................................. 13
Table 2 Components for gas and solid phase energy balance with respect to (4) ............ 19
Table 3 Components for column wall energy balance with respect to (4) ........................... 19
Table 4 List of coefficients associated with (27) and (28) ........................................................... 20
Table 5 Numerical differentiation for FDM ........................................................................................ 22
Table 6 Numerical differentiation for FVM ......................................................................................... 29
Table 7 Functions selected for profiling and their descriptions ................................................ 35
Table 8 Sample data for first‐order upwind scheme with N = 10 ............................................. 39
Table 9 Sample data for FDM scheme with N = 10 .......................................................................... 42
 
CN4118R Final Report 

1. Introduction 

  The simulation of a process has become part and parcel of a process engineer’s 
work ever since the arrival of modern processors capable of solving complex equations 
in a reasonable amount of time. The expertise in modeling a chemical process, however, 
began  far  earlier  before  that.  Both  endeavors  arose  from  a  need  to  predict  a  process 
outcome and improve on existing processes. 

  The  importance  of  modeling  and  simulation  became  apparent  in  the 
development  of  adsorption  technology.  Arguably,  the  underlying  phenomenon  in 
adsorption  has  been  understood  fairly  well;  simple  Langmuir  models  and  more 
complicated  non‐ideal,  multi‐component  models  have  been  developed  to  explain  a 
multitude  of  complex  systems.  However,  as  with  all  models,  simplifying  assumptions 
have to be made, which became untenable due to the dynamic nature of the adsorption 
process.  Unlike  other  major  separation  techniques,  adsorption  does  not  operate  in  a 
steady‐state manner. This prevented the development of a design method as predictive 
as  those  used  in  distillation  and  absorption,  impeding  large‐scale  adoption  of  the 
technology [1]. 

  Analytical  solutions  which  work  well  with  the  aforementioned  steady‐state 


technologies would not be adequate for adsorption. Numerical methods, or solving the 
equations by brute force, became increasingly popular and feasible with more powerful 
computers.  Simulators  developed  for  specific  systems  such  as  the  pressure  swing 
adsorption (PSA) require complex boundary conditions. It allows one to quickly predict 
outcomes from changes in process conditions (e.g. feed composition, temperature etc.) 
and make corresponding adjustments. The computer also reduces capital investment in 
the preliminary design of a novel operation cycle scheme. Therefore, a competent model 
put  into  an  accurate  simulator  can  allow  a  process  engineer  to  optimize  a  process  as 
complex as the PSA rapidly while inspiring industrial confidence at the same time. 

  This  project  encompassed  two  distinct  phases.  The  first phase  involved  solving 
the nonlinear partial differential equations (PDEs) using two methods: finite difference 
and  finite  volume  methods.  The  performances  of  both  codes  were  compared  against 
each  other  and  the  advantages  of  each  method  were  highlighted.  A  simple  fixed  bed 
adsorption  model  was  selected  for  this  phase:  isothermal,  isobaric,  single  component 
and axially dispersed plug flow model. The performance of each simulator was based on 


CN4118R Final Report

the  errors  produced  relative  to  analytical  solutions,  their  mass  balance  analysis  and 
computational time. The finite volume codes were then adapted for the next phase. 

  In  the  second  phase  of  the  project,  a  simulator  was  being  developed  as  an 
educational  tool.  A  slightly  more  complex  model  was  implemented,  giving  the  user 
options for adiabatic operation. This simulator, in the form of a standalone application, 
incorporates  a  graphic  user  interface  (GUI)  developed  using  MATLAB.  The  purpose  of 
this  application  is  to  aid  students  in  understanding  the  basic  principles  of  adsorption. 
One  of  its  features  helps  the  user  visualize  concentration  and  temperature  waves 
moving  through  the  adsorber.  Currently,  commercially  available  modeling  and 
simulation  software,  such  as  COMSOL,  can  provide  higher  capabilities  and  robustness, 
but  their  costs  do  not  justify  their  use  solely  as  an  educational  tool.  An  application 
created  using  MATLAB  allows  one  to  distribute  the  software  and  the  accompanying 
proprietary components royalty‐free. 

2
CN4118R Final Report 

PART I: LITERATURE REVIEW 

2. Gas Separation Technologies 

  Separation  processes  are  hugely  important  in  a  chemical  plant  and  can  be 
responsible for 40% to 70% of its capital and operating costs [2]. Apart from their chief 
function of improving productivities of unit operations, separation equipment is being 
deployed  as  end‐of‐pipe  solution  to  the  problem  of  air  pollution.  Public  power, 
combustion  plants  and  industrial  combustions  contribute  to  almost  70%  of  total  CO2, 
SO2 and NOx emissions in Europe, outstripping transportation (20.8%), the next largest 
source of emissions [3].  

  Flue  gas  treatment  as  an  end‐of‐pipe  solution  requires  the  removal  of  CO2,  SO2 
and  NOx  from  post‐combustion  exhaust  gas.  The  climate  change  conferences  at 
Copenhagen  and  Cancun  had  brought  about  growing  awareness  in  combating  climate 
change  and  alluded  to  the  possible  global  adoption  of  carbon  tax  and  other  economic 
tools to regulate emissions. With this in mind, research into gas separation may become 
vital, just as the air pollution control industry become more profitable. 

  Several gas separation technologies exist and are already indispensible in many 
chemical  processes.  The  sections  below  provide  a  brief  review  into  three  such 
technologies – cryogenic distillation, absorption and membrane technology. Adsorption, 
the focus of this paper, will be presented in the following chapter.  

2.1 Cryogenic Distillation 

  Based  on  the  most  common  and  widely  used  separation  technique,  cryogenic 
distillation operates at low temperatures (below ‐150C, typical boiling points of gases). 
It  differentiates  itself  from  other  technologies  by  having  no  need  of  a  physical 
separating  agent  between  different  phases,  thus  eliminating  the  regeneration  step.  It 
can produce high purity products but is energy intensive and incurs high maintenance 
costs.  Being  a  mature  technology,  the  potential  for  cost  cutting  is  limited.  Thorough 
understanding of chemical thermodynamics [4], improved design of process equipment 
and  more  complex  process  cycles  [5]  may  reduce  overall  power  consumption  and 
capital  cost.  Although  it  is  unsuitable  for  flue  gas  treatment  due  to  the  enormous 


CN4118R Final Report

amount of energy required to cool the hot flue gas, it remains the preferred technology 
in producing ultra high purity oxygen and nitrogen. 

2.2 Absorption 

  Gas separation using absorption is the phenomenon where mass transfer takes 
place  between  the  gas  phase  and  a  non‐volatile  liquid  phase.  This  equilibrium  staged 
process  offers  numerous  advantages.  The  design  of  its  unit  operation  is  simple  and 
provides  flexibility  in  continuous  operation.  Because  of  its  cost  effectiveness  and 
operability,  gas  absorption  via  chemical  reaction,  with  mono‐ethanolamine  (MEA) 
solution  as  the  solvent,  is  widely  employed  in  flue  gas  treatment.  However,  the  high 
capital  cost  of  fresh  solvent,  substantial  operating  costs  from  its  energy  intensive 
regeneration  steps,  as  well  as  the  large  throughput  of  solvent  involved,  compares  it 
unfavorably to what competing technologies promise to offer [6]. Several investigators 
are  directing  their  efforts  at  finding  more  energy  efficient  ways  of  regenerating  used 
solvents [7], process modifications [8, 9] and development of superior solvents [10, 11]. 

2.3 Membrane Technology 

  In  2000,  the  gas  separation  membrane  module  business  was  estimated  at 
US$125 million with an annual growth rate of 8% [12]. It is a relatively new technology 
with huge potential for growth. It is slated to be involved in wide‐ranging applications, 
from hydrogen and hydrocarbon recovery to acid gas treatment. 

  Its  advantages  include  simple  modular  design,  ease  of  operation,  long  lifetime 
and continuous operation at near‐ambient temperatures. The main difficulties faced in 
its  development  are  the  conflict  between  membrane  selectivity  and  permeability, 
reliability  issues  caused  by  hydrocarbon  condensation  as  well  as  high  capital  costs  in 
research  and  implementation.  Currently,  applications  in  large  scale  processes  are  still 
uncommon [12]. Most modules are incorporated with amine absorption or adsorbents 
to improve existing processes [13]. 

  Despite its versatility, preliminary studies suggest that it is a poor candidate for 
flue gas treatment which require high purity product [14]. This is due to limitations in 
producing high purity products in either permeate or non‐permeate with a single stage; 

4
CN4118R Final Report 

a  multi‐stage  design  would  render  the  operation  uneconomical  due  to  increased 
operating cost from extra compression steps. 

3. Adsorption in Gas Separation 

 – Principles, Applications and Future Development 

  Adsorption, together with chromatography and ion exchange, form a unique set 
of  separation  techniques  that  are  characterized  as  heterogeneous  (fluid‐solid), 
unsteady‐state  operations.  Although  the  underlying  phenomenon  was  first  recorded 
scientifically  in  the  late  19th  century,  adsorption  only  had  limited  applications  in  air 
purification  up  until  the  early  1960s  [15].  Developments  over  the  next  40  years  have 
established adsorption as the leading process in the removal of toxins from wastewater 
and gas, with global sales of adsorbents valued at US$1.15 billion in 1997 [2]. The future 
goal of this technology would be to develop capability for more types of separations and 
to  compete  economically  with  established  techniques  such  as  distillation  and 
absorption. 

3.1 Principles 

  Adsorption utilizes porous solids  as the mass separating agent, normally in the 
form  of  a  fixed  packed  bed;  species  are  preferentially  adsorbed  onto  the  solid  surface 
while  less  strongly  adsorbed  species  are  allowed  to  pass  through  the  column.  The 
species  which  are  adsorbed  are  called  adsorbates  while  the  porous  solids  are  called 
adsorbents. Mass transfer from the fluid phase to the solid phase is usually equilibrium 
controlled;  steric  and  kinetic  effects,  two  other  adsorption  mechanisms,  are  less 
dominant. 

  The  steric  effect  arises  due  to  the  uniformly  shaped  pores  found  in  zeolite 
molecular  sieves  which  only  allow  certain  shapes  of  molecules  to  diffuse  into,  and 
subsequently adsorbed by, the adsorbent. The kinetic effect relies on the differences in 
diffusion rates of different molecules. The equilibrium effect dictates that mass transfer 
is  driven  by  the  difference  between  the  fluid  concentration  and  solid  loading. 
Equilibrium  models  are  developed  to  describe  the  equilibrium  relationships.  The 
Langmuir  model  and  its  isotherms  (measurements  are  done  at  constant  temperature) 
are common and readily applicable to a wide range of adsorbate‐adsorbent systems. 


CN4118R Final Report

3.1.1 Adsorbents 

  The state of adsorption technology arguably depends on that of adsorbents. Gas 
separation  by  adsorption  has  been  advanced  by  the  invention  of  synthetic  zeolites  in 
1959  (by  Milton)  and  the  carbon  molecular  sieve  (CMS)  years  later.  These  new 
adsorbents could separate species by their molecular shapes whereas early adsorbents 
such as activated carbon were used primarily to purify waste gas and wastewater [16].  

  Activated carbon is highly porous, giving it a large surface area to volume ratio. 
Its  non‐polar,  or  slightly  polar,  surface  allows  it  to  adsorb  organic  compounds  much 
more strongly than water molecules. This property eliminates the need to dry the gas 
stream prior to the feed step. Regeneration of activated carbon requires lesser energy 
as compared to other adsorbents due to the lower heat of adsorption – the strength of 
which the adsorbate is bonded to the adsorbent. 

  CMS are manufactured from the same starting material as activated carbon, but 
additional treatment with hydrocarbon cracking gave it its unique properties. Its pore 
structure is tightly controlled and more uniform than that of activated carbon. Kinetic 
effect  excludes  larger  molecules,  while  surface  interactions  remain  similar  to  that  of 
activated carbon. CMS are significantly more expensive than activated carbon because 
of the extra manufacturing step and patent protection. 

  Zeolites  are  crystalline  aluminosilicates  whose  pores  have  exact  dimensions. 


Thus  zeolites  can  be  designed  for  separation  based  on  steric  effect.  However,  the 
equilibrium effect is more dominant in their current applications.   

  Silica gel is an amorphous solid made up of colloidal silica (SiO2). It is hydrophilic 
in nature and has a large surface area to volume ratio. Heat of adsorption of water on 
the gel is low, which helps during regeneration (lower regeneration temperature) and 
limits temperature changes during operation. It can be damaged by liquid water, a low 
risk during gas separation.  

  Activated  alumina,  or  dehydrated  alumina  hydrate,  has  excellent  water 


adsorption  properties  and  is  more  durable  than  silica  gel  in  the  presence  of  liquid 
water.  However,  prolonged  use  leads  to  coking  and  contamination,  reducing  its 
adsorption capacity. 

6
CN4118R Final Report 

3.1.2 Regeneration methods 

  Another  mover  of  adsorption  technology  is  the  ability  to  regenerate  the  spent 
adsorbent quickly and using as little energy (or desorbent) as possible. As adsorption is 
inherently  an  unsteady‐state  process,  techniques  are  being  developed  for  the  sole 
purpose of regeneration, allowing the process to operate continuously. Concepts such as 
thermal swing, pressure/vacuum swing and simulated moving bed (SMB) are useful in 
optimizing  energy  use  and  enhancing  product  purity.  As  SMB  is  currently  limited  to 
liquid  separations,  only  temperature  swing  adsorption  (TSA),  pressure  swing  and 
vacuum swing adsorption (PSA and VSA) would be discussed here. 

  TSA  is  the  oldest  and  most  developed  adsorption  technique  [15].  It  works 
because  the  adsorptive  capacity  of  adsorbents  decreases  as  temperature  increases, 
adsorbing  more  at  low  feed  temperatures  and  desorbs  readily  at  high  regeneration 
temperatures. However, the thermal cycles can cause excessive thermal decomposition 
at  very  high  temperatures  and  the  activated  carbon  bed  can  catch  fire  under  certain 
conditions  (e.g.  concentration  above  lower  explosion  limit,  large  heat  of  adsorption, 
etc.) [17]. 

  Pressure swing and vacuum swing adsorption (PSA and VSA) was first develop 
by Skarstrom and, independently, by Guerin de Montgareuil and Domine [15]. All PSA 
and  VSA  processes  work  on  the  same  principle:  high  pressure  adsorption  and  low 
pressure  regeneration.  They  are  equilibrium  controlled  separation  where  different 
amount of adsorbate can be adsorbed at different pressures throughout a cycle.  Most 
PSA  processes  are  operated  adiabatically  where  pumps  provide  the  compression  or 
suction  energy  required  to  achieve  the  separation  [1].  PSA  can  achieve  higher  purity 
separation than membrane technology and is economical for low to moderate capacity 
units  [1].  Activated  carbon  used  with  PSA  is  useful  for  separation  of  toxic  gas  species 
from flue gases due to their high capacity, fast kinetics and relative ease of regeneration 
[18]. A PSA cycle can be very fast; one to two minutes is common in industry. This leads 
to  high  productivity  and  smaller  adsorbers,  reducing  capital  cost.  A  VSA  cycle,  on  the 
other  hand,  has  long  desorption  step,  thus  reducing  productivity.  However,  VSA  can 
produce higher purity products in certain applications [17]. The design and operation of 
PSA and VSA cycles can be very versatile; this flexibility allows for quick adaptation to 
changes in feed composition and market conditions [19]. 


CN4118R Final Report

3.2 Applications 

3.2.1 By adsorbents 

  Activated  carbon,  being  inexpensive  to  manufacture  and  a  strong  adsorbent  of 
organic compounds, is widely used in pollution control involving humid gases. It is also 
the de facto adsorbent used in personal protection against a toxic atmosphere. It is used 
in H2 purification as well. CMS are used for producing pure nitrogen from air. 

  Zeolites  are  used  for  drying  air  and  natural  gas  and  the  removal  of  carbon 
dioxide from air or flue gas. They are also used in small scale air separation, producing 
oxygen and nitrogen. 

  Both  silica  gel  and  activated  alumina  are  used  in  gas  drying  and  are 
complimentary to zeolites. They are used to reduce water content at lower temperature 
before  the  gas  stream  is  passed  through  zeolites  at  higher  temperature  for  complete 
drying.  

3.2.2 By regeneration methods 

  TSA  is  limited  by  slow  heating  and  cooling  rates.  The  long  TSA  cycles  make  it 
unproductive for bulk separations. It is employed for purification processes such as the 
removal of VOCs [20] and drying of gases [21], where the time taken for the feed step is 
comparable to that of the regeneration step. 

  One of the best established processes in PSA is H2 purification, with capacities up 
to  100  kN.m3/h  and  purities  up  to  99.9995%,  with  good  energy  efficiency  and  high 
recovery  (70  ‐  90%).  O2  production  with  moderate  purity  (93  ‐  95%)  and  small 
flowrates  of  up  to  1  kN.m3/h  using  zeolites  is  common  as  well.  Minor  applications 
include  H2‐CO2,  CO2‐CH4,  CO  from  blast  furnace  gas,  H2‐CH4,  CO2‐N2  and  Ar‐O2 
separations.   VSA  is  commonly  used  for  N2  production  (up  to  99.5%  purity)  at 
moderate flow rate (~10 kN.m3/h), using CMS as the adsorbent. Pilarczyk et al. reported 
that  new  applications  have  been  developed  for  recovery  of  CO2  from  flue  gases, 
achieving CO2 gas streams of high purity (>98%) and recovery (53 – 72%) [22]. 

8
CN4118R Final Report 

3.3 Future Development 

  The use of solid adsorbents in flue gas treatment is only in the early development 
stage  but  some  studies  have  shown  that  they  have  superior  thermal  properties  as 
compared  to  liquid  solvents  used  in  absorption  [23],  important  considerations  with 
regards  to  energy  consumption.  Nonetheless,  many  acknowledge  that  developing 
adsorbents  capable  of  meeting  present  demands  in  flue  gas  treatment  remains  an 
ongoing  process  [19,  24,  25].  The  cost  of  manufacturing  adsorbent  is  now  negligible 
compared  to  the  equipment  cost,  thereby  providing  incentive  for  the  development  of 
more expensive but efficient ones [1]. 

  In  today’s  R&D  in  the  technology,  improving  the  energy  demand  of  adsorption 
process  is  one  of  its  key  goals.  This  has  been  achieved  for  O2  production  via  PSA;  the 
power  consumption  of  these  units  has  decreased  from  0.6  kWh/N.m3  in  1983  to  0.35 
kWh/N.m3 in 1990, bringing it to the level of the best cryogenic units [1]. Other ways to 
bring down operation costs are to develop adsorbents with higher selectivity, expansion 
of capacity to reap economy of scale as well as more refined operation schemes. Capital 
cost reduction can be achieved through more compact design of equipment. 

4. Numerical Methods for Solving Partial Differential Equations 

  Understanding a problem in adsorption requires solving its governing equations, 
which  are  usually  partial  differential  equations  (PDEs).  These  differential  equations 
differ  from  ordinary  differential  equations  (ODEs)  in  that  they  have  two  or  more 
independent  variables.    Solving  PDEs  analytically,  though  not  impossible,  are  tedious 
and  impractical.  To  that  end,  various  numerical  approaches  are  available  to  give 
approximate  solutions.  The  application  of  numerical  methods  to  solve  problems 
involving  fluid  flow,  such  as  adsorption,  is  known  as  computational  fluid  dynamics 
(CFD).  

  Two  methods  currently  dominate  the  CFD  community:  finite  volume  methods 
(FVM) and finite element methods (FEM) [26]. FVM are increasingly being used for CFD 
in recent years due to particular advantages in its formulation  [27]. Another method, 
also the oldest and simplest, is the finite difference method (FDM). The formulation of 
these  methods  differs  in  grid  definition  and  interpretation  of  numerical  quantities. 
Other  methods  such  as  orthogonal  and  spline  collocation  exist  in  literature  and  are 


CN4118R Final Report

known to be more efficient and accurate than traditional methods [1, 28, 29]. However, 
they are not commonly applied due to their complexity. 

  The approach of FDM, FVM and FEM is to approximate the PDEs by discretizing 
the  spatial  dimension  to  convert  the  PDEs  into  ODEs  in  time.  The  ODEs  can  then  be 
solved by powerful ODEs methods such as the Runge‐Kutta method. 

  Traditional FDM codes cannot handle discontinuities, a bane in CFD where sharp 
fronts  can  occur  [30,  31].  Another  issue  with  FDM  is  that  mass  is  not  rigorously 
conserved.    Although  accuracy  can  be  improved  as  time  step  and  grid  size  approach 
zero  and  by  using  higher  order  of  approximation,  computation  time  increases  as  well 
[30,  32].  FVM  codes  rely  on  integration  to  give  a  more  fundamental  interpretation  of 
mass (or energy) fluxes between interfaces [33]; therefore, conservation of mass (and 
energy) is rigorous. FVM can also be easily used on non‐uniform grids [34, 35]. Several 
papers  comparing  FDM  and  FVM  were  published.  FVM  codes  were  found  to  be  more 
accurate  and  as  a  result,  coarser  grids  can  be  used,  saving  computation  time  [36,  37]. 
Botte  al  et.  concluded  in  their  analysis  that  although  FVM  conserve  mass  and  is  more 
accurate  in  some  cases,  generally  speaking,  FDM  codes  are  more  accurate  and 
computation  times  for  either  codes  are  comparable  [32].  The  FDM  can  also  be  more 
efficient than FVM or FEM if the problem can be solved with a uniform structured grid 
[38]. 

  In this paper, a simple adsorption model will be solved using FVM and FDM using 
fixed  grids  (adaptive  grids,  or  stencils,  allow  superior  tracking  of  sharp  fronts  but  is 
beyond  the  scope  of  this  project).  FEM  was  not  performed  due  to  constraints  in  the 
project  timeline;  its  complex  nature  would  require  significant  effort  in  formulating  its 
codes.  Three  numerical  experiments  were  performed  to  evaluate  the  performances  of 
FVM and FDM codes. 

5. Theory 

5.1 Langmuir Model 

  The  Langmuir  model  proposed  by  Langmuir  in  1918  [39]  is  used  to  describe 
adsorbate‐adsorbent systems based on the kinetic approach. The relationship between 
the amount of adsorbate adsorbed (q) at equilibrium was experimentally determined to 
be  dependent  on  concentration  and  temperature.    Equilibrium  isotherms  are  plots 

10
CN4118R Final Report 

where  temperature  is  fixed  and  q  is  dependent  on  concentration  only.  Six  types  of 
isotherms are known (Figure 1); Type I, also called the favorable isotherm, is of interest 
here and can be described by the Langmuir model. 

5.1.1 Monolayer adsorption on homogeneous surfaces 

Three assumptions are made based on Langmuir’s analysis [15]: 

1. The adsorbed molecule is held at definite, localized sites. 

2. Each site can only adsorb one molecule or atom. 

3. The heat of adsorption, ∆H, is constant throughout the surface and no interaction 
exists between neighboring adsorbed molecules. 

  The  isotherm  equation  is  derived  based  on  equal  rates  of  adsorption  and 
desorption  at  equilibrium.  The  rate  of  adsorption  is  dependent  on  the  fluid  phase 
concentration of the adsorbate (C) and the fraction of remaining sites (1 ). The rate 
of desorption is only dependent on the fraction of occupied sites ( ). 

Rate of adsorption ka C 1  
Rate of desorption kd  

At equilibrium, ka C 1 kd , or 

q bC ka
  , b   (1)
qs 1 bC kd

b  is  the  Langmuir  constant  and  is  found  to  follow  an  Arrhenius  type  dependence  on 
temperature. 

  b b0 ∆H⁄RT
  (2)

b0  can be dependent or independent on temperature for different systems. 

  Linear isotherms are used in cases where Henry’s law is valid. At low 
concentration (i.e. bC 1), (1) reduces to a linear form (3) where K is the Henry’s 
constant. The corresponding isotherm is called a linear isotherm. Its simplicity is also 
useful for arriving at an analytical solution used for validating the simulator. 

  q KC, K qs b  (3)

11 
CN4118R Final Report

Figure 1 Types of adsorption isotherms
Ordinate – amount adsorbed, q; Abscissa – relative pressure, P/P0. Source: [40] 
5.1.2 Effect of temperature 

  The isotherms are ‘compressed’ downwards as temperature increases (Figure 2). 
This  is  because  adsorption  is  an  exothermic  reaction.  By  Le  Chatelier’s  principle,  the 
equilibrium  shifts  towards  higher  rate  of  desorption  as  temperature  increases.  This  is 
the basis for thermal regeneration cycles, where the temperature within the adsorber is 
manipulated for faster desorption rate or higher adsorption capacity. 

T1 
Amount adsorbed 

T2 

T1<T2 

Adsorbate Concentration 

Figure 2 Type I isotherm at different temperatures
 

12
CN4118R Final Report 

Table 1 Assumptions for the derivation of governing equations.
  Assumption  Comments 

1. Homogeneous packing (no channeling) Valid if carefully packed and Dcol / dp > 
30 

2. Negligible radial gradients   

3. No chemical reactions  Adsorbents can act as catalyst 

4. Neglect kinetic and potential energy   

5. No radiant heat transfer  Absolutely true only for isothermal; 
usually lumped with convective heat 
transfer for non‐isothermal case 

6. No electrical or magnetic fields   

7. No phase changes except sorption  Valid for gas system 

8. Velocity constant across cross‐section  Reasonable assumption if: no 
channelling, no radial gradients, no 
viscous fingering 

9. No irreversible adsorption   

10. Rigid packing   

11. Constant sorption properties  No degradation or poisoning 

12. No breakage or dissolution of packing   

13. Negligible conduction in column walls  Valid for large diameter columns 

14. Constant adsorbate molecular diffusivity  Valid for isobaric and isothermal system; 


may be applicable to adiabatic system if 
temperature change is insignificant. 
Adapted from [17], Table 17‐6, pg 673.

5.2 Axially­dispersed Plug Flow Model with Negligible Pressure Drop 

  The  axially‐dispersed  plug  flow  model  was  probably  first  described  in  1949  by 
Glueckauf  et  al.  [41]  and  is  widely  used  in  the  study  of  fluid  mixing  in  chemical 
processing vessels because of its simplicity [42]. It is characterized by the spreading of a 
pulse  as  it  progress  through  the  vessel.  This  phenomenon  is  analogous  to  a  diffusion 
process of the tracer in both directions from the centre of the tracer, superimposed onto 
the plug flow process of the same centre moving in one direction [35]. For a sufficiently 
long vessel, radial dispersion is assumed to be negligible and there is no variation in the 

13 
CN4118R Final Report

radial direction. A longitudinal dispersion coefficient, DL1, can be used to represent this 
spreading process, reducing it to a one‐dimensional problem. 

   In  deriving  the  governing  equations,  several  assumptions  have  to  be  made  for 
the analysis to be valid. These assumptions are summarized in Table 1. 

5.2.1 Isothermal 

  In addition to the assumptions considered in Table 1, temperature is assumed to 
be constant for the entire system. Consider an arbitrary section (∆z) of a packed vessel 
(with uniform cross‐sectional area, S) as shown in Figure 3, the general material balance 
for a single component A within this control volume at an arbitrary time interval (∆t) is 

  Accumulation = Input – Output Source  (4)

 
Figure 3 Shell‐and‐tube depiction of vessel section 

Let CA  and u denote  the  fluid  phase  concentration  of  A  and  the  fluid  velocity  in  the  z‐
direction  respectively;  subscripts  z  and z+∆z represent  spatial  position  of  respective 
quantities.   denotes the void fraction. The individual components in (4) are 

Accumulation ∆CA Volume of fluid in section ∆CA · ∆z · S ·  


Input due to bulk convection CA,z Volume entering CA,z · uz · ∆t · S ·  
Output due to bulk convection CA,z+∆z Volume leaving CA,z+∆z · uz+∆z · ∆t · S ·  

1 The longitudinal dispersion coefficient can be obtained via suitable empirical correlations. 

14
CN4118R Final Report 

  Fick’s law on molecular diffusion can be applied for the dispersion effect, with DL  
∂CA
assumed to be constant throughout the length of the vessel and   is the local 
∂z
concentration gradient of component A, 
CA
Input due to axial dispersion ∆NA,z DL · S · · · ∆t 
z z

CA
Output due to axial dispersion ∆NA,z+∆z DL · S · · · ∆t 
z z+∆z

Leaving the final term (Source) as it is for the while and dividing by ∆z · S · · ∆t, 

CA CA
∆CA DL · DL · CA,z+∆z · uz+∆z CA,z · uz 1
z z+∆z z z
Source 
∆t ∆z ∆z ∆z · S · · ∆t

Taking the limits of ∆z→0 and ∆t→0, 

CA CA CA · u 1 (5)
  DL [Source] 
t z z

(5)  represents  the  general  equation  for  the  isothermal  axially‐dispersed  plug  flow 
model. The final term, [Source], is related to the control volume ∆z · S and time interval 
∆t;  hence  these  terms  are  omitted  for  later  sections.  It  is  positive  if  species  A  is 
generated  in  the  control  volume  (desorption)  and  negative  if  it  is  being  consumed 
(adsorption). 

5.2.2 Extension to adsorption using Langmuir model 

  In  time  interval  ∆t ,  solid  loading  q  increases  by  ∆qA  while  fluid  phase 
concentration decrease by the same amount. qA  is defined to have the same units as CA . 
As it describes quantities dependent on the solid phase but is affecting the fluid phase, 
the expression for [Source] is 

∆qA ∆qA
Source Volume of packed solid · 1 · ∆z · S 
∆z · S · ∆t ∆z · S · ∆t

Substituting back into (5), 

CA CA CA · u 1 qA (6)
  DL  
t z z t

15 
CN4118R Final Report

Evidently, the final term in (6) describes the rate of mass transfer between the fluid and 
solid  phases.  A  detail  approach  to  quantifying  the  rate  involves  obtaining  parameters 
for  film  diffusion  and  diffusion  within  the  pores  of  the  particles.  A  lumped  parameter 
mass  transfer  coefficient,  k, is  often  used for  simplification  and  practical  reasons  [17]. 
The  lumped  parameter  model  assumed  a  linear  driving  force  (LDF)  caused  by 
concentration  differences  between  the  solid  and  fluid  phases.  One  approach  converts 
the  fluid  phase  concentration CA  into  a  hypothetical  solid  loading qA ,  the  amount 
adsorbed that would be in equilibrium with CA .  

qA (7)
  k qA qA  
t

Applying (1) for qA , 

bCA
  qA qs   (8)
1 bCA

Overall material balance is derived for an inert carrier by denoting CI  as the fluid phase 
concentration  of  the  inert  carrier  in  (6)  and  summing  the  two  material  balances 
together. 

CI CI CI · u
  DL   (6’)
t z z
Note: No mass transfer of inert carrier into solid phase 

CA CI CT  and CT  is invariant in time and space (isobaric and isothermal), 

∂u 1 qA (9)
  CT  
∂z t

(6),  (7)  and  (9)  provide  the  governing  equations  for  the  isothermal  model  and  can  be 
expressed  in  their  dimensionless  forms  (10),  (11)  and  (12)  by  defining  the  following 
variables: 

z CA u L u tu qA kL qs 1
Z ,y , ,u , τ ,x , ,  
L A CT DL u L A qs u CT

where L is the length of the vessel, CT  is the overall fluid concentration and u  is the feed 


interstitial velocity. (13) and (14) provide the boundary conditions for adsorption and 
desorption respectively. 

16
CN4118R Final Report 

yA 1 yA yA · u xA (10)
   
τ Z Z τ
xA qA byA CT
  xA xA , xA   (11)
τ qs 1 byA CT

∂u xA (12)
   
∂z τ
yA xA yA
  0, 0, yA yA0 , 1  (13)
τ Z
τ Z Z

yA xA yA
  0, 0, yA 0, 1  (14)
τ Z
τ Z Z

By ideal gas law, 

P Q
CT ,  while  u  
V RT Sε

where  P,  T  and  Q  are  the  operating  pressure,  temperature  and  feed  flow  rate 
respectively.  R  is  the  molar  gas  constant.  The  quantities yA  and xA  can  be  normalized 
through  dividing  by  feed  mole  fraction  (yA0 )  and  the  equilibrium  fractional  coverage 
associated  with yA0  (xA0 )  respectively.  In  subsequent  sections, yA0  is  defined  as  one  of 
the operating parameters while xA0  is obtained from (15). 

byA0 CT
  xA   (15)
1 byA0 CT

5.2.3 Non‐isothermal 

  The  non‐isothermal  model  contains  two  more  governing  equations:  one  heat 
balance for the fluid and solid phases and one heat balance for the column wall. Before 
going into the heat balances, the material balances have to be made into more complete 
forms. (6) remains valid and should be expanded by ideal gas law. CA yA P⁄RT and R 
and P are invariant with time and space, (6) becomes 

yA yA T yA 1 yA T ·u yA · u T RT 1 qA
  DL   (16)
t T t z T z z z T z P t

17 
CN4118R Final Report

Overall material balance is obtained differently, with CT  a function of space and time. 

CT CT · u 1 qA (17)
   
t z t

Upon expansion by ideal gas law, (17) becomes 

1 T u u T RT 1 qA (18)
   
T t z T z P t

Substituting (18) into (16), 

yA yA 1 yA T ·u u RT 1 qA
(19)
  DL yA y 1  
t z T z z z z P A t

Energy balance for the fluid and solid phases is derived using the same procedure as in 
section 5.2.1, with the components in (4) listed in Table 2. 

1 T 1 T CT · T
s Cps qA Cpa Cpg
t t t
  (20)
Kz T CT · T · u 1 qA 2hi
Cpg ∆H T Tw  
z z t ri

Table 3 provides the reference for energy balance in the column wall.  
Tw Tw 2ri hi 2ro ho (21)
  w Cpw Kw T Tw T Ta  
t z ro ri ro ri w

(20) can be rearranged for further manipulations 

1 T Kz T CT CT
g Cpg s Cps qA Cpa Cpg T u  
t z t z
  T·u 1 qA 2hi (22)
Cpg g ∆H T Tw  
z t ri
Note: CT g 

By only expanding the first term on the right hand side, (17) can be re‐written as 

CT CT u 1 qA (23)
  u g  
t z z t

18
CN4118R Final Report 

Substituting (23) into the second term on the right hand side of (22) and rearranging, 
the final form of the gas and solid phase energy balance is given as 

1 T Kz T u T·u
g Cpg s Cps qA Cpa g Cpg T  
t z z z
  (24)
1 qA 2hi
Cpg T ∆H T Tw  
t ri

(18), (19), (21), (24) are the material and heat balances of the model and together with 
(7), the LDF model, constitute the governing equations. 

Table 2 Components for gas and solid phase energy balance with respect to (4) 
Terms  Components 

Accumulation  Energy gained in the fluid phase 
Energy gained in the solid phase 
Energy gained in the adsorbed phase 

Input  Energy transferred into control volume by convection and diffusion 

Output  Energy transferred out of control volume by convection and diffusion
Energy transferred into column wall by convection 

Source  Energy generated by adsorption (positive) or consumed by 
desorption (negative); stored as adsorbate internal energy 
 

Table 3 Components for column wall energy balance with respect to (4) 
Terms  Components 

Accumulation  Energy gained by wall section 

Input  Energy transferred into wall section by conduction 
Energy transferred into wall section from fluid by convection 

Output  Energy transferred out of wall section by conduction 
Energy transferred out of wall section into ambient air by convection 

Source  Not applicable 

As  with  section  5.2.2,  dimensionless  forms  of  (18),  (19),  (21)  and  (24),  together  with 
(11), are used in the simulator. Defining additional variables, 

T Tw Ta 1
T , Tw  , Ta , g Cpg s Cps qA Cpa  
T T T

19 
CN4118R Final Report

u 1 T u T xA (25)
  T  
Z T τ T Z τ
yA 1 yA 1 yA T ·u u xA
  yA T yA 1   (26)
τ Z T Z Z Z Z τ

Tw Tw (27)
  π1 π2 T Tw π3 Tw Ta  
τ Z
T T u T·u xA
  π4 π5 T π6 π7 T π8 T Tw   (28)
τ Z Z Z τ

The inflow and outflow boundary conditions are (29) and (30). 

At Z 0, 
1 yA
 
Z Z Z
  (29)
T T
π4 π5  
Z Z Z
Tw Ta , 1 
At Z 1, 
  yA (30)
T Tw
0  
Z Z Z

A full list of coefficients used in (27) and (28) is given in Table 4. 

Table 4 List of coefficients associated with (27) and (28) 
Coefficient    Coefficient   
Kw g Cpg
π1     π5    
w Cpw u L
2ri hi L 1
  ∆H qs
π2   π6    
2
w Cpw u ro r2i T
2ro ho L 1
π3     π7   Cpg qs
w Cpw u r2o r2i  
Kz 2hi L
π4     π8    
u L ri u

5.3 Finite Difference Method (FDM) 

  In this and the following sections, general formulation of the numerical methods 
will  be  presented.   will  be  used  to  denote  the  variable  of  interest.  Nodes  are 

20
CN4118R Final Report 

discretized  locations  where   are  defined.  The  quantities  obtained  via  numerical 
methods  are  not  continuous;  that  is  to  say,  a  set  of N 1   values  form  the  entire 
solution of the PDEs. In this paper, only fixed grids will be used. 

  Explicit schemes are used for the FDM and FVM. This means that the values of   
obtained  for  the  next  time  step  is  only  dependent  on  values  at  the  current  time  step. 
Explicit  schemes  are  more  efficient  and  can  give  reasonable  accuracy  for  practical 
purposes. (10) is referred to again in terms of  , therefore, 

1
u Source' 
  τ Z Z
u
Note: Source' Source 
Z

The convection term was expanded and combined with the Source term to simplify the 
expression.  This  can  only  apply  for  the  FDM  since  the  fluid  velocity u does  not  have 
physical significance in FDM; this is not true for FVM. 

5.3.1 Grid definition 

  Figure 4 depicts the graphical representation of an adsorber column of length L 
divided into N  cells with N 1 nodes, with the first node at Z 0 and the last node at 
Z 1. Each node is separated from the other by the grid size ΔZ. Boundary conditions 
are imposed at the first and last nodes. For subsequent treatment of  , subscripts i refer 
to the node location and superscripts n refer to the current time step. 

Figure 4 Grid definition for FDM
5.3.2 Spatial derivatives 

  Numerical  differentiation  is  used  to  approximate  the  spatial  derivatives  as 
algebraic  expressions.  Forward  differencing  is  used  for  the  first  grid  while  backward 
differencing  is  used  for  the  last  grid.  Centered  differencing  is  used  for  the  grids  in 
between. Second order accurate ( ΔZ ) formulations were used as the standard here. 
The formulae are presented in Table 5. 

21 
CN4118R Final Report

Table 5 Numerical differentiation for FDM 
First derivative  Second derivative 
Nodes 
   
Z Z
3 4 2 5 4
1     
2ΔZ ΔZ

2
i     
2ΔZ ΔZ

4 N 3 N 1 N 1 2 N 1 5 N 4 N 1 N 2
N 1     
2ΔZ ΔZ
5.3.3 Remaining terms and equations 

  The source term follows the algebraic expression in (11). Overall mass balance 
(12)  is  implemented  with  backward  difference  using  the  inflow  boundary  condition 
1. 

5.3.4 FDM algorithm 

  The  fluid  phase  concentration,  solid  phase  loading  and  fluid  phase  velocity  are 
updated  using  (31),  (32)  and  (33)  respectively.  Boundary  conditions  for  adsorption 
operation  prescribed  by  (34)  (yA 0 for  desorption)  and  the  source  term  (35)  are 

performed at the start of each time step. 

1 yA yA xA
  yA yA ∆τ u yA 1 , 2  N   (31)
Z Z τ

xA (32)
  xA xA ∆τ , 1 N 1 
τ

xA (33)
  u u ΔZ , 1, 2 N 1 
τ
ΔZyA yA (34)
  yA , yA yA0 , yA yA  
ΔZ 1
xA byA CT
  xA * xA , xA * , 1  N 1   (35)
τ 1 byA CT

22
CN4118R Final Report 

5.4 Finite Volume Method (FVM) 

  In FVM, the differences lie in the grid definition and the interpretation of how the 
quantities  should  be  evaluated.  Numerous  schemes  are  available  in  the  literature, 
categorized into explicit‐implicit and linear‐quadratic schemes. As mentioned in section 
5.3, the scope of this paper is limited to explicit schemes and fixed grids only. 

  Another form of (10) is derived. 

1 (36)
  ·u Source 
τ Z Z
The  terms  in  the  parenthesis  has  significance  in  determining  the  stability  limits  of 
explicit  FVM  algorithms.  In  physical  terms,  the  Peclet  number  determines  whether 
diffusion  or  convection  is  more  dominant.  (36)  can  be  expressed  in  a  more  general 
form: 

  Φ·Κ · Source, Φ   (37)


τ Z Z

Solutions  derived  based  on  ,  which  has  coefficient  ,  can  be  extended  to Φ with 
coefficient Κ. 

5.4.1 Grid definition 

  Figure 5  depicts the graphical representation of an adsorber column of length L 
divided into N cells with N nodes. Each node is located at the center of its cell and   is 
defined as the average value of the quantity within the cell. Inflow boundary condition is 
imposed  on  the  left  interface  of  the  first  cell  and  the  outflow  boundary  condition  is 
imposed  on  the  right  interface  of  the  last  cell.  In  addition  to  the  notations  introduced 
earlier in section 5.3.1, subscripts l and r represents intermediate values of   at the left 
and right interfaces respectively. These intermediate values are not retained in the final 
solution,  with  the  exception  of  the  extreme  left  and  right  boundaries,  denoted  by 
subscripts L and R respectively. 

  Another  difference  with  FDM  is  the  introduction  of  ghost  cells  at  either 
boundary. Two ghost cells at each boundary are required for the implementation of high 
resolution schemes. 

23 
CN4118R Final Report

Figure 5 Grid definition for FVM
5.4.2 FVM algorithm 

  The  FVM  algorithm  can  be  described  by  the  3‐steps  Godunov’s  scheme.  The 
algorithm  first  define  the  interface  values,  reconstructing  discrete  solution  into  a 
piecewise continuous one. The ‘flow’ entering and leaving the control volume (CV) in a 
single time step is then approximated by integrating the current solution   at the cell 
over the distance covered by the fluid. The net flow is added to the initial integral and 
finally, the integral is divided by the cell volume to obtain the new solution  . Figure 
6 illustrates the algorithm for a single time step for a first‐order scheme. 

  This interpretation closely resembles the physical implication of the equation. It 
can  be  thought  of  as  the  deconstruction  of  the  equation,  tracing  back  the  steps  of 
deriving it in the first place (section 5.2.1). One advantage of the FVM can be observed 
here. The flux at the left boundary of the ith cell is equal to the flux at the right boundary 
of the previous cell. This continuity ensures that the quantity is conserved rigorously. 

5.4.3 First‐order schemes 

  Several methods are available to approximate the intermediate flux terms  , ,  
and  , , .  In  first‐order  schemes,  the  cell  centered  average  value   is  presumed  to 
apply  across  the  entire  cell  (Figure  5(a)).  As  such,   can  be  used  directly  to 
approximate  values  at  the  interface.  The  simplest  of  all  is  the  first‐order  upwind 
scheme. In this scheme, the direction of the flow is taken into account and inflow fluxes 
are  only  dependent  on  the  information  propagating  from  upstream.  Using  the 
convection  term  once  again  to  illustrate,  for  a  left‐to‐right  flow,  the  upwind  scheme 
essentially equates   to  ,  and   to  ,  and so forth.  

   

24
CN4118R Final Report 

Discretized  Algebraic 
  Description 
Expression  Expression 
Step 1 

Define a piecewise continuous solution   

Z, ∆Z  
Flow into CV Flux at left boundary
Cross‐sectional Area , · , · S · ∆τ  · τ
Time 
Flow out CV Flux at right boundary
Cross‐sectional Area , · , · S · ∆τ  · τ
Time 
Step 2 

, , ·
Net Flow out of CV  V τ 
, , S∆τ  Z

Volume integral of quantity in CV at  
· S · ∆Z   
τ     τ

S ∆Z
Volume integral Net Flow out of CV  ∆τ , ,  

, ,  
Volume integral of quantity in CV at  
· S · ∆Z   
τ 1  τ
Step 3 

∆τ
1 ·
Time derivative of quantity   
∆Z , , τ Z

, ,  
Figure 6 Godunov’s scheme for first‐order approximation 

  Another  approach  is  to  use  central  differencing  to  approximate  values  at  the 
interface to be half the sum of cell centered values on both sides. This method will give 
rise  to  unstable  flux  and  produce  oscillations  in  the  solution  as  a  result.  The  Lax‐
Friedrichs method modifies the central differencing with an additional term which acts 
as  numerical  diffusion.  A  summary  of  first‐order  schemes  making  use  of  the  result 
obtained in Figure 6 is presented in Figure 7. 

25 
CN4118R Final Report

·
Upwind   
Z ∆Z

Central Differencing  ·
 
(Unstable flux)  Z 2∆Z

·
Z 2∆Z
Lax‐Friedrichs 
2
 
2∆τ
Figure 7 Summary of first‐order schemes

  These  first‐order  schemes  are  similar  to  the  FDM  numerical  differentiation;  in 
fact,  the  Lax‐Friedrichs  scheme  is  similar  to  that  presented  Table  5  for  the  central 
differencing  of  the  first  spatial  derivative.  However,  first‐order  schemes  in  FVM  are 
problematic.  The  upwind  scheme  is  dissipative  and  will  smooth  out  any  sharp  front 
while  the  other  two  central  differencing  schemes  can  produce  oscillations,  if  they  are 
stable in the first place. Higher‐order (or high resolution) schemes derived with slightly 
more effort can be vastly superior to these simple first‐order ones.  

5.4.4 Higher‐order schemes 

Figure 8 FVM interpretation with linear function 

  Higher‐order schemes approximate the solution within a cell as a function. The 
simplest way, which is second order accurate, is to use a linear function that intersects 
the average value   at the node’s location (Figure 5(b)). Each cell is assigned a value for 
the slope ( ) of its linear function. The result obtained in Figure 6 no longer applies but 

26
CN4118R Final Report 

the algorithm remains identical. For simplicity and practical purpose, derivation of this 
result is performed on the specific assumption of left‐to‐right flow. 

  Assuming again that information is propagated only from the left interface. In a 
single time step ∆ , the shaded area in Figure 8 represents the amount flow into the CV 
in cell i.  Z is a product of ∆  and  , . The flow into the CV is equal to the shaded area 
multiply by the cross‐sectional area, S. The shaded area can be found by some geometric 
manipulation 

Z , Z
shaded area  
2
∆Z ∆Z
where  ,  and  Z Z . Substituting,  

∆Z ∆
Flow into CV 1 S , ∆  
2 ∆Z

Flow out of the CV is derived similarly. 

∆Z ∆
Flow out of CV 1 S , ∆  
2 ∆Z

, ,
Net flow out of CV S∆ ∆Z ∆ ∆  
1 , 1 ,
2 ∆Z ∆Z

Volume integral remains the same as in Figure 6 because the symmetric function does 
not alter the area bounded beneath it. 

Volume integral of quantity  at τ   · S · ∆Z 

Summing  up  the  change  in  quantity  in  cell  i  and  dividing  by  cell  volume  (S · ∆Z)  to 
obtain the new cell centered average value,  . 

, , 1 ∆ , ∆ ,
∆ 1 , 1 ,  
∆Z 2 ∆Z ∆Z

Rearranging the terms to obtain a more recognizable form, 

, , , , (38)
   
∆τ ∆Z

∆Z ∆ , ∆Z ∆ ,
where  , 1  and  , 1  
∆Z ∆Z

27 
CN4118R Final Report

Note  that  the  coefficient  ,  and  ,  are  not  defined  by  their  cell  centered  values  . 
This  is  an  intentional  simplification  by  assuming  that  the  value  of  the  coefficient  does 
not  change significantly  across  the  cell  and  thus  can  be  represented  by  the  first  order 
upwind  method.  This  assumption  would  be  invalid  in  concentrated  system  where  the 
velocity, represented by the coefficient, can vary drastically across a cell. The remedy is 
to use finer grids when solving such systems. 

  The  manner  in which  the  slopes are represented  differentiates  various  second‐


order schemes. Three obvious numerical approximations of the slopes come to mind. 2‐
points backward (upwind), forward (downwind) and centered approximations produce 
the Beam‐Warming [43], Lax‐Wendroff [44] and Fromm  schemes respectively. 

  However,  the  linear  second‐order  schemes  can  produce  oscillations  near  sharp 
wave  fronts.  Their  approximations  to  the  slopes  are  static,  in  terms  of  their  formulae, 
globally.  A  dynamic  approach  compares  the  three  approximations  and  selects  the 
appropriate  one  locally.  This  is  the  working  principle  of  high  resolutions  schemes.  In 
high  resolution  schemes,   can  be  the  product  of  a  delimiter  function  r  and ∆  , 
where 

∆  and r  

 is inserted to prevent division by zero during computation and should be a very small 
number  (~10‐10).  Most  first  and  second‐order  schemes  introduced  earlier  can  be 
expressed  in  this  form  by  changing  the  delimiter  function.  A  summary  of  well‐known 
schemes is presented in Figure 9. A detailed explanation on how the delimiter functions 
work can be found in [35]. 

5.4.5 Remaining terms and equations 

  For the diffusion term, it is common practice in FVM to adopt central differencing 
approximation  for  the  first  spatial  derivatives.  For  the  first  cell,  forward  difference  is 
used.  Boundary  condition  is  imposed  on  the  last  cell.  Table  6  presents  a  summary  of 
numerical differentiation formulae for FVM. 

  A second‐order accurate scheme involving the diffusion term, or second spatial 
derivatives  in  general,  was  developed  by  John  Crank  and  Phyllis  Nicolson  [45].  The 

28
CN4118R Final Report 

Crank‐Nicolson  scheme  is  an  implicit  method  and  therefore  is  not  desirable  for  the 
purpose of this paper. 

Upwind  r 0  (a) 

Beam‐warming  r r  (b) 

Lax‐Wendroff  r 1  (c) 

1
Fromm  r r 1   (d) 
2

Superbee  r max  0, min 1,2r , min 2, r   (e) 

r 1
MC  r max  0, min , 2, 2r   (f) 
2

r |r |
van Leer  r   (g) 
1 |r |
Figure 9 A summary of delimiter functions [35] 
 
Table 6 Numerical differentiation for FVM 
First derivative 
Nodes 
Φ,  
Z ,

2
1   
ΔZ

2  N    
ΔZ
N 1  0 
Note: Φ , Φ ,  

  (38) is derived for pure convection. (39) applies for a convection‐diffusion plus 
source form. 

Φ, Κ , Φ,Κ , , , , ,
  Source  (39)
∆τ ∆Z ∆Z

  Source  terms  are  implemented  in  the  same  manner  as  in  FDM  (35)  using  cell 
centered values (see (40) and (41)). Higher accuracy methods for updating the source 
term involve solving the convection‐diffusion equation and source equation at separate 

29 
CN4118R Final Report

time steps. These are known as fractional‐step methods [35]. Despite their usefulness, 
these methods are not practical to this project for reasons mentioned in section 6.1. 

  Mass  balance  is  performed  by  FDM  and  using  FDM‐defined  nodes  (42).  This  is 
because in (38) only cell interface values are used. In the event that cell centered values 
are required, linear interpolation should be performed. 

xA (40)
  xA xA ∆τ , 1 N 
τ
xA byA CT
  xA * xA , xA * , 1  N   (41)
τ 1 byA CT

xA (42)
  u, u , ΔZ , , 1, 2 N 1 
τ
5.4.6 Boundary conditions 

  (43) gives the boundary condition for adsorption (yA 0 for desorption). 

ΔZyA 2yA
yA yA yA , yA yA0 , 
  ΔZ 2 (43)
yA yA yA yA  

5.4.7 Effects of ∆  

  The size of the time step can affect the quality of the solution obtained in FVM. 
Following the algorithm derived in this section, a strict upper limit is imposed on ∆ ; it 
cannot be larger than the time taken for information to propagate across two cells. The 
solution in a particular cell is assumed to be dependent on information from its adjacent 
cell only. A simple inequality (44) embodies this limitation. 


  1  (44)
∆Z

If the coefficient   represents velocity, the inequality precisely means that ∆  cannot be 


larger than the time taken for the wave to travel more than the distance of one cell (∆Z). 
The  left  hand  side  of  the  inequality  in  (44)  is  known  as  the  Courant  number  (Co),  an 
important parameter in CFD.  

  Unsurprisingly,  the  Courant  number  appeared  in  the  high  resolution  equation 
(38).  The  high  resolution  equation  reduces  to  a  first‐order  upwind  scheme  if  the 

30
CN4118R Final Report 

∆Z
Courant number is equal to 1, or if ∆ , regardless of the type of delimiter function 

used. This represents the scenario where the solution moves one cell to the right with 
no  changes  to  the  cell  centered  average  values  at  all  (i.e.  ).  It  will  provide 
the  exact  solution  for  constant  .  For  problems  with  variable  coefficients,  a  smaller 
Courant number is usually used to take advantage of the delimiter function. 

5.4.8 Effects of ∆Z 

  Refining the grid excessively (∆Z 0) will reduce the upper limit of ∆  in (44), 


pushing the solution closer to instability. If the problem is dominated by diffusion (i.e. 
small  Pe),  an  excessively  fine  grid will  also  cause  instability in  the diffusion  term  as  it 
scales according to 1⁄ ∆Z . Investigating the errors in relation to the grid size is one of 
the purposes in the numerical experiments. 

5.5 Analytical solutions 

5.5.1 Axially‐dispersed plug flow with no source term 

  The analytical solution for an semi‐infinite medium was developed by Ogata and 
Banks [46]  

yA 1
  , ·   (45)
yA0 2
2 2

for the boundary conditions 

yA 0, yA0  and yA ∞, 0 

5.5.2 Axially‐dispersed plug flow with adsorption 

  Klinkenberg  provided  the  analytical  solution  based  on  semi‐infinite  medium, 


dilute feed and linear isotherm [47]. The boundary conditions are similar to that in the 
preceding section. 

yA 1 1 1
z,t  
yA0 2 8 8
  (46)
kKz 1 z
where    and k t  
u u

31 
CN4118R Final Report

5.5.3 Mass balance 

  The  mass  balance  can  be  performed  across  the  whole  adsorber.  The  input  and 
output information is integrated over time while the information inside the adsorber is 
integrated over its length. 

Amount of component A, 

Fed at the start of the column yA0 CT u  

Obtained at the end of the column yA,out CT u  

L
Remaining inside the column yA CT  

L
Adsorbed xA qs 1  

Assuming  that  the  adsorbents  are  completely  used  up, yA yA0  and xA xA0 .  The 
simulator can provide the output information. Putting the time integral on the left hand 
side and the other two terms on the right, 

L 1 qs xA0
  1 yA,out u 1  (47)
u CT yA0

32
CN4118R Final Report 

PART II: METHODOLOGY 

6. Numerical Experiments 

  A  major  aim  of  the  numerical  experiments  is  to  compare  the  performance 
between  FDM  and  FVM  as  formulated  in  Chapter  5.  The  series  of  experiments  were 
designed  to  begin  from  the  most  simple  equation  –  pure  convection,  through 
progressively complicated ones by adding the diffusion terms and the source terms. 

6.1 FVM Implementation in MATLAB 

  This section shall describe the implementation of (39) to (43), with cell interface 
values approximated by (38) and Table 6. First‐order, second order and high resolution 
methods  were  tested  in  Experiment  1  (section  6.3.1)  while  only  high  resolution 
methods  were  used  in  the  remaining  experiments.  The  software  used  was  MATLAB 
(version 7.10.0.499 R2010a).  

  MATLAB  provide  two  ways  to  solve  PDEs.  Although  there  is  a  built‐in  PDE 
toolbox, the FDM and FVM algorithms derived in Chapter 5 should be solved using ODE 
methods.  A  built‐in  MATLAB  ode  solver  (ode45),  which  uses  the  Runge‐Kutta  method, 
can be used to solve nonstiff differential equations [48]. 

  The  solver  automatically  adjusts  the  time  step  to  produce  accurate  results.  It 
accepts formulation of the ODEs in a function handle m‐file2 of the following form: 

τ,  
τ

  τ,  is computed at the start of each solver loop in the function handle m‐file 
before  being  passed  into  the  main  solver  m‐file,  where  ∆  is  determined  by 
perturbation, after which the new solution is obtained from the old one. It is apparent 
that  the  high  resolution  scheme  described  by  (38)  cannot  be  used  directly  because ∆  
cannot be called into the function handle m‐file before it is determined. This is also the 
reason  why  fractional  time  step  methods  involving  the  source  term  is  difficult  to 
implement  using  a  variable  time  step  solver  like  ode45.  To  solve  this  problem,  the 
Courant number in (38) is assumed to be much smaller than one. The values at the cell 
interfaces are therefore approximated as: 

2 Functions used in MATLAB are stored as m‐files. 

33 
CN4118R Final Report

∆Z ∆Z
, r ∆  and  , r ∆  
2 2

  The  validity  of  this  approximation  is  dependent  on  the  solver’s  ability  to  use  a 
time step that satisfies the assumption made. 

6.2 Performance Indices 

  Three performance indices used in the experiments are defined here. 

6.2.1 Accuracy errors 

  The  solutions  obtained  via  the  two  methods  are  compared  to  a  benchmark 
solution.  The  benchmark  solution  are  provided  by  the  analytical  solution  described  in 
section  5.5.  Denoting  numerical  solution  as  ,  the  benchmark  solution  as   and  h  as 
either the time or space interval, the L‐error, L2‐error and the max‐ error are 

L‐error | | h 

L ‐error h 

max‐error max | | h 

The three errors illustrate different aspects of accuracy. The L‐error gives equal weight 
to all errors. The L2‐error give large weights to large error, therefore it prioritizes on the 
overall  fit‐ness  of  the  numerical  solution  to  the  benchmark.  The  max‐error  penalizes 
oscillations as these errors can be several times the magnitude of the truncation errors. 

6.2.2 Mass balance error 

  An important aspect of adsorption modeling and simulation is the rigorousness 
in  which  mass  is  conserved.  Mass  balance  is  carried  out  to  make  sure  that  the 
simulation  is  as  close  to  reality  as  possible.  Quantities  inside  the  column  were 
integrated over the space domain while quantities ‘measured’ at the column outlet were 
integrated with time. It is compared to that of the benchmark solution and the relative 
error  is  recorded.  Denoting  the  solution  mass  balance  as  MB  and  benchmark  mass 
balance as MB*, the MB‐error is 

|MB MB|
MB‐error  
MB

34
CN4118R Final Report 

where   

MB z Z 

For  quantities  inside  the  column,  the  integral  is  evaluated  using  trapezoidal  rule  for 
FDM  grids,  while  for  FVM,  the  sum  of  the  solution  is  simply  multiplied  by  the  grid 
interval, since the value defined by a FVM node represents the average value in the cell. 

6.2.3 Computation time taken 

  This performance index is obtained only in experiment 3. 

  The time taken to run each code is compared. MATLAB provides a profiler tool 
which breaks down the simulation time into detailed analysis of each function used. The 
times clocked by two selected functions (Table 7) and the number of times odefun was 
called are of interest. 

Table 7 Functions selected for profiling and their descriptions
Function  Description 

ode45  Built‐in MATLAB ode solver using Runge‐Kutta method 

odefun  Function handle for ode45; contains governing equations 

  The  number  of  times  odefun  was  called  depends  on  the  time  step  size 
determined by ode45 and can affect the computational time. It is put forward here that 
this  number  will  be  larger  for  the  FVM  schemes  as  a  penalty  for  higher  accuracy, 
especially in cases where the wave front is sharp. Repetitions of the same problem were 
ran five times and the average time reported. The data were then compared on the basis 
of equivalent number of grids and equivalent error produced. Therefore, although FVM 
is  penalized  by  having  odefun  called  more  times,  it  should  provide  computational 
efficiency by using lesser number of grids. 

  The  data  for  equivalent  error  produced  was  obtained  by  the  following 
procedure: 
1) Grid sizes obtained for a list of error values by interpolation from error data. 
2) Computation  time  obtained  for  the  set  of  grid  sizes  from  the  previous  step  by 
interpolation from computational time data. 
3) Computation time matched to error produced. 

35 
CN4118R Final Report

6.3 Experiments 

6.3.1 Experiment 1 

  The  plug  flow  model  was  tested  here  by  setting  Pe  to  be  infinitely  large.  The 
benchmark solution is the input step function translated by   into the column. The grid 
size was varied and the total simulated time is 0.5 . 

  The aim of this experiment is to establish general trends and to evaluate various 
schemes based on a model where the analytical solution is exact. 

6.3.2 Experiment 2 

  The axially‐dispersed plug flow model was investigated here. Pe from 10 to 105 
in  logarithmic  intervals  was  investigated.  The  benchmark  solution  was  provided  in 
section 5.5.1. The data was collected at Z = 0.1 to satisfy the assumption of semi‐infinite 
medium. 

  The aim of this experiment is to find out how the introduction of the dispersion 
term, function of Pe, can alter the trends observed in Experiment 1. The high resolution 
schemes were further differentiated based on their robustness. 

6.3.3 Experiment 3 

  The axially‐dispersed plug flow model with source term was tested here. Pe was 
kept  large  while  the  lumped  parameter  mass  transfer  coefficient  (k)  was  varied.  The 
benchmark solution was provided in section 5.5.2. The data was collected at Z = 0.1 to 
satisfy the assumption of semi‐infinite medium. MB* follows section 5.5.3 and by using 
solution obtained a time long after the concentration front had broken through. Linear 
isotherm was used.  

  One  aim  of  this  experiment  is  to  complete  the  analysis  of  accuracy  and  mass 
balance by looking at the entire set of governing equations in a fixed bed adsorber.  

  Another  aim  of  this  experiment  is  to  illustrate  visually  the  capability  of  FVM 
schemes in modeling sharp wave front and the extent to which FDM failed in this aspect. 
Parameters are chosen such that the PDEs represent extreme cases and are a measure 
of robustness. 

  Finally,  the  computational  time  is  looked  at  to  see if  FVM  schemes  provide  any 
significant advantage over FDM in terms of computational efficiency. 

36
CN4118R Final Report 

PART III: RESULTS & DISCUSSION3 

7. Experiment 1 

Parameters used: 

Bed Length  Feed Velocity  Time Simulated 


L (cm)  u0 (cm/s)  t (s) 

100  1  50 

7.1 FDM 

  Figure  10  demonstrates  that  FDM  is  not  suitable  to  model  sharp  wave  fronts. 
This  is  because  spatial  derivatives  near  the  top  of  the  steep  slope  is  over‐estimated, 
resulting  in  overshoots  and  generate  oscillations.  The  accuracy  of  the  solution  can  be 
improved by using finer grids. However, oscillations still occur even at very fine grids.  

1 1
N = 100 N = 2000

0 0
yA/yA0 at 50 seconds 

1 1
N = 500 N = 5000

0 0

1 1
N = 1000 Exact 
Solution
0 0
0 20 40 60 80 100 0 20 40 60 80 100
  Position in column, z (cm) 
  Figure 10 FDM on plug flow model using different N 
 
7.2 First­order upwind scheme 

  The first‐order upwind scheme has an advantage over FDM as it does not create 
oscillation (Figure 11). However, it is highly inaccurate with coarse to moderately fine 
grids. Also, as the wave front travels through the column, the slope becomes gentler and 

3 All numerical data used in this paper is uploaded to http://tinyurl.com/FYPdata. 

37 
CN4118R Final Report

seems to behave like dispersed plug flow, although it ought to remain sharp. This is the 
dissipative effect of the upwind scheme. 

Concentration profile near wave center at different times
1

At 10s

At 30s
yA/yA0

At 50s

Exact Solution

0
‐25 ‐20 ‐15 ‐10 ‐5 0 5 10 15 20 25

Distance from wave center (cm)
 
Figure 11 Dissipative effect of first‐order upwind scheme 
First­order upwind scheme on plug flow model using different N
1

N = 100
yA/yA0

N = 500
At   t = 50 sec N = 2000
N = 5000
Exact Solution

0
30 35 40 45 50 55 60 65 70

Position in column, z (cm)
 
Figure 12 Effects of grid size on first‐order upwind scheme 

  The accuracy of the upwind scheme can be improved by using finer grid as well 
(Figure 12). At N = 5000, the solution of the upwind scheme can be comparable to that 
of FDM without the oscillations. The dilution of the wave front can be judge by looking 
at how far the solution spreads from the wave center (e.g. ~ 40 cm for N = 100). 

38
CN4118R Final Report 

7.3 Second­order and high resolution FVM schemes 

  The  second‐order  and  high  resolution  schemes  have  shown  significant 


improvements over the first‐order upwind scheme. Using the same number of grids, the 
sharpness  of  the  wave  front  is  captured;  solutions  are  spread  over  a  shorter  distance 
from the wave center (~ 20 cm) as compared to that of the upwind scheme. However, 
all three second‐order schemes are oscillatory (Figure 13(a)).  

  The  downwind  differencing  Lax‐Wendroff  scheme  has  oscillation  lagging  the 


wave center, similar to FDM. The upwind differencing Beam‐Warming scheme and the 
central  differencing  Fromm  scheme  both  have  oscillations  at  the  front,  although  for 
Fromm scheme, the oscillations are less severe.  

  As for the high resolution schemes, the difference between them can be observed 
by focusing on the area near the wave center (Figure 13(b)). The Superbee scheme gave 
the best accuracy, followed by MC and van Leer.  

7.4 Comparison of errors 

  Figure 14, Figure 15 and Figure 16 show the log‐log plots of the errors against 
grid size ∆Z. A sample calculation for the errors was given below. 

Table 8 Sample data for first‐order upwind scheme with N = 10 
Z  yA/ yA0  (yA/ yA0)*  (yA/ yA0)*  yA/ yA0 
0  1  1  0 
5  0.9933  1  0.0067 
15  0.9596  1  0.0404 
25  0.8753  1  0.1247 
35  0.7350  1  0.2650 
45  0.5595  1  0.4405 
55  0.3840  0  ‐0.3840 
65  0.2378  0  ‐0.2378 
75  0.1334  0  ‐0.1334 
85  0.0681  0  ‐0.0681 
95  0.0318  0  ‐0.0318 
100  0.0318  0  ‐0.0318 
 

39 
CN4118R Final Report

Second­order schemes on plug flow model (N = 100)

Beam‐Warming
yA/yA0

Lax‐Wendroff
Fromm
At  t = 50 sec
Exact Solution

0 10 20 30 40 50 60 70 80
‐0.2
Position in column, z (cm)
 
(a) 
High­resolution schemes on plug flow model (N = 100)
1

van Leer
yA/yA0

Superbee
At  t = 50 sec MC
Exact Solution

0
45 50 55
Position in column, z (cm)  
(b) 
Figure 13 (a) Second‐order FVM schemes (b) High resolution FVM schemes 

L‐error 0.1 0 0.0067 0.0404 0.1247 0.2650 0.4405 0.3840 0.2378


0.1334 0.0681 0.0318 0.0318 0.17642

L ‐error 0.1 0.0067 0.0404 0.1247 0.2650 0.4405 0.3840


.
0.2378 0.1334 0.0681 0.0318 0.0318 0.07141

max‐error 0.1 0.4405 0.04405

40
CN4118R Final Report 

  The  log‐log  plots  summarize  the  findings  made  in  the  preceding  sections.  The 
positive slopes indicate a positive relationship between the two variables. The generally 
linear trends suggest that they follow a power law relationship. More accurate schemes 
are found lower in the plot. The Superbee scheme is the most accurate across all three 
plots, followed by the other two high resolution schemes, the second‐order schemes and 
finally  the  first‐order  upwind  scheme.  The  Lax‐Wendroff  scheme  and  FDM  share  the 
exact same plot, confirming that both algorithms are actually equivalent. 

  The merits of high resolution schemes are clear to see; only these schemes would 
be  selected  to  test  against  the  FDM  in  subsequent  experiments.  Although  the  overall 
errors  (L‐error)  of  upwind  converge  towards  the  FDM  at  fine  grids,  it  is  still  far  less 
accurate  than  FDM  if  the  overall  fit‐ness  (L2‐error)  is  considered  instead.  It  is  much 
more difficult to use the upwind scheme to capture the sharp wave front that the other 
schemes can easily produce. 

  When  using  the  max‐error  (Figure  16),  the  ranking  is  reversed.  Upwind  is 
deemed to be more accurate than most schemes at the smallest grid size; only Superbee 
is  more  accurate.  Schemes  which  produce  oscillatory  solutions  have  the  largest  max‐
error. 

7.5 Mass conservation 

  Figure  17  shows  the  log‐log  plot  of  mass  balance  error  against  grid  size  ∆Z.  A 
sample calculation for the MB‐error was given below. 

For FVM defined nodes, using data from Table 8, 

yA,
MB ∆Z 4.9778 10 49.778 
yA0

MB 50 for a simulated time of 50 seconds. 

|50 49.778|
MB‐error 4.44 10  
50

For FDM defined nodes, using data from Table 9, 

yA, yA,
MB ∆Z 5.01705 10 50.1705 
2yA0

MB 50 for a simulated time of 50 seconds. 

41 
CN4118R Final Report

|50 50.1705|
MB‐error 3.41 10  
50
Table 9 Sample data for FDM scheme with N = 10 
Z  yA/ yA0 
0  1 
10  1.0429 
20  1.1310 
30  1.0056 
40  0.6932 
50  0.3797 
60  0.1710 
70  0.0650 
80  0.0219 
90  0.0055 
100  0.0025 
 

log(L­error) against log(∆Z)
0
‐5 ‐4 ‐3 ‐2 ‐1 0

(1)
(2) & (3)
log(L­error)

‐2
(1) ‐ Upwind
(4) (2) ‐ FDM
(5) (3) ‐ Lax‐Wendroff
(6) (7) (4) ‐ Beam‐Warming
(5) ‐ Fromm
(6) ‐ van Leer
(7) ‐ MC
(8) ‐ Superbee
(8)
‐4
log(∆Z)
 
Figure 14 Comparison of L‐errors between different schemes 

42
CN4118R Final Report 

log(L2­error) against log(∆Z)
‐1
‐4.5 ‐3.5 ‐2.5 ‐1.5 ‐0.5

‐2
(1)
log(L2­error)

(1) ‐ Upwind
(2) ‐ FDM
(3) ‐ Lax‐Wendroff
(4) ‐ Beam‐Warming
‐3
(5) ‐ Fromm
(2), (3) & (4)
(6) ‐ van Leer
(5) (7) ‐ MC
(6) & (7) (8) (8) ‐ Superbee
‐4
log(∆Z)  
Figure 15 Comparison of L2‐errors between different schemes 

log(max­error) against log(∆Z)
‐1
‐4 ‐3 ‐2 ‐1

(2) & (3)

‐2
log(max­error)

(1) ‐ Upwind
(2) ‐ FDM
(3) ‐ Lax‐Wendroff
(4) ‐ Beam‐Warming
‐3
(5) ‐ Fromm
(6) ‐ van Leer
(8)
(7) ‐ MC
(8) ‐ Superbee
‐4
log(∆Z)  
Figure 16 Comparison of max‐errors between different schemes 

  The  data  illustrate  another  aspect  of  FVM  schemes  –  mass  conservation.  FVM 
schemes which are total variation diminishing (TVD) (i.e. first‐order upwind, van Leer, 
MC  and  Superbee)  conserve  mass  rigorously  [35].  The  MB‐errors  of  these  schemes 
quickly  settle  onto  a  plateau.  Other  methods,  including  the  FDM,  follow  a  downward 

43 
CN4118R Final Report

trend as the grid refines. It can be seen from Figure 17 that the mass balance of FDM is 
much  less  accurate  than  that  of  FVM,  even  though  its  degree  of  accuracy  (~10‐8)  is 
usually acceptable. The improvement at very fine grid is also minimal. The shapes of the 
MB‐error log‐log plots would be understood further in Experiment 2.  

log(MB­error) against log(∆Z)
0
‐4 0
(3)

(5)
‐5
log(MB­error)

(2)
(1) ‐ Upwind
(2) ‐ FDM
(1)
(3) ‐ Lax‐Wendroff
(4) (4) ‐ Beam‐Warming
‐10
(6) (5) ‐ Fromm
(8) (6) ‐ van Leer
(7) ‐ MC
(7) (8) ‐ Superbee
‐15
log(∆Z)  
Figure 17 Comparison of L‐errors between different schemes 

8. Experiment 2 

Parameters used: 

Bed Length  Feed Velocity  Time Simulated  Peclet Number 


L (cm)  u0 (cm/s)  t (s)  Pe 

100  1  50  10 to 105 

8.1 General trend 

  The effect of Pe on the accuracies is illustrated in Figure 18(a), which is true in 
general for all of the schemes investigated. The numerical methods are more accurate 
when Pe is smaller. This is to be expected as diffusion spreads out the wave front and 
the numerical methods can make more accurate approximations. 

  The data for when Pe is equal to 10 bucks the observed trend. This is probably 
due  to  assumptions  made  by  the  analytical  solution  not  being  fulfilled.  The  analytical 
solution  requires  that  the  outflow  boundary  condition  have  no  effect  on  the  solution. 
This could be untrue for the case where Pe = 10 because at the stipulated time (t = 50s), 
44
CN4118R Final Report 

the  diffused  wave  front  has  reached  the  end  of  the  column.  Taking  this  into  account, 
data obtained for Pe = 10 was ignored. 

  Interestingly,  there  are  changes  to  the  effect  of  ∆Z  on  the  errors.  There  is  a 
threshold  grid  size  beyond  which  the  pattern  observed  in  Experiment  1  is  disrupted 
(Figure  18(b)).  It  most  readily  occurs  when  Pe  is  small  (10  to  100)  and  N  is  at  least 
1000. The threshold grid size seems to be different for different schemes. Unfortunately, 
as  most  data  fall  into  the  range  indicated  by  Figure  18(b)(ii),  this  change  is  not  well 
understood.  It  could  be  due  to  algorithm  errors  in  calculating  the  benchmark  solution 
because of the immensely small grid size, or it could be due to numerical instability. 

8.2 Superbee 

  The  Superbee  scheme  does  not  follow  the  general  trend  described  above.  The 
log‐log plot follows an irregular downwards trend and has a characteristic bump. This 
bump  occurs  at  different  grid  size  for  different  values  of  Pe  (Figure  19).  It  occurs  at 
larger grid size as Pe decreases and as a result, the accuracy of the scheme suffered. 

  The  reason  for  this  is  because  the  Superbee  scheme  tends  to  sharpen  smooth 
slopes [35]. This tendency gave it its advantage in Experiment 1 where the wave front is 
a  sharp  discontinuity.  However,  as  the  diffusion  effect  becomes  more  dominant,  the 
smooth  wave  front  is  incorrectly  sharpened.  The  extent  of  sharpening  changes  as  the 
grid is being refined. Therefore, the Superbee scheme is unsuitable for situations where 
the wave front is spread out – a common occurrence in an adsorber. 

8.3 Effect of Pe on accuracy of FDM 

  As  mentioned  earlier,  the  accuracies  of  all  schemes  improved  as  Pe  decreases. 
The  extent  of  improvement  by  refining  the  grid  is  greater  for  FDM  than  for  the  FVM 
schemes.  The  FVM  schemes  are  still  much  more  accurate  than  FDM  for  Pe  at  105,  104 
and marginally at 103 (Figure 20 (a) to (c)), FDM overtook the FVM schemes when the 
Pe is 100 (Figure 20(d)). 

  This  result  is  not  restricted  to  the  relative  dominance  of  diffusion  over 
convection.  With  the  introduction  of  the  source  term,  the  concentration  wave  front  is 

45 
CN4118R Final Report

Effect of Pe on accuracy
‐ Inf 0
log (Error)

Pe = Inf
Pe = 1e5
Pe = 1e4
Pe = 1e3
Pe = 100
Pe = 10

log(∆Z) ‐ Inf
 
(a)
Effect of ∆Z on the three errors
‐ Inf 0

(i) Range where  (ii) Range where 


overall error  refining the grid still 
becomes stagnant;  has positive effect 
slopes become less  on accuracy
positive
log (Error)

L‐error
L^2‐error
max‐error

log(∆Z) ‐ Inf

(b)
Figure 18 General trend observed in log‐log plots for experiment 2 

46
CN4118R Final Report 

Effect of Pe on accuracy of Superbee scheme
‐ Inf 0

(b)
(a)
log (Error)

Pe = Inf
Pe = 1e5
(d) Pe = 1e4
(c) Pe = 1e3
Pe = 100

log(∆Z) ‐ Inf
 
Figure 19 Trend observed for Superbee scheme
Location of bump: (a) Pe = 1e5 at ∆Z = 0.00167; (b) Pe = 1e4 at 0.005; (c) Pe = 1e3 at 0.0167; (d) 
Pe = 100 at 0.05; 

expected to spread out if the lumped parameter mass transfer coefficient is small, even 
at  extremely  large  Peclet  numbers.  As  Figure  20(d)  has  shown,  FDM  can  be  more 
accurate than the FVM schemes under such condition. 

8.4 Effect of Pe on mass balances 

  The  mass  balances  were  better  for  FDM  at  smaller  Pe  as  well  (Figure  21).  The 
shape  of  the  log‐log  plots  for  FVM  schemes  are  unremarkably  the  same  as  that  in 
experiment  1;  the  errors  rapidly  settled  onto  a  plateau  and  did  not  improve  over  the 
range  of  grid  size  investigated.  For  FDM,  the  errors  decreased  steadily  before  settling 
onto  a  plateau  as  well.  The  order  of  magnitude  at  which  the  plateaus  are  located 
depended on Pe. It ranges from 10‐2 to 10‐4 over the range of Pe investigated for the FVM 
schemes, compared to 10‐2 to 10‐11 for FDM. 

  In  terms  of  practicality,  ultra‐high  order  of  accuracy  (i.e.  10‐11)  may  not  be 
required.  The more important aspect is that the FVM schemes are robust enough that 
their mass balance errors are guaranteed to be within reasonable range for any grid size 
used. This could be an important consideration if robustness is required. 

47 
CN4118R Final Report

0 0
‐3 ‐2.5 ‐2 ‐1.5 ‐1 ‐3 ‐2.5 ‐2 ‐1.5 ‐1
Pe = 1e5 Pe = 1e4
log(L­error)

FDM
vanLeer
MC
Superbee
‐4 ‐4
log(∆Z)
   
(a)  (b) 
0 0
‐3 ‐2.5 ‐2 ‐1.5 ‐1 ‐3 ‐2.5 ‐2 ‐1.5 ‐1
Pe = 1e3 Pe = 1e2

‐5 ‐6
   
(c)  (d) 
Figure 20 Improvement in FDM over FVM as Pe decreases 
L‐errors are plotted here; L2‐errors and max‐errors show similar trends. 
 

‐2 ‐2
‐3 ‐2.5 ‐2 ‐1.5 ‐1 ‐3 ‐2.5 ‐2 ‐1.5 ‐1
FDM
van Leer
log(MB­error)

Pe = 1e4
Superbee
MC

Pe = 1e5
‐6 ‐4
log(∆Z)
   
(a)  (b) 
0 0
‐3 ‐2.5 ‐2 ‐1.5 ‐1 ‐3 ‐2.5 ‐2 ‐1.5 ‐1

Pe = 1e3 Pe = 1e2
‐12 ‐12
   
(c)  (d) 
Figure 21 Log‐log plots of mass balance errors against grid size for experiment 2 

48
CN4118R Final Report 

9. Experiment 3 

Parameters used: 

Feed  Peclet  Lumped Parameter Mass  Henry’s 


Bed Length 
Velocity  Number  Transfer Coefficent  Constant 
L (cm) 
u0 (cm/s)  Pe  k (s­1)  K 

100  1  1010  10 to 0.01  10 

9.1 General Trend 

  The trend observed in this experiment (Figure 22) is similar to that observed in 
experiment  2.  Errors  become  smaller  as  k  decreases,  confirming  that  the  numerical 
methods are more accurate as the concentration front spreads out. The same negative 
effect  of  excessive  spreading  on  the  accuracy  (akin  to  when  Pe  =  10  in  experiment  2) 
was observed in this experiment for k = 0.01; data obtained for k = 0.01 would not be 
presented subsequently. 

  A comparison between the different schemes is shown in Figure 23. As expected, 
the  advantages  of  FVM  schemes  over  FDM  diminish  as  the  wave  front  becomes  more 
spread out, or as k becomes smaller. However, even at the smallest k value investigated, 
the  FVM  schemes  (Superbee  scheme  excluded)  are  still  more  superior.  The  patterns 
seen in Figure 23 are generally true for L2‐errors and max‐errors as well. 

9.2 Effects of k on mass balances 

  Figure  24  shows  the  log‐log  plots  of  MB‐errors  against  grid  size.  The  data  for 
when  k  =  0.01  is  included  because  the  analytical  solution  developed  for  mass  balance 
operate on different assumptions (see section 5.5). The mass‐balance error for when k = 
10 is chaotic and can be attributed to the very sharp wave front exiting the column. As 
the exiting wave front become much gentler, familiar patterns emerged. 

  The MB‐errors for FDM followed a downward trend as the grid was refined. The 
first local minimum seen on (c) (near log(∆Z) = ‐1.2) is due to oscillation satisfying the 
analytical solution coincidentally. The other local minimum and also the one in (d) are 
due to FDM switching from overestimating the mass balance to underestimating it. 

49 
CN4118R Final Report

Effect of k on accuracy
‐ Inf

0
log (Error)

k = 10
k = 1
k = 0.1
k = 0.01

log(∆Z) ‐ Inf
 
Figure 22 General trend observed in log‐log plots for experiment 3 
 

k = 10 k = 1
log(L­error)

FDM
van Leer
MC
Superbee

‐3 ‐2.5 ‐2 ‐1.5 ‐3 ‐2.5 ‐2 ‐1.5 ‐0.5 ‐1


‐0.5 ‐1
log(∆Z)    
(a)  (b) 

k = 0.1

‐3 ‐2.5 ‐2 ‐1.5 ‐0.5 ‐1


 
(c) 
Figure 23 Log‐log plots of L‐ errors against grid size for experiment 3 
 

50
CN4118R Final Report 

  The  MB‐errors  for  the  FVM  schemes  were  observed  to  settle  onto  a  plateau 
quickly before becoming more oscillatory after a certain threshold  grid size. This may 
be  due  to  numerical  instability  arising  from  the  small  grid  sizes.  Under  numerically‐
stable condition, the FVM schemes are consistently underestimating the mass balance, 
another property of TVD schemes. 

0 ‐2
‐3.5 k = 10 ‐2.5 ‐1.5 ‐3.5 k = 1 ‐2.5 ‐1.5
log(MB­error)

FDM
van Leer
MC
Superbee ‐8 ‐8
log(∆Z)
   
(a)  (b) 
‐2 ‐3.5
‐3.5 k = 0.1 ‐2.5 ‐1.5 ‐3.5 k = 0.01 ‐2.5 ‐1.5

‐6 ‐6
   
(c)  (d) 
Figure 24 Log‐log plots of mass balance errors against grid size for experiment 3 

9.3 Robustness 

  The  robustness  of  FDM  and  FVM  are  tested  by  using  parameters  representing 
extreme  cases.  Because  of  the  closeness  between  the  FVM  schemes,  data  obtained  via 
the  van  Leer  scheme  is  chosen  to  represent  the  FVM.  The  simulated  solutions  for  3 
extreme  cases  are  presented  in  Figure  25,  along  with  the  relevant  parameters.  The 
description for each case is given below: 

(a) High lumped parameter mass transfer coefficient for linear isotherm 

(b) High lumped parameter mass transfer coefficient for highly nonlinear isotherm, 
with saturation constant adjusted to an extremely low level 

(c) Highly nonlinear isotherm with a higher saturation constant than (b) 

51 
CN4118R Final Report

The  solutions  obtained  via  FDM  have  proved  to  be  untenable  in  each  of  these  three 
cases  whereas  FVM  could  provide  smooth  solutions.  Although  it  is  complicated  to 
validate these solutions analytically, those obtained via FDM were wholly impossible in 
the physical sense (i.e. gas phase concentration higher than feed concentration). 

  In  all  three  cases  investigated  above,  the  oscillations  were  sustained  until 
breakthrough. This is due to the concentration front being steep for the entire duration. 
In  the  event  where  the  front  will  disperse  to  a  gentle  slope,  the  FDM  can  produce 
oscillation as well during the earliest period of simulation when the front is still steep. 
Therefore,  even  if  the  final  breakthrough  solution  looks  smooth,  it  may  be  inaccurate 
due to the oscillations which had occurred earlier. This is illustrated in Figure 26, where 
snapshots  of  the  concentration  front  were  taken  at  different  times  using  (a)  FDM  and 
(b) van Leer schemes. 

9.4 Computation time taken 

9.4.1 Equivalent number of grids 

  Three plots for each value of k are presented here:  

(a) times clocked by ode45 

(b)  number of times odefun was called  

(c) the fraction of time clocked by odefun against ode45 

The last plot would give an indication of how the behavior of FVM schemes changed as k 
increases (or as the wave front become steeper). Figure 27, Figure 28 and Figure 29 are 
the plots for k = 0.1, 1 and 10 respectively. 

  Figure  27  shows  that  when  the  wave  front  is  gentle,  the  two  methods  behave 
similarly  with  FVM  clocking  in  longer  times  than  FDM  in  general.  Instability  for  the 
Superbee  scheme  occurred  within  the  range  of  grid  sizes  investigated  (Figure  27(b)), 
which is indicated by a spike in the number of times odefun was called at around 900 
grids. 

  In  Figure  28,  the  differences  begin  to  become  more  obvious,  with  longer  times 
clocked by FVM mainly due to instability at large grid sizes. However, the behaviors of 
the different schemes remained similar (Figure 28(c)).   

52
CN4118R Final Report 

0.015

0.01
van Leer
yA

FDM
0.005

0
0 20 40 60 80 100 120

Position in column, z (cm)
 
(a) k = 100; b = 2.5e‐4; ∆z = 1 
0.015

0.01

van Leer
FDM
0.005

0
0 20 40 60 80 100 120
 
(b) k = 100; b = 1e9; qs = 1e‐9; ∆z = 1 
0.025

0.02

0.015
van Leer

0.01 FDM

0.005

0
0 20 40 60 80 100 120
 
(c) k = 1; b = 1e9; qs = 1e‐6; ∆z = 1 
Figure 25 Simulated solutions for extreme cases

53 
CN4118R Final Report

0.01

0.005
yA

0
0 20 40 60 80 100 120

Position in column, z (cm)
 
(a) FDM 
0.01

0.005
yA

0
0 20 40 60 80 100 120

Position in column, z (cm)
 
(b) van Leer 
Figure 26 Comparison between snapshots of FDM and van Leer schemes 
   

54
CN4118R Final Report 

40
FDM
Time clocked by ode45 (s)
van Leer
30
MC
Superbee
20

10

0
0 200 400 600 800 1000

Number of grids
 
(a) Times clocked by ode45 against number of grids 
32000
Number of times odefun was 

31500
called

31000

30500

30000
0 200 400 600 800 1000

Number of grids
 
(b) Number of times odefun was called against number of grids 
0.88
Times clocked by odefun over 
ode45

0.8

0.72
0 200 400 600 800 1000

Number of grids
 
(c) Times clocked by odefun over ode45 
Figure 27 Computational time plots for k = 0.1

55 
CN4118R Final Report

80
Time clocked by ode45 (s)
60
FDM
van Leer
40
MC
Superbee
20

0
0 200 400 600 800 1000

Number of grids
 
(a) Times clocked by ode45 against number of grids 
50000
Number of times odefun was 
called

40000

30000
0 200 400 600 800 1000

Number of grids
 
(b) Number of times odefun was called against number of grids 
0.88
Times clocked by odefun over 
ode45

0.8

0.72
0 200 400 600 800 1000

Number of grids
 
(c) Times clocked by odefun over ode45 
Figure 28 Computational time plots for k = 1

56
CN4118R Final Report 

1000
Time clocked by ode45 (s) FDM
van Leer
MC
Superbee
500

0
0 200 400 600 800 1000

Number of grids
 
(a) Times clocked by ode45 against number of grids 
210000
Number of times odefun was 

190000
called

170000

150000
0 200 400 600 800 1000

Number of grids
 
(b) Number of times odefun was called against number of grids 
0.88
Times clocked by odefun over 
ode45

0.8

0.72
0 200 400 600 800 1000

Number of grids
 
(c) Times clocked by odefun over ode45 
Figure 29 Computational time plots for k = 10

57 
CN4118R Final Report

  The largest difference in times clocked is observed when the wave front is steep 
(Figure 29). The times clocked for FVM schemes increased exponentially while that for 
FDM  increased  almost  linearly.  There  is  a  marked  difference  in  the  number  of  times 
odefun was called by the FVM schemes right from the lowest number of grids. This is to 
be  expected  as  ode45  have  to  use  smaller  time  steps  for  the  steep  front  to  propagate 
properly. This is not necessary for FDM as the oscillations smoothen the front and allow 
larger  time  steps  to  be  used.  Also,  the  behaviors  of  FVM  schemes  deviated  from  FDM 
(Figure 29(c)). With large number of grids, a higher proportion of time was spent in the 
other functions apart from odefun. This is an indication that the solver is spending more 
time optimizing the time step instead of doing the actual computing in odefun. 

9.4.2 Equivalent error 

  The figures are obtained by matching the log‐log plots of errors against grid size 
with the times clocked at each particular grid size. Figure 30 summarizes the findings. 

  It is obvious that FVM schemes are less efficient than FDM for k = 0.01. However, 
the  deficiency  is  not  significant  in  terms  of  absolute  amount  of  time  taken.  It  is  put 
forward here that the discrepancies are entirely due to the additional codes required by 
the  delimiter  functions,  which  would  not  contribute  to  improved  accuracy  since  the 
wave front is gentle. On the whole, FVM schemes are about 25% less efficient than FDM. 

  As k increases, the advantages of FVM become prominent. At k = 1, all schemes 
already have comparable computation efficiencies (FVM has ~10% improvement over 
FDM over mid‐range accuracy). At high accuracy, FVM schemes (with the exception of 
Superbee) become significantly more efficient (~30‐50% for 3 data points) than FDM. 
The Superbee scheme displayed spikes in computation time at high accuracies in Figure 
30(a) and (b).  

  When the wave front is very steep (i.e. k = 10), FVM schemes are definitely more 
efficient  than  FDM,  with  Superbee  being  the  most  efficient  (up  to  55%  improvement 
over  FDM).  The  spikes  seen  in  (a)  and  (b)  did  not  appear  in  (c)  for  the  range 
investigated.  At  the  highest  accuracy  investigated,  van  Leer  scheme  become  less 
efficient than FDM, although the other two schemes remained much more efficient than 
FDM. 

58
CN4118R Final Report 

20
FDM
k = 0.1 van Leer
Computation time (s)

MC
Superbee
10

0
‐0.5 0 0.5 1 1.5 2 2.5

log(L­error)
 
(a) 
50
Computation time (s)

k = 1

25

0
‐0.5 0 0.5 1 1.5 2 2.5

log(L­error)
 
(b) 
180
Computation time (s)

k = 10

90

0
0.2 0.7 1.2 1.7 2.2

log(L­error)
 
(c) 
Figure 30 Computation time by equivalent error produced 

59 
CN4118R Final Report

10. Improvements 

  The  numerical  experiments  conducted  in  this  project  were  limited  in  its  scope. 
There are a few directions in which this investigation can proceed. 

  First,  a  different  ODE  solver  can  be  used  in  MATLAB.  MATLAB  provide  several 
ODE  solvers  for  different  problem  types  (stiff  or  non‐stiff).  One  of  them,  ode15s,  can 
solve stiff problems faster than ode45 at reasonable order of accuracy. Ideally, an ODE 
solver should be written specially for the FVM such that the time step size can be used 
in  defining  the  time  derivative  (see  section  6.1).  This  would  allow  a  more  accurate 
representation  of  the  algorithm  and  may  reduce  the  minimum  grid  size  where 
numerical  instability  occurs.  It  would  also  allow  fractional  step  methods  to  be 
implemented for the source terms. Admittedly, writing a robust ODE solver in MATLAB 
can  be  a  monumental  task  (ode45  consist  of  400  over  lines  of  codes  while  ode15s  has 
900). 

  Second,  this  project  limits  itself  to  fundamental  numerical  methods,  explicit 
schemes  and  fixed  grids,  in  solving  the  problems.  Advance  methods  such  as  using 
adaptive  grids  may  be  useful  in  adsorption  problems  where  sharp  fronts  occur, 
providing  both  accuracy  and  efficiency  [27].  The  implicit  Crank‐Nicolson  method  is 
commonly used to solve diffusion problems while a fractional step implicit method can 
be  applied  to  convection‐diffusion‐reaction  problems  [49].  These  methods  are  left 
unexplored in this project. 

  Third, the trends observed for computational time taken only consider k as the 
independent variable. There are a multitude of parameters in the governing equations 
and can all have an effect on the efficiency of the codes. A truly thorough and definitive 
assertion that FVM is more efficient than FDM in the adsorption problem must take all 
parameters into account. 

  Lastly, the non‐isothermal codes implemented in the GUI were not validated with 
experimental data. The solutions obtained via those codes, though not presented here, 
are  identical  to  the  isothermal  ones  by  configuring  parameters  to  simulate  isothermal 
conditions. However this only validates a portion of the codes. Experimental data with 
small fluctuations in temperature is required to validate the entire algorithm. 

60
CN4118R Final Report 

PART IV: DEVELOPMENT OF GUI 

11. GUI 

  The graphic user interface was created using MATLAB GUI design environment 
(GUIDE). GUIDE allows the programmer to create applications which can be distributed 
royalty‐free  with  the  MATLAB  compiler  runtime  (MCR).  The  package  can  be  installed 
and the application will work on computers without a copy of MATLAB. Thus far, only 
computers running on Microsoft Windows OS are verified to be able to run the package 
successfully. 

  Apart from using GUIDE, an alternative method to creating a GUI was explored. 
MATLAB  Builder  NE  allows  the  programmer  to  deploy  .NET  components  written  as 
functions  in  MATLAB.  These  components  can  then  be  used  in  more  advance 
programming  languages  such  as  Microsoft  Visual  Basic  or  C#.  However,  interfacing 
between MATLAB and Visual Basic had been unsuccessful and the remedy sought from 
the online MATLAB community was very tedious. Nonetheless, this method could be re‐
explored  if  and  when  MATLAB  develops  a  more  robust  interface  process  in  future 
releases. 

  The  motivation  behind  the  creation  of  this  GUI  is  to  assist  in  the  teaching  of 
fundamentals in adsorption. As such, accurate depiction of parameter changes is more 
important  than  producing  highly  accurate  simulation  results.  The  application  should 
also  be  able  to  project  visual  information  directly  using  data  obtained  from  the 
simulation.  As  of  the  time  of  writing,  the  application  allows  the  user  to  formulate  an 
adsorber using equations (25) to (28) and (11), with the following capabilities: 

 save and load multiple txt files containing parametric information 

 select and export gas phase concentration, velocity, temperature and solid phase 
loading data to .txt or .xls format 

 plot  all  aforementioned  variables  dynamically  during  simulation  as  column 


interior data 

 plot  all  aforementioned  variables  (excluding  solid  phase  loading)  at  the  end  of 
simulation as breakthrough data 

 speed control during dynamic plotting 

61 
CN4118R Final Report

12. Algorithm Specific to Non­isothermal Equations 

  The  simulator  would  be  using  the  FVM  van  Leer  scheme.  Boundary  conditions 
for  non‐isothermal  equations  (29)  and  (30)  are  used  to  define  values  at  the  left  and 
right interfaces respectively. 

For gas phase concentration:  

ΔZyA 2yA
yA , yA yA0  
ΔZ 2

For gas and solid phase temperature:  

T T 4 π5 ΔZ
T ,  
2 π4 2 T T

For interstitial gas velocity:  1   

For corresponding outflow boundaries: yA yA  , T T  , Tw Tw  

π5
is the equivalent Peclet number for T. 
π4 T T

Ta 1 is  one  of  the  simplifying  assumptions  made.  It  is  valid  when  the  operating 
temperature  is  near  ambient  temperature,  or  the  ambient  temperature  is  made  to  be 
the  same  as  the  operating  temperature.  Only CT   or  g  is  allowed  to  change  with 
temperature while all other parameters, which should be functions of temperature, are 
assumed to be temperature‐independent. 

62
CN4118R Final Report 

PART V: CONCLUSION 

  The results have substantiated conventional wisdom about the advantages that 
FVM provide over FDM. FVM is superior in both accuracy and efficiency when there is a 
sharp  discontinuity.  FVM  also  ensure  mass  balance  robustly,  regardless  of  the 
parameters.  On  the  other  hand,  FDM  remains  more  efficient at  handling  smooth  wave 
fronts  whereas  in  such  cases,  the  computational  overheads  incurred  by  the  more 
complicated FVM codes are not utilized effectively. FDM’s simplicity in formulation can 
also allow a novice programmer to pick up the method quickly. 

  Several  FVM  schemes  were  investigated.  The  Superbee  scheme  is  the  most 
suitable  if  the  sharp  discontinuity  persists  throughout  the  entire  simulation.  Van  Leer 
and MC schemes are similar to one another and are more useful for general cases. Many 
advance schemes may be more useful to the adsorption problem [26], although it may 
be impractical to implement them as an individual effort. 

  The  limitation  of  the  MATLAB  ODE  solver  is  acknowledged  but  it  must  be 
emphasized  that  the  numerical  experiments  were  designed  to  glimpse  at  the  general 
trends and not to quantify the results definitively. Other improvements to the numerical 
experiments were also discussed. 

Acknowledgment 

The author would like to thank Professor Shamsuzzaman Farooq, mentor to this project, 
for  his  patience  and  guidance,  without  which  so  much  could  not  have  been  learnt  in 
such little time.   

63 
CN4118R Final Report

Notations and Abbreviations 

CFD  Computational Fluid Dynamics
CMS  Carbon Molecular Sieve
FDM  Finite Difference Method
FEM  Finite Element Method
FVM  Finite Volume Method
MEA  Mono‐ethanolamine 
PSA  Pressure Swing Adsorption
SMB  Simulated Moving Bed
TSA  Thermal Swing Adsorption
VSA  Vacuum Swing Adsorption
b, b0   Langmuir constant and Arrhenius parameter
Co  Courant number 
C, CT   Gas phase concentration and total concentration
Cpg , Cps , Cpa Heat capacities of gas, solid and adsorbed phases 
Dcol  Column diameter 
DL  Longitudinal dispersion coefficient
dp  Particle size 
∆H  Gibbs free energy for adsorption
hi , ho   Inner and outer convective heat transfer coefficient
K  Henry’s constant for Langmuir isotherm
Kw Wall conductive heat transfer coefficient
Kz Longitudinal conductive heat transfer coefficient
k  Lumped parameter mass transfer coefficient
ka , kd   Rate constant of adsorption and desorption
N  Number of cells or amount of species
Pe  Peclet number 
P  Pressure 
q, qs , q   Amount adsorbed, maximum capacity and equivalent amount adsorbed 
R  Molar gas constant 
r  Argument for delimiter functions (see section 5.4.4)
ri , ro   Inner and outer radii of column
S  Column cross‐sectional area
T, T , T   Gas/solid phase, wall and ambient temperatures
u  Interstitial velocity 
   
Greek letters  Subscripts 
  Bed voidage  0 Initial condition 
,
g s   Density of gas and solid phases  A  Component A 
  Fraction of occupied sites I Inert gas carrier 
,Φ Arbitrary quantity  i Grid cell i
, Κ  Arbitrary coefficient  L, l Left boundary and left interface
,   See section 5.2.2  R, r Right boundary and right interface
See section 5.2.3  z Longitudinal direction 
π1  to π8   See section 5.2.3 
,   See section 5.5.2  Superscripts 
See section 12 n Time step n
   
Dimensionless quantities (Variables accented with bars are not listed here) 
τ Time 
xi Amount adsorbed 
yi   Gas phase concentration 

64
CN4118R Final Report 

References 

1.  Baron,  G.V.,  Pressure  Swing  Adsorption:  Latest  Developments,  Economic  Aspects 
and  Modelling,  in  Gas  Separation  Technology,  E.F.  Vansant  and  R.  Dewolfs, 
Editors. 1990, Elsevier Science Publishers B.V.: Amsterdam. p. 137 ‐ 148. 
2.  Humphrey,  J.L.  and  G.E.  Keller,  Separation Process Technology.  1997,  New  York: 
McGraw‐Hill. 
3.  Colls, J., Air Pollution. 2002, London: Spon Press. 
4.  Steinigeweg, S. and J. Gmehling, Distillation, in Green Separation Processes, C.A.M. 
Afonso and J.G. Crespo, Editors. 2005, Wiley‐VCH: Weinheim. p. 127‐154. 
5.  Castle,  W.F.,  Air  separation  and  liquefaction:  recent  developments  and  prospects 
for  the  beginning  of  the  new  millennium.  International  Journal  of  Refrigeration, 
2002. 25: p. 158‐172. 
6.  Geankoplis,  C.J.,  Transport  processes  and  separation  process  principles.  4th  ed. 
2003, New Jersey: Prentice Hall. 
7.  Kim,  S.,  H.‐T.  Kim,  and  B.‐C.  Choi,  Optimization  of  CO2  Absorption  Process  with 
MEA Solution. Studies in Surface Science and Catalysis, 2004. 153: p. 429‐434. 
8.  Cousins, A., L.T. Wardhaugh, and P.H.M. Feron, Analysis of combined process flow 
sheet modifications for energy efficient CO2 capture from flue gases using chemical 
absorption. Energy Procedia, 2011. 4: p. 1331‐1338. 
9.  Yu, Y.S., et al., An innovative process for simultaneous removal of CO2 and SO2 from 
flue  gas  of  a  power  plant  by  energy  integration.  Energy  Conversion  and 
Management, 2009. 50: p. 2885‐2892. 
10.  Ohashi,  Y.,  T.  Ogawa,  and  N.  Egami,  Development  of  Carbon  Dioxide  Removal 
System from the Flue Gas of Coal Fired Power Plant.  Energy  Procedia,  2011.  4:  p. 
29‐34. 
11.  Kemper,  J.,  G.  Ewert,  and  M.  Grünewald,  Absorption  and  regeneration 
performance  of  novel  reactive  amine  solvents  for  post­combustion  CO2  capture. 
Energy Procedia, 2011. 4: p. 232‐239. 
12.  Nunes, S.P. and K.‐V. Peinemann, Membrane Technology in the Chemical Industry. 
2006, Weinheim: Wiley‐VCH. 
13.  Yampolski, Y., I. Pinnau, and B. Freeman, eds. Materials Science of Membranes for 
Gas and Vapor Separation. 2006, Wiley: New Jersey. 
14.  Stookey, D.J., Gas­separation Membrane Applications, in Membrane Technology: in 
the Chemical Industry, S.P. Nunes and K.‐V. Peinemann, Editors. 2006, Wiley‐VCH: 
Weinheim. 
15.  Yang,  R.T.,  Gas  Separation  by  Adsorption  Processes.  1987,  Boston:  Butterworth 
Publishers. 
16.  Tien,  C.,  Adsorption  Calculations  and  Modeling.  1994,  Boston:  Butterworth‐
Heinemann. 
17.  Wankat, P.C., Separation Process Engineering. 2nd ed. 2007, Upper Saddle River, 
NJ: Prentice Hall. 
18.  Gray,  P.G.  and  D.D.  Do,  Multicomponent Sorption Phenomena of SO2 and CO2 on 
Activated  Carbon,  in  Gas  Separation  Technology,  E.F.  Vansant  and  R.  Dewolfs, 
Editors. 1990, Elsevier Science Publishers B.V.: Amsterdam. p. 223 ‐ 230. 
19.  Chaffee,  A.L.,  et  al.,  CO2  capture  by  adsorption  ­  Materials  and  process 
development. International Journal of Greenhouse Gas Control, 2007. 1: p. 11‐18. 
20.  Fulker, R.D., Adsorption, in Processes for Air Pollution Control, G. Nonhebel, Editor. 
1972, CRC Press: Boca Raton, FL. 

65 
CN4118R Final Report

21.  Basmadjian,  D.,  The  Little  Adsorption  Book:  A  Practical  Guide  for  Engineers  and 
Scientists. 1997, Boca Raton, FL: CRC Press. 
22.  Pilarczyk,  E.  and  H.J.  Schröter,  New PSA­Processes with Carbon Molecular Sieves 
for  Recovery  of  Carbon  Dioxide  and Methane,  in  Gas  Separation Technology,  E.F. 
Vansant  and  R.  Dewolfs,  Editors.  1990,  Elsevier  Science  Publishers  B.V.: 
Amsterdam. p. 271 ‐ 280. 
23.  Sjostrom,  S.,  et  al.,  Pilot  test  results  of  post­combustion  CO2  capture  using  solid 
sorbents. Energy Procedia, 2011. 4: p. 1584‐1592. 
24.  Yang,  R.T.,  Adsorbents:  Fundamentals  and  Applications.  2003,  New  Jersey:  John 
Wiley & Sons. 
25.  Liu,  Y.,  et  al.,  Recent  developments  in  novel  sorbents  for  flue  gas  clean  up.  Fuel 
Processing Technology, 2010. 91: p. 1175‐1197. 
26.  Versteeg,  H.K.  and  W.  Malalasekera,  An  introduction  to  computational  fluid 
dynamics: The finite volume method. 1995, Essex: Longman Scientific & Technical. 
27.  Chung,  T.J.,  Computational Fluid Dynamics.  2nd  ed.  2010,  New  York:  Cambridge 
University Press. 
28.  Duduković,  M.P.  and  H.S.  Lamba,  Solution of moving boundary problems for gas–
solid  noncatalitic  reactions  by  orthogonal  collocation.  Chemical  Engineering 
Science, 1978. 33: p. 303 ‐ 314. 
29.  Ebrahimi,  A.A.,  H.A.  Ebrahim,  and  E.  Jamshidi,  Solving  partial  differential 
equations  of  gas­solid  reactions  by  orthogonal  collocation.  Computers  and 
Chemical Engineering, 2008. 32: p. 1746 ‐ 1759. 
30.  Lim, Y.I., J.M. Le‐Lann, and X. Joulia, Accuracy, temporal performance and stability 
comparisons  of  discretization  methods  for  the  numerical  solution  of  Partial 
Differential  Equations  (PDEs)  in  the  presence  of  steep  moving  fronts.  Computers 
and Chemical Engineering, 2001. 25: p. 1483 ‐ 1492. 
31.  Patankar, S., Numerical heat transfer and fluid flow. 2980, New York: Hemisphere 
Publishing. 
32.  Botte,  G.G.,  J.A.  Ritter,  and  R.E.  White,  Comparison of finite difference and control 
volume methods for solving differential equations.  Chemical  Engineering  Science, 
2000. 24: p. 2633 ‐ 2654. 
33.  Vinokur,  M.,  An  Analysis  of  Finite­Difference  and  Finite­Volume  Formulations  of 
Conservation Laws. Journal of Computational Physics, 1989. 81: p. 1 ‐ 52. 
34.  Stynes,  M.,  Finite  volume  methods  for  convection­diffusion  problems.  Journal  of 
Computational and Applied Mathematics, 2995. 63: p. 83 ‐ 90. 
35.  LeVeque,  R.J.,  Finite  volume  methods  for  hyperbolic  problems.  2002,  New  York: 
Cambridge University Press. 
36.  Leonard, B.P., Comparison of truncation error of finite­difference and finite­volume 
formulation of convection terms. Applied Mathematics Modelling, 1994. 18: p. 46 
‐ 50. 
37.  Rouboa, A. and E. Monteiro, Heat transfer in multi­block grid during solidification 
­  Performance  of  Finite  Differences  and  Finite  Volume  methods.  Journal  of 
Materials Processing Technology, 2008. 204: p. 451 ‐ 458. 
38.  Hoffmann,  K.A.  and  S.T.  Chiang,  Finite  Volume  Method,  in  Computational  Fluid 
Dynamics. 2000, Engineering Education System: Wichita. p. 385 ‐ 417. 
39.  Langmuir, I., J. Amer. Chem. Soc, 1918. 40: p. 1361. 
40.  Herrmann‐Geppert, I. and U. Kramm. Gas­sorption measurements.  21st Sep 2010 
[cited  2011  4th  Jun];  Available  from:  http://www.helmholtz‐

66
CN4118R Final Report 

berlin.de/forschung/enma/solare‐brennstoffe/analytische‐
methoden/gassorptionsmessungen_en.html. 
41.  Glueckauf,  E.,  K.H.  Barker,  and  G.P.  Kitt,  Theory  of  chromatography  VIII.  The 
separation  of  lithium  isotopes  by  ion  exchange  and  of  neon  isotopes  by  low­
temperature adsorption columns  Discussion  of  the  Faraday  Society,  1949.  7:  p. 
199 ‐ 213. 
42.  Bischoff, K.B. and O. Levenspiel, Fluid dispersion ­ generalization and comparison 
of  mathematical  models.  Chemical  Engineering  Science,  1962.  17:  p.  245‐255, 
257‐264. 
43.  Warming,  R.F.  and  R.M.  Beam.  Upwind  second­order  difference  schemes  and 
applications  in  unsteady  aerodynamic  flows.  in  Proc.  AIAA  2nd  Computational 
Fluid Dynamics Conf. 1975. Hartford, Conn. 
44.  Lax,  P.  and  B.  Wendroff,  Systems of conservation laws.  Communications  on  Pure 
and Applied Mathematics, 1960. 13(2): p. 217‐237. 
45.  Crank,  J.  and  P.  Nicolson,  A practical method for numerical evaluation of solution 
of  partial  differential  equations  of  the  heat­conduction  type.  Advances  in 
Computational Mathematics, 1996. 6(1): p. 207‐226. 
46.  Ogata,  A.  and  R.B.  Banks,  A  solution  of  the  differential  equation  of  longitudinal 
dispersion in porous media. US Geological Survey Professional Paper 411‐A, 1961. 
47.  Klinkenberg,  A.,  Numerical evaluation of equations describing transient heat and 
mass transfer in packed solids. Ind. Eng. Chem., 1948. 40(10): p. 1992‐1994. 
48.  MathWorks.  ODE  Solvers.    2011    [cited  2011  6th  Jun];  Available  from: 
http://www.mathworks.com/help/techdoc/math/f1‐662913.html#f1‐753130. 
49.  Tyson,  R.,  L.G.  Stern,  and  R.J.  LeVeque,  Fractional  step  methods  applied  to  a 
chemotaxis model. Journal of Mathematical Biology, 2000. 41: p. 455‐475. 
 
 

67 

You might also like