AeroGridMap¶

class sharpy.linear.src.gridmapping.AeroGridMap(M: number of chord-wise, N: number of span-wise)[source]

Produces mapping between panels, segment and vertices of a surface. Grid elements are identified through the indices (m,n), where:

• m: chordwise index

• n: spanwise index

The same indexing is applied to panel, vertices and segments.

Elements: - panels=(M,N) - vertices=(M+1,N+1) - segments: these are divided in segments developing along the chordwise and spanwise directions.

• chordwise: (M,N+1)

• spanwise: (M+1,N)

Mapping structures: - Mpv: for each panel (mp,np) returns the chord/span-wise indices of its vertices, (mv,nv). This has size (M,N,4,2) - Mps: maps each panel (mp,np) to the ii-th segment. This has size (M,N,4,2)

# - Mps_extr: for each panel (m,n) returns the indices of the extrema of each side # of the panel.

Note: - mapping matrices are stored as np.int16 or np.int32 arrays

from_panel_to_segments(m: chordwise index, n: spanwise index)[source]

For each panel (m,n) it provides the ms,ns indices of each segment.

from_panel_to_vertices(m: chordwise index, n: spanwise index)[source]

From panel of indices (m,n) to indices of vertices

from_vertex_to_panel(m: chordwise index, n: spanwise index)[source]

Returns the panel for which the vertex is locally numbered as 0,1,2,3. Returns a (4,2) array such that its elements are:

[vv_local,(m,n) of panel]

where vv_local is the local verteix number.

Important: indices -1 are possible is the vertex does not have local index 0,1,2 or 3 with respect to any panel.

map_panels_to_segments()[source]

Mapping from panel of segments. self.Mpv is a (M,N,4,2) array such that:

[m, n, local_segment_number,

chordwise/spanwise index of segment,]

map_panels_to_vertices()[source]

Mapping from panel of vertices. self.Mpv is a (M,N,4,2) array such that its element are:

[m, n, local_vertex_number, spanwise/chordwise indices of vertex]

map_panels_to_vertices_1D_scalar()[source]

Mapping: - FROM: the index of a scalar quantity defined at panel collocation point and stored in 1D array. - TO: index of a scalar quantity defined at vertices and stored in 1D

The Mpv1d_scalar has size (K,4) where:

[1d index of panel, index of vertex 0,1,2 or 3]

map_vertices_to_panels()[source]

Maps from vertices to panels. Produces a (M+1,N+1,4,2) array, associating vertices to panels. Its elements are:

[m vertex,
n vertex,
vertex local index,

chordwise/spanwise panel indices]

map_vertices_to_panels_1D_scalar()[source]

Mapping: - FROM: the index of a scalar quantity defined at vertices and stored in 1D array. - TO: index of a scalar quantity defined at panels and stored in 1D

The Mpv1d_scalar has size (Kzeta,4) where:

[1d index of vertex, index of vertex 0,1,2 or 3 w.r.t. panel]