Stiffened Panel Bay (compmech.stiffpanelbay)#

Main features:

  • possibility to use many panels with different properties. In such case the panels are separated by their \(y\) (circumferential) coordinate. Usually there is a stiffener positioned at the \(y\) coordinate between two panels.

  • possibility to use stiffeners (blade) modeled with 1D or 2D formulation.

class compmech.stiffpanelbay.StiffPanelBay[source]#

Stiffened Panel Bay

Can be used for supersonic Aeroelastic studies with the Piston Theory.

Stiffeners are modeled either with 1D or 2D formulations.

Main characteristics:

  • Supports both airflows along x (axis) or y (circumferential). Controlled by the parameter flow

  • bladestiff1ds contains the BladeStiff1D stiffeners

  • bladestiff2ds contains the BladeStiff2D stiffeners

  • tstiff2ds contains the TStiff2D stiffeners

Methods

add_bladestiff1d(ys[, mu, bb, bstack, ...])

Add a new BladeStiff1D to the current panel bay

add_bladestiff2d(ys[, mu, bb, bstack, ...])

Add a new BladeStiff2D to the current panel bay

add_panel(y1, y2[, stack, plyts, plyt, ...])

Add a new panel to the current panel bay

add_tstiff2d(ys[, mu, bb, bstack, bplyts, ...])

Add a new TStiff2D to the current panel bay

calc_fext([silent])

Calculates the external force vector \(\{F_{ext}\}\)

get_size()

Calculate the size of the stiffness matrices

plot_skin(c[, invert_y, plot_type, vec, ...])

Contour plot for a Ritz constants vector.

plot_stiffener(c, si[, region, invert_y, ...])

Contour plot for a Ritz constants vector.

save()

Save the StiffPanelBay object using pickle

uvw_skin(c[, xs, ys, gridx, gridy])

Calculate the displacement field

uvw_stiffener(c, si[, region, xs, ys, ...])

Calculate the displacement field on a stiffener

calc_cA

calc_k0

calc_kA

calc_kG0

calc_kM

add_bladestiff1d(ys, mu=None, bb=None, bstack=None, bplyts=None, bplyt=None, blaminaprops=None, blaminaprop=None, bf=None, fstack=None, fplyts=None, fplyt=None, flaminaprops=None, flaminaprop=None, **kwargs)[source]#

Add a new BladeStiff1D to the current panel bay

Parameters:
ysfloat

Stiffener position.

mufloat, optional

Stiffener’s material density. If not given the bay density will be used.

bbfloat, optional

Stiffener base width.

bstacklist, optional

Stacking sequence for the stiffener base laminate.

bplytslist, optional

Thicknesses for each stiffener base ply.

bplytfloat, optional

Unique thickness for all stiffener base plies.

blaminapropslist, optional

Lamina properties for each stiffener base ply.

blaminapropfloat, optional

Unique lamina properties for all stiffener base plies.

bffloat

Stiffener flange width.

fstacklist, optional

Stacking sequence for the stiffener flange laminate.

fplytslist, optional

Thicknesses for each stiffener flange ply.

fplytfloat, optional

Unique thickness for all stiffener flange plies.

flaminapropslist, optional

Lamina properties for each stiffener flange ply.

flaminapropfloat, optional

Unique lamina properties for all stiffener flange plies.

Returns:
sBladeStiff1D object

Notes

Additional parameters can be passed using the kwargs.

add_bladestiff2d(ys, mu=None, bb=None, bstack=None, bplyts=None, bplyt=None, blaminaprops=None, blaminaprop=None, bf=None, fstack=None, fplyts=None, fplyt=None, flaminaprops=None, flaminaprop=None, mf=14, nf=11, **kwargs)[source]#

Add a new BladeStiff2D to the current panel bay

Parameters:
ysfloat

Stiffener position.

mufloat, optional

Stiffener’s material density. If not given the bay density will be used.

bbfloat, optional

Stiffener base width.

bstacklist, optional

Stacking sequence for the stiffener base laminate.

bplytslist, optional

Thicknesses for each stiffener base ply.

bplytfloat, optional

Unique thickness for all stiffener base plies.

blaminapropslist, optional

Lamina properties for each stiffener base ply.

blaminapropfloat, optional

Unique lamina properties for all stiffener base plies.

bffloat

Stiffener flange width.

fstacklist, optional

Stacking sequence for the stiffener flange laminate.

