vortex_creation module

class IMTreatment.vortex_creation.vortex_creation.BurgerVortex(x0=0.0, y0=0.0, alpha=1e-06, ksi=1.0, viscosity=1e-06, movable=True, idi=0)[source]

Bases: IMTreatment.vortex_creation.vortex_creation.Vortex

Representing a Burger Vortex, a stationnary self-similar flow, caused by the balance between vorticity creation at the center and vorticity diffusion.

Notes

Analytical Vortex Solutions to the Navier-Stokes Equation. Thesis for the degree of Doctor of Philosophy, Växjö University, Sweden 2007.

get_vector(x, y)[source]

Return the velocity vector at the given point.

class IMTreatment.vortex_creation.vortex_creation.CustomField(funct, unit_values='', idi=0)[source]

Bases: object

Representing a custom field.

Parameters:funct (function) – Representing the field. Has to take (x, y) as input and return (Vx, Vy).
copy()[source]
get_vector(x, y)[source]
get_vector_field(axe_x, axe_y, unit_x='', unit_y='')[source]
class IMTreatment.vortex_creation.vortex_creation.FreeVortex(x0=0.0, y0=0.0, gamma=1.0, movable=True, idi=0)[source]

Bases: IMTreatment.vortex_creation.vortex_creation.Vortex

Representing a Free (irrotational) Vortex. Due to its definition, the center of the vortex is a singular point (V = inf) set to 0 in this implementation.

get_vector(x, y)[source]

Return the velocity vector at the given point.

class IMTreatment.vortex_creation.vortex_creation.HillVortex(x0=0, y0=0, U=1.0, rv=1.0, rot_dir=1, unit_values='', movable=True, idi=0)[source]

Bases: IMTreatment.vortex_creation.vortex_creation.Vortex

Representing a Hill Vortex, a convected vortex sphere in a inviscid flow.

Notes

Analytical Vortex Solutions to the Navier-Stokes Equation. Thesis for the degree of Doctor of Philosophy, Växjö University, Sweden 2007.

get_vector(x, y)[source]

Return the velocity vector at the given point.

class IMTreatment.vortex_creation.vortex_creation.HsvSystem(u_D, D, h, delta, vertical_wall=True)[source]

Bases: IMTreatment.vortex_creation.vortex_creation.VortexSystem

class IMTreatment.vortex_creation.vortex_creation.LambChaplyginVortex(x0=0, y0=0, U=1.0, rv=1.0, Bessel_root_nmb=1, movable=True, idi=0)[source]

Bases: IMTreatment.vortex_creation.vortex_creation.Vortex

Representing a Lamb-Chaplygin dipole vortex, with potential flow in the exterior region, and a linear relation between stream function and vorticity in the inner region.

Notes

Analytical Vortex Solutions to the Navier-Stokes Equation. Thesis for the degree of Doctor of Philosophy, Växjö University, Sweden 2007.

J(order, x)[source]

Return the value of the Bessel function with the given order ar the given point.

Parameters:
  • order (number) – Order of the Bessel function
  • x (number) – Value where we want the Bessel function evaluation.
Returns:

y – Bessel function value at ‘x’

Return type:

number

get_vector(x, y)[source]

Return the velocity vector at the given point.

class IMTreatment.vortex_creation.vortex_creation.LambOseenVortex(x0=0, y0=0, ksi=1.0, t=1.0, viscosity=1e-06, movable=True, idi=0)[source]

Bases: IMTreatment.vortex_creation.vortex_creation.Vortex

Representing a Lamb-Oseen Vortex, a vortex with decay due to viscosity. (satisfy NS)

Notes

Analytical Vortex Solutions to the Navier-Stokes Equation. Thesis for the degree of Doctor of Philosophy, Växjö University, Sweden 2007.

get_vector(x, y)[source]

Return the velocity vector at the given point.

class IMTreatment.vortex_creation.vortex_creation.PersoVortex(x0=0, y0=0, radius=1.0, vort_max=None, circ=None, node_ratio=0.0, nu=1e-06, movable=True, idi=0)[source]

Bases: IMTreatment.vortex_creation.vortex_creation.Vortex

Representing a slice of a 3D vortex.

get_vector(x, y)[source]

Return the velocity vector at the given point.

class IMTreatment.vortex_creation.vortex_creation.RankineVortex(x0=0.0, y0=0.0, circ=1.0, rv=1.0, movable=True, idi=0)[source]

Bases: IMTreatment.vortex_creation.vortex_creation.Vortex

Representing a Rankine Vortex, with an inner zone or forced vortex, and an outer zone of free vortex.

Notes

Giaiotti, DARIO B., et FULVIO Stel. « The Rankine vortex model ». PhD course on Environmental Fluid Mechanics-ICTP/University of Trieste, 2006.

get_vector(x, y)[source]

Return the velocity vector at the given point.

class IMTreatment.vortex_creation.vortex_creation.SolidVortex(x0=0.0, y0=0.0, omega=1.0, movable=True, idi=0)[source]

Bases: IMTreatment.vortex_creation.vortex_creation.Vortex

Representing a solid rotation.

get_vector(x, y)[source]

Return the velocity vector at the given point.

class IMTreatment.vortex_creation.vortex_creation.StepSystem(u_D, H, h, delta)[source]

Bases: IMTreatment.vortex_creation.vortex_creation.VortexSystem

class IMTreatment.vortex_creation.vortex_creation.Vortex(x0, y0, movable, idi=0)[source]

Bases: object

copy()[source]
get_vector_field(axe_x, axe_y, unit_x='', unit_y='')[source]
symetrize()[source]

Return a symetrized copy of the vortex

x0
y0
class IMTreatment.vortex_creation.vortex_creation.VortexSystem[source]

Bases: object

Representing a set of vortex.

add_custom_field(custfield)[source]

Add a custom field to the vortex system

Parameters:custfield (CustomField object) – Custom field to add.
add_vortex(vortex)[source]

Add a vortex, or a custom field to the set.

Parameters:vortex (Vortex or CustomField object) – vortex or field to add to the set
add_wall(wall)[source]

Add a wall to the vortex system

Parameters:wall (Wall object) – Wall to add.
copy()[source]

Return a copy.

display()[source]

Display a representation of the vortex system

display_compounded_vector(x, y, scale=1.0, detailed=False)[source]

Display the compounded vector in ‘x’, ‘y’ position.

get_compounded_vector(x, y, detailed=False)[source]

Return a list f vector, for each structure of the system

Parameters:
  • y (x,) – Wanted vector coordinates
  • detailed (boolean, optional) – If ‘False’ (default), vortex contribution and its imaginary vortex contribution are summed up. Else, return one vector for each contribution.
Returns:

  • vects (Nx2 array of numbers) – Vectors associated to vortex contribution
  • vortex_ids (Nx1 array of integer) – Associated id
  • verts_cf (Mx2 array of numbers) – Vectors associated to custom fields contribution
  • cf_ids (Mx1 array of integer) – Associated id

get_evolution(dt=1.0)[source]

Change the position of the vortex, according to the resulting velocity field and the time step.

Parameters:dt (number) – time step.
Returns:vs – New vortex system at t+dt
Return type:VortexSystem object
get_temporal_vector_field(dt, axe_x, axe_y, nmb_it, unit_x='', unit_y='', unit_time='')[source]
get_vector(x, y, vortex_ids='all', cf_ids='all')[source]

Return the resulting velocity vector, at the given point.

Parameters:
  • y (x,) – Position of the wanted vector.
  • vortex_ids (list of integers, 'all' or 'none') – Can be used to filter the wanted vortex influence by ids.
  • cf_ids (list of integers, 'all' or 'none') – Can be used to filter the wanted custom fields influence by ids.
Returns:

Vx, Vy – Velocity components.

Return type:

numbers

get_vector_field(axe_x, axe_y, unit_x='', unit_y='')[source]

Return a vector field on the given grid

Parameters:
  • axe_y (axe_x,) – x and y axis
  • unit_y (unit_x,) – Axis unities
Returns:

vf – .

Return type:

VectorField object

get_velocity_map(axe_x, axe_y, vort, unit_x='m', unit_y='m')[source]

Return the velocity map of vortex ‘vort’ on the vortex system (velocity that the vortex ‘vort’ will have if placed at different space position on the vortex system)

get_vortex_evolution(dt, nmb_it, unit_time='')[source]
refresh_imaginary_vortex()[source]
remove_vortex(ind)[source]

Remove a vortex or a custom field from the set.

Parameters:ind (integer) – Vortex indice to remove.
class IMTreatment.vortex_creation.vortex_creation.Wall(x=None, y=None)[source]

Bases: object

Representing a wall

get_symmetry(pt)[source]

Give the symmetry of ‘pt’ according to the wall.