Numerical approaches have long been used to examine material behaviors that are governed by diffusion. The surface water and groundwater become polluted with regard to time. The pollutants travel from place to place in extended time intervals interacting with the solid soil particles. The diffusion of solute with solid soil particles idealized as spheres are studied in this dissertation. The objective was to numerically simulate diffusion through a sphere. A steady-state finite difference method was used to study the diffusion in a sphere. It was assumed that a bulk liquid solution interacts with solid spheres through a diffusion limited process which is equivalent to a volume of limited bath boundary condition. A sphere of radius 0.07 cm is placed in the beaker containing the solution. The radius of the sphere is divided into 15 nodes each of radius 0.005 cm. Initially, the sphere is free from the solute. As time progresses the diffusion in the sphere takes place. The solute from outside the sphere gets infused in the sphere. By using a numerical technique, the concentration at different nodes at different time intervals is studied. The process is carried out for two different solutions with different concentration values.

• The goal of this research is to numerically simulate diffusion through a sphere.

• By using a numerical technique, the concentration at different nodes at different time intervals is studied.

Diffusion is one of the transport phenomena that occurs in nature. A unique feature of diffusion is that without requiring any bulk motion it results in mixing or mass transport. So the word diffusion should not be confused with the other similar words ‘convection’ and ‘advection’, which are the other two types of transport processes that use the method of bulk motion to transfer particles from one position to another new position (Anguelov et al. 2005; Hannaoui et al. 2013; Rao et al. 2022). In the Latin language, the word ‘diffundere’ means ‘to spread out’. Diffusion can be explained in two different ways: 1. A phenomenological methodology by applying Fick's laws of diffusion and its calculational part. 2. An atomistic point, which explains the random walk of the particles (Bonilla & Bhatia 2011; Hayat et al. 2022).

The phenomenological methodology deals with Fick's laws and their applications; in this case, the diffusive flux is directly proportional to the negative gradient of the concentration. Particles move from a higher concentration region to a lower concentration region. Later, numerous generalizations for the study of Fick's laws were introduced in the fields of thermodynamics (Schumaker & Kentler 1998).

In the atomistic point, the random motion or the random walk of diffusive particles is considered diffusion. Whereas in case of molecular diffusion, the movement of all the particles is self-propelled with current energy. Random walk of small particles with suspension in a fluid was discovered in 1827 by Robert Brown’ (Alvarez-Ramirez & Valdes-Parada 2009; Basha et al. 2022; Bilal et al. 2022). Diffusion plays a main role in water resource engineering and environmental engineering. The contending process consists of diffusion through natural organic matter and diffusion through intraparticle nanopores (Prakash et al. 2010).

The main objective is to study the behavior of diffusion of solutions of different concentrations taking place in a sphere of radii 0.07cm with respect to time at different radii of the sphere. This helps to know how the sphere gets saturated and the time it takes for the concentration to reach its centre. (i) Development of code on C ++ programming to obtain results of diffusion in the sphere. (ii) Results to be plotted on graphs with respect to time.

### Pore diffusion equation

Substituting u = Cr,

Since this is the equation for one-dimensional linear flow, the explanations of many complications regarding radial flow in a sphere can be solved from those of the analogous linear problems.

### Diffusion from a well stirred solution of limited volume

The problem and method of solution are very similar to those of the plane paper and the results can be obtained without explanation. Let us take a sphere occupying the space r<a, whereas the volume of the limited bath of solution (other than the space taken by a sphere) is V. The concentration of solute in the solution is always uniform and its initial value is. Firstly, the sphere doesn't contain any solute (Kucherenko et al. 2000; Sousa 2009). The overall amount of solute is in the sphere after time t is given as a fraction of the consistent quantity after infinite time by the following relation (Weber et al. 1991; Ley et al. 2006; Li & Huang 2010; Yong et al. 2014; Zhang & Zhang 2014).where the are the non-zero roots of
Also, the ratio of the volumes of solution and sphere, or if there is a partition factor K between the solute in equilibrium in the sphere and the solution, . The parameter is expressed in terms of the final fractional uptake of solute by the sphere by the relation.

