@@ -26,12 +26,10 @@ def beam_2d_shape_fun(xi):
2626
2727def beam_2d_shape_fun_xi (xi ):
2828 """
29- Compute the first derivative of the beam shape functions for deflection in the x-z plane (i.e. in 2d).
29+ Compute the first derivative of the beam shape functions for deflection in
30+ the x-z plane (i.e. in 2d).
3031
31- The quantity computed is
32- ```math
33- \f rac{d^1 N(\\ xi)}{d \\ xi^1}
34- ```
32+ The quantity computed is ```math \f rac{d^1 N(\\ xi)}{d \\ xi^1} ```
3533 """
3634 return array (
3735 [
@@ -45,24 +43,20 @@ def beam_2d_shape_fun_xi(xi):
4543
4644def beam_2d_shape_fun_xi2 (xi ):
4745 """
48- Compute the second derivative of the beam shape functions for deflection in the x-z plane (i.e. in 2d).
46+ Compute the second derivative of the beam shape functions for deflection in
47+ the x-z plane (i.e. in 2d).
4948
50- The quantity computed is
51- ```math
52- \f rac{d^2 N(\\ xi)}{d \\ xi^2}
53- ```
49+ The quantity computed is ```math \f rac{d^2 N(\\ xi)}{d \\ xi^2} ```
5450 """
5551 return array ([(6 * xi ) / 4 , (2 - 6 * xi ) / 4 , (- 6 * xi ) / 4 , (- 2 - 6 * xi ) / 4 ])
5652
5753
5854def beam_2d_shape_fun_xi3 (xi ):
5955 """
60- Compute the third derivative of the beam shape functions for deflection in the x-z plane (i.e. in 2d).
56+ Compute the third derivative of the beam shape functions for deflection in
57+ the x-z plane (i.e. in 2d).
6158
62- The quantity computed is
63- ```math
64- \f rac{d^3 N(\\ xi)}{d \\ xi^3}
65- ```
59+ The quantity computed is ```math \f rac{d^3 N(\\ xi)}{d \\ xi^3} ```
6660 """
6761 return array ([(6 ) / 4 , (- 6 ) / 4 , (- 6 ) / 4 , (- 6 ) / 4 ])
6862
@@ -76,7 +70,8 @@ def beam_3d_xz_shape_fun(xi):
7670
7771def beam_3d_xz_shape_fun_xi2 (xi ):
7872 """
79- Compute the second derivative of the beam shape functions for deflection in the x-z plane.
73+ Compute the second derivative of the beam shape functions for deflection in
74+ the x-z plane.
8075 """
8176 return beam_2d_shape_fun_xi2 (xi )
8277
@@ -85,12 +80,10 @@ def beam_3d_xy_shape_fun(xi):
8580 """
8681 Compute the beam shape functions for deflection in the x-y plane.
8782
88- The quantity computed is
89- ```math
90- \f rac{d^2 N(\\ xi)}{d \\ xi^2}
91- ```
83+ The quantity computed is ```math \f rac{d^2 N(\\ xi)}{d \\ xi^2} ```
9284
93- The signs of the shape functions that go with the rotations (i.e. the second and fourth) need to be reversed.
85+ The signs of the shape functions that go with the rotations (i.e. the second
86+ and fourth) need to be reversed.
9487 """
9588 N = beam_2d_shape_fun (xi )
9689 N [1 ] *= - 1.0
@@ -100,14 +93,13 @@ def beam_3d_xy_shape_fun(xi):
10093
10194def beam_3d_xy_shape_fun_xi2 (xi ):
10295 """
103- Compute the second derivative of the beam shape functions for deflection in the x-y plane.
96+ Compute the second derivative of the beam shape functions for deflection in
97+ the x-y plane.
10498
105- The quantity computed is
106- ```math
107- \f rac{d^2 N(\\ xi)}{d \\ xi^2}
108- ```
99+ The quantity computed is ```math \f rac{d^2 N(\\ xi)}{d \\ xi^2} ```
109100
110- The signs of the shape functions that go with the rotations (i.e. the second and fourth) need to be reversed.
101+ The signs of the shape functions that go with the rotations (i.e. the second
102+ and fourth) need to be reversed.
111103 """
112104 d2Ndxi2 = beam_2d_shape_fun_xi2 (xi )
113105 d2Ndxi2 [1 ] *= - 1.0
@@ -130,9 +122,10 @@ def beam_2d_member_geometry(i, j):
130122 if h <= 0.0 :
131123 raise ZeroDivisionError ("Length of element must be positive" )
132124 e_x /= h
133- # The orientation here reflects the sign convention in the book.
134- # The deflection is measured positive downwards, while the x coordinate is measured left to right.
135- # So in two dimensions e_x and e_z form a left-handed coordinate system.
125+ # The orientation here reflects the sign convention in the book. The
126+ # deflection is measured positive downwards, while the x coordinate is
127+ # measured left to right. So in two dimensions e_x and e_z form a
128+ # left-handed coordinate system.
136129 e_z = array ([e_x [1 ], - e_x [0 ]])
137130 return e_x , e_z , h
138131
@@ -146,9 +139,10 @@ def beam_3d_member_geometry(i, j, xz_vector):
146139 if h <= 0.0 :
147140 raise ZeroDivisionError ("Length of element must be positive" )
148141 e_x /= h
149- # The orientation here reflects the sign convention in the book.
150- # The deflection is measured positive downwards, while the x coordinate is measured left to right.
151- # So in two dimensions e_x and e_z form a left-handed coordinate system.
142+ # The orientation here reflects the sign convention in the book. The
143+ # deflection is measured positive downwards, while the x coordinate is
144+ # measured left to right. So in two dimensions e_x and e_z form a
145+ # left-handed coordinate system.
152146 if abs (dot (e_x , xz_vector )) > 0.99 * norm (xz_vector ):
153147 raise ZeroDivisionError ("xz_vector must not be parallel to the beam axis" )
154148 e_y = cross (xz_vector , e_x )
0 commit comments