Composipy Classes#

This page contains Composipy classes, used to build the main instances of the package.

OrthotropicMaterial#

class composipy.OrthotropicMaterial(e1, e2, v12, g12, thickness, t1=0, c1=0, t2=0, c2=0, s=0, name=None)[source]#

Creates an OrthotropicMaterial object.

Parameters
  • e1 (float, int) – Young modulus in the 1st direction

  • e2 (float, int) – Young modulus in the 2nd direction

  • v12 (float) – poisson modulus 12

  • g12 (float, int) – Shear modulus

  • thickness (float, int) – thickness of the ply

  • t1 (float, optional, default None) – tension allowable in direction 1.

  • c1 (float, optional, default None) – compression allowable in direction 1.

  • t2 (float, optional, default None) – tension allowable in direction 2.

  • c2 (float, optional, default None) – compression allowable in direction 2.

  • s (float, optional, default None) – shear allowable.

  • name (str, optional, default None) – Name of the ply

Examples

>>> from composipy import OrthotropicMaterial
>>> ply_1 = OrthotropicMaterial(129500, 9370, 0.38, 5240, 0.2)
>>> ply_1.Q_0 # get the compliance matrix of the lamina
Out:
array([[130867.31382151,   3598.19426713,      0.     ],
    [  3598.19426713,   9468.93228191,      0.        ],
    [     0.        ,      0.        ,   5240.        ]])
Invariants()[source]#

Get the material invariants

Returns

Invariants – array([U1, U2, U3, U4, U5])

Return type

numpy.ndarray

property Q_0#

Get the compliance matrix of the material.

Returns

self.Q_0 – Compliance matrix (3x3) of the Material

Return type

numpy.ndarray

LaminateProperty#

class composipy.LaminateProperty(stacking, plies)[source]#

This class creates laminate object. It needs Material objects (to define plies) and the angle information. Some formulation characteristics are: Laminate formulations ares used (see References) Main reference is the chapter 4 of reference 2.

Parameters
  • stacking (list or dict) –

    To define a angle stacking sequence

    An iterable containing the angles (in degrees) of layup.

    To define a stack based on lamination parameters.

    {xiA: [xiA1, xiA2, xiA3, xiA4], xiB: [xiB1, xiB2, xiB3, xiB4], xiD: [xiD1, xiD2, xiD3, xiD4], T: thickness}

  • plies (Material or list) – A single Material or a list of OrthotropicMaterial object

Example

>>> from composipy import OrthotropicMaterial, LaminateProperty
>>> ply_1 = OrthotropicMaterial(129500, 9370, 0.38, 5240, 0.2)
>>> stacking = [90, 0, 90]
>>> laminate_1 = Laminate(stacking, ply_1)
>>> laminate_1.ABD # retunrs an array containing bending stiffness matrix [D] of the laminate
>>> laminate_1.xiA # lamination parameters of extension
>>> laminate_1.xiA # lamination parameters of bending

Example

>>> stacking = {'xiD': [0., 0., -1., 0.], 'T': 1.0} #using lamination parameters to define D
>>> laminate_2 = Laminate(stacking, ply_1)
>>> laminate_2.ABD # retunrs an array containing bending stiffness matrix [D] of the laminate
>>> laminate_2.xiA # lamination parameters of extension
>>> laminate_2.xiA # lamination parameters of bending
property A#

[A] Matrix as numpy.ndarray

property ABD#

[ABD] Matrices as numpy.ndarray

property B#

[B] Matrix as numpy.ndarray

Note

Matrix [B] will be zero if defined using lamination parameters.

property D#

[D] Matrix as numpy.ndarray

property xiA#

Lamination parameter xiA

property xiD#

Lamination parameter xiD

PlateStructure#

class composipy.PlateStructure(dproperty, a, b, constraints={'x0': ['TX', 'TY', 'TZ'], 'xa': ['TX', 'TY', 'TZ'], 'y0': ['TX', 'TY', 'TZ'], 'yb': ['TX', 'TY', 'TZ']}, Nxx=0, Nyy=0, Nxy=0, m=10, n=10)[source]#

This class defines a PlateStructure.

Parameters
  • dproperty (composipy.Property) – Property of the plate.

  • a (float) – Size of the plate parallel to the x axis.

  • b (float) – Size of the plate parallel to the y axis.

  • constraints (str or dict. Default: "PINNED") – Plate boundary conditions.

  • Nxx (float, default 0) – Linear force parallel x axis

  • Nyy (float, default 0) – Linear force parallel y axis

  • Nxy (float, default 0) – Linear shear force

  • m (int, default 10) – Size of shape function along x axis

  • n (int, default 10) – Size of shape function along y axis

Example

>>> from composipy import OrthotropicMaterial, LaminateProperty, PlateStructure
>>> ply_1 = OrthotropicMaterial(129500, 9370, 0.38, 5240, 0.2)
>>> stacking = [90, 0, 90]
>>> laminate = Laminate(stacking, ply_1)
>>> constraints

Note

The constraint argument can be a str type ‘PINNED’ or ‘CLAMPED’. Or a dictionary like described below:

>>> constraints = {
---     x0 = ['TX', 'TY', 'TZ', 'RX', 'RY', 'RZ']
---     xa = ['TX', 'TY', 'TZ', 'RX', 'RY', 'RZ']
---     y0 = ['TX', 'TY', 'TZ', 'RX', 'RY', 'RZ']
---     yb = ['TX', 'TY', 'TZ', 'RX', 'RY', 'RZ']
--- }

Attention, the rotations aren’t considered around the axis. They are related to the shape function. That means, for example, the RZ turns around the x axis and moves the plate in z direction.

buckling_analysis(silent=True, num_eigvalues=5)[source]#

Linear Buckling Analysis

Parameters
  • silent (bool, optional) – Prints time to compute calculation

  • num_eigvalues (int, optional) – Number of calculated eigenvalues.

Return type

eigvals, eigvecs

calc_K_KG_ABD()[source]#

Calculates the stiffness and geometrical stifness matrices. Considers full ABD matrix.

Returns

K_KG – A tuple of array containing (K, KG)

Return type

tuple

calc_K_KG_D()[source]#

Calculates the stiffness and geometrical stifness matrices. Considers only the bending stiffness D matrix.

Returns

K_KG – A tuple of array containing (K, KG)

Return type

tuple

LaminateStrength#

class composipy.LaminateStrength(dproperty, Nxx=0, Nyy=0, Nxy=0, Mxx=0, Myy=0, Mxy=0)[source]#

Creates a LaminateStrength object to evaluate strength. The class is capable of calculating strain and stress at the midplane, as well as ply-by-ply at the top and bottom, both in the laminate and material directions.

Parameters
  • dproperty (LaminateProperty) – A laminate property object

  • Nxx (float, int, optional, default 0) – Membrane load in x direction.

  • Nyy (float, int, optional, default 0) – Membrane load in y direction.

  • Nxy (float, int, optional, default 0) – Membrane load in xy direction.

  • Mxx (float, int, optional, default 0) – Moment in x direction.

  • Myy (float, int, optional, default 0) – Moment in y direction.

  • Mxy (float, int, optional, default 0) – Moment in xy direction.

calculate_strain()[source]#

Calculates strain ply by at laminate direction and material direction.

Returns

strains – ply by ply strains in plate direction and material direction

Return type

pd.Dataframe

calculate_stress()[source]#

Calculates stress ply by at laminate direction and material direction.

Returns

stress – ply by ply stress in plate direction and material direction

Return type

pd.Dataframe

epsilon0()[source]#

Calculates the strains of the laminate

Returns

epsilon0 – [epsilonx0, epsilony0, epsilonxy0, kappax0, kappay0, kappaxy0]

Return type

numpy ndarray