AQUAgpusph 4.1.2
|
OpenCL tool to compute the fluid global force and moment. More...
#include "resources/Scripts/types/types.h"
Functions | |
__kernel void | entry (__global vec *forces_f, __global vec4 *forces_m, __global int *imove, __global vec *r, __global vec *dudt, __global float *m, unsigned int N, vec g, vec forces_r) |
Tool to compute the force and moment of each particle. | |
OpenCL tool to compute the fluid global force and moment.
__kernel void entry | ( | __global vec * | forces_f, |
__global vec4 * | forces_m, | ||
__global int * | imove, | ||
__global vec * | r, | ||
__global vec * | dudt, | ||
__global float * | m, | ||
unsigned int | N, | ||
vec | g, | ||
vec | forces_r | ||
) |
Tool to compute the force and moment of each particle.
In this approach, since the global force and motion is looked for, the force is computed as: \($ f_a = - m_a \cdot \left( \frac{d \mathbf{u}}{d t} - \mathbf{g} \right) \)$ And the moment as: \($ f_a = - m_a \cdot \mathbf{r}_0 \times \left( \frac{d \mathbf{u}}{d t} - \mathbf{g} \right) \)$
forces_f | Force of each particle to be computed [N]. |
forces_m | Moment of each particle to be computed [N \( \cdot \) m]. |
imove | Moving flags.
|
r | Position \( \mathbf{r} \). |
dudt | Velocity rate of change \( \frac{d \mathbf{u}}{d t} \). |
m | Mass \( m \). |
N | Number of particles. |
g | Gravity acceleration \( \mathbf{g} \). |
forces_r | Point with respect the moments are computed \( \mathbf{r}_0 \). |