64 Xc[0] = Xc0[0] + velocity[0]*Time + xOscillation[0]*sin(xOscillation[1]*Time + xOscillation[2]);
65 Xc[1] = Xc0[1] + velocity[1]*Time + yOscillation[0]*sin(yOscillation[1]*Time + yOscillation[2]);
66 vel[0] = velocity[0] + xOscillation[0]*xOscillation[1]*cos(xOscillation[1]*Time + xOscillation[2]);
67 vel[1] = velocity[1] + yOscillation[0]*yOscillation[1]*cos(yOscillation[1]*Time + yOscillation[2]);
72 Theta = Theta0 + omega*Time + pitchOscillation[0]*sin(pitchOscillation[1]*Time + pitchOscillation[2]);
73 angVel = omega + pitchOscillation[0]*pitchOscillation[1]*cos(pitchOscillation[1]*Time + pitchOscillation[2]);
87 Xc0[0] = Xc0[1] = 0.0;
91 vel[0] = vel[1] = 0.0;
98 xOscillation[0] = xOscillation[1] = xOscillation[2] = 0.0;
99 yOscillation[0] = yOscillation[1] = yOscillation[2] = 0.0;
100 pitchOscillation[0] = pitchOscillation[1] = pitchOscillation[2] = 0.0;
real xOscillation[3]
amplitude, angular frequency and phase difference of oscillation in the x-direction ...
double real
Is a float or a double depending on the machine precision.
real pitchOscillation[3]
amplitude, angular frequency and phase difference of pitch oscillation
vecH Y
reference y-coordinate of boundary points
Contains information about an immersed boundary in the flow.
cusp::array1d< real, host_memory > vecH
Cusp 1D array stored in the host.
vecH X
reference x-coordinate of boundary points
real X0[2]
reference center of rotation
real angVel
angular velocity (counterlockwise is positive)
real Theta0
initial angle of attack
real Xc[2]
actual center of rotation (x- and y-coordinates)
real Theta
actual angle of attack (counterclockwise is positive)
real omega
uniform rotational velocity
void update(real Time)
Updates the position of the center of rotation of the body, as well as its the translational and rota...
real velocity[2]
uniform translational velocity (x- and y-components)
real vel[2]
translational velocity (x- and y- components)
bool moving[2]
flag to indicate if the body is moving (translating or rotating)
int numPoints
number of boundary points
real Xc0[2]
initial position of center of rotation
void reset()
Resets the position and motion of the body.
real yOscillation[3]
amplitude, angular frequency and phase difference of oscillation in the y-direction ...