### Reasons for development of numerical solutions

A large number of mathematical solutions have developed throughout the theoretical solution process, with the majority of the answers taking the form of infinite series. Their application to actual concerns might provide complications.

First, the numerical assessment of the solutions is seldom easy.

Second, the analytical approaches and solutions are mostly limited to simple geometries and constant diffusion parameters such as the diffusion coefficient.

In other words, they are only applicable to linear versions of the boundary conditions and diffusion equations. This may be a significant constraint in polymer systems because the diffusion coefficient is often concentration dependent.

Numerical analysis approaches enable the solution of mathematical problems that are more closely related to real-world situations.

### Experimental data

#### Data inputs

It includes all the data used in the study of diffusion in a sphere with respect to time. By using this data the calculations have been carried out which are necessary to find the concentration of contaminant diffused in the sphere at different radii with respect to time interval.

The following are the parameters of spherical particles for simulation for one-dimensional ADRE with pore diffusion.

• 1.

• 2.

Concentration: (i) 70 and (ii) 14,000

• 3.

Intraparticle porosity, npk = 0.3

• 4.

Effective diffusion coefficient, Dak = 1.11e−06 m2/day for TCE

• Dak = 0.148e−06cm2/s for TCE

• 5.

Volume of bulk, Vbulk = 0.3 cm3

• 6.

Volume of solids = 1 cm3

• 7.

Total volume, VT = 1 − n

• VT = 1 − 0.3 = 0.7 cm3

• 8.

Volume of one particle, V1 = • 9.

No. of particle per unit, Np = (Np = 487 when r = 0.07 cm)

### Finite difference method

Differential equations contain a large number of equations and it is very difficult to solve all these equations. It includes more steps and it is a laborious work to solve without error. Solving manually may lead to a large number of errors in bulk.

To solve differential equations manually or numerically is a lengthy process. So the derivative steps in the equations should be substituted with finite difference estimates. This gives us a series of equations that can be easily solved at a time by using explicit methods or can be solved concurrently by using implicit methods to get values of the dependent function equivalent to values of the independent function in the domain.

A type of mathematical expression, similar to partial differential equation, is estimated by analogous expressions, which suggest values at only a finite number of discrete points (Niedermeier & Loehr 2005; Johannesson 2009; Slavík & Stehlík 2014). Analytical solution is continuous and numerical solution is discrete. The basic philosophy of finite difference methods is to replace derivatives with algebraic difference quotients, resulting in a system of algebraic equations which can then be solved. So for the purpose of studying finite difference equations, we must define a way how we are going to discretize our domain of calculation.

### The boundary conditions

Basically there exist three types of boundary conditions for the simplification of partial differential equations:

1. Dirichlet boundary condition: It gives the surface value of the function .

2. Robin boundary condition: In a region to obtain the value of elliptical partial differential equation, this condition stipulates the summation of and the normal derivative value of at all the points of the boundary of the region , with and f actually given.

In order to solve the diffusion equation we need some initial condition and boundary conditions. The initial condition gives the concentration in the limited bath at t = 0. Physically this means that we need to know the concentration distribution in the sphere immersed in a limited bath at a moment to be able to predict the future distribution.

A sphere of radius 0.07 cm is taken in a beaker containing contaminant water of limited volume with its concentration. Slowly the contaminant gets diffused inside the sphere. The sphere is divided into 15 nodes, each of radii 0.005 cm. The diffusion of contaminant takes place with respect to time. The value of contaminant at different radii at different time intervals is found by applying numerical technique.

