<jupyter_start><jupyter_text>Composipy for strength analysis of a laminate In this exemple we will use the exercise 6-7 from *Analysis and Performance of Fiber Composites by <NAME>* pg. 244.<jupyter_code>from composipy import Ply, Laminate, Load, Strength<jupyter_output><empty_output><jupyter_text>Fist, lets consider the following laminate$[45_{ply1}/0_{ply2}/45_{ply1}]$Where $ply_1$ is $3 mm$ thick and $ply_2$ is $6mm$ thick with the following Elastic and strength characteristics- E1 = 19745 MPa- E2 = 1980 MPa- $\nu_{12}$ = 0.35- G = 700 MPa- $\sigma_1^T$ = 400 Mpa- $\sigma_1^C$ = -250 Mpa- $\sigma_2^T$ = 150 Mpa- $\sigma_2^C$ = -200 Mpa- $\tau_{12}$ = 25 Mpa  Setting the laminate<jupyter_code>ply_1 = Ply(19745 , 1980, 0.35, 700, 3, 400, -250, 150, -200, 25,  name='3mm Unidirection Fiber Composite') 
ply_2 = Ply(19745 , 1980, 0.35, 700, 6, 400, -250, 150, -200, 25, name='6mm Unidirection Fiber Composite')<jupyter_output><empty_output><jupyter_text>Now, defining the laminate<jupyter_code>layup_1 = [
    (45, ply_1),
    (0, ply_2),
    (45, ply_1)
    ]

laminate_1 = Laminate(layup_1)


print(ply_1,'\n',ply_2)

print('==============================================')

print(laminate_1)<jupyter_output>Ply(6mm Unidirection Carbon Fiber, E1 = 19745, E2 = 1980, 
            v12 = 0.35, G12 = 700, thickness = 3, 
            T1 = 400, C1 = -250, T2 = 150, C2 = -200, S = 25) 
 Ply(6mm Unidirection Carbon Fiber, E1 = 19745, E2 = 1980, 
            v12 = 0.35, G12 = 700, thickness = 6, 
            T1 = 400, C1 = -250, T2 = 150, C2 = -200, S = 25)
==============================================
6mm Unidirection Carbon Fiber 45                  /////               
6mm Unidirection Carbon Fiber 0                   =====               
6mm Unidirection Carbon Fiber 45                  /////<jupyter_text>The $ABD'$ matrix can be called by the `ABD_p` atribute<jupyter_code>laminate_1.ABD_p<jupyter_output><empty_output><jupyter_text>Setting the loads In the exemple, the element is subjected to the following loads- Nx = 1000 N/mm- Ny = 200 N/m- Nxy = 0- Mx = 0- My = 0- Mxy = 0 We will input the loads by using the `Load` class.<jupyter_code>loads_1 = Load(1000,200,0,0,0,0)

loads_1<jupyter_output><empty_output><jupyter_text>Checking the strength and elastic parameters of the laminate under load Now we can analyse the strain and strees in the laminate using the `Strength` class.<jupyter_code>analysis = Strength(laminate_1,loads_1)<jupyter_output><empty_output><jupyter_text>Let's see the the mid-plane strain in the load direction (*xy*) by calling the `mid_strain_xy` atribute<jupyter_code>analysis.mid_strain_xy<jupyter_output><empty_output><jupyter_text>Or, in the laminate coordinates (*12*), by calling `mid_strain_12`.<jupyter_code>analysis.mid_strain_12<jupyter_output><empty_output><jupyter_text>Just like that, we can get the stress in all plies for both *xy* and *12* directions by calling `stress_xy` or `stress_12`.<jupyter_code>analysis.stress_xy 
analysis.stress_12<jupyter_output><empty_output><jupyter_text>From the stresses in the laminate coordinates, we can calculate the Tsai-Wu failure index for all plies by calling `TW_i`.<jupyter_code>analysis.TW_i<jupyter_output><empty_output><jupyter_text>Because the Tsai-Wu index is below 1 for all plies, the laminate is still undamaged.  We can discover in what load the first ply will fail based on the Tsai-Wu failure criterion by using the `FPF` parameter.<jupyter_code>analysis.FPF<jupyter_output>FPF Load: 
 [[2548.05698026]
 [ 509.61139605]
 [   0.        ]
 [   0.        ]
 [   0.        ]
 [   0.        ]]
Failed Ply(ies): 
 [2]
Laminate Tsai-Wu Index in FPF: 
 [0.12933910070551077, 1.0199433489695386, 0.12933910070551077]
Strength Ratio for FPF: 
 2.573537550058799
{'fraction_non_alphanumeric': 0.13561571125265393, 'fraction_numerical': 0.0958067940552017, 'mean_word_length': 4.100135317997293, 'pattern_counts': {'":': 0, '<': 44, '<?xml version=': 0, '>': 44, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '11', 'dir': 'jupyter-structured-clean-dedup', 'id': '5869', 'license': 'MIT', 'n_tokens_mistral': 1641, 'n_tokens_neox': 1339, 'n_words': 387, 'path': 'docs/notebooks/Strength_Analysis.ipynb', 'repo_name': 'IanViotti/composipy', 'size': '3772'}