Skip to content

Commit

Permalink
Merge pull request #151 from jokr-1/master
Browse files Browse the repository at this point in the history
AVL Command Fix
  • Loading branch information
peterdsharpe authored Dec 17, 2024
2 parents c28b6ff + f3bbe69 commit 1ab44d7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,3 +303,7 @@ If you use AeroSandbox, attribution is appreciated.
## Stargazers over time

[![Stargazers over time](https://starchart.cc/peterdsharpe/AeroSandbox.svg)](https://starchart.cc/peterdsharpe/AeroSandbox)

## Supported by

<a href="https://jb.gg/OpenSourceSupport"><img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jetbrains.svg" alt="JetBrains logo."></a>
19 changes: 7 additions & 12 deletions aerosandbox/aerodynamics/aero_3D/avl.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from aerosandbox.common import ExplicitAnalysis
import aerosandbox.numpy as np
import subprocess
from pathlib import Path
from aerosandbox.geometry import Airplane, Wing, WingXSec, Fuselage, ControlSurface
from aerosandbox.performance import OperatingPoint
from typing import Union, List, Dict
import tempfile
import warnings
from pathlib import Path
from typing import Dict, List, Union

import aerosandbox.numpy as np
from aerosandbox.common import ExplicitAnalysis
from aerosandbox.geometry import Airplane, ControlSurface, Fuselage, Wing, WingXSec
from aerosandbox.performance import OperatingPoint


class AVL(ExplicitAnalysis):
Expand Down Expand Up @@ -341,7 +342,6 @@ def run(
return res

def _default_keystroke_file_contents(self) -> List[str]:

run_file_contents = []

# Disable graphics
Expand Down Expand Up @@ -441,7 +441,6 @@ def clean(s):
airfoil_counter = 0

for wing in airplane.wings:

wing_options = self.get_options(wing)

spacing_line = f"{wing_options['chordwise_resolution']} {self.AVL_spacing_parameters[wing_options['chordwise_spacing']]}"
Expand Down Expand Up @@ -533,7 +532,6 @@ def clean(s):

### Write the commands for each wing section
for i, xsec in enumerate(wing.xsecs):

xsec_options = self.get_options(xsec)

xsec_def_line = f"{xsec.xyz_le[0]:.8g} {xsec.xyz_le[1]:.8g} {xsec.xyz_le[2]:.8g} {xsec.chord:.8g} {xsec.twist:.8g}"
Expand Down Expand Up @@ -743,7 +741,6 @@ def parse_unformatted_data_output(
index = s.find(data_identifier)

while index != -1: # While there are still data identifiers:

key = "" # start with a blank key, which we will build up as we read

i = index - 1 # Starting from the left of the identifier
Expand Down Expand Up @@ -804,10 +801,8 @@ def parse_unformatted_data_output(


if __name__ == "__main__":

### Import Vanilla Airplane
import aerosandbox as asb

from aerosandbox.aerodynamics.aero_3D.test_aero_3D.geometries.vanilla import (
airplane as vanilla,
)
Expand Down

0 comments on commit 1ab44d7

Please sign in to comment.