@@ -1339,7 +1339,7 @@ def stiffener_spacing(
13391339
13401340 return (t_s , t_bar , d , H )
13411341
1342- def synthesis (self ):
1342+ def synthesis (self ) -> None :
13431343 """Run the sizing routine.
13441344
13451345 Component weight is obtained by multiplying area, effective thickness,
@@ -1395,7 +1395,7 @@ class MajorFrame(Component):
13951395 fs_loc : float
13961396 """Fuselage Station location (e.g. 150in from origin)."""
13971397
1398- loads : ArrayLike
1398+ loads : Any
13991399 """The loads list contains all external loads applied on this frame.
14001400 [
14011401 [y, z, V, H, M],
@@ -1512,7 +1512,7 @@ def show(self, show_coords: bool = False, save: bool = False) -> None:
15121512
15131513 _ = ax .set_xlabel ("Butt Line, $BL$" , fontfamily = "serif" )
15141514 _ = ax .set_ylabel ("Water Line, $WL$" , fontfamily = "serif" )
1515- _ = ax .tick_params (axis = "both" , which = "both" , direction = "in" )
1515+ ax .tick_params (axis = "both" , which = "both" , direction = "in" )
15161516 _ = ax .set_title (f"FS{ self .fs_loc } Frame Applied Loads" , fontfamily = "serif" )
15171517 _ = ax .legend (
15181518 handles = [
@@ -1579,8 +1579,8 @@ def synthesis(self, num: int = 60) -> None:
15791579 self .weight = self .results [:, 0 ].sum ()
15801580
15811581 def geometry_cuts (
1582- self , num , debug : bool = False
1583- ) -> Tuple [float , ArrayLike , ArrayLike ]:
1582+ self , num : int , debug : bool = False
1583+ ) -> Tuple [float , ArrayLike , pd . DataFrame ]:
15841584 """Calculate the frame node coordinates for all synthesis cuts. [FRMND1].
15851585
15861586 The frame synthesis cut coordinates are based on equal-length segments
@@ -1628,7 +1628,7 @@ def geometry_cuts(
16281628 # iteration step segment length.
16291629 # Initial dsl_k doesn't matter.
16301630
1631- def objective (phi , * args ) -> float :
1631+ def objective (phi : float , * args : Any ) -> float :
16321632 """An objective local function to minimize.
16331633
16341634 Args:
@@ -1643,7 +1643,7 @@ def objective(phi, *args) -> float:
16431643 del_y = y_k - y_i
16441644 del_z = z_k - z_i
16451645 dls_k = np .sqrt (del_y ** 2 + del_z ** 2 )
1646- return abs (dls - dls_k )
1646+ return float ( abs (dls - dls_k ) )
16471647
16481648 solution = minimize_scalar (
16491649 objective ,
@@ -1787,7 +1787,7 @@ def cut_loads(
17871787 area = np .sum (da_j )
17881788
17891789 # The shear flow the cut due to the unbalanced forces is:
1790- def __local_shear_flow (i ) -> float :
1790+ def __local_shear_flow (i : int ) -> float :
17911791 """Local function for the shear flow iteration."""
17921792 qi_prime_1 = 0.0
17931793 for n in range (2 , i + 1 ):
@@ -1870,9 +1870,9 @@ def frame_loads(
18701870 self ,
18711871 dls : float ,
18721872 zzf : float ,
1873- inertias : ArrayLike ,
1874- cut_geom : ArrayLike ,
1875- ) -> ArrayLike :
1873+ inertias : Any ,
1874+ cut_geom : pd . DataFrame ,
1875+ ) -> Any :
18761876 """This method calculates the final redundant loads. [FRMLD.2].
18771877
18781878 Take section cut loads from each section around the perimeter and build
@@ -1885,7 +1885,7 @@ def frame_loads(
18851885 cut_geom: 2D Array of section geometry
18861886
18871887 Returns:
1888- ArrayLike: Segment centroidal net internal loads
1888+ Segment centroidal net internal loads
18891889 """
18901890 ioz_s , ioy_s , ioz_f , ioy_f = inertias
18911891 # We gotta do some silly type conversions here.
@@ -1895,14 +1895,14 @@ def frame_loads(
18951895 dlsp_j = cut_geom ["DLSP_j" ]
18961896 dlsp = cut_geom ["DLS_j" ]
18971897 pp = np .sum (dlsp_j )
1898- y_pb : ArrayLike = np .array (cut_geom ["y_pbj" ])
1899- z_pb : ArrayLike = np .array (cut_geom ["z_pbj" ])
1900- y : ArrayLike = np .array (cut_geom ["y_i" ])
1901- z : ArrayLike = np .array (cut_geom ["z_i" ])
1902- y_b : ArrayLike = np .array (cut_geom ["y_bj" ])
1903- z_b : ArrayLike = np .array (cut_geom ["z_bj" ])
1904- y_p : ArrayLike = np .array (cut_geom ["y_pi" ])
1905- z_p : ArrayLike = np .array (cut_geom ["z_pi" ])
1898+ y_pb : Any = np .array (cut_geom ["y_pbj" ])
1899+ z_pb : Any = np .array (cut_geom ["z_pbj" ])
1900+ y : Any = np .array (cut_geom ["y_i" ])
1901+ z : Any = np .array (cut_geom ["z_i" ])
1902+ y_b : Any = np .array (cut_geom ["y_bj" ])
1903+ z_b : Any = np .array (cut_geom ["z_bj" ])
1904+ y_p : Any = np .array (cut_geom ["y_pi" ])
1905+ z_p : Any = np .array (cut_geom ["z_pi" ])
19061906 # theta: ArrayLike = cut_geom["theta_i"]
19071907 jj = len (cut_geom )
19081908
@@ -1914,8 +1914,8 @@ def frame_loads(
19141914 theta = row ["theta_i" ],
19151915 dls = row ["DLS_j" ],
19161916 zzf = zzf ,
1917- ioy_s = ioy_s ,
1918- ioz_s = ioz_s ,
1917+ ioy_s = float ( ioy_s ) ,
1918+ ioz_s = float ( ioz_s ) ,
19191919 y = y ,
19201920 z = z ,
19211921 y_b = y_b ,
0 commit comments