1 Introduction

In order to predict the dynamical behaviour of dense granular media on the industrial scale, a formulation in terms of continuum fields is indispensible. Therefore, a particle based derivation of constitutive relations between the continuum fields, linking for instance applied deformations to stresses constitutes one of the main open research tasks. The emphasis here is on ’particle based derivation’, because granular systems often lack a clear scale separation, as phenomena like shear banding or size segregation show. Recently, much research effort is being spent on the development of hybrid particle - continuum simulation methods [8, 20, 29], which allow to combine a large scale continuum calculation with dynamics on the particle level, where needed. Constitutive laws derived from particle and contact properties are needed at the fringe between regions simulated at the particle or continuum level, respectively.

In this paper the transition from discrete quantities (particle mass, particle position, particle momentum, contact force, ...) to the corresponding fields (mass density, momentum density, stress, ...) is addressed. The discrete quantities are provided by experiments (e.g. [4, 6, 7, 24]) or discrete element (DEM) simulations (e.g. [5, 18]). They are transformed into continuum fields by coarse graining [13, 7, 9, 12, 14, 16, 21, 26].

Though in most “real world” observations, boundaries play an eminent role, their effects are often suppressed or considered to be negligible in theories. Walls are the most prominent and important boundaries, for their applications in simulations and experiments are by far dominating. By the term wall we mean any flat surface dividing the system into an exterior (beyond the wall) and an interior.

With the exception of the hybrid simulations mentioned above, properties of the exterior are usually left unspecified. This is justified, when the wall confines the system to a finite region of interest. However, this can lead to problems, since coarse graining essentially smears out spatial information. Since the effect of walls within the framework of coarse graining is scarcely considered in the literature (notable exceptions are [2830]), we dedicate this work to an overview and comparison of different approaches. To be more precise, we consider i) position dependent convolution kernels, ii) virtual image systems in the exterior, and iii) stress propagating, continous half-spaces as boundaries.

The paper is organized as follows: In Sect. 2 we give a brief coarse graining background necessary for the understanding of this paper and point out problems induced by taking walls into account. Section 3 provides four general schemes how the problems at the wall could be overcome. Section 4 shows an application of the schemes to a simple lattice system. In Sect. 5 we evaluate the different schemes according to a set of criteria laid down in Sect. 3. Eventually, concluding remarks are made in Sect. 6. Additional remarks and calculations can be found in the Appendix.

2 Coarse graining

The objective of coarse graining is to connect microscopic quantities of particles with macroscopic continuum fields, which are defined in the whole system and not only at the positions of the particles or their contacts. The resolution of coarse graining defines an additional length scale \(w\). Typically this coarse graining scale \(w\) is taken to be large compared to the microscopic scale (here: particle diameter) and small compared to the macroscopic scale (size of or distance between heterogeneities). But unlike in fluid dynamics, there is a lack of scale separation in granular materials, so the resolution must be chosen carefully [10, 11].

A recent publication by Goldhirsch [12] provides a comprehensive description of the coarse graining formalism. This paper follows these considerations and ideas. We will only sketch, what is essential for the understanding of this paper. For a deeper insight, we refer the reader to Goldhirsch [12]. In the following, Latin indices like \(i\) and \(j\) are used for different particles. Greek indices indicate the spatial coordinates, and summation convention is implied. The mass, center of mass position and velocity of the \(i\)th particle are given by \(m_i\), \(\mathbf r_i\) and \(\mathbf v_i\) respectively. The contact between the particles \(i\) and \(j\) is characterized by the contact point \(\mathbf r_{ij}^\mathrm {c}\) and the vector connecting the center of mass positions \(\mathbf r_{ij}=\mathbf r_{i}-\mathbf r_j\). The force acting on particle \(i\) due to a contact with particle \(j\) is given by \(\mathbf f_{ij}\).

2.1 Sketch of the formalism

The microscopic particle quantities like mass \(m_i\) and momentum \(m_i \varvec{v}_i\) are assigned to the center of mass of particle \(i\) by defining the mass density as

$$\begin{aligned} \rho ^{\text {mic}}(\varvec{r}, t) \equiv \sum \limits _{i} m_i \delta (\varvec{r} - \varvec{r}_i(t)), \end{aligned}$$
(1)

the momentum density as

$$\begin{aligned} \varvec{p}^{\text {mic}}(\varvec{r}, t) \equiv \sum \limits _{i} m_i \varvec{v}_i(t) \delta (\varvec{r} - \varvec{r}_i(t)) \end{aligned}$$
(2)

and the microscopic contact stress tensor as

$$\begin{aligned} \sigma _{\alpha \beta }^{c,\text {mic}}(\varvec{r}, t) \equiv - \dfrac{1}{2} \sum \limits _{ij} f_{i j \alpha } r_{i j \beta } \int \limits ^1_0 \delta (\varvec{r} - \varvec{r}_i(t) + s \varvec{r}_{ij}) \text {d}s.\nonumber \\ \end{aligned}$$
(3)

In the following, we will refer to the terms in the sum (3) as stress strings because the integral is non-zero only along a straight line between \(\varvec{r}_i\) and \(\varvec{r}_j\). This curve is the simplest choice and, moreover, respects the symmetry in the case of spherical or point particles [25]. For non-spherical particles, a path of two line segments passing through the point of contact can be advantageous (cf. Appendix 1), but these will not be considered in this section.

Not all quantities related to contacts are “string like” as the stress. E.g. the fabric tensor [17, 22] would be evaluated for each particle, hence gives rise to a density similar to (1) and (2). All such quantities will in the following be denoted as “point quantitities”

Each microscopic field \(A^\text {mic}(\varvec{r})\) like (1)–(3) is transformed into its coarse grained counterpart \(A(\varvec{r})\) by a convolution with the coarse graining function \(\phi \),

$$\begin{aligned} A(\varvec{r}, t)=\int \phi (\varvec{r}-\varvec{r}') \; A^\text {mic}(\varvec{r}', t) \; \text {d}\varvec{r}, \end{aligned}$$
(4)

where \(\phi (\varvec{r})\) is positive semi definite, normalized, differentiable and concentrated around \(\varvec{r}=0\) with a width \(w\) (the coarse graining scale). As a result, the \(\delta \)-function in (1)–(3) is replaced by \(\phi \). It can be shown [12] that the continuum equations of motion are automatically fullfilled, e.g. the equation of continuity

$$\begin{aligned} \dfrac{\partial \rho (\varvec{r},t)}{\partial t} = -\dfrac{\partial p_{\beta }(\varvec{r},t) }{\partial r_{\beta }}\, \end{aligned}$$
(5)

and the equation of momentum conservation

$$\begin{aligned}&\dfrac{\partial p_{\alpha }(\varvec{r},t)}{\partial t} = -\dfrac{\partial }{\partial r_{\beta }} \left( \frac{p_{\alpha }(\varvec{r},t) p_{\beta }(\varvec{r},t)}{\rho (\varvec{r},t)}\!-\!\sigma ^\text {kin}_{\alpha \beta }(\varvec{r},t) \!-\!\sigma ^\text {c}_{\alpha \beta }(\varvec{r},t)\right) +\epsilon _\alpha \nonumber \\ \end{aligned}$$
(6)

