shell_utils

Defines cut plane tools.

Functions

axishell_create_structured_base(n_longi, ...)

Obtain the base in a structured mesh.

cartshell_create_structured_base(n_longi, ...)

Obtain the base in a structured mesh.

infer_shell_from_xyz(mesh_xyz, geom_type, shape)

Build a shell from an AVBP Cut.

interpolate_solution_on_shell(shell, mesh, ...)

Interpolates a solution on a shell.

interpolate_solutions_on_shell(shell, mesh, ...)

Interpolates solutions on a shell.

shell_geom_type(shell)

Return the shell geom_type.

shell_repr(shell)

Return a shell description.

Functions

axishell_create_structured_base(n_longi, n_azi, mesh, bnd_uv=None)[source]

Obtain the base in a structured mesh.

Assumes the mesh is the x_axis rotated extrusion of an (x,r) curve.

Parameters
  • n_longi (int) – Number of radial points of the shell.

  • n_azi (int) – Number of azimuthal points of the shell.

  • mesh (array-like) – Coordinates of the cut mesh of shape (n, 3).

  • bnd_uv (array-like) – Limits shell umin, umax, vmin, vmax. Shape (4,).

Returns

An axysymmetric computational shell.

Return type

AxiShell

cartshell_create_structured_base(n_longi, n_trans, mesh)[source]

Obtain the base in a structured mesh.

Assumes the path is square, aligned with y and z, with x = constant.

Parameters
  • n_longi (int) – Number of longitudinal points of the shell.

  • n_trans (int) – Number of transversal points of the shell.

  • mesh (array-like) – Coordinates of the cut mesh of shape (n, 3).

Returns

A cartesian computational shell.

Return type

CartShell

infer_shell_from_xyz(mesh_xyz, geom_type, shape, bnd_uv=None, bnd_angles=None)[source]

Build a shell from an AVBP Cut.

Parameters
  • geom_type (str) – Geometry type. Either “cart” or “axicyl”.

  • shape (array-like) – Discretization of the shell. Shape (nu, nv).

  • bnd_uv (array-like) – Limits shell umin, umax, vmin, vmax. Shape (4,).

interpolate_solution_on_shell(shell, mesh, array, **kwargs)[source]

Interpolates a solution on a shell.

Parameters
  • shell (Shell) – A Shell object.

  • mesh (numpy.ndarray) – Mesh with shape (n_pts, 3).

  • array (numpy.ndarray) – Shape = (n_steps, pts) or (n_pts,).

  • kwargs – cloud2cloud.CloudInterpolator parameters.

interpolate_solutions_on_shell(shell, mesh, raw_data, stencil=4, function=None, limitsource=None)[source]

Interpolates solutions on a shell.

Parameters
  • shell (Shell) – A Shell object.

  • mesh (numpy.ndarray) – Mesh with shape (n_pts, 3).

  • data_dict (dict or np.array) – Arrays shape = (n_steps, n_pts) or (n_pts,). Must contain keys if np.array (prefer dict for this case).

Notes

Check cloud2cloud.CloudInterpolator for meaning of other arguments.

shell_geom_type(shell)[source]

Return the shell geom_type.

Deprecated since version 0.2.0: Use shell.geom_type instead.

shell_repr(shell)[source]

Return a shell description.

Deprecated since version 0.2.0: Use repr(shell) instead.