floripy.flowfield package#
Submodules#
floripy.flowfield.biaxial module#
- class floripy.flowfield.biaxial.Biaxial_extensional_flow(**kwargs)[source]#
Bases:
Uniaxial_extensional_flowMethods
get_oue(points[, arrangement, out])Returns a vector containing the angular velocity, streaming velocity, and strain tensor.
get_property(property_name)Get a single property, the strain_rate.
get_uoe(points[, arrangement, out])Returns a vector containing streaming velocity, angular velocity, and strain tensor.
get_velocity(points[, out])Calculates the velocity at the points.
get_velocity_meshgrid(x_mg, y_mg, z_mg[, ...])Returns the velocity on a meshgrid.
set_property(property_name, property_value)Set a single property.
get_angular_velocity
get_strainrate_tensor
get_streaming_velocity
- get_angular_velocity(points=None, out=None)#
- get_oue(points, arrangement='interlaced', out=None)#
Returns a vector containing the angular velocity, streaming velocity, and strain tensor. points is an Nx3 numpy array. out is a vector.
- get_property(property_name)#
Get a single property, the strain_rate. These are merely convenience functions, the axes cannot be changed. The flow is always axis-aligned, for more control, use the general linear flowfield.
- get_strainrate_tensor(points=None, out=None)#
- get_streaming_velocity(points=None, out=None)#
- get_uoe(points, arrangement='interlaced', out=None)#
Returns a vector containing streaming velocity, angular velocity, and strain tensor. points is an Nx3 numpy array. out is a vector.
- get_velocity(points, out=None)#
Calculates the velocity at the points. If out is given, it will contain the calculated velocity field. Make sure <points> is a Nx3 array, and so is <out>.
- get_velocity_meshgrid(x_mg, y_mg, z_mg, u_mg=None, v_mg=None, w_mg=None)#
Returns the velocity on a meshgrid.
- set_property(property_name, property_value)#
Set a single property.
floripy.flowfield.flowfieldbase module#
- class floripy.flowfield.flowfieldbase.FlowfieldBase[source]#
Bases:
objectMethods
get_oue(points[, arrangement, out])Returns a vector containing the angular velocity, streaming velocity, and strain tensor.
get_uoe(points[, arrangement, out])Returns a vector containing streaming velocity, angular velocity, and strain tensor.
get_angular_velocity
get_strainrate_tensor
get_streaming_velocity
get_velocity
get_velocity_meshgrid
set_property
floripy.flowfield.linear module#
- class floripy.flowfield.linear.Linear_flow(**kwargs)[source]#
Bases:
FlowfieldBaseMethods
get_oue(points[, arrangement, out])Returns a vector containing the angular velocity, streaming velocity, and strain tensor.
get_uoe(points[, arrangement, out])Returns a vector containing streaming velocity, angular velocity, and strain tensor.
get_velocity(points[, out])Calculates the velocity at the points.
get_velocity_meshgrid(x_mg, y_mg, z_mg[, ...])Returns the velocity on a meshgrid.
set_property(property_name, property_value)Set a single property.
get_angular_velocity
get_strainrate_tensor
get_streaming_velocity
reverse_flow
- get_velocity(points, out=None)[source]#
Calculates the velocity at the points. If out is given, it will contain the calculated velocity field. Make sure <points> is a Nx3 array, and so is <out>.
- get_velocity_meshgrid(x_mg, y_mg, z_mg, u_mg=None, v_mg=None, w_mg=None)[source]#
Returns the velocity on a meshgrid.
- get_oue(points, arrangement='interlaced', out=None)#
Returns a vector containing the angular velocity, streaming velocity, and strain tensor. points is an Nx3 numpy array. out is a vector.
- get_uoe(points, arrangement='interlaced', out=None)#
Returns a vector containing streaming velocity, angular velocity, and strain tensor. points is an Nx3 numpy array. out is a vector.
floripy.flowfield.planar module#
- class floripy.flowfield.planar.Planar_extensional_flow(**kwargs)[source]#
Bases:
FlowfieldBaseMethods
get_oue(points[, arrangement, out])Returns a vector containing the angular velocity, streaming velocity, and strain tensor.
get_property(property_name)Get a single property, the strain_rate.
get_uoe(points[, arrangement, out])Returns a vector containing streaming velocity, angular velocity, and strain tensor.
get_velocity(points[, out])Calculates the velocity at the points.
get_velocity_meshgrid(x_mg, y_mg, z_mg[, ...])Returns the velocity on a meshgrid.
set_property(property_name, property_value)Set a single property.
get_angular_velocity
get_strainrate_tensor
get_streaming_velocity
- get_property(property_name)[source]#
Get a single property, the strain_rate. These are merely convenience functions, the axes cannot be changed. The flow is always axis-aligned, for more control, use the general linear flowfield.
- get_velocity(points, out=None)[source]#
Calculates the velocity at the points. If out is given, it will contain the calculated velocity field. Make sure <points> is a Nx3 array, and so is <out>.
- get_velocity_meshgrid(x_mg, y_mg, z_mg, u_mg=None, v_mg=None, w_mg=None)[source]#
Returns the velocity on a meshgrid.
- get_oue(points, arrangement='interlaced', out=None)#
Returns a vector containing the angular velocity, streaming velocity, and strain tensor. points is an Nx3 numpy array. out is a vector.
- get_uoe(points, arrangement='interlaced', out=None)#
Returns a vector containing streaming velocity, angular velocity, and strain tensor. points is an Nx3 numpy array. out is a vector.
floripy.flowfield.shear module#
- class floripy.flowfield.shear.Shear_flow(**kwargs)[source]#
Bases:
FlowfieldBaseMethods
get_oue(points[, arrangement, out])Returns a vector containing the angular velocity, streaming velocity, and strain tensor.
get_uoe(points[, arrangement, out])Returns a vector containing streaming velocity, angular velocity, and strain tensor.
get_velocity(points[, out])Calculates the velocity at the points.
get_velocity_meshgrid(x_mg, y_mg, z_mg[, ...])Returns the velocity on a meshgrid.
set_property(property_name, property_value)Set a single property.
get_angular_velocity
get_strainrate_tensor
get_streaming_velocity
- get_velocity(points, out=None)[source]#
Calculates the velocity at the points. If out is given, it will contain the calculated velocity field. <points> is a Nx3 array. <out> is a numpy vector of size 3*N. If <out> is not given, returns numpy vector of size 3*N.
- get_velocity_meshgrid(x_mg, y_mg, z_mg, u_mg=None, v_mg=None, w_mg=None)[source]#
Returns the velocity on a meshgrid.
- get_oue(points, arrangement='interlaced', out=None)#
Returns a vector containing the angular velocity, streaming velocity, and strain tensor. points is an Nx3 numpy array. out is a vector.
- get_uoe(points, arrangement='interlaced', out=None)#
Returns a vector containing streaming velocity, angular velocity, and strain tensor. points is an Nx3 numpy array. out is a vector.
floripy.flowfield.uniaxial module#
- class floripy.flowfield.uniaxial.Uniaxial_extensional_flow(**kwargs)[source]#
Bases:
FlowfieldBaseMethods
get_oue(points[, arrangement, out])Returns a vector containing the angular velocity, streaming velocity, and strain tensor.
get_property(property_name)Get a single property, the strain_rate.
get_uoe(points[, arrangement, out])Returns a vector containing streaming velocity, angular velocity, and strain tensor.
get_velocity(points[, out])Calculates the velocity at the points.
get_velocity_meshgrid(x_mg, y_mg, z_mg[, ...])Returns the velocity on a meshgrid.
set_property(property_name, property_value)Set a single property.
get_angular_velocity
get_strainrate_tensor
get_streaming_velocity
- get_property(property_name)[source]#
Get a single property, the strain_rate. These are merely convenience functions, the axes cannot be changed. The flow is always axis-aligned, for more control, use the general linear flowfield.
- get_velocity(points, out=None)[source]#
Calculates the velocity at the points. If out is given, it will contain the calculated velocity field. Make sure <points> is a Nx3 array, and so is <out>.
- get_velocity_meshgrid(x_mg, y_mg, z_mg, u_mg=None, v_mg=None, w_mg=None)[source]#
Returns the velocity on a meshgrid.
- get_oue(points, arrangement='interlaced', out=None)#
Returns a vector containing the angular velocity, streaming velocity, and strain tensor. points is an Nx3 numpy array. out is a vector.
- get_uoe(points, arrangement='interlaced', out=None)#
Returns a vector containing streaming velocity, angular velocity, and strain tensor. points is an Nx3 numpy array. out is a vector.
Module contents#
- floripy.flowfield.create(**kwargs)[source]#
Creates a flow field.
- Parameters:
- kwargsdict
Keyword arguments specifying the details of a particular kind of flow field. flow_type : {‘shear’, planar_extension’, ‘uniaxial_extension’,
‘biaxial_extension’, ‘linear’} Specifies the kind of flow field.
The keys and their corresponding values depend on flow_type. The allowed keys for each value of flow_type are as follows.
- If flow_type = ‘shear’:
‘shear_rate’ : float ‘flow_dir’ : {‘x’, ‘y’, ‘z’} ‘gradient_dir’ : {‘x’, ‘y’, ‘z’}
- If flow_type = ‘planar_extension’:
‘strain_rate’ : float ‘plane’ : string
Composed of two characters, the first specifying the expansion axis, and the second specifying the compression axis. For example, ‘yz’ specifies the expansion axis is ‘y’ and the compression axis is ‘z’.
- If flow_type = ‘uniaxial_extension’:
‘strain_rate’ : float ‘axis’ : {‘x’, ‘y’, ‘z’}
Specifies the expansion axis.
- If flow_type = ‘biaxial_extension’:
‘strain_rate’ : float ‘plane’ : string
Composed of two characters specifying the two axes defining the compression plane. The order of the characters does not matter.
- If flow_type = ‘linear’:
- ‘U’list of floats
Translational velocity
- ‘Omega’list of floats
Angular velocity
- ‘E’list of lists of floats
Rate of strain tensor
- Returns:
- flowfield
Instance of flowfield object
Examples
Create a shear flow field. >>> import flowfield >>> kwargs = {‘flow_type’: ‘shear’, ‘shear_rate’: 0.25, ‘flow_dir’: ‘x’, ‘gradient_dir’: ‘y’} >>> sf = flowfield.create(**kwargs)
Create a linear flow field. >>> import flowfield >>> kwargs = {‘flow_type’: ‘linear’, ‘U’: [0.25, 0.0, 0.0], ‘Omega’: [0.0, 0.0, 0.25], … ‘E’: [[0.0, 0.0, 0.0],[0.0, 0.0, 0.0],[0.0, 0.0, 0.0]]} >>> lf = flowfield.create(**kwargs)