potential_flow module¶
-
class
IMTreatment.potential_flow.potential_flow.
Panel
(xya, xyb, sigma=0.0)[source]¶ Bases:
object
Contains information related to a panel.
-
vector
¶
-
-
class
IMTreatment.potential_flow.potential_flow.
System
(u_inf=0.0, alpha=0.0)[source]¶ Bases:
object
Representing a potential system (boundaries, sources, freestream, …)
-
add_object
(dim, coords, kind='wall', res=1)[source]¶ Add an object to the system
Parameters: - dim (integer) – Can be ‘0’ for a point, ‘1’ for a boundary or ‘2’ for a solid.
- coords (array of number) – Coordinates of the object (1x2 array if ‘dim=1’, nx2 arrays else).
- kind (string, optional) – Kind of object (default is ‘wall’).
- res (integer) – Resolution, length of the wanted segments.
-
compute_pressure_from_velocity
(obj, raw=False)[source]¶ Return the pressure coefficient computed from velocity data.
-
compute_velocity_on_grid
(grid_x, grid_y, raw=False, remove_solid=False)[source]¶ Returns the velocity field on the given grid.
-
-
IMTreatment.potential_flow.potential_flow.
get_gradP_length
(D=1.0, Vd=1.0, perc=0.1, nu=1e-06, res_pot=20, res_int=500, eps=1e-06)[source]¶ Return the position before the obstacle where the pressure is equal at the wanted percentage of the pressure at the obstacle, using potential flow theory.
Parameters: - D (number) – Obstacle diameter [m].
- Vd (number) – Bulk velocity [m/s].
- perc (number) – wanted percentage (default to 0.1).
- nu (number) – Kinematic viscosity [].
- res_pot (integer) – Resolution for potential flow model (default=20).
- res_int (integer) – Resolution for Thwaites integral resolution (default=500).
- eps (number) – Wanted precision on the position (for the iterative solver)
Returns: dP_len – Position of 10% pressure.
Return type: number
-
IMTreatment.potential_flow.potential_flow.
get_separation_position
(D=1.0, Vd=1.0, x_obst=10.0, theta_max=inf, nu=1e-06, res_pot=20, res_int=500)[source]¶ Use potential flow to get velocity distribution and Thwaites BL equation to get the separation position.
Parameters: - D (number) – Obstacle diameter [m].
- Vd (number) – Bulk velocity [m/s].
- x_obst (number) – Distance from CL birth to obstacle [m].
- theta_max (number) – Maximum value of BL momentum thickness (in case of confinement) [m].
- nu (number) – Kinematic viscosity [].
- res_pot (integer) – Resolution for potential flow model (default=20).
- res_int (integer) – Resolution for Thwaites integral resolution (default=500).
Returns: x_sep – Separation position
Return type: number
-
IMTreatment.potential_flow.potential_flow.
integral
(x, y, panel, dxdz, dydz)[source]¶ Evaluates the contribution of a panel at one point.
Parameters: - y -- Cartesian coordinates of the point. (x,) –
- -- panel which contribution is evaluated. (panel) –
- -- derivative of x in the z-direction. (dxdz) –
- -- derivative of y in the z-direction. (dydz) –
Returns: Return type: Integral over the panel of the influence at one point.
-
class
IMTreatment.potential_flow.potential_flow.
object_0D
(x, y)[source]¶ Bases:
object
Representing a Source or a sink.
-
class
IMTreatment.potential_flow.potential_flow.
object_1D
(coords, kind, res)[source]¶ Bases:
object
Representing a boundary (wall, source or sink).
-
class
IMTreatment.potential_flow.potential_flow.
object_2D
(coords, kind, res)[source]¶ Bases:
IMTreatment.potential_flow.potential_flow.object_1D
Representing a solid (wall, source or sink).