Special Functions

Your Progress in this Chapter

0%

0 / 16 units completed

Chapter Overview

Bessel Functions

Section 4.2 of 523 min5 code examples

Bessel Functions

Bessel functions are a family of solutions to Bessel's differential equation, which appears in many physical problems involving cylindrical or spherical symmetry. They are named after the German mathematician Friedrich Wilhelm Bessel, who first studied them in the early 19th century.

Bessel's Differential Equation

The general form of Bessel's differential equation is:

x2d2ydx2+xdydx+(x2n2)y=0x^2 \frac{d^2y}{dx^2} + x\frac{dy}{dx} + (x^2 - n^2)y = 0

where: math:n is a parameter that determines the order of the Bessel function.

Types of Bessel Functions

# Bessel Functions of the First Kind (J_n(x)) These functions are denoted by (J_n(x)) and are solutions to Bessel's differential equation that are finite at the origin (for non-negative integer orders). They are commonly used in problems involving wave propagation, static potentials and flow in porous media.

Jn(x)=m=0(1)mm!Γ(m+n+1)(x2)2m+nJ_n(x) = \sum_{m = 0}^{\infty} \frac{(-1)^m}{m!\Gamma(m+n+1)}\left(\frac{x}{2}\right)^{2m + n}

Example 1C#

1
2
3
4
5
6
7
8
Code is ready to run
OutputFrom the book
BesselJ-Functions.png

#. Bessel Functions of the Second Kind (Y_n(x)) These functions are denoted by (Y_n(x)), are also solutions to Bessel's differential equation but have a singularity at the origin. They are often used in conjunction with (J_n(x)) to form a complete set of solutions.

Yn(x)=Jn(x)cos(nπ)Jn(x)sin(nπ)Y_n(x) = \frac{J_n(x)\cos(n\pi) - J_{-n}(x)}{\sin(n\pi)}

Example 2C#

1
2
3
4
5
6
7
8
Code is ready to run
OutputFrom the book
BesselY-Functions.png

#. Modified Bessel Functions ( I_n(x) and K_n(x) ): These functions are solutions to the modified Bessel's differential equation, which is obtained by replacing x with ix in the original equation. They are used in problems involving heat conduction and diffusion.

In(x)=m=01m!Γ(m+n+1)(x2)2m+nI_n(x) = \sum_{m = 0}^{\infty} \frac{1}{m!\Gamma(m+n+1)}\left(\frac{x}{2}\right)^{2m + n}

Example 3C#

1
2
3
4
5
6
7
8
Code is ready to run
OutputFrom the book
BesselI-Functions.png
Kn(x)=π2In(x)In(x)sin(nπ)K_n(x) = \frac{\pi}{2}\frac{I_{-n}(x) - I_n(x)}{\sin(n\pi)}

Example 4C#

1
2
3
4
5
6
7
8
Code is ready to run
OutputFrom the book
BesselK-Functions.png

Application of some Special Functions

There are several applications of special functions: from function approximation using chebysheve polynomial, to quadrature using Legendre and Laguerre Polynomials, and solution of laplace equation in cylindrical coordinate using Bessel functions.

Water Influx Estimation

One example of application of special functions in the use of bessel function in the estimation of water influx in cylindrical coordinates. Water influx in an oil reservoir is the migration of water from an aquifer into the pore spaces of the reservoir rock containing oil. This water movement is primarily driven by pressure differences between the aquifer and the reservoir as the oil is produced and reservoir pressure declines. The water influx can provide pressure support, helping to maintain reservoir pressure and sustain oil production. Hence, understanding and accurate estimation of water influx is crucial for optimizing oil recovery strategies and the long-term economic viability of an oil field. For use in material balance computation in edge drive configuration, reservoir engneering books provide plots for Wd as a function of dimensionless radius and time

For Rd \leq 4

For 5 \leq Rd \leq 10

In an edge drive configuration with the aquifer closed at its outer boundary, the governing equation gives:

Pt=1rr(rPr)\cfrac{\partial P}{\partial t} = \cfrac{ 1} { r}\cfrac{\partial}{\partial r}\left(r \cfrac{\partial P} {\partial r} \right)
P(t=0,r)=0,P(t,r=1)=1,Pr(t,r=rD)=0P(t = 0, r) = 0, P(t, r = 1) = 1, \cfrac{\partial P}{\partial r}(t, r = r_D) = 0

The solution in laplace space:

P(s,r)=Φ1I0(rs)+Φ2K0(rs)P(s, r) = \Phi_1 I_0(r\sqrt{ s}) + \Phi_2 K_0(r\sqrt{ s})

Using the boundary conditions to evaluate the constants and substitute them:

P(s,r)=K1(rDs)I0(rs)+I1(rDs)K0(rs)s(K1(rDs)I0(s)+I1(rDs)K0(s))P(s, r) = \cfrac{ K_1(r_D\sqrt{ s}) I_0(r\sqrt{ s}) +I_1(r_D\sqrt{ s}) K_0(r\sqrt{ s})}{ s(K_1(r_D\sqrt{ s}) I_0(\sqrt{ s}) +I_1(r_D\sqrt{ s}) K_0(\sqrt{ s}))}

From Darcy law, we know that the rate of water influx is proportional to the negative rate of change of pressure with respect to radial position at the reservoir aquifer boundary, hence total water influx after a time t is thus:

W(t)=0tDPr(τ,r=1)τW(t) = \int_{ 0}^{ t_D} -\cfrac{\partial P} {\partial r} (\tau, r = 1) \partial \tau

This can be accomplised by performing the integration in laplace space before inverting to time space.

W(t)=L1(1sPr(s,r=1))W(t) = \mathcal{L}^{ -1}\left(\frac{-1} {s} \cfrac{\partial P}{\partial r}(s, r = 1) \right)
W(t)=L1(1ssI1(rDs)K1(s)K1(rDs)I1(s)(I1(rDs)K0(s)+K1(rDs)I0(s)))W(t) = \mathcal{L}^{ -1}\left(\frac{1} { s\sqrt{ s} } \cfrac{ I_1(r_D\sqrt{ s}) K_1(\sqrt{ s}) -K_1(r_D\sqrt{ s}) I_1(\sqrt{ s})} { (I_1(r_D\sqrt{ s}) K_0(\sqrt{ s}) +K_1(r_D\sqrt{ s}) I_0(\sqrt{ s}))} \right)

Lets see how to compute water influx, and generate the started water influx plot as shown above

Example 5C#

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Code is ready to run
OutputFrom the book
Dimensionless-Water-Influx.png

Cooling a Nuclear Fuel Rod

Imagine a long, solid cylindrical fuel rod of radius R. Initially, the rod is at a uniform temperature T_0. At t = 0, the rod is plunged into a cooling bath that keeps the outer surface at exactly 0^\circ C. We want to find the temperature T(r, t) at any radial distance r and any time t.

  • 1.The Governing Equation The heat conduction in the rod(assuming no variation along the length) is governed by:
Tt=α(2Tr2+1rTr)\cfrac{\partial T}{\partial t} = \alpha \left(\cfrac{\partial^2 T}{\partial r^2} + \cfrac{1}{r} \cfrac{\partial T}{\partial r} \right)

Where \alpha is the thermal diffusivity.

  • 2.The Need for Special Functions When we use Separation of Variables by assuming T(r, t) = R(r)\theta(t), the radial part of the equation becomes:
r2R+rR+λ2r2R=0r^2 R'' + r R' + \lambda^2 r^2 R = 0

This is a specific form of Bessel's Differential Equation of order zero. The solution cannot be expressed in terms of elementary functions (like polynomials or logs). Instead, we must use: J_0(x): The Bessel function of the first kind of order zero.

  • 3.The Solution

The general solution for the temperature profile involves an infinite series of these Bessel functions:

T(r,t)=n=1cnJ0(xnrR)eα(xn/R)2tT(r,t) = \sum_{n = 1}^{\infty}c_n J_0\left(\cfrac{x_n r}{R} \right) e^{-\alpha (x_n/R)^2 t}

In this formula: x_n are the roots(zeros) of the Bessel function J_0, c_n are constants determined by the initial temperature T_0 using the Orthogonality Property of Bessel functions.