where the kinetic part of the stress tensor \(\sigma ^\text {kin}_{\alpha \beta }\) contains the velocity fluctuations

$$\begin{aligned} \sigma _{\alpha \beta }^\text {kin}(\mathbf r, t)&= - \sum \limits _{i} \left( v_{i\alpha }(t)-\frac{p_\alpha (\mathbf r, t)}{\rho (\varvec{r},t)} \right) \nonumber \\&\times \left( v_{i \beta }(t)-\frac{p_\beta (\mathbf r, t)}{\rho (\varvec{r},t)} \right) m_i \phi (\mathbf {r} - \mathbf {r}_i) \end{aligned}$$
(7)

and \(\varvec{\epsilon }\) is the density of a body force like gravity. In granular materials composed of frictional or non-spherical particles, torques can be transmitted directly. This is usually accounted for by an additional tensor field, the couple stress [23]. In the quasi static limit (where also \(\sigma _{\alpha \beta }^\text {kin}(\mathbf r, t)\) is neglected) without rolling friction it takes on the form [12]

$$\begin{aligned} C_{\alpha \beta }(\varvec{r}, t)&\equiv - \dfrac{1}{2} \sum \limits _{ij} \left( \left( \varvec{r}_{ij}^c-\varvec{r}\right) \times f_{i j} \right) _\alpha r_{i j \beta }\nonumber \\&\times \int \limits ^1_0 \phi (\varvec{r} - \varvec{r}_i(t) + s \varvec{r}_{ij}) \text {d}s. \end{aligned}$$
(8)

\(C_{\alpha \beta }(\varvec{r}, t)\) appears in the equilibrium condition for frictional materials (in the absence of body torques), which is given by

$$\begin{aligned} \epsilon _{\alpha \beta \gamma }\sigma _{\beta \gamma }=\partial _\beta C_{\alpha \beta }, \end{aligned}$$
(9)

and is the generalization of the classical condition of a symmetric stress tensor (\(\epsilon _{\alpha \beta \gamma }\) is the Levi-Civita symbol). Note: the couple stress is an exception to the rule that coarse grained fields are obtained by convoluting the corresponding microscopic fields with \(\phi \). The reason is the explicit appearance of \(\varvec{r}\) in the cross product.

The equations are valid irrespectively of a specific choice for \(\phi \), as long as the conditions mentioned after (4) are fullfilled. In this paper we use Gaussian coarse graining with

$$\begin{aligned} \phi _\text {Gauss}(\varvec{r}) = \frac{1}{w^d \pi ^{d/2}} \exp (-\varvec{r}^2/w^2). \end{aligned}$$
(10)

Numerically, this function will be cut off, when \(\phi _\text {Gauss} <10^{-16}\), which in two dimensions is the case for \(|\varvec{r}|>6w\). In general, every coarse graining function will have such a length scale \(\sim w\), beyond which its value essentially vanishes (exactly only for functions with compact support). The integral essential for the computation of the coarse grained stress \(\sigma _{\alpha \beta }(\varvec{r})\) takes on the form

$$\begin{aligned}&\int \limits ^1_0 \phi _\text {Gauss} (\varvec{r} - \varvec{r}_i + s \varvec{r}_{ij}) \text {d}s =\nonumber \\&\quad \frac{1}{2 | \varvec{r}_{ij}| (w \sqrt{\pi })^{d-1}}\exp \left[ -(|\varvec{r}-\varvec{r}_i|^2 - |(\varvec{r}-\varvec{r}_i)\cdot {\varvec{n}}_{ij}|^2)/w^2 \right] \nonumber \\&\qquad \times \left\{ {{\mathrm{erf}}}\left[ (|\varvec{r}_{ij}|+(\varvec{r}-\varvec{r}_i)\cdot {\varvec{n}}_{ij})/w\right] -{{\mathrm{erf}}}\left[ ((\varvec{r}-\varvec{r}_i)\cdot {\varvec{n}}_{ij})/w\right] \right\} ,\nonumber \\ \end{aligned}$$
(11)

where \(\varvec{n}_{ij}=\varvec{r}_{ij}/|\varvec{r}_{ij}|\). Graphically, this just expresses a ridge instead of a string from \(\varvec{r}_i\) to \(\varvec{r}_j\).

2.2 Problems induced by Walls

Boundaries, especially walls, play often a major role in practical applications: The walls of silos are not only essential in the static case of holding the grains inside the silo but also influence the discharge flow. The most common way of transporting granular material is to pour it down an inclined plane/wall.

But typically, the whole coarse graining scheme is formulated for the bulk without taking any boundaries into account. Several problems arise if coarse graining is carried out ignoring the presence of a macroscopic object whose dimensions are comparable to the coarse graining width or even bigger, such as a wall.

They will be explained in the following where we assume the wall to be at \(z = 0\) and the bulk at \(z>0\).

2.2.1 Drop of the Quantities

In the bulk far away from the walls (Fig. 1 left) the contributions of the regions beyond the walls are negligibly small, provided that \(w\) is small compared to the system size. The nearer to the wall the evaluation position \(\varvec{r}\) (center of the grey shaded area) is, the bigger the contributions coming from beyond the wall (Fig. 1 right), from the “vacuum”. The contributions to all coarse grained quantities are \(0\), as \(A^\text {mic}=0\) beyond the wall. So near the wall most fields will decrease. The strength and the range of the decline due to the “vacuum” depend on the shape and width of the coarse graining function.

Fig. 1
figure 1

Coarse graining in the bulk (left): The grey shaded area indicates the region, where the contribution of particles (circles) or contacts (arrows) to the coarse grained field value at the center is not neglegible. Coarse graining at the wall (right): The contributing region reaches out beyond the wall. Since there are no particles, the contibutions to all quantities by that part are zero (hatched area).

Nevertheless, the identity

$$\begin{aligned} \int A(\varvec{r})d^3\varvec{r} = \int A^\mathrm {mic}(\varvec{r})d^3\varvec{r} \end{aligned}$$
(12)

holds true when the integration is carried out over the whole space.

Note: When taking the ratio of two coarse grained densities, their drop can cancel out, the most prominent example being the velocity field, (6) in Goldhirsch [12]. For them, no correction scheme is necessary.

2.2.2 Wall contact

The stress, being a contact property rather than a particle property, depends on the vector \(\varvec{r}_{ij}\) connecting the centers of mass of the involved particles. The contact with the wall represents a special case, as for the wall a center of mass is a priori not defined. Intuitively one chooses \(\varvec{r}_{ij}\) to be perpendicular to the wall plane and to connect the center of mass of the particle with the nearest point on the wall (\(\varvec{r}_\text {wall}\)). (This holds true in the case of spherical particles, otherwise cf. Appendix 1).

2.2.3 Commutation

An important property of the coarse graining procedure according to (4) is that it commutes with differential operators. That means, for every derivative of such a coarse grained field, one gets the coarse grained version of the derivative of the microscopic field. In the presence of walls this property gets modified. The “vacuum” beyond the wall can be described by performing the coarse graining integration only up to the wall or by extending the microscopic field to the whole \(z\)-range, being zero for \(z<0\); both views are equivalent, of course.

