Modeling Fluid's Dynamics with Master Equations in Ultrametric Spaces Representing the Treelike Structure of Capillary Networks

We present a new conceptual approach for modeling of fluid flows in random porous media based on explicit exploration of the treelike geometry of complex capillary networks. Such patterns can be represented mathematically as ultrametric spaces and the dynamics of fluids by ultrametric diffusion. The images of p-adic fields, extracted from the real multiscale rock samples and from some reference images, are depicted. In this model the porous background is treated as the environment contributing to the coefficients of evolutionary equations. For the simplest trees, these equations are essentially less complicated than those with fractional differential operators which are commonly applied in geological studies looking for some fractional analogs to conventional Euclidean space but with anomalous scaling and diffusion properties. It is possible to solve the former equation analytically and, in particular, to find stationary solutions. The main aim of this paper is to attract the attention of researchers working on modeling of geological processes to the novel utrametric approach and to show some examples from the petroleum reservoir static and dynamic characterization, able to integrate the p-adic approach with multifractals, thermodynamics and scaling. We also present a non-mathematician friendly review of trees and ultrametric spaces and pseudo-differential operators on such spaces.


Introduction
Random porous media are characterized by a complex network of capillaries [1,2].To model the flow of fluid (e.g., oil, water, or emulsion) through such a net, the spatial and temporal patterns of the porous structure must be taken into account.This can be done with the aid of a few approaches based on different mathematical representations of the porous structure or by the means of direct tomographic, Fullbore Formation Microimaging (FMI) and seismic imaging.The closest to our consideration is the fractal (multifractal) encoding of capillaries networks, see, e.g., [3,4], and the use of diffusion with fractional differential operators-anomalous diffusion [5][6][7][8][9][10], see also recent Kochubei's work [11] about ultraslow diffusion and his other works [12,13] (we recall that anomalous diffusion is a diffusion process with a non-linear relationship to time of its dispersion, in contrast to the standard diffusion, in which the dispersion σ r 2 is a linear function of time).We remark that a number of successful models based on numerical simulation for fractional diffusion were proposed and explored [5][6][7][8][9][10].We also point to the extended modeling based on canonical Euclidean geometry of solid/pore sets of soils and rocks, and the use of typically nonlinear functions, e.g., [1,2,14].In recent work [15] we proposed a new mathematical framework for fluid flow modeling in random porous media based on explicit exploring of treelike geometry of complex networks of capillaries.We use mathematical representation of ultrametric spaces, so that dynamics of fluids through the networks is given by ultrametric diffusion which can be treated as a kind of anomalous diffusion (but in very special mathematical representation).In article [15] we considered the simplest class of trees: p-adic trees.Here p > 1 is a prime number and the configuration space is given by the homogeneous tree with p branches exiting each vertex.Now, we want to proceed with arbitrary trees.In contrast to the homogeneous p-adic trees which can be treated as locally compact groups (and even number fields: fields of p-adic numbers) and for which the Fourier transform is used to define (pseudo) differential operators (see Section 6), an arbitrary tree cannot be endowed with a group structure and, hence, there is no Fourier transform.Thus, mathematically the situation is more complicated, but, from the point of view of research as applied to geosciences, it is more realistic.
Before addressing the main goal of the present research and discussing mathematics in more detail, we would like to highlight one of the main advantages of the use of the treelike system of coordinates, i.e., the restriction of the configuration space to the network of capillaries (and treatment of the surrounding background as an environment that affects the coefficients of evolution equations which describe the propagation of the fluid through this network).We should briefly review the physics of p-adic models.In order to note how closely the fractal model is coupled with the p-adic model (the latter being a homeomorphism of the former, see Section 7), a small historical remark is made in Sections 1.1 and 1.2 (see also Section 7.2) concerning, in particular, the physics of fractals representing treelike capillaries networks (the latter will be discussed in detail elsewhere).

Physics of Capillary Phenomena from the p-Adic, Fractal and Multifractal/Thermodynamic Point of View
The capillary phenomena were discovered by Leonardo da Vinci, Pascal, and Jurin in experiments with glass tubes and the theory was developed by Laplace, Young, and Gibbs.Churaev [16] gives a very general definition of capillary phenomena which can be seen as the set of complex processes occurring on the interfaces between the unmixed media, derived from the surface tension appearing on their boundary.During the early seventies, the tree-like structure of the capillaries networks in porous media was intuitively accepted by several physicists.However, the absence of high precision imaging techniques was the main obstacle for direct observation and imaging of such treelike structures.Notwithstanding, several physicists have manually painted their virtual capillaries nets with such exactness that the p-adic pictures extracted from these graphs surprisingly coincided with the expected numbers distribution.For instance, Kachinskiy [17] has schematically represented the capillary distribution of water from the groundwater in soil as the system with the clear hierarchical treelike structure of capillaries nets.
In Figure 1, the simplest p-adic picture (or map of p-adic numbers) extracted from this graph is presented.The details of the procedure designed by us in order to extract the p-adic numbers from valued fields, ultrametric spaces, p-adic numbers will be published in the paper of Oleschko et al. [18].It is obvious that in the exemplified case the p-adic numbers follow the original tree-like capillary pattern.In the procedure designed by us [18], the simplest class of p-adic numbers is extracted from grayscale images, as well as from each valued field or time series.In the first step, each image of interest is transformed into an array of gray intensity values (from 0 to 255), following the original pixel arrangement across the image (Oleschko et al. [19]).The p-adic numbers of the special case (m = n) is extracted from this matrix of numbers, keeping the position of each gray-value which fulfill the established rule (see Oleschko et al. [18] for details).[17] original image).Skeletonization is the standard method used to determine a center line of each form, see Betrouni et al. [20].In this example, in spite of showing the center line of each pore with corresponding branches, we present the 2D matrix of p-adic numbers, whose positions across the image coincide with pores.
In spite of the lack of high precision imaging tools, some very imaginative researchers found another way to document the treelike ramification patterns of different physical and chemical phenomena.For instance, Lichtenberg (1777) has reproduced the most known pictures of treelike ramification of electric discharges inside the dielectric materials, imaging these by colored powders and printing the pattern of their distribution on paper, see [21].
These figures are called Lichtenberg Figures (Figure 2a, from [21]) and the appearance of their p-adic map extracted by us (Figure 2b) is very close to the p-adic numbers distribution across the Fullbore Formation Microimaging (FMI) images, which prove nowadays to be very popular, diverse and useful tools for hydrocarbon´s reservoir static characterization (Figure 2c,d).Figure 2a,b is only an example of 2D symbolic representation of 3D image taken from the web [21].Our algorithm, (see Oleschko et al. [18]) is applied to the 2D image of the 3D object.
(a) (b) . p-adic skeleton of the hierarchical treelike structure of capillaries nets (extracted from Kachinskiy [17] original image).Skeletonization is the standard method used to determine a center line of each form, see Betrouni et al. [20].In this example, in spite of showing the center line of each pore with corresponding branches, we present the 2D matrix of p-adic numbers, whose positions across the image coincide with pores.
In spite of the lack of high precision imaging tools, some very imaginative researchers found another way to document the treelike ramification patterns of different physical and chemical phenomena.For instance, Lichtenberg (1777) has reproduced the most known pictures of treelike ramification of electric discharges inside the dielectric materials, imaging these by colored powders and printing the pattern of their distribution on paper, see [21].
These figures are called Lichtenberg Figures (Figure 2a, from [21]) and the appearance of their p-adic map extracted by us (Figure 2b) is very close to the p-adic numbers distribution across the Fullbore Formation Microimaging (FMI) images, which prove nowadays to be very popular, diverse and useful tools for hydrocarbon´s reservoir static characterization (Figure 2c,d).Figure 2a,b is only an example of 2D symbolic representation of 3D image taken from the web [21].Our algorithm, (see Oleschko et al. [18]) is applied to the 2D image of the 3D object.In spite of the lack of high precision imaging tools, some very imaginative researchers found another way to document the treelike ramification patterns of different physical and chemical phenomena.For instance, Lichtenberg (1777) has reproduced the most known pictures of treelike ramification of electric discharges inside the dielectric materials, imaging these by colored powders and printing the pattern of their distribution on paper, see [21].
These figures are called Lichtenberg Figures (Figure 2a, from [21]) and the appearance of their p-adic map extracted by us (Figure 2b) is very close to the p-adic numbers distribution across the Fullbore Formation Microimaging (FMI) images, which prove nowadays to be very popular, diverse and useful tools for hydrocarbon´s reservoir static characterization (Figure 2c,d).Figure 2a,b is only an example of 2D symbolic representation of 3D image taken from the web [21].Our algorithm, (see Oleschko et al. [18]) is applied to the 2D image of the 3D object.In early 1980s and 1990s (see, e.g., Stanley and Meakin [22]), the fractal/multifractal scaling properties of capillary ramified fingering (see, e.g., Feder [23]; Nadafpour et al. [24]) was documented for invasion percolation, diffusion-limited aggregation (DLA), anti-DLA processes (see Lenormand [25]), as well as for Lichtenberg figures (see Ficker [26]).All these phenomena were widely studied for example, in (Maloy et al. [27,28]), modeled and computationally simulated.In the past decades, the fractal flow in porous media [29], as well as the transport through treelike networks and diffusion on fractals (see O´Shaughnessy and Procaccia [30]), have attracted much attention, especially in oil recovery studies, for example, in [31] because of the experimental evidences that capillary flow is faster in the optimized tree nets (see the recent paper of Shou et al. [32]).The latter conclusion is especially important for petroleum industry during the design of secondary oil recovery programs [33].
The main questions we are interested in our research are:  Does a real difference exist between the traditional approach on the physics of capillary phenomena and the physics of fractal capillaries nets? If the answer is "yes", where does this difference come from? How representative are the pictures of ultrametric spaces, the p-adic numbers, and valued fields? Should these pictures be taken in 2D-space or they must be 3D because of the strong triangle inequality of non-Archimedean spaces?
The concept of physics of fractals was introduced by Bak and Chen [34] but, to the best of our knowledge, there is still little known on this topic applied to the real physical world problems.We did not find any evidence of papers published on physics of fractal (multifractal) capillaries networks.Notwithstanding, Stanley and Meakin [22] have discussed the important thermodynamics aspects of multifractality in physics and chemistry, founding the formal analogy among the probability distribution function Z(q) and partition function Z(β).Therefore, the analogy between the Legendre transform f(α) and entropy (H), as well as between the function α and energy E (see Stanley and Meakin [22]) was found.From our point of view, these analogies are the key points for physics of fractal capillaries patterns treelike morphology.One example of multifractal spectrum f(α) of two porous media with contrasting capillary pressure curves (measured by the mercury invasion technique, commonly used in petroleum studies), is presented in Figure 3.The difference in the medium heterogeneity can be quantified by several multifractal indicators (for instance the degree of the graph symmetry or strength of singularity).In early 1980s and 1990s (see, e.g., Stanley and Meakin [22]), the fractal/multifractal scaling properties of capillary ramified fingering (see, e.g., Feder [23]; Nadafpour et al. [24]) was documented for invasion percolation, diffusion-limited aggregation (DLA), anti-DLA processes (see Lenormand [25]), as well as for Lichtenberg figures (see Ficker [26]).All these phenomena were widely studied for example, in (Maloy et al. [27,28]), modeled and computationally simulated.In the past decades, the fractal flow in porous media [29], as well as the transport through treelike networks and diffusion on fractals (see O´Shaughnessy and Procaccia [30]), have attracted much attention, especially in oil recovery studies, for example, in [31] because of the experimental evidences that capillary flow is faster in the optimized tree nets (see the recent paper of Shou et al. [32]).The latter conclusion is especially important for petroleum industry during the design of secondary oil recovery programs [33].
The main questions we are interested in our research are: ‚ Does a real difference exist between the traditional approach on the physics of capillary phenomena and the physics of fractal capillaries nets?
‚ If the answer is "yes", where does this difference come from?‚ How representative are the pictures of ultrametric spaces, the p-adic numbers, and valued fields?
‚ Should these pictures be taken in 2D-space or they must be 3D because of the strong triangle inequality of non-Archimedean spaces?
The concept of physics of fractals was introduced by Bak and Chen [34] but, to the best of our knowledge, there is still little known on this topic applied to the real physical world problems.We did not find any evidence of papers published on physics of fractal (multifractal) capillaries networks.Notwithstanding, Stanley and Meakin [22] have discussed the important thermodynamics aspects of multifractality in physics and chemistry, founding the formal analogy among the probability distribution function Z(q) and partition function Z(β).Therefore, the analogy between the Legendre transform f(α) and entropy (H), as well as between the function α and energy E (see Stanley and Meakin [22]) was found.From our point of view, these analogies are the key points for physics of fractal capillaries patterns treelike morphology.One example of multifractal spectrum f(α) of two porous media with contrasting capillary pressure curves (measured by the mercury invasion technique, commonly used in petroleum studies), is presented in Figure 3.The difference in the medium heterogeneity can be quantified by several multifractal indicators (for instance the degree of the graph symmetry or strength of singularity).More examples from experimental studies in oil-industry will be presented in Section 7.2 coupled to the fractal representation of the special class of trees, the p-adic trees (homogeneous trees with p branches for each vertex), Section 7.1.

Depicting Ultrametric Spaces and p-Adic Numbers Networks from the Images of Real Oil Field
Holly [35] has mentioned that the usual pictures lose their utility for the case of ultrametric space, proposing to use treelike images for non-Archimedean spaces, p-adic numbers, and valued fields visual representation or mapping.Our previous images documented the usefulness of this approach.Notwithstanding, in order to get closer to the strong triangle inequality of an ultrametric space, we are working in 3D space.For instance, in the case of Lichtenberg space, we have extracted the p-adic map from the 2D projection of 3D original image (Web example, 21).In our research for oil industry, we applied the same procedure for the tomographic 3D reconstructed images of porous rocks.In this case, we have applied the skeletonization procedure, designed by designed by Rieutord [36] and Perrier [37], in order to extract the pore network (Figure 4a,b), to measure it´s connectivity and tortuosity and then to construct the p-adic map of number "diffusion" across these nets (Figure 4c).More examples from experimental studies in oil-industry will be presented in Section 7.2 coupled to the fractal representation of the special class of trees, the p-adic trees (homogeneous trees with p branches for each vertex), Section 7.1.

Depicting Ultrametric Spaces and p-Adic Numbers Networks from the Images of Real Oil Field
Holly [35] has mentioned that the usual pictures lose their utility for the case of ultrametric space, proposing to use treelike images for non-Archimedean spaces, p-adic numbers, and valued fields visual representation or mapping.Our previous images documented the usefulness of this approach.Notwithstanding, in order to get closer to the strong triangle inequality of an ultrametric space, we are working in 3D space.For instance, in the case of Lichtenberg space, we have extracted the p-adic map from the 2D projection of 3D original image (Web example, 21).In our research for oil industry, we applied the same procedure for the tomographic 3D reconstructed images of porous rocks.In this case, we have applied the skeletonization procedure, designed by designed by Rieutord [36] and Perrier [37], in order to extract the pore network (Figure 4a,b), to measure it´s connectivity and tortuosity and then to construct the p-adic map of number "diffusion" across these nets (Figure 4c).
working in 3D space.For instance, in the case of Lichtenberg space, we have extracted the p-adic map from the 2D projection of 3D original image (Web example, 21).In our research for oil industry, we applied the same procedure for the tomographic 3D reconstructed images of porous rocks.In this case, we have applied the skeletonization procedure, designed by designed by Rieutord [36] and Perrier [37], in order to extract the pore network (Figure 4a,b), to measure it´s connectivity and tortuosity and then to construct the p-adic map of number "diffusion" across these nets (Figure 4c).

