CHEM-E7130 Process Modeling Lecture 6

Slides:



Advertisements
Similar presentations
Numerical Integration
Advertisements

By S Ziaei-Rad Mechanical Engineering Department, IUT.
Section 5.7 Numerical Integration. Approximations for integrals: Riemann Sums, Trapezoidal Rule, Simpson's Rule Riemann Sum: Trapezoidal Rule: Simpson’s.
Today’s class Romberg integration Gauss quadrature Numerical Methods
Estimation A major purpose of statistics is to estimate some characteristics of a population. Take a sample from the population under study and Compute.
MANE 4240 & CIVL 4240 Introduction to Finite Elements Numerical Integration in 1D Prof. Suvranu De.
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW III.
CHAPTER 6 Statistical Analysis of Experimental Data
Maximum likelihood (ML)
Continuous probability distributions
Chapter 9 Numerical Integration Numerical Integration Application: Normal Distributions Copyright © The McGraw-Hill Companies, Inc. Permission required.
Louisiana Tech University Ruston, LA Slide 1 Mass Transport Steven A. Jones BIEN 501 Friday, April 13, 2007.
Quadrature Greg Beckham. Quadrature Numerical Integration Goal is to obtain the integral with as few computations of the integrand as possible.
Econ 482 Lecture 1 I. Administration: Introduction Syllabus Thursday, Jan 16 th, “Lab” class is from 5-6pm in Savery 117 II. Material: Start of Statistical.
Physics 114: Lecture 15 Probability Tests & Linear Fitting Dale E. Gary NJIT Physics Department.
19.5 Numeric Integration and Differentiation
1 CE 530 Molecular Simulation Lecture 7 David A. Kofke Department of Chemical Engineering SUNY Buffalo
Integration. Problem: An experiment has measured the number of particles entering a counter per unit time dN(t)/dt, as a function of time. The problem.
Integrals 5.
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
Simulation of Random Walk How do we investigate this numerically? Choose the step length to be a=1 Use a computer to generate random numbers r i uniformly.
1 Chapter 7 NUMERICAL INTEGRATION. 2 PRELIMINARIES We use numerical integration when the function f(x) may not be integrable in closed form or even in.
1 Statistical Mechanics and Multi- Scale Simulation Methods ChBE Prof. C. Heath Turner Lecture 11 Some materials adapted from Prof. Keith E. Gubbins:
D MANCHE Finding the area under curves:  There are many mathematical applications which require finding the area under a curve.  The area “under”
Wicomico High School Mrs. J. A. Austin AP Calculus 1 AB Third Marking Term.
1.1 - Populations, Samples and Processes Pictorial and Tabular Methods in Descriptive Statistics Measures of Location Measures of Variability.
1 Lesson 8: Basic Monte Carlo integration We begin the 2 nd phase of our course: Study of general mathematics of MC We begin the 2 nd phase of our course:
September 29, 1999 Department of Chemical Engineering University of South Florida Tampa, USA Population Balance Techniques in Chemical Engineering by Richard.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 22.
Quadrature rules 1Michael Sokolov / Numerical Methods for Chemical Engineers / Numerical Quadrature Michael Sokolov ETH Zurich, Institut für Chemie- und.
1 2 nd Pre-Lab Quiz 3 rd Pre-Lab Quiz 4 th Pre-Lab Quiz.
CHAPTER 3 NUMERICAL METHODS
Probability and Distributions. Deterministic vs. Random Processes In deterministic processes, the outcome can be predicted exactly in advance Eg. Force.
Use of Newton-Cotes Formulas and eventual shortcomings Matlab code to increase number of segments with trapezoid, 1/3 and 3/8 rule.
Lecture 8: Measurement Errors 1. Objectives List some sources of measurement errors. Classify measurement errors into systematic and random errors. Study.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
Summarizing Data with Numerical Values Introduction: to summarize a set of numerical data we used three types of groups can be used to give an idea about.
Quadrature – Concepts (numerical integration) Don Allen.
In this chapter, we explore some of the applications of the definite integral by using it to compute areas between curves, volumes of solids, and the work.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 20 Numerical Integration of Functions.
CHEM-E7130 Process Modeling Lecture 5
Numerical Integration Methods
CHAPTER 3 NUMERICAL METHODS
Lesson 8: Basic Monte Carlo integration
Physics 114: Lecture 13 Probability Tests & Linear Fitting
Chapter 7. Classification and Prediction
NUMERICAL DIFFERENTIATION Forward Difference Formula
Lecture 19 – Numerical Integration
Chapter 7 Numerical Differentiation and Integration
NUMERICAL INTEGRATION
Non-linear relationships
Properties of the Normal Distribution
Chapter 22.
Integral as Net Change Chapter 8.1.
NUMERICAL INTEGRATION
MATH 2140 Numerical Methods
Nonlinear regression.
NUMERICAL INTEGRATION
Numerical Computation and Optimization
Numerical Integration Methods
SKTN 2393 Numerical Methods for Nuclear Engineers
Sampling Distributions (§ )
Population Balance Techniques in Chemical Engineering
Lesson 4: Application to transport distributions
The Normal Distribution
MATH 2140 Numerical Methods
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
Numerical Integration
Presentation transcript:

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