Skip to content

Commit

Permalink
Merge branch 'hotfix-1.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
camUrban committed Oct 27, 2021
2 parents 652afcc + 90761af commit 06b62a7
Show file tree
Hide file tree
Showing 1,593 changed files with 413 additions and 426 deletions.
19 changes: 12 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# This is the .gitignore file.

# Citation:
# Adapted From: Python.gitignore in the github/gitignore repository
# Author: github
# Date Retrieved: 05/08/2020
# Adapted From: Python.gitignore in the github/gitignore repository
# Author: github
# Date Retrieved: 05/08/2020

# These are the byte-compiled, optimized, and DLL files to ignore.
__pycache__/
Expand Down Expand Up @@ -32,9 +31,8 @@ share/python-wheels/
.installed.cfg
*.egg

# PyInstaller:
# Usually these files are written by a python script from a template before PyInstaller builds the exe, so as to
# inject date/other infos into it.
# PyInstaller: Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

Expand Down Expand Up @@ -130,3 +128,10 @@ cython_debug/

# This is the pre-commit configuration file to ignore.
.pre-commit-config.yaml

# These are folders created by testing to ignore.
/tests/_trial_temp/
/tests/integration/_trial_temp/
/tests/integration/fixtures/_trial_temp/
/tests/unit/_trial_temp/
/tests/unit/fixtures/_trial_temp/
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.

4 changes: 3 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
recursive-include src *
recursive-include pterasoftware *
recursive-exclude pterasoftware/__pycache__ *
recursive-exclude pterasoftware/airfoils/__pycache__ *
34 changes: 17 additions & 17 deletions examples/steady_horseshoe_vortex_lattice_method_solver_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
# install pterasoftware" in your terminal. Here, I am importing the source directory.
# However, if you were working on an external project, you should change this to
# "import pterasoftware as ps".
import src.pterasoftware
import pterasoftware as ps

