<jupyter_start><jupyter_text>Validation 1<jupyter_code>E_f = np.array([233, 23.1, 23.1])
v_f = np.array([0.40, 0.20, 0.20])
G_f = np.array([8.27, 8.96, 8.96])
alpha_f = np.array([-0.54, 10.10, 10.10])
mat_f = Material(E_f, v_f, G_f, alpha_f)
V_f = 0.61

E_m = 4.62
v_m = 0.36
G_m = 0
alpha_m = 41.4
mat_m = Material(E_m, v_m, G_m, alpha_m)

layer_1 = Lamina(mat_fiber=mat_f, mat_matrix=mat_m, Vol_fiber=V_f, array_geometry=2)

E, v, G = layer_1.get_lamina_properties()
a, b = layer_1.get_lamina_expansion_properties()

print(E)
print(v)
print(G)
print(a)<jupyter_output>[143.9318      12.03631579  12.03631579]
[0.58919839 0.2624     0.2624    ]
[3.78691416 4.54567129 4.54567129]
[-1.49770933e-02  2.81195600e+01  2.81195600e+01]<jupyter_text>Validation 2<jupyter_code>E = np.array([19.2, 1.56, 1.56])
v = np.array([0.59, 0.24, 0.24])
G = np.array([0.49, 0.82, 0.82])

lam = Laminate()
mat = Material(E, v, G)
layer_1 = Lamina(mat_composite=mat)

print(layer_1.matrices.S)
print(layer_1.matrices.C)<jupyter_output>[[ 0.05208333 -0.0125     -0.0125      0.          0.          0.        ]
 [-0.0125      0.64102564 -0.37820513  0.          0.          0.        ]
 [-0.0125     -0.37820513  0.64102564  0.          0.          0.        ]
 [ 0.          0.          0.          2.04081633  0.          0.        ]
 [ 0.          0.          0.          0.          1.2195122   0.        ]
 [ 0.          0.          0.          0.          0.          1.2195122 ]]
[[19.6485623   0.93450479  0.93450479  0.          0.          0.        ]
 [ 0.93450479  2.43745102  1.45631895  0.          0.          0.        ]
 [ 0.93450479  1.45631895  2.43745102  0.          0.          0.        ]
 [ 0.          0.          0.          0.49        0.          0.        ]
 [ 0.          0.          0.          0.          0.82        0.        ]
 [ 0.          0.          0.          0.          0.          0.82      ]]<jupyter_text>Validation 3<jupyter_code>E = np.array([163, 14.1, 14.1]) * 1e9
v = np.array([0.45, 0.24, 0.24])
G = np.array([3.6, 4.8, 4.8]) * 1e9
alpha = np.array([-0.018, 24.3, 24.3, 0, 0, 0]) * 1e-6
beta = np.array([150, 4870, 4870, 0, 0, 0]) * 1e-6

sigma = create_tensor_3D(50, -50, -5, 0, 0, -3) * 1e6

lam = Laminate()
mat = Material(E, v, G)
layer_1 = Lamina(mat_composite=mat)
lam.add_lamina(layer_1)

layer_1.apply_stress(sigma)
e_thermal = alpha * 10
e_moisture = beta * 0.6

print((layer_1.local_state.strain + e_thermal + e_moisture))<jupyter_output>[ 0.00047755 -0.00029514  0.00433252  0.          0.         -0.000625  ]<jupyter_text>Validation 4<jupyter_code>E = np.array([163, 14.1, 14.1]) * 1e9
v = np.array([0.45, 0.24, 0.24])
G = np.array([3.6, 4.8, 4.8]) * 1e9
alpha = np.array([-0.018, 24.3, 24.3, 0, 0, 0]) * 1e-6
beta = np.array([150, 4870, 4870, 0, 0, 0]) * 1e-6

lam = Laminate()
mat = Material(E, v, G)
layer_1 = Lamina(mat_composite=mat)
lam.add_lamina(layer_1)

epsilon = np.array([4.0e-4, -3.5e-3, 1.2e-3, 0, 0, -6e-4])
e_thermal = alpha * -30
e_moisture = beta * 0.6
e_total = create_tensor_3D(*(epsilon - e_thermal - e_moisture))