The experiment is carried out for two different samples with their concentration, C = 70 and C = 14,000. The experiment is carried out for different concentration values to know how the values of diffusion vary at different time intervals whereas all the other parameters remain constant. The diffusion in the sphere takes place as the concentration of contaminant water is higher than the concentration in the sphere. With an increase in time, the diffusion of contaminant is carried out. The graphs are drawn with respect to results obtained for different time intervals. The graphs show the values of concentration at different radii at time t. The values of concentration are plotted on the Y-axis and the values of radii are plotted on X-axis at time t.

### Results when R = 0.07 cm, C = 70

Figure 1 shows the value of concentration as 70 at radii 0.07 cm the diffusion is yet to take place. Here, the concentration on the outer periphery of the sphere is the same as that of contaminant water.
Figure 2 shows the concentration values at different radii as the diffusion has been carried for time t = 3,000 s. The value of concentration at node 15 has decreased to 68.85, C at different nodes can be been seen in Figure 2.
Figure 3 shows the concentration values at different radii as the diffusion has been carried for time t = 3,600 s. The value of concentration at node 15 has decreased to 68.61, C at different nodes can be seen in Figure 3.
Figure 4 shows the concentration values at different radii as the diffusion has been carried for time t = 6,000 s. The value of concentration at node 15 has decreased to 67.60, C at different nodes can be seen in Figure 4.
Figure 5 shows the concentration values at different radii as the diffusion has been carried for time t = 15,000 s. The value of concentration at node 15 has decreased to 63.49, C at different nodes can be seen in Figure 5.
Figure 6 shows the concentration values at different radii as the diffusion has been carried for time t = 18,000 s. The value of concentration at node 15 has decreased to 62.06, C at different nodes can be seen in Figure 6.
Figure 7 shows the concentration values at different radii as the diffusion has been carried for time t = 27,000 s. The value of concentration at node 15 has decreased to 57.77, C at different nodes can be seen in Figure 7.
Figure 8 shows the concentration values at different radii as the diffusion has been carried for time t = 36,000 s. The value of concentration at node 15 has decreased to 53.55, C at different nodes can be seen in Figure 8.
Figure 9 shows the concentration values at different radii as the diffusion has been carried for time t = 39,000 s. The value of concentration at node 15 has decreased to 52.18, C at different nodes can be seen in Figure 9.
Figure 10 shows the concentration values at different radii as the diffusion has been carried for time t = 45,000 s. The value of concentration at node 15 has decreased to 49.49, C at different nodes can be seen in Figure 10.
Figure 11 shows the concentration values at different radii as the diffusion has been carried for time t = 51,000 s. The value of concentration at node 15 has decreased to 46.89, C at different nodes can be seen in Figure 11.
Figure 12 shows the concentration values at different radii as the diffusion has been carried for time t = 54,000 s. The value of concentration at node 15 has decreased to 45.62, C at different nodes can be seen in Figure 12.
Figure 13 shows the concentration values at different radii as the diffusion has been carried for time t = 63,000 s. The value of concentration at node 15 has decreased to 41.97, C at different nodes can be seen in Figure 13.
Figure 14 shows the concentration values at different radii as the diffusion has been carried for time t = 66,000 s. The value of concentration at node 15 has decreased to 40.80, C at different nodes can be seen in Figure 14.

### Results when R = 0.07 cm and C = 14,000

Figure 15 shows the value of concentration as 14,000 at radii 0.07 cm and the diffusion is yet to take place. Here, the concentration on the outer periphery of the sphere is the same as that of contaminant water.
Figure 16 shows the concentration values at different radii as the diffusion has been carried for time t = 3,000 s. The value of concentration at node 15 has decreased to 13,770.69, C at different nodes can be seen in Figure 16.
Figure 17 shows the concentration values at different radii as the diffusion has been carried for time t = 3,600 s. The value of concentration at node 15 has decreased to 13,722.04, C at different nodes can be seen in Figure 17.
Figure 18 shows the concentration values at different radii as the diffusion has been carried for time t = 6,000 s. The value of concentration at node 15 has decreased to 13,520, C at different nodes can be seen in Figure 18.
Figure 19 shows the concentration values at different radii as the diffusion has been carried for time t = 15,000 s. The value of concentration at node 15 has decreased to 12,698.59, C at different nodes can be seen in Figure 19.
Figure 20 shows the concentration values at different radii as the diffusion has been carried for time t = 18,000 s. The value of concentration at node 15 has decreased to 12,413.80, C at different nodes can be seen in Figure 20.
Figure 21 shows the concentration values at different radii as the diffusion has been carried for time t = 27,000 s. The value of concentration at node 15 has decreased to 11,554.99, C at different nodes can be seen in Figure 21.
Figure 22 shows the concentration values at different radii as the diffusion has been carried for time t = 36,000 s s. The value of concentration at node 15 has decreased to 10,711.51, C at different nodes can be seen in Figure 22.
Figure 23 shows the concentration values at different radii as the diffusion has been carried for time t = 39,000 s. The value of concentration at node 15 has decreased to 10,436.75, C at different nodes can be seen in Figure 23.
Figure 24 shows the concentration values at different radii as the diffusion has been carried for time t = 45,000 s. The value of concentration at node 15 has decreased to 9,899.09, C at different nodes can be seen in Figure 24.
Figure 25 shows the concentration values at different radii as the diffusion has been carried for time t = 51,000 s. The value of concentration at node 15 has decreased to 9,378.78, C at different nodes can be seen in Figure 25.
Figure 26 shows the concentration values at different radii as the diffusion has been carried for time t = 54,000 s. The value of concentration at node 15 has decreased to 9,125.54, C at different nodes can be seen in Figure 26.
Figure 27 shows the concentration values at different radii as the diffusion has been carried for time t = 63,000 s. The value of concentration at node 15 has decreased to 8,394.57, C at different nodes can be seen in Figure 27.
Figure 28 shows the concentration values at different radii as the diffusion has been carried for time t = 66,000 s. The value of concentration at node 15 has decreased to 8,160.66, C at different nodes can be seen in Figure 28.

### Combined results when R = 0.07 cm and C = 70

Figure 29 shows the concentration values at different radii as the diffusion has been carried out for different time intervals. C at different nodes can be seen in Figure 29.
Figure 30 shows the concentration values at different radii as the diffusion has been carried out for different time intervals. C at different nodes can be seen in Figure 30.
Figure 31 shows the concentration values at different radii as the diffusion has been carried out for different time intervals. The value of concentration at node 15 has decreased, C at different nodes can be seen in Figure 31.
Figure 32 shows the concentration values at different radii as the diffusion has been carried out for different time intervals. The value of concentration at node 15 has decreased, C at different nodes can be seen in Figure 32.
Figure 33 shows the concentration values at different radii as the diffusion has been carried out for different time intervals. The value of concentration at node 15 has decreased, C at different nodes can be seen in Figure 33.
Figure 34 shows the concentration values at different radii as the diffusion has been carried out for different time intervals. The value of concentration at node 15 has decreased, C at different nodes can be seen in Figure 34.

### Combined results when R = 0.07 cm and C = 14,000

Figure 35 shows the concentration values at different radii as the diffusion has been carried out for different time intervals. The value of concentration at node 15 has decreased, C at different nodes can be seen in Figure 35.
Figure 36 shows the concentration values at different radii as the diffusion has been carried out for different time intervals. The value of concentration at node 15 has decreased, C at different nodes can be seen in Figure 36.
Figure 37 shows the concentration values at different radii as the diffusion has been carried out for different time intervals. The value of concentration at node 15 has decreased, C at different nodes can be seen in Figure 37.
Figure 38 shows the concentration values at different radii as the diffusion has been carried out for different time intervals. The value of concentration at node 15 has decreased, C at different nodes can be seen in Figure 38.
Figure 39 shows the concentration values at different radii as the diffusion has been carried out for different time intervals. The value of concentration at node 15 has decreased, C at different nodes can be seen in Figure 39.
Figure 40 shows the concentration values at different radii as the diffusion has been carried out for different time intervals. The value of concentration at node 15 has decreased, C at different nodes can be seen in Figure 40.

In this paper, we have numerically studied the diffusion process taking place in a sphere of radius 0.07 cm placed in a volume of limited bath boundary condition initially with a concentration value of 70 and then with a concentration of 14,000. With the help of numerical techniques, the results have been obtained by developing a programming on the entire process taking place at different radii of the sphere. From the numerical results, the graphs have been plotted to study the values of concentration diffused in the sphere at different radii at different time intervals.

The diffusion process is studied for two different concentrations whereas the other parameters remained the same. So we can easily know the time taken for the diffusion of solute to reach the centre of the sphere.

Data cannot be made publicly available; readers should contact the corresponding author for details.

The authors declare there is no conflict.

Alvarez-Ramirez
J.
&
F. J.
2009
Non-standard finite-differences schemes for generalized reaction–diffusion equations
.
Journal of Computational and Applied Mathematics
228
(
1
),
334
343
.
doi: 10.1016/j.cam.2008.09.026
.
Anguelov
R.
,
Kama
P.
&
Lubuma
J. M.-S.
2005
On non-standard finite difference models of reaction–diffusion equations
.
Journal of Computational and Applied Mathematics
175
(
1
),
11
29
.
doi: 10.1016/j.cam.2004.06.002
.
Basha
H. T.
,
Rajagopal
K.
,
N. A.
,
Sathish
S.
&
Gunakala
S. R.
2022
Finite difference computation of Au-Cu/Magneto-Bio-Hybrid nanofluid flow in an inclined uneven stenosis artery
.
Complexity
2022
,
1
18
.
doi: 10.1155/2022/2078372
.
Bilal
S.
,
Shah
I. A.
,
Akgül
A.
,
Nisar
K. S.
,
Khan
I.
,
Motawi Khashan
M.
&
Yahia
I. S.
2022
Finite difference simulations for magnetically effected swirling flow of Newtonian liquid induced by porous disk with inclusion of thermophoretic particles diffusion
.
Alexandria Engineering Journal
61
(
6
),
4341
4358
.
doi: 10.1016/j.aej.2021.09.054
.
Bonilla
M. R.
&
Bhatia
S. K.
2011
The low-density diffusion coefficient of soft-sphere fluids in nanopores: accurate correlations from exact theory and criteria for applicability of the Knudsen model
.
Journal of Membrane Science
doi: 10.1016/j.memsci.2011.08.033
.
Hannaoui
R.
,
Galliéro
G.
&
Boned
C.
2013
Molecular dynamics simulation of thermodiffusion and mass diffusion in structureless and atomistic micropores
.
Comptes Rendus Mécanique
341
(
4–5
),
469
476
.
doi: 10.1016/j.crme.2013.01.015
.
Hayat
T.
,
Khan
S. A.
&
Momani
S.
2022
Finite difference analysis for entropy optimized flow of Casson fluid with thermo diffusion and diffusion-thermo effects
.
International Journal of Hydrogen Energy
47
(
12
),
8048
8059
.
doi: 10.1016/j.ijhydene.2021.12.093
.
Johannesson
B.
2009
Ionic diffusion and kinetic homogeneous chemical reactions in the pore solution of porous materials with moisture transport
.
Computers and Geotechnics
36
(
4
),
577
588
.
doi: 10.1016/j.compgeo.2008.10.002
.
Kucherenko
S.
,
Pan
J.
&
Yeomans
J. A.
2000
A combined finite element and finite difference scheme for computer simulation of microstructure evolution and its application to pore–boundary separation during sintering
.
Computational Materials Science
18
(
1
),
76
92
.
doi: 10.1016/S0927-0256(00)00089-6
.
Ley
E. E.
,
Goodyer
C. E.
&
Bunge
A. L.
2006
Mathematical models of diffusion through membranes from spatially distributed sources
.
Journal of Membrane Science
283
(
1–2
),
399
410
.
doi: 10.1016/j.memsci.2006.07.014
.
Li
X.
&
Huang
W.
2010
An anisotropic mesh adaptation method for the finite element solution of heterogeneous anisotropic diffusion problems
.
Journal of Computational Physics
229
(
21
),
8072
8094
.
doi: 10.1016/j.jcp.2010.07.009
.
McGill
P.
&
Schumaker
M. F.
1996
Boundary conditions for- single-ion diffusion
.
Biophysical Journal
71
(
4
),
1723
1742
.
doi: 10.1016/S0006-3495(96)79374-8
.
Niedermeier
C. A.
&
Loehr
R. C.
2005
Application of an intraparticle diffusion model to describe the release of polyaromatic hydrocarbons from field soils
.
Journal of Environmental Engineering
131
(
6
),
943
951
.
doi: 10.1061/(ASCE)0733-9372(2005)131:6(943)
.
Prakash
J.
,
Raja Sekhar
G. P.
,
De
S.
&
Böhm
M.
2010
Convection, diffusion and reaction inside a spherical porous pellet in the presence of oscillatory flow
.
European Journal of Mechanics – B/Fluids
29
(
6
),
483
493
.
doi: 10.1016/j.euromechflu.2010.05.002
.
Rao
X.
,
Liu
Y.
&
Zhao
H.
2022
An upwind generalized finite difference method for meshless solution of two-phase porous flow equations
.
Engineering Analysis with Boundary Elements
137
,
105
118
.
doi: 10.1016/j.enganabound.2022.01.013
.
Schumaker
M. F.
&
Kentler
C. J.
1998
Far-Field analysis of coupled bulk and boundary layer diffusion toward an ion channel entrance
.
Biophysical Journal
74
(
5
),
2235
2248
.
doi: 10.1016/S0006-3495(98)77933-0
.
Shahraeeni
M.
&
Hoorfar
M.
2013
Experimental and numerical comparison of water transport in untreated and treated diffusion layers of proton exchange membrane (PEM) fuel cells
.
Journal of Power Sources
238
,
29
47
.
doi: 10.1016/j.jpowsour.2013.03.023
.
Slavík
A.
&
Stehlík
P.
2014
Explicit solutions to dynamic diffusion-type equations and their time integrals
.
Applied Mathematics and Computation
234
,
486
505
.
doi: 10.1016/j.amc.2014.01.176
.
Sousa
E.
2009
Finite difference approximations for a fractional advection diffusion problem
.
Journal of Computational Physics
228
(
11
),
4038
4054
.
doi: 10.1016/j.jcp.2009.02.011
.
Weber
W. J.
,
McGinley
P. M.
&
Katz
L. E.
1991
Sorption phenomena in subsurface systems: concepts, models and effects on contaminant fate and transport
.
Water Research
25
(
5
),
499
528
.
doi: 10.1016/0043-1354(91)90125-A
.
Yong
Y.
,
Lou
X.
,
Li
S.
,
Yang
C.
&
Yin
X.
2014
Direct simulation of the influence of the pore structure on the diffusion process in porous media
.
Computers & Mathematics with Applications
67
(
2
),
412
423
.
doi: 10.1016/j.camwa.2013.08.032
.
Zhang
F.
&
Zhang
N.
2014
Diffusion configuration of water molecules in diffusion weighted imaging
.
Optik
125
(
9
),
2123
2128
.
doi: 10.1016/j.ijleo.2013.10.063
.
This is an Open Access article distributed under the terms of the Creative Commons Attribution Licence (CC BY-NC-ND 4.0), which permits copying and redistribution for non-commercial purposes with no derivatives, provided the original work is properly cited (http://creativecommons.org/licenses/by-nc-nd/4.0/)