fplytslist, optional

Thicknesses for each stiffener flange ply.

fplytfloat, optional

Unique thickness for all stiffener flange plies.

flaminapropslist, optional

Lamina properties for each stiffener flange ply.

flaminapropfloat, optional

Unique lamina properties for all stiffener flange plies.

mfint, optional

Number of approximation terms for flange, along \(x\).

nfint, optional

Number of approximation terms for flange, along \(y\).

Returns:
sBladeStiff2D object

Notes

Additional parameters can be passed using the kwargs.

add_panel(y1, y2, stack=None, plyts=None, plyt=None, laminaprops=None, laminaprop=None, model=None, mu=None, **kwargs)[source]#

Add a new panel to the current panel bay

Parameters:
y1float

Position of the first panel edge along \(y\).

y2float

Position of the second panel edge along \(y\).

stacklist, optional

Panel stacking sequence. If not given the stacking sequence of the bay will be used.

plytslist, optional

Thicknesses for each panel ply. If not supplied the bay plyts attribute will be used.

plytfloat, optional

Unique thickness to be used for all panel plies. If not supplied the bay plyt attribute will be used.

laminapropslist, optional

Lamina properties for each panel ply.

laminaproplist, optional

Unique lamina properties for all panel plies.

modelstr, optional

Not recommended to pass this parameter, but the user can use a different model for each panel. It is recommended to defined model for the bay object.

mufloat, optional

Panel material density. If not given the bay density will be used.

Notes

Additional parameters can be passed using the kwargs.

add_tstiff2d(ys, mu=None, bb=None, bstack=None, bplyts=None, bplyt=None, blaminaprops=None, blaminaprop=None, bf=None, fstack=None, fplyts=None, fplyt=None, flaminaprops=None, flaminaprop=None, mb=12, nb=13, mf=11, nf=12, Nxxf=0.0, **kwargs)[source]#

Add a new TStiff2D to the current panel bay

Parameters:
ysfloat

Stiffener position.

mufloat, optional

Stiffener’s material density. If not given the bay density will be used.

bbfloat, optional

Stiffener base width.

bstacklist, optional

Stacking sequence for the stiffener base laminate.

bplytslist, optional

Thicknesses for each stiffener base ply.

bplytfloat, optional

Unique thickness for all stiffener base plies.

blaminapropslist, optional

Lamina properties for each stiffener base ply.

blaminapropfloat, optional

Unique lamina properties for all stiffener base plies.

bffloat

Stiffener flange width.

fstacklist, optional

Stacking sequence for the stiffener flange laminate.

fplytslist, optional

Thicknesses for each stiffener flange ply.

fplytfloat, optional

Unique thickness for all stiffener flange plies.

flaminapropslist, optional

Lamina properties for each stiffener flange ply.

flaminapropfloat, optional

Unique lamina properties for all stiffener flange plies.

mbint, optional

Number of approximation terms for base, along \(x\).

nbint, optional

Number of approximation terms for base, along \(y\).

mfint, optional

Number of approximation terms for flange, along \(x\).

nfint, optional

Number of approximation terms for flange, along \(y\).

Returns:
sTStiff2D object

Notes

Additional parameters can be passed using the kwargs.

calc_fext(silent=False)[source]#

Calculates the external force vector \(\{F_{ext}\}\)

Parameters:
silentbool, optional

A boolean to tell whether the msg messages should be printed.

Returns:
fextnp.ndarray

The external force vector

get_size()[source]#

Calculate the size of the stiffness matrices

The size of the stiffness matrices can be interpreted as the number of rows or columns, recalling that this will be the size of the Ritz constants’ vector \(\{c\}\), the internal force vector \(\{F_{int}\}\) and the external force vector \(\{F_{ext}\}\).

It takes into account the independent degrees of freedom from each of the \(.Stiffener2D\) objects that belong to the current assembly.

Returns:
sizeint

The size of the stiffness matrices.

plot_skin(c, invert_y=False, plot_type=1, vec='w', deform_u=False, deform_u_sf=100.0, filename='', ax=None, figsize=(3.5, 2.0), save=True, title='', colorbar=False, cbar_nticks=2, cbar_format=None, cbar_title='', cbar_fontsize=10, aspect='equal', clean=True, dpi=400, texts=[], xs=None, ys=None, gridx=300, gridy=300, num_levels=400, vecmin=None, vecmax=None, silent=False)[source]#

