Figures - uploaded by Seweryn Lipiński

Author content

All figure content in this area was uploaded by Seweryn Lipiński

Content may be subject to copyright.

ResearchGate Logo

Discover the world's research

  • 20+ million members
  • 135+ million publications
  • 700k+ research projects

Join for free

Sobieski W., Lipiński S.: PathFinder User's Guide

PathFinder

User's Guide

(for version IV.3)

by

Wojciech Sobieski, Seweryn Lipiński

University of Warmia and Mazury in Olsztyn

The Faculty of Technical Sciences

Olsztyn (Poland), May 2016

1

Sobieski W., Lipiński S.: PathFinder User's Guide

2

Sobieski W., Lipiński S.: PathFinder User's Guide

Table of Contents

1 The PathFinder project........................................................................................................................................5

1.1 Introduction...................................................................................................................................................5

1.2 The PathFinder limitations..........................................................................................................................6

1.3 The PathFinder license................................................................................................................................6

1.4 The PathFinder and Free Software............................................................................................................7

1.5 The PathFinder basics..................................................................................................................................8

1.6 The PathFinder package..............................................................................................................................9

1.7 Compilation of the source code..............................................................................................................10

1.8 The PathFinder input file..........................................................................................................................10

1.9 Additional software needed by PathFinder............................................................................................11

1.10 PathFinder versions..................................................................................................................................12

2 The PathFinder algorithm.................................................................................................................................15

2.1 Calculating the domain range...................................................................................................................15

2.2 Calculating the default Initial Starting Point..........................................................................................16

2.3 Calculating the domain height..................................................................................................................16

2.4 Calculating the domain volume................................................................................................................17

2.5 Calculating the tortuosity..........................................................................................................................17

2.6 The coordinates of the centroid of the triangle...................................................................................20

2.7 The Ideal Location and its correction.....................................................................................................21

2.8 Calculating the porosity.............................................................................................................................22

2.9 Calculating the inner and the specific surface of the solid body.......................................................23

2.10 Smoothing the path..................................................................................................................................23

3 New calculation project......................................................................................................................................25

3.1 Basic steps....................................................................................................................................................25

3.2 Calculations settings...................................................................................................................................25

3.3 Running the calculations............................................................................................................................26

3.4 The basic visualization in Gnuplot environment..................................................................................31

3.5 The Comparison folder.............................................................................................................................34

4 PathGUI overlay..................................................................................................................................................38

4.1 General description....................................................................................................................................38

4.2 Handling tasks.............................................................................................................................................38

4.3 Configuration tabs......................................................................................................................................39

5 The visualization in ParaView software...........................................................................................................46

5.1 The visualization of the bed using VTK files.......................................................................................46

5.2 The visualization of the bed using CSV files........................................................................................46

5.3 The visualization of the path using VTK files......................................................................................48

5.4 The visualization of the path using CSV files.......................................................................................49

5.5 The visualization of tetrahedrons surrounding the path using VTK files.......................................50

5.6 The visualization of spheres surrounding the path using VTK files................................................52

5.7 Visualization of the tortuosity field.........................................................................................................53

5.8 Mixing the kinds of visualization.............................................................................................................53

5.9 Saving states.................................................................................................................................................55

3

Sobieski W., Lipiński S.: PathFinder User's Guide

6 The visualisation in the MayaVi software.......................................................................................................57

6.1 The MayaVi 1.5...........................................................................................................................................57

6.1.1 The visualization of the bed using VTK files...............................................................................57

6.1.2 The visualization of the path using VTK files.............................................................................60

6.1.3 The visualization of spheres surrounding the path using VTK files........................................61

6.1.4 The visualization of tetrahedrons surrounding the path using VTK files...............................61

6.2 The MayaVi 2.X..........................................................................................................................................64

6.2.1 Visualization of the bed....................................................................................................................64

6.2.2 Visualization of the path..................................................................................................................67

6.2.3 Visualization of the spheres.............................................................................................................69

6.2.4 Visualization of the tetrahedrons....................................................................................................70

7 Additional software.............................................................................................................................................73

7.1 File converter from YADE to PathFinder.............................................................................................73

7.2 File converter from LIGGGHTS to PathFinder..................................................................................74

7.3 File converter from PFC3D to PathFinder..............................................................................................75

7.4 Characteristic dimension calculator.........................................................................................................75

7.5 Porosity-tortuosity calculator....................................................................................................................77

7.6 Ergun Air Calculator..................................................................................................................................78

7.7 Kozeny-Carman Air Calculator................................................................................................................79

7.8 The Sensitivity Calculator..........................................................................................................................80

8 Publications..........................................................................................................................................................81

4

Sobieski W., Lipiński S.: PathFinder User's Guide

1 The PathFinder project

1.1 Introduction

PathFinder a program destined for analysis the spatial structure of granular beds, or its parts, of a

cylindrical or cubical shape. The program is available free of charge with source code and can be used

on Windows or Unix/Linux. The program needs additional software to work: gfortran compiler (for

compiling source code), the Gnuplot environment (for basic visualization and analysis of the

calculations) and ParaView (for the visualization and analysis of results). These programs are also

available free of charge under the GPL license for both Windows and Unix/Linux.

Path Tracking Method (PTM) – iterative method of determination of the length of pore channel in

the chosen space direction, which consists in analyzing the local structure of the pore space based on

vector geometry.

In the case of Pathfinder code, the length of pore channel is determined between two parallel planes

based on the sum of the unitary lengths, calculated based on so-called tetrahedral structures, which

establish the basis for the calculation algorithm (Fig. 1.1). Tetrahedral structures are created based on

the data on the location and diameter of each particle in the bed. The data for calculations are obtained

from DEM simulation or from the analysis of a set of tomography scans. Details concerning method

are available in the following subchapters.

Fig. 1.1. Schema of the tetrahedral structure

Wojciech Sobieski developed PTM for granular beds in 2009 during an internship at the University of

Manitoba in Winnipeg. The inspiration to start work on a method was observation, resulting from the

author's extensive experience in programming, that DEM simulation results can be used to analyze the

internal structure of porous media, in particular for the calculation of various geometrical parameters,

including tortuosity. In 2009, the first working version of the program was created; the process of its

creation was described in the Research Report No 1/2009 (in Polish) [18]. This report later became the

basis for several articles in peer-reviewed journals. In the first phase of the project, the determination

of tortuosity in porous media was investigated. Then other features were added. The PathFinder code

is still under development and the team working on it grows every year.

5

x1,y1,z1

x2,y2,z2

x3,y3,z3

x4,y4,z4

x0,y0,z0 xc,yc,z0

xIL,yIL,zIL

Initial Starting Point (ISP) Finally Starting Point (FSP)

tetrahedron top

current triangle

next triangle

Ideal Location (IL)

firts path section

second path section

bottom bed

surface

xc,yc,zc

Sobieski W., Lipiński S.: PathFinder User's Guide

Currently the PathFinder project is available on the Internet.

Home page of the project is www.uwm.ed u.pl/pathfinder.

On the project page, interested Reader can find more information, as well as download the source code

and additional tools.

1.2 The PathFinder limitations

Path Tracking Method was debveloped for the analysis of real beds, thus it has some limitations:

spheres cannot be regularly arranged in a space (e.g. in the form of a structural mesh).

variance of the spheres size distribution cannot be too high - tests have shown (using a bed of

beads having an average diameter of 6 [mm]) that the program works properly for variations

not higher than 1.1 [mm].

Fig. 1.2. An example of the deposit with a maximum possible variance

1.3 The PathFinder license

The conditions for using each of elements of the PathFinder project are as follows:

1. The software is free of charge and can be used for any purpose by institutions and individuals.

2. In case of publishing any material, for creation of which contributed the elements of the

PathFinder project, in particular scientific articles, their authors are required to cite suitable

articles from publications section, which is placed on the project website and in the User's

Guide.

3. In case of redistribution of the software, no part of the installation package can be removed, in

particular the terms of the license.

4. Copyright holders of each component of the project are indicated in the headers of the source

code or in the documentation.

5. The authors of the project are not responsible for any damage or losses resulting from the use

of software and the use of the information contained therein. The authors also assure that they

have made every effort to make the project error-free and containing reliable information.

6

Sobieski W., Lipiński S.: PathFinder User's Guide

1.4 The PathFinder and Free Software

The project assumes that all its elements should be created using free tools and each of these tools

should be available in both Windows (Fig. 1.3) and Unix/Linux (Fig. 1.4) if only it is possible.

Following applications are being used in the PathFinder project:

gfortran – a Fortran language compiler;

Edi a self-made programming environment for gfortran compiler (in Polish, only for

Windows);

Gnuplot – graphical environment;

ParaView – graphical post-processor;

MayaVi – graphical post-processor;

Lazarus – a RAD programming environment based on Free Pascal compiler;

LibreOffice – an office suite.

Fig. 1.3. The PathFinder software running under Ubuntu Linux

Fig. 1.4. The PathFinder software running under Windows 7

7

Sobieski W., Lipiński S.: PathFinder User's Guide

1.5 The PathFinder basics

The PathFinder software is intended for calculating a set of geometrical parameters of a porous bed,

when the data with locations and sizes of all particles is available. PathFinder in fact is only a solver and

so the visualization should be made in Gnuplot environment (during calculations) (Fig. 1.5) or in

ParaView software (after calculations) (Fig. 1.6). As an alternative, the final visualization may be

performed in MayaVi visualizer. Pathfinder automatically generates suitable output files for that

purpose, in a form of simple text, VTK or CSV format, as well as shell scripts for operating system.

Using other additional applications for results visualization is possible too.

The PathFinder code, as well as other described tools, may by used in Windows and UNIX/Linux. In

both operating systems, the effects of the PathFinder code execution and the procedures themselves

are the same.

Fig. 1.5. Visualization of the first tetrahedron in a calculated path

Fig. 1.6. Visualization of five paths calculated from different Initial Starting Points

8

Sobieski W., Lipiński S.: PathFinder User's Guide

1.6 The PathFinder package

The PathFinder is available for download from the project homepage as a compressed file. After

acceptance of the license and package download, the file should be decompressed in a known directory,

for which the user has full rights.

The general structure of the decompressed PathFinder folder (i.e. contained subfolders and files) is as

follows:

TheName – folder intended for the calculations, the project should be stored therein:

Comparison – subfolder in which the tortuosity distribution is collected, as well as files for

additional calculation tools,

Comparison isp_fc subfolder in which data for deviation analysis when the ISP is

defined by coordinates is collected,

Comparison isp_fp subfolder in which data for deviation analysis when the ISP is

defined by the percents of the axis ranges is collected,

Comparison isp_rg subfolder in which data for deviation analysis for the so-called

Regular Grid Method is collected,

Comparison shift_XX_YY subfolder in which data for deviation analysis for every

pair of xshift and yshift parameters for the so-called Standard Method is collected,

isp_fc → subfolder with results of calculations for the current path,

isp_fp → subfolder with results of calculations for the current path,

isp_rg → subfolder with results of calculations for the current path,

shift_XX_YY – subfolder with results for every pair of xshift and yshift parameters for the

so-called Standard Method,

TheName.dat – file with settings of the problem for PathFinder,

TheName.in – file with input data (see the description in Point 1.8),

PathFinder.f90 – main source code of PathFinder for Windows and Unix/Linux;

PathFinder.inc additional Fortran code containing procedures needed to create scripts for

data visualization in Gnuplot environment or the ParaView software;

PathFinder.sys – settings file with the short name of the used OS: win or lin;

PathFinder.exe – executable file for Windows OS;

PathFinder.out – executable file for Unix/Linux OS;

PathFinder.pdf – latest version of the User Guide;

TheName.bat – script running the calculations in Windows OS;

TheName.sh – script running the calculations in Unix /Linux OS.

Note, that there is no actual TheName folder and files after decompression. User should create it on

his own, as well as its content, according to instructions contained in this User's Guide.

The package may also include: examples of calculation problems; graphical interface for PathFinder;

additional calculation tools.

In the PathFinder software, a specification of the name of "TheName" folder and files is very

important. It is used for creating a directory containing the problem for calculation, making scripts for

running the calculations and as a call parameter.

TheName cannot contain spaces and should be short. It is advisable to include there a number of

spheres used in problem being solved, for example: "pfc3d_181888" (181888 spheres) or "yade_4000"

(4000 spheres).

9

Sobieski W., Lipiński S.: PathFinder User's Guide

After downloading and unpacking of the PathFinder package, the software may be used directly,

without compiling of the source codes. However, there is one crucial issue in Unix/Linux OSall

executable files (with *.out extension) and shell scripts (with *.sh extension) must have rights to

execution in the system. It can be made using any graphical interface or with the following instruction

in the console:

chmod +x TheName.sh

If something doesn't work correctly nonetheless, probably the compilation of source codes should

help.

1.7 Compilation of the source code

The PathFinder code is written in Fortran 90/95 language and may be compiled by the gfortran

compiler1 . It is freely available for many operating systems and easily installable. For details read the

gfortran documentation or the book [19] (available only in Polish).

The compilation of the source code:

open the PathFinder.sys file in the main PathFinder directory;

type "win" or "lin", depending on operating system (OS) being used;

open the shell console in the main PathFinder directory;

in the console type

gfortran PathFinder.f90 -o PathFinder.exe

in Windows OS or

gfortran PathFinder.f90 -o PathFinder.out

in Unix/Linux OS.

The code was tested on Windows XP, Windows Vista, Windows 7 and Ubuntu Linux with Xfce

graphical environment.

Make sure that the file can be executed in current location and with current user rights.

1.8 The PathFinder input file

The PathFinder software works with a text file with five columns containing information in following

