composites API (composites)#

The composites module includes functions used to calculate properties and perform analysis on laminated composites and isotropic plates.

Classical and first-order shear deformation theories are supported. For classical plate theories or classical laminated plate theories (CLPT), the relevant matrices are A, B, D, whereas for the first-order shear deformation theories (FSDT) the matrices are A, B, D, E. All these matrices are part of the Laminate object.

For isotropic plates, the Laminate object is also used for convenience, and since offsetting the mid-surface is supported, there can be an extension-bending coupling (B matrix) different than zero even for isotropic plates.

The most convenient usage is probably with the composites.utils.isotropic_plate() or the composites.utils.laminated_plate() functions:

from composites import laminated_plate

laminaprop = (E11, E22, nu12, G12, G13, G23)
plyt = ply_thickness
stack = [0, 90, +45, -45]
plate = laminated_plate(stack, plyt=plyt, laminaprop=laminaprop)

and with the composites.utils.isotropic_plate() function:

from composites import isotropic_plate

plate = isotropic_plate(thickness=5., E=E, nu=nu)

Where the laminate stiffness matrix, the often called ABD matrix, with shape=(6, 6), can be accessed using:

>>> plate.ABD

and when transverse shear stiffnesses are required, the ABDE matrix, with shape=(8, 8):

>>> plate.ABDE

Composites Core Module (composites.core)#

class composites.core.GradABDE#

Container to store the gradients of the ABDE matrices with respect to the lamination parameters

Attributes:
gradAij, gradBij, gradDij, gradEijtuple of 2D np.array objects

The shapes of these gradient matrices are:

gradAij: (6, 5) gradBij: (6, 5) gradDij: (6, 5) gradEij: (3, 3)

They contain the gradients of each laminate stiffness with respect to the thickness and respective lamination parameters. The rows and columns correspond to:

Methods

calc_LP_grad(thickness, mat, lp)

Gradients of the shell stiffnesses with respect to the thickness and lamination parameters

calc_LP_grad(thickness, mat, lp)#

Gradients of the shell stiffnesses with respect to the thickness and lamination parameters

Parameters:
thicknessfloat

The total thickness of the laminate

matMatLamina object

Material object

lpLaminationParameters object

The container class with all lamination parameters already defined

Returns:
None

The attributes of the object are updated.

class composites.core.Lamina#
Attributes:
plyidint

Identificaiton of the composite lamina

matlaminaMatLamina object

A MatLamina object

hfloat

Ply thickness

thetadegfloat

Ply angle in degrees

Methods

get_constitutive_matrix()

Return the constitutive matrix

get_transf_matrix_displ_to_laminate()

Return displacement transformation matrix from lamina to laminate

get_transf_matrix_stress_to_lamina()

Return stress transformation matrix from laminate to lamina

get_transf_matrix_stress_to_laminate()

Return stress transformation matrix from lamina to laminate

rebuild()

Update constitutive matrices

get_constitutive_matrix()#

Return the constitutive matrix

get_transf_matrix_displ_to_laminate()#

Return displacement transformation matrix from lamina to laminate

get_transf_matrix_stress_to_lamina()#

Return stress transformation matrix from laminate to lamina

get_transf_matrix_stress_to_laminate()#

Return stress transformation matrix from lamina to laminate

rebuild()#

Update constitutive matrices

Reference:

Reddy, J. N., Mechanics of Laminated Composite Plates and Shells - Theory and Analysys. Second Edition. CRC PRESS, 2004.

class composites.core.Laminate#
Attributes:
plieslist

List of plies

stacklist

List of angles for each ply

hfloat

Total thickness of the laminate

offsetfloat

Offset at the normal direction

e1, e2float

Equivalent laminate moduli in directions 1 and 2

g12float

Equivalent laminate shear modulus in the 12 direction

nu12, nu21float

Equivalent laminate Poisson ratios in the 12 and 21 directions

scf_k13, scf_k23float

Shear correction factor in the 13 and 23 directions

intrhofloat

Integral \(\int_{-h/2+offset}^{+h/2+offset} \rho(z) dz\), used in equivalent single layer finite element mass matrices

intrhozfloat

Integral \(\int_{-h/2+offset}^{+h/2+offset} \rho(z)z dz\), used in equivalent single layer finite element mass matrices

intrhoz2float

Integral \(\int_{-h/2+offset}^{+h/2+offset} \rho(z)z^2 dz\), used in equivalent single layer finite element mass matrices

Methods

calc_constitutive_matrix()

Calculate the laminate constitutive terms

calc_equivalent_properties()

Calculate the equivalent laminate properties

calc_lamination_parameters()

Calculate the lamination parameters.

calc_scf()

Update shear correction factors of the Laminate object

make_balanced()

Make a balanced laminate

make_orthotropic()

Make an orthotropic laminate

make_smeared()

Make a laminated with smeared properties

make_symmetric()

Make a symmetric laminate

calc_constitutive_matrix()#

Calculate the laminate constitutive terms

This is the commonly called ABD matrix with shape=(6, 6) when the classical laminated plate theory is used, or the ABDE matrix when the first-order shear deformation theory is used, containing the transverse shear terms.

calc_equivalent_properties()#

Calculate the equivalent laminate properties

The following attributes are updated:

e1, e2, g12, `u12, nu21

calc_lamination_parameters()#

Calculate the lamination parameters.

The following attributes are calculated:

xiA, xiB, xiD, xiE

calc_scf()#

Update shear correction factors of the Laminate object

Reference:

Vlachoutsis, S. “Shear correction factors for plates and shells”, Int. Journal for Numerical Methods in Engineering, Vol. 33, 1537-1552, 1992.

http://onlinelibrary.wiley.com/doi/10.1002/nme.1620330712/full

Using “one shear correction factor” (see reference), assuming:

  • constant G13, G23, E1, E2, nu12, nu21 within each ply

  • g1 calculated using z at the middle of each ply

  • zn1 = Laminate offset attribute

Returns:
k13, k23tuple

Shear correction factors. Also updates attributes: scf_k13 and scf_k23.

make_balanced()#

Make a balanced laminate

The attributes \(A_{16}\), \(A_{26}\), \(B_{16}\), \(B_{26}\) are set to zero to make a balanced laminate.

make_orthotropic()#

Make an orthotropic laminate

The attributes \(A_{16}\), \(A_{26}\), \(B_{16}\), \(B_{26}\), \(D_{16}\), \(D_{26}\) are set to zero to make an orthotropic laminate.

make_smeared()#

Make a laminated with smeared properties

The \(B_{ij}\) terms of the constitutive matrix are set to zero.

The \(D_{ij}\) terms are calculated from the membrane terms \(A_{ij}\) according to \(D_{ij} = (h^2 A_{ij})/12\), where \(h\) is the laminate thickness.

make_symmetric()#

Make a symmetric laminate

The \(B_{ij}\) terms of the constitutive matrix are set to zero.

class composites.core.LaminationParameters#

Lamination parameters

Attributes:
xiA1, xiA2, xiA3, xiA4float

Lamination parameters \(\xi_{Ai}\) (in-plane)

xiB1, xiB2, xiB3, xiB4float

Lamination parameters \(\xi_{Bi}\) (in-plane coupling with bending)

xiD1, xiD2, xiD3, xiD4float

Lamination parameters \(\xi_{Di}\) (bending)

xiE1, xiE2float

Lamination parameters \(\xi_{Ei}\) (transverse shear)

class composites.core.MatLamina#

Orthotropic material lamina

Attributes:
e1float

Young Modulus in direction 1

e2float

Young Modulus in direction 2

g12float

in-plane shear modulus

g13float

transverse shear modulus for plane 1-Z

g23float

transverse shear modulus for plane 2-Z

nu12

Poisson’s ratio 12

nu13

Poisson’s ratio 13

nu23

Poisson’s ratio 23

nu21

Poisson’s ratio 21: use formula nu12/e1 = nu21/e2

nu31

Poisson’s ratio 31: use formula nu31/e3 = nu13/e1

nu32

Poisson’s ratio 32: use formula nu23/e2 = nu32/e3

rho

especific mass (mass / volume)

a1

thermal expansion coeffiecient in direction 1

a2

thermal expansion coeffiecient in direction 2

a3

thermal expansion coeffiecient in direction 3

tref

reference temperature

st1,st2

allowable tensile stresses for directions 1 and 2

sc1,sc2

allowable compressive stresses for directions 1 and 2

ss12

allowable in-plane stress for shear

q11

lamina constitutive constant 11

q12

lamina constitutive constant 12

q13

lamina constitutive constant 13

q21

lamina constitutive constant 21

q22

lamina constitutive constant 22

q23

lamina constitutive constant 23

q31

lamina constitutive constant 31

q32

lamina constitutive constant 32

q33

lamina constitutive constant 33

q44

lamina constitutive constant 44

q55

lamina constitutive constant 55

q66

lamina constitutive constant 66

ci

lamina stiffness constants

ui

lamina material invariants

Methods

get_constitutive_matrix()

Return the constitutive matrix

get_invariant_matrix()

Return the invariant matrix

rebuild()

Update constitutive and invariant terms

trace_normalize_plane_stress()

Trace-normalize the lamina properties for plane stress

Notes

For isotropic materials when the user defines \(\nu\) and \(E\), \(G\) will be recaculated based on equation: \(G = E/(2 \times (1+\nu))\); in a lower priority if the user defines \(\nu\) and \(G\), \(E\) will be recaculated based on equation: \(E = 2 \times (1+\nu) \times G\).

get_constitutive_matrix()#

Return the constitutive matrix

get_invariant_matrix()#

Return the invariant matrix

rebuild()#

Update constitutive and invariant terms

Reference:

Reddy, J. N., Mechanics of laminated composite plates and shells. Theory and analysis. Second Edition. CRC Press, 2004.

trace_normalize_plane_stress()#

Trace-normalize the lamina properties for plane stress

Modify the original MatLamina object with a trace-normalization performed after calculating the trace according to Eq. 1 of reference:

Melo, J. D. D., Bi, J., and Tsai, S. W., 2017, “A Novel Invariant-Based Design Approach to Carbon Fiber Reinforced Laminates,” Compos. Struct., 159, pp. 44–52.

The trace calculated as \(tr = Q_{11} + Q_{22} + 2Q_{66}\). The universal in-plane stress stiffness components \(Q_{11},Q_{12},Q_{22},Q_{44},Q_{55},Q_{66}\) are divided by \(tr\), and the invariants \(U_1,U_2,U_3,U_4,U_5,U_6,U_7\) are calculated with the normalized stiffnesses, such they also become trace-normalized invariants. These can be accessed using the u1,u2,u3,u4,u5,u6,u7 attributes.

composites.core.laminate_from_LaminationParameters(thickness, mat, lp)#

Return a Laminate object based in the thickness, material and lamination parameters

Parameters:
thicknessfloat

The total thickness of the laminate

matMatLamina object

Material object

lpLaminationParameters object

The container class with all lamination parameters already defined

Returns:
lamLaminate

laminate with the ABD and ABDE matrices already calculated

composites.core.laminate_from_lamination_parameters(thickness, matlamina, xiA1, xiA2, xiA3, xiA4, xiB1, xiB2, xiB3, xiB4, xiD1, xiD2, xiD3, xiD4, xiE1=0.0, xiE2=0.0)#

Return a Laminate object based in the thickness, material and lamination parameters

Note that \(\xi_{E1}\) and \(\xi_{E2}\) are optional and usually equal to zero, becoming important only when the transverse shear modulus is different in the two directions, i.e. when \(G_{13} \ne G{23}\).

Parameters:
thicknessfloat

The total thickness of the laminate

matlaminaMatLamina object

Material object

xiAj, xiBj, xiDj, xiEjfloat

The 14 lamination parameters according to the first-order shear deformation theory: \(\xi_{A1} \cdots \xi_{A4}\), \(\xi_{B1} \cdots \xi_{B4}\), \(\xi_{D1} \cdots \xi_{D4}\), \(\xi_{E1}\) and \(\xi_{E2}\)

Returns:
lamLaminate

laminate with the ABD and ABDE matrices already calculated

composites.core.make_balanced_LP(lp)#

Make balanced lamination parameters

The lamination parameters \(\xi_{A2}\) and \(\xi_{A4}\) are set to null to make a balanced laminate.

composites.core.make_orthotropic_LP(lp)#

Make orthotropic lamination parameters

The lamination parameters \(\xi_{A2}\), \(\xi_{A4}\), \(\xi_{B2}\), \(\xi_{B4}\), \(\xi_{D2}\) and \(\xi_{D4}\) are set to null to make an orthotropic laminate. The \(\xi_{D2}\) and \(\xi_{D4}\) are related to the bend-twist coupling and become often very small for balanced laminates with a large amount of plies.

composites.core.make_symmetric_LP(lp)#

Make symmetric lamination parameters

The lamination parameters \(\xi_{Bi}\) are set to null to make a symmetric laminate.

Composites Core Utils Module (composites.utils)#

composites.utils.double_double_plate(thickness, phideg, psideg, laminaprop=None, rho=0.0, calc_scf=True)#

Create a double-double laminated plate

A double-double (DD) laminate consists of \([\pm\phi,\pm\psi]\), with phideg= \(\phi\), and psideg= \(\psi\). With the principle of homogenization, at the limit where many plies are used we have that \(B=0\). Reference:

Shrivastava, S., Sharma, N., Tsai, S. W., and Mohite, P. M., 2020, “D and DD-Drop Layup Optimization of Aircraft Wing Panels under Multi-Load Case Design Environment,” Compos. Struct., 248(January), p. 112518.

Parameters:
thicknessfloat

Total plate thickness.

phidegfloat

Angle \(\psi\) of the DD laminate.

psidegfloat

Angle \(\phi\) of the DD laminate.

laminaproptuple

See read_laminaprop() for details.

rhofloat, optional

Material density

calc_scfbool, optional

If True, use Laminate.calc_scf() to compute shear correction factors, otherwise the default value of 5/6 is used.

composites.utils.isotropic_plate(thickness, E, nu, offset=0.0, calc_scf=True, rho=0.0)#

Read data for an isotropic plate

Laminate object is returned based on the inputs given.

Parameters:
thicknessfloat

Plate thickness.

Efloat

Young modulus.

nufloat, optional

Poisson’s ratio.

rhofloat, optional

Material density

offsetfloat, optional

Offset along the normal axis about the mid-surface, which influences the extension-bending coupling (B matrix).

calc_scfbool, optional

If True, use Laminate.calc_scf() to compute shear correction factors, otherwise the default value of 5/6 is used.

composites.utils.laminated_plate(stack, plyt=None, laminaprop=None, rho=0.0, plyts=None, laminaprops=None, rhos=None, offset=0.0, calc_scf=True)#

Read a laminate stacking sequence data.

Laminate object is returned based on the inputs given.

Parameters:
stacklist

Angles of the stacking sequence in degrees.

plytfloat, optional

When all plies have the same thickness, plyt can be supplied.

laminaproptuple, optional

When all plies have the same material properties, laminaprop can be supplied.

rhofloat, optional

Uniform material density to be used for all plies.

plytslist, optional

A list of floats with the thickness of each ply.

laminapropslist, optional

A list of tuples with a laminaprop for each ply.

rhoslist, optional

A list of floats with the material density of each ply.

offsetfloat, optional

Offset along the normal axis about the mid-surface, which influences the laminate properties.

calc_scfbool, optional

If True, use Laminate.calc_scf() to compute shear correction factors, otherwise the default value of 5/6 is used

Notes

plyt or plyts must be supplied laminaprop or laminaprops must be supplied

For orthotropic plies, the laminaprop should be:

laminaprop = (E11, E22, nu12, G12, G13, G23)

For isotropic plies, the laminaprop should be:

laminaprop = (E, nu)
composites.utils.n_double_plate(thickness, angles_deg, laminaprop=None, rho=0.0, calc_scf=True)#

Create a N-double laminated plate

A N-double (ND) laminate consists of \([\pm\phi_1,\pm\phi_2, \cdots, \pm\phi_n]\). With the principle of homogenization, at the limit where many plies are used we have that \(B=0\). Based on the double-double laminate as described by:

Shrivastava, S., Sharma, N., Tsai, S. W., and Mohite, P. M., 2020, “D and DD-Drop Layup Optimization of Aircraft Wing Panels under Multi-Load Case Design Environment,” Compos. Struct., 248(January), p. 112518.

Parameters:
thicknessfloat

Total plate thickness.

angles_degfloat

List of \(\phi_n\) of the ND laminate.

laminaproptuple

See read_laminaprop() for details.

rhofloat, optional

Material density

calc_scfbool, optional

If True, use Laminate.calc_scf() to compute shear correction factors, otherwise the default value of 5/6 is used.

composites.utils.read_laminaprop(laminaprop, rho=0)#

Returns a MatLamina object based on an input laminaprop tuple

Parameters:
laminaproplist or tuple

For the most general case of tri-axial stress, use a tuple containing the folliwing entries:

laminaprop = (e1, e2, nu12, g12, g13, g23, e3, nu13, nu23)

For isotropic materials aiming calculations with tri-axial stresses, use:

g = e/(2*(1+nu))
laminaprop = (e, e, nu, g, g, g, e, nu, nu)

For othotropic materials with in-plane stresses the user can only supply:

laminaprop = (e1, e2, nu12, g12, g13, g23)

For isotropic materials with in-plane stresses the user can only supply:

laminaprop = (e, nu) # new

symbol

value

e1

Young Module in direction 1

e2

Young Module in direction 2

nu12

12 Poisson’s ratio

g12

12 Shear Modulus

g13

13 Shear Modulus

g23

13 Shear Modulus

e3

Young Module in direction 3

nu13

13 Poisson’s ratio

nu23

23 Poisson’s ratio

rhofloat, optional

Material density

Returns:
matlamMatLamina

A MatLamina object.

Kassapoglou’s methods (composites.kassapoglou)#

Methods based on Kassapoglou’s book.

Reference:

Kassapoglou. Design and Analysis of Composite Structures. 2nd Edition. John Wiley & Sons Ltd, 2013.

composites.kassapoglou.calc_Nxx_crit(a, b, m, n, D11, D12, D22, D66)#

Calculate uniaxial compression buckling for a composite plate

The output of this function is the result of Eq. 6.6, section 6.2 page 129. If \(m\) or \(n\) is set to None, the function searchers for the critical number of half-waves in the corresponding direction, up to 10 half-waves.

Reference:

Kassapoglou. Design and Analysis of Composite Structures. 2nd Edition. John Wiley & Sons Ltd, 2013.

Parameters:
a, bfloat

Plate length and width.

m, nint or None

Number of half-waves along the plate length and width, respectively.

D11, D12, D22, D66float

Terms of the D matrix.

composites.kassapoglou.calc_Nxx_crit_combined_shear(k, a, b, D11, D12, D22, D66)#

Calculate combined uniaxial-shear buckling load for a composite plate

The output of this function is the result of Eq. 6.34, section 6.5 page 142. This function calculates the critical \(N_{xx}\) buckling load under the current level of shear load given by \(N_{xy} = k N_{xx}\).

Reference:

Kassapoglou. Design and Analysis of Composite Structures. 2nd Edition. John Wiley & Sons Ltd, 2013.

Parameters:
kfloat

Load ratio defined as \(k=N_{xy}/N_{xx}\), where \(N_{xy}\) is the current shear load, and \(N_{xx}\) the current compression load.

a, bfloat

Plate length and width.

D11, D12, D22, D66float

Terms of the D matrix.

composites.kassapoglou.calc_Nxx_crit_combined_shear_full(Nxy, a, b, D11, D12, D16, D22, D26, D66)#

Calculate combined uniaxial-shear buckling load for a composite plate

This solution does not ignore the D16 and D26 terms. Furthermore, this solution takes as input \(N_{xy}\) instead of the \(k=N_{xy}/N_{xx}\) originally used by Kassapoglou.

Based on section 6.5. This function calculates the critical \(N_{xx}\) by \(N_{xy}\).

Reference:

Kassapoglou. Design and Analysis of Composite Structures. 2nd Edition. John Wiley & Sons Ltd, 2013.

Parameters:
Nxyfloat

Shear load \(N_{xy}\).

a, bfloat

Plate length and width.

D11, D12, D16, D22, D26, D66float

All terms of the D matrix.

composites.kassapoglou.calc_Nxy_crit(a, D11, D12, D16, D22, D66, rtol=1e-05, atol=1e-06, max_iter=50)#

Calculate shear buckling for a composite plate

The output of this function is the result of Eq. 6.28, section 6.4 page 137. Variables \(AR\) and \(\alpha\) are solved using a Newton-Raphson scheme that finds the solution of Eqs. 6.29 and 6.30 simultaneously.

Reference:

Kassapoglou. Design and Analysis of Composite Structures. 2nd Edition. John Wiley & Sons Ltd, 2013.

Parameters:
afloat

Plate length.

D11, D12, D16, D22, D66float

Terms of the D matrix.

rtol, atolfloat

Relative and absolute tolerances used to solve Eq. 6.30.

max_iterint

Maximum number of iterations used in the Newton-Raphson scheme.

composites.kassapoglou.calc_beff(b, Px, Pcr, A11, A12, A22)#

Calculate the effective width of a plate

The output of this function is the result of Eq. 7.15, section 7.1 page 164. The effective width \(b_{eff}\) is defined as:

\(\int_y N_{xx} dy = 2{N_x}_{max} b_{eff}\)

Reference:

Kassapoglou. Design and Analysis of Composite Structures. 2nd Edition. John Wiley & Sons Ltd, 2013.

Parameters:
bfloat

Plate width.

Pxfloat

Applied compressive force.

Pcrfloat

Critical buckling force.

A11, A12, A22: float

Terms of the A matrix.