• Non ci sono risultati.

A multiphysics discrete element method software

N/A
N/A
Protected

Academic year: 2021

Condividi "A multiphysics discrete element method software"

Copied!
131
0
0

Testo completo

(1)

Scuola di Ingegneria Civile, Ambientale e Territoriale

Dipartimento di Ingegneria Civile e Ambientale

Ingegneria Civile, indirizzo Strutture

Master Thesis

A multiphysics Discrete Element Method Software

Prof. F. Calvetti, Politecnico di Milano

Calidonna Bruno Maria <801694>

(2)
(3)
(4)
(5)

Contents

Abstract 1 Introduction 2

I Mathematical Modelling

4

Particle Kinematics 6 Description of Rotations . . . 6 Kinematic Equations . . . 8 Particle Dynamics 10 External eld forces . . . 11

Near-eld forces . . . 12

Mechanical contact forces . . . 13

Normal response . . . 15

Tangential and rotational response . . . 16

Barrier interaction . . . 19

Thermal Field 21 Conductive heat transfer . . . 21

Convective heat transfer . . . 23

Radiative heat transfer . . . 25

Barrier Modelling 27 Geometry denition . . . 28

Contact detection . . . 29

II Numerical Solution

33

(6)

Convergence and time-stepping . . . 36

Code Structure and Algorithm 38 Objects implemented . . . 38

Algorithms . . . 41

Optimization Tools 48 Barrier mesh generator . . . 48

Random particle generator . . . 49

Auto-adaptative time-stepping . . . 51

Linked cells and Verlet listing . . . 53

Code Validation 59 Mechanical validation . . . 59

Thermal validation . . . 72

Electromagnetic Validation . . . 74

Auto-adaptative time-stepping . . . 79

III Case Study

84

Problem formulation 86 Dry Granular Flow over an inclined surface . . . 86

Rockfall on granular material over a rigid horizontal surface . . . 87

Dry granular ow impact over a vertical rigid surface . . . 89

Code setup 91 Dry Granular Flow over an inclined surface . . . 91

Rockfall on granular material over a rigid horizontal surface . . . 95

Dry granular ow impact over a vertical rigid surface . . . 95

Results Analysis 97 Dry Granular Flow over an inclined surface . . . 97

Rockfall on granular material over a rigid horizontal surface . . . 106

Dry granular ow impact over a vertical rigid surface . . . 110

IV Conclusions

113

(7)
(8)
(9)

List of Figures

1 Boundary Layer . . . 24

2 Normal elastic contact between two particles: input conguration . . . 60

3 Normal elastic contact between three particles: input conguration . . . 62

4 Particle-barrier collision: input conguration . . . 63

5 Particle collision with adjacent barriers: input conguration . . . 64

6 Particle passing through a hole: input conguration . . . 65

7 First and Last Particle Speed in Time. Case E1. . . 69

8 First and Last Particle Speed in Time. Case E2. . . 69

9 First and Last Particle Speed in Time. Case E3. . . 70

10 First and Last Particle Speed in Time. Case E4. . . 70

11 First and Last Particle Speed in Time. Case E5. . . 71

12 Last Particle Speed in Time. All cases compared. . . 71

13 Wave total travelling time. Time x Young Modulus, semi-logarithmic. . . 72

14 Wave celerity. Speed x Young Modulus, semi-logarithmic. . . 72

15 Two particles in contact with thermal gradient: input conguration . . . 73

16 Two particles in contact with thermal gradient: results. Time x Temperature . . . 73

17 Single particle exposed to dierent wind speeds: results. Time x Temperature, varying wind speed . . . 75

18 External electrical eld only: results. Time x position . . . 76

19 External electrical eld only: results. Time x speed . . . 77

20 External magnetic eld only: results. Time x position . . . 78

21 External magnetic eld only: results. Time x speed . . . 79

22 Combined electromagnetic eld: results. Time x position . . . 80

23 Combined electromagnetic eld: results. Time x speed . . . 81

24 Post-analysis: considerations on errors. Errors and time-steps . . . 81

25 Auto-adaptative time-stepping test: input conguration . . . 82

26 Auto-adaptative time-stepping test: results. Errors x Cases . . . 83

27 Case study: problem formulation. Hutter apparatus . . . 86

(10)

29 Case study: problem formulation. Particles, slide and wall. . . 89

30 Case study 1: end of rst phase. (m over m) . . . 98

31 Case study 1:start of second phase. (m over m) . . . 98

32 Case study 1:start of second phase. (m over m) . . . 99

33 Case study 1:intermediate stage of second phase. (m over m) . . . 99

34 Case study 1:end of second phase. (m over m) . . . 99

35 Case study 1:origin of the critical disruption.(0.266 s) (m over m) . . . 100

36 Case study 1:origin of the critical disruption: detail.(0.266 s) (m over m) . . . 100

37 Case study 1: distrupted simulation.(0.35 s) (m over m) . . . 101

38 Case study 1: distrupted simulation.(0.45 s) (m over m) . . . 101

39 Case study 1: distrupted simulation.(0.55 s) (m over m) . . . 102

40 Case study 1: distrupted simulation.(0.65 s) (m over m) . . . 102

41 Case study 1: distrupted simulation.(0.75 s) (m over m) . . . 103

42 Case study 1: distrupted simulation.(0.85 s) (m over m) . . . 103

43 Case study 1: simulation with reduced stiness at the time of the critical disruption (m over m) . . . 105

44 Case study 1: simulation with reduced stiness at 0.45 s (m over m) . . . 106

45 Case study 2: Vertical forces on the bottom plate, null internal angle . . . 107

46 Case study 2: Vertical forces on the bottom plate, null internal angle . . . 107

47 Case study 2: evolution of vertical forces on the bottom plate, null internal angle . 108 48 Case study 2: Vertical forces on the bottom plate . . . 109

49 Case study 2: Tangential forces on the bottom plate . . . 109

50 Case study 2: evolution of vertical forces on the bottom plate . . . 110

51 Case study 3: evolution of perpendicular forces on the wall . . . 111

(11)
(12)

Abstract

The result of this work is a completely working and validated multiphysics soft sphere DEM soft-ware.

Interactions considered are of mechanical, thermal and electromagnetic root. Autoadaptative timestepping and linked cells and verlet lists are implemented.

For the latter, the code features a routine that implement an auto-evaluation of the necessity of updating the lists.

The forces considered for the resolution of the governing equation of the problem, which is a dierential equation of second order, are near-eld forces, due to the electrical charges of other particles, contact forces, due to the shock with other particles and barriers, and electromagnetic forces, due to the presence of external electromagnetic elds.

Contact is considered to be pseudo-elastic, modelled with dumping added to a Herztian formula-tion.

Rotations are modelled through a rescaled Rodrigues' vector. Near-eld are modelled by empirically-calibrated formulae.

Electromagnetic forces are modelled straight by the theoretical solutions.

This work features a triangular, nite, planar 3D barrier element. This element requires just three points as input to be dened and allows the representation of basically every possible contact sur-face.

Thermal interactions implemented are of conductive, convective and radiative nature, featuring inter-particle and particle-environment interactions.

Keywords: DEM, Multiphysical Staggering Scheme, Particle-Structure interaction, Thermal in-teraction, Electromagnetic inin-teraction, Granular media

(13)

Introduction

The Discrete Element Method was born in the United States in the early seventies thanks to the work of P.A. Cundall.

Cundall was a Civil Engineer and was working for the U.S. Army, trying to model and simulate rock fall phenomena.

He baptised his work "Distinct Element Method", however it became known as "Discrete Element Method": both describe the same idea.