By \(A^{\text {mic},z}\) we denote the microscopic field, for which the coarse graining over the \(x\)- and \(y\)-direction was already carried out. In the remaining partial integration

$$\begin{aligned} \partial _z A(z)&= \partial _z\int \limits _0^\infty \phi (z-z')\,A^{\text {mic},z}(z')\,dz'\nonumber \\&= A^{\text {mic},z}(z{=}0)\phi (z)+\int \limits _0^\infty \phi (z-z')\,\partial _{z'}A^{\text {mic},z}(z')\,dz'\nonumber \\ \end{aligned}$$
(13)

a surface term appears, which is of course nothing else but the coarse grained derivative of the step function. It is absent only for \(A^{\text {mic},z}(z{=}0)=0\), and negligible for large distance \(z\) from the wall.

The property of commutation will become important for equilibrium considerations (cf. Sect. 2.3). We note already here that it does not apply to the couple stress (8) due to its additional \(\varvec{r}\)-dependence.

2.3 Possible criteria for correction schemes

In Sect. 3 we will present several schemes to handle the problems mentioned above. These approaches will transform the coarse grained field \(A(\varvec{r})\) into a corrected version denoted by \(\tilde{A}(\varvec{r})\). In the following we discuss possible criteria one should keep in mind when reviewing the different approaches.

2.3.1 Invariant Fields

Without walls, a simple linear microscopic field \(A^\text {mic}=c+mz\) is invariant with respect to coarse graining. It is desirable to preserve this property in the presence of boundaries, as well. But in general, this will not be possible since no correction scheme can divine that the linear function should continue beyond the wall. Hence, it would be too strict to demand this behaviour from the considered schemes. Instead, a relative deviation in the proximity of the wall of the order \(|m/c|w\) has to be accepted.

2.3.2 Continuum Equations of Motion and Equilibrium

The coarse grained formalism fulfills the local conservation laws (e.g. (5) and (6)) in the bulk. When dealing with a system in equilibrium without body forces, the coarse grained stress and couple stress fields must obey the conditions [23]

$$\begin{aligned}&\partial _{\beta } \sigma _{\alpha \beta } = 0\end{aligned}$$
(14)
$$\begin{aligned}&\partial _{\beta } C_{\alpha \beta } - \epsilon _{\alpha \gamma \beta } \sigma _{\gamma \beta } = 0, \end{aligned}$$
(15)

which represent a special case of the local conservation laws. These are true for the microscopic (couple) stress (3) up to, but not including the wall. Instead, the wall acts as an external source or sink of (angular) momentum flux. Coarse graining that, we would get a “source/sink zone” of width \(w\) which compensates the non-zero divergence of the coarse grained stress, cf. also Sect. 3.3.2.

The aim of the approaches described below (with the exception of renormalization, 3.1, and excess, 3.4) is to avoid dealing with these sources and sinks, though. Instead, the “vacuum” is replaced by (virtual) matter to which a (couple) stress tensor can be assigned. Thus, we will have to check whether an approach is in accordance with the conservation laws (equilibrium conditions).

2.3.3 Figure of Loss

As can be seen from the discussion in Sect. 2.2.1 and from (12), a part of the microscopic fields is transferred to the exterior of the system and thus can be considered as “missing”. This expresses the non-validity of (12) in the case of integrating only over the system.

A wall correction might be wanted to revert this loss. A quantity which measures to which extent this is accomplished is

$$\begin{aligned} \mathcal L = \frac{\int _{-\infty }^\infty A(z) dz - \int _{0}^\infty \tilde{A}(z)\, dz}{\int _{-\infty }^0 A(z) dz}, \end{aligned}$$
(16)

which normalizes this correction (numerator) to the loss without any correction (denominator). No correction (\(\tilde{A}(z)=A(z)\)) at all yields \(\mathcal L = 1\). \(\mathcal L =0\) marks perfect compensation, while a positive value indicates a net loss and a negative one an overcompensation.

2.3.4 Complex Wall Geometry

For the most part we will consider only the most trivial wall scenario, namely a single infinite planar wall. In most practical situations, though, the system will be confined by more than one wall (i.e. a polygon/polyhedron) or curved walls (like cylinders). The question that arises is, how far the approaches are extensible to more complex geometries.

2.3.5 Computational Effort

To measure the applicability of the approaches, it is crucial to estimate the extra effort which goes with their implementation.

3 Wall treatment

In the following we discuss a few simple and general strategies, how to handle the problems described in 2.2.

3.1 The renormalisation approach

The main concept of this approach is to disregard the physics outside the system boundaries completely and, instead, to modify the coarse graining function according to its distance to the wall.

The coarse graining function \(\phi \) should be normalized to unity by integration over the whole space. If this happens not to be the case, it can immediately be cured:

$$\begin{aligned} \tilde{A}(\varvec{r}) = \frac{\int \phi (\varvec{r}-\varvec{r}') A^\text {mic} (\varvec{r}')\, \text {d}^3\varvec{r}'}{\int \phi (\varvec{r}-\varvec{r}') \, \text {d}^3\varvec{r}'} \end{aligned}$$
(17)

Adopting this to a finite integration volume \(\varOmega \), the denominator becomes position dependent. For example, at a planar boundary the function