# Create an airplane object. Note, I am going to declare every attribute for each
# class, even most of them have usable default values. This is simply for educational
# purposes, even though it makes the code much longer than what it needs to be.
example_airplane = src.pterasoftware.geometry.Airplane(
example_airplane = ps.geometry.Airplane(
# Give the airplane object a name. This value defaults to "Untitled".
name="Example Airplane",
# Specify the location of the airplane's center of gravity. This is the point
Expand All @@ -30,7 +30,7 @@
b_ref=None,
c_ref=None,
wings=[
src.pterasoftware.geometry.Wing(
ps.geometry.Wing(
name="Main Wing",
# Define the location of the leading edge of the wing relative to the
# airplane's reference position. These values all default to 0.0 meters.
Expand All @@ -56,7 +56,7 @@
# output to be sensible, each wing must have at least two wing cross
# sections.
wing_cross_sections=[
src.pterasoftware.geometry.WingCrossSection(
ps.geometry.WingCrossSection(
# Define the location of the leading edge of the wing cross
# section relative to the wing's leading edge. These values all
# default to 0.0 meters.
Expand Down Expand Up @@ -96,7 +96,7 @@
# Set the chord of this cross section to be 1.75 meters. This
# value defaults to 1.0 meter.
chord=1.75,
airfoil=src.pterasoftware.geometry.Airfoil(
airfoil=ps.geometry.Airfoil(
# Give the airfoil a name. This defaults to "Untitled
# Airfoil". This name should correspond to a name in the
# airfoil directory or a NACA four series airfoil, unless you
Expand Down Expand Up @@ -124,42 +124,42 @@
# Define the next wing cross section. From here on out,
# the declarations will not be as commented as the previous. See the
# above comments if you have questions.
src.pterasoftware.geometry.WingCrossSection(
ps.geometry.WingCrossSection(
x_le=0.75,
y_le=6.0,
z_le=1.0,
chord=1.5,
twist=5.0,
airfoil=src.pterasoftware.geometry.Airfoil(
airfoil=ps.geometry.Airfoil(
name="naca2412",
),
),
],
),
# Define the next wing.
src.pterasoftware.geometry.Wing(
ps.geometry.Wing(
name="V-Tail",
x_le=6.75,
z_le=0.25,
symmetric=True,
# Define this wing's root wing cross section.
wing_cross_sections=[
src.pterasoftware.geometry.WingCrossSection(
ps.geometry.WingCrossSection(
chord=1.5,
# Give the root wing cross section an airfoil.
airfoil=src.pterasoftware.geometry.Airfoil(
airfoil=ps.geometry.Airfoil(
name="naca0012",
),
twist=-5.0,
),
# Define the wing's tip wing cross section.
src.pterasoftware.geometry.WingCrossSection(
ps.geometry.WingCrossSection(
x_le=0.5,
y_le=2.0,
z_le=1.0,
chord=1.0,
twist=-5.0,
airfoil=src.pterasoftware.geometry.Airfoil(
airfoil=ps.geometry.Airfoil(
name="naca0012",
),
),
Expand All @@ -170,7 +170,7 @@

# Define a new operating point object. This defines the state at which the airplane
# object is operating.
example_operating_point = src.pterasoftware.operating_point.OperatingPoint(
example_operating_point = ps.operating_point.OperatingPoint(
# Define the density of the fluid the airplane is flying in. This defaults to
# 1.225 kilograms per meters cubed.
density=1.225,
Expand All @@ -187,7 +187,7 @@

# Define a new steady problem. A steady problem contains an airplane object and an
# operating point object.
example_problem = src.pterasoftware.problems.SteadyProblem(
example_problem = ps.problems.SteadyProblem(
# Set this steady problem's airplane object to be the one we just created.
airplane=example_airplane,
# Set this steady problem's operating point object ot be the one we just created.
Expand All @@ -202,7 +202,7 @@
# Define a new solver. The available solver objects are the steady horseshoe vortex
# lattice method solver, the steady ring vortex lattice method solver, and the
# unsteady ring vortex lattice method solver.
example_solver = src.pterasoftware.steady_horseshoe_vortex_lattice_method.SteadyHorseshoeVortexLatticeMethodSolver(
example_solver = ps.steady_horseshoe_vortex_lattice_method.SteadyHorseshoeVortexLatticeMethodSolver(
# Solvers just take in one attribute: the problem they are going to solve.
steady_problem=example_problem
)
Expand All @@ -220,10 +220,10 @@
)

# Call this function from the output module to print the results.
src.pterasoftware.output.print_steady_results(steady_solver=example_solver)
ps.output.print_steady_results(steady_solver=example_solver)

# Call the software's draw function on the solver.
src.pterasoftware.output.draw(
ps.output.draw(
solver=example_solver,
# Tell the draw function to show the pressure's on the aircraft's panels. This
# value defaults to false.
Expand Down
44 changes: 22 additions & 22 deletions examples/steady_ring_vortex_lattice_method_solver_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
# install pterasoftware" in your terminal. Here, I am importing the source directory.
# However, if you were working on an external project, you should change this to
# "import pterasoftware as ps".
import src.pterasoftware
import pterasoftware as ps

# Create an airplane object. Note, I am going to declare every attribute for each
# class, even most of them have usable default values. This is simply for educational
# purposes, even though it makes the code much longer than what it needs to be.
example_airplane = src.pterasoftware.geometry.Airplane(
example_airplane = ps.geometry.Airplane(
# Give the airplane object a name. This value defaults to "Untitled".
name="Example Airplane",
# Specify the location of the airplane's center of gravity. This is the point
Expand All @@ -30,7 +30,7 @@
b_ref=None,
c_ref=None,
wings=[
src.pterasoftware.geometry.Wing(
ps.geometry.Wing(
name="Main Wing",
# Define the location of the leading edge of the wing relative to the
# airplane's reference position. These values all default to 0.0 meters.
Expand All @@ -56,7 +56,7 @@
# output to be sensible, each wing must have at least two wing cross
# sections.
wing_cross_sections=[
src.pterasoftware.geometry.WingCrossSection(
ps.geometry.WingCrossSection(
# Define the location of the leading edge of the wing cross
# section relative to the wing's leading edge. These values all
# default to 0.0 meters.
Expand Down Expand Up @@ -97,7 +97,7 @@
# Set the chord of this cross section to be 1.75 meters. This
# value defaults to 1.0 meter.
chord=1.5,
airfoil=src.pterasoftware.geometry.Airfoil(
airfoil=ps.geometry.Airfoil(
# Give the airfoil a name. This defaults to "Untitled
# Airfoil". This name should correspond to a name in the
# airfoil directory or a NACA four series airfoil, unless you
Expand Down Expand Up @@ -125,69 +125,69 @@
# Define the next wing cross section. From here on out,
# the declarations will not be as commented as the previous. See the
# above comments if you have questions.
src.pterasoftware.geometry.WingCrossSection(
ps.geometry.WingCrossSection(
x_le=1.5,
y_le=6.0,
z_le=0.5,
chord=0.75,
control_surface_type="asymmetric",
control_surface_hinge_point=0.75,
control_surface_deflection=10.0,
airfoil=src.pterasoftware.geometry.Airfoil(
airfoil=ps.geometry.Airfoil(
name="naca2412",
),
),
],
),
# Define the next wing.
src.pterasoftware.geometry.Wing(
ps.geometry.Wing(
name="Horizontal Stabilizer",
x_le=6.75,
z_le=0.25,
symmetric=True,
wing_cross_sections=[
src.pterasoftware.geometry.WingCrossSection(
ps.geometry.WingCrossSection(
chord=1.5,
# Give the root wing cross section an airfoil.
airfoil=src.pterasoftware.geometry.Airfoil(
airfoil=ps.geometry.Airfoil(
name="naca0012",
),
twist=-5.0,
),
# Define the wing's tip wing cross section.
src.pterasoftware.geometry.WingCrossSection(
ps.geometry.WingCrossSection(
x_le=0.5,
y_le=2.0,
chord=1.0,
twist=-5.0,
# Give the tip wing cross section an airfoil.
airfoil=src.pterasoftware.geometry.Airfoil(
airfoil=ps.geometry.Airfoil(
name="naca0012",
),
),
],
),
# Define the next wing.
src.pterasoftware.geometry.Wing(
ps.geometry.Wing(
name="Vertical Stabilizer",
x_le=6.75,
z_le=0.5,
symmetric=False,
wing_cross_sections=[
src.pterasoftware.geometry.WingCrossSection(
ps.geometry.WingCrossSection(
chord=1.5,
# Give the root wing cross section an airfoil.
airfoil=src.pterasoftware.geometry.Airfoil(
airfoil=ps.geometry.Airfoil(
name="naca0012",
),
),
# Define the wing's tip wing cross section.
src.pterasoftware.geometry.WingCrossSection(
ps.geometry.WingCrossSection(
x_le=0.5,
z_le=2.0,
chord=1.0,
# Give the tip wing cross section an airfoil.
airfoil=src.pterasoftware.geometry.Airfoil(
airfoil=ps.geometry.Airfoil(
name="naca0012",
),
),
Expand All @@ -198,7 +198,7 @@

# Define a new operating point object. This defines the state at which the airplane
# object is operating.
example_operating_point = src.pterasoftware.operating_point.OperatingPoint(
example_operating_point = ps.operating_point.OperatingPoint(
# Define the density of the fluid the airplane is flying in. This defaults to
# 1.225 kilograms per meters cubed.
density=1.225,
Expand All @@ -215,7 +215,7 @@

# Define a new steady problem. A steady problem contains an airplane object and an
# operating point object.
example_problem = src.pterasoftware.problems.SteadyProblem(
example_problem = ps.problems.SteadyProblem(
# Set this steady problem's airplane object to be the one we just created.
airplane=example_airplane,
# Set this steady problem's operating point object ot be the one we just created.
Expand All @@ -230,7 +230,7 @@
# Define a new solver. The available solver objects are the steady horseshoe vortex
# lattice method solver, the steady ring vortex lattice method solver, and the
# unsteady ring vortex lattice method solver.
example_solver = src.pterasoftware.steady_ring_vortex_lattice_method.SteadyRingVortexLatticeMethodSolver(
example_solver = ps.steady_ring_vortex_lattice_method.SteadyRingVortexLatticeMethodSolver(
# Solvers just take in one attribute: the problem they are going to solve.
steady_problem=example_problem
)
Expand All @@ -248,10 +248,10 @@
)

# Call this function from the output module to print the results.
src.pterasoftware.output.print_steady_results(steady_solver=example_solver)
ps.output.print_steady_results(steady_solver=example_solver)

# Call the software's draw function on the solver.
src.pterasoftware.output.draw(
ps.output.draw(
solver=example_solver,
# Tell the draw function to show the pressure's on the aircraft's panels. This
# value defaults to false.
Expand Down
Loading

0 comments on commit 06b62a7

Please sign in to comment.