order: consecutive numbers of each sphere, X, Y and Z-coordinates of centres of spheres and

diameters of spheres. The X and Y columns may be swapped, but the Z column must be always the

fourth. This is important because the data after reading is sorted by the

Z-coordinate. In data reading process, every line is considered as a new particle, so the number of lines

gives information about the bed size. Below is an example of such file (TheName.in):

1 0.85692400 0.52585399 0.33372900 0.05773420

2 0.29979801 0.34492999 0.44405901 005772760

3 0.54170299 0.33786801 0.81188297 0.05772080

...

1GCC Home Page [on-line]. URL: http://gcc.gnu.org/fortran/

10

Sobieski W., Lipiński S.: PathFinder User's Guide

After running the program, input data is saved also in VTK and CSV file formats.

Fig. 1.7. Examples of visualized paths

For PathFinder it is not relevant in which way the input file was generated. Currently there are two

main ways for obtaining appropriate data: using either results of the Discrete Element Method (DEM)

simulation or results of Computed Tomography and 3D Image Analysis. Two examples from the first

variant are shown in Fig. 1.7. The left presents a cylindrical domain with 18188 particles (DEM

simulation was made in PFC3D code2) and the right a cuboid domain with 4000 particles (DEM

simulation was made in YADE code3). Points visible in both examples represent spheres of the bed,

and the lines represent predicted paths of the fluid flow. The particles in both figures are rescaled

(diameters are smaller) – so the paths are more visible.

Note that in cases when the source geometry is complex (in DEM models or of the objects scanned by

using CT technique), only a representative part of the porous bed with appropriate shape can be

exported for the PathFinder needs.

1.9 Additional software needed by PathFinder

The PathFinder needs Gnuplot 4 environment and ParaView5 (or MayaVi Visualiser6) software for the

visualization.

In case of using Gnuplot environment, it is important that Gnuplot scripts (with PLT extension) may

be runned in the used operating system. The PathFinder automatically creates several scripts (into

TheName directory) for every calculation problem, which may be used during calculations. The settings

file TheName.dat contains parameters to configure the visualization process.

2 ITASCATM Home Page [on-line]. URL: http://www.itascacg.com/pfc3d/

3YADE Home Page [on-line]. URL: https://yade-dem.org/wiki/Yade

4 Gnuplot Home Page [on-line]. URL: http://www.gnuplot.info/

5 ParaView Home Page [on-line]. URL: http://www.paraview.org/

6 The MayaVi Data Visualizer [on-line]: URL: http://mayavi.sourceforge.net/

11

Sobieski W., Lipiński S.: PathFinder User's Guide

The Gnuplot environment and the ParaView software are both freely available in the Internet and very

easy to install.

1.10 PathFinder versions

PathFinder IV.3 ( 2016-03-01 ):

PathFinder – change in the definition of the so-called Quality Indicator;

PathFinder – addition of a switch for saving the data for path deviation analysis;

PathFinder addition of two new Gnuplot scripts (Comp_np.plt and Comp_tau.plt) for

comparing some results in the Standard Method;

PathFinder – separation of Gnuplot scripts for visualisation of the tortuosity distribution (for

the Standard Method) and the tortuosity field (for the Regular Grid Method);

PathFinder – addition of a VTK file for visualisation of the tortuosity map;

PathFinder – change in format of *.res files;

PathFinder – change in format of the Final Report;

PathFinder – correction of an error in the Final Report;

PathFinder – correction of an error in the script "plot_current.plt";

PathFinder – correction of an error in the Regular Grid Method for cases in with the Z axis is

shifted;

PathFinder – removal of the calculation of the tortuosity by Yu-Li formula;

pathGUI – addition of different ISP schemes for cuboid and cylindrical beds as well as for the

Regular Grid Method;

Add-ons – addition of features of creating VTK files in the Convert-YADE tool;

Add-ons – addition of a possibility to run the Convert-YADE tool with call paramethers;

Add-ons addition of a possibility to run Convert-YADE program by the use of call

paramethers;

Add-ons addition of a new tool for calculation the characteristic dimension for the YADE

code and the Particle Growing Method;

Add-ons addition of a new program for data conversion from the LIGGGHTS code to

PathFinder.

PathFinder IV.2 ( 2015-11-09 ):

PathFinder – addition of the so-called Regular Grid Method;

PathFinder – addition of a new Gnuplot script for visualisation the tortuosity field;

pathGUI – adaptation to the Regular Grid Method;

User Guide – actualization of the documentation.

PathFinder IV.1.1 ( 2015-10-23 ):

User's Guide – proposition of a general name of the approach developed by Wojciech Sobieski

(Path Tracking Method);

User's Guide clarifying who is the Author of ideas described in the Research Report No

1/2009 [18];

User's Guide – addition of the Chapter 5 (visualisation of results in the MayaVi software);

User's Guide – updating the publication list.

PathFinder IV.1 ( 2014-05-07 ):

PathFinder – addition of a new option for calculating the centre of the triangle, given as the

12

Sobieski W., Lipiński S.: PathFinder User's Guide

geometric centre of the wet part of the triangle;

PathFinder – addition of a new option, computing total area and wet area for each triangle;

PathFinder – addition of a new option, computing total perimeter, wet perimeter and friction

perimeter for each triangle;

PathFinder – calculation of the specific surface area as defined by Kozeny and Carman

PathFinder – addition of the possibility of calculating the deviation for path points

PathFinder – addition of the option visualizing deviation of path points from the plumb-line

PathFinder addition of an option visualizing spatial step changes in path points on Z

directions;

PathFinder – addition of an option of adjusting the distance of ISP points from the centre of

the basis of computational domain;

PathFinder – addition of an automatic creation of subdirectories with the results for each pair

of xshift and yshift (changes in the organization of files and directories);

PathFinder – increased choice of the number of ISP points (from 5 to 9);

PathFinder – change in organization of the selection of ISP points;

PathFinder – addition of a option of calculating paths for all nine ISP points in one loop;

Convert PFC3D – changes in code organization;

Convert PFC3Daddition of a conversion option for file containing the data of diameters

(previously only coordinates were converted);

Sensitivity Calculator addition of a choice of the definition of the specific surface area (as

defined by Kozeny or Carman);

User Guide – actualization of the documentation;

User Guide replacement of incorrect figures in the description of tortuosity calculation

algorithm

User Guide addition of a description for the calculation of the specific surface area as

defined by Kozeny and Carman

PathFinder IV.0 (2013-10-03):

modification of the code and adapting it to work on Windows and Unix/Linux;

organization of a code and changes in naming of variables and output files;

reduction of the number of output files and data storage reorganization;

update of PLT scripts and adapting them to the new version of Gnuplot environment;

removal of the original graphical front end previously used for displaying results of

calculations;

addition of a calculation example, generated with the use of Discrete Element Method in

YADE program;

development (in Fortran language) of the program for converting YADE files to Pathfinder

input format;

development (in Fortran language) new version of the program for converting PFC3D files to

Pathfinder input format;

addition of a possibility of selection of computational domain type: cylindrical or cubical;

addition of modules generating VTK and CSV files (for the needs of visualization in ParaView

environment);

development of ways to visualize the results in ParaView environment;

addition of a User's Guide;

development (in Lazarus environment) of program graphical interface (PathGUI program).

PathFinder III (2010-11-04):

code modifications and adapting it to work with various computational problems;

13

Sobieski W., Lipiński S.: PathFinder User's Guide

adaptation of the program to work with deposits of non-uniform particle diameters;

organization and optimization of the source code;

changes in organization of writing the results of calculations;

changes in organization of visualization of results in Gnuplot environment.

PathFinder II (2010-02-05):

development of algorithms to determine all the geometrical parameters present in Ergun and

Kozeny-Carman laws;

development of program for testing the sensitivity of Ergun and Kozeny-Carman models

(Sensitivity Calculator);

addition of a data storage module for the Sensitivity Calculator program;

addition of a program for calculating the values of Ergun equation for air flow and parameters

obtained from the PathFinder program (Ergun Calculator);

addition of a program for calculating the values of Kozeny-Carman equation for air flow and

parameters obtained from the PathFinder program (Kozeny-Carman Calculator);

addition of a module for storing comparative data in a Comparison directory;

removal of unnecessary fragments of the code.

PathFinder I (2009-12-10):

development of the final version of the algorithm for calculating tortuosity in granular bed;

development of a method for visualizing the results of calculations using scripts of Gnuplot

environment;

development of graphical front end (using Borland Delphi environment and OpenGL library)

destined for displaying the results of calculations;

development of the program (in Borland Delphi environment) for converting PFC3D files to

Pathfinder input files.

14

Sobieski W., Lipiński S.: PathFinder User's Guide

2 The PathFinder algorithm

2.1 Calculating the domain range

All spheres in the bed are described by 5 variables (given as columns, as it was previously described):

– number of the ith sphere,

– X coordinate of the ith sphere centre,

– Y coordinate of the ith sphere centre,

– Z coordinate of the ith sphere centre,

– diameter of the ith sphere.

The total number of spheres in the bed is denoted by

.

In the first step, all spheres are sorted by the Z coordinate. In this way, the sphere lying lowest in the

bed has the index

and the highest sphere index is

. In determination of the Z-axis

range, the particle diameters are taken into account (Fig. 2.1):

. (2.1)

Note, that if the bottom surface of the bed is horizontal and flat, many particles have the lowest

surface point in the same XY plane.

Fig. 2.1. Calculating the location of the bottom surface of the bed

In the same way the highest point in the bed on the top surface is calculated (Fig. 2.2)

(2.2)

as well as ranges of X and Y axis

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 2.2. Calculating the location of the top surface of the bed

In real beds, the bottom and the lateral surfaces usually limit the locations of particles. However, the

top surface can be uneven and some particles may protrude from the bed. In this case, "empty area" in

the bed exists, what may give inaccuracies in calculations. To avoid this, all protruding particles should

be discarded from the calculations (Fig. 2.3). The number of discarded particles is described by the

variable

. Also, notice the small red particle right to the particle determining the height of the

bed (before discarding protruding particles). Despite it has the highest value of Z coordinate, due to its

small diameter it is not recognized by the algorithm as the highest sphere in the bed.

Fig. 2.3. Visualization of the idea of rejecting protrudes particles: the empty volume is not taken into account

2.2 Calculating the default Initial Starting Point

The default Initial Starting Point, from which the algorithm starts, is calculated as

denotes the ISP.

In the PathFinder source code, the same variables are then used for the Final Starting Point.

2.3 Calculating the domain height

The domain height is calculated as

L0 = zn s ns_rej +0.5 dn s ns_rej zmin

Sobieski W., Lipiński S.: PathFinder User's Guide

where:

- the Z coordinate of the highest used in calculations sphere in the bed [m],

- radius of the highest used in calculations sphere in the bed [m],

- the Z coordinate of the bottom surface of the bed [m].

2.4 Calculating the domain volume

In the PathFinder code calculations can be performed in porous beds of cuboid or cylindrical shape. In

the first case the volume of the bed is calculated from the formula:

V=( xmax xmin )( ymax ymin )

[

zn s ns_rej +0.5 dn s ns_rej zmin

]

- volume of the porous bed (the domain) [m3 ],

- the furthest point of the sphere surface in the positive direction of the X axis [m],

- the furthest point of the sphere surface in the negative direction of the X axis [m],

- the furthest point of the sphere surface in the positive direction of the Y axis [m],

- the furthest point of the sphere surface in the negative direction of the Y axis [m],

- the Z coordinate of the highest sphere used in calculations [m],

- the diameter of the highest sphere used in calculations [m],

- the Z coordinate of the bottom surface of the bed [m],

- total number of spheres (equal to the number of lines in the input data file) [-],

- a number of spheres discarded from the calculations [-].

When the porous bed has a cylindrical shape, the domain volume is calculated as follows:

V=π⋅ dcyl

2

4

[

zn s ns_rej +0.5 dn s ns_rej zmin

]

is the diameter of the cylinder [m], calculated as the average range of X and Y axis:

dcyl =1

2

[

(xmax xmin )+( ymax ymin )

]

. (2.9)

Note, that the expression in square brackets in formulas (2.7) and (2.8) is equal to the height of the

domain.

2.5 Calculating the tortuosity

Tortuosity is the ratio of the actual length of flow path to the physical depth of a porous bed:

Sobieski W., Lipiński S.: PathFinder User's Guide

- the length of the flow path [m],

- the depth of the porous bed [m].

The algorithm for calculating the length

in PathFinder was described in details in the report [18]

and next in the paper [9]. Summarized procedure is presented below:

a) arbitrarily choose an Initial Starting Point (ISP) at the bottom of the porous bed (Fig. 2.4);

b) find three nearest particles to the ISP (Fig. 2.5) that form a triangle in the space (Fig. 2.6);

c) calculate the coordinates of the centre of gravity of the surface (in the triangle plane) through

which fluid flows (Fig. 2.7);

d) move the Initial Starting Point to the Final Starting Point (FSP) (Fig. 2.8) - in this way the first

path section is perpendicular to the bottom surface of the bed;

e) calculate the normal to the triangle, in the direction of Z axis (Fig. 2.9);

f) estimate coordinates of so called Ideal Location (IL), in which should be located the next

sphere surrounding the path (Fig. 2.10);

g) move the Ideal Location closer to the triangle centre (Fig. 2.11) (details in Point 2.7);

h) find the nearest particle to the Ideal Location (2.12) - this is the Real Location (RL) of the 4-th

particle forming tetrahedron in the space (Fig. 2.13);

i) remove the lowest sphere from tetrahedron 1-2-3-4 to obtain the base triangle for the next

tetrahedron (Fig. 2.14);

j) continue the calculations from the point c), until reaching the top surface of the bed;

