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
Figure 1. Cylindrical geometry.
Figure 2. 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
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 
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
Figure 3. 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 :
Table 1. Parameters for homogeneous axisymmetric problems.
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 :
Figure 4. Potential distribution along (a); (b) line of symmetry,; (c) ; (d); (e) surface plot; (f) contour plot for Laplace’s equation in Homogeneous Axisymmetric domain with Inhomogeneous Dirichlet boundary condition: Case I.
Table 2. Results comparison for analytical, FDM and MCMC for Laplace’s equation with inhomogeneous Dirichlet boundary condition: Case I.
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
Figure 5. (a) Meshed Solution Region for Case II; (b) Solution Region I; (c) Solution Region II.
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.
Figure 6. Potential distribution along (a); (b) line of symmetry,; (c) ; (d); (e) surface plot; (f) contour plot for Laplace’s equation in Axisymmetric Homogeneous Domain with Inhomogeneous Dirichlet Boundary Condition: Case II.
Table 3. Results comparison for analytical, FDM and MCMC for Laplace’s equation with inhomogeneous Dirichlet boundary condition: Case II.
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.
MCMC: Markov Chain Monte Carlo;
1D: One dimension;
2D: Two dimension;
3D: Three dimension;
FDM: Finite difference method;
P: Transition probability;
N: Fundamental matrix;
B: Absorption probability matrix.