classes.py¶
class VelocityField
-
class
classes.
VelocityField
(file_path='/', time_step=0, mean_file_path='/', file_type='/')¶ Bases:
object
Data file
Loads the input file with the NetCFD (.nc) format or a Tecplot format (.dat); initialize the variables.
Parameters: - file_path (str) – file path
- time_step (int) – current time step
- mean_file_path (str) – in case of a mean field subtraction
- file_type (str) – ‘piv_netcdf’, ‘dns, ‘dns2’, ‘piv_tecplot’, ‘openfoam’
- x_coordinate_matrix (ndarray) – spatial mesh
- y_coordinate_matrix (ndarray) – spatial mesh
- z_coordinate_matrix (ndarray) – spatial mesh, optional
- u_velocity_matrix (ndarray) – 1st component velocity field
- v_velocity_matrix (ndarray) – 2nd component velocity field
- w_velocity_matrix (ndarray) – 3rd component velocity field, optional
- normalization_flag (boolean) – for normalization of the swirling field
- normalization_direction (str) – ‘None’, ‘x’ or ‘y’
- x_coordinate_step (float) – for homogeneous mesh, provides a unique step
- y_coordinate_step (float) – for homogeneous mesh, provides a unique step
- z_coordinate_step (float) – for homogeneous mesh, provides a unique step
- derivative (dict) – contains ‘dudx’, ‘dudy’, ‘dvdx’, ‘dvdy’. Can be extended to the 3rd dimension
Returns: vfield, an instance of the VelocityField class
Return type: class VelocityField