Skip to content

Commit

Permalink
I started making an example file with Daniobot's tail geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
camUrban committed Dec 4, 2024
1 parent 0cb08f6 commit e7747ce
Show file tree
Hide file tree
Showing 2 changed files with 136 additions and 0 deletions.
1 change: 1 addition & 0 deletions .idea/dictionaries/camer.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

135 changes: 135 additions & 0 deletions daniobot/daniobot.py
Original file line number Diff line number Diff line change
@@ -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,
)

0 comments on commit e7747ce

Please sign in to comment.