def get_Sbar_matrix(self, mid_ref, theta=0.): """theta must be in radians""" # this is the inverse of Sbar S2, unused_S3 = get_mat_props_S(mid_ref) T = get_2d_plate_transform(theta) #Tinv = np.linalg.inv(T) Sbar = np.linalg.multi_dot([T.T, S2, T]) return Sbar
def get_Qbar_matrix(self, mid_ref, theta=0.): """theta must be in radians""" S2, unused_S3 = get_mat_props_S(mid_ref) T = get_2d_plate_transform(theta) #Tinv = np.linalg.inv(T) #Qbar = np.linalg.multi_dot([Tinv, Q, Tinv.T]) Sbar = np.linalg.multi_dot([T.T, S2, T]) Qbar = np.linalg.inv(Sbar) return Qbar
def test_abd_1(self): """tests some ABD matrix functionality for a PCOMP""" log = get_logger(level='warning') model = BDF(log=log) model.add_grid(1, [0., 0., 0.]) model.add_grid(2, [1., 0., 0.]) model.add_grid(3, [1., 1., 0.]) model.add_grid(4, [0., 1., 0.]) nids = [1, 2, 3, 4] eid = 1 pid = 10 mid = 20 model.add_cquad4(eid, pid, nids, theta_mcid=0.0, zoffset=0., tflag=0, T1=None, T2=None, T3=None, T4=None, comment='') thetas = [0., 45., 90.] thicknesses = [0.1] * 3 mids = len(thicknesses) * [mid] pcomp = model.add_pcomp(pid, mids, thicknesses, thetas=None, souts=None, nsm=0., sb=0., ft=None, tref=0., ge=0., lam=None, z0=0., comment='') E = 3.0e7 G = None nu = 0.3 model.add_mat1(mid, E, G, nu) #-------------------------- #e1_e2 = 40. #g12_e2 = 0.5 #nu12 = 0.25 #e22 = 30e6 e1_e2 = 3. g12_e2 = 0.5 nu12 = 0.25 e22 = 1. e11 = e1_e2 * e22 g12 = g12_e2 * e22 mid8 = 8 mat8 = model.add_mat8( mid8, e11, e22, nu12, g12=g12, g1z=1e8, g2z=1e8, rho=0., a1=0., a2=0., tref=0., Xt=0., Xc=None, Yt=0., Yc=None, S=0., ge=0., F12=0., strn=0., comment='') S = get_mat_props_S(mat8) pid8 = 8 pcomp8 = model.add_pcomp(pid8, [mid8], [1.], thetas=[0.], souts=None, nsm=0., sb=0., ft=None, tref=0., ge=0., lam=None, z0=0., comment='') model.pop_parse_errors() model.cross_reference() model.pop_xref_errors() ABD = pcomp.get_ABD_matrices() thetad = np.linspace(0., 90., num=91) if IS_MATPLOTLIB: plot_equivalent_lamina_vs_theta( pcomp8, mat8, thetad, plot=True, show=False, close=True, png_filename='lamina.png') os.remove('lamina_stiffness.png') os.remove('lamina_nu.png')