Contour plot for a Ritz constants vector.

Parameters:
cnp.ndarray

The Ritz constants that will be used to compute the field contour.

vecstr, optional

Can be one of the components:

  • Displacement: 'u', 'v', 'w', 'phix', 'phiy'

  • Strain: 'exx', 'eyy', 'gxy', 'kxx', 'kyy', 'kxy', 'gyz', 'gxz'

  • Stress: 'Nxx', 'Nyy', 'Nxy', 'Mxx', 'Myy', 'Mxy', 'Qy', 'Qx'

deform_ubool, optional

If True the contour plot will look deformed.

deform_u_sffloat, optional

The scaling factor used to deform the contour.

invert_ybool, optional

Inverts the \(y\) axis of the plot. It may be used to match the coordinate system of the finite element models created using the desicos.abaqus module.

plot_typeint, optional

For cylinders only 4 and 5 are valid. For cones all the following types can be used:

  • 1: concave up (with invert_y=False) (default)

  • 2: concave down (with invert_y=False)

  • 3: stretched closed

  • 4: stretched opened (\(r \times y\) vs. \(a\))

  • 5: stretched opened (\(y\) vs. \(a\))

savebool, optional

Flag telling whether the contour should be saved to an image file.

dpiint, optional

Resolution of the saved file in dots per inch.

filenamestr, optional

The file name for the generated image file. If no value is given, the \(name\) parameter of the StiffPanelBay object will be used.

axAxesSubplot, optional

When ax is given, the contour plot will be created inside it.

figsizetuple, optional

The figure size given by (width, height).

titlestr, optional

If any string is given it is added as title to the contour plot.

colorbarbool, optional

If a colorbar should be added to the contour plot.

cbar_nticksint, optional

Number of ticks added to the colorbar.

cbar_format[ None | format string | Formatter object ], optional

See the matplotlib.pyplot.colorbar documentation.

cbar_fontsizeint, optional

Fontsize of the colorbar labels.

cbar_titlestr, optional

Colorbar title. If cbar_title == '' no title is added.

aspectstr, optional

String that will be passed to the AxesSubplot.set_aspect() method.

cleanbool, optional

Clean axes ticks, grids, spines etc.

xsnp.ndarray, optional

The \(x\) positions where to calculate the displacement field. Default is None and the method _default_field is used.

ysnp.ndarray, optional

The y positions where to calculate the displacement field. Default is None and the method _default_field is used.

gridxint, optional

Number of points along the \(x\) axis where to calculate the displacement field.

gridyint, optional

Number of points along the \(y\) where to calculate the displacement field.

num_levelsint, optional

Number of contour levels (higher values make the contour smoother).

vecminfloat, optional

Minimum value for the contour scale (useful to compare with other results). If not specified it will be taken from the calculated field.

vecmaxfloat, optional

Maximum value for the contour scale.

silentbool, optional

A boolean to tell whether the msg messages should be printed.

Returns:
axmatplotlib.axes.Axes

The Matplotlib object that can be used to modify the current plot if needed.

plot_stiffener(c, si, region='flange', invert_y=False, plot_type=1, vec='w', deform_u=False, deform_u_sf=100.0, filename='', ax=None, figsize=(3.5, 2.0), save=True, title='', colorbar=False, cbar_nticks=2, cbar_format=None, cbar_title='', cbar_fontsize=10, aspect='equal', clean=True, dpi=400, texts=[], xs=None, ys=None, gridx=300, gridy=300, num_levels=400, vecmin=None, vecmax=None, silent=False)[source]#

Contour plot for a Ritz constants vector.

Parameters:
cnp.ndarray

The Ritz constants that will be used to compute the field contour.

siint

Stiffener index.

regionstr, optional

Stiffener region (‘base’, ‘flange’ etc).

vecstr, optional

Can be one of the components:

  • Displacement: 'u', 'v', 'w', 'phix', 'phiy'

  • Strain: 'exx', 'eyy', 'gxy', 'kxx', 'kyy', 'kxy', 'gyz', 'gxz'

  • Stress: 'Nxx', 'Nyy', 'Nxy', 'Mxx', 'Myy', 'Mxy', 'Qy', 'Qx'

deform_ubool, optional

If True the contour plot will look deformed.

deform_u_sffloat, optional

The scaling factor used to deform the contour.

invert_ybool, optional