Nowadays, DEM modelling is a new frontier for a lot of dierent engineering problems: it is a versatile framework that has myriads of possible applications, yet to be completely explored. It is in fact sucient to change the scale of the study along with the modelling of forces to pass from rock fall phenomena to simulations on molecular dynamics.

However, it must be noted that the word sucient is misleading: behind an implementation stands a mathematical modelling.

Most of the times, an original mathematical modelling.

Let's consider for example themechanics of granular materials, just to focus on phenomena that have a scale that is of interest for us Civil Engineers.

The mechanics of granular materials is fundamentally dierent from the one of solids or uids, since it has not yet a solid and consistent theory based on principles and axioms.

What we have, is a collage of dierent ideas or propositions, that altogether dene a framework for a problem.

This happens because granular materials can behave as a solid, a uid or even gases (think about dust).

It is not possible to idealize them as a continuum: a priori, we are dealing with dierent, indepen-dent, discrete material points.

On this idea is based this DEM Software, which, actually, by following modern nomenclature, presents itself as a XDEM : Extended Discrete Element Method.

(14)

B.M. Calidonna Introduction Such Methods perform analysis in which interactions are not only of mechanical nature, but are also due to interactions with other elds, such as thermal, electromagnetic, or even to the interac-tions with uids.

My code is able to perform a multi-physics analysis that involves dierent types of interactions: ˆ Mechanical;

ˆ Electromagnetical; ˆ Thermal;

Such features could be used, with the due work and modelling, to simulate the behaviour of clays, or some occulation phenomena, or even some problems of uid-structure interactions...

The horizon of possibilities is wide and open, waiting for some brave modelling and testing. And this, incidentally, is one of the main reasons for which I started and pursued this project, in three dierent countries: Brazil, United States and Italy.

In fact, this work started in 2015 in Sao Paulo, Brazil, under the guidance of Professor Eduardo M.B. Campello, at EPUSP (Escola Politécnica da Universidade de Sao Paulo) and continued in Berkeley, California, with the suggestions and support from Professor Tarek I. Zohdi, at UCB (University of California, Berkeley), to nally nd its closure here in Milan, at Politecnico, with the collaboration and help from Professor Francesco Calvetti.

What started from a white, empty le, became today a 222 pages simulator that grew with me and my knowledge.

And this could be just the beginning: there's a lot to explore and to test. There's a lot to learn. There's a lot to work on.

(15)

Part I

(16)

In this part, basic theoretical foundations of this work will be reviewed.

Particle dynamics will be briey tackled in order to understand how our physical system is math-ematically modelled.

(17)

Particle Kinematics

Let's consider a single spherical particle with given radius r and density ρ.

We dene two Cartesian coordinate systems: one with origin in the point O, xed in space and time, and the other with origin in the center of the particle C, and moving with it in space and time.

We will thus call the rst coordinate system, dened by {O, e1, e2, e3}, global reference system, and

{C, el

1, el2, el3} the local reference system.

Before going on, however, an important digression has to be made.

In fact, the computation of the rotations in this work is done through a rescaled Rodrigues' vecto-rial formulation.

For the sake of clarity, such formulation will be hereby explained.

Description of Rotations

The description of rotations in mechanics is generally done through the Euler angles.

In this parametrization, each complete rotation is dened through three partial rotations around three pre-dened axis.

This composition is not trivial and involves the evaluation of extensive trigonometric expressions; more attention in the handling of the order of the composed rotations (which generates dierent formulas based on who comes rst and who last); the extraction of the Euler angles from the complete rotational tensor and other non-trivial problems (such as the possible loss of one degree of freedom if two intermediary rotations result aligned).

All these drawbacks enlarge the computational eort needed to numerically solve the equations. For this reason, the description of rotations through the Euler vector is more attractive.

The clearest advantage is that with this formulation there's no need for pre-dened axis of rota-tion, since it is based on its own axis. However, we still have to deal with the other fundamental draw-backs of the Euler angles: the trigonometric expressions and the need to work with tensors.

(18)

B.M. Calidonna Particle Kinematics Luckily, it is possible to rescale the Euler vector with a vector in the same direction and verse that leads to a simplication the formulation.

Let's consider the Euler vector θ = θe, corresponding to an arbitrary rotation of magnitude θ around the axis e.

We can then write the Rodrigues' formula of the rotation tensor in function of θ as follows: Q = I +sin θ

θ Θ +

1 − cos θ θ2 Θ

2 (1)

where Θ = Skew(θ) is the antisymmetric tensor whose axial vector is θ.

Through some trigonometric substitutions, we can get to the following form of Q: Q = I + 2 1 + tan2(θ/2)  tan(θ/2) θ Θ + tan2(θ/2) θ2 Θ 2  (2) We dene the Rodigrues' vector as β = tan(θ/2)e, such that k β k= β = tan(θ/2) and:

β = tan(θ/2)

θ θ (3)

This allows us to rewrite the rotational tensor as: Q = I + 2

1 + β2(B + B

2) (4)

with B = Skew(β).

This is known as Rodrigues' parametrization of the rotational tensor.

We can still get a more compact form by rescaling again this vector through α = 2β, as seen in Campello.

α = tan(θ/2)

(θ/2) θ (5)

That leads to:

Q = I + 4

4 + α2(A +

1 2A

2) (6)

where A = Skew(α). We this parametrization, the composition of two successive rotations is computed through the following, purely vectorial, expression:

α1+2= 4 4 − α1α2 (α1+ α2− 1 2α1× α2) (7) It is appropriate to make a few considerations on this formulation.

Firstly, we lost the global character the Eulerian denition of the rotation had: in fact, it is impos-sible to describe rotations of the order of θ = ±π, since β → ∞. However, this doesn't represent a real drawback for a DEM software since the time intervals over which the time integration will

(19)

Secondly, it is possible to observe that the number of trigonometric functions involved in the de-scription of the rotations decreased dramatically: this causes a huge computational advantage. In addition,also the vectorial description of two consecutive rotations brings advantage: being vecto-rial, there's no need to extract components from a tensor, with a huge economy on computational time.

It is important to note that non-vectorial description of rotations (e.g. tensorial) are possible and applied in other DEM software.

The decision of using the approach above mentioned rather a more traditional one, comes from the fact that the only disadvantage of such formulation isn't really limiting for my software, while the advantages it brings in computational terms are gargantuan.

Kinematic Equations

As introduced before, at the beginning of the chapter, let's consider a single particle and two reference systems, one local and one global.

Let's consider a generic time instant t: we can say that t0< t ≤ tf, where t0 is the initial and tf

is the nal conguration.

A reference conguration is dened at the instant tr, such that t0≤ tr< t ≤ tf.

From now on the quantities evaluated in the reference conguration will be referred to with the notation (·)r.

The position of a generic material point on the particle in the reference conguration is dened as: xr= xrC+ rr (8) where xr

C is the position vector of the center of the particle in the reference conguration and r r

is the vector that connects the center of the particle C with the material point.

Analogously we can dene the position of the material point at the generic instant t as:

x = xC+ r (9)

If we were to assume just a translation of the particle, without any rotations, the dierence ∆x = xr− x would be equal to the translation of the center of the particle; in fact, as the particle is assumed rigid, all the points would experience the same act of movement, making rr= r.

However, being the particle able to rotate, we the vector r experiences a displacement in respect to the reference conguration that we can describe as:

(20)

B.M. Calidonna Particle Kinematics The notation (·)∆ denes the quantities calculated between the actual conguration in t and the

reference one. Thus, Q∆ is the rotation tensor of the particle between the two congurations,

dened as: Q∆= I + 4 4 + α2 ∆ (A∆+ 1 2A∆ 2) (11)

It is possible to dene the velocity by derivation of the position:

v = ˙xC+ ˙r = vC+Q˙∆QT∆r = vC+ Ωr (12)

where vC is the velocity of the center of the particle and Ω is the angular velocity tensor of the

particle. It is possible to extract ω from Ω since the tensor is antisymmetrical: ω = 4 4 + α2 ∆  I + 1 2A∆  ˙ α∆ (13)

which leads us to the expression:

v = vC+ ω × r (14)

Deriving the velocity equation we get to the acceleration:

a = ˙vC+ ˙Ωr + Ω˙r = aC+ ˙Ωr + Ω( ˙Q∆QT∆r) = aC+ ˙Ωr + Ω2r (15)

˙

Ω, the rotational acceleration tensor, retains the same characteristics as Ω, meaning that it is also antysimmetric and it is still possible to extract the axial vector, the angular acceleration vector ˙ω. The acceleration will be written as:

a = aC+ ˙ω × r + ω × (ω × r) (16)

The kinematics of a single particle has thus been dened.

Considering a system composed by NP particles, just a little change in notation is needed: for a

cleaner documentation, the notation (·)C, referring to the center of the particle, will be substituted

by (·)i, where i is the number of the particle we are referring to.

The notation (·)i is extended to all the quantities relative to the i-th particle.

Summing up, the kinematics of the material point P of the i-th particl can be written as:

xPi= xi+ rPi (17)

vPi= vi+ ωi× rPi (18)

(21)

Particle Dynamics

The code is based on Euler's law of motion.

The cardinal equations are two: the rst one models the change of linear momentum while the second models the change of angular momentum.

Let's consider a single particle for the moment: the extension to N particles is actually straight-forward and requires little change to the notation, but this will tackled later on.

Let's focus on the two cardinal equations for a single particle:

˙

λ = ftot (20) ˙

µC= mtotC (21) λ is the linear momentum of the particle that can be expressed as, considering the kinematics previously calculated: λ = Z V ρvdV = Z V ρvCdV + Z V ρ (ω × r) dV = (22) being V the particle volume. The assumption that the density doesn't change in time is made, thus allowing us to write:

m = Z

V

ρdV (23)

also, being r calculated from the center of the particle that coincidentally is its center of mass, it is: Z V ρ (ω × r) dV = 0 (24) Hence it is: λ = mvC (25)

Deriving it in respect to the time, it is obtained: ˙

λ = maC (26)

Substituting it into the rst cardinal equation:

(22)

B.M. Calidonna Particle Dynamics Focusing on the second cardinal equation, let's evaluate the angular momentum:

µC= Z V (x × ρv) dV = xC× Z V ρ (vC+ ω × r) dV + Z V r × ρ (vC+ ω × r) dV (28)

The inertia tensor of a particle in relation to C is equal to: JC=

Z

V

ρ [(r · r) I − r ⊗ r] dV (29) where ⊗ is the tensorial product. The angular momentum can thus be re-written as:

µC= xC× vC+ JCω (30)

An ulterior simplication can be performed since the particle is spherical and since its shape and density don't change in time: it is in fact possible to write:

JC= jI (31)

where

j = 2 5mr

2 (32)

so that, deriving in time, we get to:

˙

µC= j ˙ω (33) Substituting it into the second cardinal equation:

j ˙ω = mtotC (34)

These equations are easily extended to a system of particles by substituting the (·)Cwith (·)i, with

i denoting the center of the i-th particle. The equations assume now the aspect:

mai= fitot (35)

j ˙ωi= mtoti (36)

It is now sucient to dene mtot i and f

tot

i to complete the description of the system.

It will be:

fitot= fief + finf+ fimc (37) mtoti = m

mc

i (38)

where (·)ef stands for external elds: here are included electromagnetic forces and gravity;

(·)nf stands for near eld forces: here are included the eld forces generated by the interaction between particles; (·)mc stands for mechanical contact: here are included the forces generated by

normal and tangential contact between particles and between particles and barriers. The formulation for each of these elds will be now tackled.

(23)

External eld forces

This addend takes into account the inuence external elds have on the particles.

The external elds acting on the particles in this code are gravitational, electric and magnetic: fief = figrav+ fiele+ fimag (39)

Gravitational force

Gravitational force is trivially implemented by:

figrav= mig (40)

where mi is the mass of the i-th particle and g is the gravitational acceleration vector.

Generally:

g = (0, 0, −9.81) (41) but it is actually possible to change the shape of g to dene gravity as acting along a direction dierent than z.

Electro-magnetic forces

Lorentz forces are computed:

fiele= qiE (42)

fimag= qivi× B (43)

where qi is the electrical charge of the i-th particle, E is the electrical eld and B is the magnetic

one.

Near-eld forces

The theoretical interpretation of the interaction force between two particles, i and j, due to their respective charges q is given by Coulomb's law:

fijnf= qiqj 4π k ri− rj k2

nij (44)

Where q are the respective electric charges for the two particles,  is the permittivity and nij is

the normal direction determined by the dierence in the position vectors of the particles' centers, dened by:

nij =

ri− rj

(24)

B.M. Calidonna Particle Dynamics However, for massive systems, we cannot apply this model, since Maxwell equations' should be applied to each of the components, generating an enormous quantity of equations.

Thus, we will use empirically generated interaction laws.

There are vast numbers of empirical representations that are reported in Literature.

However, we will use the model presented by Zhodi [1]. The resulting force on particle i due to near-eld interactions fnf i is given by: finf= Np X j6=i α1ijk ri− rjk−β1−α2ijk ri− rjk−β2 nij (46)

Where α e β are properly dened coecients.

We opted for this modelling because it can eectively represent dierent kind of interactive forces, not just the ones of electric nature.

In fact, α e β can be, also: ˆ Mass based

ˆ Surface area based ˆ Volume based

This leaves however the non-trivial task of dening those coecients.

Mechanical contact forces

Contact mechanics denes two opposite poles of mechanical interaction between two bodies that are coming into touch:

ˆ Perfectly Elastic shock ˆ Perfectly Plastic shock

In the rst case, the two bodies come in touch and no energy is dissipated during the contact, neither the particles are subjected to any permanent deformation: it's the case, for example, of a tennis ball that shocks with a wall; it just comes back with approximately the same speed with which it shocked against the wall.

If the shock was perfectly elastic, that speed would be exactly, in magnitude, the same as in which it came, but with opposite direction.

(25)

the two bodies becomes one, joining their masses and respecting the continuity of movement. It's the case of two lovers who are meeting at the airport: one runs and jumps on the other, hugging him/her; a few steps back are taken, in order to accommodate the new quantity of motion attained.

If it were a perfectly plastic shock, with no friction whatsoever, the two of them would be happily hugging themselves in an endless motion dened by the speed generated in the instant just after the contact.

Dening plastic shocks, besides the necessity of solving continuity equations, involves a better denition of the material and its deformations. In order to represent a more realistic contact model, we should in fact address the reality of the process of shock, meaning studying the ap-proaching part, the contact part and the release part that all present dierent material behaviours. We decided, thus, to create a functioning simulator based on "simpler" mechanics, even if not completely elastic.

The starting point was the Elastic contact law known as Hertzian contact.

We will omit the derivation of this law (that can be found in [8]). It is however important to focus on the hypothesis it considers:

ˆ The strains are small and within the elastic limit; ˆ The surfaces are continuous and non-conforming; ˆ Each body can be considered an elastic half-space; ˆ The surfaces are frictionless;

It is obvious that by using this model we are making some simplications (rst of all the no-friction hypothesis).

For this reason, a damping addend has been added to the modelling, giving the chance to simulate dissipation in contact, as seen in Campello[2].

In the following section, normal response refers to the interaction along the direction connect-ing the center of two particles or, in the case of the barrier, along the normal direction of the barrier;

