/Bessel-Function

>> This repository contains codes for plotting and visualizing Bessel functions and its applications -

Primary LanguageJupyter Notebook

Bessel-Function

  • This repository contains codes for plotting and visualizing Bessel functions and its applications -

Several second order ODEs of the form π’š β€²β€² + 𝒑(𝒙)π’š β€² + 𝒒(𝒙)π’š = 𝒓(𝒙) are of practical importance have Power series solution image

if coefficients p(x), q(x) and r(x) are functions instead of constant coefficients. Further, if they must have valid Taylor series expansion about point π‘₯0, means they must be continuously differentiable about that point i.e. they are analytical at that point. If the coefficients p(x), q(x), r(x) are not analytical at point π‘₯0 but if we still require a power series solution at that point, in order to exploit the larger radius of convergence, we use Frobenius method. Frobenius methods masks the point of singularity, thereby creating feasible solution at which the power series method fails. Such points are called regular singular points. Consider an example ODE:

image

In above example problem p(π‘₯) and q(π‘₯) are undefined at π‘₯ = 0 but we can still apply frobenius method if π‘₯0 is regular singular point of ODE. The solution according to Frobenius is by image

π‘₯0 is the regular singular point of image

if (π‘₯ βˆ’ π‘₯0 )𝑝(π‘₯) and (π‘₯ βˆ’ π‘₯0 ) 2π‘ž(π‘₯) exist and has valid Taylor expansion about π‘₯0. The exponent r (may be real or complex) number should be chosen such that π‘Ž0 β‰  0. Now, there exists a class of 2 nd order, linear ODEs with variable coefficients of the form:

image

The Bessel function of the first kind of mth order is given by:

J_m(x) = image

image

The behaviour of the Bessel functions of first kind π½π‘š of order β€˜m’ are shown below:

image

The behaviour of the Bessel functions of second kind π‘Œπ‘š of order β€˜m’ are shown below:

image

A general solution of Bessel’s function for the Bessel ODE is given by 𝑦(π‘₯) = 𝐢1𝐽_π‘š + 𝐢2π‘Œ_m

APPLICATION 1: CYLINDER WITH ENERGY GENERATION

A long solid cylinder of radius ro is initially at uniform temperature Ti. Electricity is suddenly passed through the cylinder resulting in volumetric heat generation rate of qm. The cylinder is cooled by convection at its surface. The heat transfer coefficient is considered as h and the ambient temperature is considered as T∞. The objective is to determine the transient temperature of the cylinder.

image

Assumptions:

  1. One dimensional conduction.
  2. Uniform h and T∞.
  3. Constant conductivity.
  4. Constant diffusivity.
  5. Negligible end effect.

Governing Equations: To make the convection boundary condition homogeneous, we introduce the following temperature variable θ (r,t) = T(r,t) - T∞.

Based on the above assumptions, gives image

Boundary and initial conditions: image

Solution: Since the differential equation s non-homogeneous, we assume a solution of the form πœƒ(π‘Ÿ,𝑑) = πœ‘(π‘Ÿ,𝑑) + βˆ…(π‘Ÿ) (a)

Note that Ξ¨(r-t) depends on two variables while Ο•(r) depends on one variable. Substituting (a) into eq. (A)

image (b)

The next step is to split (b) into two equations, one for Ξ¨(r-t) and the other for Ο•(r). Let..

image (c) image (d)

To solve equations (c) and (d) we need two boundary conditions for each and an initial condition for (c). Substituting (a) into boundary condition (1)

image

image

image

Similarly, condition (2) gives

image

image

Now, the initial condition gives πœ‘(π‘Ÿ, 0) = (𝑇𝑖 βˆ’ π‘‡βˆž) βˆ’ βˆ…(π‘Ÿ) (c-3)

Integrating (d) gives βˆ…(π‘Ÿ) = βˆ’(π‘ž_π‘š/4π‘˜)*π‘Ÿ^2 + 𝑐1π‘™π‘›π‘Ÿ + 𝑐2 (e)

Equation (c) is solved by the method of separation of variables. Assume a product solution of the form πœ‘(π‘Ÿ,𝑑) = 𝑅(π‘Ÿ)𝜏(𝑑) (f) Substituting (f) into (c), separating variables, and setting the resulting equation equal to a constant, Β±(Ξ»_k)^2, gives

image

image

ince the r-variable has two homogeneous conditions, the plus sign must be selected in (g). Equations (g) and (h) become

image

image

Solutions to the ODE (i) is given by general Bessel representation and (ii) is exponential decay: 𝑅_π‘˜(π‘Ÿ) = (𝐴_π‘˜)*𝐽0 (πœ†_π‘˜)*r + (𝐡_π‘˜)π‘Œ0(πœ†_π‘˜)*r (k)

and 𝜏_π‘˜(𝑑) = (𝐢_π‘˜)exp(βˆ’π›Όπ‘‘(πœ†_π‘˜)^2) (l)

Application to boundary and initial conditions. Conditions (c-1) and (c-2) give 𝐡_π‘˜ = 0 and Bi𝐽0(πœ†_π‘˜)π‘Ÿ0 = (πœ†_π‘˜)π‘Ÿ0𝐽1*(πœ†_π‘˜)*π‘Ÿ0 (m) Where Bi is the Biot number defined as Bi = hr0 / k. The roots of (m) give the constants Ξ»k. Substituting (k) and (l) into (f) and summing all solutions

image

Application of the non-homogeneous initial condition (c-3) yields

image

The characteristic functions J0 ((Ξ»_k)*r) in equation (p) are solutions to (i). This is a Sturm-Liouville equation that guarantees that there are infinitely many eigen values and the function is orthogonal when the boundary conditions are homogeneous w.r.t. weight function w(r) = r. Multiplying both sides of (p) by J0((Ξ»_k)*r)*r dr, integrating from r =0 to r =r0 and invoking orthogonality gives a_k

image

Substituting (o) into (q), and evaluate the integral gives,

image

Complete Solution: Hence the complete solution, expressed in dimensionless form, is

image