1 #ifndef __CS_ROTATION_H__ 2 #define __CS_ROTATION_H__ 100 const double invariant_point[3],
155 double f = r->
omega * c;
157 vr[0] += (- r->
axis[2]*v[1] + r->
axis[1]*v[2]) * f;
158 vr[1] += (- r->
axis[0]*v[2] + r->
axis[2]*v[0]) * f;
159 vr[2] += (- r->
axis[1]*v[0] + r->
axis[0]*v[1]) * f;
178 double f = r->
omega * c;
180 vr[0] = (- r->
axis[2]*v[1] + r->
axis[1]*v[2]) * f;
181 vr[1] = (- r->
axis[0]*v[2] + r->
axis[2]*v[0]) * f;
182 vr[2] = (- r->
axis[1]*v[0] + r->
axis[0]*v[1]) * f;
201 double f = r->
omega * c;
203 tr[0][1] -= r->
axis[2]*f;
204 tr[0][2] += r->
axis[1]*f;
206 tr[1][0] += r->
axis[2]*f;
207 tr[1][2] -= r->
axis[0]*f;
209 tr[2][0] -= r->
axis[1]*f;
210 tr[2][1] += r->
axis[0]*f;
229 double f = r->
omega * c;
232 tr[0][1] = - r->
axis[2]*f;
233 tr[0][2] = r->
axis[1]*f;
235 tr[1][0] = r->
axis[2]*f;
237 tr[1][2] = - r->
axis[0]*f;
239 tr[2][0] = - r->
axis[1]*f;
240 tr[2][1] = r->
axis[0]*f;
static 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.
Definition: cs_rotation.h:225
void cs_rotation_matrix(double theta, const double axis[3], const double invariant_point[3], double matrix[3][4])
Compute rotation matrix.
Definition: cs_rotation.c:400
static 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.
Definition: cs_rotation.h:197
Subdomain rotation description.
Definition: cs_rotation.h:46
#define BEGIN_C_DECLS
Definition: cs_defs.h:510
double cs_real_t
Floating-point value.
Definition: cs_defs.h:322
void matrix(const int *iconvp, const int *idiffp, const int *ndircp, const int *isym, const cs_real_t *thetap, const int *imucpp, const cs_real_t coefbp[], const cs_real_t cofbfp[], const cs_real_t rovsdt[], const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_t i_visc[], const cs_real_t b_visc[], const cs_real_t xcpp[], cs_real_t da[], cs_real_t xa[])
Definition: cs_matrix_building.c:111
double invariant[3]
Definition: cs_rotation.h:51
double precision, dimension(:,:,:), allocatable v
Definition: atimbr.f90:114
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.
Definition: cs_rotation.h:127
double axis[3]
Definition: cs_rotation.h:50
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.
Definition: cs_rotation.h:173
cs_rotation_t * cs_glob_rotation
double angle
Definition: cs_rotation.h:49
static 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.
Definition: cs_rotation.h:150
double precision, dimension(:,:,:), allocatable theta
Definition: atimbr.f90:123
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:335
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.
Definition: cs_rotation.c:490
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:316
#define END_C_DECLS
Definition: cs_defs.h:511
double omega
Definition: cs_rotation.h:48
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.
Definition: cs_rotation.c:520
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.
Definition: cs_rotation.c:363
void cs_rotation_to_array(int r_num, cs_real_t fra[8])
Copy rotation structure values to an array.
Definition: cs_rotation.c:575