pysdic.create_3d_quadrangle_4_cylindrical#
- create_3d_quadrangle_4_cylindrical(function=None, *, frame=None, t_bounds=None, h_bounds=None, t_array=None, h_array=None, n_t=None, n_h=None, direct=True, close=False, uv_layout=0)[source]#
Create a 3D
quadrangle_4mesh of a cylindrical surface with radius \(r = f(h, \theta)\).The axis of the cylinder is the \(z\)-axis of the frame and the angle \(\theta\) is measured from its \(x\)-axis: the vertex at height \(h\) and angle \(\theta\) is \((r \cos\theta, r \sin\theta, h)\).
The grid of vertices is given, for each axis, either by bounds and a number of vertices (uniform grid), or by an array of coordinates.
Important
n_tandn_hare numbers of vertices, not elements.The vertex at the indices
i_talong \(\theta\) andi_halong \(h\) (both starting from 0) ismesh.coordinates[i_h * n_t + i_t].If
closeis True, the last and first angles are connected by one more column of elements. For a uniform closed grid, uset_bounds=(0, 2 * pi * (1 - 1 / n_t)).- Parameters:
function (Optional[Callable[[numpy.ndarray, numpy.ndarray], ArrayLike]], optional) – The radius \(f(h, \theta)\), called once with the 2D grids of \(h\) and \(\theta\) (shape \((n_t, n_h)\)). It must return a scalar or an array of the same shape. For an axisymmetric surface, ignore the second argument (e.g.
lambda h, t: 1 + h**2). By default, \(f = 1\).frame (Optional[
py3dframe.Frame], optional (default:None)) – The local frame of the surface (see above). By default, the canonical frame. Requires the optional packagepy3dframe.t_bounds (Optional[Tuple[Real, Real]], optional) – The bounds of the uniform grid along \(\theta\) and \(h\) (with
n_tandn_h).h_bounds (Optional[Tuple[Real, Real]], optional) – The bounds of the uniform grid along \(\theta\) and \(h\) (with
n_tandn_h).t_array (Optional[ArrayLike], optional) – The coordinates of the grid along \(\theta\) and \(h\) (instead of the bounds), with at least 2 values.
h_array (Optional[ArrayLike], optional) – The coordinates of the grid along \(\theta\) and \(h\) (instead of the bounds), with at least 2 values.
n_t (Optional[Integral], optional) – The numbers of vertices along \(\theta\) and \(h\) (\(\geq 2\)). Required with the bounds, checked against the arrays if given.
n_h (Optional[Integral], optional) – The numbers of vertices along \(\theta\) and \(h\) (\(\geq 2\)). Required with the bounds, checked against the arrays if given.
direct (bool, optional (default:
True)) – If True, the vertices of the quadrangles are ordered counterclockwise in the \((\theta, h)\) plane, otherwise clockwise.close (bool, optional (default:
False)) – If True, the mesh is closed along \(\theta\).uv_layout (Integral, optional (default:
0)) – The UV mapping strategy, between 0 and 7 (seepysdic.create_uniform_quadrangle_4_mesh()).
- Returns:
The
quadrangle_4mesh, with a UV map.- Return type: