RotatingFlow#
- class acoular.environments.RotatingFlow
Bases:
FlowFieldAnalytical approximation of a rotating flow field with velocity component in z-direction.
This class provides an analytical model for a fluid flow field with a rigid-body-like rotation about the z-axis. The flow combines rotational motion in the x-y plane and a constant velocity component in the z-direction.
Notes
The rotation is assumed to be about the z-axis. The velocity components in the x-y plane are determined by the angular velocity
omega, while the z-component is constant and set byv0.The angular velocity
omegais computed as:omega = 2 * np.pi * rps, with therpsgiven in revolutions per second (i.e. Hz).
Examples
>>> import acoular as ac >>> import numpy as np >>> >>> flow = RotatingFlow(rps=1, v0=1.0) >>> velocity, jacobian = flow.v(np.array((1.0, 1.0, 0.0))) >>> velocity array([-6.28318531, 6.28318531, 1. ]) >>> jacobian array([[ 0. , -6.28318531, 0. ], [ 6.28318531, 0. , 0. ], [ 0. , 0. , 0. ]])
- rps
Rotational speed in revolutions per second. Negative values indicate clockwise rigid-body-like rotation of the flow. Default is
0.0.
- v0
Constant flow velocity in the z-direction. Default is
0.0.
- origin
The location of the center of rotation. Default is
(0.0, 0.0, 0.0).
- digest
A unique identifier based on the field properties. (read-only)
- omega
Angular velocity (in radians per second) of the rotation. This is a derived property based on
rps.
- v(xx)
Compute the rotating flow field and its Jacobian matrix at a given location.
This method calculates the velocity vector and its Jacobian matrix at the specified location
xxin the fluid domain. The flow field consists of rotational components in the x-y plane and a constant velocity component in the z-direction.- Parameters:
- xx
numpy.ndarrayoffloats The 3D Cartesian coordinates of the location in the fluid where the velocity field is to be computed, shape (3,).
- xx
- Returns:
- velocity_vector
numpy.ndarrayoffloats - jacobian_matrix
numpy.ndarrayoffloats The Jacobian matrix of the velocity vector field at the specified location
xx. The matrix contains partial derivatives of each velocity component with respect to the spatial coordinates \((x, y, z)\), shape (3, 3).
- velocity_vector
Notes
The Jacobian matrix is constant for this flow field and represents the linear relationship between the velocity components and spatial coordinates in the x-y plane.