You are on page 1of 78

MATHEMATICAL

TECHNIQUE
DR. EMMANUEL E. OKORO
OPTIMIZATION
• Optimization is an important tool in decision science and in the analysis of
physical systems.

• To make use of this tool, we must first identify some objective, a quantitative
measure of the performance of the system under study.

• This objective could be profit, time, potential energy, or any quantity or


combination of quantities that can be represented by a single number.

• The objective depends on certain characteristics of the system, called variables


or unknowns.

• The process of identifying objective, variables, and constraints for a given


problem is known as modeling.
OPTIMIZATION
• Construction of an appropriate model is the first step—sometimes the most
important step—in the optimization process.

• If the model is too simplistic, it will not give useful insights into the practical
problem. If it is too complex, it may be too difficult to solve.

• Once the model has been formulated, an optimization algorithm can be used to find
its solution, usually with the help of a computer.

• There is no universal optimization algorithm but rather a collection of algorithms,


each of which is tailored to a particular type of optimization problem.

• After an optimization algorithm has been applied to the model, we must be able to
recognize whether it has succeeded in its task of finding a solution.
MATHEMATICAL FORMULATION

• Mathematically speaking, optimization is the minimization or maximization of


a function subject to constraints on its variables.

• We use the following notation:

- x is the vector of variables, also called unknowns or parameters;

- f is the objective function, a (scalar) function of x that we want to maximize or


minimize;

- ci are constraint functions, which are scalar functions of x that define certain
equations and inequalities that the unknown vector x must satisfy.
APPLICATION
• The analytical solutions provide the theoretical bases of pressure transient
analysis technique, and employing analytical solutions is a cost-effective and
readily available way to validate numerical simulators.

• Therefore, emphasis will be placed on constructing the diffusivity equation and


its analytical solutions under corresponding conditions.

• The diffusivity equation is a partial differential equation. The fundamental


components to establish the diffusivity equation include the principle of mass
conservation (a continuity equation), the law of conservation of momentum
(an equation of fluid motion) and an equation of state (EOS).

• For some particular recovery methods, additional equations may be required.


MATHEMATICAL MODEL OF SINGLE-PHASE FLOW - LIQUID

Derivation of the Diffusivity Equation

• The mathematical model, i.e., the diffusivity equation, is derived based on the:

• Continuity equation,

• An equation of fluid motion, and

• An equation of state.
FIGURE 1. ILLUSTRATION OF PARALLELEPIPED ELEMENT
MATHEMATICAL MODEL OF SINGLE-PHASE FLOW - LIQUID
Continuity Equation

(a) Differential method

• The mass balance on the element can be written as;


mass flow rate in − mass flow rate out = mass accumulation rate……………(1)

• The x-direction component of the mass flux, qmi,x, into the element at x is
qmi,x = ρ ux ………………………………………………………(2)

• where ρ is the density of the fluid and ux is velocity in x-direction, respectively.


MATHEMATICAL MODEL OF SINGLE-PHASE FLOW - LIQUID
Continuity Equation

(a) Differential method

• The x-direction component of the mass flux, qmo,x, out of the element at x + Δx
is;
𝜕 𝜌𝑢𝑥
𝑞𝑚𝑜,𝑥 = 𝜌𝑈𝑥 + ∆𝑥 ………………… (3)
𝜕𝑥

• Hence, the difference of mass fluxes in and out of the element in x-direction is;

𝜕 𝜌𝑈𝑥
𝑞𝑚𝑖,𝑥 − 𝑞𝑚𝑜,𝑥 = ∆𝑥 ……………………(4)
𝜕𝑥
MATHEMATICAL MODEL OF SINGLE-PHASE FLOW - LIQUID
Continuity Equation

(a) Differential method

• The difference of mass flow rate in and out of the element in x-direction can be
obtained as;

𝜕 𝜌𝑈𝑥
𝑞𝑚𝑖,𝑥 − 𝑞𝑚𝑜,𝑥 ∆𝑦∆𝑧 = ∆𝑥∆𝑦∆𝑧 ……………………(5)
𝜕𝑥

• where Δy and Δz are the sizes of the element in y direction and z direction,
respectively.

• The y-direction component of the mass flux, qmi,y, into the element at y is (Class
Work!!!)
MATHEMATICAL MODEL OF SINGLE-PHASE FLOW - LIQUID
Continuity Equation

(a) Differential method

