@@ -254,46 +254,7 @@ include("panel.jl")
254254include (" body_aerodynamics.jl" )
255255include (" wake.jl" )
256256include (" solver.jl" )
257+ include (" precompile.jl" )
257258
258- @setup_workload begin
259- # Putting some things in `@setup_workload` instead of `@compile_workload` can reduce the size of the
260- # precompile file and potentially make loading faster.
261- # list = [OtherType("hello"), OtherType("world!")]
262- path = dirname (pathof (@__MODULE__ ))
263-
264- @compile_workload begin
265- # all calls in this block will be precompiled, regardless of whether
266- # they belong to your package or not (on Julia 1.8 and higher)
267- # Step 1: Define wing parameters
268- n_panels = 20 # Number of panels
269- span = 20.0 # Wing span [m]
270- chord = 1.0 # Chord length [m]
271- v_a = 20.0 # Magnitude of inflow velocity [m/s]
272- density = 1.225 # Air density [kg/m³]
273- alpha_deg = 30.0 # Angle of attack [degrees]
274- alpha = deg2rad (alpha_deg)
275-
276- # Step 2: Create wing geometry with linear panel distribution
277- wing = Wing (n_panels, spanwise_panel_distribution= LINEAR)
278-
279- # Add wing sections - defining only tip sections with inviscid airfoil model
280- add_section! (wing,
281- [0.0 , span/ 2 , 0.0 ], # Left tip LE
282- [chord, span/ 2 , 0.0 ], # Left tip TE
283- INVISCID)
284- add_section! (wing,
285- [0.0 , - span/ 2 , 0.0 ], # Right tip LE
286- [chord, - span/ 2 , 0.0 ], # Right tip TE
287- INVISCID)
288-
289- # Step 3: Initialize aerodynamics
290- body_aero:: BodyAerodynamics = BodyAerodynamics ([wing])
291-
292- gamma_initial = zeros (length (body_aero. panels))
293- calculate_circulation_distribution_elliptical_wing (gamma_initial, body_aero)
294-
295- nothing
296- end
297- end
298259
299260end # module
0 commit comments