#include "cs_defs.h"Go to the source code of this file.
Data Structures | |
| struct | cs_rotation_t |
| Subdomain rotation description. More... | |
Functions | |
| void | cs_rotation_define (double omega_x, double omega_y, double omega_z, double invariant_x, double invariant_y, double invariant_z) |
| Define a global rotation. | |
| void | cs_rotation_matrix (double theta, const double axis[3], const double invariant_point[3], double matrix[3][4]) |
| Compute rotation matrix. | |
| void | cs_rotation_update_coords (cs_lnum_t n_coords, double t_rot, cs_real_3_t coords[]) |
| Update coordinates based on a global rotation and time. | |
| static void | cs_rotation_velocity (const cs_rotation_t *r, const cs_real_t coords[3], cs_real_t vr[3]) |
| Compute velocity relative to a fixed frame at a given point. | |
| static CS_F_HOST_DEVICE void | cs_rotation_add_coriolis_v (const cs_rotation_t *r, cs_real_t c, const cs_real_t v[3], cs_real_t vr[3]) |
| Add a Coriolis term to a vector. | |
| static void | cs_rotation_coriolis_v (const cs_rotation_t *r, cs_real_t c, const cs_real_t v[3], cs_real_t vr[3]) |
| Compute a vector Coriolis term. | |
| static CS_F_HOST_DEVICE void | cs_rotation_add_coriolis_t (const cs_rotation_t *r, cs_real_t c, cs_real_t tr[3][3]) |
| Add the dual tensor of a rotation vector to a tensor. | |
| static CS_F_HOST_DEVICE void | cs_rotation_coriolis_t (const cs_rotation_t *r, cs_real_t c, cs_real_t tr[3][3]) |
| Compute the dual tensor of a rotation vector. | |
| void | cs_rotation_cyl_v (const cs_rotation_t *r, const cs_real_t coords[3], const cs_real_t v[3], cs_real_t vc[3]) |
| Express a vector in the cyclindrical system associated to a rotation. | |
| void | cs_rotation_to_array (int r_num, cs_real_t fra[8]) |
| Copy rotation structure values to an array. | |
Variables | |
| cs_rotation_t * | cs_glob_rotation |
|
inlinestatic |
Add the dual tensor of a rotation vector to a tensor.
| [in] | r | pointer to rotation structure |
| [in] | c | multiplicative coefficient |
| [in,out] | tr | tensor to which dual tensor of rotation is added |
|
inlinestatic |
Add a Coriolis term to a vector.
| [in] | r | pointer to rotation structure |
| [in] | c | multiplicative coefficient |
| [in] | v | velocity |
| [in,out] | vr | resulting Coriolis term |
|
inlinestatic |
Compute the dual tensor of a rotation vector.
| [in] | r | pointer to rotation structure |
| [in] | c | multiplicative coefficient |
| [out] | tr | dual tensor of rotation is added |
|
inlinestatic |
Compute a vector Coriolis term.
| [in] | r | pointer to rotation structure |
| [in] | c | multiplicative coefficient |
| [in] | v | velocity |
| [out] | vr | resulting Coriolis term |
| void cs_rotation_cyl_v | ( | const cs_rotation_t * | r, |
| const cs_real_t | coords[3], | ||
| const cs_real_t | v[3], | ||
| cs_real_t | vc[3] ) |
Express a vector in the cyclindrical system associated to a rotation.
| [in] | r | pointer to rotation structure |
| [in] | coords | cartesian coordinates of the location point |
| [in] | v | vector components in cartesian coordinates system |
| [out] | vc | vector components in cylindrical coordinates system |
| void cs_rotation_define | ( | double | omega_x, |
| double | omega_y, | ||
| double | omega_z, | ||
| double | invariant_x, | ||
| double | invariant_y, | ||
| double | invariant_z ) |
Define a global rotation.
The rotation vector's length determines the angular velocity (in rad/s).
| [in] | omega_x | rotation vector x component |
| [in] | omega_y | rotation vector y component |
| [in] | omega_z | rotation vector z component |
| [in] | invariant_x | invariant point x component |
| [in] | invariant_y | invariant point y component |
| [in] | invariant_z | invariant point z component |
| void cs_rotation_matrix | ( | double | theta, |
| const double | axis[3], | ||
| const double | invariant_point[3], | ||
| double | matrix[3][4] ) |
Compute rotation matrix.
| [in] | theta | rotation angle, in radians |
| [in] | axis | rotation axis direction vector |
| [in] | invariant_point | invariant point coordinates |
| [out] | matrix | resulting rotation matrix |
| void cs_rotation_to_array | ( | int | r_num, |
| cs_real_t | fra[8] ) |
Copy rotation structure values to an array.
This may be useful to avoid requiring specific type mappings for MPI or other programming languages.
| [in] | r_num | rotation number (1 to n numbering, 0 for none) |
| [in] | fra | flat rotation array: axis (0-2), invariant(3-5), omega (6), angle(7) |
| void cs_rotation_update_coords | ( | cs_lnum_t | n_coords, |
| double | t_rot, | ||
| cs_real_3_t | coords[] ) |
Update coordinates based on a global rotation and time.
| [in] | n_coords | number of coordinates |
| [in] | t_rot | time since rotation start |
| [in,out] | coords | coordinates array |
|
inlinestatic |
Compute velocity relative to a fixed frame at a given point.
| [in] | r | pointer to rotation structure |
| [in] | coords | point coordinates |
| [out] | vr | resulting rotation frame velocity |
|
extern |