With increasing complexity of today’s electromagnetic problems, the need and opportunity to reduce domain sizes, memory requirement, computational time and possibility of errors abound for symmetric domains. With several competing computational methods in recent times, methods with little or no iterations are generally preferred as they tend to consume less computer memory resources and time. This paper presents the application of simple and efficient Markov Chain Monte Carlo (MCMC) method to the Laplace’s equation in axisymmetric homogeneous domains. Two cases of axisymmetric homogeneous problems are considered. Simulation results for analytical, finite difference and MCMC solutions are reported. The results obtained from the MCMC method agree with analytical and finite difference solutions. However, the MCMC method has the advantage that its implementation is simple and fast.

Laplace’s Equation Axisymmetric Problem Inhomogeneous Dirichlet Boundary Conditions Markov Chain Monte Carlo (MCMC)
1. Introduction

Most real-world EM problems are difficult to solve using analytical methods and in most cases, analytical solutions are outright intractable . Today, with increasing advancement in computer technologies and with increasing system complexities, the need for continuous development of computational techniques to address contemporary EM problems is as ever, critical. EM problems in nature are essentially three-dimensional (3D) requiring, in most cases, enormous time and computer memory to solve. However, approximations in 1D and 2D are often a smart way of solving 3D problems provided that approximations can be made without loss of accuracy. In axisymmetric systems, the cylindrical coordinate, is essentially independent of, reducing the complexity of the problem to two-dimensional problems in plane of the three-dimensional domain  - . The resulting two-dimensional approximation can be treated like a Cartesian coordinate problem with either z or constant interface.

Several methods such as the Method of Lines , the Finite Element method  , Finite difference method  and the Boundary Integral Equation methods   have all been applied in the modeling and analysis of axisymmetric problems. Since the connection between Brownian motion and the potential theory was established  and the application of probabilistic potential theory to electrical engineering related problems , several Monte Carlo techniques such as fixed random walk, floating random walk and Exodus method   -  have evolved dramatically. However, conventional Monte Carlo techniques are limited in application because they are unsuitable for whole-field computation. They only allow single-point calculations. The shrinking boundary and the inscribed figure methods later proposed for whole-field calculations are not significantly superior to the classical Monte Carlo methods  . To address this gap, Markov Chains for whole-field computations was proposed by Andrey Markov  . The applications of MCMC to rectangular and axisymmetric problems are presented in  .

However, to the best of the authors’ knowledge, the solutions of Laplace’s equation in axisymmetric homogeneous domains with MCMC with inhomogeneous Dirichlet boundary condition are yet to be reported in the literature. Thus, this paper presents the MCMC solution of Laplace’s equation in axisymmetric homogeneous region.

2. Axisymmetric Problem Formulation

When it is necessary and convenient, electromagnetic problems in cylindrical coordinates may be approximated to axisymmetric solution region. Suppose a cylindrical coordinate system is as shown in Figure 1. It is immediately clear that the corresponding axisymmetric approximation in meshed region is as shown in Figure 2. The voltages, and imposed in Figure 1 satisfy the Dirichlet boundary condition, justifying axisymmetric approximation shown in Figure 2.

The Laplace’s equation in the axisymmetric region R depicted in Figure 2 is given as

The corresponding finite difference equivalence of Equation (1) for region using square grid is given as

Cylindrical geometry Axisymmetric Solution Region

The transition probabilities in the Equation (2) are given as 

;;

Similarly, the finite difference equivalence of Equation (1) for region is given as 

The corresponding transition probabilities in the Equation (3) are given as 

;;

3. Absorbing Markov Chain

A Markov chain is a mathematical model that represents a sequence of random variables, such that the probability distribution of depends on the probability distribution of   . The process has a memoryless property—remembering only the most recent past. This paper considers discrete-state, discrete-time Markov chains where the Markov chain represents the random walk and the states represent the grid nodes. The transition probability is the probability that a randomly walking particle starting at node i will move to node j. The is expressed as

The transition probability P is defined as

; (5)

The sum of each row elements in P matrix is 1. This shows that the matrix P is stochastic as described in Equation (5).

The size of the transition matrix P is, where

