Skip to content

Commit

Permalink
Adds number of repaneling points as a user-specified parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdsharpe committed Apr 8, 2024
1 parent 824968b commit 9dab4a0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion aerosandbox/aerodynamics/aero_2D/xfoil.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def __init__(self,
max_iter: int = 100,
xfoil_command: str = "xfoil",
xfoil_repanel: bool = True,
xfoil_repanel_n_points: int = 279,
include_bl_data: bool = False,
verbose: bool = False,
timeout: Union[float, int, None] = 30,
Expand Down Expand Up @@ -119,6 +120,10 @@ def __init__(self,
xfoil_repanel: Controls whether to allow XFoil to repanel your airfoil using its internal methods (PANE,
with default settings, 160 nodes). Boolean, defaults to True.
xfoil_repanel_n_points: If `xfoil_repanel` is True, this controls the number of points to repanel the
airfoil to within XFoil. Defaults to 279, which is the highest number of panel points before XFoil's
`IWX` array overfills and starts trimming wake points.
include_bl_data: Controls whether or not to include boundary layer data in the output. If this is True,
the functions `alpha()` and `cl()` will return a dictionary with an additional key, "bl_data",
which contains the boundary layer data in the form of a pandas DataFrame. Results in slightly higher
Expand Down Expand Up @@ -148,6 +153,7 @@ def __init__(self,
self.max_iter = max_iter
self.xfoil_command = xfoil_command
self.xfoil_repanel = xfoil_repanel
self.xfoil_repanel_n_points = xfoil_repanel_n_points
self.include_bl_data = include_bl_data
self.verbose = verbose
self.timeout = timeout
Expand Down Expand Up @@ -188,7 +194,7 @@ def _default_keystrokes(self,
if self.xfoil_repanel:
run_file_contents += [
"ppar",
"n 279" # Highest number of panel points before XFoil IWX array overfills and starts trimming wake
f"n {self.xfoil_repanel_n_points}",
"",
"",
"",
Expand Down

0 comments on commit 9dab4a0

Please sign in to comment.