layer_1.apply_strain(e_total)
print(layer_1.local_state.stress * 1e-6)<jupyter_output>[   9.47654588 -108.19637856  -62.49293028    0.            0.
   -2.88      ]<jupyter_text>Validation 5<jupyter_code>E = np.array([163, 14.1, 14.1]) * 1e9
v = np.array([0.45, 0.24, 0.24])
G = np.array([3.6, 4.8, 4.8]) * 1e9
alpha = np.array([-0.018, 24.3, 24.3, 0, 0, 0]) * 1e-6
beta = np.array([150, 4870, 4870, 0, 0, 0]) * 1e-6

lam = Laminate()
mat = Material(E, v, G)
layer_1 = Lamina(mat_composite=mat)
lam.add_lamina(layer_1)

epsilon = create_tensor_3D(4.0e-4, -3.5e-3, 1.2e-3, 0, 0, -6e-4)

layer_1.apply_strain(epsilon)

print(layer_1.matrices.C_reduced.dot(np.array([4.0e-4, -3.5e-3, -6e-4])) * 1e-6)
print(layer_1.local_state.stress * 1e-6)<jupyter_output>[ 53.62318161 -48.23674327  -2.88      ]
[ 51.99071907 -50.3710594   -4.66761113   0.           0.
  -2.88      ]<jupyter_text>Validation 6<jupyter_code>E = np.array([100, 20, 20])
v = np.array([0.40, 0.18, 0.18])
G = np.array([4, 5, 5])

lam = Laminate()
mat = Material(E, v, G)
layer_1 = Lamina(mat_composite=mat)
layer_2 = Lamina(mat_composite=mat)

lam.add_lamina(layer_1, 45)
lam.add_lamina(layer_2, -30)

print(lam.get_lamina(1).matrices.T_2D)
print(lam.get_lamina(1).matrices.S_bar_reduced)
print(lam.get_lamina(1).matrices.Q_bar_reduced)
print('-'*50)
print(lam.get_lamina(2).matrices.T_2D)
print(lam.get_lamina(2).matrices.S_bar_reduced)
print(lam.get_lamina(2).matrices.Q_bar_reduced)<jupyter_output>[[ 0.5  0.5  1. ]
 [ 0.5  0.5 -1. ]
 [-0.5  0.5  0. ]]
[[ 0.0641 -0.0359 -0.02  ]
 [-0.0359  0.0641 -0.02  ]
 [-0.02   -0.02    0.0636]]
[[37.007408   27.007408   20.13044529]
 [27.007408   37.007408   20.13044529]
 [20.13044529 20.13044529 28.38392785]]
--------------------------------------------------
[[ 0.75       0.25      -0.8660254]
 [ 0.25       0.75       0.8660254]
 [ 0.4330127 -0.4330127  0.5      ]]
[[ 0.045575   -0.027375    0.04685197]
 [-0.027375    0.065575   -0.01221096]
 [ 0.04685197 -0.01221096  0.0977    ]]
[[ 62.98383525  21.16142604 -27.55901479]
 [ 21.16142604  22.72294468  -7.30793923]
 [-27.55901479  -7.30793923  22.53794589]]<jupyter_text>For 2D Material Properties: $E_1=170 GPa, E_2=9 GPa, \nu_{12}=0.27, G_{12}=4.4 GPa$<jupyter_code>E = np.array([170, 9, 1])
v = np.array([0, 0.27, 0.27])
G = np.array([1, 4.4, 4.4])

lam = Laminate()
mat = Material(E, v, G)
layer_1 = Lamina(mat_composite=mat)
layer_2 = Lamina(mat_composite=mat)

lam.add_lamina(layer_1, 45)
lam.add_lamina(layer_2, -30)

# print(lam.get_lamina(1).matrices.T_2D)
# print(lam.get_lamina(1).matrices.S_bar_reduced)
# print(lam.get_lamina(1).matrices.Q_bar_reduced)
# # print(lam.get_lamina(1).local_state.stress)
# print(lam.get_lamina(2).matrices.T_2D)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18867924528301888, 'fraction_numerical': 0.21012006861063465, 'mean_word_length': 2.3724696356275303, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '438911', 'license': 'MIT', 'n_tokens_mistral': 3410, 'n_tokens_neox': 2759, 'n_words': 479, 'path': 'src/.ipynb_checkpoints/Untitled-checkpoint.ipynb', 'repo_name': 'echaffey/Compysite', 'size': '5830'}