From e7747ce01066e28efe4a97a1dab91a385f63147d Mon Sep 17 00:00:00 2001 From: camUrban Date: Tue, 3 Dec 2024 22:58:56 -0500 Subject: [PATCH] I started making an example file with Daniobot's tail geometry --- .idea/dictionaries/camer.xml | 1 + daniobot/daniobot.py | 135 +++++++++++++++++++++++++++++++++++ 2 files changed, 136 insertions(+) create mode 100644 daniobot/daniobot.py diff --git a/.idea/dictionaries/camer.xml b/.idea/dictionaries/camer.xml index c9686354..319f66f4 100644 --- a/.idea/dictionaries/camer.xml +++ b/.idea/dictionaries/camer.xml @@ -32,6 +32,7 @@ cosspace curtiss customspace + daniobot davissm dbln dfvlr diff --git a/daniobot/daniobot.py b/daniobot/daniobot.py new file mode 100644 index 00000000..8090bce3 --- /dev/null +++ b/daniobot/daniobot.py @@ -0,0 +1,135 @@ +import pterasoftware as ps + +daniobot = ps.geometry.Airplane( + name="Daniobot", + x_ref=0.0, + y_ref=0.0, + z_ref=0.0, + wings=[ + ps.geometry.Wing( + name="Tail", + x_le=0.0, + y_le=0.0, + z_le=0.0, + symmetric=True, + num_chordwise_panels=16, + chordwise_spacing="uniform", + wing_cross_sections=[ + ps.geometry.WingCrossSection( + num_spanwise_panels=8, + spanwise_spacing="cosine", + chord=2.00e-2, + airfoil=ps.geometry.Airfoil( + name="naca0012", + ), + ), + ps.geometry.WingCrossSection( + num_spanwise_panels=8, + spanwise_spacing="cosine", + y_le=0.50e-2, + chord=2.00e-2, + airfoil=ps.geometry.Airfoil( + name="naca0012", + ), + ), + ps.geometry.WingCrossSection( + x_le=0.50e-2, + y_le=1.00e-2, + chord=1.50e-2, + airfoil=ps.geometry.Airfoil( + name="naca0012", + ), + ), + ], + ), + ], +) + +tail_root_wing_cross_section_movement = ps.movement.WingCrossSectionMovement( + base_wing_cross_section=daniobot.wings[0].wing_cross_sections[0], + pitching_amplitude=15.0, + pitching_period=1.0, + pitching_spacing="sine", +) + +tail_mid_wing_cross_section_movement = ps.movement.WingCrossSectionMovement( + base_wing_cross_section=daniobot.wings[0].wing_cross_sections[1], + pitching_amplitude=15.0, + pitching_period=1.0, + pitching_spacing="sine", +) + +tail_tip_wing_cross_section_movement = ps.movement.WingCrossSectionMovement( + base_wing_cross_section=daniobot.wings[0].wing_cross_sections[2], + pitching_amplitude=15.0, + pitching_period=1.0, + pitching_spacing="sine", +) + +tail_movement = ps.movement.WingMovement( + base_wing=daniobot.wings[0], + wing_cross_sections_movements=[ + tail_root_wing_cross_section_movement, + tail_mid_wing_cross_section_movement, + tail_tip_wing_cross_section_movement, + ], +) + +daniobot_movement = ps.movement.AirplaneMovement( + base_airplane=daniobot, + wing_movements=[tail_movement], +) + +del tail_movement + +operating_point = ps.operating_point.OperatingPoint( + density=997, + beta=0.0, + velocity=0.01, + alpha=0, + nu=1.00e-6, +) + +operating_point_movement = ps.movement.OperatingPointMovement( + base_operating_point=operating_point, +) + +movement = ps.movement.Movement( + airplane_movements=[daniobot_movement], + operating_point_movement=operating_point_movement, + num_cycles=5, +) + +del daniobot_movement +del operating_point_movement + +problem = ps.problems.UnsteadyProblem( + movement=movement, +) + +del movement + +solver = ps.unsteady_ring_vortex_lattice_method.UnsteadyRingVortexLatticeMethodSolver( + unsteady_problem=problem, +) + +del problem + +solver.run( + prescribed_wake=False, + calculate_streamlines=False, +) + +ps.output.animate( + unsteady_solver=solver, + scalar_type="induced drag", + show_wake_vortices=True, + save=False, +) + +ps.output.draw( + solver=solver, + scalar_type="induced drag", + show_wake_vortices=True, + save=False, +)