@@ -237,10 +237,16 @@ def theta(x):
237237 return np .arccos (1 - 2 * max (min (x / self .length , 1 ), 0 ))
238238
239239 self .y_nosecone = Function (
240- lambda x : self .base_radius
241- * (theta (x ) - np .sin (2 * theta (x )) / 2 + (np .sin (theta (x )) ** 3 ) / 3 )
242- ** (0.5 )
243- / (np .pi ** 0.5 )
240+ lambda x : (
241+ self .base_radius
242+ * (
243+ theta (x )
244+ - np .sin (2 * theta (x )) / 2
245+ + (np .sin (theta (x )) ** 3 ) / 3
246+ )
247+ ** (0.5 )
248+ / (np .pi ** 0.5 )
249+ )
244250 )
245251
246252 elif value in ["tangent" , "tangentogive" , "ogive" ]:
@@ -253,15 +259,19 @@ def theta(x):
253259 area = np .pi * self .base_radius ** 2
254260 self .k = 1 - volume / (area * self .length )
255261 self .y_nosecone = Function (
256- lambda x : np .sqrt (rho ** 2 - (min (x - self .length , 0 )) ** 2 )
257- + (self .base_radius - rho )
262+ lambda x : (
263+ np .sqrt (rho ** 2 - (min (x - self .length , 0 )) ** 2 )
264+ + (self .base_radius - rho )
265+ )
258266 )
259267
260268 elif value == "elliptical" :
261269 self .k = 1 / 3
262270 self .y_nosecone = Function (
263- lambda x : self .base_radius
264- * np .sqrt (1 - ((x - self .length ) / self .length ) ** 2 )
271+ lambda x : (
272+ self .base_radius
273+ * np .sqrt (1 - ((x - self .length ) / self .length ) ** 2 )
274+ )
265275 )
266276
267277 elif value == "vonkarman" :
@@ -271,15 +281,19 @@ def theta(x):
271281 return np .arccos (1 - 2 * max (min (x / self .length , 1 ), 0 ))
272282
273283 self .y_nosecone = Function (
274- lambda x : self .base_radius
275- * (theta (x ) - np .sin (2 * theta (x )) / 2 ) ** (0.5 )
276- / (np .pi ** 0.5 )
284+ lambda x : (
285+ self .base_radius
286+ * (theta (x ) - np .sin (2 * theta (x )) / 2 ) ** (0.5 )
287+ / (np .pi ** 0.5 )
288+ )
277289 )
278290 elif value == "parabolic" :
279291 self .k = 0.5
280292 self .y_nosecone = Function (
281- lambda x : self .base_radius
282- * ((2 * x / self .length - (x / self .length ) ** 2 ) / (2 - 1 ))
293+ lambda x : (
294+ self .base_radius
295+ * ((2 * x / self .length - (x / self .length ) ** 2 ) / (2 - 1 ))
296+ )
283297 )
284298 elif value == "powerseries" :
285299 self .k = (2 * self .power ) / ((2 * self .power ) + 1 )
0 commit comments