This function can be used to solve problem with fluid only, or grains only, or fluid and grains. The external_particle_forces argument contains the external forces that are applied on the grains. For instance, if the grains are falling under falling, this force will be set as:
```python
mass=np.pi*p.r()**2*rhop
```
This function can be used to solve problem with fluid only, or grains only, or fluid and grains. The external_particle_forces argument contains the external forces that are applied on the grains. For instance, if the grains are falling under falling, this force will be set as ```g*mass```.
The complete documentation of the function and its parameters are given:
external_particles_forces -- vector of external forces applied on the particles
fixed_grains -- boolean variable specifying if the grains are fixed in the fluid
after_sub_iter -- callback to execute once a sub iteration has been made
max_split -- maximum number of times the time step can be further split if convergence is not reached
Raises:
ValueError -- fluid and particles cannot be both None
ValueError -- external_particles_forces must have shape (number of particles,dimension)
"""
```
The loop also contains instruction to write output files. It is important to note that after moving the grains in the computational loop you have to use the _set_particles()_ function to search the new location of the grains in the mesh.
7. Finally, the output is written in the given directory every ```outf``` iteration.