a mechanical engineering toolbox
source code - https://github.com/nagordon/mechpy
documentation - https://nagordon.github.io/mechpy/
Neal Gordon
2017-02-20
This a collection of sample codes for various calcuations useful for composites mechanics
cd ..
# setup
import numpy as np
import sympy as sp
import scipy
from pprint import pprint
sp.init_printing(use_latex='mathjax')
import matplotlib.pyplot as plt
plt.rcParams['figure.figsize'] = (12, 8) # (width, height)
plt.rcParams['font.size'] = 14
plt.rcParams['legend.fontsize'] = 16
from matplotlib import patches
#get_ipython().magic('matplotlib') # seperate window
get_ipython().magic('matplotlib inline') # inline plotting
from mechpy.math import T3rot, T6rot
from mechpy.composites import my_laminate_with_loading, material_plots, laminate_gen, \
plot_single_max_failure_loads
import importlib
importlib.reload
from mechpy.math import T2rot
T2rot(45)
print(T6rot(45,45,45))
help(laminate_gen)
%matplotlib inline
material_plots()
my_laminate_with_loading()
plot_single_max_failure_loads(mymat='E-Glass Epoxy fabric M10E-3783', mylayup=[0,45,45,0] )