k) calculate the length of the path inside the tetrahedron (a flow path is a line connecting the

centroid of the base triangle with the centroid of one of the three side triangles) (Fig. 2.15);

l) smooth the path and calculate the path length

.

Fig. 2.4. An Initial Starting Point Fig. 2.5. Three nearest particles to the ISP

Fig. 2.6. Triangle formed by the particles Fig. 2.7. The gravity centre of the current triangle

18

Initial Starting Point (ISP)

ISP ISP

ISP

current gravity centre

ISP

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 2.8. The Final Starting Point Fig. 2.9. The triangle normal

Fig. 2.10. The Ideal Location Fig. 2.11. The Ideal Location after correction

Fig. 2.12. The sphere nearest to the IL Fig. 2.13. The tetrahedron

Fig. 2.14. The next triangle Fig. 2.15. Path sections

19

Final Starting Point (FSP)

FSP

ISP

triangle normal

FSP

ISP

Ideal Location

FSP

ISP

FSP

IL

ISP

Real Location

FSP

IL

ISP

RL

FSP

ISP

FSP

ISP

next triangle

Sobieski W., Lipiński S.: PathFinder User's Guide

The algorithm stops when the distance between the gravity centre and the Ideal Location is smaller

than the distance between the top surface of the bed and the Z coordinate of the Ideal Location.

, (2.11)

The last section is perpendicular to the top surface of the bed.

The number of path points is bigger by two than the number of tetrahedrons used for searching the

path sections.

2.6 The coordinates of the centroid of the triangle

The algorithm for calculating the centre of gravity of the shape, through which fluid flows is described

in details in the work [4]. This algorithm contains of two steps. At first, coordinates of all basic figures

are calculated (one triangle and three circle segments) and next the summation method is used to

calculate coordinates of the resultant centre of gravity of the set of basic shapes (Fig. 2.16)

xgc = A t xtc A1

xS1 A2

xS2 A3

xS3

At A 1A 2A 3

ygc = A t

ytc A1

yS1 A 2

yS2 A 3

yS3

At A1 A2 A3

zgc = A t

ztc A1

zS1 A 2

zS2 A 3

zS3

At A1 A2 A3

- coordinates of the obtained centre of gravity [m],

- area of the current triangle [m 2 ],

- coordinates of the current triangle centre [m],

- areas of circle segments [m2 ],

- coordinates of gravity centres (denoted by the

sign) of circle segments [m].

Fig. 2.16. The shape, through which fluid flows and its gravity centre

20

Sobieski W., Lipiński S.: PathFinder User's Guide

2.7 The Ideal Location and its correction

For calculating the Ideal Location, a characteristic dimension is used. It can be the average length of the

current triangle sides

(recommended) or the average diameter of spheres

forming the

current triangle. In consecutive calculations it was assumed, that the tetrahedron is regular and all sides

have lengths equal to the characteristic dimension. In that case, the height of such tetrahedron may be

calculated from the simple formula

- the predicted distance between the IL and the triangle plane [m],

- the characteristic dimension [m].

The height

is measured on the triangle normal in the direction of increasing values of the Z

coordinates.

In real systems, particles forming a triangle may do not touch each other, what causes that the fourth

particle falls partly between them. In extreme cases, the fourth particle can slide completely between

particles forming the triangle. That can happens if the actual triangle area is three times larger than the

area of a triangle with side equal to the average diameter of the spheres forming the current triangle. In

that case a correction algorithm is used (it may be turned off using the settings file) and three new

particles close to the current triangle centre are then searched. The number of such corrected triangles

is shown in the final report. This normalized critical area of the triangle is also included in the settings

file, but it should not be changed.

Usually the area of the real triangle is far from the critical area and the "sinking" effect is small, but not

to omit. Therefore, the formula (2.13) should rather be defined as follows

is a correction coefficient for Ideal Location [-]. This coefficient may be defined (in the

settings file) as a constant value

hcor = f( IA )= 1 exp

(

a( IA b )

)

1+exp

(

a ( IA b )

)

- the area indicator [-],

- a coefficient (obtained in earlier numerical investigations [18]), respondent for the function

gradient and equal to

- a coefficient (obtained in earlier numerical investigations [18]), equal

21

Sobieski W., Lipiński S.: PathFinder User's Guide

to average value of normalized triangle area for the whole porous bed, with value equal to

[-].

The area indicator is defined as

, (2.17)

where the current triangle area

is calculated from the Heron formula

Ai =

L

2

(

L

2a

)

(

L

2b

)

(

L

2c

)

(2.18)

and the area of reference triangle

(triangle with all sides equal to the characteristic dimension) as

in formula (2.18) denotes lengths of current triangle sides [m].

The details about this issue as well as the way of obtaining all constants are described in a research

report [18], which was written parallel to performing implementation actions. This report contains

descriptions of many issues not mentioned here and shows the process of creation the final PathFinder

code.

2.8 Calculating the porosity

Having information about diameters of all particles in the bed, the volume of the solid body can be

calculated as follows

Vs =

i=1

ns ns_rej 1

6π di

3

- volume of the solid part of the porous body [m3 ],

- the diameter of the ith particle in the bed [m].

Using the formula (2.7) or (2.8) and the equation (2.20), the porosity of the granular bed may be

consequently calculated as

- porosity (the ratio of the pore volume to the volume of the domain) [-],

- volume of the

pore part of a porous body [m3 ].

22

Sobieski W., Lipiński S.: PathFinder User's Guide

2.9 Calculating the inner and the specific surface of the solid body

The inner surface of the solid body may be obtained from the formula

- the inner surface of the solid body [m2 ],

- the surface of the solid body [m2 ].

Equation (1.17) is true under the assumption that the particles forming the bed are rigid – in that case,

contact between them is limited to the points. In the case of deformable particles, formula (1.17)

describes the theoretical maximum surface area (actual inner surface of such a deposit is smaller, due to

the presence of non-zero contact surfaces).

The specific surface of the porous body is calculated in two ways, according to the Kozeny theory [1,2]

(2.23)

and to the Carman theory [5]

- the specific surface of the porous body [1/m].

The relationship between both definition is as follows

S0, Kozeny

S0,Carman

=

Ss

V

Ss

Vs

=Vs

V= V( 1 e )

V=1e

. (2.25)

The approach to the definition of the specific surface of the porous body is one of the differences

between the Kozeny equation and the Carman formula [5].

2.10 Smoothing the path

The PathFinder allows using an optional smoothing algorithm, which shortens the length of the path.

It was introduced on the basis of a fact, that fluid cannot turn suddenly at a point (Fig. 2.17).

The length of the smoothed path is calculated as follows (Fig. 2.18):

Lp

smooth= 1

2

(

a1 + bn p

)

+

2

np 11

2

(

ai + bi

)

f (ωi)

Sobieski W., Lipiński S.: PathFinder User's Guide

where:

- the length of the smoothed path [m],

- the length of the first path section [m],

- the length of the last path section [m],

- the length of first path section forming the ith angle [m],

- the length of second path section forming the ith angle [m],

- the angle between two path sections [°],

- the total number of path sections [-],

[-].

Fig. 2.17. The idea of path smoothing

The degree of shortening the length of the path depends on the current angle and it grows as more

acute is following angle

f i )= exp

(

ωa

(ωiωb)

)

1+ exp

(

ωa

(ωiωb)

)

- constant equal to the right angle (90) [°].

For

is equal to one.

More details of the theoretical basis of the PathFinder code the Reader can find in work [9] as well as

in the research report [18].

Fig. 2.18. The smoothing method

24

Sobieski W., Lipiński S.: PathFinder User's Guide

3 New calculation project

3.1 Basic steps

To start solving a new problem, following steps should be undertaken:

create a directory called TheName in the main PathFinder directory;

create the input file (TheName.in) inside TheName directory (see the Point 1.8);

create the settings file (TheName.dat) inside TheName directory;

optionally create a script (TheName.bat or TheName.sh) running the calculations, in the main

PathFinder directory.

3.2 Calculations settings

All settings are collected in the TheName.dat file located inside TheName directory. It is a simple text

file and can be easily edited using for example Notepad in Windows or Kate in Unix/Linux.

The settings file TheName.dat may be copied from an example included in the PathFinder package,

created manually or created using a graphical interface (see point 4.1).

Typical content of the settings file is as follows:

Y !lic - acceptance of the licence terms: Y (yes), N (no)

cub !domain - domain geometry: cub (cuboids), cyl (cylinder)

al !isp ISP location: 00, +-, 0-, --, -0, -+, 0+, ++, ff (file), fm (menu), al (SM), rg (RGM)

0.5 !xshift - shift of the ISP from the axis centre in X direction

0.5 !yshift - shift of the ISP from the axis centre in Y direction

0 !ns_rej - number of particles rejected from the top surface

2 !tr_cen - method for calculating the triangle center

1 !char_dim - characteristic dimension for the IL: 1 (l_ave), 2 (d_ave), 0 (ask for method)

2 !il_cor - correction method for the IL: 1 (constant value), 2 (function), 0 (ask for method)

0.5 !il_c_cor - correction coefficient for the constant method

8 !il_a_cor - function parameter a for the function method

1.3 !il_b_cor - function parameter b for the function method

Y !cr_ar_cor - correction based on critical area of the triangle: Y (yes), N (no)

3 !cr_ar - critical area of the triangle

Y !smooth - smoothing: Y (yes), N (no)

0.07 !omega_a - a coefficient in the smoothing algorithm

90 !omega_b - b coefficient in the smoothing algorithm

N !draw_d - drawing particle diameters: Y (yes), N (no)

N !draw_first - drawing the first tetrahedron:

N !draw_current - drawing tetrahedrons during calculations or not: Y (yes), N (no)

N !draw_area - drawing the areas of triangles: Y (yes), N (no)

N !draw_perimeter - drawing the perimeters of triangles: Y (yes), N (no)

N !draw_ch - drawing values of correction coefficient (for C_h or C_h_f): Y (yes), N (no)

N !draw_if - drawing the quality indicator IF: Y (yes), N (no)

N !draw_normal - drawing angle between normal and Z-axis: Y (yes), N (no)

Y !draw_final - drawing the final path: Y (yes), N (no)

N !save_csv - save the CSV files: Y (yes), N (no)

Y !save_dev - save files with path points deviation: Y (yes), N (no)

End

NOTE: do not change parameters values marked with the grey background.

It is very important to set the shape of the domain. If you make a mistake, the porosity will be

calculated erroneously. Details considering all the parameters one can find in article [9].

25

Sobieski W., Lipiński S.: PathFinder User's Guide

3.3 Running the calculations

To run a new calculations go to the main PathFinder directory and in the console, type:

PathFinder.exe TheName number_of_spheres

in Windows or

PathFinder.out TheName number_of_spheres

in Unix/Linux.

The PathFinder software needs to work with two call parameters: TheName and the number of

spheres saved in TheName.in file.

To simplify calling the program appropriate shell scripts may be created: BAT files in Windows and SH

files in Unix/Linux.

An example of the BAT file in Windows:

PathFinder.exe yade_4000 4000

pause

An example of the SH file in Unix/Linux:

xfce4-terminal -x './PathFinder.out yade_4000 4000'

The name of terminal in Unix/Linux operating system depends on the used graphical environment.

The above example was used in Ubuntu Linux with the Xfce graphical environment.

The Initial Starting Point (ISP) must be chosen for performing the calculations. Currently such options

are available:

Choosing ISP directly in the settings file as one of 9 default locations. The description of

point location contains two signs (3.1): the first refers to the X axis, the second to the Y axis.

Both signs may have values: "–" (the negative part of the axis), "0" (zero point of the axis) and

"+" (the positive part of the axis). The combination of signs is as follows: +0, +–, 0–, ––, –0, –

+, 0+, ++, 00.

Fig. 3.1. Default locations of the Initial Starting Point for both types of domain

26

xshiftxshift xshift

yshift

yshift

Sobieski W., Lipiński S.: PathFinder User's Guide

By default, all points surrounding the zero point of X and Y axis are located in the middle of

the segment connecting the zero point and the domain wall. This distance may be changed

using xshift and yshift options in the settings file. These coefficients may be between 0 (the ISP

located in the zero point the middle of the bottom domain wall) and 1 (the ISP located on

the wall). The default values for both coefficients are equal to 0.5. In cylindrical domain only

the xshift is used – to define the distance between the zero point and the wall.

Choosing ISP after running the program as one of 9 default locations (Fig. 3.2). To use

this option, the ISP method must be specified as "fm" (from menu) in the settings file.

Fig. 3.2. Choice of Initial Starting Points in the menu

Running calculations for all characteristic Initial Starting Points in one loop. In this case,

the ISP method must be specified as "al" (all). Then all 9 paths (+0, +–, 0–, ––, –0, –+, 0+, +

+, 00) will be calculated and saved in a subdirectory in TheName folder. The use of this

approach three times, with xshift and yshift equal to 0.25, 0.5 and 0.75, is here called the

Standard Method.

Using the so-called Regular Grid Method. In this approach, both ranges of coordinates in

the X and Y directions are divided into

points, respectively. Next, in a loop, all

these points are used as ISPs. With this method, for one bed,

paths lengths may be

calculated.

Fig. 3.3. Defining the Initial Starting Point in the Regular Grid Method

27

Sobieski W., Lipiński S.: PathFinder User's Guide

In this case, a file TheName.rg in TheName directory must exist. This is a text file with two

integer values equal to

. The coordinates of next ISPs are calculated based on

the ranges of X and Y axes and the appropriate steps in space. The minimum value on the Z-

axis in whole bed is used as the Z coordinate. For example:

10 10

To use this option, the ISP method must be specified as "rg" in the settings file.