Tangential response refers, obviously, to the response in the perpendicular plane to the normal direction, e.g. on the tangential plane to the contact surface.

It is:

(26)

B.M. Calidonna Particle Dynamics mmci = mppi + mpbi (48) where the notation (·)pp refers to the resultant of the particle-particle interaction and (·)pb refers

to the resultant of the particle-barrier interaction.

Trivially, (·)n refers to the normal direction and (·)tto the tangential.

Normal response

Let's consider two particles, i and j, in contact.

The normal force acting on the two particles is dened by: fijn,pp= −4

3E

∗√r| δ

ij|3/2nij− d∗δ˙ijnij (49)

with d∗, the damping parameter associated to the dissipation in the normal direction, being:

d∗= 2ξn q 2m∗E∗√r| δ ij|1/4 (50) and where E∗= EiEj Ej(1 − µ2i) + Ei(1 − µ2j) (51) r∗= rirj ri+ rj (52) m∗= mimj mi+ mj (53) δij=k xi− xjk −(ri+ rj) (54) ξn = − lne √ π2+ ln2e (55) e = − ˙ δijtf ˙ δijti (56) that are called:

ˆ E∗: elastic equivalent modulus;

ˆ r∗: equivalent radius;

ˆ m∗: equivalent mass;

ˆ Ei: Young modulus of particle i;

ˆ µi: Poisson modulus of particle i;

ˆ ri: radius of particle i;

(27)

ˆ δij: overlapping of the two particles;

ˆ ˙δij: velocity of overlapping (it is the relative velocity between the center of the particles);

The coecient e is material coecient that can be determined in laboratory as a ratio between the overlapping velocities at the beginning of the contact and at the end of it.

An important remark has to be made.

This formulation stands on the hypothesis that there is overlapping between spheres, meaning that they are not factually rigid.

This could appear as a clear violation of the fundamental hypothesis made at the beginning. However, it must be noted that this violation happens just locally, at the place and at the time of contact: it is a soft sphere model. The advantages of such an approach include the fact that there is no restriction of the duration of the contact.

In fact, there is a way to bypass this violation with hard sphere models, but they imply a short contact duration between spheres: this results in the inapplicability of these sort of models in situations of "permanent" contact, like a bed of gravel, for example.

On the other hand, hard sphere models are computationally more ecient in regard to the evalua-tion of contacts, while soft sphere models are signicantly slower, due to the fact that the integraevalua-tion of movement equations has to be done throughout all the contact duration.

Tangential and rotational response

The modelling of friction is done through a semiempirical model based on Coulomb model. This special model allows us to capture stick-slip phenomena with ease.

The tangential force is coupled to the normal contact force through a friction coecient, dier-ent if there is adherence or not (static and dynamic coecidier-ent, as classical Coulomb theory states). In this work, the tangential localized deformation due to the contact and experienced by the surfaces is modelled through a ctitious spring-dumper in parallel with the direction of tangential contact, positioned at the point of contact.

A tentative force is computed through:

fijatr,tent= −(katrij ∆xtentij + datrij vij) (57)

where katr ij and d

atr

ij are the spring stiness and the damping constant of the ctitious

spring-dumper model.

∆xtentij is the tentative displacement of the spring, computed with:

(28)

B.M. Calidonna Particle Dynamics where ∆xstored

ij is the cumulative displacement of the spring,stored and computed from the

previ-ous time instants.

A very quick remark has to be done about this vector.

Being it a vector, it has components that were dened up until the previous timestep.

However, as it will be shown, these quantities depend on nij, the normal direction between the i-th

and j-th particle. Being the system dynamic, nij changes from timestep to timestep, thus requiring

us to project the cumulative displacement in the new direction of contact, through:

∆xstoredij = ∆xstoredij − (∆xstoredij · nij)nij (59)

δxtentij is the tentative incremental displacement experienced in the actual timestep.

Whenever we refer to tentative is because we are starting from the assumption (that must be veried) of adherence of the surfaces, e.g. no slip.

vij here is referring to the relative tangential velocity of the particle at the point of contact P.

Meaning: vij= vPrel,t= v P rel− (v P rel· nij)nij (60) vP

relrefers to the relative velocity of particle i and j at point P.

Since we are considering the point P, it is necessary to add the contribute of the angular velocities. Thus, the velocity at point P for the particle i becomes:

viP= viP+ wi× rPi (61)

rPi is the vector that connects the center of the particle i to the point P. Since the deformation of the particle is negligible, it is admissible to assume it equal to the radius and directed along the direction of the connection of the centers of i and j, meaning:

rPi ≈ rinij (62)

Some of the coecients mentioned in the equation for the tentative friction force are yet to be dened.

Let's quickly dene them.

The tentative incremental displacement δxtent ij is:

(29)

that can be integrated with the generalized trapezoidal method: δxtentij ∼=(1 − φ)vPrel,t(t) + φv

P

rel,t(t + ∆t) ∆t (64)

The stiness of the spring is the one Mindlin dened for the tangential deformation experienced by two elastic bodies in no-slip conditions:

katrij = 8G∗√r∗| δ ij|1/2 (65) where G∗= GiGj Gi+ Gj (66) The damping constant datr

ij is given by:

datrij = 2ξt

q m∗katr

ij (67)

where ξtis the desired damping ratio for tangential forces.

Having computed the tentative force, we must verify its admissibility:

k fijatr,tentk −µSk fijconk (68)

where µS is the static friction coecient and fijcon is the normal contact forces.

It he above expression is true, meaning that µSk fijconkis bigger than our tentative friction force,

our initial assumption of adherence is conrmed.

Thus, all the variables that were indicated as of tentative value, become the real ones, and are updated.

If, on the other hand, the above equation is not veried, we have slip between the two particles. If there is slip, we have no further displacement in the tangential spring which happens to be at the maximum possible displacement: the static limit;

∆xij = µS k fijconk katr ij ttentij (69) where ttentij = f atr,tent ij k fijatr,tentk (70) that is the direction of the tentative friction force.

Once known the tangential force acting on the particle, it is possible to compute its acting moment through: mijatr= rPi × f atr ij − µRr∗k fijconk ωi− ωj k ωi− ωj k (71)

(30)

B.M. Calidonna Particle Dynamics where µR is the rolling resistance coecient.

Barrier interaction

The interaction with the barrier elements follows the same modelling as the one seen for the particle-particle interactions.

However, there are few but fundamental dierences, mainly regarding: 1. Equivalent quantities;

2. Normal; 3. Relative speed;

m∗,E∗,r∗ and G∗ depend, for inter-particle interaction, on both the relative quantities of the particles e.g. m∗= m(m

i, mj).

However, for barriers is, as they are modeled as half-innite rigid spaces:

rbarr→ ∞ (72)

Ebarr→ ∞ (73)

mbarr→ ∞ (74)

Gbarr → ∞ (75)

hence, we conclude that for particle-barrier interaction, the equivalent quantities acting in the interaction between the i-th particle nad the j-th barrier are:

r∗= ri (76)

E∗= Ei (77)

m∗= mi (78)

G∗= Gi (79)

Regarding normals, the dierence is that the barrier has always a xed normal dependent only on its vertexes, e.g. its space orientation.

(31)

the barrier, pointing towards the particle.

For relative speeds, since the barrier is static, the relative speed is dened by just the speed of the i-th particle.

(32)

Thermal Field

The code supports thermal interactions between the particles and between the particle and the environment.

Conductive, convective and radiative heat transfer are implemented.

It is worth noting that given the formulation of the thermal eld, we are obliged to perform a trapezoidal time integration rule in time.

This happens because thermal interactions do depend on the temporal gradient of the temperature: if it were an explicit integration, we could nd ourselves with no thermal update and if it were an implicit one we could overestimate the speed of cooling or heating.

However, if just the nal thermal equilibrium is of interest, both trapezoidal and implicit tend to the same result.

As a second remark, mechanical quantities dependency on temperature is not considered, since particles and barriers are assumed perfectly elastic.

In this chapter mathematical modelling for the subsequent elds will be showed: ˆ particle-particle interaction: conductive heat transfer;

ˆ particle-environment interaction: convective heat transfer; ˆ particle-environment interaction: radiative heat transfer;

The main assumption is that these eects can be superimposed, thus writing, for the i-th particle: ˙

θi= Qcond,i+ Qconv,i+ Qrad,i (80)

where ˙θiis the temperature variation of the i-th particle and Qcond,i,Qconv,iand Qrad,irespectively

represent the net heat ux due to conductive, convective and radiative heat transfer.

This assumption is justied by the fact that simulations will be carried on with extremely small time-steps.

(33)

Conductive heat transfer

Heat conduction occurs when particles (as intended in atoms and molecules) with high speed or vibrations directly interact with neighbouring particles, transferring some of their energy.

Thermal conduction is divided into four categories: ˆ Steady-state conduction

ˆ Relativistic conduction ˆ Quantum conduction ˆ Transient conduction

Steady-state conduction happens when the temperature driving the conduction is constant; Rela-tivistic conduction is a model compatible with special relativity, since Fourier's Law (that dictates the behaviour of bodies in transient conduction, as we will see) is not applicable in relativity, due to the admissibility of innite speed of propagation of heat signals; Quantum conduction models the heat transfer through waves, as if they were similar to pressure in sound waves.

None of the three cases mentioned above are of interest for the applications the code was thought for, so the focus fell on the last type: Transient conduction.

Transient conduction happens every time there is a dependency of the thermal eld on time: a perturbation causes a modication in the thermal eld, spatially and temporally, until an equilib-rium is reached.

Thermal equilibrium is dened as the equality between the heat ow into the system and the heat ow out, that leads to the temperature being unchanged in time in every point of the system. This behaviour is described through Fourier's Law, known also as Heat equation.

Fourier's empirical law states that "the heat ux resulting from thermal conduction is proportional to the maginitude of the temperature gradient and opposite to it in sign". Mathematically speaking, we are dealing with a parabolic dierential equation:

∂θ ∂t − α∇

2θ = 0 (81)

However, for the monodimensional case, it reduces to a much easier form: ∂2θ ∂x2 i = 1 α ∂θ ∂t (82)

which in engineering terms translates to:

(34)

B.M. Calidonna Thermal Field Where C is the thermal capacity and Q is the heat absorbed by the body.

Thermal capacity is proportional to the specic heat and the mass of the body. We can write this concept, referring to the i-th particle, as:

miciθ˙i= Qi (84)

where Qi represent the conductive contribution from sorrounding particles.

An important assumption has been made: that the temperature eld in the particle doesn't change, e.g. is uniform.

This can be assumed (it means we are dening a lumped thermal model) if the Biot number is small.

The Biot number is a dimensionless quantity that determines wheter or not the temperatures inside a body will vary signicantly in space.

It is dened as:

Bi = Lh

k (85)

where h is the heat transfer coecient, L is the characteristic lenght and k is the thermal conduc-tivity of the body.

If the Biot number is much smaller than one, we can assume the temperature eld uniform inside the body.

For spheres, the Biot number scalse with the ratio of the particle volume to the particle surface area, meaning: V As = 4/3πR 3 4πR2 = R 3 (86)

Hence, for small enough radii, this assumption is valid. For the i-th particle, Qiis:

Qi= −

Z

∂ω

Q · ndA (87) this is approximately equal to, imagining the contact with the j-th particle:

Qi= KijAcij

θj− θi

||ri− rj||

(88) where Ac

ij is the contact area dened as:

Acij = π " Ri− 0.5 ||ri− rj|| − R2 j − R2i ||ri− rj|| !# (89) that can be extended to all the particles in contact with the i-th by summation, obtaining:

miciθ˙i = Npc X j KijAcij θj− θi ||ri− rj|| (90)

(35)

Figure 1: Boundary Layer

Convective heat transfer

Convective heat transfer is by denition the transmission of heat through the movement of uids. Even if, rigorously speaking, we can consider convection as a form of coupled conduction and advection, we generally treat it separately.

There exist two types of convection: ˆ Natural convection;

ˆ Forced convection

Natural convection happens due purely to the buoyancy forces generating from the density dier-ential induced by the temperature dierence in the uid: a cooler uid is denser, thus it tends to "fall", while a hotter uid is lighter, thus tending to "y". What happens is then a natural induced movement of portions of the uid exchanging heat between themselves and moving accordingly to their new acquired density.

Forced convection happens when a uid is forced to ow over a surface. Natural convection is here implemented, considering Newton's Law of Cooling:

Q = h(Tw− T∞) (91)

where Tw is the surface temperature of the object and T∞ is the temperature of the atmosphere

at distance δ.

In fact, we know that for a generic hot surface, we have a thin boundary layer in which the uid moves slowly and where we have the steepest change in temperature.

Thus, we can express h, the convective transfer coecient.

We know that h is the most dicult part of the equation to compute and evaluate.

(36)

B.M. Calidonna Thermal Field possible relative velocities between the particle and the environment, as in Osczevski[3].

h = 10.45 − v + 10v0.5 (92) where v is the relative velocity between the sphere and the air ux. The velocity of the air ux is the one considered outside the boundary layer, at a distance at least equal to 0.005 m.

The afore mentioned equation is expressed in kcal/m2hC. In order to bring it to J/sm2K ( or

equally said W/m2K), we apply a corrective coecient equal to 1.1630, leading us to:

h = 12.15335 − 1.1630v + 11.630v0.5 (93) It is important to notice that this equation accounts just for free ow and for relative velocities inferior to 20 m/s.

Radiative heat transfer

Thermal radiation identies the heat transfer process that happens by photons in electromagnetic waves.

It is a direct result of the random movements of the atoms and molecules in the matter and it is modeled by the Stefan-Boltzmann law.

The Stefan-Boltzmann law for grey bodies states that the heat transfer per unit time is equal to the absolute temperature in Kelvin T times A, area of the emitting body, corrected by two constants: the Stefan-Boltzmann constant σ and the emissivity coecient of the object ().

Q = σT4A (94) We can account for the net radiation loss rate for a hot object in cooler surroundings through:

Q = σ(Th4− Tc4)A (95)

where This the temperature of the hot body and Tc is the temperature of the cold surroundings.

(37)

elements:

(38)

Barrier Modelling

The barrier element implemented is a three-dimensional planar triangular surface.

However, in order to have consistency in the calculations and no change of sign in the resultant forces, a thickness is assigned. It is important to notice that this thickness doesn't alter the me-chanics of the barrier. It is merely a computational stratagem.

The only input needed for our barrier are its three points, dened in the space of the three Carte-sian coordinates, an identier, a Young and a Poisson modulus, plus the possibility to include a rigid translation motion law dependent on linear, sinusoidal and cosinusoidal terms:

xbarr= xbarr,0+ αt + A sin(ω1t) + B cos ω2t (97)

Having that, the code performs once and at the very beginning of the simulation, a geometric initialization of the barrier element.

Before diving into the mathematical simulation of the barrier, let's have a general overview of its communication with the particle.

Two main checks are performed, when trying to identify contact with a particle:

1. First, a normal distance check: the distance between particle and barrier is projected onto the normal. Since this distance is dened considering the center of the particle, we subtract to this value the value of the Radius of the particle. Then, if and just if the normal distance is lesser or equal than zero, we proceed to the second check;

2. A tangential distance check: given the normal distance value, the distance between particle and barrier is projected onto the tangential plane of the element; it is then checked if the distance lies between the boundaries of the element, once discounted by the half-chord ob-tained "cutting" the particle at the plane of the element.

(39)

Let's dive a bit deeper into the formulation of this element.

Geometry denition

Given three points in space, the center of the element is computed as: Cx= x1+ x2+ x3 3 (98) Cy = y1+ y2+ y3 3 (99) Cz= z1+ z2+ z3 3 (100) C = (Cx, Cy, Cz) (101)

The center of the element will be used as the reference point for the barrier element for the Particle-Space interaction. Also, normal, tangent and the perpendicular to the tangent will have their origin here.

Once the center is known, we compute the three vectors connecting the center to the three vertexes as:

cij = Cj− pij (102)

ci= (cix, ciy, ciz) (103)

Where i is the number of the vertex (1,2 or 3) and j is the considered direction (x, y or z). pij is

the j-th coordinate of the i-th point of the triangle.

The direction dened by c1, meaning the vector connecting the center to the rst vertex will be

considered as the main tangential one for the element.

Being the element planar, each one of the civectors is a tangent. Thus, the cross product between

c1 and c2, the vector connecting the center to the second vertex inputed, will be then performed,

identifying the normal vector:

N = c1× c2 (104)

This implies that a convention must be chosen: the points must be hence inputed counter-clockwise in the plane of the barrier, so to have an outward normal vector.

Then, the normal versor will be thus computed through the formula: n = N

k N k (105)

Once the normal versor has been evaluated, being the primary tangent of the surface identied as c1, we can dene the second tangent as:

(40)

B.M. Calidonna Barrier Modelling A computation of the norms of the ci will be performed.

Having the three vectors ci and the center C of the barrier, we can visualize the barrier as the

composition of three smaller triangles. Knowing the coordinates of the vertices of the triangles, as we already have derived the vectors of two of the sides (the ci), we also compute the third

remaining side, corresponding to the physical limit of the barrier.

After the iteration of the process for the three triangles, the focus shifts on the computation of the internal angles through Carnot theorem.

The need for this computation will be shown in the next paragraph, since it's fundamental for the correct detection of contacts.

Finally, the computation of the height of the smaller triangles is performer through: hk=

