Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/plot_airfoils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from optvl import OVLSolver
import matplotlib.pyplot as plt

ovl = OVLSolver(geo_file="../geom_files/aircraft.avl", debug=True)
ovl = OVLSolver(geo_file="../geom_files/aircraft.avl", debug=False)
surf_data = ovl.get_surface_params(include_geom=True, include_airfoils=True)

colors = plt.rcParams["axes.prop_cycle"].by_key()["color"]
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ project(
'optvl',
'c',
# don't forget to change the value in pyproject.toml
version: '2.2.3',
version: '2.2.4',
license: 'GPL-3.0',
meson_version: '>= 0.64.0',
default_options: [
Expand Down
10 changes: 4 additions & 6 deletions optvl/optvl_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -2469,12 +2469,10 @@ def get_surface_params(
naca = self.__fort_char_array_to_str(self.avl.CASE_C.NACA[idx_sec, idx_surf])
nacas.append(naca)

airfoilx = np.trim_zeros(
self.get_avl_fort_arr("SURF_GEOM_R", "XSEC")[idx_surf, idx_sec, slice(None)]
)
airfoily = np.trim_zeros(
self.get_avl_fort_arr("SURF_GEOM_R", "YSEC")[idx_surf, idx_sec, slice(None)]
)
npts = self.get_avl_fort_arr("SURF_GEOM_I", "NAPTSSEC", slicer=(idx_surf,idx_sec))

airfoilx = self.get_avl_fort_arr("SURF_GEOM_R", "XSEC", slicer=(idx_surf, idx_sec, slice(0, npts)))
airfoily = self.get_avl_fort_arr("SURF_GEOM_R", "YSEC", slicer=(idx_surf, idx_sec, slice(0, npts)))

airfoils.append(np.array([airfoilx, airfoily]))

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies = [
"numpy>=1.19",
]
readme = "README.md"
version = "2.2.3" # this automatically updates __init__.py and setup_deprecated.py
version = "2.2.4" # this automatically updates __init__.py and setup_deprecated.py
# don't forget to change the value in meson.build!


Expand Down
4 changes: 4 additions & 0 deletions src/ainput.f
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@ SUBROUTINE INPUT(LUN,FNAME,FERR)
C------ default section...
C ...flat camberline
NASEC(ISEC,ISURF) = 2
NAPTSSEC(ISEC,ISURF) = 0
XASEC(1,ISEC, ISURF) = 0.0
XASEC(2,ISEC, ISURF) = 1.0
SASEC(1,ISEC, ISURF) = 0.0
Expand Down Expand Up @@ -677,6 +678,7 @@ SUBROUTINE INPUT(LUN,FNAME,FERR)
T = FLOAT(ITHK) / 100.0
C
NASEC(ISEC,ISURF) = MIN( 50 , IBX )
NAPTSSEC(ISEC,ISURF) = NASEC(ISEC,ISURF)*2
DO I = 1, NASEC(ISEC,ISURF)
XF = XFMIN +
& (XFMAX-XFMIN)*FLOAT(I-1)/FLOAT(NASEC(ISEC,ISURF)-1)
Expand Down Expand Up @@ -812,6 +814,7 @@ SUBROUTINE INPUT(LUN,FNAME,FERR)
C
C------ store airfoil only if surface and section are active
NASEC(ISEC,ISURF) = NIN
NAPTSSEC(ISEC,ISURF) = NB
DO I = 1, NIN
XF = XFMIN +
& (XFMAX-XFMIN)*FLOAT(I-1)/FLOAT(NASEC(ISEC,ISURF)-1)
Expand Down Expand Up @@ -934,6 +937,7 @@ SUBROUTINE INPUT(LUN,FNAME,FERR)
C
C------- camberline slopes at specified locations from spline
NASEC(ISEC,ISURF) = NIN
NAPTSSEC(ISEC,ISURF) = NB
DO I = 1, NIN
XF = XFMIN +
& (XFMAX-XFMIN)*FLOAT(I-1)/FLOAT(NASEC(ISEC,ISURF)-1)
Expand Down
1 change: 1 addition & 0 deletions src/amake.f
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,7 @@ subroutine set_section_coordinates(isec,isurf,x,y,n,nin,xfmin,
call GETCAM(x,y,n,xin,yin,tin,nin,.true.)

NASEC(isec,isurf) = nin
NAPTSSEC(isec,isurf) = n

do i = 1, nin
xf = xfmin +
Expand Down
3 changes: 2 additions & 1 deletion src/includes/AVL.INC
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@ c
& NVC(NFMAX), ! number of chordwise elements
& NVS(NFMAX), ! number of spanwise elements
& NSPANS(NSECMAX, NFMAX), ! number of spanwise elements vector
& NASEC(NSECMAX, NFMAX),
& NASEC(NSECMAX, NFMAX), ! number of points used to represent section geometry
& NAPTSSEC(NSECMAX, IBX), ! number of points of input airfoil geometry
& ICONTD(ICONX, NSECMAX, NFMAX), ! control variable index
& NSCON(NSECMAX, NFMAX), ! number of control variables
& IDESTD(ICONX, NSECMAX, NFMAX), ! design variable index
Expand Down
Loading