Ultrametric Diffusion, Wavelets and Pseudo-Differential Operators
Ultrametric equations (at least a special class of equations with "wavelet friendly pseudo-differential operators") are simpler from the analytic viewpoint and in many cases it is possible to find analytic solutions [15,[38][39][40][41][42][43], e.g., steady states [15].At the same time anomalous diffusion in the conventional Euclidean models [5][6][7][8][9][10] is typically handled only with the aid of numerics.Another possible earning from the use of the tree-like system of coordinates is of the conceptual nature: one may expect to find some novel features of fluid's propagation which are shadowed in the Cartesian system of coordinates.However, the latter is just an expectation, although quite natural.
The key mathematical point of analysis on trees is that trees can be represented as ultrametric spaces and vice versa, Section 2. In fact, we propose to use the ultrametric spaces as configuration spaces-to model dynamics in porous random media.Thus the tree-like structure of capillary networks is encoded in special geometry, ultrametric geometry (we remark that its features differ crucially from the standard features of Euclidean geometry, see Section 2.).Fourier analysis cannot be generalized to general ultrametric spaces.Therefore the standard approach to theory of (pseudo) differential operators cannot be applied.However, wavelet analysis on locally compact groups can be generalized to ultrametric spaces, see [38][39][40][41][42][43][44][45] and Section 2.3, see also [46][47][48][49][50] for some of its applications.This provides the possibility to introduce so to say "ultrametric wavelets friendly" pseudo-differential operators and corresponding diffusion equations, Section 4.
To model dynamics of a few fluids (e.g., droplets of free oil, oil coupled to capillaries' surface, water, and emulsion) through capillary networks of porous media, we derive master equations (see Section 3) some of which can be treated as ultrametric analogs of reaction-diffusion equations, Sections 4.4 and 5.In particular, we generalize to the case of an arbitrary tree our previous model of

Ultrametric Diffusion, Wavelets and Pseudo-Differential Operators
Ultrametric equations (at least a special class of equations with "wavelet friendly pseudo-differential operators") are simpler from the analytic viewpoint and in many cases it is possible to find analytic solutions [15,[38][39][40][41][42][43], e.g., steady states [15].At the same time anomalous diffusion in the conventional Euclidean models [5][6][7][8][9][10] is typically handled only with the aid of numerics.Another possible earning from the use of the tree-like system of coordinates is of the conceptual nature: one may expect to find some novel features of fluid's propagation which are shadowed in the Cartesian system of coordinates.However, the latter is just an expectation, although quite natural.
The key mathematical point of analysis on trees is that trees can be represented as ultrametric spaces and vice versa, Section 2. In fact, we propose to use the ultrametric spaces as configuration spaces-to model dynamics in porous random media.Thus the tree-like structure of capillary networks is encoded in special geometry, ultrametric geometry (we remark that its features differ crucially from the standard features of Euclidean geometry, see Section 2.).Fourier analysis cannot be generalized to general ultrametric spaces.Therefore the standard approach to theory of (pseudo) differential operators cannot be applied.However, wavelet analysis on locally compact groups can be generalized to ultrametric spaces, see [38][39][40][41][42][43][44][45] and Section 2.3, see also [46][47][48][49][50] for some of its applications.This provides the possibility to introduce so to say "ultrametric wavelets friendly" pseudo-differential operators and corresponding diffusion equations, Section 4.
To model dynamics of a few fluids (e.g., droplets of free oil, oil coupled to capillaries' surface, water, and emulsion) through capillary networks of porous media, we derive master equations (see Section 3) some of which can be treated as ultrametric analogs of reaction-diffusion equations, Sections 4.4 and 5.In particular, we generalize to the case of an arbitrary tree our previous model of reaction-diffusion dynamics of free and surface bounded oil which was studied for homogeneous p-adic trees in [15].
Since we hope that our ultrametric approach will attract the attention of researchers working on mathematical modeling of geophysical processes, we briefly review the theory of ultrametric wavelets and spectral properties of pseudo-differential operators based on these wavelets.
In Section 6 we consider a very interesting class of trees-the homogeneous p-adic trees, their number-theoretic presentation, and coupling with fractals, the corresponding theory of wavelets and pseudo-differential operators.We remark that in the p-adic case such operators can be introduced in two ways: conventionally by using the Fourier transform and in the wavelet framework.

Materials and Methods (Ultrametric Spaces and Trees)
The notion of a metric space is used in many applications for describing distances between objects.Let X be a set.A function ρ: X ˆX Ñ R `(where R `is the set of positive real numbers) is said to be a metric if it has the following properties: (1) ρ(x, y) = 0 if and only if x = y (non-degenerated); (2) ρ(x, y) = ρ(y, x) (symmetric); (3) ρ(x, y) ď ρ (x, z) + ρ(z, y) (the triangle inequality).The pair (X, ρ) is called a metric space.Abstract metric spaces were introduced as generalizations of the Euclidean space: E n = tx = px 1 ,...,x n q : x j P Ru with the standard Euclidean metric (the square root of the sum of squares).

Ultrametric Spaces: Properties of Balls
In some applications the point structure of X and the properties of a metric p may essentially differ from the Euclidean case.We are interested in metric spaces X, where, instead of the standard triangle inequality, the strong triangle inequality: is valid.Such a metric is called an ultrametric, and such metric spaces are called ultrametric spaces.
The strong triangle inequality can be stated geometrically: all triangles are isosceles.
Let us discuss the main properties of ultrametric space X.We set B r paq = tx P X : ρ(x ´a) < ru, B r ~paq = tx P X: ρpx ´aq ď ru, r > 0, a P X These are balls of the radius r with the center at the point a.Our standard intuition tells us that B r (a) is a closed ball, but not open, and B r ~(a) is an open ball, but not closed.However, it is not valid for ultrametric spaces: In ultrametric space each ball in X is open and closed at the same time.Each point of a ball may serve as a centre.A ball may have infinitely many radii.
Let U and V be two balls in ultrametric space X.Then there are only two possibilities: (1) balls are ordered by inclusion (i.e., U Ă V or V Ă U); (2) balls are disjoint.
Thus if two balls have a common point then one has to be a part of another.The symbol S r (a) denotes the sphere {x P X: ρ(x, a) = r} of the radius r > 0 with the center at a.There is also a large deviation from the Euclidean case: the sphere S r (a) is not a boundary of B r (a) or B r ~(a).
Consider the following class of ultrametric spaces (X, ρ).Every point x has an infinite number of coordinates x = (a o , a 1 , ..., a n ,...).Each coordinate yields the finite number of values a P {0, ..., m ´1}, where m > 1 is a natural number.We denote the space of sequences (1) by the symbol X = Z m .The standard ultrametric is introduced on this set in the following way.
Let x = (a 0 , a 1 , a 2 , ..., a n , . . .), y = (b 0 , b 1 , b 2 , ..., b n , . . . ) P Z m .We set This is a metric and even an ultrametric.It is known as the Baire ultrametric and it has numerous applications, see, for instance, the works of Murtagh and Contreras [51,52].To find the distance ρ m (x, y) between two strings of digits x and y we have to find the first position k at which the strings have different digits.The space X = Z m coincides with the unit ball centered in zero, X = B 1 (0); this space is compact.Geometrically it can be represented by the tree, see Figure 5 for the 2-adic tree representing Z 2 .Here one vertex, the root labeled as R, is incident for two edges and other vertices are incident for three edges.We remark that it is convenient to consider this tree as the directed graph, see Figure 5; for each vertex I different from R, one edge comes from the branch starting at R, the "input edge", and two edges go out from I, the "output edges".These two edges (or vertices at their ends) are labeled by a = 0, 1.In Figure 5 the order of labeling of the output edges is based on the embedding of the tree in the plane, upper output edges are labeled by 0 and lower by 1.This leads to the concrete numerical representation of this tree.However, the rule used for labeling of edges is not obligatory; for each vertex I, we can assign 0/1 to each of output edges in an arbitrary way and obtain another numerical representation of this tree.We shall later discuss these issues in very general setting.each vertex I, we can assign 0/1 to each of output edges in an arbitrary way and obtain another numerical representation of this tree.We shall later discuss these issues in very general setting.

From Trees to Ultrametric Spaces
For reader's convenience, we recall that a tree is an undirected graph in which any two vertices are connected by exactly one path.A rooted tree is a tree in which one vertex, say R, is selected as the root.The edges of a such tree can be assigned an orientation, either away from or towards the root.This graph is known a directed rooted tree.For each rooted tree, it is possible to introduce the partial order structure on the set of its vertices: x ≤ y if and only if the unique path from the root R to the vertex x passes through the vertex y.This order structure determines the hierarchic structure on the tree (we recall once again that Kachinskiy [17] discovered a similarity between the capillary distribution of water from the groundwater in soil and a hierarchical treelike structure.Mathematically such a hierarchy is formalized as the order structure on a rooted tree.)We emphasize that the tree-order is partial.Thus in general, for arbitrary pair of vertices x and y, we cannot compare them.However, it is interesting to notice that given any two elements a; b there exists a supremum sup(a; b).Moreover, if two elements x; y stand above a same element a, then x and y are comparable: either x ≤ y or y ≤ x.
Consider an arbitrary tree (finite or infinite) T, such that the path in the tree between arbitrary two vertices is finite, and the number of edges incident to each of the vertices is finite.If a vertex I is incident to mI + 1 edges, it has the branching index mI.To each such a tree we shall associate an ultrametric space, so called absolute of the tree.This space is defined in the following way.

From Trees to Ultrametric Spaces
For reader's convenience, we recall that a tree is an undirected graph in which any two vertices are connected by exactly one path.A rooted tree is a tree in which one vertex, say R, is selected as the root.The edges of a such tree can be assigned an orientation, either away from or towards the root.This graph is known a directed rooted tree.For each rooted tree, it is possible to introduce the partial order structure on the set of its vertices: x ď y if and only if the unique path from the root R to the vertex x passes through the vertex y.This order structure determines the hierarchic structure on the tree (we recall once again that Kachinskiy [17] discovered a similarity between the capillary distribution of water from the groundwater in soil and a hierarchical treelike structure.Mathematically such a hierarchy is formalized as the order structure on a rooted tree.)We emphasize that the tree-order is partial.Thus in general, for arbitrary pair of vertices x and y, we cannot compare them.However, it is interesting to notice that given any two elements a; b there exists a supremum sup(a; b).Moreover, if two elements x; y stand above a same element a, then x and y are comparable: either x ď y or y ď x.
Consider an arbitrary tree (finite or infinite) T, such that the path in the tree between arbitrary two vertices is finite, and the number of edges incident to each of the vertices is finite.If a vertex I is incident to m I + 1 edges, it has the branching index m I .To each such a tree we shall associate an ultrametric space, so called absolute of the tree.This space is defined in the following way.Definition 1.The infinitely continued path starting in the vertex I is a path with the beginning in I, which is not contained in a larger path with the beginning in I.
Let now fix some vertex R of a tree, its "root".Definition 2. The space of infinitely continued paths in the tree, which begin in the root R is called the absolute of the tree.
This definition does not depend on the choice of the root R. Now we define the metric on the absolute X = X(T) of the tree T. Each x P X can be represented as a sequence of vertexes starting with the root R: x = RI 0 , . . ., I k´1 Take two points x, y P X.These two branches have the finite common root-path, with vertexes RI 0 , . . ., I k´1 (the kth vertices in branches x and y are not equal).Now we see: One can check that this is the ultrametric on the absolute.If the tree T is homogeneous with m I = m = const, then ρ(x, y) = 1/m k , i.e., in this case definition (4) matches with definition (3) of the m-adic metric on X = Z m .It is convenient to consider the tree T as the directed graph; for each vertex I different from the root R one edge comes from the branch starting at R, the "input edge", and m I edges go out from I, the "output edges."These output edges (or vertexes at their ends) are labeled by a = 0, ..., m I ´1 in an arbitrary way.In this way we construct a numerical representation of this tree, cf. with (1): x = (a 0 ,a 1 , ..., a n , ...), a j P t0, ..., m I ´1u Thus the ultrametric can be defined similarly to (3).Let x = (a j ), y = (b j ).We set: ρpx, yq " 1{pm I 0 m I 1 , . . ., m I pk´1q q, if a j " b j , j " 0, 1 , . . ., k ´1, and Each vertex I of T determines the ball B I in the ultrametric space.Consider the finite branch connecting the root R with the vertex I: R = RI 0 , . . ., I k´1 = I.Then B I consists of all branches of T having this common initial segment; in other words: B I " tx = pa j q : a j = a Ij , j = 0, ..., k ´1u We remark that B R = X = B 1 (x) for any x P X(T).Moreover, the metric space X(T) is compact.It is possible to show that any compact ultrametric space X can be represented as X(T), where T is the tree of its balls.Moreover, by modifying the above construction we can construct not only compact, but even locally compact ultrametric spaces.Here X ‰ BR (if the space is not compact), see Section 6 for the p-adic ultrametric space Q p , where p > 1 is a prime number, extending the space Z p .
We point once again to the paper of Holly [35] devoted to graphical, tree-like, representation of ultrametric spaces.We also remark that a description of the tree structure of ultrametric spaces is also given in Chapter 11 of the book [53] by Escassut (dedicated to circular filters).Robert's book [54] is a good source on p-adic trees, the class of homogeneous trees with the branching indexes given by the prime numbers p > 1.Such trees are represented by the fields of p-adic numbers Q p (see Section 6).The latter are very special ultrametric spaces.One of their main distinguishing features is that they can be endowed with the arithmetic structure which is similar to the arithmetic structure on the real line.
Its presence is very useful in many studies: one can proceed further and at the same time simpler than in the general ultrametric case.However, for a moment we are interested in another feature of p-adic trees and corresponding ultrametric spaces, the fields of p-adic numbers Q p .This is the discreteness of p-adic ultarmetric.Its values are integer powers of the prime number p.
If the set of the values of an ultrametric is discrete, in certain cases (which are in fact the most interesting) the ultrametric space is identified as a subset of Q p .And from the mathematical viewpoint this is the preferable situation.However, nature is more complicated!For instance, in the example of Lichtenberg Figures [21], the set of values is clearly not discrete and then the representation cannot be given by some field Q p (or its finite algebraic extensions).Here we really need to consider an ultrametric set with a densely valued ultrametric.Thus consideration of trees which are not representable by the fields of p-adic numbers is not just due to our wish to handle the case which is most general mathematically.We really have to extend our results from works [15,46]-to be able to cover very important natural phenomena.
Remark.(Geological meaning of selection of the root of the tree of capillaries) Above we made the remark that the construction of the ultrametric space X(T) does not depend on selection of the root vertex R. Mathematically this is correct.However, from the viewpoint of applications, the selection of the root point R can be motivated by geological reasons.The root vertex can correspond, e.g., to a well.Consider now the tree of capillaries T as the directed graph centered at the root vertex, see above considerations and "invert the direction of all arrows".Then R can be treated as the point of location of a well, e.g., oil, gas or combined well, and arrows label the directions of the flow through capillaries to well and then to surface.

Wavelets on Ultrametric Spaces (Trees)
Now following [40][41][42][43][44][45][46][47][48] we introduce ultrametric wavelets.Let µ be a (finite) measure on X = X(T).Each ball B I determines the finite set of wavelets (j = 1, ..., m I ´1): ψ I j pxq " ψ I j pα 0 , α 1 , . . ., α n , . . .q " e 2πijαx I m I where the symbol Ω O pxq denotes the characteristic function of the set O Ă X.We remark that the definition of the system of wavelets of X = X(T) depends on the numerical representation of its points, see (5); thus each fixed numerical representation generates its own system of wavelets.Set C = µ(X).Then, as was shown in [40][41][42][43][44][45][46][47][48], the system of functions ψ I j , 1{ ?C ( forms the orthonormal basis in the space of square integrable functions L 2 (X, µ).Thus each f P L 2 pX, µq can be expanded with respect to this basis.By setting ψ R0 pxq " 1{ ?C we shall write the wavelet expansion in the homogeneous form: with j = 0 for I = R.However, for our further studies it is important to point out that, the system of the wavelets defined by (7), i.e., excluding the constant function form the orthonormal basis in the subspace of the L 2 space consisting of functions with zero average: Thus any function f P L 2 0 can be expanded in the wavelet series (8) without the constant term.We remark that this feature of ultrametric wavelets recalls the corresponding feature of the usual Haar wavelets on the segment [0, 1] of the real line.

Utrametric Representation of Networks of Capillaries in Porous Disordered Media
As pointed out, our main idea is to represent the tree-like structure of capillaries in real porous disordered media by using ultrametric spaces.The starting point is to ignore the solid background and to explore only geometry of the network of capillaries.Of course, the background is not completely ignored, it is treated as an environment; its impact will be encoded in the coefficients of the master equations.(We remark that this approach can have important implications for the oil and gas sector, and in particular the fracking sector-to have an analytics method which dispenses with background data.).
Tree-like geometry provides a sufficiently natural mathematical model of such networks.Then, see Section 2, we can represent trees by ultrametric spaces.In this way the complex fractal (or multi-fractal) structure of porous disordered media can be studied with the aid of analysis on ultrametric spaces which is sufficiently well developed.
Everywhere below, the variable x belongs to some locally compact ultrametric space X (to a tree satisfying conditions listed in Section 2) and the time variable t is real.We shall consider functions f (t, x) depending on the pair of variables, real and ultrametric: t P R, x P X.Here x is the "pore network coordinate", each pathway of pore capillaries is encoded by a point x of the ultrametric space (or in the tree-like representation-by a branch of the tree).Time is usual real time.Thus by assigning the ultrametric coordinate x to a system (e.g., oil or water droplet) we know in which pathway composed of capillaries this system is located.Hence, the ultrametric model provides a fuzzy description of pore networks.Now we write master equations for dynamics of a few kinds of fluids diffusing through the network of capillaries.This is the dynamics of concentrations of fluids (oil, water or emulsion) in capillaries.In the probabilistic framework we shall work with probabilities p i pt, xq to find a droplet of the ith fluid in the branch x of the tree of capillaries.The reader can see that we use geometry which is very different from typically used Euclidean geometry with three Cartesian coordinates.As pointed out, our representation is fuzzy, we cannot predict the probability (concentration) for the concrete point px, y, zq P R.
From the dynamics, we get to know concentration of fluid (oil, water or emulsion) in capillaries.(We recall that the dynamics are probabilistic.)However, we cannot get to know the concentration of fluid in the precisely fixed point of the Euclidean physical space.
We remark that each ultrametric ball B r (x) represents a bundle of capillaries: the longer the common root of such a bundle the smaller the ball's radius.We also note that a capillary is a very thin spatial (with respect to Euclidean geometry) structure.In geological measurements concentration p(t,x) in such a thin structure is not measurable.Therefore only averages over ultrametric balls B r (x), bunches of capillaries, correspond to physically testable quantities, i.e., in fact, we are interested in: ppt, B r paqq " ppt, x P B r paqq " Here µ is a probability measure on the ultrametric space X; it assigns weights to the branches of the tree of capillaries.In the simplest case all branches have the same weight-the uniform probability distribution.In the ultrametric setting this uniform measure µ is defined by the condition µpB r paqq " r: the measure of a ball equals its radius.A more complex measure arises if we assign to each branch the average diameter of capillaries composing it (with the corresponding normalization).
We consider probabilistic dynamics of droplets of some fluid moving through the network of capillaries in porous random media; denote the probability density to find its droplet in the pathway x (density with respect to the fixed probability measure µ on the tree, "weight measure") by the symbol p(t,x).This dynamics is given by the master equation: As always in a master equation, p(x|y) is the transition probability rate-in our model: the probability of transition of a droplet from the capillary y to the capillary x.
We remark that this equation coincides with the master equation used for dynamics on complex energy landscapes, e.g., for spin glasses and protein folding [47][48][49][50].These phenomena were mainly modeled within a very special class of ultrametric spaces, p-adic ones.However, the main difference is that now ultrametric coordinates (in particular, p-adic numbers) are used not to formalize hierarchy of basins of a complex energy landscape, but of concrete physical entities-capillaries.In mathematical terms, we can say that in the studies on complex energy landscapes one was interested in vertexes of trees, local minima, and ultrametric spaces appeared as limiting ideal mathematical structures; in our approach one is interested not in vertexes of trees, but in their branches-the latter represent pathways of capillaries, cf. with a similar approach for the probabilistic dynamics of cognitive states [55], where branches were used to represent neuronal pathways.This approach also has relevance for retinal and other type medical imaging, for transport system analytics and water transport in biological systems (trees) [56][57][58][59][60].
We consider a closed tree-like network of capillaries and we have the law of conservation of total probability: Thus the equality: holds true.
As it was emphasized, only probabilities p(t, B r (a)) are subject of measurement.They satisfy the Cauchy problem obtained by integration of (10) with respect to balls: B p Bt pt, B r paqq " ż X rpp t, B r paq|y q ´pp t, y|B r paq qsdµpyq, ppx, 0q " p 0 pxq (13) where p(B r (a)|y) is the probability of transition from the point y to the ball B r (a) and p(y|B r (a)) is the probability of transition from the ball B r (a) to the point y.
We can assume that the probability of transition increases with decrease of the distance between two capillary pathways; this behavior can be modeled as: where q(s) is some decreasing function from [0, +8) to [0, 1] and ρ is the ultrametric.(Such a transition probability is symmetric with respect to two pathways of capillary which is natural for the problem under consideration.)For example, we can select q(s) = Cs ´α, α > 0, i.e.,: cf. Section 6 on the p-adic model.Generalize now the model to a few types of fluid in different states i = 1, 2, . . ., N; for example, free oil and oil coupled to surface of capillaries, free and retained water, emulsion.Denote the corresponding probability densities as p i (t,x).The corresponding master equation has the form: The transfer coefficients c ij can be equal to zero, e.g., oil droplets cannot be transferred into water droplets and vice versa.However, free oil droplets can be caught by the surface of capillaries and droplets coupled to surface can leave it move through a capillary.
We make the following important comment on applicability of Equation ( 16) to concrete flows of fluids.This equation holds for the case when the fluids can mix.In most interesting cases, in particular water and oil, the liquids cannot mix, in this case one possibly has to consider some more complicated nonlinear model.By applying this equation to emulsion, e.g., oil-in-water or water-in-oil emulsions, we have to remember that this is some approximation of the situation.
As above, we can easily obtain the following simple, but important (for model's justification) result: Proposition.The Equation ( 16) implies the conservation law, conservation of the total number of "particles" or droplets: ż

Wavelet-Friendly Pseudo-Differential Operators and Ultrametric Diffusion
In the previous section we derived the general system of master Equations ( 16) and ( 17) describing the dynamics of a family of fluids (i = 1, 2, . . ., N) moving through a network of capillaries in porous random media.Its derivation is very important from the methodological viewpoint.To get concrete analytic solutions, it is useful to consider a special class of master equations based on so to say wavelets-friendly pseudo-differential operators.

Pseudo-Differential Operators with Kernels Having Balls as Variables
As was shown in [38][39][40][41][42][47][48][49][50], the aforementioned problems can be solved jointly: by choosing coefficients of the evolution equations which are "wavelets friendly" we can clarify their physical meaning as well.We now present a family of such ultrametric pseudo-differential operators-diagonalizable with respect to wavelets on ultrametric space X.They act in the space of square integrable functions L 2 (X, µ) as: The form of this operator is motivated by the integral representation of the p-adic fractional differential operators (Vladimirov operators), see (45) in Section 6.As was stressed in introduction, the p-adic tree (ultrametric space) can be endowed with the structure of a locally compact group.Here we have harmonic analysis and we can define p-adic (pseudo) differential operators (44) in the same way as in the real harmonic analysis.Then we find their integral representation, see (45), and in case of a tree (ultrametric space) we use the analog of this representation, see (19).
As usual, properties of the operator A can be expressed in terms of its kernel a(x, y).Following [38][39][40][41][42][47][48][49][50], we proceed with functions a(x, y), which are nonnegative and depend only on the vertex I = I(x, y) of the first intersection of the tree branches x and y.
Thus each such kernel can be represented with the aid of a (nonegative) function defined on vertexes of the tree, IÑa(I), namely: px, yq " apIpx, yqq Such a kernel a(x, y) is symmetric, positive and locally constant with respect to y for a fixed x; for fixed x, a(x, y) = const, if ρ(x, y) = const.Thus the kernel (x, y) is constant on any sphere S r (x).
For our further coupling with physics, it is important that each vertex I can be identified with the ball; in particular, I(x, y) can be treated as the ball of the radius r(x, y) = ρ(x, y) with the center in the point x or y: we recall that any point of an ultrametric ball can serve as its center.We denote this ball by the symbol B(x, y).This is the minimal ball containing both pathways of capillaries, x and y. (We also recall that any ball is a bunch of pathways.)Thus the function IÑa(I) can be treated as a function on the space of balls of the ultrametric space X and the representation (20) can be written as: We proceed with the class of pseudo-differential operators whose kernels can be treated as functions defined on the space of balls of the ultrametric space X.The main distinguishing feature of this class of pseudo-differential operators is that the wavelets are their eigenvectors: where the eigenvalues λ I can be represented as integrals over I-based subtree of a special expression involving the operator kernel, see [40][41][42][47][48][49][50] for derivation of the explicit formula.We remark that each eigenvalue of a pseudo-differential operator A has finite degeneration m I ´1, where m I is the branching index of the vertex I.The operator A with the wavelets domain of definition can be extended to the self-adjoint positive operator in the L 2 -space.

Solving Master Equation with the Aid of Wavelet Expansion
Now we restrict our considerations to systems of master Equations ( 16) and ( 17) with symmetric transition probabilities, p i (x|y) = p i (y|x), depending only on the minimal ball containing the points x and y.Here: p i p x|y q " p i p y|x q " p i pBpx, yqq where p i , i = 1,2, . . ., N, are functions from the space of balls to the segment [0, 1].We obtain the following system of evolutionary pseudo-differential equations: Bt pt, xq " ř j‰i pc ij pxqp j px, tq ´cji pxqp i px, tqq ` X p i pBpx, yqqrp i pt, yq ´pi pt, xqsdµpxq. (23 This system of equations can be solved analytically by using the wavelet series.For simplicity, we consider the case of the single equation (e.g., a flow of free oil which cannot be bounded to the surface of capillaries): We expand its solution to the wavelet series: where C I,j (t) are scalar functions.Then the pseudo-differential operator in the right-hand side of ( 24) is diagonalized and we get the diagonal (infinite) system of linear equations for the wavelet coefficients: By expanding the initial probability density p 0 (x) in the wavelet series we obtain initial conditions C I,j (0).Thus the dynamics of the probability density is described by the wavelet series: ppt, xq " ÿ I,j e ´λI t C I,j p0qψ I j pxq (27) We recall that the type of tree and the symbol of pseudo-differential operator, in our case the map BÑp(B), determine precisely the eigenvalues of this operator.Thus this series gives us the exact analytic solution.(Of course, in applications we can also use approximate solutions obtained by cutoffs of the wavelet series.)

Arrhenius Type Transition Probabilities, Ultrametric Fractional Derivatives and Diffusion Equation
Now we fix i (the type of fluid) and, for each ball B in X, we introduce the average energy E(B) of transition between two points belonging to this ball.The transition energy increases with increase of the size of the ball.Then it is natural to proceed with the transition probabilities of the Arrhenius type (as it is done in interbasin kinetics [47][48][49][50], see also [61][62][63][64][65] for mathematical studies, especially in the p-adic case): By exploring the analogy with the Arrhenius formula we understand well that the physical situation under consideration is different from interbasin kinetics.The present model discusses the effects of hydrodynamics instead of random walks-the latter model plays the fundamental role in interbasin kinetics.Thus by using the special class of master equations based on Formula (28) we, in fact, proceed under the assumption that hydrodynamics in complex random media can be compared with random walk.Of course, this is some model assumption.
The corresponding pseudo-differential equation can be treated as the ultrametric analog of diffusion equation (a kind of anomalous diffusion): Here the kernel apx, yq " e ´αEpBpx,yqq µpBpx,yqq represents the ultrametric analog of the fractional differential operator, see Section 6.
We remark that the simplest functions on the space of balls are functions depending only on ball's radius, i.e., depending only on the "size" of a bunch of pathways of capillaries and not on the location of this bunch inside the network of capillaries in porous media.Here p(x, y) = p(ρ(x, y)), where p = p(r) is a function of radius.In particular, we obtain the following class of ultrametric diffusion equations: This is a particular case of the general Equation ( 24) and it can be solved by using wavelet series (27).Now let the average transition energy function E(s) = ´ln s.For such transition energy, the Arrhenius kernel has the form: For the ultrametric analog of the Haar measure, the uniform measure on X, defined by its values on balls, µ(B r (a)) = r, the corresponding pseudo-differential operator is the direct generalization of the fractional differential operator D α defined for homogeneous p-adic trees, see Section (6), the operator given by (44) Vladimirov operator.With this motivation, we write the corresponding ultrametric diffusion equation as the fractional diffusion (anomalous diffusion) equation:

Diffusion with Drift
In the L 2 space we can also consider another important class of pseudo-differential operators, operators of multiplication: M g (f )(x) = g(x)f (x).We can also define compositions of ultrametric fractional derivatives and multiplications by functions, D α M g .Select now gpxq " e βVpxq where V(x) plays the role of a potential.We now can consider the following reaction-diffusion equation: or systems of such equations.

Reaction-Diffusion Equations for Free and Surface Bounded Oil: The Case of an Arbitrary Tree
We consider dynamics of oil droplets in a network of capillaries in porous random media.We model it by using ultrametric reaction-diffusion equations.For homogeneous p-adic trees (with the constant branching index which is equal to a prime number p > 1), see Section 6, this problem was solved in article [15].However, such homogeneous trees are ideal mathematical objects and one can never find them in real porous system.Therefore, one has to consider dynamics on trees of capillaries with arbitrary (vertex dependent) branching indexes.We shall do this below.In spite of the aforementioned point that the assumption of homogeneity of trees of capillaries is totally unphysical, the p-adic model reflects correctly the main features of the general ultrametric model.Therefore from the mathematical viewpoint generalization from homogeneous trees to arbitrary is based on considerations similar to the particular ones which have been used in the p-adic case [15] (of course, under assumption of rather long preparations presented in previous sections).Therefore we shall not go deeply in the details and proceed rather formally.
Denote the concentration of fluid over capillaries by the symbol p 1 (x, t).This is fluid which is not bound to the interfaces.The concentration of fluid which is bound to solid's interface is denoted by the symbol p 2 (x, t).In our model a system (particle or droplet) flows in the capillaries, then it can be bound to solid's interface, stay bounded some period of time (e.g., solids-bound oil), then flow again and so on.However, as pointed out in introduction, it cannot be absorbed.
We arrive to the following two coupled balance equations: B Bt p 2 px, tq " c 1 pxqp 1 px, tq ´rc 2 pxq `Dα e βV 2 pxq sp 2 px, tq where α > 0 and β > 0 are the parameters of the model describing, respectively, the degree of fractionality of the diffusion and the strength of coupling with the potentials V j (x).The coefficient c 1 (x) describes the reaction rate of absorption of fluid by solid's interface; the c 2 (x) is the reaction rate of release of absorbed fluid; the V 1 (x) is the potential function inside the xth pore; the V 2 (x) is the potential function describing bounding of fluid to solid's interface in the xth pathway of capillaries.
As in [15], we proceed under following assumptions: Rates.All reaction rates in the above equations are proportional to characteristic functions of some balls.
Potentials.All potentials for the equations above are proportional to characteristic functions of some balls with negative coefficients of proportionality (i.e., describe potential wells).
By using the numerical encoding of points of ultrametric space X = X(T) generated by the tree of capillaries, see (5), we can fix "the center of coordinates of the tree system of coordinates" as the branch encoded by zeros, denote it by 0. In this system of coordinates, the corresponding reaction rates have the form: where the coefficients c 1 , c 2 are positive.Here a P X is an arbitrary fixed pathway of capillaries.(We state again that Ω(z) is the characteristic function of the segment [0, 1]; thus Ω(ρ(x, a)) equals to one on the ball B 1 (a) and zero outside it.) The potentials have the following form: ˙ẇhere U 1 , U 2 are negative, R ě ρpa, 0q ą 1 and U 8 ą 0. Thus these potentials equal constants U j on the balls B 1 (0) and B 1 (a), respectively, and zero outside of the ball B R (0) of sufficiently large radius R. Thus the reactions occur in sub-balls B 1 (0) and B 1 (a) of the ball B R (0).
Let us investigate the stationary solution for (34), (35).We get: D α re βV 1 pxq p 1 pxq `eβV 2 pxq p 2 pxqs " 0 Equivalently: Another equation for the stationary solution: implies that c 2 pxqp 2 pxq ´c1 pxqp 1 pxq is a mean zero function, i.e.,: The above condition has the physical meaning of the coincidence of the flows for oil droplets which are captured by surface of capillaries (at each instant of time t) and those which are liberated from surface.
For simplicity we also take R = ρ(a, 0).Then the right-hand side of (37) takes the form: The sketch of the proof of the latter equality is as follows.The function gpxq " c 2 pxqp 2 pxq ć1 pxqp 1 pxq as a mean zero function, g P L 2 0 , possesses an expansion over wavelets, see remark at the very end of Section 2.3.The wavelet with the largest support in this expansion has the form Ωpρpx, aqq ´Ωpρpxqq.Substituting this expansion in (36), (37) and taking into account that for the operators of multiplication by functions V 1 (x), V 2 (x) the wavelets with sufficiently small supports are eigenfunctions, we get (38).
The function (38) is an eigenvector of the diffusion operator D α with the eigenvalue 1 (since the characteristic function of each ball is the eigenfunction of D α with the eigenvalue 1).Equation (37) with the normalization (38) implies the expression for the stationary state: p 2 pxq " e ´βV 2 pxq pΩpρpx, 0qq ´Ωpρpx, aqq `1 `eβV 2 c ´1 2 q (40) In the limit V 8 Ñ `8 we get the solution for p 1 , p 2 localized in the ball B R (0).
In geophysics this model can be used to describe mathematically the process of formation of a cluster of capillaries, where oil droplets are concentrated and growing in size, generating, step by step, the petroleum micro-scale "reservoir".This kind of concentration in a tree-like geometry of the network of capillaries in porous random media corresponds to the process of creation of a cluster of oil droplets in a sub-tree of capillaries, e.g., creation of an oil "reservoir" in such a media.Now we are able to model this process of any tree-like geometry, cf. with the p-adic case handled in [15].
Equations ( 34) and ( 35) imply the conservation of the sum p 1 pxq + p 2 pxq (conservation of the total amount of oil).This means that there is no pumping of oil.To take into account pumping one has to add to the right-hand side of (34) some term of the form ´C(x) p 1 px, tq.Here the function C(x) can be concentrated in some ultrametric ball.In this way we obtain the following modification of the system of Equations ( 34) and ( 35): This system of equations can also be applied to modeling of geological processes important for oil industry.In particular, such a model represents the existence of the reservoir of oil which will renew depleted oil (for instance, the saturated by oil matrix).This reservoir can be described by adding to the system (34a), (35a) of some boundary condition (the formulation of this boundary condition in ultrametric case in nontrivial).

The Case of Homogeneous Trees: p-Adic Numbers, Pseudo-Differential Operators and Wavelets
Consider, see Section 2.1, the homogeneous tree with the constant branching index m I = p, where p > 1 is the fixed prime number (in principle, as in Section 2.1, we can proceed with an arbitrary natural number p, but for prime p mathematical theory is essentially simpler and more powerful).The branches of such a tree (which is denoted by Z p ) can be represented by sequences of digits x P t0, 1, . . ., p ´1u, see (1).Now we represent these sequences as "numbers", convergent series with respect to natural powers of p: x " In particular, branches encoded by sequences with a finite number of x ‰ 0 are represented by natural numbers.In this case (41) is the standard expansion of a natural number x with respect to powers of p.
This number representation gives the possibility to introduce on Z p algebraic operations of addition, subtraction, and multiplication.In algebra such structures are called rings, i.e., Z p is a ring.It is convenient to extend this ring to a field, i.e., to define the operation of division.(Not any ring can be embedded in a field, but, for Z p , it is possible to do; here the selection of the prime p plays the crucial role.)The field of p-adic numbers, denoted by Q p consists of series of the form: where γ " γpxq " 0, ˘1, ˘2, . . ., x k " 0, 1, . . ., p ´1, x γ ‰ 0, γ ď k ă 8.The p-adic norm is defined as |x| p " p ´γ, if x ‰ 0, and |x| p " 0, for x = 0.It determines the ultrametric on Q p : ρ p px, yq " |x ´y| p .For x,y P Z p , it coincides with the ultrametric which was introduced on this tree in Section 2.1.Thus this is the number-theoretic presentation of the tree ultrametric.We point out that as topological spaces the fields Q p , p > 1, are locally-compact.These fields are topological, i.e., all algebraic operations are continuous with respect to ultrametric topology.In the same way as for real numbers we can introduce the fractional part for p-adic numbers: the fractional part of the number ( 42) is given by: txu p " # 0, if γpxq ě 0 or x " 0, x γ p γ `. . .`x´1 p ´1, if γpxq ă 0 (43) As well known, on each locally compact abelian topological group there exists the Haar measure; in particular, there is the Haar measure on Q p (its sigma-algebra of Borel subsets).We denote this measure by the symbol µ p .It is determined by its values on balls: µ p (B r (a)) = r.This measure is invariant under the shifts, i.e., µ p (O + a) = µ p (O), for any Borel subset O and any a P Q p .
As standard in harmonic analysis on locally compact groups, we define the Fourier transform of the integrable function ϕ : Q p Ñ C as: where χ p ptq " e 2πittu p is the additive character on Q p , {t} p is the fractional part given by the Formula (43) of the p-adic number t.
In real analysis the Fourier transform can be used for the integral representation of usual differential operators, D n , n = 1, 2, . . . .Generalization of this representation to fractional degrees leads to fractional differential operators D α which play the important role in many applications, including reaction-diffusion equations used in geology.This is the very special case of pseudo-differential operators.
In the p-adic case it is impossible to define the derivative of a complex (or real) valued function in the straightforward way.Therefore even the differential operators D n , n = 1,2, . . . .The Vladimirov operator of p-adic fractional differentiation (for x > 0) is defined as: This operator can be represented in the following integral form: Thus the p-adic fractional differential operator is a nonlocal integral operator.We point out that even, for α = 1, 2, . . ., this operator is nonlocal.It is impossible to define a local differential operator (having the characteristic features of ordinary differential operators).We remark that this operator corresponds to Arrhenius type pseudo-differential operators (for the p-adic case) with the energy-function E(s) = ´ln s.
Besides harmonic analysis, there was developed p-adic wavelet analysis.The basis of p-adic wavelets in L 2 (Q p ) has the form [38] (see also [43] for details): θ k;jn pxq " p ´j{2 χpp ´1kpp j x ´nqqΩp ˇˇp j x ´nˇˇˇp q, x P Q p Here the index k P t1, 2, . . ., p ´1u , j P Z, the index n is an element of the quotient group Q p {Z p understood as a rational number of the form n " ř ´1 i"a n i p i where a P Z ´(negative integer), n i P t0, . . . ,p ´1u.The addition in Q p {Z p can be understood as the addition modulo one of fractions of the above form.The function Ω(¨) is the characteristic function of r0, 1s Ă R (therefore Ωp|¨| p q) is the characteristic function of Z p ).
The key point of applications of theory of p-adic wavelets is that they diagonalize the Valdimirov operator of fractional differentiation D a : D α θ k;jn pxq " p αp1´jq θ k;jn pxq, x P Q p (46) The wavelets introduced in this section are analogs of Haar wavelets.A more general theory of p-adic non-Haar wavelets can be found in monograph [44].Another hierarchic generalization of Haar wavelets was presented in the work of F. Murtagh [66].The latter theory has many interesting applications: data array smoothing, or filtering; hierarchical tree condensation; the wavelet decomposition, and the reproducibility of data sets such as text, including a new perspective on the generation or computability of such data objects.

From p-Adics to Fractals and Backward
Fractals are the fruitful mathematical tool for modeling of the structure of porous media and geological applications, see, e.g., [3,4].It is well known that fractal geometry is closely related to p-adic geometry: the former can be represented as a homeomorphic image of the latter.Typically this possibility is mentioned just as geometric peculiarity; see, for example, the book of Robert [54] for details.However, one can earn much more from such a coupling between fractals and p-adic trees.The latter are equipped with algebraic structure (of a number field) which matches with the topological structure of an ultrametric space.These structures serve as the basis of the well-developed p-adic analysis [53][54][55].Our idea is to explore this analysis for fractals by using the aforementioned homeomorphic maps between p-adic trees and fractals (we shall call them Monna maps; they were actively used in 1930s by the Dutch mathematician Monna, although he did not speak explicitly about fractals [79]).Thus physical (in particular, geophysical) fields defined on fractals can be represented by the corresponding fields on p-adic trees and then we can handle them with the aid of p-adic tools.

Monna Maps
Let us fix a prime number p > 1 and a natural number n > 1.Any p-adic number x can be represented in the form of the series: x " ř 8 i"γ x i p i , x i " 0, . . ., p ´1, γ P Z. Consider the map which maps p-adic numbers onto a subset of the positive half-line R + : where γ P Z. Denote the image of Q p under this map D p,n , i.e., D p,n = η n (Q p ).We remark that, in particular, the Haar measure µ p can be lifted from Q p to D p,n , µ p,n pAq " µ p pη ´1 n pAqq, where A is a Borel subset of the space D p,n .
We have [43]: The map η n : Q p Ñ R is continuous.If n > p, then it is injective and η n : Q p Ñ D p,n is homeomorphic.
It happens, see Robert [54], that, for n > p, the image-set D p,n is a fractal subset of R.
The self-similarity dimension of D p,n equals d " log p log n .So, d < 1.
Thus the set of p-adic numbers p can be used for representation of the special class of fractals of the fractal dimension < 1.In fact, these fractals are generalizations of the Cantor set fractal.
Example.(Cantor set as the image of the 2-adic unit ball Z 2 ).Let us consider a modification of the map η n which we denote by the same symbol: where γ P Z, where A P Q p .We select the normalization constant A in such a way that η n pZ 2 q Ă r0, 1s.We recall that Z 2 coincides with the 2-adic unit ball B 1 (0).It is easy to see that: Such normalization is not important for our further studies, but, for a moment, it will be useful to couple the images of p-dic balls with well known fractals.Now select p = 2 and n = 3, i.e., A = 2, so: i"γ 2x i 3 ´pi`1q , x i " 0, 1, where γ P Z.In particular, on Z 2 it has the form: Then the image of Z 2 coincides with the Cantor set C, i.e., C = η 3 (Z 2 ).Now let us consider decomposition of Q 2 into the disjoint union of balls of the unit radius: , where: We can repeat the above considerations for any p and n > p.We modify the map as in (47) with the constant A given by (49).Then η n pZ p q " C p,n is a subset of the segment [0, 1] generalizing the ordinary Cantor set.The complete image D p,n can be represented as the disjoint union of shifts of this Cantor-like set, D p,n " Y k pk `Cp,n q, where k " A ř m j"1 x j n j´1 .Now we present the construction from Robert's book [54] which provides a possibility of fractal representation of p-adic fields in the Euclidean space R m .Select an injective map z : t0, 1, . . ., p ´1u Ñ R m .Thus numbers 0, 1, . . ., p ´1 are represented by vectors v j = z(j).Fix again a natural number n > 1.Now we generalize the Monna-type map to the vector case: where γ P Z. Set D p,n;m " η n pQ p q.It can be shown that in this way it is possible to obtain the most important examples of the fractal subsets of R M ; for example, the Sierpinsky gasket.

The Physics of Fractal Capillary Phenomena
In this section we continue the discussion on coupling between fractals, trees and experimental data collected in applied research, for instance from oil industry.Our experimental study illustrates well the mathematical structures discussed in the previous sections.
In order to construct one new example of a dynamical theory of the physics of fractals, envisaged by Bak and Chen [34], we direct our attention on two mentioned above thermodynamic aspects of capillary networks in real physical space, taking as example the data from one oilfield.The entropy and free energy distribution were analyzed across the space and time.To our surprise, the high entropy values distribution extracted from the entropy map of oilfield (Figure 6a) by our p-adic procedure has clear treelike appearance (Figure 6b).Note that our model is discrete in both space and time.The original entropy map was constructed in Sterligov's geostatistical approach [80] in order to visualize the pressure curves variability (thirty wells were compared) in space and time.

The Physics of Fractal Capillary Phenomena
In this section we continue the discussion on coupling between fractals, trees and experimental data collected in applied research, for instance from oil industry.Our experimental study illustrates well the mathematical structures discussed in the previous sections.
In order to construct one new example of a dynamical theory of the physics of fractals, envisaged by Bak and Chen [34], we direct our attention on two mentioned above thermodynamic aspects of capillary networks in real physical space, taking as example the data from one oilfield.The entropy and free energy distribution were analyzed across the space and time.To our surprise, the high entropy values distribution extracted from the entropy map of oilfield (Figure 6a) by our p-adic procedure has clear treelike appearance (Figure 6b).Note that our model is discrete in both space and time.The original entropy map was constructed in Sterligov's geostatistical approach [80] in order to visualize the pressure curves variability (thirty wells were compared) in space and time.

Multi-Fractal Representation of -Adic Numbers
Now we proceed to the -adic modeling of multifractal sets.Select some radius = 1/ and represent ℚ as the disjoint union of balls of this radius, these balls can be numbered by their centers, ( ) = ∈ ℚ : | − | ≤ , here:

ℚ =∪ ( )
Now we select the sequence of natural numbers = ( ) , ( ) > 1, the numbers in this sequence can coincide.Consider a family of maps:

Multi-Fractal Representation of p-Adic Numbers
Now we proceed to the p-adic modeling of multifractal sets.Select some radius r " 1{p k and represent Q p as the disjoint union of balls of this radius, these balls can be numbered by their centers, B r paq "

!
x P Q p : |x ´a| p ď r , here: Now we select the sequence of natural numbers n " pnpaqq, npaq ą 1, the numbers in this sequence can coincide.Consider a family of maps: where γ P Z, from Q p to R and restrict them to the corresponding balls: Then this is a multifractal subset of the real line with the discrete spectrum n.By using the above construction of representation of Q p in the Euclidean space R m in the combination with generalization of multifractal construction we obtain representation of Q p in the form of multifractal subsets of the Euclidean space.

Wavelet Expansions on Fractals
Now the p-adic wavelet expansions can be "lifted" to the fractals D p,n with the aid of the map η n .Consider a map g : D p,n Ñ R and its η n -image, f pxq " η n pgqpxq " gpη n pxqq.Suppose that this map belongs to the L 2 -space.Then we can expand it with respect to the p-adic wavelet basis: We can proceed in the same way in the case of the multi-fractal representation of Q p .

Wavelet Expansions on Multifractals
Consider a map g : D p,n Ñ R and the corresponding map f pxq " η n pgqpxq " gpη n pxqq, x P Q p .Suppose that the latter belongs to the L 2 -space.Consider its representation as: Now we lift p-adic fractional differential operators to (multi) fractals and consider the corresponding diffusion and reaction diffusion equations on them.They can be solved with the aid of diagonalization in the wavelets basis.

Conclusions
Five years of research experience in the field of static characterization of a naturally fractured petroleum reservoir (Mexico), have shown that the tree-like structural patterns naturally arise in a variety of physical, chemical and biological (PCHEB) complex systems with the hierarchical organization.The genuine multiscale and hierarchical spatial and temporal patterns of PCHEB are fitting well to the tree-like models.Mathematically, it is fruitful to represent these scale invariant patterns by using theory of ultrametric spaces.
In the present paper the possibility of topological, ultrametric and thermodynamic encoding of these complex systems is discussed.Although this integral representation of complex system is well known in pure mathematics, its application to the real physical word is not so common, see also [15,46,[81][82][83][84].We focused this paper on the power of the ultrametric approach in the modeling of fluids and gases propagation throw tree-like structural patterns, e.g., capillary networks typical for random porous media.The corresponding master equations are expressed as ultrametric pseudo-differential equations; in particular, an important class of fluid´s flows is modeled by using ultrametric diffusion and more generally, reaction-diffusion equations.In this research we were concentrated on the geological-geophysical applications.The flow of oil, emulsions and oil-in-water or water-in-oil droplets in capillary networks, was of special interest because of its direct implication in the design of oil and gas recovery projects.We present some illustrative examples supporting this idea.We are speculating that the similar mathematical model can be explored in medicine, for instance, for retinal and some other medical imaging, as well as for other transport system analytics.Therefore, the range of the future applications of our approach is essentially broader than only static and dynamic characterization of geological and geophysical systems.The main idea beyond the ultrametric mathematical model of fluid propagation is to use the system of capillaries (tree´s branches) as the configuration space of the corresponding physical, chemical or biological system.The media surrounding capillaries is treated as the background and its impact on the pore networks is encoded in the coefficients of master equations.Thus we propose to explore the tree-like system of coordinates, instead of the Cartesian coordinates corresponding to a few real lines for the pore patterns mathematical modeling and computer simulation.
An important class of trees is given by homogeneous p-adic trees, trees with the constant branching indexes which are equal to the prime numbers p > 1. Mathematically these trees are the most simple for modeling.The corresponding ultrametric spaces are given by the fields of p-adic numbers.In contrast to the general ultrametric case, the p-adic spaces are endowed with the natural arithmetic operations for their branches, addition, subtraction, multiplication, and division.The presence of the arithmetic operations essentially simplifies modelling; deeper results can be obtained.However, such ultarmetric spaces cannot cover all tree-like structures appearing in physics and biology.Therefore extension of the p-adic model [15,46] to the general ultrametric case is justified from the application viewpoint.
The basic mathematical apparatus used in this paper is theory of ultrametric wavelets [40][41][42].In the ultrametric case theory of wavelets is the very powerful mathematical tool which provides the possibility to find analytic solutions of complicated equations of the reaction-diffusion type.In the real case such equations are typically handled with the aid of numerical methods.
Ultrametric and, in particular, p-adic spaces are closely related to (multi-)fractals.Hence, our research is closely related to the fractal analysis of physical and biological phenomena, in particular, fractal modeling in geology [3,4].
We plan to continue elaboration of the presented model.The concrete problem for further studies is analysis of the system of reaction-diffusion Equations (34a) and (35a) describing the existence of the reservoir of oil which will renew depleted oil.To describe such a reservoir we have to add to this system a boundary condition.Mathematically the problem of selection of boundary conditions in ultrametric spaces is nontrivial and there is done practically nothing.Thus further development of our approach needs new mathematical insights as well as continuation of experimental research.

Figure 1 .
Figure 1.p-adic skeleton of the hierarchical treelike structure of capillaries nets (extracted from Kachinskiy [17] original image).Skeletonization is the standard method used to determine a

Entropy 2016, 18 , 249 3 of 27 Figure 1 .
Figure 1.p-adic skeleton of the hierarchical treelike structure of capillaries nets (extracted from Kachinskiy [17] original image).Skeletonization is the standard method used to determine a center line of each form, see Betrouni et al. [20].In this example, in spite of showing the center line of each pore with corresponding branches, we present the 2D matrix of p-adic numbers, whose positions across the image coincide with pores.

Entropy 2016, 18 , 249 5 of 27 Figure 3 .
Figure 3. Example of multifractal spectrum (where f(α)is the Legendre transform which is analog of the entropy) of two real porous media with contrasting degree of pores heterogeneity.The abscissa and ordinate correspond to the multifractal spectrum f(α) and the singularity exponent α(xi).

Figure 3 .
Figure 3. Example of multifractal spectrum (where f(α)is the Legendre transform which is analog of the entropy) of two real porous media with contrasting degree of pores heterogeneity.The abscissa and ordinate correspond to the multifractal spectrum f(α) and the singularity exponent α(x i ).

Figure 4 .
Figure 4. (a) The isosurfaces of pores are shown on this 3D image, which is not just 2D projection of original tomographic images; (b) pore network extracted from the 3D tomographic image; (c) corresponding p-adic map based on the prime number skeleton of the corresponding image a.

Figure 4 .
Figure 4. (a) The isosurfaces of pores are shown on this 3D image, which is not just 2D projection of original tomographic images; (b) pore network extracted from the 3D tomographic image; (c) corresponding p-adic map based on the prime number skeleton of the corresponding image a.

2 j
, x j " 0, 1, m P N Denote by C(a) the image of the ball B 1 (a): C(a) = η 3 (B 1 (a)) = η 3 (a + Z 2 ).These sets are homeomorphic to the Cantor set C. In fact, they are shifts of C by natural numbers of the form k " 2 ř m j"1 x j 3 j´1 , i.e., k = 2,6, ... Thus the image of Z 2 , the set D 2,3 , can be represented as the disjoint union of shifts of the Cantor set.

Figure 6 .
Figure 6.(a) The entropy map of oilfield; (b) p-adic map based on the prime number skeleton.

1 whereFigure 6 .
Figure 6.(a) The entropy map of oilfield; (b) p-adic map based on the prime number skeleton.
jn ψ k;jn pxq where: c k;jn " ż Q p f pxqψ k;jn pxqµ p pdxq Now in the case n ą p we can use the inverse map η ´1 n : D p,n Ñ Q p and write the wavelet expansion in terms of the original functions g : gptq " ÿ k;jn c k;jn ψ k;jn pη ´1 n ptqq, c k;jn " ż D p,n gptqψ k;jn ptqµ p,n pdtq Thus any signal t Ñ gptq defined on the fractal of the D p,n -type (having the fractal dimension d " logp logn ) can be expanded in the wavelet type series; the corresponding parts of this series represent low and high frequency components of the signal.

7 . 6 .
pxq, where f a pxq " Ωp |x ´a| p r q f pxq corresponding to the disjoint union representation Q p " Y a B r paq.Then each component f a pxq can be expanded in the p-adic wavelet series: f a pxq " ÿ k;jn c k;jna ψ k;jn pxq, c k;jna " jn ψ k;jn pxq where: c k;jn " ÿ a c k;jna are the wavelet coefficients of f pxq and the latter representation gives us the fractal components of this multi-fractal wavelet expansion.Suppose now that in the spectral sequence n " pnpaqq all npaq ą p. Then the map η n : Q p Ñ D p,n is a homeomorphism and the inverse map is well defined: η ´1 n : D p,n Ñ Q p .Thus the above wavelet expansion can be represented in internal multi-fractal terms: gptq " ÿ k;jn c k;jn ψ k;jn pη ´1 n ptqq Diffusion on Multifractals 2016, 18, 249 23 of 28 set now D p,npaq " η npaq pB r paqq and, finally: D p,n " YD p,npaq