|
__kernel void | entry (const __global uint *iset, const __global int *imove, __global vec *viscousForces_f, __global vec4 *viscousForces_m, const __global vec *r, const __global vec *normal, const __global vec *u, const __global float *rho, const __global float *m, __constant float *visc_dyn, const __global uint *icell, const __global uint *ihoc, uint N, uivec4 n_cells, float dr, unsigned int viscousForces_iset, vec viscousForces_r) |
| Tool to compute the viscous force and moment for an especific body.
|
|
Tool to compute the fluid viscous force and moment.
__kernel void entry |
( |
const __global uint * |
iset, |
|
|
const __global int * |
imove, |
|
|
__global vec * |
viscousForces_f, |
|
|
__global vec4 * |
viscousForces_m, |
|
|
const __global vec * |
r, |
|
|
const __global vec * |
normal, |
|
|
const __global vec * |
u, |
|
|
const __global float * |
rho, |
|
|
const __global float * |
m, |
|
|
__constant float * |
visc_dyn, |
|
|
const __global uint * |
icell, |
|
|
const __global uint * |
ihoc, |
|
|
uint |
N, |
|
|
uivec4 |
n_cells, |
|
|
float |
dr, |
|
|
unsigned int |
viscousForces_iset, |
|
|
vec |
viscousForces_r |
|
) |
| |
Tool to compute the viscous force and moment for an especific body.
In this approach the following operation is performed for the boundary elements: \( \mathbf{f}_a = \mu \, \sum_b -\frac{
\left(\mathbf{u}_b - \mathbf{u}_a\right) -
\left(\left(\mathbf{u}_b - \mathbf{u}_a\right) \cdot \mathbf{n}_a \right)
\mathbf{n}_a}{
\left(\mathbf{r}_b - \mathbf{r}_a\right) \cdot \mathbf{n}_a}s_a
\, W\left(\mathbf{u}_b - \mathbf{u}_a\right) \frac{m_b}{\rho_b}\) where \( s_a \) is the area of the element, stored in the masses array. The moment is computed therefore as: \( \mathbf{m}_a = \mathbf{f}_a \times
\left(\mathbf{r}_a - \mathbf{r}_0 \right) \) becoming \( \mathbf{r}_0 \) the reference point where the moment should be computed.
- Parameters
-
iset | Set of particles index. |
imove | Moving flags.
- imove > 0 for regular fluid particles.
- imove = 0 for sensors.
- imove < 0 for boundary elements/particles.
|
viscousForces_f | Force of each boundary element to be computed [N]. |
viscousForces_m | Moment of each boundary element to be computed |
r | Position \( \mathbf{r} \). |
normal | Normal \( \mathbf{n} \). |
u | Velocity \( \mathbf{u} \). |
rho | Density \( \rho \). |
m | Mass \( m \). |
visc_dyn | Dynamic viscosity \( \mu \). |
icell | Cell where each particle is located. |
ihoc | Head of chain for each cell (first particle found). |
N | Number of particles. |
n_cells | Number of cells in each direction |
dr | Distance between particles \( \Delta r \). |
viscousForces_iset | Particles set to be computed. |
viscousForces_r | Point with respect the moments are computed \( \mathbf{r}_0 \). |