From the Equation (6), are the free (non-absorbing) nodes which represent the nodes in the solution region excluding those on the boundary., on the other hand, are fixed (absorbing) nodes which are nodes on the boundary.

The transition matrix P in which absorbing nodes and the non-absorbing nodes are numbered first and last respectively is given by 

where

R is a matrix which describes the probabilities of moving from free nodes to fixed ones;

Q is a matrix which describes the probabilities of moving from one fixed node to another;

I is a identity matrix which describes the transitions between fixed nodes (and);

0 is a null matrix which shows that no transitions exist from fixed to free nodes.

To solve Laplace’s equation in the region R, the elements of matrix Q for nodes in the region are obtained from the Equation (2) as

Equation (8) describes the probabilities of moving from one node to another in the region.

Similarly, the elements of matrix Q for nodes at the line of symmetry, , are obtained from the Equation (3) as

The same Equation (8) and Equation (9) apply to except that j is a fixed node.

For any absorbing Markov chains, the fundamental matrix, describes the average number of times the randomly walking particles originating from node i passes through the node j before being absorbed. The fundamental matrix N with size is given as

The absorption probability matrix B which describes the probabilities that a randomly walking particle starting at free node i will be absorbed at a fixed node j is given as

The size of matrix B is. The matrix B is stochastic and it is given as

where with size and with size are free and fixed (prescribed) nodes potentials respectively.

Finally, the potential at any free node i is given as

where are the prescribed potentials,.

4. Simulation Results

In this section, simulation results are presented for the two cases of homogeneous axisymmetric problems considered. The inhomogeneous Dirichlet boundary condition with different levels of complexity was enforced for the two cases presented. At the line of symmetry, the Neumann boundary condition was imposed. Simulation results are reported for both cases.

Case I: Axisymmetric homogeneous Problem with Inhomogeneous Dirichlet Boundary Condition

Meshed Solution Region for Case I

Suppose the axisymmetric cylinder given in Figure 3 has its ends at

and grounded respectively. The boundary condition imposed at is given as :

In order to demonstrate the effectiveness of the MCMC method for axisymmetric homogeneous problems, the following simulation is carried out. The parameters used for the simulations are given in Table 1. Simulation is performed on MATLAB. With the length of the cylinder, and radius, given as dimensions of the axisymmetric region R, the solution region is discretized into grids using a step size of 0.025 m. This gives 3160 grid points excluding the nodes on the boundary. The inhomogeneous Dirichlet boundary condition imposed at is given in Equation (15). Other step sizes used are 0.05 m, 0.1 m and 0.2 m giving 780, 190 and 45 grid points respectively.

From the given parameters, the elements of matrix Q with the size 3160 × 3160 are formed based on the Equation (8) and Equation (9). Similarly, the elements of matrix R with size 3160 × 159 are formed from the Equation (8) and Equation (9) except that j is a fixed node. Then the identity matrix I with size 3160 × 3160 is determined.

Based on the foregoing, the fundamental matrix N with size 3160 × 3160 and the absorption matrix B with size are determined. Finally, the free node potentials are then determined from. The prescribed potential, has a size 159 × 1 and it is determined from the nodes on the boundary of the solution region. The simulation results from MCMC method are validated with the analytical solution given in :

Parameters for homogeneous axisymmetric problems
ParameterValue
V0100 V
a1 m
L2 m

where

is a modified Bessel function of the order zero.

A solution to the present problem is also obtained with the finite difference method and comparison was made with the MCMC and analytical solutions. Simulation results are presented in Figure 4. The results for the potential distributions along (middle of the grid nodes), , and are presented in Figures 4(a)-(c). At, the potential distribution at the line of symmetry is reported. Also, the potential distribution along as well as the surface and contour plots for all the grid nodes are reported in Figures 4(d)-(f). The MCMC simulations were repeated with step sizes of, and respectively and the results reported as shown in Figure 4. The smaller the step size, the closer the results are to the exact solution. In Table 2, the MCMC, analytical and finite difference solutions for some selected grid points are compared. As evident, the MCMC solutions agree well with the results obtained with the analytical solution and the finite difference method (FDM). The computation time for MCMC and FDM for this problem is respectively 2.1717 seconds and 1.0486 seconds. Hence, the computation time cannot be used as a basis for comparison.

