## 3 Numerical Implementations and Algorithms
### Additional Solid Routines
This choice was made in the name of simplicity, even if it known to be related to some physical inconsistency, whereas the same remark is true independently for some collision operators [41]. Related new objects and class methods are incorporated next to existing PaLaBoS dynamics and called when a solid study is requested. As we mentioned before, non-intrusive coding work allows for the addition of new solid objects without modifying initial PaLaBoS sources enabling the interoperability between different libraries. ### Proposed Modifications for Solid Boundary Conditions

To deal with solids in an LBM framework, it is easier to work on existing boundary conditions. Indeed, solid behavior near domain frontiers must be identified. Our numerical approach can be explained as follows. First, numerical runs have pointed out non-desired stress concentration issues in corners or along borders, yielding to important gradients skewing external forces values. Secondly, we aim to distinguish the boundary behavior from the internal one. Even though, this boundary behavior has not been clearly determined, we aim to suggest a patch treatment for solid matter. For all boundary nodes, we decide to relax them independently toward an equilibrium through Algorithm 4, just before the colliding step. Hence, an additional relaxation parameter \(\omega_{c}\) is introduced. In other words, along domain borders, a double colliding step is thus, applied in a cascade manner, including one with external force. In practice, we opt for \(0.80<\omega_{c}\leq 1\) to relax with efficiency. Concerning non-zero velocity boundary conditions, \(\omega_{c}\) is specially chosen to be equal to 1. Indeed, in a solid, no particles are streamed at constrained boundary interfaces. Stress divergence must act as a body force in internal nodes and shall alone govern inner behavior. This can be physically interpreted as if non-zero velocity boundary conditions being immediately converted into solid forces during iterations. Although, all of these conditions are not perfect and subject to improvement, indeed works on highly accurate boundary conditions on the moving surface [42] could be exploited. Yet, the simple and perfectible boundary conditions used here lead to correct results, see Section 4. For more details concerning the implementation, see the available source code [36]. ```
Input: Boundary relaxation parameter \(\omega_{c}\) and solid equilibrium \(f^{(eq),sld}\) Result: Modification of distribution functions \(f_{i}(G_{x},G_{y},t)\) on boundaries for\(b\gets 0\)to BoundaryCell.Count()-1 do  BoundaryCell[b].RelaxBoundaryCell(\(\omega_{c},f^{(eq),sld}\)); // Relax current boundary cell  end for
```
**Algorithm 4**Boundary Conditions' Routine

### LBMS: Loop to Solve Solid Static Equilibrium

Lattice Boltzmann loop is slightly reorganized including above presented additional routines and modifications to perform solid simulations. Main steps are fulfilled by executing in sequence the displacement routine, strain and stress routine, body force routine and finally the special solid boundary task. To demonstrate the capacity of the present LBM to solve solid static equilibrium, we decide to assign specific boundary conditions. The function _SetBoundaryConditions()_ sets a zero-velocity condition along related frontiers. In solids, it is similar to fixed boundary conditions if zero velocity does not evolve throughout the simulation time. On the other hand, _SetBoundaryVelocity()_ applies a classic velocity condition, which is reduced to zero when variable _MaxIterationBoundaryCondition_ is reached. Expected solid static equilibrium is achieved after several supplementary loops. Previous setup exhibits good results for solids, therefore, this is carried out in Section 4. Solid relaxation parameter \(\omega\) is defined to be very small, to simulate a non-collision condition. Practically, parametric numerical runs revealed that influence of the relaxation parameter can be neglected if \(\omega\in[0,\dots,1]\) far from domain borders.