Development of a Computer Application to Simulate Porous Structures

Geometric modeling is an important tool to evaluate structural parameters as well as to follow the application of stereological relationships. The obtention, visualization and analysis of volumetric images of the structure of materials, using computational geometric modeling, facilitates the determination of structural parameters of difficult experimental access, such as topological and morphological parameters. In this work, we developed a geometrical model implemented by computer software that simulates random pore structures. The number of nodes, number of branches (connections between nodes) and the number of isolated parts, are obtained. Also, the connectivity (C) is obtained from this application. Using a list of elements, nodes and branches, generated by the software, in AutoCAD command line format, the obtained structure can be viewed and analyzed.


Introduction
The determination of topological parameters is hard to get in laboratory because it requires the making of serial sections on the material 1,2 .Considering extremely small structures, like the ones obtained via sol-gel method, the determination of topological parameters can be even more difficult.In this case, it can be necessary to assume some shapes and coordination numbers for the structural elements and estimate these parameters based on measurable parameters, by using specific stereological relationships 3,4 .
In order to make it easier to analyze porous nanostructures and to allow visualization of topological parameters, we developed a computer software that implemented a geometric model, capable of simulate tridimensional porous structures.

Development
According to the microstructural description method developed by Vasconcelos 5 , we developed a modeling taking into consideration that the structural level of interest is the nanostructure and the structural elements to be analyzed are the pores, for which the connectivity is determinated.
Modeling aimed to simulate porous structures within a reasonable computational cost, to which the number, the dimension and the coordination of the structural elements are determinated.This was made possible by the applying of contour conditions, where the nodes of the structure are spherical and the connections between them, the branches, are cylindrical.In this way the diameter of the nodes, Dn, and the diameter of the branches, Db, are equal and are calculated according to the following stereological relationship 6,7 : where Vv is the volume fraction of pores, Sv is the surface area per unit volume of pores and λ 3 is the mean lineal intercept.
The average length of the branches, Hmed, is obtained by the geometrical relationship Eq. 2, where St is the total surface area of pores, Vt is the total pore volume, Nb is the number of branches and is given by the eq. 3.
The average length of the branches, Hmed, is also obtained by the following empiric relationship: Hmed = Dim × 0.986 × Nn -0.3594 (5)   where Dim is the length of the edge of the cube (simulated volume) .
This empiric relationship was obtained by generating random nodes inside a cube with the edge equal to Dim and by calculating the average of the four closest neighborhood nodes distance to each generated node.
At last, the number of nodes, eq.6, of the simulated structure, Nn, is estimated by using eqs 2 and 5.
The following equations show the relationships between: the specific surface area of the pores, Sg, and the total surface area of the pores, St, (eq.7); the specific pore volume, Vp, and the total pore volume, Vt, (eq.8); and the length of the edge of the cube, Dim, and the bulk density (eq.9).
where ρ t is the true density, ρ v is the bulk density and m is the mass of the sample.

Application
The software developed aimed to simulate structures where the pores are settled in random positions.The main structural elements of this structure, such as number of nodes and number of branches are known.The connectivity (C) is also obtained.
For the implementation of the representation and project steps we used the programming environment Delphi ® , based on Object Pascal programming language, which allowed us to develop low computational cost algorithms 8 .On the visualization step we used the AutoCAD ® software as a graphic computer and solid modeling environment 9 .

Data Input
The software is fed by the user with data that will determine the contour conditions used in the simulation.The necessary data, as well as their measure units, are described below.
One must provide as data input: specific pore volume (cm 3 /g); specific pore surface area (m 2 /g); density of the material (g/cm 3 ); mass of the sample (g); distribution of pore coordination numbers.
In the distribution of the coordination numbers, the user defines the percentage of connected pores to four, three, two or one neighbors (Cn4, Cn3, Cn2 and Cn1, respectively).The chosen values of connectivity will be used by the software to try to reach the initial aims, however, these values may be not reached.

Definition of the simulated volume
Taking into account that it is desirable to achieve a low  computational cost, the user can stablish a limit in the number of nodes to be generated by the software.Therefore, we limited the number of nodes that can be generated by the program from 10 to 1200.After defining the length of the edge of the cube, Dim, that delimitates the physical volume of the simulated structure, and the other required data input, the software is capable of simulate the porous structure.
The software identifies automatically a valid range for Dim, based on the number of nodes.

Generation of the structure
The generation of the structure is detailed in Fig. 2, where the steps of node generation, determination of the neighborhood and the branches generation are presented.

Node generation
The software considers that all nodes are spherical and have the same diameter.Therefore, they can be represented by the coordinates of a sphere center and its diameter.
The coordinates of the center of the node are generated randomly but the software does not allow that two different nodes intercept each other in the space.
By the end of the process, it is obtained a data file containing all the information about the generated structure that is useful as a source for the generation of output files that are imported by AutoCAD  .

Determination of the neighborhood
This step determinates the eight closest neighbors nodes of each generated node.The neighbors are determinated consulting the data file and storing the identification of the closest nodes, in increasing order of distance, for each node, determining its neighborhood region, Fig. 3.

Branch generation
The step of branch generation originates the branches that will be created when nodes are connected.These branches will be imported later by AutoCAD ® .The stage of branch generation verifies among the neighbors (neighborhood region) of a given node those with which it is possible to establish a connection.In order to be considered valid, a given connection must pass two tests: the shadow test and the intersection test.The shadow test verifies if the branch that is being generated has a common region with an intermediate node, Fig. 4a, while the intersec-

Text file generation
After the establishment of connection among the nodes, the software executes the text file generator, which saves to disk the files in TXT format, storing the commands and the information about the nodes and branches to be imported by AutoCAD ® .These files can be accessed later on, allowing the user to load in the software, data pertinent to a previous simulation and change its execution conditions.
To exemplify the application of the implemented model, we simulated porous structures of a material obtained via sol-gel method.The data referring to this material is shown in Table 1, in which we also present the data from the simulated structure.
Figure 5 presents the structure simulated referring to the material analyzed, while Fig. 6 presents obtained structures, of the same material, in several different sizes of Dim.

Conclusions
We elaborated a model using software development written in Object Pascal programming language (Delphi ® ), to simulate porous structures from which the number of nodes, the number of separated parts, the genus and the coordination numbers of pores can be estimated.
The software generates a list of structural elements, nodes and branches, which are imported by AutoCAD ® , in a way that this structure can be visualized and analyzed.
We compared the data from a real material, obtained via sol-gel, with the data of a simulated structure, and the results are satisfactory.

Figure 1 .
Figure 1.Structure showing nodes with different coordination numbers (NC).

Figure 2 .
Figure 2. Detailing the stage of generating the structure.

Figure 6 .
Figure 6.Simulated porous structures, for the same material, with Dim of 100 nm, 200 nm, 250 nm and 300 nm.

Figure 4 .
Figure 4. Examples of situations not allowed by the program: a) intersection between a branch and an intermediate node; b) intersection between two branches.

Figure 3 .
Figure 3. Neighborhood region defined by the sphere with center in the coordinates of the central node and radius equal to the distance between the central node and the eighth closest node.

Table 1 .
Comparisson between the real data, data from the proposed structure and, data from the simulated structure.All the items were calculated considering a cubic meter.