Inverts the \(y\) axis of the plot. It may be used to match the coordinate system of the finite element models created using the desicos.abaqus module.

plot_typeint, optional

For cylinders only 4 and 5 are valid. For cones all the following types can be used:

  • 1: concave up (with invert_y=False) (default)

  • 2: concave down (with invert_y=False)

  • 3: stretched closed

  • 4: stretched opened (\(r \times y\) vs. \(a\))

  • 5: stretched opened (\(y\) vs. \(a\))

savebool, optional

Flag telling whether the contour should be saved to an image file.

dpiint, optional

Resolution of the saved file in dots per inch.

filenamestr, optional

The file name for the generated image file. If no value is given, the \(name\) parameter of the StiffPanelBay object will be used.

axAxesSubplot, optional

When ax is given, the contour plot will be created inside it.

figsizetuple, optional

The figure size given by (width, height).

titlestr, optional

If any string is given it is added as title to the contour plot.

colorbarbool, optional

If a colorbar should be added to the contour plot.

cbar_nticksint, optional

Number of ticks added to the colorbar.

cbar_format[ None | format string | Formatter object ], optional

See the matplotlib.pyplot.colorbar documentation.

cbar_fontsizeint, optional

Fontsize of the colorbar labels.

cbar_titlestr, optional

Colorbar title. If cbar_title == '' no title is added.

aspectstr, optional

String that will be passed to the AxesSubplot.set_aspect() method.

cleanbool, optional

Clean axes ticks, grids, spines etc.

xsnp.ndarray, optional

The \(x\) positions where to calculate the displacement field. Default is None and the method _default_field is used.

ysnp.ndarray, optional

The y positions where to calculate the displacement field. Default is None and the method _default_field is used.

gridxint, optional

Number of points along the \(x\) axis where to calculate the displacement field.

gridyint, optional

Number of points along the \(y\) where to calculate the displacement field.

num_levelsint, optional

Number of contour levels (higher values make the contour smoother).

vecminfloat, optional

Minimum value for the contour scale (useful to compare with other results). If not specified it will be taken from the calculated field.

vecmaxfloat, optional

Maximum value for the contour scale.

silentbool, optional

A boolean to tell whether the msg messages should be printed.

Returns:
axmatplotlib.axes.Axes

The Matplotlib object that can be used to modify the current plot if needed.

save()[source]#

Save the StiffPanelBay object using pickle

Notes

The pickled file will have the name stored in :property:`.StiffPanelBay.name` followed by a '.StiffPanelBay' extension.

uvw_skin(c, xs=None, ys=None, gridx=300, gridy=300)[source]#

Calculate the displacement field

For a given full set of Ritz constants c, the displacement field is calculated and stored in the parameters u, v, w, phix, phiy of the StiffPanelBay object.

Parameters:
cfloat

The full set of Ritz constants

xsnp.ndarray

The \(x\) positions where to calculate the displacement field. Default is None and the method _default_field is used.

ysnp.ndarray

The y positions where to calculate the displacement field. Default is None and the method _default_field is used.

gridxint

Number of points along the \(x\) axis where to calculate the displacement field.

gridyint

Number of points along the \(y\) where to calculate the displacement field.

Returns:
outtuple

A tuple of np.ndarrays containing (u, v, w, phix, phiy).

Notes

The returned values u`, v, w, phix, phiy are stored as parameters with the same name in the StiffPanelBay object.

uvw_stiffener(c, si, region='flange', xs=None, ys=None, gridx=300, gridy=300)[source]#

Calculate the displacement field on a stiffener

For a given full set of Ritz constants c, the displacement field is calculated and stored in the parameters u, v, w, phix, phiy of the StiffPanelBay object.

Parameters:
cfloat

The full set of Ritz constants

siint

Stiffener index.

regionstr, optional

Stiffener region (‘base’, ‘flange’ etc).

xsnp.ndarray

The \(x\) positions where to calculate the displacement field. Default is None and the method _default_field is used.

ysnp.ndarray

The y positions where to calculate the displacement field. Default is None and the method _default_field is used.

gridxint

Number of points along the \(x\) axis where to calculate the displacement field.

gridyint

Number of points along the \(y\) where to calculate the displacement field.

Returns:
outtuple

A tuple of np.ndarrays containing (u, v, w, phix, phiy).

Notes

The returned values u`, v, w, phix, phiy are stored as parameters with the same name in the StiffPanelBay object.