From 5af3aa688a076f463d037f7174b7904489fd55cf Mon Sep 17 00:00:00 2001 From: camUrban Date: Mon, 25 Nov 2024 17:00:07 -0500 Subject: [PATCH] I reformatted more files with the new black presets. --- .idea/misc.xml | 1 + benchmarks/unsteady_benchmark.py | 1 + benchmarks/unsteady_benchmark_timed.py | 1 + examples/analyze_steady_trim_example.py | 1 + examples/analyze_unsteady_trim_example.py | 1 + examples/steady_convergence_example.py | 1 + examples/unsteady_static_convergence_example.py | 1 + examples/unsteady_variable_convergence_example.py | 1 + formation flight/formation_flight_convergence.py | 12 ++++++------ pterasoftware/geometry.py | 1 - tests/integration/fixtures/airplane_fixtures.py | 1 + tests/integration/fixtures/movement_fixtures.py | 1 + tests/integration/fixtures/problem_fixtures.py | 1 + tests/integration/fixtures/solver_fixtures.py | 1 + tests/integration/test_output.py | 1 + tests/integration/test_steady_convergence.py | 1 + .../test_steady_horseshoe_vortex_lattice_method.py | 1 + .../test_steady_ring_vortex_lattice_method.py | 1 + tests/integration/test_steady_trim.py | 1 + tests/integration/test_unsteady_convergence.py | 1 + ...x_lattice_method_multiple_wing_static_geometry.py | 1 + ...lattice_method_multiple_wing_variable_geometry.py | 1 + ...ady_ring_vortex_lattice_method_static_geometry.py | 1 + ...y_ring_vortex_lattice_method_variable_geometry.py | 1 + tests/unit/fixtures/vortex_fixtures.py | 1 + tests/unit/test_horseshoe_vortex.py | 1 + tests/unit/test_line_vortex.py | 1 + tests/unit/test_ring_vortex.py | 1 + 28 files changed, 32 insertions(+), 7 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 6db5079e..c3c2ab21 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,7 @@ + diff --git a/benchmarks/unsteady_benchmark.py b/benchmarks/unsteady_benchmark.py index 87f5cca2..250492a5 100644 --- a/benchmarks/unsteady_benchmark.py +++ b/benchmarks/unsteady_benchmark.py @@ -2,6 +2,7 @@ It is useful for profiling the unsteady solver, which cannot be done with unsteady_benchmark_timed.py. This script doesn't have any expected output images in the docs directory. Do not commit any changes to this file. """ + import pterasoftware as ps flapping_frequency = 1 diff --git a/benchmarks/unsteady_benchmark_timed.py b/benchmarks/unsteady_benchmark_timed.py index d7f4b664..17c504b7 100644 --- a/benchmarks/unsteady_benchmark_timed.py +++ b/benchmarks/unsteady_benchmark_timed.py @@ -1,6 +1,7 @@ """This script is used to benchmark the speed of the unsteady solver with a typical use case. This script doesn't have any expected output images in the docs directory. Do not commit any changes to this file. """ + import timeit import numpy as np diff --git a/examples/analyze_steady_trim_example.py b/examples/analyze_steady_trim_example.py index 9a85d7ee..8a4be2de 100644 --- a/examples/analyze_steady_trim_example.py +++ b/examples/analyze_steady_trim_example.py @@ -1,6 +1,7 @@ """This example script demonstrates how to automatically find the trim condition for a steady simulation. It is not as well documented as some solver example scripts, as it assumes you have read and understood those first. """ + import logging import pterasoftware as ps diff --git a/examples/analyze_unsteady_trim_example.py b/examples/analyze_unsteady_trim_example.py index af6895fe..28d4035e 100644 --- a/examples/analyze_unsteady_trim_example.py +++ b/examples/analyze_unsteady_trim_example.py @@ -1,6 +1,7 @@ """This example script demonstrates how to automatically find the trim condition for an unsteady simulation. It is not as well documented as some solver example scripts, as it assumes you have read and understood those first. """ + import logging import pterasoftware as ps diff --git a/examples/steady_convergence_example.py b/examples/steady_convergence_example.py index c824d211..d6516cc8 100644 --- a/examples/steady_convergence_example.py +++ b/examples/steady_convergence_example.py @@ -1,6 +1,7 @@ """This script is an example of analyzing the steady convergence of a problem with multiple airplanes. It should take a few minutes to run. It will display the convergence progress and results in the console. """ + import pterasoftware as ps # Create two airplane objects. Read through the solver and formation examples for diff --git a/examples/unsteady_static_convergence_example.py b/examples/unsteady_static_convergence_example.py index 5bb1849c..0524e291 100644 --- a/examples/unsteady_static_convergence_example.py +++ b/examples/unsteady_static_convergence_example.py @@ -1,6 +1,7 @@ """This script is an example of analyzing the unsteady convergence of a problem with static geometry. It should take a few minutes to run. It will display the convergence progress and results in the console. """ + import pterasoftware as ps # Create an airplane and airplane movement object. Read through the unsteady solver diff --git a/examples/unsteady_variable_convergence_example.py b/examples/unsteady_variable_convergence_example.py index bf102f84..1b0ba048 100644 --- a/examples/unsteady_variable_convergence_example.py +++ b/examples/unsteady_variable_convergence_example.py @@ -1,6 +1,7 @@ """This script is an example of analyzing the unsteady convergence of a problem with variable geometry. It should take about 30 minutes to run. It will display the convergence progress and results in the console. """ + import pterasoftware as ps # Create an airplane and airplane movement object. Read through the unsteady solver diff --git a/formation flight/formation_flight_convergence.py b/formation flight/formation_flight_convergence.py index a9b2ec0e..c22a93ef 100644 --- a/formation flight/formation_flight_convergence.py +++ b/formation flight/formation_flight_convergence.py @@ -240,12 +240,12 @@ for step in range(first_results_step, num_steps): airplanes = this_solver.steady_problems[step].airplanes for airplane_id, airplane in enumerate(airplanes): - total_forces[ - airplane_id, :, results_step - ] = airplane.total_near_field_force_wind_axes - total_moments[ - airplane_id, :, results_step - ] = airplane.total_near_field_moment_wind_axes + total_forces[airplane_id, :, results_step] = ( + airplane.total_near_field_force_wind_axes + ) + total_moments[airplane_id, :, results_step] = ( + airplane.total_near_field_moment_wind_axes + ) results_step += 1 these_s_drags = total_forces[:, 0, :] ** 2 diff --git a/pterasoftware/geometry.py b/pterasoftware/geometry.py index 5debd254..c4e72698 100644 --- a/pterasoftware/geometry.py +++ b/pterasoftware/geometry.py @@ -192,7 +192,6 @@ def __init__( y_le=0.0, z_le=0.0, wing_cross_sections=None, - symmetric=False, num_chordwise_panels=8, chordwise_spacing="cosine", diff --git a/tests/integration/fixtures/airplane_fixtures.py b/tests/integration/fixtures/airplane_fixtures.py index 8dabb311..2cb5c0d6 100644 --- a/tests/integration/fixtures/airplane_fixtures.py +++ b/tests/integration/fixtures/airplane_fixtures.py @@ -23,6 +23,7 @@ a multi-wing, symmetric airplane object to be used as a fixture for testing unsteady solvers. """ + import pterasoftware as ps diff --git a/tests/integration/fixtures/movement_fixtures.py b/tests/integration/fixtures/movement_fixtures.py index d97253a7..d69598ab 100644 --- a/tests/integration/fixtures/movement_fixtures.py +++ b/tests/integration/fixtures/movement_fixtures.py @@ -19,6 +19,7 @@ make_multiple_wing_variable_validation_movement: This function creates a movement object with variable, multi-wing geometry to be used as a fixture. """ + import pterasoftware as ps from tests.integration.fixtures import airplane_fixtures from tests.integration.fixtures import operating_point_fixtures diff --git a/tests/integration/fixtures/problem_fixtures.py b/tests/integration/fixtures/problem_fixtures.py index 7d262495..acc1c361 100644 --- a/tests/integration/fixtures/problem_fixtures.py +++ b/tests/integration/fixtures/problem_fixtures.py @@ -27,6 +27,7 @@ function creates an unsteady problem object with multi-wing, variable geometry to be used as a fixture. """ + import pterasoftware as ps from tests.integration.fixtures import airplane_fixtures from tests.integration.fixtures import movement_fixtures diff --git a/tests/integration/fixtures/solver_fixtures.py b/tests/integration/fixtures/solver_fixtures.py index 62c76ec8..7d83e780 100644 --- a/tests/integration/fixtures/solver_fixtures.py +++ b/tests/integration/fixtures/solver_fixtures.py @@ -34,6 +34,7 @@ This function creates a solver object with multi-wing, variable geometry using the unsteady ring vortex lattice method to be used as a fixture. """ + import pterasoftware as ps from tests.integration.fixtures import problem_fixtures diff --git a/tests/integration/test_output.py b/tests/integration/test_output.py index 5623098e..7e6854fc 100644 --- a/tests/integration/test_output.py +++ b/tests/integration/test_output.py @@ -12,6 +12,7 @@ This module contains the following functions: None """ + import unittest import pterasoftware as ps diff --git a/tests/integration/test_steady_convergence.py b/tests/integration/test_steady_convergence.py index 7c5b675e..36e52448 100644 --- a/tests/integration/test_steady_convergence.py +++ b/tests/integration/test_steady_convergence.py @@ -9,6 +9,7 @@ This module contains the following functions: None """ + import unittest import pterasoftware as ps diff --git a/tests/integration/test_steady_horseshoe_vortex_lattice_method.py b/tests/integration/test_steady_horseshoe_vortex_lattice_method.py index 1b97dadc..8bda01df 100644 --- a/tests/integration/test_steady_horseshoe_vortex_lattice_method.py +++ b/tests/integration/test_steady_horseshoe_vortex_lattice_method.py @@ -25,6 +25,7 @@ This module contains the following functions: None """ + import unittest import pterasoftware as ps diff --git a/tests/integration/test_steady_ring_vortex_lattice_method.py b/tests/integration/test_steady_ring_vortex_lattice_method.py index 1a6fd333..be7c5719 100644 --- a/tests/integration/test_steady_ring_vortex_lattice_method.py +++ b/tests/integration/test_steady_ring_vortex_lattice_method.py @@ -18,6 +18,7 @@ This module contains the following functions: None """ + import unittest import pterasoftware as ps diff --git a/tests/integration/test_steady_trim.py b/tests/integration/test_steady_trim.py index c73f7a2a..1163a967 100644 --- a/tests/integration/test_steady_trim.py +++ b/tests/integration/test_steady_trim.py @@ -10,6 +10,7 @@ This module contains the following functions: None """ + import unittest import pterasoftware as ps diff --git a/tests/integration/test_unsteady_convergence.py b/tests/integration/test_unsteady_convergence.py index be556e91..286416c4 100644 --- a/tests/integration/test_unsteady_convergence.py +++ b/tests/integration/test_unsteady_convergence.py @@ -10,6 +10,7 @@ This module contains the following functions: None """ + import unittest import pterasoftware as ps diff --git a/tests/integration/test_unsteady_ring_vortex_lattice_method_multiple_wing_static_geometry.py b/tests/integration/test_unsteady_ring_vortex_lattice_method_multiple_wing_static_geometry.py index e139187f..bc3a34fc 100644 --- a/tests/integration/test_unsteady_ring_vortex_lattice_method_multiple_wing_static_geometry.py +++ b/tests/integration/test_unsteady_ring_vortex_lattice_method_multiple_wing_static_geometry.py @@ -13,6 +13,7 @@ This module contains the following functions: None """ + import unittest import pterasoftware as ps diff --git a/tests/integration/test_unsteady_ring_vortex_lattice_method_multiple_wing_variable_geometry.py b/tests/integration/test_unsteady_ring_vortex_lattice_method_multiple_wing_variable_geometry.py index 5ab0cb34..adb26df9 100644 --- a/tests/integration/test_unsteady_ring_vortex_lattice_method_multiple_wing_variable_geometry.py +++ b/tests/integration/test_unsteady_ring_vortex_lattice_method_multiple_wing_variable_geometry.py @@ -14,6 +14,7 @@ This module contains the following functions: None """ + import unittest import pterasoftware as ps diff --git a/tests/integration/test_unsteady_ring_vortex_lattice_method_static_geometry.py b/tests/integration/test_unsteady_ring_vortex_lattice_method_static_geometry.py index 7650105e..272959cc 100644 --- a/tests/integration/test_unsteady_ring_vortex_lattice_method_static_geometry.py +++ b/tests/integration/test_unsteady_ring_vortex_lattice_method_static_geometry.py @@ -20,6 +20,7 @@ This module contains the following functions: None """ + import unittest import pterasoftware as ps diff --git a/tests/integration/test_unsteady_ring_vortex_lattice_method_variable_geometry.py b/tests/integration/test_unsteady_ring_vortex_lattice_method_variable_geometry.py index 1240946e..371962a1 100644 --- a/tests/integration/test_unsteady_ring_vortex_lattice_method_variable_geometry.py +++ b/tests/integration/test_unsteady_ring_vortex_lattice_method_variable_geometry.py @@ -13,6 +13,7 @@ This module contains the following functions: None """ + import unittest import pterasoftware as ps diff --git a/tests/unit/fixtures/vortex_fixtures.py b/tests/unit/fixtures/vortex_fixtures.py index 87e76aaf..364fa625 100644 --- a/tests/unit/fixtures/vortex_fixtures.py +++ b/tests/unit/fixtures/vortex_fixtures.py @@ -39,6 +39,7 @@ make_ring_vortex_fixture: This method makes a fixture that is a ring vortex object. """ + import numpy as np import pterasoftware as ps diff --git a/tests/unit/test_horseshoe_vortex.py b/tests/unit/test_horseshoe_vortex.py index d9345ac8..97404454 100644 --- a/tests/unit/test_horseshoe_vortex.py +++ b/tests/unit/test_horseshoe_vortex.py @@ -10,6 +10,7 @@ This module contains the following functions: None """ + import unittest import numpy as np diff --git a/tests/unit/test_line_vortex.py b/tests/unit/test_line_vortex.py index 37f09ee2..3e663e40 100644 --- a/tests/unit/test_line_vortex.py +++ b/tests/unit/test_line_vortex.py @@ -9,6 +9,7 @@ This module contains the following functions: None """ + import unittest import numpy as np diff --git a/tests/unit/test_ring_vortex.py b/tests/unit/test_ring_vortex.py index 49b40330..84a0f1ba 100644 --- a/tests/unit/test_ring_vortex.py +++ b/tests/unit/test_ring_vortex.py @@ -9,6 +9,7 @@ This module contains the following functions: TestRingVortex: This is a class with functions to test ring vortex objects. """ + import unittest import numpy as np