If option "rg" for location of the ISP is set in the TheName.dat file, the question about choice

of the ISP location will not be displayed.

Defining ISP in a file using the "fc" (from coordinates) setting (Fig. 3.4). In this case a file

TheName.fc in TheName directory must exist. This is a text file with two real or double values

equal to the X and Y-coordinates of the initial point (the minimum value on the Z-axis in whole

bed is used as the Z coordinate). For example:

0.1 0.04

If option "fc" for location of the ISP is set in the TheName.dat file, the question about

choosing the ISP location will not be displayed.

Fig. 3.4. Defining the Initial Starting Point by coordinates

Defining ISP in a file using the "fp" (from percent) setting (Fig. 3.5). In this case a file

TheName.fp in TheName directory must exist. This is a text file with two real/double values,

equal to the percents of ranges of the coordinates in X and Y direction (the minimum value on

the Z-axis in whole bed is used as the Z coordinate). For example:

25 25

If option "fp" for location of the ISP is set in the TheName.dat file, the question about

choosing the ISP location will not be displayed.

28

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 3.5. Defining the Initial Starting Point by percents

After defining the method of ISP choice, the iteration process is initialized. During calculations,

number of the current tetrahedron and the numbers of spheres forming the current tetrahedron are

printed in the console (Fig. 3.6).

Fig. 3.6. Printing the progress of calculations

At the end, a final report, containing used settings and results of calculations, will be shown in the

console. The same data is always saved in the TheName_XX.txt file in the current results subdirectory

(Fig. 3.7). The sign XX gives the information about the ISP location (Fig. 3.1).

If one of the default 9 ISPs is used, the results are saved in the "shift_XX_YY" subfolder in TheName

directory. When ISP is defined in a file, the subfolder is named "isp_ff ". Here for every case the same

"isp_ff " subdirectory is used – if ISP coordinates in the file are changed, the results in this subfolder

will be overwritten.

29

Sobieski W., Lipiński S.: PathFinder User's Guide

------------------------------------------------------------------

| PathFinder code - Copyright (C) Wojciech Sobieski 2009-2016 |

------------------------------------------------------------------

Final report (the bed):

domain geomoetry : cuboids

X-axis range [m] : -0.000143 0.079332

Y-axis range [m] : -0.000124 0.079291

Z-axis range [m] : -0.000097 0.158477

bed size in X-direction [m] : 0.079475

bed size in Y-direction [m] : 0.079415

bed size in Z-direction [m] : 0.158574

number of particles [-] : 5000

min. diameter [m] : 0.005897

max. diameter [m] : 0.006266

average diameter [m] : 0.006072

Final report (settings):

location of the Initial Starting Point (ISP) : 00

number of particles rejected from the top surface : 0

method for calculating the triangle center : gc

characteristic dimension for the Ideal Location : l_ave

correction method for the Ideal Location (IL) : function

correction coefficient for the constant method : 0.5000

function parameter a for the function method : 8.0000

function parameter b for the function method : 1.3000

correction based on critical area of the triangle : Yes

critical normalized area of the triangle : 3.00

use the smoothing algorithm : Yes

function parameter a for the smoothing function : 0.0700

function parameter b for the smoothing function : 90.0000

Final report (results):

number of path points [-] : 84

number of path rejected points [-] : 0

number of corrected trangles [-] : 0

bed height [m] : 0.158570

length of the path [m] : 0.189968

length of the path after smoothing [m] : 0.183787

tortuosity [m/m] : 1.198012

tortuosity after smoothing [m/m] : 1.159032

average angle between path sections [^o] : 142.084619

inner surface of the solid body [m^2] : 0.579236

specific surface of the porous body (K)[1/m] : 578.764248

specific surface of the porous body {C}[1/m] : 987.953544

volume of the bed [m^3] : 0.001001

volume of the solid part [m^3] : 0.000586

volume of the porous body [m^3] : 0.000415

porosity [m^3/m^3] : 0.414179

packing coefficient [m^3/m^3] : 0.585821

Ergun A [1/m^2] : 19649597.005455

Ergun 2*B [1/m] : 4752.450777

Kozeny-Carman (C_KC=1) [1/m^2] : 6766473.535653

The time of calculations [s] : 20.982134

Fig. 3.7. A final report (YADE example)

Depending on options in the TheName.dat file, visualizations in Gnuplot are available or not. In order

to work correctly, the Gnuplot environment must be installed in the OS. Make sure, that the PLT

extension is associated with the Gnuplot. In other case, the basic visualization won't be available.

30

Sobieski W., Lipiński S.: PathFinder User's Guide

3.4 The basic visualization in Gnuplot environment

During calculations, following drawings/figures/diagrams may be shown (in order of appearing):

the diameters of all particles in the bed – function

(Fig. 3.8);

distribution of the particle diameters diagram showing how many particles have the same

diameter (Fig. 3.9);

the drawing of the current tetrahedron (not in a scale) (Fig. 3.10);

the final path (not in a scale) (Fig. 3.11) - in the figure, the current path, as well as centres of

spheres surrounding this path, are visible;

the distribution of the triangle areas forming tetrahedrons basis (Fig. 3.12) - the greater this

value, the more irregular arrangement of the particles is;

the distribution of the triangle perimeters forming tetrahedrons basis (Fig. 3.13) - the greater

the value, the more irregular arrangement of the particles is;

the distribution of value of correction coefficient or correction function for all tetrahedrons

(Fig. 3.14) - the smaller is this value, the more irregular shape has the basis of the current

tetrahedron;

the distribution of the quality

indicator for all tetrahedrons (Fig. 3.15) - the greater the

deviation of this value, the worse is quality of predicted location of fourth particle forming the

tetrahedral structure;

the distribution of angles between triangle normals and Z-axis for all tetrahedrons (Fig. 3.16).

Fig. 3.8. The function

Fig. 3.9. The histogram of distribution of the particle diameters

31

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 3.10. The visualization of the current (here no 1) tetrahedron

Fig. 3.11. The visualization of the final path

Fig. 3.12. The distribution of the triangle areas forming tetrahedrons basis

Fig. 3.13. The distribution of the triangle perimeters forming tetrahedrons basis

32

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 3.14. The distribution of value of correction coefficient or correction function for all tetrahedron

Fig. 3.15. The distribution of the quality

indicator for all tetrahedrons

Fig. 3.16. The distribution of the angle between triangle normals and the Z-axis for all tetrahedrons

By default only the final path is shown.

All PLT scripts may be run later (apart from the script Plot_current.plt), but only results of the last

calculation are available. If all 9 paths are calculated in one loop (the ISP option is equal to "al"), the

path from ISP equal to "00" is calculated as the last. Needed files are described in Table 3.1.

Sometimes in Linux OS the graphical GUI of Gnuplot is not available by default. In this case type in

the console:

sudo apt-get install gnuplot-x11

33

Sobieski W., Lipiński S.: PathFinder User's Guide

To connect the PLT scripts with the Gnuplot environment use the Right Mouse Button and define

which application should open the chosen kind of files by default.

3.5 The Comparison folder

In Comparison folder contains following files:

"Comparison.txt" a file in which part of the results is collected. A new line with results is

added for every PathFinder calculation. The file must be deleted or moved to start a new set of

results. This file contains: the characteristic dimension, the method of predicting the Ideal

Location, the number of spheres, the number of spheres rejected from the top surface, the

number of path points, the number of rejected path points (duplicates), the average quality

indicator, the number of corrected triangles, the tortuosity, the tortuosity after smoothing, and

the ISP location.

"Comparison_isp.txt" – a file in which part of the results is collected. A new line with results is

added for every PathFinder calculation. The file must be deleted or moved to start a new set of

results. This file contains: TheName of the current example, the ISP location, X, Y and Z

coordinates of the first point in the path (the Final Starting Point), X, Y and Z coordinates of

the last point in the path, the number of path points, the tortuosity, the maximum point

deviation from the vertical line started from the ISP, and the point deviation for the last point in

the path. This file may be used for visualisation of the tortuosity distribution for all used ISPs

(Fig. 3.19). This file is used for saving data for different approaches foor ISPs choices, such as:

00, +-, 0-, --, -0, -+, 0+, ++, "fc" and "fp".

"Comparison_rg.txt" a file with the same data like in the previous file, but only for the

Regular Grid Method.

A set of files with ".pf " extension, given in subdirectories ("isp_fc", "isp_fp", "isp_rg" and

"shift_XX_YY", where XX and YY denotes signs 00, +-, 0-, --, -0, -+, 0+, ++, see Point 3.3).

In this file, three columns for every path are collected: the Z coordinate of the current path

point, the distance between the current point and his neighbouring point located below, and the

distance between all path points and the vertical line started from the ISP. These files may be

used for visualisation of the deviation of path points location from a vertical line started from

FSP (Fig. 3.21) or for visualisation of the distance between adjacent path points in Z direction

(Fig. 3.22)

"d-e-tau-s0.pf " – a file with average diameter of all particles in the bed, porosity, tortuosity and

values of the specific surface in Kozeny and Carman definition;

"e_d_a_E.pf " – a file with porosity, average diameter of all particles in the bed and value of A

term of Ergun equation;

"e_d_b_E.pf " – a file with porosity, average diameter of all particles in the bed and value of B

term of Ergun equation;

"e_s0_a_KC.pf"– a file with porosity, values of specific surface in Kozeny and Carman

definition and A term of Kozeny-Carman equation.

"e_tau_a_KC.pf" a file with the porosity, the tortuosity and A term of Kozeny-Carman

equation.

Last 5 files may by used by additional software described in the Point 7.8.

34

Sobieski W., Lipiński S.: PathFinder User's Guide

In the Comparison directory, four Gnuplot scripts are created automatically:

"Comp_np.plt" – Gnuplot script for comparing numbers of path points in different paths (Fig.

3.17).

Fig. 3.17. Comparison of the number of path points (the Standard Method was used here)

"Comp_tau.plt" Gnuplot script for comparing values of tortuosity obtained for different

IPSs (Fig. 3.18).

Fig. 3.18. Comparison of the tortuosity values (the Standard Method was used here)

"Comp_tau_isp.plt" – Gnuplot script for visualization of the tortuosity distribution in all used

ISPs (Fig. 3.19), except from values obtained with the use of the Regular Grid Method.

Fig. 3.19. The tortuosity distribution in function of the ISP location

35

Sobieski W., Lipiński S.: PathFinder User's Guide

"Comp_tau_rg.plt" – Gnuplot script for visualization of the tortuosity distribution in all used

ISPs using the Regular Grid Method (Fig. 3.20).

Fig. 3.20. The tortuosity field obtained with the use of the Regular Grid Method

In the Comparison folder, additional subfolder exists, in which files related to the deviation analysis are

collected. The name of this subfolder depends on the approach to ISP choice and it may be named:

"isp_fc", "isp_fp", "isp_rg" or "shift_XX_YY". Files with the "pf " extension contain: the Z

coordinate of the current path point, the distance in the Z direction between the current and the

previously path point, the deviation, and the non-dimensional deviation.

In the same subfolder, two Gnuplot scripts are created:

Comp_dev.plt – Gnuplot script for visualisation of the distance between all path points and the

vertical line starting from the ISP (Fig. 3.21).

Comp_dz.plt – Gnuplot script for visualisation of the distance between adjacent path points in

Z direction (Fig. 3.22).

Fig. 3.21. The deviation of path points

36

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 3.22. The distance between adjacent path points

Table 3.1: Files used in scripts by the Gnuplot environment

Script name Used files Description Available after

calculations

Plot_area.plt TheName_XX.res (1:2) scalars for the tetrahedral structures yes

Plot_current

TheName.in the input data yes

TheName_XX.pp points of path yes

TheName.isp the location of the Initial Starting Point no

TheName.fsp the location of the Final Starting Point no

TheName.ctr the current triangle no

TheName.cth the current tetrahedron no

TheName.4il the current Ideal Location no

TheName.4rl the current Real Location no

TheName.ntr the next triangle no

Plot_d.plt TheName.in the input data yes

Plot_dis_d.plt TheName.dis diameter distribution yes

Plot_final.plt TheName_XX.sp the spheres surrounding the path yes

TheName_XX.pp points of path yes

Plot_if.plt TheName_XX.res (1:5) scalars for the tetrahedral structures yes

Plot_il_cor.plt TheName_XX.res (1:4) scalars for the tetrahedral structures yes

Plot_normal.plt TheName_XX.res (1:6) scalars for the tetrahedral structures yes

Plot_omega.plt TheName_XX.res (1:7) scalars for the tetrahedral structures yes

Plot_omega_cor.plt TheName_XX.res (1:8) scalars for the tetrahedral structures yes

Plot_perimeter.plt TheName_XX.res (1:3) scalars for the tetrahedral structures yes

37

Sobieski W., Lipiński S.: PathFinder User's Guide

4 PathGUI overlay

4.1 General description

PathGUI graphical overlay is the element of the PathFinder project and it mainly serves for the

creation of the configuration files. In addition, it allows to run PathFinder code (via a shell script),

scripts of Gnuplot environment and ParaView program, designed for three-dimensional visualization

of the results.

PthGUI program was written in a visual programming environment Lazarus 7, based on Free Pascal

language; it can be used on Windows or Unix\Linux. In the case of Unix\Linux, User should ensure

that the program has the right to execute. In the case of copying the compiled program, such a right

should be given manually (e.g. through system console, by giving chmod instruction). In the case of

compiling the source code, the right to execute is assigned automatically by the operating system.

4.2 Handling tasks

Overlay window consists of a main menu, a toolbar, and five tabs.

Fig. 4.1. View of a toolbar of a pathGUI overlay

Meaning of the elements of the toolbar is as follows (Fig. 4.1):