qmi,y = ρ uy ………………………………………………………(6)

• The y-direction component of the mass flux, qmo,y, out of the element at y + Δy
is;
𝜕 𝜌𝑢𝑦
𝑞𝑚𝑜,𝑦 = 𝜌𝑈𝑦 + ∆𝑦 ……………………. (7)
𝜕𝑦
• Hence, the difference of mass fluxes into and out of the element in y-direction
is;
𝜕 𝜌𝑈𝑦
𝑞𝑚𝑖,𝑦 − 𝑞𝑚𝑜,𝑦 = ∆𝑦 ……………………(8)
𝜕𝑦
MATHEMATICAL MODEL OF SINGLE-PHASE FLOW - LIQUID
Continuity Equation

(a) Differential method

• The difference of mass flow rate in and out of the element in x-direction can
be obtained as;

𝜕 𝜌𝑈𝑦
𝑞𝑚𝑖,𝑦 − 𝑞𝑚𝑜,𝑦 ∆𝑥∆𝑧 = ∆𝑥∆𝑦∆𝑧 ……………………(9)
𝜕𝑦

• The z-direction component of the mass flux, qmi,z, into the element at z is;

qmi,z = ρ uz ………………………………………………………(10)
MATHEMATICAL MODEL OF SINGLE-PHASE FLOW - LIQUID
Continuity Equation

(a) Differential method

• z-direction component of the mass flux, qmo,z, out of the element at z + Δz is;
𝜕 𝜌𝑢𝑧
𝑞𝑚𝑜,𝑧 = 𝜌𝑈𝑧 + ∆𝑧 ……………………. (11)
𝜕𝑧
• Hence, the difference of mass fluxes into & out of the element in z-direction is;
𝜕 𝜌𝑈𝑧
𝑞𝑚𝑖,𝑧 − 𝑞𝑚𝑜,𝑧 = ∆𝑧 ……………………(12)
𝜕𝑧
• The difference of mass flow rate in and out of the element in z-direction can be
obtained as;
𝜕 𝜌𝑈𝑧
𝑞𝑚𝑖,𝑧 − 𝑞𝑚𝑜,𝑧 ∆𝑥∆𝑦 = ∆𝑥∆𝑦∆𝑧 ……………………(13)
𝜕𝑧
MATHEMATICAL MODEL OF SINGLE-PHASE FLOW - LIQUID
Continuity Equation

(a) Differential method

• Total difference of mass flow rate into and out of the element in x, y, and z directions
is;

𝜕 𝜌𝑈𝑥
𝑞𝑚𝑖,𝑥 − 𝑞𝑚𝑜,𝑥 ∆𝑦∆𝑧 + 𝑞𝑚𝑖,𝑦 − 𝑞𝑚𝑜,𝑦 ∆𝑥∆𝑧 + 𝑞𝑚𝑖,𝑧 − 𝑞𝑚𝑜,𝑧 ∆𝑥∆𝑦 = ൤ +
𝜕𝑥
𝜕 𝜌𝑈𝑦 𝜕 𝜌𝑈𝑧
+ ൨ ∆𝑥∆𝑦∆𝑧 ………………………….(14)
𝜕𝑦 𝜕𝑧

• The pore volume in the element is;

𝑉𝑝 = 𝜑∆𝑥∆𝑦∆𝑧 ……………………..(15)
MATHEMATICAL MODEL OF SINGLE-PHASE FLOW - LIQUID
Continuity Equation

(a) Differential method

• Also, the mass in the element is (relating mass in the element with density);

m = 𝜌𝜑∆𝑥∆𝑦∆𝑧 ……………………..(16)
• Thus, the rate of change in mass with time in the element is given as;
𝑑𝑚 𝜕 𝜌∅
= ∆𝑥∆𝑦∆𝑧 ………………….(17)
𝑑𝑡 𝜕𝑡
• Combining equations (1), (14) and (17), we have;
𝜕 𝜌𝑈𝑥 𝜕 𝜌𝑈𝑦 𝜕 𝜌𝑈𝑧 𝜕 𝜌∅
− + + ∆𝑥∆𝑦∆𝑧 = ∆𝑥∆𝑦∆𝑧 ……………(18)
𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑡
MATHEMATICAL MODEL OF SINGLE-PHASE FLOW - LIQUID
Continuity Equation

(a) Differential method

• By simplifying equation (18), the continuity equation is given as;