Case II: Axisymmetric Homogeneous Problem with Inhomogeneous Dirichlet Boundary Condition.

In this section, another case of Laplace’s equation with inhomogeneous Dirichlet boundary conditions is presented. Suppose the cylinder given in Figure 5 has its ends grounded and given as 100 V respectively. The boundary at is described as in the Equation (15) where voltage is 100 V. The Neumann boundary condition is imposed at. Since the Laplace’s equation is a linear homogeneous equation, the problem in Figure 5 is simplified into Figure 5(a) and Figure 5(b). An analytical solution to the solution Region I is given as :

Coordinate ()Analytical (V)FDM (V) Iteration = 1000FDM (V) Iteration = 4000MCMC (V) MCMC (V)
(0.25, 0.3)10.838110.842710.838710.734610.8394
(0.35, 1.5)17.673717.683817.675617.385017.6765
(0.5, 1.05)27.934627.971327.943127.270127.9441
(0.6, 1.6)16.261416.264216.261616.083716.2621
(0.8, 0.6)26.389126.398326.396026.291626.3963

where a and L are given in Table 1. are the roots of; and are Bessel functions of the first kind, order zero and one, respectively.

Similarly, recall that the analytical solution for region II depicted in Figure 5(b) is already provided in the Equation (16). Since the Laplace’s equation can be linearized, the analytical solution to the problem depicted in Figure 5 is given

(a) Meshed Solution Region for Case II; (b) Solution Region I; (c) Solution Region II.

as:

where

is a modified Bessel function of the order zero.

With the step size of 0.025 m, the MCMC results are reported in the Figure 6. The potential distributions along, (symmetry line) and are given in the Figures 6(a)-(c). Similarly, the potential distribution along, the surface plot and the contour plot for all the grid nodes are reported in the Figures 6(d)-(f) respectively. The results for selected grid points for MCMC and FDM using step size of 0.025 m agree perfectly with the analytical solution as shown in the Table 3. Computation time for MCMC and FDM for the problem is 1.8602 seconds and 0.8658 seconds respectively. The reduction in step size increases the accuracy of the solutions.

Coordinate ()Analytical (V)FDM (V) Iteration = 1000FDM (V) Iteration = 4000MCMC (V) MCMC (V)
(0.25, 0.3)12.703712.503012.705412.579812.7065
(0.35, 1.5)55.621655.346555.618055.241655.6195
(0.5, 1.05)38.878838.622738.890938.062538.8926
(0.6, 1.6)53.078452.937353.077252.852953.0780
(0.8, 0.6)27.803627.715727.811427.684827.8119
5. Conclusion

This paper presents a comprehensive application of MCMC method to Laplace’s equation in homogeneous axisymmetric domains. Two broad cases of homogeneous axisymmetric problems were investigated. For Case I, the MCMC method was used to solve Laplace’s equation with inhomogeneous Dirichlet boundary condition in which the top and bottom boundaries were characterized by the same potential. For case II, the MCMC method was investigated with the Laplace’s equation using inhomogeneous Dirichlet boundary condition in which the top and bottom boundaries (prescribed potentials) were at different potentials. Also, Neumann boundary condition was imposed at the line of symmetry. Several plots were reported. The MCMC results were compared with the analytical and finite difference solutions. The proposed MCMC method agreed with the analytical and finite difference solutions for all reported cases. However, the difference in computation time between MCMC and FDM is in the order of seconds for the problems considered and thus cannot be used as a basis for comparison.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

Cite this paper

Shadare, A.E., Sadiku, M.N.O. and Musa, S.M. (2019) Markov Chain Monte Carlo Solution of Laplace’s Equation in Axisymmetric Homogeneous Domain. Open Journal of Modelling and Simulation, 7, 203-216. https://doi.org/10.4236/ojmsi.2019.74012

Nomenclature

MCMC: Markov Chain Monte Carlo;

1D: One dimension;

2D: Two dimension;

3D: Three dimension;

EM: Electromagnetics;

FDM: Finite difference method;

P: Transition probability;

N: Fundamental matrix;

B: Absorption probability matrix.