1. List of tasks – contains names of all defined tasks. These tasks must be in the same directory

(hereinafter refferred to as the root directory), in which PathFinder program is, as well as

pathGUI overlay. The list of tasks is stored in a text file named "pathGUI.tn" (if necessary, this

file can be edited manually).

2. Button of adding task to the list. After clicking on it, you will see two windows with questions

on the name of the task (Fig. 4.2) and on the number of spheres in a bed (Fig. 4.3). After

approval of answers on both questions, in the root folder task folder is created, as well as the

shell script used to run the PathFinder program. In the task folder, a configuration file

containing default settings, will be also created. Because the program does not detect the shape

of the deposit, User will be asked to choose the type of computational domain (rectangular or

cylindrical).

3. Button deleting tasks from the list. After clicking it, from the list of tasks ("pathGUI.tn" file)

will be deleted task, whose name is displayed in the task list. All files related to the selected task

will remain unchanged. Deleted task can add again to the list of tasks at any time.

4. Button saving the current configuration of the task to the „TheName.dat" file.

5. Button of task start. Clicking the button launches the shell script and starts the Pathfinder

program. For Unix/Linux User should select "GUI Settings" in the overlay menu and enter the

name of the shell together with the relevant calling arguments (if needed). For example, in case

of a xUubuntu system, it is a "xfce4-terminal -x" command. Instruction is stored in the

"pathGUI.s" file.

6. Button loading the configuration file. This key allows you to copy settings from another task.

7. Button of default settings. Please be aware that after using it, User should check and, if

necessary, change the type of computational domain.

7 Lazarus Home Page [on-line]. URL: http://www.lazarus-ide.org/

38

1 2 3 5 6 7 8 9 10 11

Sobieski W., Lipiński S.: PathFinder User's Guide

8. Button saving the current configuration of the task into any configuration file. After clicking on

it, appears the standard for the used operating system window for saving files.

9. List of Gnuplot scripts. It allows running the chosen Gnuplot script for recently calculated

path. Scripts will launch automatically, provided that the "*.plt" files have been previously

associated with the Gnuplot environment.

10. Button for starting the Paraview environment. On Windows, its correct operation requires

providing a path to this environment. It can be done through the "GUI Settings" command in

the main menu. The path is stored in the "pathGUI.s" file.

11. Button for exiting the program.

Fig. 4.2. The pathGUI tool – input box to enter the project name

Fig. 4.3. The pathGUI tool – input box to enter the number of particles

4.3 Configuration tabs

Basic settings for tasks are defined in the pathGUI overlay on the General tab (Fig. 4.4). Meaning of of

particular items is as follows:

Domain geometry – the shape of computational space. The PathFinder program allows analysis

beds of rectangular or cylindrical topology. For "p06_25" example, deposit has rectangular

shape (see Fig. 6.1), what results from the way of its generation with the use of Discrete

Element Method in YADE package.

Method for calculating the triangle center – method of calculating coordinates representing the

center of the triangle formed by the spheres belonging to the base of the tetrahedral structure.

There are two possible options:

A characteristic point is the geometric center of the triangle.

A characteristic point is the center of gravity of the outline of the pore space lying in the

triangle plane (the recommended option, added in 2014 [4]).

Characteristic dimension for the Ideal Location characteristic dimension needed for the

estimation of earlier described Ideal Location.

Vertex coordinates of tetrahedral structure are calculated assuming that analyzed tetrahedron is

a regular tetrahedron with a side length equal to the characteristic dimension. There are two

possible options:

The characteristic dimension is the average particle diameter (option of historical

significance, not recommended).

The characteristic dimension is the average length of the side of the triangle forming the

basis for the tetrahedral structure (recommended).

Correction method for the Ideal Location – method of correcting the vertex distance from the

base surface of tetrahedral structure. Previous studies [18] have shown that the quality of

search (determined on the basis of a special index) is better, if the Ideal Location is closer to

the base surface of tetrahedral structure than that it would result from the geometry of the

39

Sobieski W., Lipiński S.: PathFinder User's Guide

regular tetrahedron. This is because in actual beds, particles do not form a perfectly rhombic

topology: the particles forming the base are often slightly shifted from each other, and so the

fourth particle may partially "slide" between them. Reducing the distance between the surface

of the base surface of tetrahedral structure and Ideal Location can be made by a constant value

(0.5) or by the function based on the distance between the spheres forming the basis of the

tetrahedral structure. Function coefficients (8.0 and 1.3) have been determined on the basis of

previous studies [18] and should not be changed.

Critical normalized area of the triangle. Previous studies [18] have shown that if for spheres

having the same diameters, area of the triangle formed by the non-contacted spheres is three

times larger than the area formed by spheres in contact, the fourth sphere may be wholly

contained inside (between the spheres forming the basis for the tetrahedral structure). In the

case of high porosity beds, or high variance of particle size distribution, this value can be

increased.

Number of particles rejected from the top surface the number of elements of the set,

counting from the end of the set (i.e. from the spheres located highest in the main direction)

that will be rejected from the calculations. This option can be used in situations, in which the

upper bed surface is not flat (so there are more cavities than in other regions of the bed) - in

these cases the bed porosity is overestimated.

Use the smoothing algorythm. Selecting this option causes calculation of the additional value

of tortuosity, with the use of the function rounding connections for individual sections of the

path. This option is of historical importance and currently is not recommended (its selection

does not affect any of other results in any way).

Fig. 4.4. View of a pathGUI overlay window and General tab

The second tab of pathGUI overlay concerns a method of selecting Initial Starting Points (description

was given in Section3.3).

In order to facilitate the ISPs selection, on the tab a scheme of starting points is shown for the selected

geometry: rectangular (Fig. 4.5) or cylindrical (Fig. 4.6). Schemes are also shown for different methods

of ISP selection (Figs. 4.7, 4.8 and 4.9).

On the ISP tab is also available function for changing the position of the bed, relative to the adopted

coordinate system. It is performed by changing the columns containing the coordinates of the spheres

in "TheName.in" file. The numbers on the buttons indicate which columns will be replaced. This

option is very useful when you want to analyze paths in other directions than originally assumed main

40

Sobieski W., Lipiński S.: PathFinder User's Guide

direction. During the column replacement, the backup copy of the previous version is created and it

can be recovered with the Undo button.

Fig. 4.5. View of a pathGUI overlay window and ISP tab (rectangular domain)

Fig. 4.6. View of a pathGUI overlay window and ISP tab (cylindrical domain)

41

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 4.7. View of a pathGUI overlay window and ISP tab, including the ISPs scheme for Regular Grid Method

Fig. 4.8. View of a pathGUI overlay window and ISP tab with idea of chosing ISP based on coordinates

Fig. 4.9. View of a pathGUI overlay window and ISP tab with idea of chosing ISP based on percentage of axis range

42

Sobieski W., Lipiński S.: PathFinder User's Guide

On the Drawings tab (Fig. 4.10) plots can be selected, which are to be visualized during calculations. At