𝜕 𝜌𝑈𝑥 𝜕 𝜌𝑈𝑦 𝜕 𝜌𝑈𝑧 𝜕 𝜌∅


+ + = − ……………(19)
𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑡
Or
𝜕 𝜌∅
𝛻 ∙ 𝜌𝑢 = − ………………..(20)
𝜕𝑡

Where 𝛻 is the del operator used for specifying the divergence of the vector u.
MATHEMATICAL MODEL OF SINGLE-PHASE FLOW - LIQUID
Continuum Theories

• Many systems exhibit evolution over time with properties of interest that vary
throughout their spatial domains.

• One way to study the overall population is to attempt to track each individual,
such approaches are sometimes called individual-based models.

• Continuum theories yield evolution equations with respect to properties that


are averaged over small intervals of time and small regions of space.

• In such cases, we implicitly assume a continuum hypothesis which states that


appropriately averaged behaviours of individuals can be generally predicted
from trends in the local population.
MATHEMATICAL MODEL OF SINGLE-PHASE FLOW - LIQUID
Integral Method

• Integration is a method of adding values on a large scale, where we cannot


perform general addition operation.

• But there are multiple methods of integration, which are used in Mathematics
to integrate the functions.

• There are different integration methods that are used to find an integral of
some function, which is easier to evaluate the original integral.
MATHEMATICAL MODEL OF SINGLE-PHASE FLOW - LIQUID

Continuity Equation

(b) Integral Method

• Consider an arbitrary volumetric part of a porous medium, schematically


illustrated in Figure 2.

• Its entire volume is V (a subset in 3D porous medium) with a surface area of S.


FIGURE 2. ARBITRARY ELEMENT IN THREE DIMENSIONAL SPACE
MATHEMATICAL MODEL OF SINGLE-PHASE FLOW - LIQUID
Continuity Equation

(b) Integral Method


• The mass balance on the volume V can be written as;
mass flow rate out = mass loss rate ……………………….(21)
• Take a small element, ds , on the surface. The fluid mass flow rate, qm, out of
the surface element ( ds ) is;
dqm = (ρu • n)ds ……………………….(22)
• where n represents the normal vector of ds and u • n stands for the normal
component of u.
• The total mass flow rate out of the volume V can be obtained by integration
over the entire surface ( S ).
MATHEMATICAL MODEL OF SINGLE-PHASE FLOW - LIQUID
Continuity Equation

(b) Integral Method


𝑞𝑚𝑜 = ∯𝑠 ρu • n 𝑑𝑠……………..(23)

• Take a small volume element, dV anywhere in the volume V. The mass of fluid
in dV will be given as;
dm = ρφdV ……………….(24)

The total volume of the fluid in the volume V, will been estimated by integration
over the entire volume, V.
𝑚 = ∭𝑉 𝜌∅𝑑𝑉 ……………(25)
MATHEMATICAL MODEL OF SINGLE-PHASE FLOW - LIQUID
Continuity Equation

(b) Integral Method


• The rate of mass loss out of the volume, V is;
𝑑𝑚 𝜕 𝜌∅
= −∭𝑉 𝑑𝑉 ………………(26)
𝑑𝑡 𝜕𝑡

• Combining equations (21), (23), and (26);


𝜕 𝜌∅
∯𝑠 ρu • n 𝑑𝑠 = − ∭𝑉
𝜕𝑡
𝑑𝑉 ……………(27)

• From Gauss’s theorem, the left-hand side of equation (27) can be written as;
∯𝑠 ρu • n 𝑑𝑠 = ∭𝑉 𝛻 ∙ 𝜌𝑈 𝑑𝑉 ……………(28)
MATHEMATICAL MODEL OF SINGLE-PHASE FLOW - LIQUID
Continuity Equation

(b) Integral Method


• If we substitute equation (28) into (27), we have;
𝜕 𝜌∅
∭𝑉 𝛻 ∙ 𝜌𝑈 𝑑𝑉 = −∭𝑉
𝜕𝑡
𝑑𝑉 ………………(29)

• Assuming that the integrands are continuous function in the volume, V. As dV


approaches zero, the two integrands in equation (29) must be equal. Thus, the final
form of the continuity equation is given as;
𝜕 𝜌∅
𝛻 ∙ 𝜌𝑈 = − ……………(30)
𝜕𝑡

• Equation (20) and (30) are exactly the same.


CLASS WORK FOR STUDENTS

You might also like