CHEM-E7130 Process Modeling Lecture 6
Outline Numerical integration Integral equations and integral functions Distributions and their properties Population balances
Numerical integration In numerical integration, objective is to find a value for a definite integral (integral over a known interval) One-dimensional integration is considered here only. How to evaluate y if a, b, and f(x) is known but cannot be integrated analytically?
Midpoint and trapezoid methods Estimate function value over the interval either by a constant (rectangle rule) or by a trapezoid (linear approximation through the endpoints) Trapezoid Rectangle y=ex
Midpoint and trapezoid Exact value Rectangle 4% relative error Trapezoid 8.2% relative error
Midpoint and trapezoid Simpson’s rule 0.03 % relative error One more function evaluation per interval Each interval is approximated with a quadratic polynomial (higher order method than trapezoid or rectangle)
Newton-Cotes formulas Estimate function by polynomials through points with equal distances from each other Trapezoid and midpoint: first order Newton-Cotes Simpson’s rule: second order N-C 3/8 Simpson: third order N-C Boole’s rule: fourth order N-C etc...
Quadratures Newton-Cotes: quadrature points xi from constant intervals Gauss-Legendre quadratures: quadrature points from zeros of Legendre polynomials. This is typically optimal way of distributing the points where the function is evaluated
Gauss-Legendre quadrature
Gauss-Legendre quadrature
Quadratures In practice, quadratures are applied piece-wise in the interval Division into sub-intervals could be constant or adaptive For a very high number of quadrature points, floating point calculation error starts to dominate X=10100 + 1 What is Y = X – 10100 ?
Integral functions When differential equations are solved, integration is the final step. Sometimes there is no analytical solution to the integral. In those cases the solution is given in terms of integral functions Error function c(0,t)=c0 c(,t)=0 c(x,0)=0 ”diffusion equation”
Integral functions c(0,t)=c0 c(,t)=0 c(x,0)=0 Analytical solution: Also: probability theory (cumulative normal distribution)...
Distributions Often variable values are somehow distributed. In these cases, (numerical) integration is often needed to get some distribution properties Distributed variable number density 1/Length (1/m) Distribution. Often scaled so that the area under the curve = 1 Distributed variable Length (m)
Distributions Standard deviation? Median? Average? Distribution (1/m) Size(m) number 0.001 1 0.002 3 0.003 6 0.004 10 0.005 8 0.006 5 0.007 2 0.008 1 Distribution (1/m) Standard deviation? Particle size (m) Median? Average?
Integral equations Any equation where an integral appears can be called an integral equation. In mathematics, an equation where unknown function is under integral sign is called an integral equation Integral functions are such where unknown is only outside the integral sign
Integral equations, example y Overall sample property f(s) is measured, and we know the sample size distribution y(s,L). Our task is to find a size-dependent function g(L) that models how the distributed property contributes to the sample property L
Integral equations, example Example continues. L indicates athlete’s length and y is probability that there is such an athlete in a team. Find a function g that predicts how well the team succeeds (f). g(L) for a basketball team y(L) contribution function g(L) for a chess team team success athlete length distribution L
Population balances As an example of integral equations Here only particle size distributions are considered Generally any distributions (with one or more distributed variables) can be modeled
What is the population balance concept? Population balance is about counting: 6 in
Compare to molar concentration: Number of per unit is the number density, similar to concentration. mol / m3 = NA molecules in unit volume However, not all particles are similar, they can e.g. vary in their size, forming a size distribution that can be modelled based on breakage, agglomeration, growth etc.
Two kinds of coordinates: external and internal y p1 x p2
Every dispersed phase property that is not assumed constant, adds one dimension Adding one more dimension to your model typically increases the computational load by an order of magnitude. Choose such coordinates (internal and external) which are the most important to overall process performance Here only size is considered as the internal coordinate
Distribution properties Density function f(L) Number density, total number of particles (per unit volume) Moments of the distribution
Mean diameters from moments mi/mi-1 is a characteristic length (if moments are for length coordinate) m1/m0 number average diameter m2/m1 length weighted average diameter m3/m2 area weighted average diameter
Use of size distribution moments: Mass transfer area Size(m) number 0.001 1 0.002 3 0.003 6 0.004 10 0.005 8 0.006 5 0.007 2 0.008 1 Mass transfer area is assumed to be the total surface area of the particles
Mass transfer area where s is a shape factor L32 is the Sauter mean diameter (m3/m2) is the particle phase volume fraction V is the total volume of the dispersion
Other characteristic numbers Standard deviation describes the width of the distribution Also other characteristic numbers can be calculated from the moments: skewness, kurtosis
Example Calculate moments and average diameters for bubble size distribution that follows normal distribution with average size 0.02 m and standard deviation 0.002 m. Use Gauss quadrature.
average size 0.02 m standard deviation 0.002 m
How to scale the quadrature points? Distribution Points and weights (1000) for 6-point quadrature
Sum = 8.84E-10. Not correct. It should be one. xi wi f(xi) f(xi)wi 0.966235 0.08566225 0.830605 0.18038079 0.61931 0.23395697 0.38069 0.169395 0.033765 1.03E-08 8.84E-10 Sum = 8.84E-10. Not correct. It should be one.
Scale the points from 0.013 m to 0.027 m What would be a linear variable transformation L=f(x)?
Scaling This is similar what you have done when non-dimensionalizing models. Here you are actually doing the other way around, as the points were originally non-dimensional (0 to 1), but you transform them into physical sizes
Sum = 0.9935. Almost correct (should be 1). xi wi Li f(Li) f(Li) wi 0.966235 0.08566225 0.026527 0.970432 0.083129 0.830605 0.18038079 0.024628 13.70599 2.472297 0.61931 0.23395697 0.02167 140.7405 32.92721 0.38069 0.01833 0.169395 0.015372 0.033765 0.013473 Sum = 0.9935. Almost correct (should be 1). In practice, use several (adaptive) sub-intervals for numerical integration. Suitable algorithms are available, but a clue about the correct integration limits is usually needed. Matlab: q = integral(fun,xmin,xmax)
Example: Other moments and average diameters
m0 0.993513837 m1 0.019870277 m m2 0.00040156 m2 m3 8.19738E-06 m3 d10=m1/m0 0.02 m d21=m2/m1 0.020209078 m d32=m3/m2 0.020413829 m
Population balances In population balances, the number balance equation is formulated for a fraction of the distribution Material balance in a reactor: Population balance: y y(L) L
Population balance equation ”reaction” i.e. birth and death due to breakage and coalescence Time rate of change Convection where v is velocity (internal + external coordinates) B is birth rate D is death rate What is convection along an internal coordinate (size)?
Solution strategies for population balance equations 1) Lagrangian or Monte Carlo methods - dispersed particles are tracked. Suitable for relatively lean dispersions 2) Method of moments - when only approximate information is needed 3) Analytical solutions - only seldom possible 4) Discretization of the internal coordinate - general but sometimes laborious
Solution strategies for population balance equations 1) Lagrangian or Monte Carlo methods - dispersed particles are tracked. Suitable for relatively lean dispersions 2) Method of moments - when only approximate information is needed 3) Analytical solutions - only seldom possible 4) Discretization of the internal coordinate - general but sometimes laborious
Continuous distribution is discretized for computational purposes
”Easy” problem: initial value ODE Linear terms Nonlinear terms Flow in Birth by breakage Birth by agglomeration Flow out Death by breakage Death by agglomeration Growth Primary nucleation
Discretization tables Construction of these tables is characteristic to the discretization method Breakage Agglomeration Growth These depend only on discretization and chosen daughter size distribution in breakage and should be calculated prior to the simulation
All phenomena occurring in the system are modeled based on particles at discrete classes. For example bubble coalescence: L La Lb
Generally, the size of the bubble resulting from the coalescence does not coincide with any category. In case of equal diameter discretization it never does. There are different methods how to distribute the bubble resulting from the coalescence Distribute the new bubble only in the closest category. Very poor method, even number and volume cannot be conserved simultaneously. L
Distribute the new bubble in two closest categories Distribute the new bubble in two closest categories. A reasonably good method, 2 properties can be conserved, typically number and volume. Perhaps the most popular method nowadays. L How to calculate fractions y1 and y2 that goes to the two neighbouring categories?
Number and volume conserved fraction of the coalesced particle to be distributed into two closest categories number and volume are conserved two closest category sizes
Distribute the new bubble in several categories Distribute the new bubble in several categories. Method order increases as more properties are conserved (e.g. moments) L
Conclusions There are several methods for evaluating definite integrals numerically. The simplest ones are not usually very effective Gaussian quadratures are usually quite good Integral equations are such where unknown function is under integral sign Integral functions are such where an integral needs to be evaluated in order to calculate the function value
Conclusions In population balances, distributions are considered. For example particle size distributions, when all particles are not of the same size Moments are important measures of distribution properties Population balances can be solved e.g. by discretizing the internal coordinate into several size classes, and following number of particles in them