2pp(p− k lkk)(p− k cik)(p− k cjk

k lkk (107)

where p is the semiperimeter of the k-th of the three triangles included in the barrier,lk is the side

of the barrier.

To recap, nally, for each of the smaller triangles composing a single barrier, we now have: ˆ a maximum distance, represented by the bigger of the ci and cj norms;

ˆ a minimum distance, represented by the height hk;

ˆ the angles at the base, considering as base the side of the barrier.

It is worth remembering that this computation is performed once in the whole simulation. How this values apply to better dene the physics of our problem will be dened in the next chapter.

Contact detection

As introduced before, the contact detection happens through a two-step verication: 1. Normal condition

2. Tangential condition Normal condition

This is a straightforward check. We dene the vector distance between a generic Particle P and our barrier element B as:

(41)

where xpis the position vector of the center of the particle in the global reference system and CB

is the position vector of the center of the barrier in the same coordinate system.

As a matter of fact, we can project this distance onto the normal direction to the barrier element by scalar product with the normal versor:

dn= (d · n) n (109)

The norm of this resulting vector is then performed. Subtracting the particle radius and half of the ctitious thickness of the barrier to this value leads to:

δbarr,n=k dnk −R − tbarr/2 (110)

The normal condition is thus expressed as:

δbarr,n≤ 0 (111)

If this value is lesser or equal than zero, the tangential check routine starts. Tangential condition

The tangential condition requires a bit more elaboration.

This is due to the fact that the barrier can be a arbitrary shaped triangle, without any restraint on its shape.

Hence at this stage it is not possible to know from which side of the barrier the particle is ap-proaching: this greatly inuences the tangential condtion.

In order to nd out, we can refer to the position of the center of the particle related to the vertices of the barrier. It is trivial to notice that if it were to be computed the three distances between the center of the particle and the vertices, the two smaller ones will dene the two vertices dening the side of the approach.

d1=k xp− bf pB1k (112)

d2=k xp− bf pB2k (113)

d3=k xp− bf pB3k (114)

The smallest distance denes the closest vertex and with the second smallest we dene the side. Now that the side is known, the proper limit distances can be accessed.

As mentioned before, we already dened a maximum and minimum distance for each side. We will refer to them respectively as dmax and dmin.

Let's compute the distance between the particle and the barrier in the barrier's plane, the tangen-tial one.

(42)

B.M. Calidonna Barrier Modelling This is done through the following:

dt= d − dn= d − (d · n) n (115)

The half-cord length representing the eective contact radius of the particle cut at R − δbarr,n is:

Ref f =

q

R | δbarr,n| −δ2barr,n (116)

The eective tangential distance is nally computed as:

δbarr,t=k dtk −Reff (117)

Three dierent situations may be observed:

1. The tangential distance is bigger than the maximum distance; 2. The tangential distance is smaller than the minimum distance; 3. The tangential distance is between the two above mentioned values The rst two conditions translate to:

δbarr,t> dmax (118)

δbarr,t≤ dmin (119)

Priority is given to the check of the rst condition: if veried, there is no contact; no forces are computed.

If it is not veried, the second condition is checked: if veried, there is contact; forces are com-puted.

However, if this is not veried, we fall in the third situation mentioned above. In that case, a further check is required.

The angle between the vector connecting the center of the particle and the center of the bar-rier projected on the plane of the barbar-rier (dt) and the vector connecting the center of the barrier

to the closest vertex (cclose) is computed:

φ = arccos( dt· cclose k dtcclosek

) (120)

Since in an arbitrary triangle, the ratio between a side and the sinus of the opposite angle is always constant, we can write:

δvar,t

sin(ς)=

k cclosek

sin(ϕ) (121) where

(43)

And ς is the angle between cclose and the side of the barrier. It is computed:

δvar,t=

k cclosek

sin(ϕ) sin(ς) (123) The last condition is eventually exemplied by:

δbarr,t≤ δvar,t (124)

if this condition is veried, there is contact: the forces are computed; if it is not, there is no contact. This detailed contact research allows the code to simulate complex surfaces and holes.

(44)

Part II

(45)

The algorithm of the code is introduced too, with some remarks on some tools that are fun-damental for the resolution of the problem in Part Three.

A section on the experiment and tests carried on the code to validate its functioning is also presented.

(46)

Numerical Solution of the equations

As mentioned in the last chapter, the solving equations for our simulator are:

miai= fitot (125)

jiw˙i= mtoti (126)

miciθ˙i= Qtoti (127)

The approach that will be utilized is a lagrangian updated, meaning that for each time step to be calculated, the reference conguration is dened by the previous one.

We can integrate the equations once:

vi(t + ∆t) = vi(t) + 1 mi Z t+∆t t fitotdτ (128) ωi(t + ∆t) = ωi(t) + 1 ji Z t+∆t t mtoti dτ (129) θi(t + ∆t) = θi(t) + 1 mici Z t+∆t t Qtoti dτ (130) It is possible to nd an approximate solution to the integrals through the trapezoidal rule:

Z t+∆t t fitotdτ ∼=(1 − φ) fitot(t) + φf tot i (t + ∆t) ∆t (131) Z t+∆t t mtoti dτ ∼=(1 − φ) mtoti (t) + φf tot i (t + ∆t) ∆t (132) Z t+∆t t Qtoti dτ ∼=(1 − φ) Qtoti (t) + φQ tot i (t + ∆t) ∆t (133)

All the values considered at time instant t are known, while the ones at instant (t+∆t) are unknown. The coecient φ allows us to shift through dierent types of time integration:

ˆ φ = 0: this denes the explicit Euler method; the solution depends only on the reference conguration;

ˆ φ = 1: this denes the implicit Euler method; the solution depends only on the next cong-uration;

(47)

ˆ φ = 0.5: this denes the classical trapezoidal method; the solution is an average between the solution based on the reference conguration and on the next time step;

Obviously, one can not perform implicit or trapezoidal integration without an iterative scheme and a convergence criterion. This aspect will be tackled later on in this chapter.

We can thus rewrite the solutions above as: vi(t + ∆t) = vi(t) + ∆t mi (1 − φ) ftot i (t) + φf tot i (t + ∆t)  (134) ωi(t + ∆t) = ωi(t) + ∆t ji (1 − φ) mtot i (t) + φf tot i (t + ∆t)  (135) θi(t + ∆t) = θi(t) + ∆t mici (1 − φ) Qtot i (t) + φQi(t + ∆t)  (136) And with an analogous process for the velocity and the angular velocity, we can compute the solution for the positions x and for the rotations α∆

i . As a convention, we assume α∆i (t = 0) = 0.

We thus have:

xi(t + ∆t) = xi(t) + ∆t [(1 − φ) vi(t) + φvi(t + ∆t)] (137)

α∆i i(t + ∆t) = ∆t [(1 − φ) ωi(t) + φωi(t + ∆t)] (138)

However, as noted in the chapter devoted to the kinematics of the particle, α∆

i iis not yet the total

rotation of the i-th particle, but just the additional rotation developed in the actual time-step. To compute the value of the nal rotation, the following formula is used:

αi(t + ∆t) = 4 4 − αt(t) · α∆i (t + ∆t)  αi(t) + α∆i (t + ∆t) − 1 2αi(t) × α ∆ i (t + ∆t)  (139)

Convergence and time-stepping

Let's consider the solution for the position xi.

A change of notation will be here used: the (·)K stands for the K-th iteration; the (·)L stands for

the L-th time interval.

Let's substitute velocities and accelerations with the derivatives in time of the positions and by regrouping common factor, the following equation is obtained:

xL+1,Ki = xLi + ˙xLi∆t +(φ∆t) 2 mi fitot,L+1,K−1+φ(∆t) 2 mi (1 − φ)fitot,L (140) which is of the form:

xL+1,Ki = g(xL+1,K−1i ) + ri (141) Being: ri= xLi + ˙x L i∆t + φ(∆t)2 mi (1 − φ)fitot,L (142) g(xL+1,K−1i ) =(φ∆t) 2 mi fitot,L+1,K−1 (143)

(48)

B.M. Calidonna Numerical Solution of the equations The convergence of the scheme is dependent on the behaviour of g. In fact, ri is a remainder term

that doesn't depend on the solution.

A sucient condition for convergence is that g is a contraction mapping for all xL+1,K i .

This translates to:

k xL+1,Ki − xL+1i k=k g(xL+1,K−1i ) − g(xiL+1) ≤ ηL+1,Kk xL+1,Ki − xL+1i k (144) This means that if 0 ≤ ηL+1,K < 1, g is a contraction mapping and for each iteration K the error,

$ =k xL+1,Ki − xL+1

i k, tends to 0 for any arbitrary starting value x L+1,0 i .

This is a sucient but not necessary condition for convergence. It is easy to note that:

η ∝ (φ∆t)

2

m (145)

From which we can observe that the contraction constant:

ˆ is non-existent for explicit euler method (φ = 0), which is expected since in that method no iterations are performed;

ˆ is proportional to the magnitude of external forces; ˆ is proportional to ∆t2;

ˆ is inversely proportional to the mass of the particle From this we can extract that:

1. a trapezoidal integration scheme (φ = 0.5)generates a "more convergent" solution than an implicit one (φ = 1) for the same system and the same time-step;

2. decreasing time-steps improve the convergence of the system

Rotations follow the same reasoning of positions, arriving at the same exact conclusion, with the only dierence that now η is proportional to the moments and not the forces.

Another remark has to be made considering the solution for the thermal eld.

In its case, we can follow the same reasoning and arrive to a similar conclusion, however noting that η has a linear, not quadratic, dependence on ∆t.

With these informations, we are sure our solution is consistent and convergent. We can build an algorithm on top of it.

(49)

Code Structure and Algorithm

In this chapter, the structure of the code will be tackled, along with a discussion on the main algorithms, mainly the general one and the one specic for the movement of the particles, that are of major interest.

Let's take a look at all the implemented objects: ˆ Particles;

ˆ Barriers; ˆ Cells;

Objects implemented

Particles

Each particle is dened by:

ˆ An integer which identies the particle;

ˆ An array of doubles which denes the position of the particle relative to a global Cartesian coordinate system;

ˆ An array of doubles which denes the velocity of the particle, referred to the three Cartesian coordinates;

ˆ An array of doubles which denes the acceleration of the particle, referred to the three Cartesian coordinates;

ˆ An array of doubles which denes the angular velocity of the particle, referred to the three Cartesian coordinates;

ˆ An array of doubles which denes the rotation of the particle, referred to the three Cartesian coordinates;

(50)

B.M. Calidonna Code Structure and Algorithm ˆ A oat which identies its charge;

ˆ oat which identies its radius; ˆ Young modulus;

ˆ Poisson modulus; ˆ material density value;

ˆ a oat which identies its temperature; ˆ a double which identies its heat capacity; ˆ a oat which denes the grey-body law constant;

Besides that, each particle has a set of auxiliary variables which help with the iteration and solution of the system.

To be more specic, it has oat arrays for accelerations and forces and oat values for the compu-tation of errors in the evaluation of new positions and speeds.

Furthermore, every particle has a vector of pointers to the neighbouring particles and to the neigh-bouring barriers, as part of the linked cells and verlet listing optimization.

Along these vectors, is a vector of integers that denes the cell in which the center of the particle is subscribed.

Barriers

The input for each barrier triangular element is composed solely by an integer which identies the element and the spatial coordinates (in the three main Cartesian coordinates) of three points. After that, each barrier element is computed and dened by:

ˆ A oat array dening its center;

ˆ Three oat arrays dening its normal and two perpendicular directions on the surface of the element, computed as versors;

ˆ Double arrays each identifying the forces acting on the element, its acting pressure and acting moments;

(51)

ˆ Three oats dening the norm of such vectors;

ˆ A vector of integers identifying the cell in which the center of the particle is subscribed. The code works in a way that the barrier is initialized just at the beginning of the simulation, retaining its datas until the end of it.

As mentioned before, computing the eects of the impact on the barrier as the one between a sphere and a half-space, in Hertzian conditions.

This means that it is fundamental to take account of the number of interacting barriers with a single particle.

A counter is set and updated every time the contact with a barrier is conrmed.

This integer will basically divide the eects of the force applied by and on each element.

This naturally implies that there's no actual dierence if the particle hits the center or the border of a single Barrier element.

This is perfectly consistent with the fact that we are treating the element as a rigid half-space, dened basically by its normal.

For small enough elements, this hypothesis is completely sound.

Cells

The entire space of the simulation is discretized in cubic cells.

The most important remark that has to be made is that it is not possible to go outside the set boundaries in the discretization: if an element, e.g. a particle, goes outside the limits, the code will crash.

This happens because for the optimization it is necessary to subscribe the particles to a spatial location, so to address the closest particles in order to avoid a brute force iteration over all the particles in the system.

Each cell is composed by a two types of nodes: ˆ Particle nodes;

ˆ Barrier nodes;

These nodes are linked nodes in the informatic sense: they are a structure of pointers, with one pointer pointing to a Particle or a Barrier and another one pointing to the next in the list. The cells hold the head of the chain: it will be necessary to follow the chain link by link to actually build the neighbouring lists.

(52)

B.M. Calidonna Code Structure and Algorithm of x, y and z directions along with the characteristic length, assumed equal for all the three direc-tions, so to have a cube.

Another important remark is about the number of cells: the more cells, the shorter the lists, the faster the lists will need to be updated; it is a computational trade o. Also, it exists a maxi-mum number of cells that is possible to initialize that is function of the machine on which the code is running.

On my machine (i5-5200U CPU@2.20GHz,8 GB RAM) this limit is a 23x23x23 discretization.

Algorithms

In this section the algorithm will be presented by giving the outline of the general algorithm and subsequently diving into its parts in more detail.

The general outline is the following: 1. Input and initialization;

2. Reset auxiliary variables: pre-iteration; 3. Move particles;

4. Update temperatures;

5. Compute errors and check convergence; 6. Convergence? NO-> go to (2)

7. Convergence? YES -> update variables, write output; 8. Update lists;

9. Update timestep size; 10. Go to next timestep;

Steps (1),(3) and (5) will be described in more detail.

Step (8) and (9) will be described later on in this part, in the chapter reserved to the Optimization Tools.

As it will be then explained, the necessity of the update is computed through some criteria that will be described.

(53)

diering just for the system of equations to be integrated.

As for Step (2), is a step done to ensure that variables are set to the reference conguration at the rst iteration and that "clean variables" are entering the system for every subsequent iteration.

Input and initialization

The code takes in input two csv les, describing particles and barriers, and requires some param-eters to be set to tailor the simulation to the needs of the user.

Furthermore, the space in which the simulation is going to be carried on has to be dened along with its discretization.

The algorithm of this phase looks like this: 1. Initialize variables

2. Read and copy data from barriers' input 3. read and copy data from particles' input 4. Initialize time related and auxiliary variables 5. Input space and discretization data

6. Initialize space 7. Initialize lists

(a) add particles to cells (b) add barriers to cells (c) Create linked lists (d) create Verlet lists

Step (4) requires manual interaction from the operator.

The total time of the simulation is here set, along with the time intervals for the output.

In fact, in order to save space and to avoid an enormous quantity of redundant data, the user can decide how often the output has to be written.

There are four main output models: ˆ Paraview output for particles; ˆ Paraview output for barriers;

(54)

B.M. Calidonna Code Structure and Algorithm ˆ Csv log le for particles;

ˆ Csv log le for barriers;

The Paraview output les are created in order to have a graphic representation of the data. For particles, generally, output is generated every 0.015s, while for barriers this interval must be way shorter, since the collision is modelled as an innite half-space, consequently with innite rigidity, meaning that the collision duration is short: a timestep as large as the particles' one could lead to miss the interaction.

Csv les are better for data analysis, since data can be easily read and collected in an automated way. Besides, csv les are way smaller than .vtk or .vtu ones (Paraview extensions), thus allowing the user to collect more detailed data for the same memory occupation.

Also, it must be noted that csv are easily read by third part programs, such as MatLab, which allow for a quicker and easier post-analysis.

As mentioned before, there is a certain number of input parameters that the user must set before every simulation.

These parameters dene the fundamental characteristics of the simulation. There are 10 classes of parameters:

1. Temperature; 2. Time integration; 3. Electric eld; 4. Magnetic eld; 5. Gravity;

6. tangential contact coecients; 7. tolerances and convergence; 8. Near-eld values;

9. Contact dissipation; 10. Analysis type;

Temperature, electromagnetic elds and near-eld interactions are not considered in this elaborate, so for the sake of simplicity we will not detail them.

(55)

 φ: it denes the type of time-integration scheme, being it explicit(0), implicit(1) or mid-point(0.5);

 ∆Tmax denes the biggest possible time-step;

 ∆Tmin denes the smallest possible time-step;

 ∆Tindenes initial time-step: a few experiments on computational speed and eciency

showed that the most ecient way is to start with ∆Tin= ∆Tmax;

ˆ Tangential contact coecients:

 µS: inter-particle static friction coecient;

 µD: inter-particle dynamic friction coecient;

 µS,barr: barrier-particle static friction coecient;

 µD,barr: barrier-particle dynamic friction coecient;

ˆ Tolerances and convergence:

 T OLr: tolerance on position values;

 T OLv: tolerance on velocity values;

 T OLT: tolerance on temperature values;

 T OLω: tolerance on angular velocity values;

 T OLα: tolerance on rotation values;

 KD: number of desired iterations for convergence (usually 10);

 pconv: coecient dependent on the residual of the solving equation (2 for our equations);

ˆ Contact dissipation:

 ξpp: inter-particle contact damping;

 ξpb: barrier-particle contact damping;

 ξpp,rot: inter-particle rotational damping;

 ξpb,rot: barrier-particle rotational damping;

Analysis type contains two boolean coecients that tells the code if we want to activate alongside the normal interaction between particles, the rotational and the thermal one.

As for the gravity class, contains the value of the gravitational acceleration. It is possible to set also its direction.

(56)

B.M. Calidonna Code Structure and Algorithm

Move Particles

This is the core of the code, since it denes the motion of the element of the system. Its broad structure is a four-step process;

1. Compute forces; 2. Compute accelerations;

3. Integrate in time for positions and velocities; 4. Compute local errors;

We will refer to this algorithm as Moving particle broad algorithm.

Step (2) and (3) derive directly from the governing equations, so no further comments will be added.

For step (1), let's dive a bit deeper.

The outline of the algorithm for this section goes as: 1. Electromagnetic elds interaction;

2. Inter-particle interaction: (a) Near-eld interaction;

(b) Contact detection: if YES continue, if NO end (c) Normal contact interaction;

(d) Tangential and rotational contact interaction; 3. Particle-barrier interaction:

(a) Contact detection: if YES continue, if NO end (b) Normal contact interaction;

(c) Tangential and rotational contact interaction;

The implementation of each of the steps follows the equations and modelling already presented in the previous part.

Let's see how step (4) of Moving particle broad algorithm, connects with the broader algorithm for convergence, that includes all the particles of the system.

Figura

Figure 3: Normal elastic contact between three particles: input conguration
Figure 8: First and Last Particle Speed in Time. Case E2.
Figure 10: First and Last Particle Speed in Time. Case E4.
Figure 12: Last Particle Speed in Time. All cases compared.
+7

Riferimenti

Documenti correlati

The form f lu-da-qé-e of CTMMA 148A would represent the inaccuracy of an unexperienced scribe (or of a scribe who was not much familiar with the Greek language); 14) while the

A similar conclusion regards the vortex core radius, which values at different streamwise locations, for the data affected from wandering, are determined by the 3HFP

This is illustrated with a number of selected experiments in nuclear β-decay ad- dressing the unitarity of the Cabibbo-Kobayashi-Maskawa matrix, the search for right-handed

If there is a single extraction, upon which will depend yuor gain for both questions, than the answer “red”, “red” (as “blue”, “blue”) has a simple justification in terms

The development of a heater is a significant technological challenge tied with the need of reaching high ignition temperatures (1500-2000 K) minimizing the power

In that case, we could say that the external control, and in particular the accounting control entrusted to the external auditor, should not be mandatory, but it should be quite

Powder XRD patterns of the samples (Figure S1); N 2 adsorption/desoprtion isotherms at 77 K of the samples (Figure S2); SEM images of the samples (Figure S3); comparison of

Microbiological examination of water samples collected from 16 stations of 7 rivers in four seasons of the year before and after urban discharges indicates that river waters