$$\begin{aligned} n(\varvec{r})=\left[ \int \limits _\Omega \phi (\varvec{r}-\varvec{r}') \, \text {d}^3\varvec{r}'\right] ^{-1} \end{aligned}$$
(18)

takes on twice its bulk value.

3.2 The virtual system approach

3.2.1 The mirrored system

The main idea of this approach is to conserve the properties of the compound near the wall by replacing the vacuum beyond the wall with something similiar to the bulk. An intuitive approach to such a virtual system is the mirrored system. The construction of the mirrored system can be performed by mirroring the positions \(\varvec{r}_i\) of the particles and contacts at the wall, flipping vectorial properties \(\varvec{v}_{i}\) (e.g. velocity) and pseudovectorial properties \(\varvec{\omega }_i\) (e.g. angular velocity) with respect to the wall and assigning those and the scalar properties \(s_i\) (e.g. mass) to the appropriate positions (Fig. 2):

$$\begin{aligned}&\varvec{r}_{i'} = 2\cdot \varvec{r}_{\text {wall}}-\varvec{r}_i\,\end{aligned}$$
(19)
$$\begin{aligned}&\varvec{v}_{i'} = \varvec{v}_i-2\cdot \varvec{n}_\text {{wall}}(\varvec{n}_\text {{wall}}\cdot \varvec{v}_i)\,\\&\varvec{\omega }_{i'} = -[\varvec{\omega }_i - 2\cdot \varvec{n}_\text {{wall}}(\varvec{n}_\text {{wall}}\cdot \varvec{\omega }_i)]\,\nonumber \\&s_{i'} = s_{i} \nonumber \,. \end{aligned}$$
(20)

\(\varvec{n_{\text {wall}}}\) is the normal vector of the wall, \(i'\) denotes the index of the virtual particle corresponding to particle \(i\). The virtual compound can now be utilized for the purposes of coarse graining. This includes also the contacts and the corresponding forces of the virtual particles with the wall. The virtual particles and virtual contacts will be taken into account as if they were part of the system. As mirroring and coarse graining commute, the modified values can also be rewritten as (see Appendix 2):

$$\begin{aligned}&\tilde{A}(\varvec{r}) = A(\varvec{r}) + A^\mathrm {mirr}(\varvec{r}) = A(\varvec{r}) \pm A(\varvec{r}-2\cdot \varvec{n}_\text {{wall}}(\varvec{n}_\text {{wall}}\cdot \varvec{r})).\nonumber \\ \end{aligned}$$
(21)

The minus sign comes into play for the components of (pseudo-)vectorial quantities that are reflected, e.g. the principal axes of the stress tensor beyond the wall are flipped.

Fig. 2
figure 2

The particles and contacts with their mirrored counterparts on the other side of the wall

3.2.2 The Continuation of the System

As we will see later in Section 4, the minus-sign of Eq. (21) can lead to undesired sign changes of the field. This can be avoided by using the plus-sign for all quantities. In this approach, which we call ’continuation’, we simply define

$$\begin{aligned} \tilde{A}(\varvec{r}) = A(\varvec{r}) + A^\text {cont}(\varvec{r}) = A(\varvec{r})+A(\varvec{r}-2\cdot \varvec{n}_\text {{wall}}(\varvec{n}_\text {{wall}}\cdot \varvec{r}))\, \end{aligned}$$

without referring to the underlying micro structure of the virtual compound.

With respect to their interpretation, mirroring and continuation are very different: In the first approach it is still a wall which excerts forces on both systems and they react identically (just reflected with respect to the wall). The latter, on the other hand, removes the wall from the picture and replaces its effect as being caused by the virtual system.

3.3 Wall as a Big Particle

In this approach a wall is represented by the surface of a very big particle (much bigger than the other particles and the coarse graining width \(w\)), for which all extensive point quantities like mass or momentum are replaced by the corresponding microscopic densities, \(A_\mathrm{wall}^\mathrm{mic}\), being constant over the whole extent of the body. In the case of a semi infinite body, the coarse grained wall contribution to the point fields reads

$$\begin{aligned} A_\text {wall} (\varvec{r})&:= \int \phi (\varvec{r}-\varvec{r}') \; A^\text {mic}_\text {wall}\; \Theta (( \varvec{r}' -\varvec{r}_\text {{wall}} )\cdot \varvec{n}_\text {wall}) \; \text {d}\varvec{r} \nonumber \\&= \frac{A^\text {mic}_\text {wall}}{2} \left( 1+{{\mathrm{erf}}}\left( \frac{( \varvec{r} -\varvec{r}_\text {{wall}})\cdot \varvec{n}_\text {{wall}}}{w}\right) \right) . \end{aligned}$$
(22)

As a side remark we mention that it is not imperative to describe the small particles differently than wall particles. The coarse graining method could as well be applied, if one attributes microscopic mass and momentum densities to the volumes of the small particles, instead of mass and momentum to their centers. The difference becomes negligible, if \(w\) is large compared to the particle size (cf. [27, 28]).

Wall contributions to stress and couple stress are more subtle than the point quantities discussed so far. While e.g. the microscopic mass density of the wall particle may be assumed to be homogenous, because it is independent of the neighborhood, the heterogeneity scale of the stress is determined by the adjacent small particles. A homogenous stress field within the wall particle would only result from an additional averaging over its volume. To avoid this complication one must consider the microscopic wall stress contribution of each wall contact individually. Two possibilities to model this are given in the following.

3.3.1 Linearly elastic walls

Considering a wall as an incompressible, isotropic elastic medium, filling the half-space \(z\le 0\), the force \(\varvec{f}\) applied at the origin provides the following contributions to the stress field within the wall [15, 19]:

$$\begin{aligned} \sigma ^\text {w,mic}_{\alpha \beta }(\varvec{r},\varvec{f})&= -\frac{2\varvec{f}\cdot \varvec{r}}{\pi }\frac{r_{\alpha }r_{\beta }}{r^4} \quad \text {in 2D}\end{aligned}$$
(23)
$$\begin{aligned} \sigma ^\text {w,mic}_{\alpha \beta }(\varvec{r},\varvec{f})&= -\frac{3\varvec{f}\cdot \varvec{r}}{2\pi }\frac{r_{\alpha }r_{\beta }}{r^5} \quad \text {in 3D} \end{aligned}$$
(24)

Coarse graining them into \(\sigma ^\text {w}_{\alpha \beta }(\varvec{r},\varvec{f})\) removes the singularity at the contact point, but of course does not influence their long range behaviour. Taking the contributions from all wall contacts into account, when coarse graining, gives the corrected stress tensor

$$\begin{aligned} \tilde{\sigma }_{\alpha \beta }(\varvec{r})=\sigma _{\alpha \beta }(\varvec{r})+ \sum _i\sigma ^\text {w}_{\alpha \beta }(\varvec{r}-\varvec{r}_{i\mathrm{w}}^\mathrm{c},\varvec{f}_{i\mathrm{w}}), \end{aligned}$$
(25)

where the index \(i\) runs over all particles in contact with the wall, \(\varvec{r}_{i\mathrm{w}}^\mathrm{c}\) are the locations of the wall contacts, and \(\varvec{f}_{i\mathrm{w}}\) is the force exerted by particle \(i\) on the wall.

3.3.2 Infinitely long stress strings

As a second model, Eq. (3) is generalized by extending the wall branch vectors \(\varvec{r}_{i\mathrm{w}}=\varvec{r}_{i\mathrm{w}}^\mathrm{c}-\varvec{r}_i\) infinitely far into the (infinite) particle representing the wall. Denoting their unit vectors as \(\varvec{n}_{i\mathrm{w}}=\varvec{r}_{i\mathrm{w}}/|\varvec{r}_{i\mathrm{w}}|\), the additional terms for stress and couple stress are of the form

$$\begin{aligned}&-f_{i\mathrm{w}\alpha }\, n_{i\mathrm{w}\beta } \int \limits _0^{\infty }\phi (\varvec{r}-\varvec{r}_i -r'\varvec{n}_{i\mathrm{w}})\mathrm {d}r'\ \text {, respectively}\end{aligned}$$
(26)
$$\begin{aligned}&-\left( \left( \varvec{r}_{i\mathrm{w}}^c-\varvec{r}\right) \times \varvec{f}_{i \mathrm w} \right) _\alpha \, n_{i \mathrm w \beta } \int \limits _0^{\infty }\phi (\varvec{r}-\varvec{r}_i -r'\varvec{n}_{i\mathrm{w}})\mathrm {d}r'. \end{aligned}$$
(27)

For a Gaussian \(\phi \) the integral

$$\begin{aligned}&\int \limits _0^{\infty }\phi (\varvec{r}-\varvec{r}_i -r'\varvec{n}_{i\mathrm{w}})\mathrm {d}r'=\frac{1}{2 (w \sqrt{\pi })^{d-1}}\nonumber \\&\qquad \times \exp \left[ -(|\varvec{r}-\varvec{r}_i|^2 - |(\varvec{r}-\varvec{r}_i)\cdot \varvec{n}_{i \mathrm w}|^2)/w^2 \right] \nonumber \\&\qquad \times \left\{ 1 +{{\mathrm{erf}}}\left[ ((\varvec{r}-\varvec{r}_i) \cdot \varvec{n}_{i \mathrm w})/w\right] \right\} , \end{aligned}$$
(28)

replaces the coarse grained string of finite length (11).

This approach can actually be derived in a less ad-hoc way (cf. [28]). Let us express the effect of the wall as external force and torque density fields \(\varvec{F}^\text {w}\) and \(\varvec{M}^\text {w}\), which keep the system in equilibrium:

$$\begin{aligned}&\partial _{\beta } \sigma _{\alpha \beta }+ F_\alpha ^\text {w} = 0\end{aligned}$$
(29)
$$\begin{aligned}&\partial _{\beta } C_{\alpha \beta } - \epsilon _{\alpha \gamma \beta } \sigma _{\gamma \beta }+ M_\alpha ^\text {w} = 0 \end{aligned}$$
(30)

If we want in turn to express these fields by means of stresses, the latter have to fulfill the divergence equations

$$\begin{aligned} F_\alpha ^\text {w}&= \partial _{\beta } \sigma _{\alpha \beta }^\text {w}, \end{aligned}$$
(31)
$$\begin{aligned} M_\alpha ^\text {w}&= \partial _{\beta } C_{\alpha \beta }^\text {w} - \epsilon _{\alpha \gamma \beta } \sigma _{\gamma \beta }^\text {w}, \end{aligned}$$
(32)

which hold true for the expressions (26) and (27). We note that they are not the only solutions, though.

3.4 Excess quantities

In the previous approaches the exact shape of the fields obtained by coarse graining in general depends on the coarse graining width \(w\), even after applying the corresponding correction. This dependence reflects that the sharp system boundary represented by the wall gets smeared out. As \(w\) is an artificially introduced length scale, the coarse grained field has in general no well defined meaning in the vicinity of the wall. Integrated fields, however, do, which leads to the concept of excess quantities.

It is assumed that the bulk is homogeneous in the sense that the coarse grained fields \(A(z)\) are essentially independent of the coarse graining width \(w\), if it is chosen within an appropriate window between the homogenization scale (a few particle diameters) and the spatial resolution \(L\) needed to describe the large scale physics [11]. This does not mean that the fields have to be constant. Because of the invariance property of coarse graining for linear microscopic fields it means, that the fields vary so slowly that second derivatives may be neglected. The smallest relevant radius of curvature sets the upper limit of the window, from which \(w\) may be chosen.

Near the wall, however, \(A(z)\) will in general depend on \(w\). One may try to extrapolate the homogeneous bulk all the way to the surface by a function \(\tilde{A}(z)\), which agrees with \(A(z)\) for \(z>L\):

$$\begin{aligned} \tilde{A}(z)\equiv \left\{ \begin{array}{ll} 0 &{}\quad \text {for~} z<0\\ A^\text {X}(z) &{}\quad \text {for~}0\le z<L\\ A(z) &{}\quad \text {for~}z\ge L\end{array}\right. \end{aligned}$$
(33)

describes a macroscopic, \(w\)-independent field. Since \(A^\text {X}(z)\) has to match \(A(z)\) independently of \(w\), it must not possess significant variations with a wave length smaller than the largest \(w\) to be used.

In general, integrating the function \(\tilde{A}(z)\) over the whole system will not equate the corresponding \(A^\text {mic}(z)\)-integral, cf. Sect. 2.3. Because we cannot spatially resolve the source of this discrepancy, we attribute the difference to the wall itself as the excess quantity \(X_A\) in the following way:

$$\begin{aligned} \int \limits _{-\infty }^L A(z)\,dz \mathop {=}\limits ^{!} \int \limits _{-\infty }^L \left( \tilde{A}(z)+X_A\delta (z)\right) \,dz, \end{aligned}$$
(34)

where \(\Theta (z)\) is the Heaviside function.

For the special case of \(A^\text {mic}\) being \(z\)-independent, \(A\) becomes a product

$$\begin{aligned} A(\varvec{r})=\overline{A}(x,y)s(z) \end{aligned}$$
(35)

with a sigmoid function

$$\begin{aligned} s(z)=1-s(-z) \quad \text {and}\quad s(z\gg w)=1 \quad , \end{aligned}$$
(36)

and thus, with \(A^\text {X}=\overline{A}(x,y)\), the excess quantity \(X_A=0\).

4 Application

In order to compare the approaches described in Sec.3, we apply them to a semi-infinite rhombic lattice (with angle \(\alpha \), see Fig. 3) of identical frictional discs with radius \(R\) and mass \(m\). The lattice is terminated by a wall at \(z=0\) which excerts the same force \(\varvec{f}_\mathrm{ext}=f_x\varvec{e}_x+f_z\varvec{e}_z\) on each boundary particle and has an infinitely distant counterpart that keeps the whole system at rest. For the sake of analytical simplicity we assume a specific realization of mechanical equilibrium, which is translationally invariant in \(x\)-direction and repeats periodically every second particle layer in \(z\)-direction. Each particle (apart from those at the wall) has four contacts labeled clockwise starting at the upper left by \(1\diagdown \), \(1\diagup \), \(2\diagdown \), and \(2\diagup \). The forces acting on the particle are

$$\begin{aligned} \varvec{f}_{1 \diagdown }&= -\frac{\varvec{e}_x}{2}(f_x - f_z\cot \alpha ) - \frac{\varvec{e}_z}{2}( - f_x(\tan \alpha + \cos ^{-1}\alpha ) + f_z)\nonumber \\ \end{aligned}$$
(37)
$$\begin{aligned} \varvec{f}_{1 \diagup }&= -\frac{\varvec{e}_x}{2}(f_x + f_z\cot \alpha ) - \frac{\varvec{e}_z}{2}(f_x(\tan \alpha + \cos ^{-1}\alpha ) + f_z)\nonumber \\ \end{aligned}$$
(38)
$$\begin{aligned} \varvec{f}_{2 \diagdown }&= \frac{\varvec{e}_x}{2}(f_x - f_z\cot \alpha ) + \frac{\varvec{e}_z}{2}(- f_x(\tan \alpha - \cos ^{-1}\alpha ) + f_z)\nonumber \\ \end{aligned}$$
(39)
$$\begin{aligned} \varvec{f}_{2 \diagup }&= \frac{\varvec{e}_x}{2}(f_x + f_z\cot \alpha ) + \frac{\varvec{e}_z}{2}( f_x(\tan \alpha - \cos ^{-1}\alpha ) + f_z)\nonumber \\ \end{aligned}$$
(40)

The forces on a particle in the next layer are determined by the action-reaction principle:

$$\begin{aligned}&\tilde{\varvec{f}}_{2 \diagup }=- \varvec{f}_{1 \diagup },\ \tilde{\varvec{f}}_{2 \diagdown }=- \varvec{f}_{1 \diagdown },\nonumber \\&\tilde{\varvec{f}}_{1 \diagup }=- \varvec{f}_{2 \diagup },\ \tilde{\varvec{f}}_{1 \diagdown }=- \varvec{f}_{2 \diagdown }.\ \end{aligned}$$
(41)

Note that \(\varvec{f}_{2 \diagup }+\varvec{f}_{2 \diagdown }=\tilde{\varvec{f}}_{2 \diagup }+\tilde{\varvec{f}}_{2 \diagdown }=\varvec{f}_\mathrm{ext}\) is compatible with the forces the wall exerts on the particles in the first layer. One easily verifies the equations of mechanical equilibrium,

$$\begin{aligned} 0&= \varvec{f}_{1 \diagdown } + \varvec{f}_{1 \diagup } + \varvec{f}_{2 \diagdown } + \varvec{f}_{2 \diagup },\end{aligned}$$
(42)
$$\begin{aligned} 0&= \varvec{r}_{1 \diagdown }\times \varvec{f}_{1 \diagdown } + \varvec{r}_{1 \diagup }\times \varvec{f}_{1 \diagup } + \varvec{r}_{2 \diagdown }\times \varvec{f}_{2 \diagdown } + \varvec{r}_{2 \diagup }\times \varvec{f}_{2 \diagup },\nonumber \\ \end{aligned}$$
(43)

where

$$\begin{aligned}&\varvec{r}_{1 \diagup } = -\varvec{r}_{2 \diagup }=R\left( \begin{array}{c} \cos \alpha \\ \sin \alpha \end{array}\right) ,\nonumber \\&\varvec{r}_{1 \diagdown } = -\varvec{r}_{2 \diagdown }=R\left( \begin{array}{c} -\cos \alpha \\ \sin \alpha \end{array}\right) . \end{aligned}$$
(44)

After introducing natural units (\(f_z/(4\cos \alpha )\) for force, \(m/\pi \) for mass, and \(R\) for length), two parameters remain: the lattice angle \(\alpha \) and the force ratio \(q\equiv f_x/f_z\), which must be smaller than the friction coefficient at the wall. The discrete translational symmetry in \(x\)-direction will turn into an essentially continuous one when coarse graining with large enough \(w\) (the value \(w=2.5\) turns out to be sufficient) or averaging laterally (\(x\)-direction) over one lattice constant (\(4\cos \alpha \)).

Fig. 3
figure 3

Semi-infinite lattice of discs, terminated at \(z=0\)

Due to translational invariance in \(x\)-direction, stress equilibrium in the absence of body forces, Eq. (14), implies that \(\sigma _{zz}\) and \(\sigma _{xz}\) must be constant throughout the whole system (bulk, interface, wall). Moreover, rotational equilibrium (15) requires

$$\begin{aligned} \sigma _{xz}=\sigma _{zx}^*=\sigma _{zx} - \partial _z C_{yz} \end{aligned}$$
(45)

in the whole system. It is necessary that the correction schemes used are capable of reproducing these constant values even at the wall.

The asymptotic bulk quantities (in the sense of large \(w\) and large \(z\)) can be calculated readily from geometric considerations, yielding (in natural units) \(\rho ^\infty \equiv \rho (z\rightarrow \infty )=\pi /(8\cos \alpha \sin \alpha )\), \(\sigma _{xx}^\infty =1/\tan ^2\alpha \), \(\sigma _{xz}^\infty =\sigma _{zx}^\infty =q\), and \(\sigma _{zz}^\infty =1\).

Figure 4 shows the numerical results for the coarse grained mass density \(\rho \) and the stress components \(\sigma _{\alpha \beta }\) using the wall corrections discussed in Sect. 3. The characteristical drop mentioned in Sect. 2.2.1 is obvious in the cases a)-e). Almost all correction schemes compensate the drop, but they differ in the details, except for \(\sigma _{zz}\). Constant stress components in c)-f) mean mechanical equilibrium. We will discuss the occuring discrepancies in the next section, but we want to draw attention to the behaviour of the uncorrected \(\sigma _{zx}^*\) in Fig. 4d) already here: We can observe that for the chosen coarse graining width \(\sigma _{xz}\) and \(\sigma _{zx}\) are approximately the same, i.e. the contribution of the couple stress should be small. The microscopic counterpart of the latter has a linear \(z\)-dependency in the vicinity of the wall stemming from the factor \((\varvec{r}^c-\varvec{r})\), but due to the non-commutation (cf. Sect. 2.2.3) the \(z\)-derivative of \(C_{yz}\) is not simply a coarse grained step function: It overshoots.

Fig. 4
figure 4

The coarse grained mass density \(\rho \) and the stress components \(\sigma _{xx}\), \(\sigma _{zz}\), \(\sigma _{xz}\), \(\sigma _{zx}^* = \sigma _{zx}- \partial _z C_{yz}\) close to the wall (unc = uncorrected, i.e. without wall contributions), modified by the different schemes: ren = renormalisation, mirr = mirroring, cont = continuation, ew = elastic wall, istr = infinitely long stress-strings. The computations were done with \(w = 2.5\) and \(q = 1/3\)

Constant stesses \(\sigma _{\alpha \beta }^X(z)=\sigma _{\alpha \beta }^\infty \) and a constant mass density \(\rho ^X(z)=\rho ^\infty \) are also the choice when applying the Excess Approach. The system geometry in the lattice system yields simple analytical expressions for the excess \(X\) in the limit \(w\rightarrow \infty \), i.e. when translational symmetry in \(x\)-direction holds true. They read (in natural units) \(X_{\rho }=-(1-\sin \alpha )\rho ^\infty \), \(X_{\sigma _{xx}}=-\sigma _{xx}^\infty \), \(X_{\sigma _{zx}}=-\sigma _{zx}^\infty \), and \(X_{\sigma _{zz}}=X_{\sigma _{xz}}=0\). In Fig. 5, we compare the values for finite \(w\) to them. For smaller \(w\), we get deviations due to the fact that the coarse grained fields loose their translational symmetry. Since \(\sigma ^\text {mic}\) consists of a mesh of stress strings, while \(\rho ^\text {mic}\) is a lattice of delta-peaks, the latter is more sensitive to this effect. This can be seen in Fig. 5, where deviations in \(X_\rho \) appear already at larger \(w\).

Fig. 5
figure 5

The excess of the mass density, and the excess of the stress components \(\sigma _{xx}\) and \(\sigma _{zx}\). Both are evaluated at \(x=0\)

5 Comparison

Let us first recall the different basic concepts behind the employed approaches. Whereas the Renormalisation Approach and the Excess Approach disregard the space beyond the walls, the four schemes belonging to the Virtual System Approach and to the Big Particle Approach have in common that they assign to it a counterpart for each field. But while the Virtual System Approaches always use information from within the system to do so, the Big Particle Approaches use them only in the case of stress fields (namely in form of the wall contacts). For particle quantities, the latter introduce free parameters expressing properties of the wall. In the following sections we apply the criteria developed in 2.3 with respect to the results gained in Sect. 4.

5.1 Renormalisation

As this approach works only with the quantities of the bulk and disregards the exterior completely, one can compute meaningful quantities only up to the wall.

Before turning to the results of Fig. 4, we provide two more general observations. Let us first study the case of a linear function \(A^\text {mic}(z{>}0)=c+mz\) in the vicinity of the wall and a Gaussian \(\phi \). Then, the normalization with \(n(\varvec{r})\) according to (17) produces a loss (16) of

$$\begin{aligned} \mathcal L=2\frac{1-\ln 4}{\frac{4c}{mw\sqrt{\pi }}+1} \quad . \end{aligned}$$
(46)

This implies that naturally the loss vanishes for \(m=0\) while for \(c/m>0\) one always gets an overcompensation. The \(w\)-independence for \(c=0\) as well as the possibility of a vanishing denominator stem both from the normalisation of \(\mathcal L\), cf. (16).

Another general property of the renormalisation approach is that the boundary term in the commutation relation (13) gets modified:

$$\begin{aligned} \partial _z \tilde{A}(z)&=\partial _z(n(z)A(z))=(\partial _zn(z))A(z)+n(z)(\partial _zA(z))\nonumber \\&=n(z)\phi (z)\left( A^{\mathrm{mic},z}(z=0)-\tilde{A}(z)\right) + n(z)\nonumber \\&\times \int \limits _0^{\infty }\phi (z-z')\partial _{z'}A^{\mathrm{mic},z}(z')dz' \quad . \end{aligned}$$
(47)

If \(A^{\mathrm{mic},z}(z{>}0)=c\) in the vicinity of the wall, the boundary term vanishes so that the commutation between renormalized coarse graining and differentiation holds like in the bulk. This is the reason why \(\sigma _{xz}\) and \(\sigma _{zz}\), coarse grained according to the renormalization approach, are constant in Fig. 4 c and d. Rotational equilibrium (15) is violated, though, cf. Fig. 4d. The reason is the above mentioned overshooting, which is even further enhanced by the multiplication by \(n(\varvec{r})>1\).

As a straight forward approach that works by multiplying by a correction field \(n(\varvec{r})\), no further modifications are needed for applying the Renormalisation scheme to complex wall geometries. The only difficulty remaining in the general case can be the evaluation of the integral in (18), but for perpendicular walls it simply factorizes.

Since \(n(\varvec{r})\) is independent of \(A\), the renormalisation approach is readily performed: All coarse grained fields \(A\) just need to be corrected by the same factor \(n\): \(\tilde{A}(\varvec{r})=n(\varvec{r})A(\varvec{r})\). Hence, with respect to computional effort, this approach is quite cheap, since the same function (possibly even in tabulated form) is used for every quantity.

5.2 Virtual system

The Virtual System Approach, similar to what was employed by Zhu et al. [3032], is convenient because the properties measured with this approach stem only from the system itself and the wall geometry, i.e. no additional fields or objects are introduced.

Concerning the figure of loss \(\mathcal L\), a straight forward calculation for \(\tilde{A}(z)=A(z)\pm A(-z)\) shows, independently of \(A(z)\), \(\mathcal L\) to be zero and \(2\) for plus and minus, respectively.

Complex wall geometries pose a problem for the Virtual System Approach, though, because the simple mapping (19) no longer holds true. For convex wall parts, there may be more than one \(\varvec{r}\) for an image \(\varvec{r}'\) which means overlapping particles for mirroring and overdetermined \(\tilde{A}\)-values for continuation. For concave wall parts, on the other hand, points beyond the wall may be not reached at all and multiple mirror operations have to be considered. For a sketch of a two-dimensional situation, cf. Appendix 3. In three dimensions finally, only a cube corner is free of such complications. Below we will only discuss the basic case of a flat wall further.

Regaring the computational cost, both Virtual System approaches are cheap, involving the evaluation of \(A\) beyond the wall up to at most a few \(w\) (concerning a cutoff cf. also Appendix 4.2).

5.2.1 Mirroring

One can see in Fig. 4 that the mirroring works well for the “\(+\)”-sign quantities (e.g. mass density): \(\sigma _{zz}\) is constant and \(\rho \) and \(\sigma _{xx}\) are lifted compared to the uncorrected values yielding \(\mathcal L=0\). On the other hand, for quantities, for which mirroring involves the minus-sign, the “correction” actually makes things worse: As can be seen in Fig. 4e, the shear stress \(\sigma _{xz}\) is not constant in the mirrored case, violating equilibrium. This stems from reflecting the relative vector at the wall, but not the \(x\)-component of the corresponding force (the “\(-\)”-sign in Eq. (21)). Physically it means that the (infinitely thin) wall applies a stress on both sides, to the original system as well as to its mirror image. Not taking it into account as a source of momentum flux density, equilibrium is already violated in the microscopic field by a sign change of \(\sigma _{xz}\) along the stress string traversing the wall. This problem is also reflected by the inevitable \(\mathcal L=2\).

This was the motivation for the continuation approach, which turns out to have other problems, though.

5.2.2 Continuation

Naturally, no sign change occurs for \(\sigma _{xz}\) in Fig. 4e and thus e.g. the principal axes of the stress tensor are conserved. However, other problems occur instead, that have to be taken care of. With the wall again located at \(z=0\) (and the system at \(z>0\)), the continuation scheme reads

$$\begin{aligned} \tilde{\sigma }_{\alpha \beta }(x,y,z)&= \sigma _{\alpha \beta }(x,y,z)+\sigma ^\text {cont}_{\alpha \beta }(x,y,z)\nonumber \\&= \sigma _{\alpha \beta }(x,y,z)+\sigma _{\alpha \beta }(x,y,-z) \end{aligned}$$
(48)

with \(\tilde{\sigma }_{\alpha \beta }(x,y,z)=\sigma _{\alpha \beta }(x,y,z)\quad \text {for}\quad z \gg w\) and \(\tilde{\sigma }_{\alpha \beta }\) \((x,y,z)=\sigma ^\text {cont}_{\alpha \beta }(x,y,-z)=\sigma _{\alpha \beta }(x,y,-z)\quad \text {for}\quad z \ll -w\). For the derivatives it follows that

$$\begin{aligned} \partial _x\sigma _{\alpha x} \big |_z&=\partial _x\sigma ^\text {cont}_{\alpha x} \big |_{-z}\nonumber \\ \partial _y\sigma _{\alpha y} \big |_z&=\partial _y\sigma ^\text {cont}_{\alpha y} \big |_{-z}\nonumber \\ \partial _z\sigma _{\alpha z} \big |_z&=-\partial _z\sigma ^\text {cont}_{\alpha z} \big |_{-z} \end{aligned}$$
(49)

which leads to an inconsistency: If, in a situation more general than the lattice system in Sect. 4, equilibrium

$$\begin{aligned} \partial _x\sigma _{\alpha x}+\partial _y\sigma _{\alpha y}+\partial _z\sigma _{\alpha z}=0 \end{aligned}$$

is maintained with a non-zero \(\partial _z\sigma _{\alpha z}\), equilibrium will be violated in the virtual system (\(z<0\)), because there

$$\begin{aligned} \partial _x\sigma _{\alpha x}^\text {cont}+\partial _y\sigma _{\alpha y}^\text {cont}-\partial _z\sigma _{\alpha z}^\text {cont}=0 \end{aligned}$$

holds true. The inconsistency is actually present in non-equilibrium as well: Consider for example a positive momentum density \(p_x(x,y,z)\) in the vicinity of the wall, which means \(p_x^\text {cont}(x,y,z)=p_x(x,y,-z)>0\) also beyond the wall. That is incompatible with

$$\begin{aligned} \partial _x\sigma _{xx}+\partial _y\sigma _{xy}+\partial _z\sigma _{xz} \big |_z \ne \partial _x\sigma _{\alpha x}^\text {cont}+\partial _y\sigma _{\alpha y}^\text {cont}+\partial _z\sigma _{\alpha z}^\text {cont} \big |_{-z}~. \end{aligned}$$

This is not only a “virtual problem”, because the inconsistency “leaks” into the system at \(z>0\). A solution to this problem is to introduce a vectorial differential operator \(\nabla ^*\) according to (20), i.e.

$$\begin{aligned} \nabla ^*=\varvec{e}_x\partial _x+\varvec{e}_y\partial _y-\varvec{e}_z\partial _z \end{aligned}$$
(50)

and to keep the differentiation separate:

$$\begin{aligned} \widetilde{\nabla \!A}:=\nabla A+\nabla ^*A^\text {cont}\;. \end{aligned}$$
(51)

One can see easily that it solves the inconsistency. The correction is already employed in Fig. 4e for \(\sigma _{zx}^*\), otherwise the couple stress contribution would have wrong parity (and too large amplitude). But it comes with the cost of having to keep always the two fields \(A\) and \(A^\text {cont}\) to be able to apply (51).

5.3 Big particle

In contrast to the Virtual System approaches, there is a certain freedom of choice concerning the parameters of the Big Particle. E.g. in Sect. 4, the mass density of the Big Particle’s material was arbitrarily assumed to be the same as that of the small particles. This freedom of choice has a direct impact on the figure of loss \(\mathcal L\) and deprives it of its meaning for these quantities. This is directly related to the fact that e.g. the contribution of a high mass density in the wall can hide a drop of the system mass in the wall’s vicinity. Only in the case of physical constraints enforcing constant values in the boundaries as well as in the bulk (like certain stress components, cf. the cases (c) and (f) in Fig. 4), \(\mathcal L\) should be zero, which is indeed achieved for \(\sigma _{zz}\) and \(\sigma _{xz}\) in both Big Particle approaches.

In the case of point quantities, their microscopic replacements assumed within the wall cause no problems when extended to complex wall geometries. On the other hand, we have to distinguish the two Big Particle approaches concerning stresses.

5.3.1 Elastic wall

While a positive \(\mathcal L\) for \(\sigma _{xx}\) is denoting a loss, it is negative for \(\sigma _{zx}\) and also for \(\sigma _{zx}^*\), meaning an overcompensation (note that \(\mathcal L\) cannot be estimated solely from the corrected graphs in Fig. 4). The latter is due to the missing micropolar character of the elastic wall, which also leads to a violation of the equilibrium condition, cf. \(\sigma _{zx}^*\) in Fig. 4f. An additional drawback is the high computational cost of evaluating the occurring integrals numerically. Even more problematic are complex wall geometries, where “complex” refers actually to every deviation from a single flat, infinite wall. That is, already for the simple case of a rectangular system enclosed by an otherwise infinite medium, the analytical solutions are unavailable.

5.3.2 Infinitely long stress strings

Since in this approach, the directions of the stress strings in the wall are parallel to the \(z\)-axis (perpendicular to the wall surface), the wall cannot contribute to the stress on planes with normals parallel to the wall (\(\sigma _{xx}\) and \(\sigma _{zx}\) in two dimensions). Consequently, the extension of these stress components beyond the wall is zero and thus \(\tilde{A}=A\) which in turn implies \(\mathcal L=1\). Nevertheless, when all microscopic stress components at the wall obey equilibrium according to (14) and (15), also their extension beyond the wall and therefore their coarse grained fields do so. This is visible also in Fig. 4f as \(\sigma _{zx}^*=\sigma _{xz}=\text {const.}\)

Complex wall geometries cause no problem here: The stress string originating in normal direction from a wall contact does not need to follow this direction, but can follow any suitable path, as discussed in Appendix 1.

There is no extra computational cost for this approach: If one end point of (11) is removed to infinity, the integral actually simplifies to (26) and (27), for stress and couple stress, respectively.

5.4 Excess

The calculation of the excess quantity differs from the other schemes, because it is an extrapolation method without any modifications of the actual field. It is the only scheme that does not blur the linearity of a microscopic field \(A^\text {mic}=c+mz\), because it allows \(A^\text {X}=c+mz\) with \(X_A=0\). Due to the design of this approach (cf. (34) and (33)), the figure of loss satisfies \(X_A+\mathcal L\int _{-\infty }^0 A(z) dz = 0\).

Complex wall geometries can be a problem for the Excess approach: The definition (34) of \(X_A\) assumes an extension of several \(w\) of the vacuum and at least of \(L\) for the system. This condition is violated for curved walls with radii of curvature smaller than \(w\) or \(L\). The choice of a suitable extrapolation function \(A^X\) may be a problem, if \(A\) is not constant in the bulk, especially if constraints exists, e.g. that \(\sigma _{\alpha \beta }^\text {X}\) and \(C_{\alpha \beta }^\text {X}\) fulfill the equilibrium conditions (14) and (15).

Concerning the computational effort, no general statement can be made since the Excess approach is an extrapolation method and needs more human based effort and good intuition for finding a fitting \(A^\text {X}\) than actual CPU time.

6 Conclusion

In this work, we have reviewed four different schemes for overcoming difficulties when coarse graining in a system with boundaries. Theoretical considerations and the application to an idealized system has revealed different shortcomings of these approaches.

In general, we can conclude that none of them is a universal best method, suitable for all quantities. Focussing on the stress fields, the picture is clearer, though: Only the Infinitely Long Stress Strings (Sect. 3.3.2) reproduces the correct dynamics of the particles (equilibrium in the simplest case) and has also no other drawbacks. Moreover, it has a very natural viewpoint of expressing the walls as sources/sinks of momentum flux density [28]. The other Big Particle Approach, namely the elastic wall proved to be deficient not only with respect to equilibrium but to all applied criteria.

For point properties, both approaches using Big Particles introduce additional free parameters describing properties of their interior. Depending on the measurement goal, this can be advantageous or disadvantageous: If there is no physical background for the choice of a particular value, the resulting field \(\tilde{A}\) has an arbitrary component which may even obscure relevant features of \(A\) in the vicinity of the wall, e.g. no density drop occurs in Fig. 4a (dot-dashed line). On the other hand, the free parameters may serve for gauging purposes if a certain reference system/state is available.

If the free parameters of the Big Particle schemes pose a problem and homogeneity in the wall region is called for, the Virtual System Approach is the better choice for point quantities. The absence of arbitrary parameters is shared by the Excess Approach, where all quantities near the walls stem from the fit function and the wall itself contributes the excess.

The Renormalisation Approach proves to be the most robust with respect to its applicability, but being exact only for constant microscopic fields, the validity of its correction is without estimate.

Finally, we can say that all presented strategies can be implemented in simulations and experiments employing straight walls like flows down inclined planes, simple shear, hopper flow, etc., without excessive extra effort (already done by the authors in DEM simulations). For simulations and experiments with more complex geometries (e.g. Couette cell) the implementation can be more complicated, though.