AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
Functions
Acceleration.cl File Reference

Euler XYZ based acceleration computation. More...

#include "resources/Scripts/types/types.h"
Include dependency graph for Acceleration.cl:

Functions

__kernel void entry (const __global uint *iset, const __global int *imove, __global vec *r, __global vec *dudt, unsigned int N, unsigned int motion_iset, vec motion_r, vec motion_ddrddt, vec4 motion_a, vec4 motion_ddaddt)
 Compute the boundary elements acceleration applying Euler-XYZ motion.
 

Detailed Description

Euler XYZ based acceleration computation.

Function Documentation

◆ entry()

__kernel void entry ( const __global uint *  iset,
const __global int *  imove,
__global vec r,
__global vec dudt,
unsigned int  N,
unsigned int  motion_iset,
vec  motion_r,
vec  motion_ddrddt,
vec4  motion_a,
vec4  motion_ddaddt 
)

Compute the boundary elements acceleration applying Euler-XYZ motion.

In Euler-XYZ the following transformation is applied to a particle \( a \):

\[ R_z \cdot R_y \cdot R_x \cdot \mathbf{x_a} + \mathbf{cor}, \]

where \( \mathbf{cor} \) is the position of the center of rotation (global translations), and \( \mathbf{x_a} \) is the constant position of the boundary element with respect to \( \mathbf{cor} \), and \( R_x, R_y, R_z \) are the rotation matrices:

\[ R_x = \left[ \begin{matrix} 1 & 0 & 0 \\ 0 & \mathrm{cos}(\phi) & -\mathrm{sin}(\phi) \\ 0 & \mathrm{sin}(\phi) & \mathrm{cos}(\phi) \\ \end{matrix} \right], \]

\[ R_y = \left[ \begin{matrix} \mathrm{cos}(\theta) & 0 & \mathrm{sin}(\theta) \\ 0 & 1 & 0 \\ -\mathrm{sin}(\theta) & 0 & \mathrm{cos}(\theta) \\ \end{matrix} \right], \]

\[ R_z = \left[ \begin{matrix} \mathrm{cos}(\psi) & -\mathrm{sin}(\psi) & 0 \\ \mathrm{sin}(\psi) & \mathrm{cos}(\psi) & 0 \\ 0 & 0 & 1 \\ \end{matrix} \right]. \]

To compute the acceleration the following process can be followed:

  1. The acceleration due to the rotations is computed in the local coordinates: \( \dot \omega \times \mathbf{x_a} \), with \( \dot \omega = \left[ \ddot \phi, \ddot \theta, \ddot \psi \rigth]\)
  2. Then the vector is rotated using the rotation matrix.
  3. Finally the linear acceleration, \( \ddot \mathbf{cor} \) is added.
Parameters
isetSet of particles index.
imoveMoving flags.
  • imove > 0 for regular fluid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
rPosition \( \mathbf{r} \).
dudtVelocity rate of change \( \frac{d \mathbf{u}}{d t} \).
NNumber of particles.
motion_isetSet of particles affected.
motion_rCenter of rotation.
motion_ddrddtCenter of rotation aceleration.
motion_aRotation angles \( \phi, \theta, \psi \).
motion_ddaddtAngular accelerations.
See also
MotionVelocity.cl