default settings, charts visualization is disabled (except for the final drawing of the path, i.e. the "Draw

Final Path" option), as they require continuous closing of Gnuplot environment windows, what is not

convenient. Furthermore, these charts can be viewed later, by running the appropriate "*.plt" scripts

(manually or using list of scripts, located on the toolbar). The exception is a drawing showing the

current scheme of tetrahedral structure with characteristic points marked, because when the calculation

is complete, only the last structure can be visualized. To analyze each structure sequentially, "Draw

current tetrahedron" option has to be turned on, but keep in mind that these figures may be tens or

hundreds, depending on the size of the deposit, and each of them will have to be manually closed later.

For this reason, "Draw first tetrahedron" option is useful, as it allows visualizing the beginning of the

path: the first tetrahedral structure with its starting points (initial and final). Drawings of tetrahedral

structures are not written to disk, since their analysis usually requires performing rotation and scaling,

what is not possible after saving it to the image file. Besides, saving complete data on each structure

would occupy too much disk space.

On the Drawings tab there is also an option allowing to generate CSV files (by default this option is not

checked). When selected, deposit, as well as points forming individual paths, are saved in this format.

Fig. 4.10. View of a pathGUI overlay window and Drawings tab

The last option is associated with saving files containing the so-called deviations of the path points.

Deviation is understood as the distance of the current path point from the vertical line, going from the

ISP. If you do not want to use this option, you can turn it off, because it causes generation of a large

number of small files (especially in Regular Grid Method).

The next tab is Licence tab (Fig. 4.11), where you can see the terms and conditions of the program.

There is also a check box that you have to check in order to legally use the program. Without this, the

program will not perform calculations.

The last tab of pathGUI overlay is of informative character. It includes contact to the author and his

affiliation (Fig. 6.14).

43

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 4.11. View of a pathGUI overlay window and Licence tab

Fig. 4.12. View of a pathGUI overlay window and Info tab

Concluding a description of pathGUI overlay, the main menu should be mentioned. It contains two

groups of options: Project, in which only the "GUI Settings" option is not a duplication of the features

available from the toolbar, and Help, in which there are references to the User's Guide in PDF format,

to the author website and to the PathFinder project website.

In the PathGUI, the current operating system may be chosen (Fig. 4.13). After confirmation, the

PathFinder.sys file is saved. This is a file needed for correct compilation of the PathFinder source code.

In the same place the name of default shell should be defined (in Unix/Linux) (Fig. 4.13) or the

location of the ParaView executable file (in Windows) (Fig. 4.14). The name of default shell (with call

parameters if needed) is used in Linux for running SH scripts and other executable files.

The Window with the current operating system and the Linux terminal may be called in main menu:

Project – GUI Settings.

44

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 4.13. The pathGUI tool – definition of the current OS and the path to the ParaView executable file

Fig. 4.14. The pathGUI tool – definition of the current OS and the terminal name for Linux

45

Sobieski W., Lipiński S.: PathFinder User's Guide

5 The visualization in ParaView software

5.1 The visualization of the bed using VTK files

This kind of visualization shows all spheres of the bed in their actual size.

The visualization of the bed may be done through following steps:

Run the ParaView software;

Open TheName.in.vtk file;

Press the Apply button;

Turn the Glyph filter ;

Set options for the Glyph filter:

Glyph type: Sphere;

Scale mode: Scalar;

Set scalar factor: 1;

Press the Apply button;

In the Pipeline Browser, change the "Glyph1" name to "The bed" (Fig. 5.1).

To see the inside of the bed, reduce the value of the Capacity option.

Fig. 5.1. Visualization of the bed

5.2 The visualization of the bed using CSV files

The option save_csv in the setting file (TheName.dat) must have the 'Y' value.

This kind of visualization shows not the spheres, but only the centres of spheres in the bed.

The visualization of the bed may be done through following steps:

Run the ParaView software;

Open TheName.in.csv file and confirm it with the Apply button (Fig. 5.2);

Run "Table to Points" filter from the main menu Filters → Alphabetical;

Determine the meaning of each column in the Properties panel and confirm it with the Apply

button (Fig. 5.3);

46

Sobieski W., Lipiński S.: PathFinder User's Guide

Close the main graphical window with the icon in the right top corner and create new 3D

View (Fig. 5.4);

Click the eye in the Pipeline Browser located left to the current TableToPoints;

In the Pipeline Browser, change the "TableToPoints" name to "The bed" (Fig. 5.5).

Fig. 5.2. Opening a CSV file for visualization of the bed

Fig. 5.3. Determinating the meaning of columns

Fig. 5.4. Opening the 3D View (YADE example)

The sphere centres may be coloured by the particle diameter. To do this, the

parameter from

Colouring list in the Properties panel must be chosen. A legend can be added to the drawings by

clicking the Show button (Fig. 5.6).

47

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 5.5. Visualization of all sphere centres in the bed

Fig. 5.6. Visualization of all sphere centres in the bed coloured by particle diameters

5.3 The visualization of the path using VTK files

This kind of visualization shows the path as a polyline.

The visualization of the path may be done through following steps:

Run the ParaView software;

Open TheName_XX.pp.vtk file and confirm it with the Apply button;

Set the colour of the polyline with the Edit button in the Colouring section.

In the Pipeline Browser, change the "TheNameXX.pp.vtk" name to "Path XX" (Fig. 5.7).

In the same way next paths may be added to the drawing (Fig. 5.8).

48

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 5.7. Visualization of a path

Fig. 5.8. Visualization of a set of paths

5.4 The visualization of the path using CSV files

The option save_csv in the setting file (TheName.dat) must have the 'Y' value.

This kind of visualization shows the path as a set of points.

The visualization of the path may be done through following steps:

Run the ParaView software;

Open TheNameXX.csv file and confirm it with the Apply button;

Run "Table to Points" filter from the main menu Filters → Alphabetical;

Determine the meaning of each column in the Properties panel and confirm it with the Apply

button;

Open new 3D View;

Click the eye in the Pipeline Browser located left to the current TableToPoints;

Set Point on the Representation list in the Properties panel;

Click the Edit button in Colouring options and change the colour of path points;

In the Pipeline Browser, change the "TableToPoints" name to "Path XX" (Fig. 5.9).

49

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 5.9. Visualization of a path

Optionally, the size of points and the opacity may be changed in the Properties panel.

In the same way next paths may be added to the drawing (Fig. 5.10).

Fig. 5.10. Visualization of a few path inside the bed

5.5 The visualization of tetrahedrons surrounding the path using VTK files

This kind of visualization shows tetrahedrons by which goes the path.

The visualization of the tetrahedrons may be done through following steps:

Run the ParaView software;

Open TheNameXX.res.vtk file and confirm it with the Apply button;

In the Pipeline Browser change the "TheNameXX.res.vtk" name to "Tetra XX" (Fig. 5.11).

The triangles that form the tetrahedron basis may be coloured by a scalar (Fig. 5.12):

Tetrahedron triangle basis area;

Tetrahedron triangle basis perimeter;

Correction coefficient for the Ideal Location in the searching method;

50

Sobieski W., Lipiński S.: PathFinder User's Guide

The quality

coefficient;

The angle between path sections;

The angle between triangle normal and the Z-axis.

Fig. 5.11. Visualization of tetrahedrons surrounding the path

Fig. 5.12. Available data arrays

The scalars give the same information as PLT scripts, but the way of visualization is different.

In the same way next tetrahedrons may be added to the drawing (Fig. 5.13).

Fig. 5.13. Visualization of tetrahedrons surrounding the path, mapping by an output scalar

51

Sobieski W., Lipiński S.: PathFinder User's Guide

5.6 The visualization of spheres surrounding the path using VTK files

This kind of visualization shows spheres surrounding the path. Centres of these spheres form triangles

and the tetrahedral structures, through which goes the path.

The visualization of the spheres may be done through following steps:

Run the ParaView software;

Open TheNameXX.sp.vtk file and confirm it with the Apply button;

Turn the Glyph filter ;

Set options for the Glyph filter:

Glyph type: Sphere;

Scale mode: Scalar;

Set scalar factor: 1;

Press the Apply button;

In the Pipeline Browser, change the "Glyph1" name to "Spheres XX" (Fig. 5.14).

Fig. 5.14. Visualization of spheres surrounding the path

In the same way next spheres may be added to the drawing (Fig. 5.15).

Fig. 5.15. Visualization of spheres surrounding the path

52

Sobieski W., Lipiński S.: PathFinder User's Guide

5.7 Visualization of the tortuosity field

This kind of visualization shows a map of tortuosity values for the whole bed. It can be done by

performing following steps:

Run the ParaView software;

Open Comp_tau_rg.vtk file in the Comparison subfolder and confirm it with the Apply

button;

Change the kind of Coloring to tortuosity.

Optional steps:

Open a second window with the BarChartView kind;

Select Histogram Filter from the main menu and confirm it with the Apply button.

Result of this visualisation is shown in Fig. 5.16.

Fig. 5.16. Visualization of a tortuosity map

5.8 Mixing the kinds of visualization

The ParaView software allows mixing different visualizations. To do this, one should add pieces,

according to the chosen descriptions in the previous section.

In the Fig. 5.17 the bed is shown (Point 5.1), with five paths (Points 5.3) and five tetrahedrons sets for

these paths (Point 5.5). The spheres are here rescaled and have smaller diameters. In this way, the inside

of the bed is more visible.

In the Fig. 5.18 the bed is shown, (Point 5.1) with five paths (Points 5.3) and five particle sets for these

paths (Point 5.6).

In the Fig. 5.19 a path is shown, (Points 5.3) with tetrahedral structures (Point 5.5) and spheres

surrounding the path (Point 5.6).

The ParaView software allows using many visualization forms – for example the Clip filter (Fig. 5.20) –

it is impossible to describe them all here. For more information, the Reader can refer to the ParaView

tutorial.

53

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 5.17. An example of mixing visualization kinds

Fig. 5.18. An example of mixing visualization kinds

Fig. 5.19. An example of mixing visualization

54

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 5.20. An example of using the Clip filter

5.9 Saving states

Since the visualization takes a lot of time and contains many elements, the final visualization should be

saved by "Save State" option in the File menu. Then ParaView running the saved scenes can be opened

using "Load State" option. All elements may be shown or hidden using the Eye button on the left

side of the element name.

In the PathFinder some examples of the *.pvsm files are included. After loading these files, a window

with all used filenames is shown. The User must change these paths in accordance with the location of

the PathFinder directory.

The file *.pvsm may be opened and all paths may be changed manually using "Find and Replace..."

option in any text editor.

Fig. 5.21. A final visualization form for five paths with using VTK files

55

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 5.22. A final visualization form for five paths with using CSV files

Fig. 5.23. A final visualization form for five paths with using CSV files

56

Sobieski W., Lipiński S.: PathFinder User's Guide

6 The visualisation in the MayaVi software

MayaVi8 has two versions: the line to version 1.5 (no longer under development) and the line beginning

with version 2.X. In this chapter, use of both versions is described.

6.1 The MayaVi 1.5

6.1.1 The visualization of the bed using VTK files

The visualization of the bed may be done in MayaVi 1.5 through following steps:

Run the MayaVi software;

Open TheName.in.vtk file;

Choose the option "Modules – Glyph" from the "Vizualize" menu;

Choose "Sphere" in the "Configure Glyph" window and turn off the "Clamping" option (Fig.

6.1); The result is shown in the Fig. 6.2.

To obtain a more smoothed view choose "Configure Glyph Source" in the "Configure Glyph"

window and increase the value of the parameter called SetThetaResolution (Fig. 6.3).

Apply new settings (6.4).

The spheres may be shown in a scale with the "SetScalarFactor" parameter in the "Configure

Glyph Source" – a result with scalar factor equal to 0.1 is presented in the Fig. 6.5.

To show the frames of the domain chose option "Modules Outline" from the "Vizualize"

menu.

Fig. 6.1. Settings in the Configure Glyph window

8 The MayaVi Data Visualizer [on-line]: URL: http://mayavi.sourceforge.net/.

57

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 6.2. Visualisation of the bed in MayaVi 1.5

Fig. 6.3. Configuring Sphere Source window

58

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 6.4. Visualisation of the bed after smoothing

Fig. 6.5. Visualisation of the bed after scaling

59

Sobieski W., Lipiński S.: PathFinder User's Guide

6.1.2 The visualization of the path using VTK files

The visualization of the path may be done through following steps:

Open TheName_XX.pp.vtk file in MayaVi;

Choose "Modules – PolyData" option from the "Vizualize" menu (Fig. 6.6).

In the "Configure PolyData" window, set the line width, the line colour or the line transparency

(Fig. 6.7).

Fig. 6.6. Visualisation of the path in the MayaVi 1.5

Fig. 6.7. The Configure Poly Data module window

60

Sobieski W., Lipiński S.: PathFinder User's Guide

6.1.3 The visualization of spheres surrounding the path using VTK files

The visualization of the spheres may be done through following steps:

Open TheNameXX.sp.vtk file;

Choose "Modules – Glyph" from the "Vizualize" menu;

Choose "Sphere" in the "Configure Glyph" window and turn off the "Clamping" option

Choose "Configure Glyph Source" in the "Configure Glyph" window, increase the

SetThetaResolution parameter and confirm it with the Apply button (Fig. 6.8).

Fig. 6.8. Visualization of spheres surrounding the path

6.1.4 The visualization of tetrahedrons surrounding the path using VTK files

The visualization of the tetrahedrons may be done through following steps:

Open TheNameXX.res.vtk file;

Choose the scalar for visualisation (Fig. 6.9);

Choose "Modules – BandedSurfaceMap module" from the "Vizualize" menu (Fig. 6.10);

To show a legend to the chosen scalar, turn on the "Show Legend" option in the "Configure

LutHandler module" window (Fig. 6.11). The final results is shown in the Fig. 6.12.

61

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 6.9. The window with scalars available for colouring

Fig. 6.10. The window with other options of scalar visualisation

62

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 6.11. The window with options of scalar legend visualisation

Fig. 6.12. Visualization of tetrahedrons surrounding the path

63

Sobieski W., Lipiński S.: PathFinder User's Guide

6.2 The MayaVi 2.X

6.2.1 Visualization of the bed

The visualization of the bed may be done in MayaVi 2.X through following steps:

1. Run the MayaVi2 application – in Unix/Linux OS type in the console:

mayavi2

2. In the "Engine Tree View" click the position "Add Data Source" (Fig. 6.13).

Fig. 6.13. The "Engine Tree View" in MayaVi 2.X

3. In the "Object Editor" click the "Load data from file" button and choose the TheName.in.vtk

file (Fig. 6.14). The same effect may be obtain by using the button on the window header.

Fig. 6.14. Loading a new data source from a file

4. In the "Engine Tree View" click the"Add module or filter" position (Fig. 6.15).

64

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 6.15. The list of modules for visualization

5. Select the "Glyph" option in the "Visualization modules" tab and confirm it with the "Glyph"

button or with double mouse click (Fig. 6.16).

Fig. 6.16. Default visualization of glyphs in MayaVi 2.X

6. Turn off the "Clamping" option in the "Glyph" tab (Fig. 6.17).

7. In the "Engine Tree View" click the "Glyph" position and on the "Glyph Source" tab select the

"SphereSource" position on the selection list.

8. The quality of showed spheres may be corrected through increasing the values of "Phi

resolution" or "Theta resolution" options.

9. To set the scene orientation and scale use the "Isometric View" button in the header of the

scene window (Fig. 6.18).

10. The transparency may be set on the "Actor" tab by using the "Opacity" option (Fig. 6.19).

11. To scale the particle diameters use the "Scale factor" on the "Glyph" tab (Fig. 6.20).

12. To show the scalar legend (particle diameters) click the "Colors and legend" option on the

"Engine Tree View" and turn of the "Show legend" option (Fig. 6.21).

13. To set the white background of the scene click on the "Mayavi Scene 1" option and change

values in the "background" edit on the "Scene" tab. In this case the description of the legend

will be not visible – the "Foreground" value must be changed to black (Fig. 6.21).

65

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 6.17. Visualization of the bed after turning off of the clamping

Fig. 6.18. Visualization of the bed with the use of the sphere glyphs

Fig. 6.19. Visualization of the bed with opacity equal to 0.2

66

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 6.20. Visualization of the bed with the scale factor equal to 0.2

Fig. 6.21. Displaying the legend of the particle diameter scalar

6.2.2 Visualization of the path

The visualization of the bed may be done in MayaVi 2.X through following steps:

1. Click the "Add a data source" button on the header in the "Engine Tree View" window and

open the TheName.pp.vtk file.

2. In the "Engine Tree View" click the "Add module or filter" position (Fig. 6.22).

3. Select the "Glyph" option in the "Visualization modules" tab and confirm it with the "Glyph"

button or with double mouse click.

4. Turn off the "Clamping" option in the "Glyph" tab.

5. In the "Engine Tree View" click the "Glyph" position and on the "Glyph Source" tab select the

"SphereSource" position on the selection list (Fig. 6.23).

6. Decrease the value of the "Scale Factor" on the "Glyph" tab (Fig. 6.24).

7. Change the "Color" on the "Actor" tab (Fig. 6.25).

67

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 6.22. Adding a new VTK file

Fig. 6.23. Default visualization of path points

Fig. 6.24. Visualization of path points with scale factor equal to 0.02

68

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 6.25. Visualization of path points using a colour

6.2.3 Visualization of the spheres

The visualization of the bed may be done in MayaVi 2.X through following steps:

1. Click the "Add a data source" button on the header in the "Engine Tree View" window and

open the TheName.sp.vtk file.

2. In the "Engine Tree View" click the "Add module or filter" position .

3. Select the "Glyph" option in the "Visualization modules" tab and confirm it with the "Glyph"

button or with double mouse click.

4. Turn off the "Clamping" option in the "Glyph" tab.

5. In the "Engine Tree View" click the "Glyph" position and on the "Glyph Source" tab select the

"SphereSource" position on the list.

6. To show the scalar legend (particle diameters) click the "Colors and legend" option on the

"Engine Tree View" and turn of the "Show legend" option (remember to unselect this options

in settings of other Glyph visualization).

The final visualization is shown in the Fig. 6.26.

Fig. 6.26. Visualization of spheres surrounding a path

69

Sobieski W., Lipiński S.: PathFinder User's Guide

6.2.4 Visualization of the tetrahedrons

The visualization of the bed may be done in MayaVi 2.X through following steps:

1. Click the "Add a data source" button on the header in the "Engine Tree View" window and

open the TheName.res.vtk file.

2. In the "Engine Tree View" click the "Add module or filter" position.

3. Select the "SliceUnstructuredGrid" option in the "Visualization modules" tab and confirm it

with the "SliceUnstructuredGrid" button or with double mouse click (unselect all legends and

hide other visualizations if needed) (Fig. 6.27).

Fig. 6.27. Default visualization of an unstructured grid with a slice

The visibility of a visualization may be turned off/on in two ways: by using the "Visibility" option in

the "Actor" tab or by using the RBM over the "Glyph" option in the "Engine Tree View".

4. Unselect the "Extract only boundary cells" option on the "Extract geometry" tab.

5. Set the "Representation" on the "Actor" tab as "surface" (Fig. 6.28).

Fig. 6.28. Visualization of tetrahedrons forming a path

70

Sobieski W., Lipiński S.: PathFinder User's Guide

6. To change the scalar used for visualization click on the name of TheName.res.vtk file an set the

"Cell scalars name".

Fig. 6.29. Changing the scalar for colouring the tetrahedrons

7. To show axis of the current coordinate system click the button "Toggle axes indicator" on

the header of the scene window.

8. To show the scalar legend (for a scalar set like above) click the "Colours and legend" option on

the "Engine Tree View" and turn of the "Show legend" option.

Fig. 6.30. A final visualization of tetrahedrons forming a path

9. To save the visualization in a popular file format use the "Save scene as" option in the "File"

menu (Fig. 6.31).

10. To save the scene use the "Save visualization" option in the "File" main menu (Fig. 6.32).

71

Sobieski W., Lipiński S.: PathFinder User's Guide

Fig. 6.31. Result of saving the current scene as a graphical file

Fig. 6.32. Saving the scene in a *.mv2 file

72

Sobieski W., Lipiński S.: PathFinder User's Guide

7 Additional software

7.1 File converter from YADE to PathFinder

To export results from the YADE9 software, perform following steps:

Type in the YADE console: from yade import export

Type in the YADE console: export.text("TheName.yade")

Next steps are as follows:

Save or copy TheName.yade file from YADE to the Convert YADE directory in the main

PathFinder folder.

In Windows OS run the convert.exe file (it should be in the Convert YADE directory – if not,

compile the source).

In Unix/Linux OS, open console in the Convert YADE directory and type: ./convert.out (it

should be in the Convert YADE directory, if not compile the source).

Get TheName of the file exported in YADE (without the extension .yade) (Fig. 7.1).

After the conversion, the input file TheName.in for PathFinder should be created.

After the conversion, additional file TheName.in.vtk for bed visualisation should be available.

Fig. 7.1. The YADE file format converter

The other possibility to use the YADE converter is runnig it with a call parameter as follows:

convert.exe TheName

in Windows OS or

./convert.out TheName

in the Unix/Linux OS.

This possibility allows to run this file converter directly from the Python script. It may be done by

performing following instructions

import subprocess

subprocess.call('./convert.out '+file, shell=True)

Additionally, the file converter creates a VTK file destined for visualisation of the bed.

The YADE file format converter is created in Fortran 90/95 language.

9 The YADE GUI my be called from the console by using instruction: yade.qt.Controller()

73

Sobieski W., Lipiński S.: PathFinder User's Guide

In the Unix/Linux OS the output file must have rights to execution. For this purpose type in the shell

console:

chmod +x convert.out

and next (to execute the file):

./convert.out

7.2 File converter from LIGGGHTS to PathFinder

In the LIGGGHTS code, the data export may have different forms. In the PathFinder package, an

example of such results file is included. The User may follow, in which way the data may be converted.

To run this exampe such steps must be doing:

In Windows OS run the convert.exe file (it should be in the Convert LIGGGHTS directory

if not, compile the source).

In Unix/Linux OS, open console in the Convert LIGGGHTS directory and type: ./convert.out

(it should be in the Convert LIGGGHTS directory, if not compile the source).

Get TheName of the file exported in LIGGGHTS (with the extension) (Fig. 7.2).

After the conversion, the input file TheName.in for PathFinder should be created.

After the conversion, additional file TheName.in.vtk for bed visualisation should be available.

Fig. 7.2. The LIGGGHTS file format converter

The other possibility to use the LIGGGHTS converter is runnig it with a call parameter as follows:

convert.exe TheName

in Windows OS or

./convert.out TheName

in the Unix/Linux OS.

Important thing is that in the LIGGGHTS package, usually many files with data for one calculation are

created. For this reason we recommend to use the default converter (named LPP) as the LIGGGHTS

code; it is available on the same webpage. The Fortran code contained in the Add-Ons subfolder may

then serve only as an additional possibility.

The LIGGGHTS file format converter is created in Fortran 90/95 language.

74

Sobieski W., Lipiński S.: PathFinder User's Guide

7.3 File converter from PFC3D to PathFinder

In the PFC3D code, the data export may have different forms. In the PathFinder package, an example

of such results file is included. The PFC3D converter shows the way to erase unnecessary lines in the

file, to delete unnecessary signs and how to save the input file for PathFinder. Some intrinsic text

functions of the Fortran programming language were used. The User probably will have to modify the

code. In the example, the conversion process needs three variables: the name of the project, the

number of particles in the bed and the number of unnecessary lines on the beginning the PFC 3D data

file.

The PFC3D file format converter is created in Fortran 90/95 language.

Fig. 7.3. The PFC3D file format converter

7.4 Characteristic dimension calculator

Characteristic dimension calculator is a small piece of software used for calculation of the characteristic

dimension needed for the so-called Growing Particle Method available in the YADE DEM code. To

use this software, a file with particle size distribution curve should be prepared (Fig. 7.4).

5.8598400e+00 0.0000000e+00

5.8761600e+00 8.4945735e-05

5.8924800e+00 3.5804112e-04

5.9088000e+00 1.1512195e-03

5.9251200e+00 3.2324246e-03

5.9414400e+00 8.1658647e-03

5.9577600e+00 1.8731095e-02

5.9740800e+00 3.9172232e-02

5.9904000e+00 7.4902028e-02

6.0067200e+00 1.3132521e-01

6.0230400e+00 2.1182373e-01

6.0393600e+00 3.1558203e-01

6.0556800e+00 4.3640887e-01

6.0720000e+00 5.6352779e-01

6.0883200e+00 6.8435463e-01

6.1046400e+00 7.8811293e-01

6.1209600e+00 8.6861145e-01

6.1372800e+00 9.2503463e-01

6.1536000e+00 9.6076443e-01

6.1699200e+00 9.8120556e-01

6.1862400e+00 9.9177079e-01

6.2025600e+00 9.9670423e-01

6.2188800e+00 9.9878544e-01

6.2352000e+00 9.9957862e-01

6.2515200e+00 9.9985171e-01

6.2678400e+00 9.9993666e-01

Fig. 7.4. An examplary content of a file with data with the particle distribution curve

75

Sobieski W., Lipiński S.: PathFinder User's Guide

The characteristic dimension is calculated as follows:

Vs =

i=1

nfrac

Vi

sum=

i=1

nfrac

ni

Vi =

i=1

nfrac

Yi

ns

Vi =

i=1

nfrac

Yi ns

4

3π⋅

(

di

2

)

3

. (7.3)

Meaning of the symbols is as follows:

- number of fractions in the virtual bed [-],

- total

volume of the particles of the i-th fraction [m 3 ],

- number of particles of the i-th fraction [-],

- volume of a single particle of the i-th fraction [m3 ],

- share of particles of the i-th fraction

[-] (values from 0 to 1),

- total number of particles in the bed [-],

- particle diameter of the i-

th fraction [m],

- target porosity of the bed [m3/ m3 ].

Fig. 7.5. The

calculator, three call parameters must be defined:

calc_l.exe TheName ns e_target

in Windows OS or

./calc_l.out TheName ns e_target

in the Unix/Linux OS.

76

Sobieski W., Lipiński S.: PathFinder User's Guide

Important thing, is that the

calculator my be used directly from the Python script. It may be done

through performing following instructions:

import subprocess

subprocess.call('./calc_l.out '+file+' '+str(n_s)+' '+str(e), shell=True)

It results in a file with the value of the characteristic dimension, which is created in the same subfolder.

This value may be read in the Python script with the use of the following instructions:

input = open(file+'.l_c','r')

try:

for line in input:

l = float(line[0:])

finally:

input.close()

The

calculator was created in Fortran 90/95 language.

7.5 Porosity-tortuosity calculator

This tool allows to calculate different tortuosity values, but only when the porosity value is defined.

Currently about 20 correlation formulas are collected. In some of them, a model constant must be

defined and for this reason the User will need to modify and compile the source code. The gfortran

compiler may be applied to achieve this aim.

Fig. 7.6. The porosity-tortuosity calculator

To use the porosity-tortuosity calculator, a call parameter must be defined as follows:

correlations.exe e

in Windows OS or

./correlations .out e

in the Unix/Linux OS.

77

Sobieski W., Lipiński S.: PathFinder User's Guide

If the call parameter is not given, the question about the porosity will be shown after running the

program.

The results are visible in the console, as well as saved in a text file.

The porosity-tortuosity calculator was created in Fortran 90/95 language.

7.6 Ergun Air Calculator

This small tool allows calculating values of the pressure drop in air flow through a porous bed using

the Ergun equation

dp

dx =

[

150 (1e )2

e3

(φ⋅ d)2

]

(

μvf

)

+

[

1.75 (1e )

e3

(φ⋅ d)

]

(

ρ vf

2

)

- a coordinate along which the pressure drop occurs [m],

- sphericity coefficient [-],

- dynamic viscosity coefficient of the fluid [kg/(m . s)],

- filtration velocity [m/s].

All data is collected in the input file. The dynamic viscosity coefficient is calculated from the

Sutherland's formula, the density in turn from the equation of state. At the end, a final report is shown

(7.7) and saved to a file.

Fig. 7.7. The final report of the Ergun air calculator

In the Unix/Linux OS, the output file must have rights to execution. For this purpose type in the shell

console:

chmod +x convert.out

and next (to execute the file):

./convert.out

78

Sobieski W., Lipiński S.: PathFinder User's Guide

7.7 Kozeny-Carman Air Calculator

This small tool allows calculating values of the pressure drop in air flow through a porous bed using

the Kozeny-Carman equation

dp

dx = C KC

τ f S 0

2

(1e ) 2

e3

(

μ vf

)

- a coordinate along which the pressure drop occurs [m],

- a model constant (so called Kozeny-Carman pore shape factor) [-],

- the tortuosity factor [m2 /m2 ] defined as the square of the tortuosity

- the specific surface of the porous body [1/m],

- dynamic viscosity coefficient of the fluid [kg/(m . s)],

- filtration velocity [m/s].

Fig. 7.8. The final report of the Kozeny-Carman air calculator

In the program, the tortuosity according to the Yu and Li theory is additionally calculated. For this

reason, all next equations are calculated two times: once for the assumed tortuosity (e.g. obtained with

the PathFinder software) and once for the Yu and Li tortuosity.

All data is collected in the input file. The dynamic viscosity coefficient is calculated from the

Sutherland's formula. At the end, a final report is shown (7.7) and saved to a file.

In the Unix/Linux OS, the output file must have rights to execution. For this purpose type in the shell

console:

chmod +x convert.out

and next (to execute the file):

./convert.out

79

Sobieski W., Lipiński S.: PathFinder User's Guide

7.8 The Sensitivity Calculator

This tool shows dependencies between the result and changes in input parameters for Ergun and

Kozeny-Carman laws. The input data files may be created manually or copied from the Comparison

directory in the PathFinder project folder. Such files are generated automatically by the PathFinder code

in every calculation.

After running the program, a question concerning the definition of the specific surface of the porous

body is shown (Fig. 7.9). Calculations are available after choosing the Kozeny or Carman approach.

Results of calculations are shown (and saved) in graphical form. Appropriate Gnuplot scripts are

included in the Sensitivity Calculator folder. An example of such visualization is shown in Fig. 7.10.

In the Unix/Linux OS, the output file must have rights to execution. For this purpose type in the shell

console:

chmod +x convert.out

and next (tu execute the file):

./convert.out

Fig. 7.9. Choosing the definition of the specific surface of the porous body

Fig. 7.10. An example of visualization a model sensitivity

80

Sobieski W., Lipiński S.: PathFinder User's Guide

8 Publications

1. Sobieski W., Trykozko A.: Darcy's and Forchheimer's laws in practice: Part 2. The numerical model.

TECHNICAL SCIENCES, Vol. 4 (2014), pp. 337-350. ISSN 1505-4675.

2. Sobieski W., Trykozko A.: Darcy's and Forchheimer's laws in practice: Part 1. The experiment.

TECHNICAL SCIENCES, Vol. 4 (2014), pp. 221-335. ISSN 1505-4675.

3. Sobieski W., Zhang Q.: Sensitivity analysis of Kozeny-Karman and Ergun equations. TECHNICAL

SCIENCES, Vol. 3 (2014), pp. 235-248.

4. Dudda W., Sobieski W.: Modification of the PathFinder algorithm for calculating granular beds with

various particle size distributions. TECHNICAL SCIENCES, Vol. 17, No 2 (2014), pp. 135-148.

5. Sobieski W.: The quality of the base knowledge in scientific investigations. Chapter in the monograph

"Scientific Researches in the Department of Mechanics and Machine Design". Olsztyn 2014 (in Polish).

6. Sobieski W., Dudda W.: Sensitivity Analysis as a Tool for Estimating Numerical Modeling Results.

DRYING TECHNOLOGY, Vol. 32, No. 2 (2014), pp. 145-155.

7. Sobieski W., Lipiński S.: PathFinder User's Guide. University of Warmia and Mazury in Olsztyn

(Poland), 2013.

8. Sobieski W.: The basic closures of fluid mechanics in form characteristic for the finite volume method.

TECHNICAL SCIENCES, Vol. 16, No. 2 (2013), pp. 93-107.

9. Sobieski W., Zhang Q., Liu, C.: Predicting tortuosity for airflow through porous beds consisting of

randomly packed spherical particles. TRANSPORT IN POROUS MEDIA, Vol. 93, No. 3 (2012), pp.

431-451.

10. Sobieski W., Trykozko A.: Sensitivity aspects of Forchheimer's approximation. TRANSPORT IN

POROUS MEDIA, Vol. 89, No. 2 (2011), pp 155-164.

11. Sobieski W.: Possibility to use the diffusion equation to heat flow modeling in a composting process.

JOURNAL OF APPLIED COMPUTER SCIENCE, Vol. 19, No. 2 (2011), pp. 111-123.

12. Sobieski W.: The basic equations of fluid mechanics in form characteristic of the finite volume method.

TECHNICAL SCIENCES, Vol. 14, No. 2 (2011), pp. 299-313.

13. Peszyńska M., Trykozko A., Sobieski W.: Forchheimer law in computational and experimental studies of

flow through porous media at porescale and mesoscale. GAKUTO International Series,

MATHEMATICAL SCIENCES AND APPLICATIONS, Vol. 32, pp. 463-482, Tokyo, Japan 2010.

14. Sobieski W.: Examples of using the Finite Volume Method for modeling fluid-solid systems.

TECHNICAL SCIENCES, Vol. 13 (2010), pp. 256-265.

15. Sobieski W.: Selected aspects of developing a simulation model of a spouted bed grain dryer based on

the Eulerian Multiphase Model. DRYING TECHNOLOGY, Vol. 28, No. 12 (2010), pp. 1331-1343.

16. Liu, C. Zhang Q., Chen Y.: Discrete element simulations of vibration characteristics of bulk grain in

storage bins. Transactions of the ASABE, Vol. 53, No. 5 (2010), pp. 1653-1659.

17. Sobieski W.: Use of numerical models in validating experimental results. JOURNAL OF APPLIED

COMPUTER SCIENCE, Vol. 18, No. 1 (2010), pp. 49-60.

18. Sobieski W.: Calculating tortuosity in a porous bed consisting of spherical particles with known sizes and

distribution in space (in Polish). Research report 1/2009, Winnipeg (Canada), 2009.

19. Sobieski W.: GNU Fortran with data visualization elements (in Polish). University of Warmia and

Mazury, Olsztyn 2008, 403 pages.

20. Liu, C., Zhang Q., Chen Y.: PFC3D simulations of lateral pressures in model bins. Paper No 083340

(2008). American Society of Agricultural and Biological Engineers, St. Joseph, MI. 13 pp.

21. Liu, C., Zhang Q., Chen Y.: PFC3D simulations of vibration characteristics of bulk solids in storage

bins. Paper No 083339 (2008), American Society of Agricultural and Biological Engineers, St. Joseph,

MI. 14 pp.

22. Sobieski W.: The quality of the base knowledge in a research process. In "Scientific researches in the

department of mechanics and machine design" 2014, 2, 29-47. ISBN 9788392978114. University of

Warmia and Mazury in Olsztyn, Poland (in Polish).

23. Sobieski W., Dudda W., Lipiński S.: A new approach for obtaining the geometric properties of a granular

porous bed based on DEM simulations. TECHNICAL SCIENCES (in press).

24. Sobieski W., Lipiński S.: The porosity-tortuosity correlations for granular beds. TECHNICAL

SCIENCES (in press).

81

... In this article, a novel method of coupling the micro-and macro-approaches in investigations of fluid flows through granular porous media is proposed. The DEM is used to simulate the pore structure of porous media and the PathFinder code is developed to connect the micro-scale to macro-scale [64]. ...

... Details of the simulation model, as well as its validation, may be found in [35,36]. The simulated porous bed is shown in Fig. 2. The DEM simulation data (number of particles in the bed and coordinates of each particle) were saved to files and an algorithm (PathFinder [64]) was used to calculate all needed geometrical parameters from the DEM simulation data. ...

... An algorithm was developed by W. Sobieski in the year 2009 (so-called Path Tracking Method) to calculate tortuosity from the DEM simulation data. Details were described in [67,64]. The centerpiece of the algorithm was calculating the geometrical path length at the pore level L p as shown in Fig. 6, and the procedure can be summarized as follows: ...

  • Wojciech Sobieski Wojciech Sobieski
  • Qiang Zhang

A new methodology for modeling fluid flow through porous beds consisting of spherical or quasi-spherical particles is proposed. The proposed approach integrates the Discrete Element Method (DEM) with Computational Fluid Dynamics (CFD) techniques. A porous bed was first modeled using the DEM to quantify its pore structure, including the number, coordinates and diameters of all spheres in the bed. Then, a numerical algorithm (PathFinder) is developed to use the DEM simulation results to calculate the micro-scale properties of the porous bed, including porosity, tortuosity and other geometrical parameters. Finally, the determined property parameters are used in a CFD model to simulate fluid flow through porous beds. It was shown that the Discrete Element Method was capable of simulating the spatial structure of granular porous media, providing geometrical parameters that are required by commonly used models for predicting flow through porous media. © 2016 International Association for Mathematics and Computers in Simulation (IMACS).

In the article, a new way for obtaining a set of geometrical parameters of granular porous beds is presented, if the data on the locations and sizes of all particles is available. The input data were prepared with the use of Discrete Element Method. The other way for acquiring the input data may be the application of Computed Tomography (CT) and Image Analysis (IA) techniques. All geometrical parameters are calculated with the use of own numerical code called PathFinder (freely available in the Internet together with its source code). In addition to description of the method of calculations, two examples of its use are presented. One simulation was performed in PFC 3D code, and the other in YADE software. The aim of the article was to show clearly that a porosity is not sufficient to describe the spatial structure of a porous body. In both presented examples, the porosity value is almost the same, but other parameters, e.g. tortuosity, are different. The motivation to write the PathFinder code were significant problems with obtaining geometrical parameters needed in investigations related to granular porous media. The issues described in the article are a part of an overall research methodology relating to the linking the micro-and macro-scale investigations of granular porous beds. The areas of applications of this methodology are not discussed in the article.

  • Wojciech Sobieski Wojciech Sobieski

The report describes the process of developing a computer program for calculating tortuosity in a porous medium consisting of spheres with a known diameter and position. It explains the key concepts, possible solutions to the problem and various issues related to the implementation of the developed method. Specific problems are described in successive chapters. This document (release date: 14 January 2019) is a direct translation of the Polish version of the original research report developed in December 2009. The calculation method presented in this document has been termed the Path Tracking Method by the author, and the method is deployed by the PathFinder program. Detailed information about the method, the developed software and its applications is avaiable on the website of the PathFinder project at http://www.uwm.edu.pl/pathfinder/.

This paper discusses a new approach to analyzing fluid flow through a granular bed. The analysis involves the determination of a set of geometric parameters characterizing a granular bed based on information about the location and diameter of all bed particles. The above task has been achieved with the use of the PathFinder numeric code developed by the authors. The study proposes a new algorithm for calculating the parameters of granular beds composed of spherical particles with various diameters in the PathFinder program. The algorithm has been verified with the use of independent tools and implemented in the new version of the PathFinder code. The modified algorithm's effect on flow path tortuosity has been analyzed. Path length is used to determine tortuosity, a key parameter of pore geometry that is difficult to calculate. Comparative calculations were performed in a granular bed generated by the Discrete Element Method in the PFC3D program.

Modeling of real physical processes by numerical methods is highly time-consuming and requires significant computational capacity. In some cases, tens or even hundreds of hours of highpower computing are needed to virtually model a real process that lasts one second. Processes that take many hours, such as drying, pose an even greater challenge. This problem can be solved in two ways: by using faster computers (such as computing clusters) or by significantly simplifying the modeled process (its geometry, physical phenomena, or the impact of individual factors). For this reason, all methods which speed up or minimize the number of simulations required to achieve the research objective should be analyzed. This article focuses on the latter approach, and it proposes a simple method for predicting the responses of a numerical model (values of any output parameter) to changes in input values (values of any input parameter). This method requires a base model, such as a numerical model which is qualitatively and quantitatively consistent with experimental observations, and a sensitivity analysis. This article discusses the mathematical and logical premises for the discussed model, and it proposes two methods for predicting numerical simulation results. Those methods are illustrated with examples which analyze the behavior of the Eulerian Multiphase Model and describe phase interactions based on Gidaspow's approach. The discussed example relies on data from a series of articles published by the authors in Drying Technology. This article was inspired by the observations made during a time-consuming process of modeling a spouted bed grain dryer, which was described in the above publications. The objective of this study was to discuss the advantages and possibilities created by sensitivity analyses of numerical models and to encourage their practical application.

  • Wojciech Sobieski Wojciech Sobieski

The paper proposes a new concept to use the diffusion equation for heat flow estimation in a composting process. Only general ideas are described , without the full mathematical model and without experiments. The lack of the detailed description stems from the fact that such an approach was not (as it seems) used earlier, and the details are to be developed. The article describes the preparatory work in this field. In the first part of the article , derivation of the diffusion equation is presented together with using an approach consistent with modern Computational Fluid Dynamics, in which all fluid phenomena in a Control Volume are considered. In the second part of this article, the basic information about implementation and needed programming techniques are described. It is emphasized that the diffusion equation is adequate not only for the temperature flows, but for other phenomena as well. The main purpose of this study is to create a general template for 3D modeling of phenomena which are diffusive in nature.

  • Wojciech Sobieski Wojciech Sobieski

This article presents the concept of applying numerical models for the purpose of validating experimental results. Validation may apply to the values obtained directly from experiments or the follow-up methods of data processing. The discussed concept is illustrated by sample numerical calculations of heat flow through a single-layer wall. The study describes the mathematical model, the required numerical diagrams and it presents sample calculations. It discusses the advantages of analyzing the simulation model's sensitivity. A prior analysis supports the determination which of the system's parameters require the greatest measurement accuracy. The results of the analysis can be used to plan the experiment. The objective of this study was to present a new approach to the possibilities offered by simulation techniques.

  • Wojciech Sobieski Wojciech Sobieski

The article presents two mathematical models designed for the numerical modeling of fluid flow through stationary and non-stationary porous beds, so called Porous Media Model and Eulerian Multiphase Model. After a brief description, both models are illustrated with several examples of their use. All examples were made in the package ANSYS Fluent. All cases come from studies on the actual objects, usually various laboratory stands. This article aims to show the differences and determinants of both approaches. Motivation stemmed from own experience of the author, indicating that in some cases the choosing of appropriate model is not obvious. PRZYKŁADY ZASTOSOWANIA METODY OBJĘTOŚCI SKOŃCZONYCH DO MODELOWANIA OŚRODKÓW TYPU FLUID-SOLID Wojciech Sobieski Katedra Mechaniki i Podstaw Konstrukcji Maszyn Uniwersytet Warmińsko-Mazurski w Olsztynie Słowa kluczowe: CFD, Porous Media Model, Wielofazowy Model Eulera, ośrodki fluid-solid. Abstrakt W artykule zaprezentowano dwa modele matematyczne – Porous Media Model oraz Eulerian Multiphase Model, służące do numerycznego modelowania przepływów płynów przez stacjonarne i niestacjonarne złoża porowate. Oba modele, po krótkim ich przedstawieniu, zilustrowano kilkoma przykładami praktycznymi. Wszystkie przedstawione w pracy wyniki symulacji numerycznych bazują na rzeczywistych obiektach, zazwyczaj na konkretnych stanowiskach laboratoryjnych i zostały wykonane w pakiecie obliczeniowym ANSYS Fluent. Celem artykułu było przedstawienie pod-stawowych różnic dotyczących zastosowań obu modeli oraz uwarunkowań ich stosowania. Motywacją do napisania artykułu były doświadczenia autora, wskazujące, że wybór odpowiedniego modelu może w pewnych przypadkach nie być oczywisty.

  • Wojciech Sobieski Wojciech Sobieski
  • Qiang Zhang
  • Chuanyun Liu

This article presents a numerical method for determining tortuosity in porous beds consisting of randomly packed spherical particles. The calculation of tortuosity is carried out in two steps. In the first step, the spacial arrangement of particles in the porous bed is determined by using the discrete element method (DEM). Specifically, a commercially available discrete element package (PFC3D ) was used to simulate the spacial structure of the porous bed. In the second step, a numerical algorithm was developed to construct the microscopic (pore scale) flow paths within the simulated spacial structure of the porous bed to calculate the lowest geometric tortuosity (LGT), which was defined as the ratio of the shortest flow path to the total bed depth. The numerical algorithm treats a porous bed as a series of four-particle tetrahedron units. When air enters a tetrahedron unit through one face (the base triangle), it is assumed to leave from another face triangle whose centroid is the highest of the four face triangles associated with the tetrahedron, and this face triangle will then be used as the base triangle for the next tetrahedron. This process is repeated to establish a series of tetrahedrons from the bottom to the top surface of the porous bed. The shortest flow path is then constructed geometrically by connecting the centroids of base triangles of consecutive tetrahedrons. The tortuosity values calculated by the proposed numerical method compared favourably with the values obtained from a CT image published in the literature for a bed of grain (peas). The proposed model predicted a tortuosity of 1.15, while the tortuosity estimated from the CT image was 1.14.

  • Chuanyun Liu
  • Q. Zhang
  • Ying Chen Ying Chen

A discrete element model (Particle Flow Code, PFC ) was used to simulate vibration of bulk solids in storage bins. The vibration frequencies and amplitudes of individual particles were determined from simulated particle velocities and displacements at different excitation frequencies and amplitudes. A model bin test system was used to conduct experiments to validate the PFC model. The 0.28 (height) by 0.15 m (diameter) model bin was made of Plexiglas and filled with soybeans. The bin was vibrated at frequencies from 5 to 30 Hz and amplitudes from 0.5 to 5.0 mm. A high speed digital imaging system was used to record particle movement along the bin wall during vibration. Simulated vibration of particles was in good agreement with the experimental data. Simulations revealed that particle vibration was simple harmonic and had the same frequency and amplitude as the excitation at low excitation frequencies and amplitudes, whereas, particles vibrated at their own frequencies and amplitudes when the excitation frequency and amplitude were high.

  • C. Liu
  • Q. Zhang
  • Ying Chen Ying Chen

A discrete element model (DEM) (Particle Flow Code, PFC 3D) was constructed to simulate vibration of bulk solids in a bin filled with soybeans. The vibration frequencies and amplitudes of individual particles were determined from simulated particle velocities and displacements at different excitation frequencies and amplitudes. The simulated results were compared with experimental data obtained from model bin tests. The model bin of 0.28 m height and 0.15 m diameter was made of Plexiglas and filled with soybeans. The bin was vibrated at frequencies from 5 to 30 Hz and amplitudes from 0.2 to 5.0 mm. A high-speed digital imaging system was used to record particle movement along the bin wall during vibration. Simulated vibration of particles was in good agreement with the experimental data. Simulations revealed that particle vibration was simple harmonic and had the same frequency and amplitude as the excitation at low excitation frequencies and amplitudes. Particles vibrated at their own frequencies and amplitudes when the excitation frequency and amplitude were high. Both the DEM model simulations and the experimental data showed that particles not only vibrated locally but also moved globally. © 2010 American Society of Agricultural and Biological Engineers.