MCPcopy Create free account
hub / github.com/Apress/python-for-matlab-development / stiffness_matrix

Method stiffness_matrix

pythran/fem/rod.py:69–82  ·  view source on GitHub ↗

http://www.ita.uni-heidelberg.de/~dullemond/lectures/num_phys_2010/Chapter_FiniteElements.pdf

(self)

Source from the content-addressed store, hash-verified

67 self.mass = self.rho * self.length * self.cross_sect_area
68
69 def stiffness_matrix(self):
70 """
71 http://www.ita.uni-heidelberg.de/~dullemond/lectures/num_phys_2010/Chapter_FiniteElements.pdf
72 """
73 K = self.E * self.cross_sect_area / self.length
74 cos = self.dX/self.length
75 sin = self.dY/self.length
76 cos2 = cos**2
77 sin2 = sin**2
78 sincos = sin*cos
79 return K*np.array([[ cos2 , sincos, -cos2 , -sincos ],
80 [ sincos, sin2 , -sincos, -sin2 ],
81 [-cos2 , -sincos, cos2 , sincos, ],
82 [-sincos, -sin2 , sincos, sin2 , ],])
83
84 def mass_matrix(self):
85 """

Callers 3

add_elementMethod · 0.45
KMMethod · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected